diff options
author | Christian Grothoff <christian@grothoff.org> | 2005-07-04 22:54:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2005-07-04 22:54:14 +0000 |
commit | 7e9b44eb4e495322c223b87d389cc561b9b6c100 (patch) | |
tree | 9db4ffe589562166c128358bc0acdb1a6a8d4c83 | |
parent | cf41db7b07daf724ec3027e0767e8fc26b442b20 (diff) | |
download | gnunet-gtk-7e9b44eb4e495322c223b87d389cc561b9b6c100.tar.gz gnunet-gtk-7e9b44eb4e495322c223b87d389cc561b9b6c100.zip |
preliminary changes -- code cannot work yet
-rwxr-xr-x | bootstrap | 3 | ||||
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | libltdl/COPYING.LIB | 510 | ||||
-rw-r--r-- | libltdl/Makefile.am | 51 | ||||
-rw-r--r-- | libltdl/Makefile.in | 656 | ||||
-rw-r--r-- | libltdl/README | 10 | ||||
-rw-r--r-- | libltdl/aclocal.m4 | 7218 | ||||
-rw-r--r-- | libltdl/config-h.in | 195 | ||||
-rwxr-xr-x | libltdl/config.guess | 1465 | ||||
-rwxr-xr-x | libltdl/config.sub | 1569 | ||||
-rwxr-xr-x | libltdl/configure | 23702 | ||||
-rw-r--r-- | libltdl/configure.ac | 80 | ||||
-rwxr-xr-x | libltdl/install-sh | 325 | ||||
-rw-r--r-- | libltdl/ltdl.c | 4478 | ||||
-rw-r--r-- | libltdl/ltdl.h | 366 | ||||
-rw-r--r-- | libltdl/ltmain.sh | 6426 | ||||
-rwxr-xr-x | libltdl/missing | 360 | ||||
-rw-r--r-- | mkinstalldirs | 6 | ||||
-rw-r--r-- | src/Makefile.am | 29 | ||||
-rw-r--r-- | src/common/Makefile.am | 22 | ||||
-rw-r--r-- | src/common/helper.c (renamed from src/helper.c) | 0 | ||||
-rw-r--r-- | src/core/Makefile.am | 20 | ||||
-rw-r--r-- | src/core/main.c (renamed from src/main.c) | 23 | ||||
-rw-r--r-- | src/core/main.h (renamed from src/main.h) | 0 | ||||
-rw-r--r-- | src/include/Makefile.am | 4 | ||||
-rw-r--r-- | src/include/gettext.h (renamed from src/gettext.h) | 0 | ||||
-rw-r--r-- | src/include/helper.h (renamed from src/helper.h) | 0 | ||||
-rw-r--r-- | src/include/platform.h (renamed from src/platform.h) | 0 | ||||
-rw-r--r-- | src/include/plibc.h (renamed from src/plibc.h) | 0 | ||||
-rw-r--r-- | src/plugins/Makefile.am | 1 | ||||
-rw-r--r-- | src/plugins/about/Makefile.am | 17 | ||||
-rw-r--r-- | src/plugins/about/about.c (renamed from src/about.c) | 0 | ||||
-rw-r--r-- | src/plugins/daemon/Makefile.am | 17 | ||||
-rw-r--r-- | src/plugins/daemon/daemon.c (renamed from src/daemon.c) | 11 | ||||
-rw-r--r-- | src/plugins/daemon/daemon.h (renamed from src/daemon.h) | 0 | ||||
-rw-r--r-- | src/plugins/fs/Makefile.am | 27 | ||||
-rw-r--r-- | src/plugins/fs/download.c (renamed from src/download.c) | 0 | ||||
-rw-r--r-- | src/plugins/fs/download.h (renamed from src/download.h) | 0 | ||||
-rw-r--r-- | src/plugins/fs/extensions/musicinsert.c (renamed from src/fs/extensions/musicinsert.c) | 0 | ||||
-rw-r--r-- | src/plugins/fs/extensions/musicinsert.glade (renamed from src/fs/extensions/musicinsert.glade) | 0 | ||||
-rw-r--r-- | src/plugins/fs/extensions/musicinsert.h (renamed from src/fs/extensions/musicinsert.h) | 0 | ||||
-rw-r--r-- | src/plugins/fs/fs.c (renamed from src/fs.c) | 0 | ||||
-rw-r--r-- | src/plugins/fs/fs.h (renamed from src/fs.h) | 0 | ||||
-rw-r--r-- | src/plugins/fs/search.c (renamed from src/search.c) | 0 | ||||
-rw-r--r-- | src/plugins/fs/search.h (renamed from src/search.h) | 0 | ||||
-rw-r--r-- | src/plugins/fs/upload.c (renamed from src/upload.c) | 0 | ||||
-rw-r--r-- | src/plugins/fs/upload.h (renamed from src/upload.h) | 0 |
47 files changed, 47566 insertions, 45 deletions
@@ -1,3 +1,6 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | export WANT_AUTOMAKE="1.7" | 2 | export WANT_AUTOMAKE="1.7" |
3 | cd libltdl | ||
4 | autoreconf -f -i | ||
5 | cd .. | ||
3 | autoreconf -f -i | 6 | autoreconf -f -i |
diff --git a/configure.ac b/configure.ac index 5f9f7c63..ce8dd6cd 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -35,12 +35,25 @@ AC_PROG_CPP | |||
35 | AC_PROG_INSTALL | 35 | AC_PROG_INSTALL |
36 | AC_PROG_LN_S | 36 | AC_PROG_LN_S |
37 | AC_PROG_MAKE_SET | 37 | AC_PROG_MAKE_SET |
38 | AC_LIBTOOL_WIN32_DLL | ||
38 | AC_PROG_CC | 39 | AC_PROG_CC |
39 | AM_PROG_CC_STDC | 40 | AM_PROG_CC_STDC |
40 | AC_PROG_CXX | 41 | AC_PROG_CXX |
41 | AC_HEADER_STDC | 42 | AC_HEADER_STDC |
42 | AC_CANONICAL_HOST | 43 | AC_CANONICAL_HOST |
43 | 44 | ||
45 | |||
46 | # dynamic libraries/plugins | ||
47 | AC_LIBTOOL_DLOPEN | ||
48 | AC_LIBLTDL_INSTALLABLE | ||
49 | AC_SUBST(LTDLINCL) | ||
50 | AC_SUBST(LIBLTDL) | ||
51 | AC_DISABLE_STATIC | ||
52 | AC_PROG_LIBTOOL | ||
53 | AC_LIB_LTDL | ||
54 | AC_CONFIG_SUBDIRS(libltdl) | ||
55 | |||
56 | |||
44 | AC_SYS_LARGEFILE | 57 | AC_SYS_LARGEFILE |
45 | AC_FUNC_FSEEKO | 58 | AC_FUNC_FSEEKO |
46 | 59 | ||
@@ -245,6 +258,13 @@ AC_OUTPUT([ | |||
245 | Makefile | 258 | Makefile |
246 | doc/Makefile | 259 | doc/Makefile |
247 | src/Makefile | 260 | src/Makefile |
261 | src/include/Makefile | ||
262 | src/common/Makefile | ||
263 | src/core/Makefile | ||
264 | src/plugins/Makefile | ||
265 | src/plugins/about/Makefile | ||
266 | src/plugins/daemon/Makefile | ||
267 | src/plugins/fs/Makefile | ||
248 | po/Makefile.in | 268 | po/Makefile.in |
249 | po/Makefile | 269 | po/Makefile |
250 | ]) | 270 | ]) |
diff --git a/libltdl/COPYING.LIB b/libltdl/COPYING.LIB new file mode 100644 index 00000000..0d516d2d --- /dev/null +++ b/libltdl/COPYING.LIB | |||
@@ -0,0 +1,510 @@ | |||
1 | |||
2 | GNU LESSER GENERAL PUBLIC LICENSE | ||
3 | Version 2.1, February 1999 | ||
4 | |||
5 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. | ||
6 | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
7 | Everyone is permitted to copy and distribute verbatim copies | ||
8 | of this license document, but changing it is not allowed. | ||
9 | |||
10 | [This is the first released version of the Lesser GPL. It also counts | ||
11 | as the successor of the GNU Library Public License, version 2, hence | ||
12 | the version number 2.1.] | ||
13 | |||
14 | Preamble | ||
15 | |||
16 | The licenses for most software are designed to take away your | ||
17 | freedom to share and change it. By contrast, the GNU General Public | ||
18 | Licenses are intended to guarantee your freedom to share and change | ||
19 | free software--to make sure the software is free for all its users. | ||
20 | |||
21 | This license, the Lesser General Public License, applies to some | ||
22 | specially designated software packages--typically libraries--of the | ||
23 | Free Software Foundation and other authors who decide to use it. You | ||
24 | can use it too, but we suggest you first think carefully about whether | ||
25 | this license or the ordinary General Public License is the better | ||
26 | strategy to use in any particular case, based on the explanations | ||
27 | below. | ||
28 | |||
29 | When we speak of free software, we are referring to freedom of use, | ||
30 | not price. Our General Public Licenses are designed to make sure that | ||
31 | you have the freedom to distribute copies of free software (and charge | ||
32 | for this service if you wish); that you receive source code or can get | ||
33 | it if you want it; that you can change the software and use pieces of | ||
34 | it in new free programs; and that you are informed that you can do | ||
35 | these things. | ||
36 | |||
37 | To protect your rights, we need to make restrictions that forbid | ||
38 | distributors to deny you these rights or to ask you to surrender these | ||
39 | rights. These restrictions translate to certain responsibilities for | ||
40 | you if you distribute copies of the library or if you modify it. | ||
41 | |||
42 | For example, if you distribute copies of the library, whether gratis | ||
43 | or for a fee, you must give the recipients all the rights that we gave | ||
44 | you. You must make sure that they, too, receive or can get the source | ||
45 | code. If you link other code with the library, you must provide | ||
46 | complete object files to the recipients, so that they can relink them | ||
47 | with the library after making changes to the library and recompiling | ||
48 | it. And you must show them these terms so they know their rights. | ||
49 | |||
50 | We protect your rights with a two-step method: (1) we copyright the | ||
51 | library, and (2) we offer you this license, which gives you legal | ||
52 | permission to copy, distribute and/or modify the library. | ||
53 | |||
54 | To protect each distributor, we want to make it very clear that | ||
55 | there is no warranty for the free library. Also, if the library is | ||
56 | modified by someone else and passed on, the recipients should know | ||
57 | that what they have is not the original version, so that the original | ||
58 | author's reputation will not be affected by problems that might be | ||
59 | introduced by others. | ||
60 | |||
61 | Finally, software patents pose a constant threat to the existence of | ||
62 | any free program. We wish to make sure that a company cannot | ||
63 | effectively restrict the users of a free program by obtaining a | ||
64 | restrictive license from a patent holder. Therefore, we insist that | ||
65 | any patent license obtained for a version of the library must be | ||
66 | consistent with the full freedom of use specified in this license. | ||
67 | |||
68 | Most GNU software, including some libraries, is covered by the | ||
69 | ordinary GNU General Public License. This license, the GNU Lesser | ||
70 | General Public License, applies to certain designated libraries, and | ||
71 | is quite different from the ordinary General Public License. We use | ||
72 | this license for certain libraries in order to permit linking those | ||
73 | libraries into non-free programs. | ||
74 | |||
75 | When a program is linked with a library, whether statically or using | ||
76 | a shared library, the combination of the two is legally speaking a | ||
77 | combined work, a derivative of the original library. The ordinary | ||
78 | General Public License therefore permits such linking only if the | ||
79 | entire combination fits its criteria of freedom. The Lesser General | ||
80 | Public License permits more lax criteria for linking other code with | ||
81 | the library. | ||
82 | |||
83 | We call this license the "Lesser" General Public License because it | ||
84 | does Less to protect the user's freedom than the ordinary General | ||
85 | Public License. It also provides other free software developers Less | ||
86 | of an advantage over competing non-free programs. These disadvantages | ||
87 | are the reason we use the ordinary General Public License for many | ||
88 | libraries. However, the Lesser license provides advantages in certain | ||
89 | special circumstances. | ||
90 | |||
91 | For example, on rare occasions, there may be a special need to | ||
92 | encourage the widest possible use of a certain library, so that it | ||
93 | becomes a de-facto standard. To achieve this, non-free programs must | ||
94 | be allowed to use the library. A more frequent case is that a free | ||
95 | library does the same job as widely used non-free libraries. In this | ||
96 | case, there is little to gain by limiting the free library to free | ||
97 | software only, so we use the Lesser General Public License. | ||
98 | |||
99 | In other cases, permission to use a particular library in non-free | ||
100 | programs enables a greater number of people to use a large body of | ||
101 | free software. For example, permission to use the GNU C Library in | ||
102 | non-free programs enables many more people to use the whole GNU | ||
103 | operating system, as well as its variant, the GNU/Linux operating | ||
104 | system. | ||
105 | |||
106 | Although the Lesser General Public License is Less protective of the | ||
107 | users' freedom, it does ensure that the user of a program that is | ||
108 | linked with the Library has the freedom and the wherewithal to run | ||
109 | that program using a modified version of the Library. | ||
110 | |||
111 | The precise terms and conditions for copying, distribution and | ||
112 | modification follow. Pay close attention to the difference between a | ||
113 | "work based on the library" and a "work that uses the library". The | ||
114 | former contains code derived from the library, whereas the latter must | ||
115 | be combined with the library in order to run. | ||
116 | |||
117 | GNU LESSER GENERAL PUBLIC LICENSE | ||
118 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
119 | |||
120 | 0. This License Agreement applies to any software library or other | ||
121 | program which contains a notice placed by the copyright holder or | ||
122 | other authorized party saying it may be distributed under the terms of | ||
123 | this Lesser General Public License (also called "this License"). | ||
124 | Each licensee is addressed as "you". | ||
125 | |||
126 | A "library" means a collection of software functions and/or data | ||
127 | prepared so as to be conveniently linked with application programs | ||
128 | (which use some of those functions and data) to form executables. | ||
129 | |||
130 | The "Library", below, refers to any such software library or work | ||
131 | which has been distributed under these terms. A "work based on the | ||
132 | Library" means either the Library or any derivative work under | ||
133 | copyright law: that is to say, a work containing the Library or a | ||
134 | portion of it, either verbatim or with modifications and/or translated | ||
135 | straightforwardly into another language. (Hereinafter, translation is | ||
136 | included without limitation in the term "modification".) | ||
137 | |||
138 | "Source code" for a work means the preferred form of the work for | ||
139 | making modifications to it. For a library, complete source code means | ||
140 | all the source code for all modules it contains, plus any associated | ||
141 | interface definition files, plus the scripts used to control | ||
142 | compilation and installation of the library. | ||
143 | |||
144 | Activities other than copying, distribution and modification are not | ||
145 | covered by this License; they are outside its scope. The act of | ||
146 | running a program using the Library is not restricted, and output from | ||
147 | such a program is covered only if its contents constitute a work based | ||
148 | on the Library (independent of the use of the Library in a tool for | ||
149 | writing it). Whether that is true depends on what the Library does | ||
150 | and what the program that uses the Library does. | ||
151 | |||
152 | 1. You may copy and distribute verbatim copies of the Library's | ||
153 | complete source code as you receive it, in any medium, provided that | ||
154 | you conspicuously and appropriately publish on each copy an | ||
155 | appropriate copyright notice and disclaimer of warranty; keep intact | ||
156 | all the notices that refer to this License and to the absence of any | ||
157 | warranty; and distribute a copy of this License along with the | ||
158 | Library. | ||
159 | |||
160 | You may charge a fee for the physical act of transferring a copy, | ||
161 | and you may at your option offer warranty protection in exchange for a | ||
162 | fee. | ||
163 | |||
164 | 2. You may modify your copy or copies of the Library or any portion | ||
165 | of it, thus forming a work based on the Library, and copy and | ||
166 | distribute such modifications or work under the terms of Section 1 | ||
167 | above, provided that you also meet all of these conditions: | ||
168 | |||
169 | a) The modified work must itself be a software library. | ||
170 | |||
171 | b) You must cause the files modified to carry prominent notices | ||
172 | stating that you changed the files and the date of any change. | ||
173 | |||
174 | c) You must cause the whole of the work to be licensed at no | ||
175 | charge to all third parties under the terms of this License. | ||
176 | |||
177 | d) If a facility in the modified Library refers to a function or a | ||
178 | table of data to be supplied by an application program that uses | ||
179 | the facility, other than as an argument passed when the facility | ||
180 | is invoked, then you must make a good faith effort to ensure that, | ||
181 | in the event an application does not supply such function or | ||
182 | table, the facility still operates, and performs whatever part of | ||
183 | its purpose remains meaningful. | ||
184 | |||
185 | (For example, a function in a library to compute square roots has | ||
186 | a purpose that is entirely well-defined independent of the | ||
187 | application. Therefore, Subsection 2d requires that any | ||
188 | application-supplied function or table used by this function must | ||
189 | be optional: if the application does not supply it, the square | ||
190 | root function must still compute square roots.) | ||
191 | |||
192 | These requirements apply to the modified work as a whole. If | ||
193 | identifiable sections of that work are not derived from the Library, | ||
194 | and can be reasonably considered independent and separate works in | ||
195 | themselves, then this License, and its terms, do not apply to those | ||
196 | sections when you distribute them as separate works. But when you | ||
197 | distribute the same sections as part of a whole which is a work based | ||
198 | on the Library, the distribution of the whole must be on the terms of | ||
199 | this License, whose permissions for other licensees extend to the | ||
200 | entire whole, and thus to each and every part regardless of who wrote | ||
201 | it. | ||
202 | |||
203 | Thus, it is not the intent of this section to claim rights or contest | ||
204 | your rights to work written entirely by you; rather, the intent is to | ||
205 | exercise the right to control the distribution of derivative or | ||
206 | collective works based on the Library. | ||
207 | |||
208 | In addition, mere aggregation of another work not based on the Library | ||
209 | with the Library (or with a work based on the Library) on a volume of | ||
210 | a storage or distribution medium does not bring the other work under | ||
211 | the scope of this License. | ||
212 | |||
213 | 3. You may opt to apply the terms of the ordinary GNU General Public | ||
214 | License instead of this License to a given copy of the Library. To do | ||
215 | this, you must alter all the notices that refer to this License, so | ||
216 | that they refer to the ordinary GNU General Public License, version 2, | ||
217 | instead of to this License. (If a newer version than version 2 of the | ||
218 | ordinary GNU General Public License has appeared, then you can specify | ||
219 | that version instead if you wish.) Do not make any other change in | ||
220 | these notices. | ||
221 | |||
222 | Once this change is made in a given copy, it is irreversible for | ||
223 | that copy, so the ordinary GNU General Public License applies to all | ||
224 | subsequent copies and derivative works made from that copy. | ||
225 | |||
226 | This option is useful when you wish to copy part of the code of | ||
227 | the Library into a program that is not a library. | ||
228 | |||
229 | 4. You may copy and distribute the Library (or a portion or | ||
230 | derivative of it, under Section 2) in object code or executable form | ||
231 | under the terms of Sections 1 and 2 above provided that you accompany | ||
232 | it with the complete corresponding machine-readable source code, which | ||
233 | must be distributed under the terms of Sections 1 and 2 above on a | ||
234 | medium customarily used for software interchange. | ||
235 | |||
236 | If distribution of object code is made by offering access to copy | ||
237 | from a designated place, then offering equivalent access to copy the | ||
238 | source code from the same place satisfies the requirement to | ||
239 | distribute the source code, even though third parties are not | ||
240 | compelled to copy the source along with the object code. | ||
241 | |||
242 | 5. A program that contains no derivative of any portion of the | ||
243 | Library, but is designed to work with the Library by being compiled or | ||
244 | linked with it, is called a "work that uses the Library". Such a | ||
245 | work, in isolation, is not a derivative work of the Library, and | ||
246 | therefore falls outside the scope of this License. | ||
247 | |||
248 | However, linking a "work that uses the Library" with the Library | ||
249 | creates an executable that is a derivative of the Library (because it | ||
250 | contains portions of the Library), rather than a "work that uses the | ||
251 | library". The executable is therefore covered by this License. | ||
252 | Section 6 states terms for distribution of such executables. | ||
253 | |||
254 | When a "work that uses the Library" uses material from a header file | ||
255 | that is part of the Library, the object code for the work may be a | ||
256 | derivative work of the Library even though the source code is not. | ||
257 | Whether this is true is especially significant if the work can be | ||
258 | linked without the Library, or if the work is itself a library. The | ||
259 | threshold for this to be true is not precisely defined by law. | ||
260 | |||
261 | If such an object file uses only numerical parameters, data | ||
262 | structure layouts and accessors, and small macros and small inline | ||
263 | functions (ten lines or less in length), then the use of the object | ||
264 | file is unrestricted, regardless of whether it is legally a derivative | ||
265 | work. (Executables containing this object code plus portions of the | ||
266 | Library will still fall under Section 6.) | ||
267 | |||
268 | Otherwise, if the work is a derivative of the Library, you may | ||
269 | distribute the object code for the work under the terms of Section 6. | ||
270 | Any executables containing that work also fall under Section 6, | ||
271 | whether or not they are linked directly with the Library itself. | ||
272 | |||
273 | 6. As an exception to the Sections above, you may also combine or | ||
274 | link a "work that uses the Library" with the Library to produce a | ||
275 | work containing portions of the Library, and distribute that work | ||
276 | under terms of your choice, provided that the terms permit | ||
277 | modification of the work for the customer's own use and reverse | ||
278 | engineering for debugging such modifications. | ||
279 | |||
280 | You must give prominent notice with each copy of the work that the | ||
281 | Library is used in it and that the Library and its use are covered by | ||
282 | this License. You must supply a copy of this License. If the work | ||
283 | during execution displays copyright notices, you must include the | ||
284 | copyright notice for the Library among them, as well as a reference | ||
285 | directing the user to the copy of this License. Also, you must do one | ||
286 | of these things: | ||
287 | |||
288 | a) Accompany the work with the complete corresponding | ||
289 | machine-readable source code for the Library including whatever | ||
290 | changes were used in the work (which must be distributed under | ||
291 | Sections 1 and 2 above); and, if the work is an executable linked | ||
292 | with the Library, with the complete machine-readable "work that | ||
293 | uses the Library", as object code and/or source code, so that the | ||
294 | user can modify the Library and then relink to produce a modified | ||
295 | executable containing the modified Library. (It is understood | ||
296 | that the user who changes the contents of definitions files in the | ||
297 | Library will not necessarily be able to recompile the application | ||
298 | to use the modified definitions.) | ||
299 | |||
300 | b) Use a suitable shared library mechanism for linking with the | ||
301 | Library. A suitable mechanism is one that (1) uses at run time a | ||
302 | copy of the library already present on the user's computer system, | ||
303 | rather than copying library functions into the executable, and (2) | ||
304 | will operate properly with a modified version of the library, if | ||
305 | the user installs one, as long as the modified version is | ||
306 | interface-compatible with the version that the work was made with. | ||
307 | |||
308 | c) Accompany the work with a written offer, valid for at least | ||
309 | three years, to give the same user the materials specified in | ||
310 | Subsection 6a, above, for a charge no more than the cost of | ||
311 | performing this distribution. | ||
312 | |||
313 | d) If distribution of the work is made by offering access to copy | ||
314 | from a designated place, offer equivalent access to copy the above | ||
315 | specified materials from the same place. | ||
316 | |||
317 | e) Verify that the user has already received a copy of these | ||
318 | materials or that you have already sent this user a copy. | ||
319 | |||
320 | For an executable, the required form of the "work that uses the | ||
321 | Library" must include any data and utility programs needed for | ||
322 | reproducing the executable from it. However, as a special exception, | ||
323 | the materials to be distributed need not include anything that is | ||
324 | normally distributed (in either source or binary form) with the major | ||
325 | components (compiler, kernel, and so on) of the operating system on | ||
326 | which the executable runs, unless that component itself accompanies | ||
327 | the executable. | ||
328 | |||
329 | It may happen that this requirement contradicts the license | ||
330 | restrictions of other proprietary libraries that do not normally | ||
331 | accompany the operating system. Such a contradiction means you cannot | ||
332 | use both them and the Library together in an executable that you | ||
333 | distribute. | ||
334 | |||
335 | 7. You may place library facilities that are a work based on the | ||
336 | Library side-by-side in a single library together with other library | ||
337 | facilities not covered by this License, and distribute such a combined | ||
338 | library, provided that the separate distribution of the work based on | ||
339 | the Library and of the other library facilities is otherwise | ||
340 | permitted, and provided that you do these two things: | ||
341 | |||
342 | a) Accompany the combined library with a copy of the same work | ||
343 | based on the Library, uncombined with any other library | ||
344 | facilities. This must be distributed under the terms of the | ||
345 | Sections above. | ||
346 | |||
347 | b) Give prominent notice with the combined library of the fact | ||
348 | that part of it is a work based on the Library, and explaining | ||
349 | where to find the accompanying uncombined form of the same work. | ||
350 | |||
351 | 8. You may not copy, modify, sublicense, link with, or distribute | ||
352 | the Library except as expressly provided under this License. Any | ||
353 | attempt otherwise to copy, modify, sublicense, link with, or | ||
354 | distribute the Library is void, and will automatically terminate your | ||
355 | rights under this License. However, parties who have received copies, | ||
356 | or rights, from you under this License will not have their licenses | ||
357 | terminated so long as such parties remain in full compliance. | ||
358 | |||
359 | 9. You are not required to accept this License, since you have not | ||
360 | signed it. However, nothing else grants you permission to modify or | ||
361 | distribute the Library or its derivative works. These actions are | ||
362 | prohibited by law if you do not accept this License. Therefore, by | ||
363 | modifying or distributing the Library (or any work based on the | ||
364 | Library), you indicate your acceptance of this License to do so, and | ||
365 | all its terms and conditions for copying, distributing or modifying | ||
366 | the Library or works based on it. | ||
367 | |||
368 | 10. Each time you redistribute the Library (or any work based on the | ||
369 | Library), the recipient automatically receives a license from the | ||
370 | original licensor to copy, distribute, link with or modify the Library | ||
371 | subject to these terms and conditions. You may not impose any further | ||
372 | restrictions on the recipients' exercise of the rights granted herein. | ||
373 | You are not responsible for enforcing compliance by third parties with | ||
374 | this License. | ||
375 | |||
376 | 11. If, as a consequence of a court judgment or allegation of patent | ||
377 | infringement or for any other reason (not limited to patent issues), | ||
378 | conditions are imposed on you (whether by court order, agreement or | ||
379 | otherwise) that contradict the conditions of this License, they do not | ||
380 | excuse you from the conditions of this License. If you cannot | ||
381 | distribute so as to satisfy simultaneously your obligations under this | ||
382 | License and any other pertinent obligations, then as a consequence you | ||
383 | may not distribute the Library at all. For example, if a patent | ||
384 | license would not permit royalty-free redistribution of the Library by | ||
385 | all those who receive copies directly or indirectly through you, then | ||
386 | the only way you could satisfy both it and this License would be to | ||
387 | refrain entirely from distribution of the Library. | ||
388 | |||
389 | If any portion of this section is held invalid or unenforceable under | ||
390 | any particular circumstance, the balance of the section is intended to | ||
391 | apply, and the section as a whole is intended to apply in other | ||
392 | circumstances. | ||
393 | |||
394 | It is not the purpose of this section to induce you to infringe any | ||
395 | patents or other property right claims or to contest validity of any | ||
396 | such claims; this section has the sole purpose of protecting the | ||
397 | integrity of the free software distribution system which is | ||
398 | implemented by public license practices. Many people have made | ||
399 | generous contributions to the wide range of software distributed | ||
400 | through that system in reliance on consistent application of that | ||
401 | system; it is up to the author/donor to decide if he or she is willing | ||
402 | to distribute software through any other system and a licensee cannot | ||
403 | impose that choice. | ||
404 | |||
405 | This section is intended to make thoroughly clear what is believed to | ||
406 | be a consequence of the rest of this License. | ||
407 | |||
408 | 12. If the distribution and/or use of the Library is restricted in | ||
409 | certain countries either by patents or by copyrighted interfaces, the | ||
410 | original copyright holder who places the Library under this License | ||
411 | may add an explicit geographical distribution limitation excluding those | ||
412 | countries, so that distribution is permitted only in or among | ||
413 | countries not thus excluded. In such case, this License incorporates | ||
414 | the limitation as if written in the body of this License. | ||
415 | |||
416 | 13. The Free Software Foundation may publish revised and/or new | ||
417 | versions of the Lesser General Public License from time to time. | ||
418 | Such new versions will be similar in spirit to the present version, | ||
419 | but may differ in detail to address new problems or concerns. | ||
420 | |||
421 | Each version is given a distinguishing version number. If the Library | ||
422 | specifies a version number of this License which applies to it and | ||
423 | "any later version", you have the option of following the terms and | ||
424 | conditions either of that version or of any later version published by | ||
425 | the Free Software Foundation. If the Library does not specify a | ||
426 | license version number, you may choose any version ever published by | ||
427 | the Free Software Foundation. | ||
428 | |||
429 | 14. If you wish to incorporate parts of the Library into other free | ||
430 | programs whose distribution conditions are incompatible with these, | ||
431 | write to the author to ask for permission. For software which is | ||
432 | copyrighted by the Free Software Foundation, write to the Free | ||
433 | Software Foundation; we sometimes make exceptions for this. Our | ||
434 | decision will be guided by the two goals of preserving the free status | ||
435 | of all derivatives of our free software and of promoting the sharing | ||
436 | and reuse of software generally. | ||
437 | |||
438 | NO WARRANTY | ||
439 | |||
440 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO | ||
441 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. | ||
442 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR | ||
443 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY | ||
444 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE | ||
445 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
446 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE | ||
447 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME | ||
448 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | ||
449 | |||
450 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN | ||
451 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY | ||
452 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU | ||
453 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR | ||
454 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE | ||
455 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING | ||
456 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A | ||
457 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF | ||
458 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH | ||
459 | DAMAGES. | ||
460 | |||
461 | END OF TERMS AND CONDITIONS | ||
462 | |||
463 | How to Apply These Terms to Your New Libraries | ||
464 | |||
465 | If you develop a new library, and you want it to be of the greatest | ||
466 | possible use to the public, we recommend making it free software that | ||
467 | everyone can redistribute and change. You can do so by permitting | ||
468 | redistribution under these terms (or, alternatively, under the terms | ||
469 | of the ordinary General Public License). | ||
470 | |||
471 | To apply these terms, attach the following notices to the library. | ||
472 | It is safest to attach them to the start of each source file to most | ||
473 | effectively convey the exclusion of warranty; and each file should | ||
474 | have at least the "copyright" line and a pointer to where the full | ||
475 | notice is found. | ||
476 | |||
477 | |||
478 | <one line to give the library's name and a brief idea of what it does.> | ||
479 | Copyright (C) <year> <name of author> | ||
480 | |||
481 | This library is free software; you can redistribute it and/or | ||
482 | modify it under the terms of the GNU Lesser General Public | ||
483 | License as published by the Free Software Foundation; either | ||
484 | version 2.1 of the License, or (at your option) any later version. | ||
485 | |||
486 | This library is distributed in the hope that it will be useful, | ||
487 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
488 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
489 | Lesser General Public License for more details. | ||
490 | |||
491 | You should have received a copy of the GNU Lesser General Public | ||
492 | License along with this library; if not, write to the Free Software | ||
493 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
494 | |||
495 | Also add information on how to contact you by electronic and paper mail. | ||
496 | |||
497 | You should also get your employer (if you work as a programmer) or | ||
498 | your school, if any, to sign a "copyright disclaimer" for the library, | ||
499 | if necessary. Here is a sample; alter the names: | ||
500 | |||
501 | Yoyodyne, Inc., hereby disclaims all copyright interest in the | ||
502 | library `Frob' (a library for tweaking knobs) written by James | ||
503 | Random Hacker. | ||
504 | |||
505 | <signature of Ty Coon>, 1 April 1990 | ||
506 | Ty Coon, President of Vice | ||
507 | |||
508 | That's all there is to it! | ||
509 | |||
510 | |||
diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am new file mode 100644 index 00000000..9b560285 --- /dev/null +++ b/libltdl/Makefile.am | |||
@@ -0,0 +1,51 @@ | |||
1 | ## Process this file with automake to produce Makefile.in | ||
2 | |||
3 | AUTOMAKE_OPTIONS = no-dependencies foreign | ||
4 | |||
5 | if INSTALL_LTDL | ||
6 | include_HEADERS = ltdl.h | ||
7 | lib_LTLIBRARIES = libltdl.la | ||
8 | else | ||
9 | noinst_HEADERS = ltdl.h | ||
10 | endif | ||
11 | |||
12 | if CONVENIENCE_LTDL | ||
13 | noinst_LTLIBRARIES = libltdlc.la | ||
14 | endif | ||
15 | |||
16 | ## Make sure these will be cleaned even when they're not built by | ||
17 | ## default. | ||
18 | CLEANFILES = libltdl.la libltdlc.la | ||
19 | |||
20 | libltdl_la_SOURCES = ltdl.c | ||
21 | libltdl_la_LDFLAGS = -no-undefined -version-info 4:0:1 | ||
22 | libltdl_la_LIBADD = $(LIBADD_DL) | ||
23 | |||
24 | libltdlc_la_SOURCES = ltdl.c | ||
25 | libltdlc_la_LIBADD = $(LIBADD_DL) | ||
26 | |||
27 | ## Because we do not have automatic dependency tracking: | ||
28 | ltdl.lo: ltdl.h config.h | ||
29 | |||
30 | $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool | ||
31 | libtool: $(LIBTOOL_DEPS) | ||
32 | $(SHELL) ./config.status --recheck | ||
33 | |||
34 | ## This allows us to install libltdl without using ln and without creating | ||
35 | ## a world writeable directory. | ||
36 | ## FIXME: Remove this rule once automake can do this properly by itself. | ||
37 | local-install-files: $(DISTFILES) | ||
38 | -rm -rf $(DESTDIR)$(datadir)/libtool/libltdl | ||
39 | $(mkinstalldirs) $(DESTDIR)$(datadir)/libtool/libltdl | ||
40 | @for file in $(DISTFILES); do \ | ||
41 | case $$file in \ | ||
42 | $(srcdir)/*) file=`echo "$$file" | sed "s|^$(srcdir)/||"`;; \ | ||
43 | esac; \ | ||
44 | d=$(srcdir); \ | ||
45 | if test -d $$d/$$file; then \ | ||
46 | cp -r $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file; \ | ||
47 | else \ | ||
48 | test -f $(DESTDIR)$(datadir)/libtool/libltdl/$$file \ | ||
49 | || cp $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file || :; \ | ||
50 | fi; \ | ||
51 | done | ||
diff --git a/libltdl/Makefile.in b/libltdl/Makefile.in new file mode 100644 index 00000000..28e43925 --- /dev/null +++ b/libltdl/Makefile.in | |||
@@ -0,0 +1,656 @@ | |||
1 | # Makefile.in generated by automake 1.8.5 from Makefile.am. | ||
2 | # @configure_input@ | ||
3 | |||
4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
5 | # 2003, 2004 Free Software Foundation, Inc. | ||
6 | # This Makefile.in is free software; the Free Software Foundation | ||
7 | # gives unlimited permission to copy and/or distribute it, | ||
8 | # with or without modifications, as long as this notice is preserved. | ||
9 | |||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
13 | # PARTICULAR PURPOSE. | ||
14 | |||
15 | @SET_MAKE@ | ||
16 | |||
17 | |||
18 | SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES) | ||
19 | |||
20 | srcdir = @srcdir@ | ||
21 | top_srcdir = @top_srcdir@ | ||
22 | VPATH = @srcdir@ | ||
23 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
24 | pkglibdir = $(libdir)/@PACKAGE@ | ||
25 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
26 | top_builddir = . | ||
27 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
28 | INSTALL = @INSTALL@ | ||
29 | install_sh_DATA = $(install_sh) -c -m 644 | ||
30 | install_sh_PROGRAM = $(install_sh) -c | ||
31 | install_sh_SCRIPT = $(install_sh) -c | ||
32 | INSTALL_HEADER = $(INSTALL_DATA) | ||
33 | transform = $(program_transform_name) | ||
34 | NORMAL_INSTALL = : | ||
35 | PRE_INSTALL = : | ||
36 | POST_INSTALL = : | ||
37 | NORMAL_UNINSTALL = : | ||
38 | PRE_UNINSTALL = : | ||
39 | POST_UNINSTALL = : | ||
40 | host_triplet = @host@ | ||
41 | DIST_COMMON = README $(am__configure_deps) $(am__include_HEADERS_DIST) \ | ||
42 | $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \ | ||
43 | $(srcdir)/Makefile.in $(srcdir)/config-h.in \ | ||
44 | $(top_srcdir)/configure COPYING.LIB config.guess config.sub \ | ||
45 | install-sh ltmain.sh missing | ||
46 | subdir = . | ||
47 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
48 | am__aclocal_m4_deps = $(top_srcdir)/../libtool.m4 \ | ||
49 | $(top_srcdir)/../ltdl.m4 $(top_srcdir)/configure.ac | ||
50 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
51 | $(ACLOCAL_M4) | ||
52 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ | ||
53 | configure.lineno configure.status.lineno | ||
54 | mkinstalldirs = $(mkdir_p) | ||
55 | CONFIG_HEADER = config.h | ||
56 | CONFIG_CLEAN_FILES = | ||
57 | am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" | ||
58 | libLTLIBRARIES_INSTALL = $(INSTALL) | ||
59 | LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) | ||
60 | am__DEPENDENCIES_1 = | ||
61 | libltdl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) | ||
62 | am_libltdl_la_OBJECTS = ltdl.lo | ||
63 | libltdl_la_OBJECTS = $(am_libltdl_la_OBJECTS) | ||
64 | libltdlc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) | ||
65 | am_libltdlc_la_OBJECTS = ltdl.lo | ||
66 | libltdlc_la_OBJECTS = $(am_libltdlc_la_OBJECTS) | ||
67 | DEFAULT_INCLUDES = -I. -I$(srcdir) -I. | ||
68 | depcomp = | ||
69 | am__depfiles_maybe = | ||
70 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
71 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
72 | LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \ | ||
73 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
74 | $(AM_CFLAGS) $(CFLAGS) | ||
75 | CCLD = $(CC) | ||
76 | LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
77 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
78 | SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES) | ||
79 | DIST_SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES) | ||
80 | am__include_HEADERS_DIST = ltdl.h | ||
81 | includeHEADERS_INSTALL = $(INSTALL_HEADER) | ||
82 | am__noinst_HEADERS_DIST = ltdl.h | ||
83 | HEADERS = $(include_HEADERS) $(noinst_HEADERS) | ||
84 | ETAGS = etags | ||
85 | CTAGS = ctags | ||
86 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
87 | distdir = $(PACKAGE)-$(VERSION) | ||
88 | top_distdir = $(distdir) | ||
89 | am__remove_distdir = \ | ||
90 | { test ! -d $(distdir) \ | ||
91 | || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ | ||
92 | && rm -fr $(distdir); }; } | ||
93 | DIST_ARCHIVES = $(distdir).tar.gz | ||
94 | GZIP_ENV = --best | ||
95 | distuninstallcheck_listfiles = find . -type f -print | ||
96 | distcleancheck_listfiles = find . -type f -print | ||
97 | ACLOCAL = @ACLOCAL@ | ||
98 | AMDEP_FALSE = @AMDEP_FALSE@ | ||
99 | AMDEP_TRUE = @AMDEP_TRUE@ | ||
100 | AMTAR = @AMTAR@ | ||
101 | AR = @AR@ | ||
102 | AS = @AS@ | ||
103 | AUTOCONF = @AUTOCONF@ | ||
104 | AUTOHEADER = @AUTOHEADER@ | ||
105 | AUTOMAKE = @AUTOMAKE@ | ||
106 | AWK = @AWK@ | ||
107 | CC = @CC@ | ||
108 | CCDEPMODE = @CCDEPMODE@ | ||
109 | CFLAGS = @CFLAGS@ | ||
110 | CONVENIENCE_LTDL_FALSE = @CONVENIENCE_LTDL_FALSE@ | ||
111 | CONVENIENCE_LTDL_TRUE = @CONVENIENCE_LTDL_TRUE@ | ||
112 | CPP = @CPP@ | ||
113 | CPPFLAGS = @CPPFLAGS@ | ||
114 | CXX = @CXX@ | ||
115 | CXXCPP = @CXXCPP@ | ||
116 | CXXDEPMODE = @CXXDEPMODE@ | ||
117 | CXXFLAGS = @CXXFLAGS@ | ||
118 | CYGPATH_W = @CYGPATH_W@ | ||
119 | DEFS = @DEFS@ | ||
120 | DEPDIR = @DEPDIR@ | ||
121 | DLLTOOL = @DLLTOOL@ | ||
122 | ECHO = @ECHO@ | ||
123 | ECHO_C = @ECHO_C@ | ||
124 | ECHO_N = @ECHO_N@ | ||
125 | ECHO_T = @ECHO_T@ | ||
126 | EGREP = @EGREP@ | ||
127 | EXEEXT = @EXEEXT@ | ||
128 | F77 = @F77@ | ||
129 | FFLAGS = @FFLAGS@ | ||
130 | INSTALL_DATA = @INSTALL_DATA@ | ||
131 | INSTALL_LTDL_FALSE = @INSTALL_LTDL_FALSE@ | ||
132 | INSTALL_LTDL_TRUE = @INSTALL_LTDL_TRUE@ | ||
133 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
134 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
135 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
136 | LDFLAGS = @LDFLAGS@ | ||
137 | LIBADD_DL = @LIBADD_DL@ | ||
138 | LIBOBJS = @LIBOBJS@ | ||
139 | LIBS = @LIBS@ | ||
140 | LIBTOOL = @LIBTOOL@ | ||
141 | LIBTOOL_DEPS = @LIBTOOL_DEPS@ | ||
142 | LN_S = @LN_S@ | ||
143 | LTLIBOBJS = @LTLIBOBJS@ | ||
144 | MAINT = @MAINT@ | ||
145 | MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ | ||
146 | MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ | ||
147 | MAKEINFO = @MAKEINFO@ | ||
148 | OBJDUMP = @OBJDUMP@ | ||
149 | OBJEXT = @OBJEXT@ | ||
150 | PACKAGE = @PACKAGE@ | ||
151 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
152 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
153 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
154 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
155 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
156 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
157 | RANLIB = @RANLIB@ | ||
158 | SET_MAKE = @SET_MAKE@ | ||
159 | SHELL = @SHELL@ | ||
160 | STRIP = @STRIP@ | ||
161 | VERSION = @VERSION@ | ||
162 | ac_ct_AR = @ac_ct_AR@ | ||
163 | ac_ct_AS = @ac_ct_AS@ | ||
164 | ac_ct_CC = @ac_ct_CC@ | ||
165 | ac_ct_CXX = @ac_ct_CXX@ | ||
166 | ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ | ||
167 | ac_ct_F77 = @ac_ct_F77@ | ||
168 | ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ | ||
169 | ac_ct_RANLIB = @ac_ct_RANLIB@ | ||
170 | ac_ct_STRIP = @ac_ct_STRIP@ | ||
171 | am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ | ||
172 | am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ | ||
173 | am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ | ||
174 | am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ | ||
175 | am__include = @am__include@ | ||
176 | am__leading_dot = @am__leading_dot@ | ||
177 | am__quote = @am__quote@ | ||
178 | bindir = @bindir@ | ||
179 | build = @build@ | ||
180 | build_alias = @build_alias@ | ||
181 | build_cpu = @build_cpu@ | ||
182 | build_os = @build_os@ | ||
183 | build_vendor = @build_vendor@ | ||
184 | datadir = @datadir@ | ||
185 | exec_prefix = @exec_prefix@ | ||
186 | host = @host@ | ||
187 | host_alias = @host_alias@ | ||
188 | host_cpu = @host_cpu@ | ||
189 | host_os = @host_os@ | ||
190 | host_vendor = @host_vendor@ | ||
191 | includedir = @includedir@ | ||
192 | infodir = @infodir@ | ||
193 | install_sh = @install_sh@ | ||
194 | libdir = @libdir@ | ||
195 | libexecdir = @libexecdir@ | ||
196 | localstatedir = @localstatedir@ | ||
197 | mandir = @mandir@ | ||
198 | mkdir_p = @mkdir_p@ | ||
199 | oldincludedir = @oldincludedir@ | ||
200 | prefix = @prefix@ | ||
201 | program_transform_name = @program_transform_name@ | ||
202 | sbindir = @sbindir@ | ||
203 | sharedstatedir = @sharedstatedir@ | ||
204 | sysconfdir = @sysconfdir@ | ||
205 | target_alias = @target_alias@ | ||
206 | AUTOMAKE_OPTIONS = no-dependencies foreign | ||
207 | @INSTALL_LTDL_TRUE@include_HEADERS = ltdl.h | ||
208 | @INSTALL_LTDL_TRUE@lib_LTLIBRARIES = libltdl.la | ||
209 | @INSTALL_LTDL_FALSE@noinst_HEADERS = ltdl.h | ||
210 | @CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la | ||
211 | CLEANFILES = libltdl.la libltdlc.la | ||
212 | libltdl_la_SOURCES = ltdl.c | ||
213 | libltdl_la_LDFLAGS = -no-undefined -version-info 4:0:1 | ||
214 | libltdl_la_LIBADD = $(LIBADD_DL) | ||
215 | libltdlc_la_SOURCES = ltdl.c | ||
216 | libltdlc_la_LIBADD = $(LIBADD_DL) | ||
217 | all: config.h | ||
218 | $(MAKE) $(AM_MAKEFLAGS) all-am | ||
219 | |||
220 | .SUFFIXES: | ||
221 | .SUFFIXES: .c .lo .o .obj | ||
222 | am--refresh: | ||
223 | @: | ||
224 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) | ||
225 | @for dep in $?; do \ | ||
226 | case '$(am__configure_deps)' in \ | ||
227 | *$$dep*) \ | ||
228 | echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ | ||
229 | cd $(srcdir) && $(AUTOMAKE) --foreign \ | ||
230 | && exit 0; \ | ||
231 | exit 1;; \ | ||
232 | esac; \ | ||
233 | done; \ | ||
234 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ | ||
235 | cd $(top_srcdir) && \ | ||
236 | $(AUTOMAKE) --foreign Makefile | ||
237 | .PRECIOUS: Makefile | ||
238 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
239 | @case '$?' in \ | ||
240 | *config.status*) \ | ||
241 | echo ' $(SHELL) ./config.status'; \ | ||
242 | $(SHELL) ./config.status;; \ | ||
243 | *) \ | ||
244 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ | ||
245 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ | ||
246 | esac; | ||
247 | |||
248 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
249 | $(SHELL) ./config.status --recheck | ||
250 | |||
251 | $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) | ||
252 | cd $(srcdir) && $(AUTOCONF) | ||
253 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) | ||
254 | cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) | ||
255 | |||
256 | config.h: stamp-h1 | ||
257 | @if test ! -f $@; then \ | ||
258 | rm -f stamp-h1; \ | ||
259 | $(MAKE) stamp-h1; \ | ||
260 | else :; fi | ||
261 | |||
262 | stamp-h1: $(srcdir)/config-h.in $(top_builddir)/config.status | ||
263 | @rm -f stamp-h1 | ||
264 | cd $(top_builddir) && $(SHELL) ./config.status config.h | ||
265 | $(srcdir)/config-h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) | ||
266 | cd $(top_srcdir) && $(AUTOHEADER) | ||
267 | rm -f stamp-h1 | ||
268 | touch $@ | ||
269 | |||
270 | distclean-hdr: | ||
271 | -rm -f config.h stamp-h1 | ||
272 | install-libLTLIBRARIES: $(lib_LTLIBRARIES) | ||
273 | @$(NORMAL_INSTALL) | ||
274 | test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" | ||
275 | @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ | ||
276 | if test -f $$p; then \ | ||
277 | f="`echo $$p | sed -e 's|^.*/||'`"; \ | ||
278 | echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ | ||
279 | $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ | ||
280 | else :; fi; \ | ||
281 | done | ||
282 | |||
283 | uninstall-libLTLIBRARIES: | ||
284 | @$(NORMAL_UNINSTALL) | ||
285 | @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ | ||
286 | p="`echo $$p | sed -e 's|^.*/||'`"; \ | ||
287 | echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ | ||
288 | $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ | ||
289 | done | ||
290 | |||
291 | clean-libLTLIBRARIES: | ||
292 | -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) | ||
293 | @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ | ||
294 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
295 | test "$$dir" != "$$p" || dir=.; \ | ||
296 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
297 | rm -f "$${dir}/so_locations"; \ | ||
298 | done | ||
299 | |||
300 | clean-noinstLTLIBRARIES: | ||
301 | -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) | ||
302 | @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ | ||
303 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
304 | test "$$dir" != "$$p" || dir=.; \ | ||
305 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
306 | rm -f "$${dir}/so_locations"; \ | ||
307 | done | ||
308 | libltdl.la: $(libltdl_la_OBJECTS) $(libltdl_la_DEPENDENCIES) | ||
309 | $(LINK) -rpath $(libdir) $(libltdl_la_LDFLAGS) $(libltdl_la_OBJECTS) $(libltdl_la_LIBADD) $(LIBS) | ||
310 | libltdlc.la: $(libltdlc_la_OBJECTS) $(libltdlc_la_DEPENDENCIES) | ||
311 | $(LINK) $(libltdlc_la_LDFLAGS) $(libltdlc_la_OBJECTS) $(libltdlc_la_LIBADD) $(LIBS) | ||
312 | |||
313 | mostlyclean-compile: | ||
314 | -rm -f *.$(OBJEXT) | ||
315 | |||
316 | distclean-compile: | ||
317 | -rm -f *.tab.c | ||
318 | |||
319 | .c.o: | ||
320 | $(COMPILE) -c $< | ||
321 | |||
322 | .c.obj: | ||
323 | $(COMPILE) -c `$(CYGPATH_W) '$<'` | ||
324 | |||
325 | .c.lo: | ||
326 | $(LTCOMPILE) -c -o $@ $< | ||
327 | |||
328 | mostlyclean-libtool: | ||
329 | -rm -f *.lo | ||
330 | |||
331 | clean-libtool: | ||
332 | -rm -rf .libs _libs | ||
333 | |||
334 | distclean-libtool: | ||
335 | -rm -f libtool | ||
336 | uninstall-info-am: | ||
337 | install-includeHEADERS: $(include_HEADERS) | ||
338 | @$(NORMAL_INSTALL) | ||
339 | test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" | ||
340 | @list='$(include_HEADERS)'; for p in $$list; do \ | ||
341 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
342 | f="`echo $$p | sed -e 's|^.*/||'`"; \ | ||
343 | echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ | ||
344 | $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ | ||
345 | done | ||
346 | |||
347 | uninstall-includeHEADERS: | ||
348 | @$(NORMAL_UNINSTALL) | ||
349 | @list='$(include_HEADERS)'; for p in $$list; do \ | ||
350 | f="`echo $$p | sed -e 's|^.*/||'`"; \ | ||
351 | echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ | ||
352 | rm -f "$(DESTDIR)$(includedir)/$$f"; \ | ||
353 | done | ||
354 | |||
355 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
356 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
357 | unique=`for i in $$list; do \ | ||
358 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
359 | done | \ | ||
360 | $(AWK) ' { files[$$0] = 1; } \ | ||
361 | END { for (i in files) print i; }'`; \ | ||
362 | mkid -fID $$unique | ||
363 | tags: TAGS | ||
364 | |||
365 | TAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \ | ||
366 | $(TAGS_FILES) $(LISP) | ||
367 | tags=; \ | ||
368 | here=`pwd`; \ | ||
369 | list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \ | ||
370 | unique=`for i in $$list; do \ | ||
371 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
372 | done | \ | ||
373 | $(AWK) ' { files[$$0] = 1; } \ | ||
374 | END { for (i in files) print i; }'`; \ | ||
375 | if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ | ||
376 | test -n "$$unique" || unique=$$empty_fix; \ | ||
377 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
378 | $$tags $$unique; \ | ||
379 | fi | ||
380 | ctags: CTAGS | ||
381 | CTAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \ | ||
382 | $(TAGS_FILES) $(LISP) | ||
383 | tags=; \ | ||
384 | here=`pwd`; \ | ||
385 | list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \ | ||
386 | unique=`for i in $$list; do \ | ||
387 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
388 | done | \ | ||
389 | $(AWK) ' { files[$$0] = 1; } \ | ||
390 | END { for (i in files) print i; }'`; \ | ||
391 | test -z "$(CTAGS_ARGS)$$tags$$unique" \ | ||
392 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
393 | $$tags $$unique | ||
394 | |||
395 | GTAGS: | ||
396 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
397 | && cd $(top_srcdir) \ | ||
398 | && gtags -i $(GTAGS_ARGS) $$here | ||
399 | |||
400 | distclean-tags: | ||
401 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
402 | |||
403 | distdir: $(DISTFILES) | ||
404 | $(am__remove_distdir) | ||
405 | mkdir $(distdir) | ||
406 | $(mkdir_p) $(distdir)/.. | ||
407 | @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ | ||
408 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ | ||
409 | list='$(DISTFILES)'; for file in $$list; do \ | ||
410 | case $$file in \ | ||
411 | $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ | ||
412 | $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ | ||
413 | esac; \ | ||
414 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
415 | dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
416 | if test "$$dir" != "$$file" && test "$$dir" != "."; then \ | ||
417 | dir="/$$dir"; \ | ||
418 | $(mkdir_p) "$(distdir)$$dir"; \ | ||
419 | else \ | ||
420 | dir=''; \ | ||
421 | fi; \ | ||
422 | if test -d $$d/$$file; then \ | ||
423 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
424 | cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ | ||
425 | fi; \ | ||
426 | cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ | ||
427 | else \ | ||
428 | test -f $(distdir)/$$file \ | ||
429 | || cp -p $$d/$$file $(distdir)/$$file \ | ||
430 | || exit 1; \ | ||
431 | fi; \ | ||
432 | done | ||
433 | -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ | ||
434 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ | ||
435 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ | ||
436 | ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ | ||
437 | || chmod -R a+r $(distdir) | ||
438 | dist-gzip: distdir | ||
439 | $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | ||
440 | $(am__remove_distdir) | ||
441 | |||
442 | dist-bzip2: distdir | ||
443 | $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 | ||
444 | $(am__remove_distdir) | ||
445 | |||
446 | dist-tarZ: distdir | ||
447 | $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z | ||
448 | $(am__remove_distdir) | ||
449 | |||
450 | dist-shar: distdir | ||
451 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz | ||
452 | $(am__remove_distdir) | ||
453 | |||
454 | dist-zip: distdir | ||
455 | -rm -f $(distdir).zip | ||
456 | zip -rq $(distdir).zip $(distdir) | ||
457 | $(am__remove_distdir) | ||
458 | |||
459 | dist dist-all: distdir | ||
460 | $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz | ||
461 | $(am__remove_distdir) | ||
462 | |||
463 | # This target untars the dist file and tries a VPATH configuration. Then | ||
464 | # it guarantees that the distribution is self-contained by making another | ||
465 | # tarfile. | ||
466 | distcheck: dist | ||
467 | case '$(DIST_ARCHIVES)' in \ | ||
468 | *.tar.gz*) \ | ||
469 | GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ | ||
470 | *.tar.bz2*) \ | ||
471 | bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ | ||
472 | *.tar.Z*) \ | ||
473 | uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ | ||
474 | *.shar.gz*) \ | ||
475 | GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ | ||
476 | *.zip*) \ | ||
477 | unzip $(distdir).zip ;;\ | ||
478 | esac | ||
479 | chmod -R a-w $(distdir); chmod a+w $(distdir) | ||
480 | mkdir $(distdir)/_build | ||
481 | mkdir $(distdir)/_inst | ||
482 | chmod a-w $(distdir) | ||
483 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ | ||
484 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ | ||
485 | && cd $(distdir)/_build \ | ||
486 | && ../configure --srcdir=.. --prefix="$$dc_install_base" \ | ||
487 | $(DISTCHECK_CONFIGURE_FLAGS) \ | ||
488 | && $(MAKE) $(AM_MAKEFLAGS) \ | ||
489 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ | ||
490 | && $(MAKE) $(AM_MAKEFLAGS) check \ | ||
491 | && $(MAKE) $(AM_MAKEFLAGS) install \ | ||
492 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ | ||
493 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ | ||
494 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ | ||
495 | distuninstallcheck \ | ||
496 | && chmod -R a-w "$$dc_install_base" \ | ||
497 | && ({ \ | ||
498 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ | ||
499 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ | ||
500 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ | ||
501 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ | ||
502 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ | ||
503 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ | ||
504 | && rm -rf "$$dc_destdir" \ | ||
505 | && $(MAKE) $(AM_MAKEFLAGS) dist \ | ||
506 | && rm -rf $(DIST_ARCHIVES) \ | ||
507 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck | ||
508 | $(am__remove_distdir) | ||
509 | @(echo "$(distdir) archives ready for distribution: "; \ | ||
510 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ | ||
511 | sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' | ||
512 | distuninstallcheck: | ||
513 | @cd $(distuninstallcheck_dir) \ | ||
514 | && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ | ||
515 | || { echo "ERROR: files left after uninstall:" ; \ | ||
516 | if test -n "$(DESTDIR)"; then \ | ||
517 | echo " (check DESTDIR support)"; \ | ||
518 | fi ; \ | ||
519 | $(distuninstallcheck_listfiles) ; \ | ||
520 | exit 1; } >&2 | ||
521 | distcleancheck: distclean | ||
522 | @if test '$(srcdir)' = . ; then \ | ||
523 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ | ||
524 | exit 1 ; \ | ||
525 | fi | ||
526 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ | ||
527 | || { echo "ERROR: files left in build directory after distclean:" ; \ | ||
528 | $(distcleancheck_listfiles) ; \ | ||
529 | exit 1; } >&2 | ||
530 | check-am: all-am | ||
531 | check: check-am | ||
532 | all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h | ||
533 | installdirs: | ||
534 | for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ | ||
535 | test -z "$$dir" || $(mkdir_p) "$$dir"; \ | ||
536 | done | ||
537 | install: install-am | ||
538 | install-exec: install-exec-am | ||
539 | install-data: install-data-am | ||
540 | uninstall: uninstall-am | ||
541 | |||
542 | install-am: all-am | ||
543 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
544 | |||
545 | installcheck: installcheck-am | ||
546 | install-strip: | ||
547 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
548 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
549 | `test -z '$(STRIP)' || \ | ||
550 | echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install | ||
551 | mostlyclean-generic: | ||
552 | |||
553 | clean-generic: | ||
554 | -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) | ||
555 | |||
556 | distclean-generic: | ||
557 | -rm -f $(CONFIG_CLEAN_FILES) | ||
558 | |||
559 | maintainer-clean-generic: | ||
560 | @echo "This command is intended for maintainers to use" | ||
561 | @echo "it deletes files that may require special tools to rebuild." | ||
562 | clean: clean-am | ||
563 | |||
564 | clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ | ||
565 | clean-noinstLTLIBRARIES mostlyclean-am | ||
566 | |||
567 | distclean: distclean-am | ||
568 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) | ||
569 | -rm -f Makefile | ||
570 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
571 | distclean-hdr distclean-libtool distclean-tags | ||
572 | |||
573 | dvi: dvi-am | ||
574 | |||
575 | dvi-am: | ||
576 | |||
577 | html: html-am | ||
578 | |||
579 | info: info-am | ||
580 | |||
581 | info-am: | ||
582 | |||
583 | install-data-am: install-includeHEADERS | ||
584 | |||
585 | install-exec-am: install-libLTLIBRARIES | ||
586 | |||
587 | install-info: install-info-am | ||
588 | |||
589 | install-man: | ||
590 | |||
591 | installcheck-am: | ||
592 | |||
593 | maintainer-clean: maintainer-clean-am | ||
594 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) | ||
595 | -rm -rf $(top_srcdir)/autom4te.cache | ||
596 | -rm -f Makefile | ||
597 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
598 | |||
599 | mostlyclean: mostlyclean-am | ||
600 | |||
601 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
602 | mostlyclean-libtool | ||
603 | |||
604 | pdf: pdf-am | ||
605 | |||
606 | pdf-am: | ||
607 | |||
608 | ps: ps-am | ||
609 | |||
610 | ps-am: | ||
611 | |||
612 | uninstall-am: uninstall-includeHEADERS uninstall-info-am \ | ||
613 | uninstall-libLTLIBRARIES | ||
614 | |||
615 | .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ | ||
616 | clean-generic clean-libLTLIBRARIES clean-libtool \ | ||
617 | clean-noinstLTLIBRARIES ctags dist dist-all dist-bzip2 \ | ||
618 | dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ | ||
619 | distclean-compile distclean-generic distclean-hdr \ | ||
620 | distclean-libtool distclean-tags distcleancheck distdir \ | ||
621 | distuninstallcheck dvi dvi-am html html-am info info-am \ | ||
622 | install install-am install-data install-data-am install-exec \ | ||
623 | install-exec-am install-includeHEADERS install-info \ | ||
624 | install-info-am install-libLTLIBRARIES install-man \ | ||
625 | install-strip installcheck installcheck-am installdirs \ | ||
626 | maintainer-clean maintainer-clean-generic mostlyclean \ | ||
627 | mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ | ||
628 | pdf pdf-am ps ps-am tags uninstall uninstall-am \ | ||
629 | uninstall-includeHEADERS uninstall-info-am \ | ||
630 | uninstall-libLTLIBRARIES | ||
631 | |||
632 | |||
633 | ltdl.lo: ltdl.h config.h | ||
634 | |||
635 | $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool | ||
636 | libtool: $(LIBTOOL_DEPS) | ||
637 | $(SHELL) ./config.status --recheck | ||
638 | |||
639 | local-install-files: $(DISTFILES) | ||
640 | -rm -rf $(DESTDIR)$(datadir)/libtool/libltdl | ||
641 | $(mkinstalldirs) $(DESTDIR)$(datadir)/libtool/libltdl | ||
642 | @for file in $(DISTFILES); do \ | ||
643 | case $$file in \ | ||
644 | $(srcdir)/*) file=`echo "$$file" | sed "s|^$(srcdir)/||"`;; \ | ||
645 | esac; \ | ||
646 | d=$(srcdir); \ | ||
647 | if test -d $$d/$$file; then \ | ||
648 | cp -r $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file; \ | ||
649 | else \ | ||
650 | test -f $(DESTDIR)$(datadir)/libtool/libltdl/$$file \ | ||
651 | || cp $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file || :; \ | ||
652 | fi; \ | ||
653 | done | ||
654 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
655 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
656 | .NOEXPORT: | ||
diff --git a/libltdl/README b/libltdl/README new file mode 100644 index 00000000..da0a449c --- /dev/null +++ b/libltdl/README | |||
@@ -0,0 +1,10 @@ | |||
1 | This is GNU libltdl, a system independent dlopen wrapper for GNU libtool. | ||
2 | |||
3 | It supports the following dlopen interfaces: | ||
4 | * dlopen (Solaris, Linux and various BSD flavors) | ||
5 | * shl_load (HP-UX) | ||
6 | * LoadLibrary (Win16 and Win32) | ||
7 | * load_add_on (BeOS) | ||
8 | * GNU DLD (emulates dynamic linking for static libraries) | ||
9 | * dyld (darwin/Mac OS X) | ||
10 | * libtool's dlpreopen | ||
diff --git a/libltdl/aclocal.m4 b/libltdl/aclocal.m4 new file mode 100644 index 00000000..6ba55da5 --- /dev/null +++ b/libltdl/aclocal.m4 | |||
@@ -0,0 +1,7218 @@ | |||
1 | # generated automatically by aclocal 1.9.5 -*- Autoconf -*- | ||
2 | |||
3 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, | ||
4 | # 2005 Free Software Foundation, Inc. | ||
5 | # This file is free software; the Free Software Foundation | ||
6 | # gives unlimited permission to copy and/or distribute it, | ||
7 | # with or without modifications, as long as this notice is preserved. | ||
8 | |||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
12 | # PARTICULAR PURPOSE. | ||
13 | |||
14 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- | ||
15 | |||
16 | # serial 47 AC_PROG_LIBTOOL | ||
17 | # Debian $Rev: 214 $ | ||
18 | |||
19 | |||
20 | # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) | ||
21 | # ----------------------------------------------------------- | ||
22 | # If this macro is not defined by Autoconf, define it here. | ||
23 | m4_ifdef([AC_PROVIDE_IFELSE], | ||
24 | [], | ||
25 | [m4_define([AC_PROVIDE_IFELSE], | ||
26 | [m4_ifdef([AC_PROVIDE_$1], | ||
27 | [$2], [$3])])]) | ||
28 | |||
29 | |||
30 | # AC_PROG_LIBTOOL | ||
31 | # --------------- | ||
32 | AC_DEFUN([AC_PROG_LIBTOOL], | ||
33 | [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl | ||
34 | dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX | ||
35 | dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. | ||
36 | AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
37 | [AC_LIBTOOL_CXX], | ||
38 | [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX | ||
39 | ])]) | ||
40 | dnl And a similar setup for Fortran 77 support | ||
41 | AC_PROVIDE_IFELSE([AC_PROG_F77], | ||
42 | [AC_LIBTOOL_F77], | ||
43 | [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 | ||
44 | ])]) | ||
45 | |||
46 | dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. | ||
47 | dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run | ||
48 | dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. | ||
49 | AC_PROVIDE_IFELSE([AC_PROG_GCJ], | ||
50 | [AC_LIBTOOL_GCJ], | ||
51 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], | ||
52 | [AC_LIBTOOL_GCJ], | ||
53 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], | ||
54 | [AC_LIBTOOL_GCJ], | ||
55 | [ifdef([AC_PROG_GCJ], | ||
56 | [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) | ||
57 | ifdef([A][M_PROG_GCJ], | ||
58 | [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) | ||
59 | ifdef([LT_AC_PROG_GCJ], | ||
60 | [define([LT_AC_PROG_GCJ], | ||
61 | defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) | ||
62 | ])])# AC_PROG_LIBTOOL | ||
63 | |||
64 | |||
65 | # _AC_PROG_LIBTOOL | ||
66 | # ---------------- | ||
67 | AC_DEFUN([_AC_PROG_LIBTOOL], | ||
68 | [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl | ||
69 | AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl | ||
70 | AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl | ||
71 | AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl | ||
72 | |||
73 | # This can be used to rebuild libtool when needed | ||
74 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" | ||
75 | |||
76 | # Always use our own libtool. | ||
77 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | ||
78 | AC_SUBST(LIBTOOL)dnl | ||
79 | |||
80 | # Prevent multiple expansion | ||
81 | define([AC_PROG_LIBTOOL], []) | ||
82 | ])# _AC_PROG_LIBTOOL | ||
83 | |||
84 | |||
85 | # AC_LIBTOOL_SETUP | ||
86 | # ---------------- | ||
87 | AC_DEFUN([AC_LIBTOOL_SETUP], | ||
88 | [AC_PREREQ(2.50)dnl | ||
89 | AC_REQUIRE([AC_ENABLE_SHARED])dnl | ||
90 | AC_REQUIRE([AC_ENABLE_STATIC])dnl | ||
91 | AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl | ||
92 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
93 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | ||
94 | AC_REQUIRE([AC_PROG_CC])dnl | ||
95 | AC_REQUIRE([AC_PROG_LD])dnl | ||
96 | AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl | ||
97 | AC_REQUIRE([AC_PROG_NM])dnl | ||
98 | |||
99 | AC_REQUIRE([AC_PROG_LN_S])dnl | ||
100 | AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl | ||
101 | # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! | ||
102 | AC_REQUIRE([AC_OBJEXT])dnl | ||
103 | AC_REQUIRE([AC_EXEEXT])dnl | ||
104 | dnl | ||
105 | |||
106 | AC_LIBTOOL_SYS_MAX_CMD_LEN | ||
107 | AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | ||
108 | AC_LIBTOOL_OBJDIR | ||
109 | |||
110 | AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl | ||
111 | _LT_AC_PROG_ECHO_BACKSLASH | ||
112 | |||
113 | case $host_os in | ||
114 | aix3*) | ||
115 | # AIX sometimes has problems with the GCC collect2 program. For some | ||
116 | # reason, if we set the COLLECT_NAMES environment variable, the problems | ||
117 | # vanish in a puff of smoke. | ||
118 | if test "X${COLLECT_NAMES+set}" != Xset; then | ||
119 | COLLECT_NAMES= | ||
120 | export COLLECT_NAMES | ||
121 | fi | ||
122 | ;; | ||
123 | esac | ||
124 | |||
125 | # Sed substitution that helps us do robust quoting. It backslashifies | ||
126 | # metacharacters that are still active within double-quoted strings. | ||
127 | Xsed='sed -e s/^X//' | ||
128 | [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] | ||
129 | |||
130 | # Same as above, but do not quote variable references. | ||
131 | [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] | ||
132 | |||
133 | # Sed substitution to delay expansion of an escaped shell variable in a | ||
134 | # double_quote_subst'ed string. | ||
135 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | ||
136 | |||
137 | # Sed substitution to avoid accidental globbing in evaled expressions | ||
138 | no_glob_subst='s/\*/\\\*/g' | ||
139 | |||
140 | # Constants: | ||
141 | rm="rm -f" | ||
142 | |||
143 | # Global variables: | ||
144 | default_ofile=libtool | ||
145 | can_build_shared=yes | ||
146 | |||
147 | # All known linkers require a `.a' archive for static linking (except M$VC, | ||
148 | # which needs '.lib'). | ||
149 | libext=a | ||
150 | ltmain="$ac_aux_dir/ltmain.sh" | ||
151 | ofile="$default_ofile" | ||
152 | with_gnu_ld="$lt_cv_prog_gnu_ld" | ||
153 | |||
154 | AC_CHECK_TOOL(AR, ar, false) | ||
155 | AC_CHECK_TOOL(RANLIB, ranlib, :) | ||
156 | AC_CHECK_TOOL(STRIP, strip, :) | ||
157 | |||
158 | old_CC="$CC" | ||
159 | old_CFLAGS="$CFLAGS" | ||
160 | |||
161 | # Set sane defaults for various variables | ||
162 | test -z "$AR" && AR=ar | ||
163 | test -z "$AR_FLAGS" && AR_FLAGS=cru | ||
164 | test -z "$AS" && AS=as | ||
165 | test -z "$CC" && CC=cc | ||
166 | test -z "$LTCC" && LTCC=$CC | ||
167 | test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
168 | test -z "$LD" && LD=ld | ||
169 | test -z "$LN_S" && LN_S="ln -s" | ||
170 | test -z "$MAGIC_CMD" && MAGIC_CMD=file | ||
171 | test -z "$NM" && NM=nm | ||
172 | test -z "$SED" && SED=sed | ||
173 | test -z "$OBJDUMP" && OBJDUMP=objdump | ||
174 | test -z "$RANLIB" && RANLIB=: | ||
175 | test -z "$STRIP" && STRIP=: | ||
176 | test -z "$ac_objext" && ac_objext=o | ||
177 | |||
178 | # Determine commands to create old-style static archives. | ||
179 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' | ||
180 | old_postinstall_cmds='chmod 644 $oldlib' | ||
181 | old_postuninstall_cmds= | ||
182 | |||
183 | if test -n "$RANLIB"; then | ||
184 | case $host_os in | ||
185 | openbsd*) | ||
186 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" | ||
187 | ;; | ||
188 | *) | ||
189 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" | ||
190 | ;; | ||
191 | esac | ||
192 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" | ||
193 | fi | ||
194 | |||
195 | # Only perform the check for file, if the check method requires it | ||
196 | case $deplibs_check_method in | ||
197 | file_magic*) | ||
198 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then | ||
199 | AC_PATH_MAGIC | ||
200 | fi | ||
201 | ;; | ||
202 | esac | ||
203 | |||
204 | AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) | ||
205 | AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], | ||
206 | enable_win32_dll=yes, enable_win32_dll=no) | ||
207 | |||
208 | AC_ARG_ENABLE([libtool-lock], | ||
209 | [AC_HELP_STRING([--disable-libtool-lock], | ||
210 | [avoid locking (might break parallel builds)])]) | ||
211 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | ||
212 | |||
213 | AC_ARG_WITH([pic], | ||
214 | [AC_HELP_STRING([--with-pic], | ||
215 | [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], | ||
216 | [pic_mode="$withval"], | ||
217 | [pic_mode=default]) | ||
218 | test -z "$pic_mode" && pic_mode=default | ||
219 | |||
220 | # Use C for the default configuration in the libtool script | ||
221 | tagname= | ||
222 | AC_LIBTOOL_LANG_C_CONFIG | ||
223 | _LT_AC_TAGCONFIG | ||
224 | ])# AC_LIBTOOL_SETUP | ||
225 | |||
226 | |||
227 | # _LT_AC_SYS_COMPILER | ||
228 | # ------------------- | ||
229 | AC_DEFUN([_LT_AC_SYS_COMPILER], | ||
230 | [AC_REQUIRE([AC_PROG_CC])dnl | ||
231 | |||
232 | # If no C compiler was specified, use CC. | ||
233 | LTCC=${LTCC-"$CC"} | ||
234 | |||
235 | # Allow CC to be a program name with arguments. | ||
236 | compiler=$CC | ||
237 | ])# _LT_AC_SYS_COMPILER | ||
238 | |||
239 | |||
240 | # _LT_AC_SYS_LIBPATH_AIX | ||
241 | # ---------------------- | ||
242 | # Links a minimal program and checks the executable | ||
243 | # for the system default hardcoded library path. In most cases, | ||
244 | # this is /usr/lib:/lib, but when the MPI compilers are used | ||
245 | # the location of the communication and MPI libs are included too. | ||
246 | # If we don't find anything, use the default library path according | ||
247 | # to the aix ld manual. | ||
248 | AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], | ||
249 | [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ | ||
250 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
251 | }'` | ||
252 | # Check for a 64-bit object if we didn't find anything. | ||
253 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
254 | }'`; fi],[]) | ||
255 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
256 | ])# _LT_AC_SYS_LIBPATH_AIX | ||
257 | |||
258 | |||
259 | # _LT_AC_SHELL_INIT(ARG) | ||
260 | # ---------------------- | ||
261 | AC_DEFUN([_LT_AC_SHELL_INIT], | ||
262 | [ifdef([AC_DIVERSION_NOTICE], | ||
263 | [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], | ||
264 | [AC_DIVERT_PUSH(NOTICE)]) | ||
265 | $1 | ||
266 | AC_DIVERT_POP | ||
267 | ])# _LT_AC_SHELL_INIT | ||
268 | |||
269 | |||
270 | # _LT_AC_PROG_ECHO_BACKSLASH | ||
271 | # -------------------------- | ||
272 | # Add some code to the start of the generated configure script which | ||
273 | # will find an echo command which doesn't interpret backslashes. | ||
274 | AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], | ||
275 | [_LT_AC_SHELL_INIT([ | ||
276 | # Check that we are running under the correct shell. | ||
277 | SHELL=${CONFIG_SHELL-/bin/sh} | ||
278 | |||
279 | case X$ECHO in | ||
280 | X*--fallback-echo) | ||
281 | # Remove one level of quotation (which was required for Make). | ||
282 | ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` | ||
283 | ;; | ||
284 | esac | ||
285 | |||
286 | echo=${ECHO-echo} | ||
287 | if test "X[$]1" = X--no-reexec; then | ||
288 | # Discard the --no-reexec flag, and continue. | ||
289 | shift | ||
290 | elif test "X[$]1" = X--fallback-echo; then | ||
291 | # Avoid inline document here, it may be left over | ||
292 | : | ||
293 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then | ||
294 | # Yippee, $echo works! | ||
295 | : | ||
296 | else | ||
297 | # Restart under the correct shell. | ||
298 | exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} | ||
299 | fi | ||
300 | |||
301 | if test "X[$]1" = X--fallback-echo; then | ||
302 | # used as fallback echo | ||
303 | shift | ||
304 | cat <<EOF | ||
305 | [$]* | ||
306 | EOF | ||
307 | exit 0 | ||
308 | fi | ||
309 | |||
310 | # The HP-UX ksh and POSIX shell print the target directory to stdout | ||
311 | # if CDPATH is set. | ||
312 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | ||
313 | |||
314 | if test -z "$ECHO"; then | ||
315 | if test "X${echo_test_string+set}" != Xset; then | ||
316 | # find a string as large as possible, as long as the shell can cope with it | ||
317 | for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do | ||
318 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... | ||
319 | if (echo_test_string="`eval $cmd`") 2>/dev/null && | ||
320 | echo_test_string="`eval $cmd`" && | ||
321 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null | ||
322 | then | ||
323 | break | ||
324 | fi | ||
325 | done | ||
326 | fi | ||
327 | |||
328 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | ||
329 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | ||
330 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
331 | : | ||
332 | else | ||
333 | # The Solaris, AIX, and Digital Unix default echo programs unquote | ||
334 | # backslashes. This makes it impossible to quote backslashes using | ||
335 | # echo "$something" | sed 's/\\/\\\\/g' | ||
336 | # | ||
337 | # So, first we look for a working echo in the user's PATH. | ||
338 | |||
339 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
340 | for dir in $PATH /usr/ucb; do | ||
341 | IFS="$lt_save_ifs" | ||
342 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && | ||
343 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && | ||
344 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && | ||
345 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
346 | echo="$dir/echo" | ||
347 | break | ||
348 | fi | ||
349 | done | ||
350 | IFS="$lt_save_ifs" | ||
351 | |||
352 | if test "X$echo" = Xecho; then | ||
353 | # We didn't find a better echo, so look for alternatives. | ||
354 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && | ||
355 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && | ||
356 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
357 | # This shell has a builtin print -r that does the trick. | ||
358 | echo='print -r' | ||
359 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && | ||
360 | test "X$CONFIG_SHELL" != X/bin/ksh; then | ||
361 | # If we have ksh, try running configure again with it. | ||
362 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | ||
363 | export ORIGINAL_CONFIG_SHELL | ||
364 | CONFIG_SHELL=/bin/ksh | ||
365 | export CONFIG_SHELL | ||
366 | exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} | ||
367 | else | ||
368 | # Try using printf. | ||
369 | echo='printf %s\n' | ||
370 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | ||
371 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | ||
372 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
373 | # Cool, printf works | ||
374 | : | ||
375 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | ||
376 | test "X$echo_testing_string" = 'X\t' && | ||
377 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | ||
378 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
379 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL | ||
380 | export CONFIG_SHELL | ||
381 | SHELL="$CONFIG_SHELL" | ||
382 | export SHELL | ||
383 | echo="$CONFIG_SHELL [$]0 --fallback-echo" | ||
384 | elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | ||
385 | test "X$echo_testing_string" = 'X\t' && | ||
386 | echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | ||
387 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
388 | echo="$CONFIG_SHELL [$]0 --fallback-echo" | ||
389 | else | ||
390 | # maybe with a smaller string... | ||
391 | prev=: | ||
392 | |||
393 | for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do | ||
394 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null | ||
395 | then | ||
396 | break | ||
397 | fi | ||
398 | prev="$cmd" | ||
399 | done | ||
400 | |||
401 | if test "$prev" != 'sed 50q "[$]0"'; then | ||
402 | echo_test_string=`eval $prev` | ||
403 | export echo_test_string | ||
404 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} | ||
405 | else | ||
406 | # Oops. We lost completely, so just stick with echo. | ||
407 | echo=echo | ||
408 | fi | ||
409 | fi | ||
410 | fi | ||
411 | fi | ||
412 | fi | ||
413 | fi | ||
414 | |||
415 | # Copy echo and quote the copy suitably for passing to libtool from | ||
416 | # the Makefile, instead of quoting the original, which is used later. | ||
417 | ECHO=$echo | ||
418 | if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then | ||
419 | ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" | ||
420 | fi | ||
421 | |||
422 | AC_SUBST(ECHO) | ||
423 | ])])# _LT_AC_PROG_ECHO_BACKSLASH | ||
424 | |||
425 | |||
426 | # _LT_AC_LOCK | ||
427 | # ----------- | ||
428 | AC_DEFUN([_LT_AC_LOCK], | ||
429 | [AC_ARG_ENABLE([libtool-lock], | ||
430 | [AC_HELP_STRING([--disable-libtool-lock], | ||
431 | [avoid locking (might break parallel builds)])]) | ||
432 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | ||
433 | |||
434 | # Some flags need to be propagated to the compiler or linker for good | ||
435 | # libtool support. | ||
436 | case $host in | ||
437 | ia64-*-hpux*) | ||
438 | # Find out which ABI we are using. | ||
439 | echo 'int i;' > conftest.$ac_ext | ||
440 | if AC_TRY_EVAL(ac_compile); then | ||
441 | case `/usr/bin/file conftest.$ac_objext` in | ||
442 | *ELF-32*) | ||
443 | HPUX_IA64_MODE="32" | ||
444 | ;; | ||
445 | *ELF-64*) | ||
446 | HPUX_IA64_MODE="64" | ||
447 | ;; | ||
448 | esac | ||
449 | fi | ||
450 | rm -rf conftest* | ||
451 | ;; | ||
452 | *-*-irix6*) | ||
453 | # Find out which ABI we are using. | ||
454 | echo '[#]line __oline__ "configure"' > conftest.$ac_ext | ||
455 | if AC_TRY_EVAL(ac_compile); then | ||
456 | if test "$lt_cv_prog_gnu_ld" = yes; then | ||
457 | case `/usr/bin/file conftest.$ac_objext` in | ||
458 | *32-bit*) | ||
459 | LD="${LD-ld} -melf32bsmip" | ||
460 | ;; | ||
461 | *N32*) | ||
462 | LD="${LD-ld} -melf32bmipn32" | ||
463 | ;; | ||
464 | *64-bit*) | ||
465 | LD="${LD-ld} -melf64bmip" | ||
466 | ;; | ||
467 | esac | ||
468 | else | ||
469 | case `/usr/bin/file conftest.$ac_objext` in | ||
470 | *32-bit*) | ||
471 | LD="${LD-ld} -32" | ||
472 | ;; | ||
473 | *N32*) | ||
474 | LD="${LD-ld} -n32" | ||
475 | ;; | ||
476 | *64-bit*) | ||
477 | LD="${LD-ld} -64" | ||
478 | ;; | ||
479 | esac | ||
480 | fi | ||
481 | fi | ||
482 | rm -rf conftest* | ||
483 | ;; | ||
484 | |||
485 | x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) | ||
486 | # Find out which ABI we are using. | ||
487 | echo 'int i;' > conftest.$ac_ext | ||
488 | if AC_TRY_EVAL(ac_compile); then | ||
489 | case "`/usr/bin/file conftest.o`" in | ||
490 | *32-bit*) | ||
491 | case $host in | ||
492 | x86_64-*linux*) | ||
493 | LD="${LD-ld} -m elf_i386" | ||
494 | ;; | ||
495 | ppc64-*linux*|powerpc64-*linux*) | ||
496 | LD="${LD-ld} -m elf32ppclinux" | ||
497 | ;; | ||
498 | s390x-*linux*) | ||
499 | LD="${LD-ld} -m elf_s390" | ||
500 | ;; | ||
501 | sparc64-*linux*) | ||
502 | LD="${LD-ld} -m elf32_sparc" | ||
503 | ;; | ||
504 | esac | ||
505 | ;; | ||
506 | *64-bit*) | ||
507 | case $host in | ||
508 | x86_64-*linux*) | ||
509 | LD="${LD-ld} -m elf_x86_64" | ||
510 | ;; | ||
511 | ppc*-*linux*|powerpc*-*linux*) | ||
512 | LD="${LD-ld} -m elf64ppc" | ||
513 | ;; | ||
514 | s390*-*linux*) | ||
515 | LD="${LD-ld} -m elf64_s390" | ||
516 | ;; | ||
517 | sparc*-*linux*) | ||
518 | LD="${LD-ld} -m elf64_sparc" | ||
519 | ;; | ||
520 | esac | ||
521 | ;; | ||
522 | esac | ||
523 | fi | ||
524 | rm -rf conftest* | ||
525 | ;; | ||
526 | |||
527 | *-*-sco3.2v5*) | ||
528 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | ||
529 | SAVE_CFLAGS="$CFLAGS" | ||
530 | CFLAGS="$CFLAGS -belf" | ||
531 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | ||
532 | [AC_LANG_PUSH(C) | ||
533 | AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) | ||
534 | AC_LANG_POP]) | ||
535 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | ||
536 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | ||
537 | CFLAGS="$SAVE_CFLAGS" | ||
538 | fi | ||
539 | ;; | ||
540 | AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], | ||
541 | [*-*-cygwin* | *-*-mingw* | *-*-pw32*) | ||
542 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) | ||
543 | AC_CHECK_TOOL(AS, as, false) | ||
544 | AC_CHECK_TOOL(OBJDUMP, objdump, false) | ||
545 | ;; | ||
546 | ]) | ||
547 | esac | ||
548 | |||
549 | need_locks="$enable_libtool_lock" | ||
550 | |||
551 | ])# _LT_AC_LOCK | ||
552 | |||
553 | |||
554 | # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | ||
555 | # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) | ||
556 | # ---------------------------------------------------------------- | ||
557 | # Check whether the given compiler option works | ||
558 | AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], | ||
559 | [AC_REQUIRE([LT_AC_PROG_SED]) | ||
560 | AC_CACHE_CHECK([$1], [$2], | ||
561 | [$2=no | ||
562 | ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) | ||
563 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
564 | lt_compiler_flag="$3" | ||
565 | # Insert the option either (1) after the last *FLAGS variable, or | ||
566 | # (2) before a word containing "conftest.", or (3) at the end. | ||
567 | # Note that $ac_compile itself does not contain backslashes and begins | ||
568 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
569 | # The option is referenced via a variable to avoid confusing sed. | ||
570 | lt_compile=`echo "$ac_compile" | $SED \ | ||
571 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
572 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | ||
573 | -e 's:$: $lt_compiler_flag:'` | ||
574 | (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | ||
575 | (eval "$lt_compile" 2>conftest.err) | ||
576 | ac_status=$? | ||
577 | cat conftest.err >&AS_MESSAGE_LOG_FD | ||
578 | echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | ||
579 | if (exit $ac_status) && test -s "$ac_outfile"; then | ||
580 | # The compiler can only warn and ignore the option if not recognized | ||
581 | # So say no if there are warnings | ||
582 | if test ! -s conftest.err; then | ||
583 | $2=yes | ||
584 | fi | ||
585 | fi | ||
586 | $rm conftest* | ||
587 | ]) | ||
588 | |||
589 | if test x"[$]$2" = xyes; then | ||
590 | ifelse([$5], , :, [$5]) | ||
591 | else | ||
592 | ifelse([$6], , :, [$6]) | ||
593 | fi | ||
594 | ])# AC_LIBTOOL_COMPILER_OPTION | ||
595 | |||
596 | |||
597 | # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, | ||
598 | # [ACTION-SUCCESS], [ACTION-FAILURE]) | ||
599 | # ------------------------------------------------------------ | ||
600 | # Check whether the given compiler option works | ||
601 | AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], | ||
602 | [AC_CACHE_CHECK([$1], [$2], | ||
603 | [$2=no | ||
604 | save_LDFLAGS="$LDFLAGS" | ||
605 | LDFLAGS="$LDFLAGS $3" | ||
606 | printf "$lt_simple_link_test_code" > conftest.$ac_ext | ||
607 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | ||
608 | # The compiler can only warn and ignore the option if not recognized | ||
609 | # So say no if there are warnings | ||
610 | if test -s conftest.err; then | ||
611 | # Append any errors to the config.log. | ||
612 | cat conftest.err 1>&AS_MESSAGE_LOG_FD | ||
613 | else | ||
614 | $2=yes | ||
615 | fi | ||
616 | fi | ||
617 | $rm conftest* | ||
618 | LDFLAGS="$save_LDFLAGS" | ||
619 | ]) | ||
620 | |||
621 | if test x"[$]$2" = xyes; then | ||
622 | ifelse([$4], , :, [$4]) | ||
623 | else | ||
624 | ifelse([$5], , :, [$5]) | ||
625 | fi | ||
626 | ])# AC_LIBTOOL_LINKER_OPTION | ||
627 | |||
628 | |||
629 | # AC_LIBTOOL_SYS_MAX_CMD_LEN | ||
630 | # -------------------------- | ||
631 | AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], | ||
632 | [# find the maximum length of command line arguments | ||
633 | AC_MSG_CHECKING([the maximum length of command line arguments]) | ||
634 | AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl | ||
635 | i=0 | ||
636 | teststring="ABCD" | ||
637 | |||
638 | case $build_os in | ||
639 | msdosdjgpp*) | ||
640 | # On DJGPP, this test can blow up pretty badly due to problems in libc | ||
641 | # (any single argument exceeding 2000 bytes causes a buffer overrun | ||
642 | # during glob expansion). Even if it were fixed, the result of this | ||
643 | # check would be larger than it should be. | ||
644 | lt_cv_sys_max_cmd_len=12288; # 12K is about right | ||
645 | ;; | ||
646 | |||
647 | gnu*) | ||
648 | # Under GNU Hurd, this test is not required because there is | ||
649 | # no limit to the length of command line arguments. | ||
650 | # Libtool will interpret -1 as no limit whatsoever | ||
651 | lt_cv_sys_max_cmd_len=-1; | ||
652 | ;; | ||
653 | |||
654 | cygwin* | mingw*) | ||
655 | # On Win9x/ME, this test blows up -- it succeeds, but takes | ||
656 | # about 5 minutes as the teststring grows exponentially. | ||
657 | # Worse, since 9x/ME are not pre-emptively multitasking, | ||
658 | # you end up with a "frozen" computer, even though with patience | ||
659 | # the test eventually succeeds (with a max line length of 256k). | ||
660 | # Instead, let's just punt: use the minimum linelength reported by | ||
661 | # all of the supported platforms: 8192 (on NT/2K/XP). | ||
662 | lt_cv_sys_max_cmd_len=8192; | ||
663 | ;; | ||
664 | |||
665 | amigaos*) | ||
666 | # On AmigaOS with pdksh, this test takes hours, literally. | ||
667 | # So we just punt and use a minimum line length of 8192. | ||
668 | lt_cv_sys_max_cmd_len=8192; | ||
669 | ;; | ||
670 | |||
671 | *) | ||
672 | # If test is not a shell built-in, we'll probably end up computing a | ||
673 | # maximum length that is only half of the actual maximum length, but | ||
674 | # we can't tell. | ||
675 | while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ | ||
676 | = "XX$teststring") >/dev/null 2>&1 && | ||
677 | new_result=`expr "X$teststring" : ".*" 2>&1` && | ||
678 | lt_cv_sys_max_cmd_len=$new_result && | ||
679 | test $i != 17 # 1/2 MB should be enough | ||
680 | do | ||
681 | i=`expr $i + 1` | ||
682 | teststring=$teststring$teststring | ||
683 | done | ||
684 | teststring= | ||
685 | # Add a significant safety factor because C++ compilers can tack on massive | ||
686 | # amounts of additional arguments before passing them to the linker. | ||
687 | # It appears as though 1/2 is a usable value. | ||
688 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` | ||
689 | ;; | ||
690 | esac | ||
691 | ]) | ||
692 | if test -n $lt_cv_sys_max_cmd_len ; then | ||
693 | AC_MSG_RESULT($lt_cv_sys_max_cmd_len) | ||
694 | else | ||
695 | AC_MSG_RESULT(none) | ||
696 | fi | ||
697 | ])# AC_LIBTOOL_SYS_MAX_CMD_LEN | ||
698 | |||
699 | |||
700 | # _LT_AC_CHECK_DLFCN | ||
701 | # -------------------- | ||
702 | AC_DEFUN([_LT_AC_CHECK_DLFCN], | ||
703 | [AC_CHECK_HEADERS(dlfcn.h)dnl | ||
704 | ])# _LT_AC_CHECK_DLFCN | ||
705 | |||
706 | |||
707 | # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, | ||
708 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) | ||
709 | # ------------------------------------------------------------------ | ||
710 | AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], | ||
711 | [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl | ||
712 | if test "$cross_compiling" = yes; then : | ||
713 | [$4] | ||
714 | else | ||
715 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
716 | lt_status=$lt_dlunknown | ||
717 | cat > conftest.$ac_ext <<EOF | ||
718 | [#line __oline__ "configure" | ||
719 | #include "confdefs.h" | ||
720 | |||
721 | #if HAVE_DLFCN_H | ||
722 | #include <dlfcn.h> | ||
723 | #endif | ||
724 | |||
725 | #include <stdio.h> | ||
726 | |||
727 | #ifdef RTLD_GLOBAL | ||
728 | # define LT_DLGLOBAL RTLD_GLOBAL | ||
729 | #else | ||
730 | # ifdef DL_GLOBAL | ||
731 | # define LT_DLGLOBAL DL_GLOBAL | ||
732 | # else | ||
733 | # define LT_DLGLOBAL 0 | ||
734 | # endif | ||
735 | #endif | ||
736 | |||
737 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | ||
738 | find out it does not work in some platform. */ | ||
739 | #ifndef LT_DLLAZY_OR_NOW | ||
740 | # ifdef RTLD_LAZY | ||
741 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | ||
742 | # else | ||
743 | # ifdef DL_LAZY | ||
744 | # define LT_DLLAZY_OR_NOW DL_LAZY | ||
745 | # else | ||
746 | # ifdef RTLD_NOW | ||
747 | # define LT_DLLAZY_OR_NOW RTLD_NOW | ||
748 | # else | ||
749 | # ifdef DL_NOW | ||
750 | # define LT_DLLAZY_OR_NOW DL_NOW | ||
751 | # else | ||
752 | # define LT_DLLAZY_OR_NOW 0 | ||
753 | # endif | ||
754 | # endif | ||
755 | # endif | ||
756 | # endif | ||
757 | #endif | ||
758 | |||
759 | #ifdef __cplusplus | ||
760 | extern "C" void exit (int); | ||
761 | #endif | ||
762 | |||
763 | void fnord() { int i=42;} | ||
764 | int main () | ||
765 | { | ||
766 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
767 | int status = $lt_dlunknown; | ||
768 | |||
769 | if (self) | ||
770 | { | ||
771 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | ||
772 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | ||
773 | /* dlclose (self); */ | ||
774 | } | ||
775 | |||
776 | exit (status); | ||
777 | }] | ||
778 | EOF | ||
779 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then | ||
780 | (./conftest; exit; ) 2>/dev/null | ||
781 | lt_status=$? | ||
782 | case x$lt_status in | ||
783 | x$lt_dlno_uscore) $1 ;; | ||
784 | x$lt_dlneed_uscore) $2 ;; | ||
785 | x$lt_unknown|x*) $3 ;; | ||
786 | esac | ||
787 | else : | ||
788 | # compilation failed | ||
789 | $3 | ||
790 | fi | ||
791 | fi | ||
792 | rm -fr conftest* | ||
793 | ])# _LT_AC_TRY_DLOPEN_SELF | ||
794 | |||
795 | |||
796 | # AC_LIBTOOL_DLOPEN_SELF | ||
797 | # ------------------- | ||
798 | AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], | ||
799 | [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl | ||
800 | if test "x$enable_dlopen" != xyes; then | ||
801 | enable_dlopen=unknown | ||
802 | enable_dlopen_self=unknown | ||
803 | enable_dlopen_self_static=unknown | ||
804 | else | ||
805 | lt_cv_dlopen=no | ||
806 | lt_cv_dlopen_libs= | ||
807 | |||
808 | case $host_os in | ||
809 | beos*) | ||
810 | lt_cv_dlopen="load_add_on" | ||
811 | lt_cv_dlopen_libs= | ||
812 | lt_cv_dlopen_self=yes | ||
813 | ;; | ||
814 | |||
815 | mingw* | pw32*) | ||
816 | lt_cv_dlopen="LoadLibrary" | ||
817 | lt_cv_dlopen_libs= | ||
818 | ;; | ||
819 | |||
820 | cygwin*) | ||
821 | lt_cv_dlopen="dlopen" | ||
822 | lt_cv_dlopen_libs= | ||
823 | ;; | ||
824 | |||
825 | darwin*) | ||
826 | # if libdl is installed we need to link against it | ||
827 | AC_CHECK_LIB([dl], [dlopen], | ||
828 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ | ||
829 | lt_cv_dlopen="dyld" | ||
830 | lt_cv_dlopen_libs= | ||
831 | lt_cv_dlopen_self=yes | ||
832 | ]) | ||
833 | ;; | ||
834 | |||
835 | *) | ||
836 | AC_CHECK_FUNC([shl_load], | ||
837 | [lt_cv_dlopen="shl_load"], | ||
838 | [AC_CHECK_LIB([dld], [shl_load], | ||
839 | [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], | ||
840 | [AC_CHECK_FUNC([dlopen], | ||
841 | [lt_cv_dlopen="dlopen"], | ||
842 | [AC_CHECK_LIB([dl], [dlopen], | ||
843 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], | ||
844 | [AC_CHECK_LIB([svld], [dlopen], | ||
845 | [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], | ||
846 | [AC_CHECK_LIB([dld], [dld_link], | ||
847 | [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) | ||
848 | ]) | ||
849 | ]) | ||
850 | ]) | ||
851 | ]) | ||
852 | ]) | ||
853 | ;; | ||
854 | esac | ||
855 | |||
856 | if test "x$lt_cv_dlopen" != xno; then | ||
857 | enable_dlopen=yes | ||
858 | else | ||
859 | enable_dlopen=no | ||
860 | fi | ||
861 | |||
862 | case $lt_cv_dlopen in | ||
863 | dlopen) | ||
864 | save_CPPFLAGS="$CPPFLAGS" | ||
865 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | ||
866 | |||
867 | save_LDFLAGS="$LDFLAGS" | ||
868 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | ||
869 | |||
870 | save_LIBS="$LIBS" | ||
871 | LIBS="$lt_cv_dlopen_libs $LIBS" | ||
872 | |||
873 | AC_CACHE_CHECK([whether a program can dlopen itself], | ||
874 | lt_cv_dlopen_self, [dnl | ||
875 | _LT_AC_TRY_DLOPEN_SELF( | ||
876 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, | ||
877 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) | ||
878 | ]) | ||
879 | |||
880 | if test "x$lt_cv_dlopen_self" = xyes; then | ||
881 | LDFLAGS="$LDFLAGS $link_static_flag" | ||
882 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], | ||
883 | lt_cv_dlopen_self_static, [dnl | ||
884 | _LT_AC_TRY_DLOPEN_SELF( | ||
885 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, | ||
886 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) | ||
887 | ]) | ||
888 | fi | ||
889 | |||
890 | CPPFLAGS="$save_CPPFLAGS" | ||
891 | LDFLAGS="$save_LDFLAGS" | ||
892 | LIBS="$save_LIBS" | ||
893 | ;; | ||
894 | esac | ||
895 | |||
896 | case $lt_cv_dlopen_self in | ||
897 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | ||
898 | *) enable_dlopen_self=unknown ;; | ||
899 | esac | ||
900 | |||
901 | case $lt_cv_dlopen_self_static in | ||
902 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | ||
903 | *) enable_dlopen_self_static=unknown ;; | ||
904 | esac | ||
905 | fi | ||
906 | ])# AC_LIBTOOL_DLOPEN_SELF | ||
907 | |||
908 | |||
909 | # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) | ||
910 | # --------------------------------- | ||
911 | # Check to see if options -c and -o are simultaneously supported by compiler | ||
912 | AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], | ||
913 | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl | ||
914 | AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], | ||
915 | [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], | ||
916 | [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no | ||
917 | $rm -r conftest 2>/dev/null | ||
918 | mkdir conftest | ||
919 | cd conftest | ||
920 | mkdir out | ||
921 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
922 | |||
923 | lt_compiler_flag="-o out/conftest2.$ac_objext" | ||
924 | # Insert the option either (1) after the last *FLAGS variable, or | ||
925 | # (2) before a word containing "conftest.", or (3) at the end. | ||
926 | # Note that $ac_compile itself does not contain backslashes and begins | ||
927 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
928 | lt_compile=`echo "$ac_compile" | $SED \ | ||
929 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
930 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ | ||
931 | -e 's:$: $lt_compiler_flag:'` | ||
932 | (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) | ||
933 | (eval "$lt_compile" 2>out/conftest.err) | ||
934 | ac_status=$? | ||
935 | cat out/conftest.err >&AS_MESSAGE_LOG_FD | ||
936 | echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD | ||
937 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | ||
938 | then | ||
939 | # The compiler can only warn and ignore the option if not recognized | ||
940 | # So say no if there are warnings | ||
941 | if test ! -s out/conftest.err; then | ||
942 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | ||
943 | fi | ||
944 | fi | ||
945 | chmod u+w . | ||
946 | $rm conftest* | ||
947 | # SGI C++ compiler will create directory out/ii_files/ for | ||
948 | # template instantiation | ||
949 | test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files | ||
950 | $rm out/* && rmdir out | ||
951 | cd .. | ||
952 | rmdir conftest | ||
953 | $rm conftest* | ||
954 | ]) | ||
955 | ])# AC_LIBTOOL_PROG_CC_C_O | ||
956 | |||
957 | |||
958 | # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) | ||
959 | # ----------------------------------------- | ||
960 | # Check to see if we can do hard links to lock some files if needed | ||
961 | AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], | ||
962 | [AC_REQUIRE([_LT_AC_LOCK])dnl | ||
963 | |||
964 | hard_links="nottested" | ||
965 | if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then | ||
966 | # do not overwrite the value of need_locks provided by the user | ||
967 | AC_MSG_CHECKING([if we can lock with hard links]) | ||
968 | hard_links=yes | ||
969 | $rm conftest* | ||
970 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
971 | touch conftest.a | ||
972 | ln conftest.a conftest.b 2>&5 || hard_links=no | ||
973 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
974 | AC_MSG_RESULT([$hard_links]) | ||
975 | if test "$hard_links" = no; then | ||
976 | AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) | ||
977 | need_locks=warn | ||
978 | fi | ||
979 | else | ||
980 | need_locks=no | ||
981 | fi | ||
982 | ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS | ||
983 | |||
984 | |||
985 | # AC_LIBTOOL_OBJDIR | ||
986 | # ----------------- | ||
987 | AC_DEFUN([AC_LIBTOOL_OBJDIR], | ||
988 | [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], | ||
989 | [rm -f .libs 2>/dev/null | ||
990 | mkdir .libs 2>/dev/null | ||
991 | if test -d .libs; then | ||
992 | lt_cv_objdir=.libs | ||
993 | else | ||
994 | # MS-DOS does not allow filenames that begin with a dot. | ||
995 | lt_cv_objdir=_libs | ||
996 | fi | ||
997 | rmdir .libs 2>/dev/null]) | ||
998 | objdir=$lt_cv_objdir | ||
999 | ])# AC_LIBTOOL_OBJDIR | ||
1000 | |||
1001 | |||
1002 | # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) | ||
1003 | # ---------------------------------------------- | ||
1004 | # Check hardcoding attributes. | ||
1005 | AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], | ||
1006 | [AC_MSG_CHECKING([how to hardcode library paths into programs]) | ||
1007 | _LT_AC_TAGVAR(hardcode_action, $1)= | ||
1008 | if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ | ||
1009 | test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ | ||
1010 | test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then | ||
1011 | |||
1012 | # We can hardcode non-existant directories. | ||
1013 | if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && | ||
1014 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | ||
1015 | # have to relink, otherwise we might link with an installed library | ||
1016 | # when we should be linking with a yet-to-be-installed one | ||
1017 | ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && | ||
1018 | test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then | ||
1019 | # Linking always hardcodes the temporary library directory. | ||
1020 | _LT_AC_TAGVAR(hardcode_action, $1)=relink | ||
1021 | else | ||
1022 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | ||
1023 | _LT_AC_TAGVAR(hardcode_action, $1)=immediate | ||
1024 | fi | ||
1025 | else | ||
1026 | # We cannot hardcode anything, or else we can only hardcode existing | ||
1027 | # directories. | ||
1028 | _LT_AC_TAGVAR(hardcode_action, $1)=unsupported | ||
1029 | fi | ||
1030 | AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) | ||
1031 | |||
1032 | if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then | ||
1033 | # Fast installation is not supported | ||
1034 | enable_fast_install=no | ||
1035 | elif test "$shlibpath_overrides_runpath" = yes || | ||
1036 | test "$enable_shared" = no; then | ||
1037 | # Fast installation is not necessary | ||
1038 | enable_fast_install=needless | ||
1039 | fi | ||
1040 | ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH | ||
1041 | |||
1042 | |||
1043 | # AC_LIBTOOL_SYS_LIB_STRIP | ||
1044 | # ------------------------ | ||
1045 | AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], | ||
1046 | [striplib= | ||
1047 | old_striplib= | ||
1048 | AC_MSG_CHECKING([whether stripping libraries is possible]) | ||
1049 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then | ||
1050 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | ||
1051 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | ||
1052 | AC_MSG_RESULT([yes]) | ||
1053 | else | ||
1054 | # FIXME - insert some real tests, host_os isn't really good enough | ||
1055 | case $host_os in | ||
1056 | darwin*) | ||
1057 | if test -n "$STRIP" ; then | ||
1058 | striplib="$STRIP -x" | ||
1059 | AC_MSG_RESULT([yes]) | ||
1060 | else | ||
1061 | AC_MSG_RESULT([no]) | ||
1062 | fi | ||
1063 | ;; | ||
1064 | *) | ||
1065 | AC_MSG_RESULT([no]) | ||
1066 | ;; | ||
1067 | esac | ||
1068 | fi | ||
1069 | ])# AC_LIBTOOL_SYS_LIB_STRIP | ||
1070 | |||
1071 | |||
1072 | # AC_LIBTOOL_SYS_DYNAMIC_LINKER | ||
1073 | # ----------------------------- | ||
1074 | # PORTME Fill in your ld.so characteristics | ||
1075 | AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], | ||
1076 | [AC_MSG_CHECKING([dynamic linker characteristics]) | ||
1077 | library_names_spec= | ||
1078 | libname_spec='lib$name' | ||
1079 | soname_spec= | ||
1080 | shrext_cmds=".so" | ||
1081 | postinstall_cmds= | ||
1082 | postuninstall_cmds= | ||
1083 | finish_cmds= | ||
1084 | finish_eval= | ||
1085 | shlibpath_var= | ||
1086 | shlibpath_overrides_runpath=unknown | ||
1087 | version_type=none | ||
1088 | dynamic_linker="$host_os ld.so" | ||
1089 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | ||
1090 | if test "$GCC" = yes; then | ||
1091 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | ||
1092 | if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then | ||
1093 | # if the path contains ";" then we assume it to be the separator | ||
1094 | # otherwise default to the standard path separator (i.e. ":") - it is | ||
1095 | # assumed that no part of a normal pathname contains ";" but that should | ||
1096 | # okay in the real world where ";" in dirpaths is itself problematic. | ||
1097 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
1098 | else | ||
1099 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
1100 | fi | ||
1101 | else | ||
1102 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | ||
1103 | fi | ||
1104 | need_lib_prefix=unknown | ||
1105 | hardcode_into_libs=no | ||
1106 | |||
1107 | # when you set need_version to no, make sure it does not cause -set_version | ||
1108 | # flags to be left without arguments | ||
1109 | need_version=unknown | ||
1110 | |||
1111 | case $host_os in | ||
1112 | aix3*) | ||
1113 | version_type=linux | ||
1114 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | ||
1115 | shlibpath_var=LIBPATH | ||
1116 | |||
1117 | # AIX 3 has no versioning support, so we append a major version to the name. | ||
1118 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1119 | ;; | ||
1120 | |||
1121 | aix4* | aix5*) | ||
1122 | version_type=linux | ||
1123 | need_lib_prefix=no | ||
1124 | need_version=no | ||
1125 | hardcode_into_libs=yes | ||
1126 | if test "$host_cpu" = ia64; then | ||
1127 | # AIX 5 supports IA64 | ||
1128 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | ||
1129 | shlibpath_var=LD_LIBRARY_PATH | ||
1130 | else | ||
1131 | # With GCC up to 2.95.x, collect2 would create an import file | ||
1132 | # for dependence libraries. The import file would start with | ||
1133 | # the line `#! .'. This would cause the generated library to | ||
1134 | # depend on `.', always an invalid library. This was fixed in | ||
1135 | # development snapshots of GCC prior to 3.0. | ||
1136 | case $host_os in | ||
1137 | aix4 | aix4.[[01]] | aix4.[[01]].*) | ||
1138 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | ||
1139 | echo ' yes ' | ||
1140 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | ||
1141 | : | ||
1142 | else | ||
1143 | can_build_shared=no | ||
1144 | fi | ||
1145 | ;; | ||
1146 | esac | ||
1147 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | ||
1148 | # soname into executable. Probably we can add versioning support to | ||
1149 | # collect2, so additional links can be useful in future. | ||
1150 | if test "$aix_use_runtimelinking" = yes; then | ||
1151 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | ||
1152 | # instead of lib<name>.a to let people know that these are not | ||
1153 | # typical AIX shared libraries. | ||
1154 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1155 | else | ||
1156 | # We preserve .a as extension for shared libraries through AIX4.2 | ||
1157 | # and later when we are not doing run time linking. | ||
1158 | library_names_spec='${libname}${release}.a $libname.a' | ||
1159 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1160 | fi | ||
1161 | shlibpath_var=LIBPATH | ||
1162 | fi | ||
1163 | ;; | ||
1164 | |||
1165 | amigaos*) | ||
1166 | library_names_spec='$libname.ixlibrary $libname.a' | ||
1167 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | ||
1168 | 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' | ||
1169 | ;; | ||
1170 | |||
1171 | beos*) | ||
1172 | library_names_spec='${libname}${shared_ext}' | ||
1173 | dynamic_linker="$host_os ld.so" | ||
1174 | shlibpath_var=LIBRARY_PATH | ||
1175 | ;; | ||
1176 | |||
1177 | bsdi4*) | ||
1178 | version_type=linux | ||
1179 | need_version=no | ||
1180 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1181 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1182 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | ||
1183 | shlibpath_var=LD_LIBRARY_PATH | ||
1184 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | ||
1185 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | ||
1186 | # the default ld.so.conf also contains /usr/contrib/lib and | ||
1187 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | ||
1188 | # libtool to hard-code these into programs | ||
1189 | ;; | ||
1190 | |||
1191 | cygwin* | mingw* | pw32*) | ||
1192 | version_type=windows | ||
1193 | shrext_cmds=".dll" | ||
1194 | need_version=no | ||
1195 | need_lib_prefix=no | ||
1196 | |||
1197 | case $GCC,$host_os in | ||
1198 | yes,cygwin* | yes,mingw* | yes,pw32*) | ||
1199 | library_names_spec='$libname.dll.a' | ||
1200 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
1201 | postinstall_cmds='base_file=`basename \${file}`~ | ||
1202 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ | ||
1203 | dldir=$destdir/`dirname \$dlpath`~ | ||
1204 | test -d \$dldir || mkdir -p \$dldir~ | ||
1205 | $install_prog $dir/$dlname \$dldir/$dlname' | ||
1206 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
1207 | dlpath=$dir/\$dldll~ | ||
1208 | $rm \$dlpath' | ||
1209 | shlibpath_overrides_runpath=yes | ||
1210 | |||
1211 | case $host_os in | ||
1212 | cygwin*) | ||
1213 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | ||
1214 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | ||
1215 | sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" | ||
1216 | ;; | ||
1217 | mingw*) | ||
1218 | # MinGW DLLs use traditional 'lib' prefix | ||
1219 | soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' | ||
1220 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | ||
1221 | if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then | ||
1222 | # It is most probably a Windows format PATH printed by | ||
1223 | # mingw gcc, but we are running on Cygwin. Gcc prints its search | ||
1224 | # path with ; separators, and with drive letters. We can handle the | ||
1225 | # drive letters (cygwin fileutils understands them), so leave them, | ||
1226 | # especially as we might pass files found there to a mingw objdump, | ||
1227 | # which wouldn't understand a cygwinified path. Ahh. | ||
1228 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
1229 | else | ||
1230 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
1231 | fi | ||
1232 | ;; | ||
1233 | pw32*) | ||
1234 | # pw32 DLLs use 'pw' prefix rather than 'lib' | ||
1235 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
1236 | ;; | ||
1237 | esac | ||
1238 | ;; | ||
1239 | |||
1240 | *) | ||
1241 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
1242 | ;; | ||
1243 | esac | ||
1244 | dynamic_linker='Win32 ld.exe' | ||
1245 | # FIXME: first we should search . and the directory the executable is in | ||
1246 | shlibpath_var=PATH | ||
1247 | ;; | ||
1248 | |||
1249 | darwin* | rhapsody*) | ||
1250 | dynamic_linker="$host_os dyld" | ||
1251 | version_type=darwin | ||
1252 | need_lib_prefix=no | ||
1253 | need_version=no | ||
1254 | library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' | ||
1255 | soname_spec='${libname}${release}${major}$shared_ext' | ||
1256 | shlibpath_overrides_runpath=yes | ||
1257 | shlibpath_var=DYLD_LIBRARY_PATH | ||
1258 | shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' | ||
1259 | # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. | ||
1260 | if test "$GCC" = yes; then | ||
1261 | sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` | ||
1262 | else | ||
1263 | sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' | ||
1264 | fi | ||
1265 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | ||
1266 | ;; | ||
1267 | |||
1268 | dgux*) | ||
1269 | version_type=linux | ||
1270 | need_lib_prefix=no | ||
1271 | need_version=no | ||
1272 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | ||
1273 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1274 | shlibpath_var=LD_LIBRARY_PATH | ||
1275 | ;; | ||
1276 | |||
1277 | freebsd1*) | ||
1278 | dynamic_linker=no | ||
1279 | ;; | ||
1280 | |||
1281 | kfreebsd*-gnu) | ||
1282 | version_type=linux | ||
1283 | need_lib_prefix=no | ||
1284 | need_version=no | ||
1285 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
1286 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1287 | shlibpath_var=LD_LIBRARY_PATH | ||
1288 | shlibpath_overrides_runpath=no | ||
1289 | hardcode_into_libs=yes | ||
1290 | dynamic_linker='GNU ld.so' | ||
1291 | ;; | ||
1292 | |||
1293 | freebsd*) | ||
1294 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` | ||
1295 | version_type=freebsd-$objformat | ||
1296 | case $version_type in | ||
1297 | freebsd-elf*) | ||
1298 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
1299 | need_version=no | ||
1300 | need_lib_prefix=no | ||
1301 | ;; | ||
1302 | freebsd-*) | ||
1303 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | ||
1304 | need_version=yes | ||
1305 | ;; | ||
1306 | esac | ||
1307 | shlibpath_var=LD_LIBRARY_PATH | ||
1308 | case $host_os in | ||
1309 | freebsd2*) | ||
1310 | shlibpath_overrides_runpath=yes | ||
1311 | ;; | ||
1312 | freebsd3.[01]* | freebsdelf3.[01]*) | ||
1313 | shlibpath_overrides_runpath=yes | ||
1314 | hardcode_into_libs=yes | ||
1315 | ;; | ||
1316 | *) # from 3.2 on | ||
1317 | shlibpath_overrides_runpath=no | ||
1318 | hardcode_into_libs=yes | ||
1319 | ;; | ||
1320 | esac | ||
1321 | ;; | ||
1322 | |||
1323 | gnu*) | ||
1324 | version_type=linux | ||
1325 | need_lib_prefix=no | ||
1326 | need_version=no | ||
1327 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | ||
1328 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1329 | shlibpath_var=LD_LIBRARY_PATH | ||
1330 | hardcode_into_libs=yes | ||
1331 | ;; | ||
1332 | |||
1333 | hpux9* | hpux10* | hpux11*) | ||
1334 | # Give a soname corresponding to the major version so that dld.sl refuses to | ||
1335 | # link against other versions. | ||
1336 | version_type=sunos | ||
1337 | need_lib_prefix=no | ||
1338 | need_version=no | ||
1339 | case "$host_cpu" in | ||
1340 | ia64*) | ||
1341 | shrext_cmds='.so' | ||
1342 | hardcode_into_libs=yes | ||
1343 | dynamic_linker="$host_os dld.so" | ||
1344 | shlibpath_var=LD_LIBRARY_PATH | ||
1345 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
1346 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1347 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1348 | if test "X$HPUX_IA64_MODE" = X32; then | ||
1349 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | ||
1350 | else | ||
1351 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | ||
1352 | fi | ||
1353 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
1354 | ;; | ||
1355 | hppa*64*) | ||
1356 | shrext_cmds='.sl' | ||
1357 | hardcode_into_libs=yes | ||
1358 | dynamic_linker="$host_os dld.sl" | ||
1359 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | ||
1360 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
1361 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1362 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1363 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | ||
1364 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
1365 | ;; | ||
1366 | *) | ||
1367 | shrext_cmds='.sl' | ||
1368 | dynamic_linker="$host_os dld.sl" | ||
1369 | shlibpath_var=SHLIB_PATH | ||
1370 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | ||
1371 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1372 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1373 | ;; | ||
1374 | esac | ||
1375 | # HP-UX runs *really* slowly unless shared libraries are mode 555. | ||
1376 | postinstall_cmds='chmod 555 $lib' | ||
1377 | ;; | ||
1378 | |||
1379 | irix5* | irix6* | nonstopux*) | ||
1380 | case $host_os in | ||
1381 | nonstopux*) version_type=nonstopux ;; | ||
1382 | *) | ||
1383 | if test "$lt_cv_prog_gnu_ld" = yes; then | ||
1384 | version_type=linux | ||
1385 | else | ||
1386 | version_type=irix | ||
1387 | fi ;; | ||
1388 | esac | ||
1389 | need_lib_prefix=no | ||
1390 | need_version=no | ||
1391 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1392 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
1393 | case $host_os in | ||
1394 | irix5* | nonstopux*) | ||
1395 | libsuff= shlibsuff= | ||
1396 | ;; | ||
1397 | *) | ||
1398 | case $LD in # libtool.m4 will add one of these switches to LD | ||
1399 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | ||
1400 | libsuff= shlibsuff= libmagic=32-bit;; | ||
1401 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | ||
1402 | libsuff=32 shlibsuff=N32 libmagic=N32;; | ||
1403 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | ||
1404 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | ||
1405 | *) libsuff= shlibsuff= libmagic=never-match;; | ||
1406 | esac | ||
1407 | ;; | ||
1408 | esac | ||
1409 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | ||
1410 | shlibpath_overrides_runpath=no | ||
1411 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | ||
1412 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | ||
1413 | hardcode_into_libs=yes | ||
1414 | ;; | ||
1415 | |||
1416 | # No shared lib support for Linux oldld, aout, or coff. | ||
1417 | linux*oldld* | linux*aout* | linux*coff*) | ||
1418 | dynamic_linker=no | ||
1419 | ;; | ||
1420 | |||
1421 | # This must be Linux ELF. | ||
1422 | linux*) | ||
1423 | version_type=linux | ||
1424 | need_lib_prefix=no | ||
1425 | need_version=no | ||
1426 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1427 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1428 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | ||
1429 | shlibpath_var=LD_LIBRARY_PATH | ||
1430 | shlibpath_overrides_runpath=no | ||
1431 | # This implies no fast_install, which is unacceptable. | ||
1432 | # Some rework will be needed to allow for fast_install | ||
1433 | # before this can be enabled. | ||
1434 | hardcode_into_libs=yes | ||
1435 | |||
1436 | # Append ld.so.conf contents to the search path | ||
1437 | if test -f /etc/ld.so.conf; then | ||
1438 | lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '` | ||
1439 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" | ||
1440 | fi | ||
1441 | |||
1442 | # We used to test for /lib/ld.so.1 and disable shared libraries on | ||
1443 | # powerpc, because MkLinux only supported shared libraries with the | ||
1444 | # GNU dynamic linker. Since this was broken with cross compilers, | ||
1445 | # most powerpc-linux boxes support dynamic linking these days and | ||
1446 | # people can always --disable-shared, the test was removed, and we | ||
1447 | # assume the GNU/Linux dynamic linker is in use. | ||
1448 | dynamic_linker='GNU/Linux ld.so' | ||
1449 | ;; | ||
1450 | |||
1451 | netbsdelf*-gnu) | ||
1452 | version_type=linux | ||
1453 | need_lib_prefix=no | ||
1454 | need_version=no | ||
1455 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
1456 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1457 | shlibpath_var=LD_LIBRARY_PATH | ||
1458 | shlibpath_overrides_runpath=no | ||
1459 | hardcode_into_libs=yes | ||
1460 | dynamic_linker='NetBSD ld.elf_so' | ||
1461 | ;; | ||
1462 | |||
1463 | knetbsd*-gnu) | ||
1464 | version_type=linux | ||
1465 | need_lib_prefix=no | ||
1466 | need_version=no | ||
1467 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
1468 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1469 | shlibpath_var=LD_LIBRARY_PATH | ||
1470 | shlibpath_overrides_runpath=no | ||
1471 | hardcode_into_libs=yes | ||
1472 | dynamic_linker='GNU ld.so' | ||
1473 | ;; | ||
1474 | |||
1475 | netbsd*) | ||
1476 | version_type=sunos | ||
1477 | need_lib_prefix=no | ||
1478 | need_version=no | ||
1479 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
1480 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
1481 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
1482 | dynamic_linker='NetBSD (a.out) ld.so' | ||
1483 | else | ||
1484 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
1485 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1486 | dynamic_linker='NetBSD ld.elf_so' | ||
1487 | fi | ||
1488 | shlibpath_var=LD_LIBRARY_PATH | ||
1489 | shlibpath_overrides_runpath=yes | ||
1490 | hardcode_into_libs=yes | ||
1491 | ;; | ||
1492 | |||
1493 | newsos6) | ||
1494 | version_type=linux | ||
1495 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1496 | shlibpath_var=LD_LIBRARY_PATH | ||
1497 | shlibpath_overrides_runpath=yes | ||
1498 | ;; | ||
1499 | |||
1500 | nto-qnx*) | ||
1501 | version_type=linux | ||
1502 | need_lib_prefix=no | ||
1503 | need_version=no | ||
1504 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1505 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1506 | shlibpath_var=LD_LIBRARY_PATH | ||
1507 | shlibpath_overrides_runpath=yes | ||
1508 | ;; | ||
1509 | |||
1510 | openbsd*) | ||
1511 | version_type=sunos | ||
1512 | need_lib_prefix=no | ||
1513 | need_version=yes | ||
1514 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
1515 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
1516 | shlibpath_var=LD_LIBRARY_PATH | ||
1517 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
1518 | case $host_os in | ||
1519 | openbsd2.[[89]] | openbsd2.[[89]].*) | ||
1520 | shlibpath_overrides_runpath=no | ||
1521 | ;; | ||
1522 | *) | ||
1523 | shlibpath_overrides_runpath=yes | ||
1524 | ;; | ||
1525 | esac | ||
1526 | else | ||
1527 | shlibpath_overrides_runpath=yes | ||
1528 | fi | ||
1529 | ;; | ||
1530 | |||
1531 | os2*) | ||
1532 | libname_spec='$name' | ||
1533 | shrext_cmds=".dll" | ||
1534 | need_lib_prefix=no | ||
1535 | library_names_spec='$libname${shared_ext} $libname.a' | ||
1536 | dynamic_linker='OS/2 ld.exe' | ||
1537 | shlibpath_var=LIBPATH | ||
1538 | ;; | ||
1539 | |||
1540 | osf3* | osf4* | osf5*) | ||
1541 | version_type=osf | ||
1542 | need_lib_prefix=no | ||
1543 | need_version=no | ||
1544 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1545 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1546 | shlibpath_var=LD_LIBRARY_PATH | ||
1547 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | ||
1548 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | ||
1549 | ;; | ||
1550 | |||
1551 | sco3.2v5*) | ||
1552 | version_type=osf | ||
1553 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1554 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1555 | shlibpath_var=LD_LIBRARY_PATH | ||
1556 | ;; | ||
1557 | |||
1558 | solaris*) | ||
1559 | version_type=linux | ||
1560 | need_lib_prefix=no | ||
1561 | need_version=no | ||
1562 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1563 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1564 | shlibpath_var=LD_LIBRARY_PATH | ||
1565 | shlibpath_overrides_runpath=yes | ||
1566 | hardcode_into_libs=yes | ||
1567 | # ldd complains unless libraries are executable | ||
1568 | postinstall_cmds='chmod +x $lib' | ||
1569 | ;; | ||
1570 | |||
1571 | sunos4*) | ||
1572 | version_type=sunos | ||
1573 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
1574 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | ||
1575 | shlibpath_var=LD_LIBRARY_PATH | ||
1576 | shlibpath_overrides_runpath=yes | ||
1577 | if test "$with_gnu_ld" = yes; then | ||
1578 | need_lib_prefix=no | ||
1579 | fi | ||
1580 | need_version=yes | ||
1581 | ;; | ||
1582 | |||
1583 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
1584 | version_type=linux | ||
1585 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1586 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1587 | shlibpath_var=LD_LIBRARY_PATH | ||
1588 | case $host_vendor in | ||
1589 | sni) | ||
1590 | shlibpath_overrides_runpath=no | ||
1591 | need_lib_prefix=no | ||
1592 | export_dynamic_flag_spec='${wl}-Blargedynsym' | ||
1593 | runpath_var=LD_RUN_PATH | ||
1594 | ;; | ||
1595 | siemens) | ||
1596 | need_lib_prefix=no | ||
1597 | ;; | ||
1598 | motorola) | ||
1599 | need_lib_prefix=no | ||
1600 | need_version=no | ||
1601 | shlibpath_overrides_runpath=no | ||
1602 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | ||
1603 | ;; | ||
1604 | esac | ||
1605 | ;; | ||
1606 | |||
1607 | sysv4*MP*) | ||
1608 | if test -d /usr/nec ;then | ||
1609 | version_type=linux | ||
1610 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | ||
1611 | soname_spec='$libname${shared_ext}.$major' | ||
1612 | shlibpath_var=LD_LIBRARY_PATH | ||
1613 | fi | ||
1614 | ;; | ||
1615 | |||
1616 | uts4*) | ||
1617 | version_type=linux | ||
1618 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
1619 | soname_spec='${libname}${release}${shared_ext}$major' | ||
1620 | shlibpath_var=LD_LIBRARY_PATH | ||
1621 | ;; | ||
1622 | |||
1623 | *) | ||
1624 | dynamic_linker=no | ||
1625 | ;; | ||
1626 | esac | ||
1627 | AC_MSG_RESULT([$dynamic_linker]) | ||
1628 | test "$dynamic_linker" = no && can_build_shared=no | ||
1629 | ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER | ||
1630 | |||
1631 | |||
1632 | # _LT_AC_TAGCONFIG | ||
1633 | # ---------------- | ||
1634 | AC_DEFUN([_LT_AC_TAGCONFIG], | ||
1635 | [AC_ARG_WITH([tags], | ||
1636 | [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], | ||
1637 | [include additional configurations @<:@automatic@:>@])], | ||
1638 | [tagnames="$withval"]) | ||
1639 | |||
1640 | if test -f "$ltmain" && test -n "$tagnames"; then | ||
1641 | if test ! -f "${ofile}"; then | ||
1642 | AC_MSG_WARN([output file `$ofile' does not exist]) | ||
1643 | fi | ||
1644 | |||
1645 | if test -z "$LTCC"; then | ||
1646 | eval "`$SHELL ${ofile} --config | grep '^LTCC='`" | ||
1647 | if test -z "$LTCC"; then | ||
1648 | AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) | ||
1649 | else | ||
1650 | AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) | ||
1651 | fi | ||
1652 | fi | ||
1653 | |||
1654 | # Extract list of available tagged configurations in $ofile. | ||
1655 | # Note that this assumes the entire list is on one line. | ||
1656 | available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` | ||
1657 | |||
1658 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
1659 | for tagname in $tagnames; do | ||
1660 | IFS="$lt_save_ifs" | ||
1661 | # Check whether tagname contains only valid characters | ||
1662 | case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in | ||
1663 | "") ;; | ||
1664 | *) AC_MSG_ERROR([invalid tag name: $tagname]) | ||
1665 | ;; | ||
1666 | esac | ||
1667 | |||
1668 | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null | ||
1669 | then | ||
1670 | AC_MSG_ERROR([tag name \"$tagname\" already exists]) | ||
1671 | fi | ||
1672 | |||
1673 | # Update the list of available tags. | ||
1674 | if test -n "$tagname"; then | ||
1675 | echo appending configuration tag \"$tagname\" to $ofile | ||
1676 | |||
1677 | case $tagname in | ||
1678 | CXX) | ||
1679 | if test -n "$CXX" && test "X$CXX" != "Xno"; then | ||
1680 | AC_LIBTOOL_LANG_CXX_CONFIG | ||
1681 | else | ||
1682 | tagname="" | ||
1683 | fi | ||
1684 | ;; | ||
1685 | |||
1686 | F77) | ||
1687 | if test -n "$F77" && test "X$F77" != "Xno"; then | ||
1688 | AC_LIBTOOL_LANG_F77_CONFIG | ||
1689 | else | ||
1690 | tagname="" | ||
1691 | fi | ||
1692 | ;; | ||
1693 | |||
1694 | GCJ) | ||
1695 | if test -n "$GCJ" && test "X$GCJ" != "Xno"; then | ||
1696 | AC_LIBTOOL_LANG_GCJ_CONFIG | ||
1697 | else | ||
1698 | tagname="" | ||
1699 | fi | ||
1700 | ;; | ||
1701 | |||
1702 | RC) | ||
1703 | AC_LIBTOOL_LANG_RC_CONFIG | ||
1704 | ;; | ||
1705 | |||
1706 | *) | ||
1707 | AC_MSG_ERROR([Unsupported tag name: $tagname]) | ||
1708 | ;; | ||
1709 | esac | ||
1710 | |||
1711 | # Append the new tag name to the list of available tags. | ||
1712 | if test -n "$tagname" ; then | ||
1713 | available_tags="$available_tags $tagname" | ||
1714 | fi | ||
1715 | fi | ||
1716 | done | ||
1717 | IFS="$lt_save_ifs" | ||
1718 | |||
1719 | # Now substitute the updated list of available tags. | ||
1720 | if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then | ||
1721 | mv "${ofile}T" "$ofile" | ||
1722 | chmod +x "$ofile" | ||
1723 | else | ||
1724 | rm -f "${ofile}T" | ||
1725 | AC_MSG_ERROR([unable to update list of available tagged configurations.]) | ||
1726 | fi | ||
1727 | fi | ||
1728 | ])# _LT_AC_TAGCONFIG | ||
1729 | |||
1730 | |||
1731 | # AC_LIBTOOL_DLOPEN | ||
1732 | # ----------------- | ||
1733 | # enable checks for dlopen support | ||
1734 | AC_DEFUN([AC_LIBTOOL_DLOPEN], | ||
1735 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) | ||
1736 | ])# AC_LIBTOOL_DLOPEN | ||
1737 | |||
1738 | |||
1739 | # AC_LIBTOOL_WIN32_DLL | ||
1740 | # -------------------- | ||
1741 | # declare package support for building win32 dll's | ||
1742 | AC_DEFUN([AC_LIBTOOL_WIN32_DLL], | ||
1743 | [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) | ||
1744 | ])# AC_LIBTOOL_WIN32_DLL | ||
1745 | |||
1746 | |||
1747 | # AC_ENABLE_SHARED([DEFAULT]) | ||
1748 | # --------------------------- | ||
1749 | # implement the --enable-shared flag | ||
1750 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | ||
1751 | AC_DEFUN([AC_ENABLE_SHARED], | ||
1752 | [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl | ||
1753 | AC_ARG_ENABLE([shared], | ||
1754 | [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], | ||
1755 | [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], | ||
1756 | [p=${PACKAGE-default} | ||
1757 | case $enableval in | ||
1758 | yes) enable_shared=yes ;; | ||
1759 | no) enable_shared=no ;; | ||
1760 | *) | ||
1761 | enable_shared=no | ||
1762 | # Look at the argument we got. We use all the common list separators. | ||
1763 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
1764 | for pkg in $enableval; do | ||
1765 | IFS="$lt_save_ifs" | ||
1766 | if test "X$pkg" = "X$p"; then | ||
1767 | enable_shared=yes | ||
1768 | fi | ||
1769 | done | ||
1770 | IFS="$lt_save_ifs" | ||
1771 | ;; | ||
1772 | esac], | ||
1773 | [enable_shared=]AC_ENABLE_SHARED_DEFAULT) | ||
1774 | ])# AC_ENABLE_SHARED | ||
1775 | |||
1776 | |||
1777 | # AC_DISABLE_SHARED | ||
1778 | # ----------------- | ||
1779 | #- set the default shared flag to --disable-shared | ||
1780 | AC_DEFUN([AC_DISABLE_SHARED], | ||
1781 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | ||
1782 | AC_ENABLE_SHARED(no) | ||
1783 | ])# AC_DISABLE_SHARED | ||
1784 | |||
1785 | |||
1786 | # AC_ENABLE_STATIC([DEFAULT]) | ||
1787 | # --------------------------- | ||
1788 | # implement the --enable-static flag | ||
1789 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | ||
1790 | AC_DEFUN([AC_ENABLE_STATIC], | ||
1791 | [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl | ||
1792 | AC_ARG_ENABLE([static], | ||
1793 | [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], | ||
1794 | [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], | ||
1795 | [p=${PACKAGE-default} | ||
1796 | case $enableval in | ||
1797 | yes) enable_static=yes ;; | ||
1798 | no) enable_static=no ;; | ||
1799 | *) | ||
1800 | enable_static=no | ||
1801 | # Look at the argument we got. We use all the common list separators. | ||
1802 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
1803 | for pkg in $enableval; do | ||
1804 | IFS="$lt_save_ifs" | ||
1805 | if test "X$pkg" = "X$p"; then | ||
1806 | enable_static=yes | ||
1807 | fi | ||
1808 | done | ||
1809 | IFS="$lt_save_ifs" | ||
1810 | ;; | ||
1811 | esac], | ||
1812 | [enable_static=]AC_ENABLE_STATIC_DEFAULT) | ||
1813 | ])# AC_ENABLE_STATIC | ||
1814 | |||
1815 | |||
1816 | # AC_DISABLE_STATIC | ||
1817 | # ----------------- | ||
1818 | # set the default static flag to --disable-static | ||
1819 | AC_DEFUN([AC_DISABLE_STATIC], | ||
1820 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | ||
1821 | AC_ENABLE_STATIC(no) | ||
1822 | ])# AC_DISABLE_STATIC | ||
1823 | |||
1824 | |||
1825 | # AC_ENABLE_FAST_INSTALL([DEFAULT]) | ||
1826 | # --------------------------------- | ||
1827 | # implement the --enable-fast-install flag | ||
1828 | # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. | ||
1829 | AC_DEFUN([AC_ENABLE_FAST_INSTALL], | ||
1830 | [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl | ||
1831 | AC_ARG_ENABLE([fast-install], | ||
1832 | [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], | ||
1833 | [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], | ||
1834 | [p=${PACKAGE-default} | ||
1835 | case $enableval in | ||
1836 | yes) enable_fast_install=yes ;; | ||
1837 | no) enable_fast_install=no ;; | ||
1838 | *) | ||
1839 | enable_fast_install=no | ||
1840 | # Look at the argument we got. We use all the common list separators. | ||
1841 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
1842 | for pkg in $enableval; do | ||
1843 | IFS="$lt_save_ifs" | ||
1844 | if test "X$pkg" = "X$p"; then | ||
1845 | enable_fast_install=yes | ||
1846 | fi | ||
1847 | done | ||
1848 | IFS="$lt_save_ifs" | ||
1849 | ;; | ||
1850 | esac], | ||
1851 | [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) | ||
1852 | ])# AC_ENABLE_FAST_INSTALL | ||
1853 | |||
1854 | |||
1855 | # AC_DISABLE_FAST_INSTALL | ||
1856 | # ----------------------- | ||
1857 | # set the default to --disable-fast-install | ||
1858 | AC_DEFUN([AC_DISABLE_FAST_INSTALL], | ||
1859 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | ||
1860 | AC_ENABLE_FAST_INSTALL(no) | ||
1861 | ])# AC_DISABLE_FAST_INSTALL | ||
1862 | |||
1863 | |||
1864 | # AC_LIBTOOL_PICMODE([MODE]) | ||
1865 | # -------------------------- | ||
1866 | # implement the --with-pic flag | ||
1867 | # MODE is either `yes' or `no'. If omitted, it defaults to `both'. | ||
1868 | AC_DEFUN([AC_LIBTOOL_PICMODE], | ||
1869 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | ||
1870 | pic_mode=ifelse($#,1,$1,default) | ||
1871 | ])# AC_LIBTOOL_PICMODE | ||
1872 | |||
1873 | |||
1874 | # AC_PROG_EGREP | ||
1875 | # ------------- | ||
1876 | # This is predefined starting with Autoconf 2.54, so this conditional | ||
1877 | # definition can be removed once we require Autoconf 2.54 or later. | ||
1878 | m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], | ||
1879 | [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], | ||
1880 | [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | ||
1881 | then ac_cv_prog_egrep='grep -E' | ||
1882 | else ac_cv_prog_egrep='egrep' | ||
1883 | fi]) | ||
1884 | EGREP=$ac_cv_prog_egrep | ||
1885 | AC_SUBST([EGREP]) | ||
1886 | ])]) | ||
1887 | |||
1888 | |||
1889 | # AC_PATH_TOOL_PREFIX | ||
1890 | # ------------------- | ||
1891 | # find a file program which can recognise shared library | ||
1892 | AC_DEFUN([AC_PATH_TOOL_PREFIX], | ||
1893 | [AC_REQUIRE([AC_PROG_EGREP])dnl | ||
1894 | AC_MSG_CHECKING([for $1]) | ||
1895 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, | ||
1896 | [case $MAGIC_CMD in | ||
1897 | [[\\/*] | ?:[\\/]*]) | ||
1898 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | ||
1899 | ;; | ||
1900 | *) | ||
1901 | lt_save_MAGIC_CMD="$MAGIC_CMD" | ||
1902 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
1903 | dnl $ac_dummy forces splitting on constant user-supplied paths. | ||
1904 | dnl POSIX.2 word splitting is done only on the output of word expansions, | ||
1905 | dnl not every word. This closes a longstanding sh security hole. | ||
1906 | ac_dummy="ifelse([$2], , $PATH, [$2])" | ||
1907 | for ac_dir in $ac_dummy; do | ||
1908 | IFS="$lt_save_ifs" | ||
1909 | test -z "$ac_dir" && ac_dir=. | ||
1910 | if test -f $ac_dir/$1; then | ||
1911 | lt_cv_path_MAGIC_CMD="$ac_dir/$1" | ||
1912 | if test -n "$file_magic_test_file"; then | ||
1913 | case $deplibs_check_method in | ||
1914 | "file_magic "*) | ||
1915 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | ||
1916 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | ||
1917 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | ||
1918 | $EGREP "$file_magic_regex" > /dev/null; then | ||
1919 | : | ||
1920 | else | ||
1921 | cat <<EOF 1>&2 | ||
1922 | |||
1923 | *** Warning: the command libtool uses to detect shared libraries, | ||
1924 | *** $file_magic_cmd, produces output that libtool cannot recognize. | ||
1925 | *** The result is that libtool may fail to recognize shared libraries | ||
1926 | *** as such. This will affect the creation of libtool libraries that | ||
1927 | *** depend on shared libraries, but programs linked with such libtool | ||
1928 | *** libraries will work regardless of this problem. Nevertheless, you | ||
1929 | *** may want to report the problem to your system manager and/or to | ||
1930 | *** bug-libtool@gnu.org | ||
1931 | |||
1932 | EOF | ||
1933 | fi ;; | ||
1934 | esac | ||
1935 | fi | ||
1936 | break | ||
1937 | fi | ||
1938 | done | ||
1939 | IFS="$lt_save_ifs" | ||
1940 | MAGIC_CMD="$lt_save_MAGIC_CMD" | ||
1941 | ;; | ||
1942 | esac]) | ||
1943 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | ||
1944 | if test -n "$MAGIC_CMD"; then | ||
1945 | AC_MSG_RESULT($MAGIC_CMD) | ||
1946 | else | ||
1947 | AC_MSG_RESULT(no) | ||
1948 | fi | ||
1949 | ])# AC_PATH_TOOL_PREFIX | ||
1950 | |||
1951 | |||
1952 | # AC_PATH_MAGIC | ||
1953 | # ------------- | ||
1954 | # find a file program which can recognise a shared library | ||
1955 | AC_DEFUN([AC_PATH_MAGIC], | ||
1956 | [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) | ||
1957 | if test -z "$lt_cv_path_MAGIC_CMD"; then | ||
1958 | if test -n "$ac_tool_prefix"; then | ||
1959 | AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) | ||
1960 | else | ||
1961 | MAGIC_CMD=: | ||
1962 | fi | ||
1963 | fi | ||
1964 | ])# AC_PATH_MAGIC | ||
1965 | |||
1966 | |||
1967 | # AC_PROG_LD | ||
1968 | # ---------- | ||
1969 | # find the pathname to the GNU or non-GNU linker | ||
1970 | AC_DEFUN([AC_PROG_LD], | ||
1971 | [AC_ARG_WITH([gnu-ld], | ||
1972 | [AC_HELP_STRING([--with-gnu-ld], | ||
1973 | [assume the C compiler uses GNU ld @<:@default=no@:>@])], | ||
1974 | [test "$withval" = no || with_gnu_ld=yes], | ||
1975 | [with_gnu_ld=no]) | ||
1976 | AC_REQUIRE([LT_AC_PROG_SED])dnl | ||
1977 | AC_REQUIRE([AC_PROG_CC])dnl | ||
1978 | AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
1979 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl | ||
1980 | ac_prog=ld | ||
1981 | if test "$GCC" = yes; then | ||
1982 | # Check if gcc -print-prog-name=ld gives a path. | ||
1983 | AC_MSG_CHECKING([for ld used by $CC]) | ||
1984 | case $host in | ||
1985 | *-*-mingw*) | ||
1986 | # gcc leaves a trailing carriage return which upsets mingw | ||
1987 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
1988 | *) | ||
1989 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
1990 | esac | ||
1991 | case $ac_prog in | ||
1992 | # Accept absolute paths. | ||
1993 | [[\\/]]* | ?:[[\\/]]*) | ||
1994 | re_direlt='/[[^/]][[^/]]*/\.\./' | ||
1995 | # Canonicalize the pathname of ld | ||
1996 | ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` | ||
1997 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | ||
1998 | ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` | ||
1999 | done | ||
2000 | test -z "$LD" && LD="$ac_prog" | ||
2001 | ;; | ||
2002 | "") | ||
2003 | # If it fails, then pretend we aren't using GCC. | ||
2004 | ac_prog=ld | ||
2005 | ;; | ||
2006 | *) | ||
2007 | # If it is relative, then search for the first ld in PATH. | ||
2008 | with_gnu_ld=unknown | ||
2009 | ;; | ||
2010 | esac | ||
2011 | elif test "$with_gnu_ld" = yes; then | ||
2012 | AC_MSG_CHECKING([for GNU ld]) | ||
2013 | else | ||
2014 | AC_MSG_CHECKING([for non-GNU ld]) | ||
2015 | fi | ||
2016 | AC_CACHE_VAL(lt_cv_path_LD, | ||
2017 | [if test -z "$LD"; then | ||
2018 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
2019 | for ac_dir in $PATH; do | ||
2020 | IFS="$lt_save_ifs" | ||
2021 | test -z "$ac_dir" && ac_dir=. | ||
2022 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
2023 | lt_cv_path_LD="$ac_dir/$ac_prog" | ||
2024 | # Check to see if the program is GNU ld. I'd rather use --version, | ||
2025 | # but apparently some GNU ld's only accept -v. | ||
2026 | # Break only if it was the GNU/non-GNU ld that we prefer. | ||
2027 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | ||
2028 | *GNU* | *'with BFD'*) | ||
2029 | test "$with_gnu_ld" != no && break | ||
2030 | ;; | ||
2031 | *) | ||
2032 | test "$with_gnu_ld" != yes && break | ||
2033 | ;; | ||
2034 | esac | ||
2035 | fi | ||
2036 | done | ||
2037 | IFS="$lt_save_ifs" | ||
2038 | else | ||
2039 | lt_cv_path_LD="$LD" # Let the user override the test with a path. | ||
2040 | fi]) | ||
2041 | LD="$lt_cv_path_LD" | ||
2042 | if test -n "$LD"; then | ||
2043 | AC_MSG_RESULT($LD) | ||
2044 | else | ||
2045 | AC_MSG_RESULT(no) | ||
2046 | fi | ||
2047 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
2048 | AC_PROG_LD_GNU | ||
2049 | ])# AC_PROG_LD | ||
2050 | |||
2051 | |||
2052 | # AC_PROG_LD_GNU | ||
2053 | # -------------- | ||
2054 | AC_DEFUN([AC_PROG_LD_GNU], | ||
2055 | [AC_REQUIRE([AC_PROG_EGREP])dnl | ||
2056 | AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, | ||
2057 | [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | ||
2058 | case `$LD -v 2>&1 </dev/null` in | ||
2059 | *GNU* | *'with BFD'*) | ||
2060 | lt_cv_prog_gnu_ld=yes | ||
2061 | ;; | ||
2062 | *) | ||
2063 | lt_cv_prog_gnu_ld=no | ||
2064 | ;; | ||
2065 | esac]) | ||
2066 | with_gnu_ld=$lt_cv_prog_gnu_ld | ||
2067 | ])# AC_PROG_LD_GNU | ||
2068 | |||
2069 | |||
2070 | # AC_PROG_LD_RELOAD_FLAG | ||
2071 | # ---------------------- | ||
2072 | # find reload flag for linker | ||
2073 | # -- PORTME Some linkers may need a different reload flag. | ||
2074 | AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], | ||
2075 | [AC_CACHE_CHECK([for $LD option to reload object files], | ||
2076 | lt_cv_ld_reload_flag, | ||
2077 | [lt_cv_ld_reload_flag='-r']) | ||
2078 | reload_flag=$lt_cv_ld_reload_flag | ||
2079 | case $reload_flag in | ||
2080 | "" | " "*) ;; | ||
2081 | *) reload_flag=" $reload_flag" ;; | ||
2082 | esac | ||
2083 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
2084 | ])# AC_PROG_LD_RELOAD_FLAG | ||
2085 | |||
2086 | |||
2087 | # AC_DEPLIBS_CHECK_METHOD | ||
2088 | # ----------------------- | ||
2089 | # how to check for library dependencies | ||
2090 | # -- PORTME fill in with the dynamic library characteristics | ||
2091 | AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], | ||
2092 | [AC_CACHE_CHECK([how to recognise dependent libraries], | ||
2093 | lt_cv_deplibs_check_method, | ||
2094 | [lt_cv_file_magic_cmd='$MAGIC_CMD' | ||
2095 | lt_cv_file_magic_test_file= | ||
2096 | lt_cv_deplibs_check_method='unknown' | ||
2097 | # Need to set the preceding variable on all platforms that support | ||
2098 | # interlibrary dependencies. | ||
2099 | # 'none' -- dependencies not supported. | ||
2100 | # `unknown' -- same as none, but documents that we really don't know. | ||
2101 | # 'pass_all' -- all dependencies passed with no checks. | ||
2102 | # 'test_compile' -- check by making test program. | ||
2103 | # 'file_magic [[regex]]' -- check by looking for files in library path | ||
2104 | # which responds to the $file_magic_cmd with a given extended regex. | ||
2105 | # If you have `file' or equivalent on your system and you're not sure | ||
2106 | # whether `pass_all' will *always* work, you probably want this one. | ||
2107 | |||
2108 | case $host_os in | ||
2109 | aix4* | aix5*) | ||
2110 | lt_cv_deplibs_check_method=pass_all | ||
2111 | ;; | ||
2112 | |||
2113 | beos*) | ||
2114 | lt_cv_deplibs_check_method=pass_all | ||
2115 | ;; | ||
2116 | |||
2117 | bsdi4*) | ||
2118 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' | ||
2119 | lt_cv_file_magic_cmd='/usr/bin/file -L' | ||
2120 | lt_cv_file_magic_test_file=/shlib/libc.so | ||
2121 | ;; | ||
2122 | |||
2123 | cygwin*) | ||
2124 | # func_win32_libid is a shell function defined in ltmain.sh | ||
2125 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
2126 | lt_cv_file_magic_cmd='func_win32_libid' | ||
2127 | ;; | ||
2128 | |||
2129 | mingw* | pw32*) | ||
2130 | # Base MSYS/MinGW do not provide the 'file' command needed by | ||
2131 | # func_win32_libid shell function, so use a weaker test based on 'objdump'. | ||
2132 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | ||
2133 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
2134 | ;; | ||
2135 | |||
2136 | darwin* | rhapsody*) | ||
2137 | lt_cv_deplibs_check_method=pass_all | ||
2138 | ;; | ||
2139 | |||
2140 | freebsd* | kfreebsd*-gnu) | ||
2141 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
2142 | case $host_cpu in | ||
2143 | i*86 ) | ||
2144 | # Not sure whether the presence of OpenBSD here was a mistake. | ||
2145 | # Let's accept both of them until this is cleared up. | ||
2146 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' | ||
2147 | lt_cv_file_magic_cmd=/usr/bin/file | ||
2148 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | ||
2149 | ;; | ||
2150 | esac | ||
2151 | else | ||
2152 | lt_cv_deplibs_check_method=pass_all | ||
2153 | fi | ||
2154 | ;; | ||
2155 | |||
2156 | gnu*) | ||
2157 | lt_cv_deplibs_check_method=pass_all | ||
2158 | ;; | ||
2159 | |||
2160 | hpux10.20* | hpux11*) | ||
2161 | lt_cv_file_magic_cmd=/usr/bin/file | ||
2162 | case "$host_cpu" in | ||
2163 | ia64*) | ||
2164 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' | ||
2165 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | ||
2166 | ;; | ||
2167 | hppa*64*) | ||
2168 | [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]'] | ||
2169 | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl | ||
2170 | ;; | ||
2171 | *) | ||
2172 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' | ||
2173 | lt_cv_file_magic_test_file=/usr/lib/libc.sl | ||
2174 | ;; | ||
2175 | esac | ||
2176 | ;; | ||
2177 | |||
2178 | irix5* | irix6* | nonstopux*) | ||
2179 | case $LD in | ||
2180 | *-32|*"-32 ") libmagic=32-bit;; | ||
2181 | *-n32|*"-n32 ") libmagic=N32;; | ||
2182 | *-64|*"-64 ") libmagic=64-bit;; | ||
2183 | *) libmagic=never-match;; | ||
2184 | esac | ||
2185 | lt_cv_deplibs_check_method=pass_all | ||
2186 | ;; | ||
2187 | |||
2188 | # This must be Linux ELF. | ||
2189 | linux*) | ||
2190 | lt_cv_deplibs_check_method=pass_all | ||
2191 | ;; | ||
2192 | |||
2193 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
2194 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
2195 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' | ||
2196 | else | ||
2197 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' | ||
2198 | fi | ||
2199 | ;; | ||
2200 | |||
2201 | newos6*) | ||
2202 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' | ||
2203 | lt_cv_file_magic_cmd=/usr/bin/file | ||
2204 | lt_cv_file_magic_test_file=/usr/lib/libnls.so | ||
2205 | ;; | ||
2206 | |||
2207 | nto-qnx*) | ||
2208 | lt_cv_deplibs_check_method=unknown | ||
2209 | ;; | ||
2210 | |||
2211 | openbsd*) | ||
2212 | lt_cv_file_magic_cmd=/usr/bin/file | ||
2213 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | ||
2214 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
2215 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' | ||
2216 | else | ||
2217 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' | ||
2218 | fi | ||
2219 | ;; | ||
2220 | |||
2221 | osf3* | osf4* | osf5*) | ||
2222 | lt_cv_deplibs_check_method=pass_all | ||
2223 | ;; | ||
2224 | |||
2225 | sco3.2v5*) | ||
2226 | lt_cv_deplibs_check_method=pass_all | ||
2227 | ;; | ||
2228 | |||
2229 | solaris*) | ||
2230 | lt_cv_deplibs_check_method=pass_all | ||
2231 | ;; | ||
2232 | |||
2233 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
2234 | case $host_vendor in | ||
2235 | motorola) | ||
2236 | 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]]' | ||
2237 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | ||
2238 | ;; | ||
2239 | ncr) | ||
2240 | lt_cv_deplibs_check_method=pass_all | ||
2241 | ;; | ||
2242 | sequent) | ||
2243 | lt_cv_file_magic_cmd='/bin/file' | ||
2244 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' | ||
2245 | ;; | ||
2246 | sni) | ||
2247 | lt_cv_file_magic_cmd='/bin/file' | ||
2248 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" | ||
2249 | lt_cv_file_magic_test_file=/lib/libc.so | ||
2250 | ;; | ||
2251 | siemens) | ||
2252 | lt_cv_deplibs_check_method=pass_all | ||
2253 | ;; | ||
2254 | esac | ||
2255 | ;; | ||
2256 | |||
2257 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) | ||
2258 | lt_cv_deplibs_check_method=pass_all | ||
2259 | ;; | ||
2260 | esac | ||
2261 | ]) | ||
2262 | file_magic_cmd=$lt_cv_file_magic_cmd | ||
2263 | deplibs_check_method=$lt_cv_deplibs_check_method | ||
2264 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | ||
2265 | ])# AC_DEPLIBS_CHECK_METHOD | ||
2266 | |||
2267 | |||
2268 | # AC_PROG_NM | ||
2269 | # ---------- | ||
2270 | # find the pathname to a BSD-compatible name lister | ||
2271 | AC_DEFUN([AC_PROG_NM], | ||
2272 | [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, | ||
2273 | [if test -n "$NM"; then | ||
2274 | # Let the user override the test. | ||
2275 | lt_cv_path_NM="$NM" | ||
2276 | else | ||
2277 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
2278 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do | ||
2279 | IFS="$lt_save_ifs" | ||
2280 | test -z "$ac_dir" && ac_dir=. | ||
2281 | tmp_nm="$ac_dir/${ac_tool_prefix}nm" | ||
2282 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then | ||
2283 | # Check to see if the nm accepts a BSD-compat flag. | ||
2284 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | ||
2285 | # nm: unknown option "B" ignored | ||
2286 | # Tru64's nm complains that /dev/null is an invalid object file | ||
2287 | case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in | ||
2288 | */dev/null* | *'Invalid file or object type'*) | ||
2289 | lt_cv_path_NM="$tmp_nm -B" | ||
2290 | break | ||
2291 | ;; | ||
2292 | *) | ||
2293 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | ||
2294 | */dev/null*) | ||
2295 | lt_cv_path_NM="$tmp_nm -p" | ||
2296 | break | ||
2297 | ;; | ||
2298 | *) | ||
2299 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | ||
2300 | continue # so that we can try to find one that supports BSD flags | ||
2301 | ;; | ||
2302 | esac | ||
2303 | esac | ||
2304 | fi | ||
2305 | done | ||
2306 | IFS="$lt_save_ifs" | ||
2307 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm | ||
2308 | fi]) | ||
2309 | NM="$lt_cv_path_NM" | ||
2310 | ])# AC_PROG_NM | ||
2311 | |||
2312 | |||
2313 | # AC_CHECK_LIBM | ||
2314 | # ------------- | ||
2315 | # check for math library | ||
2316 | AC_DEFUN([AC_CHECK_LIBM], | ||
2317 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
2318 | LIBM= | ||
2319 | case $host in | ||
2320 | *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) | ||
2321 | # These system don't have libm, or don't need it | ||
2322 | ;; | ||
2323 | *-ncr-sysv4.3*) | ||
2324 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | ||
2325 | AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") | ||
2326 | ;; | ||
2327 | *) | ||
2328 | AC_CHECK_LIB(m, cos, LIBM="-lm") | ||
2329 | ;; | ||
2330 | esac | ||
2331 | ])# AC_CHECK_LIBM | ||
2332 | |||
2333 | |||
2334 | # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) | ||
2335 | # ----------------------------------- | ||
2336 | # sets LIBLTDL to the link flags for the libltdl convenience library and | ||
2337 | # LTDLINCL to the include flags for the libltdl header and adds | ||
2338 | # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL | ||
2339 | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If | ||
2340 | # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will | ||
2341 | # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with | ||
2342 | # '${top_srcdir}/' (note the single quotes!). If your package is not | ||
2343 | # flat and you're not using automake, define top_builddir and | ||
2344 | # top_srcdir appropriately in the Makefiles. | ||
2345 | AC_DEFUN([AC_LIBLTDL_CONVENIENCE], | ||
2346 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | ||
2347 | case $enable_ltdl_convenience in | ||
2348 | no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; | ||
2349 | "") enable_ltdl_convenience=yes | ||
2350 | ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; | ||
2351 | esac | ||
2352 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la | ||
2353 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) | ||
2354 | # For backwards non-gettext consistent compatibility... | ||
2355 | INCLTDL="$LTDLINCL" | ||
2356 | ])# AC_LIBLTDL_CONVENIENCE | ||
2357 | |||
2358 | |||
2359 | # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) | ||
2360 | # ----------------------------------- | ||
2361 | # sets LIBLTDL to the link flags for the libltdl installable library and | ||
2362 | # LTDLINCL to the include flags for the libltdl header and adds | ||
2363 | # --enable-ltdl-install to the configure arguments. Note that LIBLTDL | ||
2364 | # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If | ||
2365 | # DIRECTORY is not provided and an installed libltdl is not found, it is | ||
2366 | # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' | ||
2367 | # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single | ||
2368 | # quotes!). If your package is not flat and you're not using automake, | ||
2369 | # define top_builddir and top_srcdir appropriately in the Makefiles. | ||
2370 | # In the future, this macro may have to be called after AC_PROG_LIBTOOL. | ||
2371 | AC_DEFUN([AC_LIBLTDL_INSTALLABLE], | ||
2372 | [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | ||
2373 | AC_CHECK_LIB(ltdl, lt_dlinit, | ||
2374 | [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], | ||
2375 | [if test x"$enable_ltdl_install" = xno; then | ||
2376 | AC_MSG_WARN([libltdl not installed, but installation disabled]) | ||
2377 | else | ||
2378 | enable_ltdl_install=yes | ||
2379 | fi | ||
2380 | ]) | ||
2381 | if test x"$enable_ltdl_install" = x"yes"; then | ||
2382 | ac_configure_args="$ac_configure_args --enable-ltdl-install" | ||
2383 | LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la | ||
2384 | LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) | ||
2385 | else | ||
2386 | ac_configure_args="$ac_configure_args --enable-ltdl-install=no" | ||
2387 | LIBLTDL="-lltdl" | ||
2388 | LTDLINCL= | ||
2389 | fi | ||
2390 | # For backwards non-gettext consistent compatibility... | ||
2391 | INCLTDL="$LTDLINCL" | ||
2392 | ])# AC_LIBLTDL_INSTALLABLE | ||
2393 | |||
2394 | |||
2395 | # AC_LIBTOOL_CXX | ||
2396 | # -------------- | ||
2397 | # enable support for C++ libraries | ||
2398 | AC_DEFUN([AC_LIBTOOL_CXX], | ||
2399 | [AC_REQUIRE([_LT_AC_LANG_CXX]) | ||
2400 | ])# AC_LIBTOOL_CXX | ||
2401 | |||
2402 | |||
2403 | # _LT_AC_LANG_CXX | ||
2404 | # --------------- | ||
2405 | AC_DEFUN([_LT_AC_LANG_CXX], | ||
2406 | [AC_REQUIRE([AC_PROG_CXX]) | ||
2407 | AC_REQUIRE([AC_PROG_CXXCPP]) | ||
2408 | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) | ||
2409 | ])# _LT_AC_LANG_CXX | ||
2410 | |||
2411 | |||
2412 | # AC_LIBTOOL_F77 | ||
2413 | # -------------- | ||
2414 | # enable support for Fortran 77 libraries | ||
2415 | AC_DEFUN([AC_LIBTOOL_F77], | ||
2416 | [AC_REQUIRE([_LT_AC_LANG_F77]) | ||
2417 | ])# AC_LIBTOOL_F77 | ||
2418 | |||
2419 | |||
2420 | # _LT_AC_LANG_F77 | ||
2421 | # --------------- | ||
2422 | AC_DEFUN([_LT_AC_LANG_F77], | ||
2423 | [AC_REQUIRE([AC_PROG_F77]) | ||
2424 | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) | ||
2425 | ])# _LT_AC_LANG_F77 | ||
2426 | |||
2427 | |||
2428 | # AC_LIBTOOL_GCJ | ||
2429 | # -------------- | ||
2430 | # enable support for GCJ libraries | ||
2431 | AC_DEFUN([AC_LIBTOOL_GCJ], | ||
2432 | [AC_REQUIRE([_LT_AC_LANG_GCJ]) | ||
2433 | ])# AC_LIBTOOL_GCJ | ||
2434 | |||
2435 | |||
2436 | # _LT_AC_LANG_GCJ | ||
2437 | # --------------- | ||
2438 | AC_DEFUN([_LT_AC_LANG_GCJ], | ||
2439 | [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], | ||
2440 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], | ||
2441 | [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], | ||
2442 | [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], | ||
2443 | [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], | ||
2444 | [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) | ||
2445 | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) | ||
2446 | ])# _LT_AC_LANG_GCJ | ||
2447 | |||
2448 | |||
2449 | # AC_LIBTOOL_RC | ||
2450 | # -------------- | ||
2451 | # enable support for Windows resource files | ||
2452 | AC_DEFUN([AC_LIBTOOL_RC], | ||
2453 | [AC_REQUIRE([LT_AC_PROG_RC]) | ||
2454 | _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) | ||
2455 | ])# AC_LIBTOOL_RC | ||
2456 | |||
2457 | |||
2458 | # AC_LIBTOOL_LANG_C_CONFIG | ||
2459 | # ------------------------ | ||
2460 | # Ensure that the configuration vars for the C compiler are | ||
2461 | # suitably defined. Those variables are subsequently used by | ||
2462 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | ||
2463 | AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) | ||
2464 | AC_DEFUN([_LT_AC_LANG_C_CONFIG], | ||
2465 | [lt_save_CC="$CC" | ||
2466 | AC_LANG_PUSH(C) | ||
2467 | |||
2468 | # Source file extension for C test sources. | ||
2469 | ac_ext=c | ||
2470 | |||
2471 | # Object file extension for compiled C test sources. | ||
2472 | objext=o | ||
2473 | _LT_AC_TAGVAR(objext, $1)=$objext | ||
2474 | |||
2475 | # Code to be used in simple compile tests | ||
2476 | lt_simple_compile_test_code="int some_variable = 0;\n" | ||
2477 | |||
2478 | # Code to be used in simple link tests | ||
2479 | lt_simple_link_test_code='int main(){return(0);}\n' | ||
2480 | |||
2481 | _LT_AC_SYS_COMPILER | ||
2482 | |||
2483 | # | ||
2484 | # Check for any special shared library compilation flags. | ||
2485 | # | ||
2486 | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= | ||
2487 | if test "$GCC" = no; then | ||
2488 | case $host_os in | ||
2489 | sco3.2v5*) | ||
2490 | _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' | ||
2491 | ;; | ||
2492 | esac | ||
2493 | fi | ||
2494 | if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then | ||
2495 | AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) | ||
2496 | if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : | ||
2497 | else | ||
2498 | AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) | ||
2499 | _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no | ||
2500 | fi | ||
2501 | fi | ||
2502 | |||
2503 | |||
2504 | # | ||
2505 | # Check to make sure the static flag actually works. | ||
2506 | # | ||
2507 | AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], | ||
2508 | _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), | ||
2509 | $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), | ||
2510 | [], | ||
2511 | [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) | ||
2512 | |||
2513 | |||
2514 | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) | ||
2515 | AC_LIBTOOL_PROG_COMPILER_PIC($1) | ||
2516 | AC_LIBTOOL_PROG_CC_C_O($1) | ||
2517 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | ||
2518 | AC_LIBTOOL_PROG_LD_SHLIBS($1) | ||
2519 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | ||
2520 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | ||
2521 | AC_LIBTOOL_SYS_LIB_STRIP | ||
2522 | AC_LIBTOOL_DLOPEN_SELF($1) | ||
2523 | |||
2524 | # Report which librarie types wil actually be built | ||
2525 | AC_MSG_CHECKING([if libtool supports shared libraries]) | ||
2526 | AC_MSG_RESULT([$can_build_shared]) | ||
2527 | |||
2528 | AC_MSG_CHECKING([whether to build shared libraries]) | ||
2529 | test "$can_build_shared" = "no" && enable_shared=no | ||
2530 | |||
2531 | # On AIX, shared libraries and static libraries use the same namespace, and | ||
2532 | # are all built from PIC. | ||
2533 | case "$host_os" in | ||
2534 | aix3*) | ||
2535 | test "$enable_shared" = yes && enable_static=no | ||
2536 | if test -n "$RANLIB"; then | ||
2537 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | ||
2538 | postinstall_cmds='$RANLIB $lib' | ||
2539 | fi | ||
2540 | ;; | ||
2541 | |||
2542 | aix4* | aix5*) | ||
2543 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | ||
2544 | test "$enable_shared" = yes && enable_static=no | ||
2545 | fi | ||
2546 | ;; | ||
2547 | darwin* | rhapsody*) | ||
2548 | if test "$GCC" = yes; then | ||
2549 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
2550 | case "$host_os" in | ||
2551 | rhapsody* | darwin1.[[012]]) | ||
2552 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' | ||
2553 | ;; | ||
2554 | *) # Darwin 1.3 on | ||
2555 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then | ||
2556 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' | ||
2557 | else | ||
2558 | case ${MACOSX_DEPLOYMENT_TARGET} in | ||
2559 | 10.[[012]]) | ||
2560 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' | ||
2561 | ;; | ||
2562 | 10.*) | ||
2563 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' | ||
2564 | ;; | ||
2565 | esac | ||
2566 | fi | ||
2567 | ;; | ||
2568 | esac | ||
2569 | output_verbose_link_cmd='echo' | ||
2570 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' | ||
2571 | _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' | ||
2572 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's | ||
2573 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
2574 | _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
2575 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
2576 | _LT_AC_TAGVAR(hardcode_automatic, $1)=yes | ||
2577 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | ||
2578 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' | ||
2579 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | ||
2580 | else | ||
2581 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2582 | fi | ||
2583 | ;; | ||
2584 | esac | ||
2585 | AC_MSG_RESULT([$enable_shared]) | ||
2586 | |||
2587 | AC_MSG_CHECKING([whether to build static libraries]) | ||
2588 | # Make sure either enable_shared or enable_static is yes. | ||
2589 | test "$enable_shared" = yes || enable_static=yes | ||
2590 | AC_MSG_RESULT([$enable_static]) | ||
2591 | |||
2592 | AC_LIBTOOL_CONFIG($1) | ||
2593 | |||
2594 | AC_LANG_POP | ||
2595 | CC="$lt_save_CC" | ||
2596 | ])# AC_LIBTOOL_LANG_C_CONFIG | ||
2597 | |||
2598 | |||
2599 | # AC_LIBTOOL_LANG_CXX_CONFIG | ||
2600 | # -------------------------- | ||
2601 | # Ensure that the configuration vars for the C compiler are | ||
2602 | # suitably defined. Those variables are subsequently used by | ||
2603 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | ||
2604 | AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) | ||
2605 | AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], | ||
2606 | [AC_LANG_PUSH(C++) | ||
2607 | AC_REQUIRE([AC_PROG_CXX]) | ||
2608 | AC_REQUIRE([AC_PROG_CXXCPP]) | ||
2609 | |||
2610 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
2611 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= | ||
2612 | _LT_AC_TAGVAR(always_export_symbols, $1)=no | ||
2613 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= | ||
2614 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= | ||
2615 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
2616 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
2617 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= | ||
2618 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | ||
2619 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no | ||
2620 | _LT_AC_TAGVAR(hardcode_automatic, $1)=no | ||
2621 | _LT_AC_TAGVAR(module_cmds, $1)= | ||
2622 | _LT_AC_TAGVAR(module_expsym_cmds, $1)= | ||
2623 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown | ||
2624 | _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
2625 | _LT_AC_TAGVAR(no_undefined_flag, $1)= | ||
2626 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | ||
2627 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
2628 | |||
2629 | # Dependencies to place before and after the object being linked: | ||
2630 | _LT_AC_TAGVAR(predep_objects, $1)= | ||
2631 | _LT_AC_TAGVAR(postdep_objects, $1)= | ||
2632 | _LT_AC_TAGVAR(predeps, $1)= | ||
2633 | _LT_AC_TAGVAR(postdeps, $1)= | ||
2634 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)= | ||
2635 | |||
2636 | # Source file extension for C++ test sources. | ||
2637 | ac_ext=cc | ||
2638 | |||
2639 | # Object file extension for compiled C++ test sources. | ||
2640 | objext=o | ||
2641 | _LT_AC_TAGVAR(objext, $1)=$objext | ||
2642 | |||
2643 | # Code to be used in simple compile tests | ||
2644 | lt_simple_compile_test_code="int some_variable = 0;\n" | ||
2645 | |||
2646 | # Code to be used in simple link tests | ||
2647 | lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' | ||
2648 | |||
2649 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
2650 | _LT_AC_SYS_COMPILER | ||
2651 | |||
2652 | # Allow CC to be a program name with arguments. | ||
2653 | lt_save_CC=$CC | ||
2654 | lt_save_LD=$LD | ||
2655 | lt_save_GCC=$GCC | ||
2656 | GCC=$GXX | ||
2657 | lt_save_with_gnu_ld=$with_gnu_ld | ||
2658 | lt_save_path_LD=$lt_cv_path_LD | ||
2659 | if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then | ||
2660 | lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx | ||
2661 | else | ||
2662 | unset lt_cv_prog_gnu_ld | ||
2663 | fi | ||
2664 | if test -n "${lt_cv_path_LDCXX+set}"; then | ||
2665 | lt_cv_path_LD=$lt_cv_path_LDCXX | ||
2666 | else | ||
2667 | unset lt_cv_path_LD | ||
2668 | fi | ||
2669 | test -z "${LDCXX+set}" || LD=$LDCXX | ||
2670 | CC=${CXX-"c++"} | ||
2671 | compiler=$CC | ||
2672 | _LT_AC_TAGVAR(compiler, $1)=$CC | ||
2673 | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` | ||
2674 | |||
2675 | # We don't want -fno-exception wen compiling C++ code, so set the | ||
2676 | # no_builtin_flag separately | ||
2677 | if test "$GXX" = yes; then | ||
2678 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | ||
2679 | else | ||
2680 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | ||
2681 | fi | ||
2682 | |||
2683 | if test "$GXX" = yes; then | ||
2684 | # Set up default GNU C++ configuration | ||
2685 | |||
2686 | AC_PROG_LD | ||
2687 | |||
2688 | # Check if GNU C++ uses GNU ld as the underlying linker, since the | ||
2689 | # archiving commands below assume that GNU ld is being used. | ||
2690 | if test "$with_gnu_ld" = yes; then | ||
2691 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
2692 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
2693 | |||
2694 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' | ||
2695 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | ||
2696 | |||
2697 | # If archive_cmds runs LD, not CC, wlarc should be empty | ||
2698 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to | ||
2699 | # investigate it a little bit more. (MM) | ||
2700 | wlarc='${wl}' | ||
2701 | |||
2702 | # ancient GNU ld didn't support --whole-archive et. al. | ||
2703 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ | ||
2704 | grep 'no-whole-archive' > /dev/null; then | ||
2705 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | ||
2706 | else | ||
2707 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | ||
2708 | fi | ||
2709 | else | ||
2710 | with_gnu_ld=no | ||
2711 | wlarc= | ||
2712 | |||
2713 | # A generic and very simple default shared library creation | ||
2714 | # command for GNU C++ for the case where it uses the native | ||
2715 | # linker, instead of GNU ld. If possible, this setting should | ||
2716 | # overridden to take advantage of the native linker features on | ||
2717 | # the platform it is being used on. | ||
2718 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | ||
2719 | fi | ||
2720 | |||
2721 | # Commands to make compiler produce verbose output that lists | ||
2722 | # what "hidden" libraries, object files and flags are used when | ||
2723 | # linking a shared library. | ||
2724 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' | ||
2725 | |||
2726 | else | ||
2727 | GXX=no | ||
2728 | with_gnu_ld=no | ||
2729 | wlarc= | ||
2730 | fi | ||
2731 | |||
2732 | # PORTME: fill in a description of your system's C++ link characteristics | ||
2733 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | ||
2734 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes | ||
2735 | case $host_os in | ||
2736 | aix3*) | ||
2737 | # FIXME: insert proper C++ library support | ||
2738 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2739 | ;; | ||
2740 | aix4* | aix5*) | ||
2741 | if test "$host_cpu" = ia64; then | ||
2742 | # On IA64, the linker does run time linking by default, so we don't | ||
2743 | # have to do anything special. | ||
2744 | aix_use_runtimelinking=no | ||
2745 | exp_sym_flag='-Bexport' | ||
2746 | no_entry_flag="" | ||
2747 | else | ||
2748 | aix_use_runtimelinking=no | ||
2749 | |||
2750 | # Test if we are trying to use run time linking or normal | ||
2751 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | ||
2752 | # need to do runtime linking. | ||
2753 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) | ||
2754 | for ld_flag in $LDFLAGS; do | ||
2755 | case $ld_flag in | ||
2756 | *-brtl*) | ||
2757 | aix_use_runtimelinking=yes | ||
2758 | break | ||
2759 | ;; | ||
2760 | esac | ||
2761 | done | ||
2762 | esac | ||
2763 | |||
2764 | exp_sym_flag='-bexport' | ||
2765 | no_entry_flag='-bnoentry' | ||
2766 | fi | ||
2767 | |||
2768 | # When large executables or shared objects are built, AIX ld can | ||
2769 | # have problems creating the table of contents. If linking a library | ||
2770 | # or program results in "error TOC overflow" add -mminimal-toc to | ||
2771 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | ||
2772 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | ||
2773 | |||
2774 | _LT_AC_TAGVAR(archive_cmds, $1)='' | ||
2775 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
2776 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' | ||
2777 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | ||
2778 | |||
2779 | if test "$GXX" = yes; then | ||
2780 | case $host_os in aix4.[012]|aix4.[012].*) | ||
2781 | # We only want to do this on AIX 4.2 and lower, the check | ||
2782 | # below for broken collect2 doesn't work under 4.3+ | ||
2783 | collect2name=`${CC} -print-prog-name=collect2` | ||
2784 | if test -f "$collect2name" && \ | ||
2785 | strings "$collect2name" | grep resolve_lib_name >/dev/null | ||
2786 | then | ||
2787 | # We have reworked collect2 | ||
2788 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
2789 | else | ||
2790 | # We have old collect2 | ||
2791 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported | ||
2792 | # It fails to find uninstalled libraries when the uninstalled | ||
2793 | # path is not listed in the libpath. Setting hardcode_minus_L | ||
2794 | # to unsupported forces relinking | ||
2795 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
2796 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
2797 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | ||
2798 | fi | ||
2799 | esac | ||
2800 | shared_flag='-shared' | ||
2801 | else | ||
2802 | # not using gcc | ||
2803 | if test "$host_cpu" = ia64; then | ||
2804 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | ||
2805 | # chokes on -Wl,-G. The following line is correct: | ||
2806 | shared_flag='-G' | ||
2807 | else | ||
2808 | if test "$aix_use_runtimelinking" = yes; then | ||
2809 | shared_flag='${wl}-G' | ||
2810 | else | ||
2811 | shared_flag='${wl}-bM:SRE' | ||
2812 | fi | ||
2813 | fi | ||
2814 | fi | ||
2815 | |||
2816 | # It seems that -bexpall does not export symbols beginning with | ||
2817 | # underscore (_), so it is better to generate a list of symbols to export. | ||
2818 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | ||
2819 | if test "$aix_use_runtimelinking" = yes; then | ||
2820 | # Warning - without using the other runtime loading flags (-brtl), | ||
2821 | # -berok will link without error, but may produce a broken library. | ||
2822 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' | ||
2823 | # Determine the default libpath from the value encoded in an empty executable. | ||
2824 | _LT_AC_SYS_LIBPATH_AIX | ||
2825 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
2826 | |||
2827 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" | ||
2828 | else | ||
2829 | if test "$host_cpu" = ia64; then | ||
2830 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | ||
2831 | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | ||
2832 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" | ||
2833 | else | ||
2834 | # Determine the default libpath from the value encoded in an empty executable. | ||
2835 | _LT_AC_SYS_LIBPATH_AIX | ||
2836 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
2837 | # Warning - without using the other run time loading flags, | ||
2838 | # -berok will link without error, but may produce a broken library. | ||
2839 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | ||
2840 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | ||
2841 | # -bexpall does not export symbols beginning with underscore (_) | ||
2842 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | ||
2843 | # Exported symbols can be pulled into shared objects from archives | ||
2844 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' | ||
2845 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
2846 | # This is similar to how AIX traditionally builds it's shared libraries. | ||
2847 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | ||
2848 | fi | ||
2849 | fi | ||
2850 | ;; | ||
2851 | chorus*) | ||
2852 | case $cc_basename in | ||
2853 | *) | ||
2854 | # FIXME: insert proper C++ library support | ||
2855 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2856 | ;; | ||
2857 | esac | ||
2858 | ;; | ||
2859 | |||
2860 | cygwin* | mingw* | pw32*) | ||
2861 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | ||
2862 | # as there is no search path for DLLs. | ||
2863 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
2864 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
2865 | _LT_AC_TAGVAR(always_export_symbols, $1)=no | ||
2866 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
2867 | |||
2868 | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then | ||
2869 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
2870 | # If the export-symbols file already is a .def file (1st line | ||
2871 | # is EXPORTS), use it as is; otherwise, prepend... | ||
2872 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
2873 | cp $export_symbols $output_objdir/$soname.def; | ||
2874 | else | ||
2875 | echo EXPORTS > $output_objdir/$soname.def; | ||
2876 | cat $export_symbols >> $output_objdir/$soname.def; | ||
2877 | fi~ | ||
2878 | $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
2879 | else | ||
2880 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2881 | fi | ||
2882 | ;; | ||
2883 | |||
2884 | darwin* | rhapsody*) | ||
2885 | if test "$GXX" = yes; then | ||
2886 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
2887 | case "$host_os" in | ||
2888 | rhapsody* | darwin1.[[012]]) | ||
2889 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' | ||
2890 | ;; | ||
2891 | *) # Darwin 1.3 on | ||
2892 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then | ||
2893 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' | ||
2894 | else | ||
2895 | case ${MACOSX_DEPLOYMENT_TARGET} in | ||
2896 | 10.[[012]]) | ||
2897 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' | ||
2898 | ;; | ||
2899 | 10.*) | ||
2900 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' | ||
2901 | ;; | ||
2902 | esac | ||
2903 | fi | ||
2904 | ;; | ||
2905 | esac | ||
2906 | lt_int_apple_cc_single_mod=no | ||
2907 | output_verbose_link_cmd='echo' | ||
2908 | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then | ||
2909 | lt_int_apple_cc_single_mod=yes | ||
2910 | fi | ||
2911 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
2912 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' | ||
2913 | else | ||
2914 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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' | ||
2915 | fi | ||
2916 | _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' | ||
2917 | |||
2918 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's | ||
2919 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
2920 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
2921 | else | ||
2922 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
2923 | fi | ||
2924 | _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
2925 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
2926 | _LT_AC_TAGVAR(hardcode_automatic, $1)=yes | ||
2927 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | ||
2928 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' | ||
2929 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | ||
2930 | else | ||
2931 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2932 | fi | ||
2933 | ;; | ||
2934 | |||
2935 | dgux*) | ||
2936 | case $cc_basename in | ||
2937 | ec++) | ||
2938 | # FIXME: insert proper C++ library support | ||
2939 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2940 | ;; | ||
2941 | ghcx) | ||
2942 | # Green Hills C++ Compiler | ||
2943 | # FIXME: insert proper C++ library support | ||
2944 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2945 | ;; | ||
2946 | *) | ||
2947 | # FIXME: insert proper C++ library support | ||
2948 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2949 | ;; | ||
2950 | esac | ||
2951 | ;; | ||
2952 | freebsd[12]*) | ||
2953 | # C++ shared libraries reported to be fairly broken before switch to ELF | ||
2954 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2955 | ;; | ||
2956 | freebsd-elf*) | ||
2957 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
2958 | ;; | ||
2959 | freebsd* | kfreebsd*-gnu) | ||
2960 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF | ||
2961 | # conventions | ||
2962 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes | ||
2963 | ;; | ||
2964 | gnu*) | ||
2965 | ;; | ||
2966 | hpux9*) | ||
2967 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
2968 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
2969 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
2970 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
2971 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | ||
2972 | # but as the default | ||
2973 | # location of the library. | ||
2974 | |||
2975 | case $cc_basename in | ||
2976 | CC) | ||
2977 | # FIXME: insert proper C++ library support | ||
2978 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2979 | ;; | ||
2980 | aCC) | ||
2981 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | ||
2982 | # Commands to make compiler produce verbose output that lists | ||
2983 | # what "hidden" libraries, object files and flags are used when | ||
2984 | # linking a shared library. | ||
2985 | # | ||
2986 | # There doesn't appear to be a way to prevent this compiler from | ||
2987 | # explicitly linking system object files so we need to strip them | ||
2988 | # from the output so that they don't get included in the library | ||
2989 | # dependencies. | ||
2990 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
2991 | ;; | ||
2992 | *) | ||
2993 | if test "$GXX" = yes; then | ||
2994 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | ||
2995 | else | ||
2996 | # FIXME: insert proper C++ library support | ||
2997 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
2998 | fi | ||
2999 | ;; | ||
3000 | esac | ||
3001 | ;; | ||
3002 | hpux10*|hpux11*) | ||
3003 | if test $with_gnu_ld = no; then | ||
3004 | case "$host_cpu" in | ||
3005 | hppa*64*) | ||
3006 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
3007 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' | ||
3008 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
3009 | ;; | ||
3010 | ia64*) | ||
3011 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
3012 | ;; | ||
3013 | *) | ||
3014 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
3015 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
3016 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
3017 | ;; | ||
3018 | esac | ||
3019 | fi | ||
3020 | case "$host_cpu" in | ||
3021 | hppa*64*) | ||
3022 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
3023 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
3024 | ;; | ||
3025 | ia64*) | ||
3026 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
3027 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
3028 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | ||
3029 | # but as the default | ||
3030 | # location of the library. | ||
3031 | ;; | ||
3032 | *) | ||
3033 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
3034 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, | ||
3035 | # but as the default | ||
3036 | # location of the library. | ||
3037 | ;; | ||
3038 | esac | ||
3039 | |||
3040 | case $cc_basename in | ||
3041 | CC) | ||
3042 | # FIXME: insert proper C++ library support | ||
3043 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3044 | ;; | ||
3045 | aCC) | ||
3046 | case "$host_cpu" in | ||
3047 | hppa*64*|ia64*) | ||
3048 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' | ||
3049 | ;; | ||
3050 | *) | ||
3051 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
3052 | ;; | ||
3053 | esac | ||
3054 | # Commands to make compiler produce verbose output that lists | ||
3055 | # what "hidden" libraries, object files and flags are used when | ||
3056 | # linking a shared library. | ||
3057 | # | ||
3058 | # There doesn't appear to be a way to prevent this compiler from | ||
3059 | # explicitly linking system object files so we need to strip them | ||
3060 | # from the output so that they don't get included in the library | ||
3061 | # dependencies. | ||
3062 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
3063 | ;; | ||
3064 | *) | ||
3065 | if test "$GXX" = yes; then | ||
3066 | if test $with_gnu_ld = no; then | ||
3067 | case "$host_cpu" in | ||
3068 | ia64*|hppa*64*) | ||
3069 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' | ||
3070 | ;; | ||
3071 | *) | ||
3072 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
3073 | ;; | ||
3074 | esac | ||
3075 | fi | ||
3076 | else | ||
3077 | # FIXME: insert proper C++ library support | ||
3078 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3079 | fi | ||
3080 | ;; | ||
3081 | esac | ||
3082 | ;; | ||
3083 | irix5* | irix6*) | ||
3084 | case $cc_basename in | ||
3085 | CC) | ||
3086 | # SGI C++ | ||
3087 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' | ||
3088 | |||
3089 | # Archives containing C++ object files must be created using | ||
3090 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is | ||
3091 | # necessary to make sure instantiated templates are included | ||
3092 | # in the archive. | ||
3093 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' | ||
3094 | ;; | ||
3095 | *) | ||
3096 | if test "$GXX" = yes; then | ||
3097 | if test "$with_gnu_ld" = no; then | ||
3098 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' | ||
3099 | else | ||
3100 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' | ||
3101 | fi | ||
3102 | fi | ||
3103 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | ||
3104 | ;; | ||
3105 | esac | ||
3106 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
3107 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
3108 | ;; | ||
3109 | linux*) | ||
3110 | case $cc_basename in | ||
3111 | KCC) | ||
3112 | # Kuck and Associates, Inc. (KAI) C++ Compiler | ||
3113 | |||
3114 | # KCC will only create a shared library if the output file | ||
3115 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | ||
3116 | # to its proper name (with version) after linking. | ||
3117 | _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | ||
3118 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' | ||
3119 | # Commands to make compiler produce verbose output that lists | ||
3120 | # what "hidden" libraries, object files and flags are used when | ||
3121 | # linking a shared library. | ||
3122 | # | ||
3123 | # There doesn't appear to be a way to prevent this compiler from | ||
3124 | # explicitly linking system object files so we need to strip them | ||
3125 | # from the output so that they don't get included in the library | ||
3126 | # dependencies. | ||
3127 | output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
3128 | |||
3129 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' | ||
3130 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | ||
3131 | |||
3132 | # Archives containing C++ object files must be created using | ||
3133 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | ||
3134 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' | ||
3135 | ;; | ||
3136 | icpc) | ||
3137 | # Intel C++ | ||
3138 | with_gnu_ld=yes | ||
3139 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
3140 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
3141 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
3142 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
3143 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | ||
3144 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | ||
3145 | ;; | ||
3146 | cxx) | ||
3147 | # Compaq C++ | ||
3148 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
3149 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' | ||
3150 | |||
3151 | runpath_var=LD_RUN_PATH | ||
3152 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | ||
3153 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
3154 | |||
3155 | # Commands to make compiler produce verbose output that lists | ||
3156 | # what "hidden" libraries, object files and flags are used when | ||
3157 | # linking a shared library. | ||
3158 | # | ||
3159 | # There doesn't appear to be a way to prevent this compiler from | ||
3160 | # explicitly linking system object files so we need to strip them | ||
3161 | # from the output so that they don't get included in the library | ||
3162 | # dependencies. | ||
3163 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
3164 | ;; | ||
3165 | esac | ||
3166 | ;; | ||
3167 | lynxos*) | ||
3168 | # FIXME: insert proper C++ library support | ||
3169 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3170 | ;; | ||
3171 | m88k*) | ||
3172 | # FIXME: insert proper C++ library support | ||
3173 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3174 | ;; | ||
3175 | mvs*) | ||
3176 | case $cc_basename in | ||
3177 | cxx) | ||
3178 | # FIXME: insert proper C++ library support | ||
3179 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3180 | ;; | ||
3181 | *) | ||
3182 | # FIXME: insert proper C++ library support | ||
3183 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3184 | ;; | ||
3185 | esac | ||
3186 | ;; | ||
3187 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
3188 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
3189 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' | ||
3190 | wlarc= | ||
3191 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
3192 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
3193 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
3194 | fi | ||
3195 | # Workaround some broken pre-1.5 toolchains | ||
3196 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' | ||
3197 | ;; | ||
3198 | osf3*) | ||
3199 | case $cc_basename in | ||
3200 | KCC) | ||
3201 | # Kuck and Associates, Inc. (KAI) C++ Compiler | ||
3202 | |||
3203 | # KCC will only create a shared library if the output file | ||
3204 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | ||
3205 | # to its proper name (with version) after linking. | ||
3206 | _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | ||
3207 | |||
3208 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
3209 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
3210 | |||
3211 | # Archives containing C++ object files must be created using | ||
3212 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | ||
3213 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' | ||
3214 | |||
3215 | ;; | ||
3216 | RCC) | ||
3217 | # Rational C++ 2.4.1 | ||
3218 | # FIXME: insert proper C++ library support | ||
3219 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3220 | ;; | ||
3221 | cxx) | ||
3222 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | ||
3223 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' | ||
3224 | |||
3225 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
3226 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
3227 | |||
3228 | # Commands to make compiler produce verbose output that lists | ||
3229 | # what "hidden" libraries, object files and flags are used when | ||
3230 | # linking a shared library. | ||
3231 | # | ||
3232 | # There doesn't appear to be a way to prevent this compiler from | ||
3233 | # explicitly linking system object files so we need to strip them | ||
3234 | # from the output so that they don't get included in the library | ||
3235 | # dependencies. | ||
3236 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
3237 | ;; | ||
3238 | *) | ||
3239 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | ||
3240 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | ||
3241 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' | ||
3242 | |||
3243 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
3244 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
3245 | |||
3246 | # Commands to make compiler produce verbose output that lists | ||
3247 | # what "hidden" libraries, object files and flags are used when | ||
3248 | # linking a shared library. | ||
3249 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' | ||
3250 | |||
3251 | else | ||
3252 | # FIXME: insert proper C++ library support | ||
3253 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3254 | fi | ||
3255 | ;; | ||
3256 | esac | ||
3257 | ;; | ||
3258 | osf4* | osf5*) | ||
3259 | case $cc_basename in | ||
3260 | KCC) | ||
3261 | # Kuck and Associates, Inc. (KAI) C++ Compiler | ||
3262 | |||
3263 | # KCC will only create a shared library if the output file | ||
3264 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | ||
3265 | # to its proper name (with version) after linking. | ||
3266 | _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | ||
3267 | |||
3268 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
3269 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
3270 | |||
3271 | # Archives containing C++ object files must be created using | ||
3272 | # the KAI C++ compiler. | ||
3273 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' | ||
3274 | ;; | ||
3275 | RCC) | ||
3276 | # Rational C++ 2.4.1 | ||
3277 | # FIXME: insert proper C++ library support | ||
3278 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3279 | ;; | ||
3280 | cxx) | ||
3281 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | ||
3282 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' | ||
3283 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ | ||
3284 | echo "-hidden">> $lib.exp~ | ||
3285 | $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ | ||
3286 | $rm $lib.exp' | ||
3287 | |||
3288 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | ||
3289 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
3290 | |||
3291 | # Commands to make compiler produce verbose output that lists | ||
3292 | # what "hidden" libraries, object files and flags are used when | ||
3293 | # linking a shared library. | ||
3294 | # | ||
3295 | # There doesn't appear to be a way to prevent this compiler from | ||
3296 | # explicitly linking system object files so we need to strip them | ||
3297 | # from the output so that they don't get included in the library | ||
3298 | # dependencies. | ||
3299 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
3300 | ;; | ||
3301 | *) | ||
3302 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | ||
3303 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | ||
3304 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' | ||
3305 | |||
3306 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
3307 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
3308 | |||
3309 | # Commands to make compiler produce verbose output that lists | ||
3310 | # what "hidden" libraries, object files and flags are used when | ||
3311 | # linking a shared library. | ||
3312 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' | ||
3313 | |||
3314 | else | ||
3315 | # FIXME: insert proper C++ library support | ||
3316 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3317 | fi | ||
3318 | ;; | ||
3319 | esac | ||
3320 | ;; | ||
3321 | psos*) | ||
3322 | # FIXME: insert proper C++ library support | ||
3323 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3324 | ;; | ||
3325 | sco*) | ||
3326 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
3327 | case $cc_basename in | ||
3328 | CC) | ||
3329 | # FIXME: insert proper C++ library support | ||
3330 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3331 | ;; | ||
3332 | *) | ||
3333 | # FIXME: insert proper C++ library support | ||
3334 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3335 | ;; | ||
3336 | esac | ||
3337 | ;; | ||
3338 | sunos4*) | ||
3339 | case $cc_basename in | ||
3340 | CC) | ||
3341 | # Sun C++ 4.x | ||
3342 | # FIXME: insert proper C++ library support | ||
3343 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3344 | ;; | ||
3345 | lcc) | ||
3346 | # Lucid | ||
3347 | # FIXME: insert proper C++ library support | ||
3348 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3349 | ;; | ||
3350 | *) | ||
3351 | # FIXME: insert proper C++ library support | ||
3352 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3353 | ;; | ||
3354 | esac | ||
3355 | ;; | ||
3356 | solaris*) | ||
3357 | case $cc_basename in | ||
3358 | CC) | ||
3359 | # Sun C++ 4.2, 5.x and Centerline C++ | ||
3360 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' | ||
3361 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
3362 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
3363 | $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' | ||
3364 | |||
3365 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
3366 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
3367 | case $host_os in | ||
3368 | solaris2.[0-5] | solaris2.[0-5].*) ;; | ||
3369 | *) | ||
3370 | # The C++ compiler is used as linker so we must use $wl | ||
3371 | # flag to pass the commands to the underlying system | ||
3372 | # linker. | ||
3373 | # Supported since Solaris 2.6 (maybe 2.5.1?) | ||
3374 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | ||
3375 | ;; | ||
3376 | esac | ||
3377 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | ||
3378 | |||
3379 | # Commands to make compiler produce verbose output that lists | ||
3380 | # what "hidden" libraries, object files and flags are used when | ||
3381 | # linking a shared library. | ||
3382 | # | ||
3383 | # There doesn't appear to be a way to prevent this compiler from | ||
3384 | # explicitly linking system object files so we need to strip them | ||
3385 | # from the output so that they don't get included in the library | ||
3386 | # dependencies. | ||
3387 | output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
3388 | |||
3389 | # Archives containing C++ object files must be created using | ||
3390 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | ||
3391 | # necessary to make sure instantiated templates are included | ||
3392 | # in the archive. | ||
3393 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' | ||
3394 | ;; | ||
3395 | gcx) | ||
3396 | # Green Hills C++ Compiler | ||
3397 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
3398 | |||
3399 | # The C++ compiler must be used to create the archive. | ||
3400 | _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' | ||
3401 | ;; | ||
3402 | *) | ||
3403 | # GNU C++ compiler with Solaris linker | ||
3404 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | ||
3405 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' | ||
3406 | if $CC --version | grep -v '^2\.7' > /dev/null; then | ||
3407 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
3408 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
3409 | $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' | ||
3410 | |||
3411 | # Commands to make compiler produce verbose output that lists | ||
3412 | # what "hidden" libraries, object files and flags are used when | ||
3413 | # linking a shared library. | ||
3414 | output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" | ||
3415 | else | ||
3416 | # g++ 2.7 appears to require `-G' NOT `-shared' on this | ||
3417 | # platform. | ||
3418 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
3419 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
3420 | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' | ||
3421 | |||
3422 | # Commands to make compiler produce verbose output that lists | ||
3423 | # what "hidden" libraries, object files and flags are used when | ||
3424 | # linking a shared library. | ||
3425 | output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" | ||
3426 | fi | ||
3427 | |||
3428 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' | ||
3429 | fi | ||
3430 | ;; | ||
3431 | esac | ||
3432 | ;; | ||
3433 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) | ||
3434 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
3435 | ;; | ||
3436 | tandem*) | ||
3437 | case $cc_basename in | ||
3438 | NCC) | ||
3439 | # NonStop-UX NCC 3.20 | ||
3440 | # FIXME: insert proper C++ library support | ||
3441 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3442 | ;; | ||
3443 | *) | ||
3444 | # FIXME: insert proper C++ library support | ||
3445 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3446 | ;; | ||
3447 | esac | ||
3448 | ;; | ||
3449 | vxworks*) | ||
3450 | # FIXME: insert proper C++ library support | ||
3451 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3452 | ;; | ||
3453 | *) | ||
3454 | # FIXME: insert proper C++ library support | ||
3455 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
3456 | ;; | ||
3457 | esac | ||
3458 | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) | ||
3459 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | ||
3460 | |||
3461 | _LT_AC_TAGVAR(GCC, $1)="$GXX" | ||
3462 | _LT_AC_TAGVAR(LD, $1)="$LD" | ||
3463 | |||
3464 | AC_LIBTOOL_POSTDEP_PREDEP($1) | ||
3465 | AC_LIBTOOL_PROG_COMPILER_PIC($1) | ||
3466 | AC_LIBTOOL_PROG_CC_C_O($1) | ||
3467 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | ||
3468 | AC_LIBTOOL_PROG_LD_SHLIBS($1) | ||
3469 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | ||
3470 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | ||
3471 | AC_LIBTOOL_SYS_LIB_STRIP | ||
3472 | AC_LIBTOOL_DLOPEN_SELF($1) | ||
3473 | |||
3474 | AC_LIBTOOL_CONFIG($1) | ||
3475 | |||
3476 | AC_LANG_POP | ||
3477 | CC=$lt_save_CC | ||
3478 | LDCXX=$LD | ||
3479 | LD=$lt_save_LD | ||
3480 | GCC=$lt_save_GCC | ||
3481 | with_gnu_ldcxx=$with_gnu_ld | ||
3482 | with_gnu_ld=$lt_save_with_gnu_ld | ||
3483 | lt_cv_path_LDCXX=$lt_cv_path_LD | ||
3484 | lt_cv_path_LD=$lt_save_path_LD | ||
3485 | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld | ||
3486 | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld | ||
3487 | ])# AC_LIBTOOL_LANG_CXX_CONFIG | ||
3488 | |||
3489 | # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) | ||
3490 | # ------------------------ | ||
3491 | # Figure out "hidden" library dependencies from verbose | ||
3492 | # compiler output when linking a shared library. | ||
3493 | # Parse the compiler output and extract the necessary | ||
3494 | # objects, libraries and library flags. | ||
3495 | AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ | ||
3496 | dnl we can't use the lt_simple_compile_test_code here, | ||
3497 | dnl because it contains code intended for an executable, | ||
3498 | dnl not a library. It's possible we should let each | ||
3499 | dnl tag define a new lt_????_link_test_code variable, | ||
3500 | dnl but it's only used here... | ||
3501 | ifelse([$1],[],[cat > conftest.$ac_ext <<EOF | ||
3502 | int a; | ||
3503 | void foo (void) { a = 0; } | ||
3504 | EOF | ||
3505 | ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF | ||
3506 | class Foo | ||
3507 | { | ||
3508 | public: | ||
3509 | Foo (void) { a = 0; } | ||
3510 | private: | ||
3511 | int a; | ||
3512 | }; | ||
3513 | EOF | ||
3514 | ],[$1],[F77],[cat > conftest.$ac_ext <<EOF | ||
3515 | subroutine foo | ||
3516 | implicit none | ||
3517 | integer*4 a | ||
3518 | a=0 | ||
3519 | return | ||
3520 | end | ||
3521 | EOF | ||
3522 | ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF | ||
3523 | public class foo { | ||
3524 | private int a; | ||
3525 | public void bar (void) { | ||
3526 | a = 0; | ||
3527 | } | ||
3528 | }; | ||
3529 | EOF | ||
3530 | ]) | ||
3531 | dnl Parse the compiler output and extract the necessary | ||
3532 | dnl objects, libraries and library flags. | ||
3533 | if AC_TRY_EVAL(ac_compile); then | ||
3534 | # Parse the compiler output and extract the necessary | ||
3535 | # objects, libraries and library flags. | ||
3536 | |||
3537 | # Sentinel used to keep track of whether or not we are before | ||
3538 | # the conftest object file. | ||
3539 | pre_test_object_deps_done=no | ||
3540 | |||
3541 | # The `*' in the case matches for architectures that use `case' in | ||
3542 | # $output_verbose_cmd can trigger glob expansion during the loop | ||
3543 | # eval without this substitution. | ||
3544 | output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" | ||
3545 | |||
3546 | for p in `eval $output_verbose_link_cmd`; do | ||
3547 | case $p in | ||
3548 | |||
3549 | -L* | -R* | -l*) | ||
3550 | # Some compilers place space between "-{L,R}" and the path. | ||
3551 | # Remove the space. | ||
3552 | if test $p = "-L" \ | ||
3553 | || test $p = "-R"; then | ||
3554 | prev=$p | ||
3555 | continue | ||
3556 | else | ||
3557 | prev= | ||
3558 | fi | ||
3559 | |||
3560 | if test "$pre_test_object_deps_done" = no; then | ||
3561 | case $p in | ||
3562 | -L* | -R*) | ||
3563 | # Internal compiler library paths should come after those | ||
3564 | # provided the user. The postdeps already come after the | ||
3565 | # user supplied libs so there is no need to process them. | ||
3566 | if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then | ||
3567 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" | ||
3568 | else | ||
3569 | _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" | ||
3570 | fi | ||
3571 | ;; | ||
3572 | # The "-l" case would never come before the object being | ||
3573 | # linked, so don't bother handling this case. | ||
3574 | esac | ||
3575 | else | ||
3576 | if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then | ||
3577 | _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}" | ||
3578 | else | ||
3579 | _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}" | ||
3580 | fi | ||
3581 | fi | ||
3582 | ;; | ||
3583 | |||
3584 | *.$objext) | ||
3585 | # This assumes that the test object file only shows up | ||
3586 | # once in the compiler output. | ||
3587 | if test "$p" = "conftest.$objext"; then | ||
3588 | pre_test_object_deps_done=yes | ||
3589 | continue | ||
3590 | fi | ||
3591 | |||
3592 | if test "$pre_test_object_deps_done" = no; then | ||
3593 | if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then | ||
3594 | _LT_AC_TAGVAR(predep_objects, $1)="$p" | ||
3595 | else | ||
3596 | _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p" | ||
3597 | fi | ||
3598 | else | ||
3599 | if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then | ||
3600 | _LT_AC_TAGVAR(postdep_objects, $1)="$p" | ||
3601 | else | ||
3602 | _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p" | ||
3603 | fi | ||
3604 | fi | ||
3605 | ;; | ||
3606 | |||
3607 | *) ;; # Ignore the rest. | ||
3608 | |||
3609 | esac | ||
3610 | done | ||
3611 | |||
3612 | # Clean up. | ||
3613 | rm -f a.out a.exe | ||
3614 | else | ||
3615 | echo "libtool.m4: error: problem compiling $1 test program" | ||
3616 | fi | ||
3617 | |||
3618 | $rm -f confest.$objext | ||
3619 | |||
3620 | case " $_LT_AC_TAGVAR(postdeps, $1) " in | ||
3621 | *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; | ||
3622 | esac | ||
3623 | ])# AC_LIBTOOL_POSTDEP_PREDEP | ||
3624 | |||
3625 | # AC_LIBTOOL_LANG_F77_CONFIG | ||
3626 | # ------------------------ | ||
3627 | # Ensure that the configuration vars for the C compiler are | ||
3628 | # suitably defined. Those variables are subsequently used by | ||
3629 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | ||
3630 | AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) | ||
3631 | AC_DEFUN([_LT_AC_LANG_F77_CONFIG], | ||
3632 | [AC_REQUIRE([AC_PROG_F77]) | ||
3633 | AC_LANG_PUSH(Fortran 77) | ||
3634 | |||
3635 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
3636 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= | ||
3637 | _LT_AC_TAGVAR(always_export_symbols, $1)=no | ||
3638 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= | ||
3639 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= | ||
3640 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
3641 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
3642 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= | ||
3643 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | ||
3644 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no | ||
3645 | _LT_AC_TAGVAR(hardcode_automatic, $1)=no | ||
3646 | _LT_AC_TAGVAR(module_cmds, $1)= | ||
3647 | _LT_AC_TAGVAR(module_expsym_cmds, $1)= | ||
3648 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown | ||
3649 | _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds | ||
3650 | _LT_AC_TAGVAR(no_undefined_flag, $1)= | ||
3651 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | ||
3652 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
3653 | |||
3654 | # Source file extension for f77 test sources. | ||
3655 | ac_ext=f | ||
3656 | |||
3657 | # Object file extension for compiled f77 test sources. | ||
3658 | objext=o | ||
3659 | _LT_AC_TAGVAR(objext, $1)=$objext | ||
3660 | |||
3661 | # Code to be used in simple compile tests | ||
3662 | lt_simple_compile_test_code=" subroutine t\n return\n end\n" | ||
3663 | |||
3664 | # Code to be used in simple link tests | ||
3665 | lt_simple_link_test_code=" program t\n end\n" | ||
3666 | |||
3667 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
3668 | _LT_AC_SYS_COMPILER | ||
3669 | |||
3670 | # Allow CC to be a program name with arguments. | ||
3671 | lt_save_CC="$CC" | ||
3672 | CC=${F77-"f77"} | ||
3673 | compiler=$CC | ||
3674 | _LT_AC_TAGVAR(compiler, $1)=$CC | ||
3675 | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` | ||
3676 | |||
3677 | AC_MSG_CHECKING([if libtool supports shared libraries]) | ||
3678 | AC_MSG_RESULT([$can_build_shared]) | ||
3679 | |||
3680 | AC_MSG_CHECKING([whether to build shared libraries]) | ||
3681 | test "$can_build_shared" = "no" && enable_shared=no | ||
3682 | |||
3683 | # On AIX, shared libraries and static libraries use the same namespace, and | ||
3684 | # are all built from PIC. | ||
3685 | case "$host_os" in | ||
3686 | aix3*) | ||
3687 | test "$enable_shared" = yes && enable_static=no | ||
3688 | if test -n "$RANLIB"; then | ||
3689 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | ||
3690 | postinstall_cmds='$RANLIB $lib' | ||
3691 | fi | ||
3692 | ;; | ||
3693 | aix4* | aix5*) | ||
3694 | test "$enable_shared" = yes && enable_static=no | ||
3695 | ;; | ||
3696 | esac | ||
3697 | AC_MSG_RESULT([$enable_shared]) | ||
3698 | |||
3699 | AC_MSG_CHECKING([whether to build static libraries]) | ||
3700 | # Make sure either enable_shared or enable_static is yes. | ||
3701 | test "$enable_shared" = yes || enable_static=yes | ||
3702 | AC_MSG_RESULT([$enable_static]) | ||
3703 | |||
3704 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | ||
3705 | |||
3706 | _LT_AC_TAGVAR(GCC, $1)="$G77" | ||
3707 | _LT_AC_TAGVAR(LD, $1)="$LD" | ||
3708 | |||
3709 | AC_LIBTOOL_PROG_COMPILER_PIC($1) | ||
3710 | AC_LIBTOOL_PROG_CC_C_O($1) | ||
3711 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | ||
3712 | AC_LIBTOOL_PROG_LD_SHLIBS($1) | ||
3713 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | ||
3714 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | ||
3715 | AC_LIBTOOL_SYS_LIB_STRIP | ||
3716 | |||
3717 | |||
3718 | AC_LIBTOOL_CONFIG($1) | ||
3719 | |||
3720 | AC_LANG_POP | ||
3721 | CC="$lt_save_CC" | ||
3722 | ])# AC_LIBTOOL_LANG_F77_CONFIG | ||
3723 | |||
3724 | |||
3725 | # AC_LIBTOOL_LANG_GCJ_CONFIG | ||
3726 | # -------------------------- | ||
3727 | # Ensure that the configuration vars for the C compiler are | ||
3728 | # suitably defined. Those variables are subsequently used by | ||
3729 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | ||
3730 | AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) | ||
3731 | AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], | ||
3732 | [AC_LANG_SAVE | ||
3733 | |||
3734 | # Source file extension for Java test sources. | ||
3735 | ac_ext=java | ||
3736 | |||
3737 | # Object file extension for compiled Java test sources. | ||
3738 | objext=o | ||
3739 | _LT_AC_TAGVAR(objext, $1)=$objext | ||
3740 | |||
3741 | # Code to be used in simple compile tests | ||
3742 | lt_simple_compile_test_code="class foo {}\n" | ||
3743 | |||
3744 | # Code to be used in simple link tests | ||
3745 | lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' | ||
3746 | |||
3747 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
3748 | _LT_AC_SYS_COMPILER | ||
3749 | |||
3750 | # Allow CC to be a program name with arguments. | ||
3751 | lt_save_CC="$CC" | ||
3752 | CC=${GCJ-"gcj"} | ||
3753 | compiler=$CC | ||
3754 | _LT_AC_TAGVAR(compiler, $1)=$CC | ||
3755 | |||
3756 | # GCJ did not exist at the time GCC didn't implicitly link libc in. | ||
3757 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
3758 | |||
3759 | AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) | ||
3760 | AC_LIBTOOL_PROG_COMPILER_PIC($1) | ||
3761 | AC_LIBTOOL_PROG_CC_C_O($1) | ||
3762 | AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) | ||
3763 | AC_LIBTOOL_PROG_LD_SHLIBS($1) | ||
3764 | AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) | ||
3765 | AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) | ||
3766 | AC_LIBTOOL_SYS_LIB_STRIP | ||
3767 | AC_LIBTOOL_DLOPEN_SELF($1) | ||
3768 | |||
3769 | AC_LIBTOOL_CONFIG($1) | ||
3770 | |||
3771 | AC_LANG_RESTORE | ||
3772 | CC="$lt_save_CC" | ||
3773 | ])# AC_LIBTOOL_LANG_GCJ_CONFIG | ||
3774 | |||
3775 | |||
3776 | # AC_LIBTOOL_LANG_RC_CONFIG | ||
3777 | # -------------------------- | ||
3778 | # Ensure that the configuration vars for the Windows resource compiler are | ||
3779 | # suitably defined. Those variables are subsequently used by | ||
3780 | # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. | ||
3781 | AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) | ||
3782 | AC_DEFUN([_LT_AC_LANG_RC_CONFIG], | ||
3783 | [AC_LANG_SAVE | ||
3784 | |||
3785 | # Source file extension for RC test sources. | ||
3786 | ac_ext=rc | ||
3787 | |||
3788 | # Object file extension for compiled RC test sources. | ||
3789 | objext=o | ||
3790 | _LT_AC_TAGVAR(objext, $1)=$objext | ||
3791 | |||
3792 | # Code to be used in simple compile tests | ||
3793 | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' | ||
3794 | |||
3795 | # Code to be used in simple link tests | ||
3796 | lt_simple_link_test_code="$lt_simple_compile_test_code" | ||
3797 | |||
3798 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
3799 | _LT_AC_SYS_COMPILER | ||
3800 | |||
3801 | # Allow CC to be a program name with arguments. | ||
3802 | lt_save_CC="$CC" | ||
3803 | CC=${RC-"windres"} | ||
3804 | compiler=$CC | ||
3805 | _LT_AC_TAGVAR(compiler, $1)=$CC | ||
3806 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes | ||
3807 | |||
3808 | AC_LIBTOOL_CONFIG($1) | ||
3809 | |||
3810 | AC_LANG_RESTORE | ||
3811 | CC="$lt_save_CC" | ||
3812 | ])# AC_LIBTOOL_LANG_RC_CONFIG | ||
3813 | |||
3814 | |||
3815 | # AC_LIBTOOL_CONFIG([TAGNAME]) | ||
3816 | # ---------------------------- | ||
3817 | # If TAGNAME is not passed, then create an initial libtool script | ||
3818 | # with a default configuration from the untagged config vars. Otherwise | ||
3819 | # add code to config.status for appending the configuration named by | ||
3820 | # TAGNAME from the matching tagged config vars. | ||
3821 | AC_DEFUN([AC_LIBTOOL_CONFIG], | ||
3822 | [# The else clause should only fire when bootstrapping the | ||
3823 | # libtool distribution, otherwise you forgot to ship ltmain.sh | ||
3824 | # with your package, and you will get complaints that there are | ||
3825 | # no rules to generate ltmain.sh. | ||
3826 | if test -f "$ltmain"; then | ||
3827 | # See if we are running on zsh, and set the options which allow our commands through | ||
3828 | # without removal of \ escapes. | ||
3829 | if test -n "${ZSH_VERSION+set}" ; then | ||
3830 | setopt NO_GLOB_SUBST | ||
3831 | fi | ||
3832 | # Now quote all the things that may contain metacharacters while being | ||
3833 | # careful not to overquote the AC_SUBSTed values. We take copies of the | ||
3834 | # variables and quote the copies for generation of the libtool script. | ||
3835 | for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ | ||
3836 | SED SHELL STRIP \ | ||
3837 | libname_spec library_names_spec soname_spec extract_expsyms_cmds \ | ||
3838 | old_striplib striplib file_magic_cmd finish_cmds finish_eval \ | ||
3839 | deplibs_check_method reload_flag reload_cmds need_locks \ | ||
3840 | lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ | ||
3841 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
3842 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | ||
3843 | old_postinstall_cmds old_postuninstall_cmds \ | ||
3844 | _LT_AC_TAGVAR(compiler, $1) \ | ||
3845 | _LT_AC_TAGVAR(CC, $1) \ | ||
3846 | _LT_AC_TAGVAR(LD, $1) \ | ||
3847 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ | ||
3848 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ | ||
3849 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ | ||
3850 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ | ||
3851 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ | ||
3852 | _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ | ||
3853 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ | ||
3854 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ | ||
3855 | _LT_AC_TAGVAR(old_archive_cmds, $1) \ | ||
3856 | _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ | ||
3857 | _LT_AC_TAGVAR(predep_objects, $1) \ | ||
3858 | _LT_AC_TAGVAR(postdep_objects, $1) \ | ||
3859 | _LT_AC_TAGVAR(predeps, $1) \ | ||
3860 | _LT_AC_TAGVAR(postdeps, $1) \ | ||
3861 | _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ | ||
3862 | _LT_AC_TAGVAR(archive_cmds, $1) \ | ||
3863 | _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ | ||
3864 | _LT_AC_TAGVAR(postinstall_cmds, $1) \ | ||
3865 | _LT_AC_TAGVAR(postuninstall_cmds, $1) \ | ||
3866 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ | ||
3867 | _LT_AC_TAGVAR(allow_undefined_flag, $1) \ | ||
3868 | _LT_AC_TAGVAR(no_undefined_flag, $1) \ | ||
3869 | _LT_AC_TAGVAR(export_symbols_cmds, $1) \ | ||
3870 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ | ||
3871 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ | ||
3872 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ | ||
3873 | _LT_AC_TAGVAR(hardcode_automatic, $1) \ | ||
3874 | _LT_AC_TAGVAR(module_cmds, $1) \ | ||
3875 | _LT_AC_TAGVAR(module_expsym_cmds, $1) \ | ||
3876 | _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ | ||
3877 | _LT_AC_TAGVAR(exclude_expsyms, $1) \ | ||
3878 | _LT_AC_TAGVAR(include_expsyms, $1); do | ||
3879 | |||
3880 | case $var in | ||
3881 | _LT_AC_TAGVAR(old_archive_cmds, $1) | \ | ||
3882 | _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ | ||
3883 | _LT_AC_TAGVAR(archive_cmds, $1) | \ | ||
3884 | _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ | ||
3885 | _LT_AC_TAGVAR(module_cmds, $1) | \ | ||
3886 | _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ | ||
3887 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ | ||
3888 | _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ | ||
3889 | extract_expsyms_cmds | reload_cmds | finish_cmds | \ | ||
3890 | postinstall_cmds | postuninstall_cmds | \ | ||
3891 | old_postinstall_cmds | old_postuninstall_cmds | \ | ||
3892 | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | ||
3893 | # Double-quote double-evaled strings. | ||
3894 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" | ||
3895 | ;; | ||
3896 | *) | ||
3897 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" | ||
3898 | ;; | ||
3899 | esac | ||
3900 | done | ||
3901 | |||
3902 | case $lt_echo in | ||
3903 | *'\[$]0 --fallback-echo"') | ||
3904 | lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` | ||
3905 | ;; | ||
3906 | esac | ||
3907 | |||
3908 | ifelse([$1], [], | ||
3909 | [cfgfile="${ofile}T" | ||
3910 | trap "$rm \"$cfgfile\"; exit 1" 1 2 15 | ||
3911 | $rm -f "$cfgfile" | ||
3912 | AC_MSG_NOTICE([creating $ofile])], | ||
3913 | [cfgfile="$ofile"]) | ||
3914 | |||
3915 | cat <<__EOF__ >> "$cfgfile" | ||
3916 | ifelse([$1], [], | ||
3917 | [#! $SHELL | ||
3918 | |||
3919 | # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. | ||
3920 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) | ||
3921 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | ||
3922 | # | ||
3923 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 | ||
3924 | # Free Software Foundation, Inc. | ||
3925 | # | ||
3926 | # This file is part of GNU Libtool: | ||
3927 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | ||
3928 | # | ||
3929 | # This program is free software; you can redistribute it and/or modify | ||
3930 | # it under the terms of the GNU General Public License as published by | ||
3931 | # the Free Software Foundation; either version 2 of the License, or | ||
3932 | # (at your option) any later version. | ||
3933 | # | ||
3934 | # This program is distributed in the hope that it will be useful, but | ||
3935 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3936 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
3937 | # General Public License for more details. | ||
3938 | # | ||
3939 | # You should have received a copy of the GNU General Public License | ||
3940 | # along with this program; if not, write to the Free Software | ||
3941 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
3942 | # | ||
3943 | # As a special exception to the GNU General Public License, if you | ||
3944 | # distribute this file as part of a program that contains a | ||
3945 | # configuration script generated by Autoconf, you may include it under | ||
3946 | # the same distribution terms that you use for the rest of that program. | ||
3947 | |||
3948 | # A sed program that does not truncate output. | ||
3949 | SED=$lt_SED | ||
3950 | |||
3951 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. | ||
3952 | Xsed="$SED -e s/^X//" | ||
3953 | |||
3954 | # The HP-UX ksh and POSIX shell print the target directory to stdout | ||
3955 | # if CDPATH is set. | ||
3956 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | ||
3957 | |||
3958 | # The names of the tagged configurations supported by this script. | ||
3959 | available_tags= | ||
3960 | |||
3961 | # ### BEGIN LIBTOOL CONFIG], | ||
3962 | [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) | ||
3963 | |||
3964 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | ||
3965 | |||
3966 | # Shell to use when invoking shell scripts. | ||
3967 | SHELL=$lt_SHELL | ||
3968 | |||
3969 | # Whether or not to build shared libraries. | ||
3970 | build_libtool_libs=$enable_shared | ||
3971 | |||
3972 | # Whether or not to build static libraries. | ||
3973 | build_old_libs=$enable_static | ||
3974 | |||
3975 | # Whether or not to add -lc for building shared libraries. | ||
3976 | build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) | ||
3977 | |||
3978 | # Whether or not to disallow shared libs when runtime libs are static | ||
3979 | allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) | ||
3980 | |||
3981 | # Whether or not to optimize for fast installation. | ||
3982 | fast_install=$enable_fast_install | ||
3983 | |||
3984 | # The host system. | ||
3985 | host_alias=$host_alias | ||
3986 | host=$host | ||
3987 | |||
3988 | # An echo program that does not interpret backslashes. | ||
3989 | echo=$lt_echo | ||
3990 | |||
3991 | # The archiver. | ||
3992 | AR=$lt_AR | ||
3993 | AR_FLAGS=$lt_AR_FLAGS | ||
3994 | |||
3995 | # A C compiler. | ||
3996 | LTCC=$lt_LTCC | ||
3997 | |||
3998 | # A language-specific compiler. | ||
3999 | CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) | ||
4000 | |||
4001 | # Is the compiler the GNU C compiler? | ||
4002 | with_gcc=$_LT_AC_TAGVAR(GCC, $1) | ||
4003 | |||
4004 | # An ERE matcher. | ||
4005 | EGREP=$lt_EGREP | ||
4006 | |||
4007 | # The linker used to build libraries. | ||
4008 | LD=$lt_[]_LT_AC_TAGVAR(LD, $1) | ||
4009 | |||
4010 | # Whether we need hard or soft links. | ||
4011 | LN_S=$lt_LN_S | ||
4012 | |||
4013 | # A BSD-compatible nm program. | ||
4014 | NM=$lt_NM | ||
4015 | |||
4016 | # A symbol stripping program | ||
4017 | STRIP=$lt_STRIP | ||
4018 | |||
4019 | # Used to examine libraries when file_magic_cmd begins "file" | ||
4020 | MAGIC_CMD=$MAGIC_CMD | ||
4021 | |||
4022 | # Used on cygwin: DLL creation program. | ||
4023 | DLLTOOL="$DLLTOOL" | ||
4024 | |||
4025 | # Used on cygwin: object dumper. | ||
4026 | OBJDUMP="$OBJDUMP" | ||
4027 | |||
4028 | # Used on cygwin: assembler. | ||
4029 | AS="$AS" | ||
4030 | |||
4031 | # The name of the directory that contains temporary libtool files. | ||
4032 | objdir=$objdir | ||
4033 | |||
4034 | # How to create reloadable object files. | ||
4035 | reload_flag=$lt_reload_flag | ||
4036 | reload_cmds=$lt_reload_cmds | ||
4037 | |||
4038 | # How to pass a linker flag through the compiler. | ||
4039 | wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) | ||
4040 | |||
4041 | # Object file suffix (normally "o"). | ||
4042 | objext="$ac_objext" | ||
4043 | |||
4044 | # Old archive suffix (normally "a"). | ||
4045 | libext="$libext" | ||
4046 | |||
4047 | # Shared library suffix (normally ".so"). | ||
4048 | shrext_cmds='$shrext_cmds' | ||
4049 | |||
4050 | # Executable file suffix (normally ""). | ||
4051 | exeext="$exeext" | ||
4052 | |||
4053 | # Additional compiler flags for building library objects. | ||
4054 | pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) | ||
4055 | pic_mode=$pic_mode | ||
4056 | |||
4057 | # What is the maximum length of a command? | ||
4058 | max_cmd_len=$lt_cv_sys_max_cmd_len | ||
4059 | |||
4060 | # Does compiler simultaneously support -c and -o options? | ||
4061 | compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) | ||
4062 | |||
4063 | # Must we lock files when doing compilation ? | ||
4064 | need_locks=$lt_need_locks | ||
4065 | |||
4066 | # Do we need the lib prefix for modules? | ||
4067 | need_lib_prefix=$need_lib_prefix | ||
4068 | |||
4069 | # Do we need a version for libraries? | ||
4070 | need_version=$need_version | ||
4071 | |||
4072 | # Whether dlopen is supported. | ||
4073 | dlopen_support=$enable_dlopen | ||
4074 | |||
4075 | # Whether dlopen of programs is supported. | ||
4076 | dlopen_self=$enable_dlopen_self | ||
4077 | |||
4078 | # Whether dlopen of statically linked programs is supported. | ||
4079 | dlopen_self_static=$enable_dlopen_self_static | ||
4080 | |||
4081 | # Compiler flag to prevent dynamic linking. | ||
4082 | link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) | ||
4083 | |||
4084 | # Compiler flag to turn off builtin functions. | ||
4085 | no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) | ||
4086 | |||
4087 | # Compiler flag to allow reflexive dlopens. | ||
4088 | export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) | ||
4089 | |||
4090 | # Compiler flag to generate shared objects directly from archives. | ||
4091 | whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) | ||
4092 | |||
4093 | # Compiler flag to generate thread-safe objects. | ||
4094 | thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) | ||
4095 | |||
4096 | # Library versioning type. | ||
4097 | version_type=$version_type | ||
4098 | |||
4099 | # Format of library name prefix. | ||
4100 | libname_spec=$lt_libname_spec | ||
4101 | |||
4102 | # List of archive names. First name is the real one, the rest are links. | ||
4103 | # The last name is the one that the linker finds with -lNAME. | ||
4104 | library_names_spec=$lt_library_names_spec | ||
4105 | |||
4106 | # The coded name of the library, if different from the real name. | ||
4107 | soname_spec=$lt_soname_spec | ||
4108 | |||
4109 | # Commands used to build and install an old-style archive. | ||
4110 | RANLIB=$lt_RANLIB | ||
4111 | old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) | ||
4112 | old_postinstall_cmds=$lt_old_postinstall_cmds | ||
4113 | old_postuninstall_cmds=$lt_old_postuninstall_cmds | ||
4114 | |||
4115 | # Create an old-style archive from a shared archive. | ||
4116 | old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | ||
4117 | |||
4118 | # Create a temporary old-style archive to link instead of a shared archive. | ||
4119 | old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | ||
4120 | |||
4121 | # Commands used to build and install a shared archive. | ||
4122 | archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) | ||
4123 | archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) | ||
4124 | postinstall_cmds=$lt_postinstall_cmds | ||
4125 | postuninstall_cmds=$lt_postuninstall_cmds | ||
4126 | |||
4127 | # Commands used to build a loadable module (assumed same as above if empty) | ||
4128 | module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) | ||
4129 | module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) | ||
4130 | |||
4131 | # Commands to strip libraries. | ||
4132 | old_striplib=$lt_old_striplib | ||
4133 | striplib=$lt_striplib | ||
4134 | |||
4135 | # Dependencies to place before the objects being linked to create a | ||
4136 | # shared library. | ||
4137 | predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) | ||
4138 | |||
4139 | # Dependencies to place after the objects being linked to create a | ||
4140 | # shared library. | ||
4141 | postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | ||
4142 | |||
4143 | # Dependencies to place before the objects being linked to create a | ||
4144 | # shared library. | ||
4145 | predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) | ||
4146 | |||
4147 | # Dependencies to place after the objects being linked to create a | ||
4148 | # shared library. | ||
4149 | postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) | ||
4150 | |||
4151 | # The library search path used internally by the compiler when linking | ||
4152 | # a shared library. | ||
4153 | compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | ||
4154 | |||
4155 | # Method to check whether dependent libraries are shared objects. | ||
4156 | deplibs_check_method=$lt_deplibs_check_method | ||
4157 | |||
4158 | # Command to use when deplibs_check_method == file_magic. | ||
4159 | file_magic_cmd=$lt_file_magic_cmd | ||
4160 | |||
4161 | # Flag that allows shared libraries with undefined symbols to be built. | ||
4162 | allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) | ||
4163 | |||
4164 | # Flag that forces no undefined symbols. | ||
4165 | no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) | ||
4166 | |||
4167 | # Commands used to finish a libtool library installation in a directory. | ||
4168 | finish_cmds=$lt_finish_cmds | ||
4169 | |||
4170 | # Same as above, but a single script fragment to be evaled but not shown. | ||
4171 | finish_eval=$lt_finish_eval | ||
4172 | |||
4173 | # Take the output of nm and produce a listing of raw symbols and C names. | ||
4174 | global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe | ||
4175 | |||
4176 | # Transform the output of nm in a proper C declaration | ||
4177 | global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl | ||
4178 | |||
4179 | # Transform the output of nm in a C name address pair | ||
4180 | global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address | ||
4181 | |||
4182 | # This is the shared library runtime path variable. | ||
4183 | runpath_var=$runpath_var | ||
4184 | |||
4185 | # This is the shared library path variable. | ||
4186 | shlibpath_var=$shlibpath_var | ||
4187 | |||
4188 | # Is shlibpath searched before the hard-coded library search path? | ||
4189 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath | ||
4190 | |||
4191 | # How to hardcode a shared library path into an executable. | ||
4192 | hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) | ||
4193 | |||
4194 | # Whether we should hardcode library paths into libraries. | ||
4195 | hardcode_into_libs=$hardcode_into_libs | ||
4196 | |||
4197 | # Flag to hardcode \$libdir into a binary during linking. | ||
4198 | # This must work even if \$libdir does not exist. | ||
4199 | hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) | ||
4200 | |||
4201 | # If ld is used when linking, flag to hardcode \$libdir into | ||
4202 | # a binary during linking. This must work even if \$libdir does | ||
4203 | # not exist. | ||
4204 | hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) | ||
4205 | |||
4206 | # Whether we need a single -rpath flag with a separated argument. | ||
4207 | hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) | ||
4208 | |||
4209 | # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the | ||
4210 | # resulting binary. | ||
4211 | hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) | ||
4212 | |||
4213 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | ||
4214 | # resulting binary. | ||
4215 | hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) | ||
4216 | |||
4217 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | ||
4218 | # the resulting binary. | ||
4219 | hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) | ||
4220 | |||
4221 | # Set to yes if building a shared library automatically hardcodes DIR into the library | ||
4222 | # and all subsequent libraries and executables linked against it. | ||
4223 | hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) | ||
4224 | |||
4225 | # Variables whose values should be saved in libtool wrapper scripts and | ||
4226 | # restored at relink time. | ||
4227 | variables_saved_for_relink="$variables_saved_for_relink" | ||
4228 | |||
4229 | # Whether libtool must link a program against all its dependency libraries. | ||
4230 | link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) | ||
4231 | |||
4232 | # Compile-time system search path for libraries | ||
4233 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec | ||
4234 | |||
4235 | # Run-time system search path for libraries | ||
4236 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec | ||
4237 | |||
4238 | # Fix the shell variable \$srcfile for the compiler. | ||
4239 | fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" | ||
4240 | |||
4241 | # Set to yes if exported symbols are required. | ||
4242 | always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) | ||
4243 | |||
4244 | # The commands to list exported symbols. | ||
4245 | export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) | ||
4246 | |||
4247 | # The commands to extract the exported symbol list from a shared archive. | ||
4248 | extract_expsyms_cmds=$lt_extract_expsyms_cmds | ||
4249 | |||
4250 | # Symbols that should not be listed in the preloaded symbols. | ||
4251 | exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) | ||
4252 | |||
4253 | # Symbols that must always be exported. | ||
4254 | include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) | ||
4255 | |||
4256 | ifelse([$1],[], | ||
4257 | [# ### END LIBTOOL CONFIG], | ||
4258 | [# ### END LIBTOOL TAG CONFIG: $tagname]) | ||
4259 | |||
4260 | __EOF__ | ||
4261 | |||
4262 | ifelse([$1],[], [ | ||
4263 | case $host_os in | ||
4264 | aix3*) | ||
4265 | cat <<\EOF >> "$cfgfile" | ||
4266 | |||
4267 | # AIX sometimes has problems with the GCC collect2 program. For some | ||
4268 | # reason, if we set the COLLECT_NAMES environment variable, the problems | ||
4269 | # vanish in a puff of smoke. | ||
4270 | if test "X${COLLECT_NAMES+set}" != Xset; then | ||
4271 | COLLECT_NAMES= | ||
4272 | export COLLECT_NAMES | ||
4273 | fi | ||
4274 | EOF | ||
4275 | ;; | ||
4276 | esac | ||
4277 | |||
4278 | # We use sed instead of cat because bash on DJGPP gets confused if | ||
4279 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | ||
4280 | # text mode, it properly converts lines to CR/LF. This bash problem | ||
4281 | # is reportedly fixed, but why not run on old versions too? | ||
4282 | sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) | ||
4283 | |||
4284 | mv -f "$cfgfile" "$ofile" || \ | ||
4285 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | ||
4286 | chmod +x "$ofile" | ||
4287 | ]) | ||
4288 | else | ||
4289 | # If there is no Makefile yet, we rely on a make rule to execute | ||
4290 | # `config.status --recheck' to rerun these tests and create the | ||
4291 | # libtool script then. | ||
4292 | ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` | ||
4293 | if test -f "$ltmain_in"; then | ||
4294 | test -f Makefile && make "$ltmain" | ||
4295 | fi | ||
4296 | fi | ||
4297 | ])# AC_LIBTOOL_CONFIG | ||
4298 | |||
4299 | |||
4300 | # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) | ||
4301 | # ------------------------------------------- | ||
4302 | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], | ||
4303 | [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl | ||
4304 | |||
4305 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= | ||
4306 | |||
4307 | if test "$GCC" = yes; then | ||
4308 | _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' | ||
4309 | |||
4310 | AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], | ||
4311 | lt_cv_prog_compiler_rtti_exceptions, | ||
4312 | [-fno-rtti -fno-exceptions], [], | ||
4313 | [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) | ||
4314 | fi | ||
4315 | ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI | ||
4316 | |||
4317 | |||
4318 | # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | ||
4319 | # --------------------------------- | ||
4320 | AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], | ||
4321 | [AC_REQUIRE([AC_CANONICAL_HOST]) | ||
4322 | AC_REQUIRE([AC_PROG_NM]) | ||
4323 | AC_REQUIRE([AC_OBJEXT]) | ||
4324 | # Check for command to grab the raw symbol name followed by C symbol from nm. | ||
4325 | AC_MSG_CHECKING([command to parse $NM output from $compiler object]) | ||
4326 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], | ||
4327 | [ | ||
4328 | # These are sane defaults that work on at least a few old systems. | ||
4329 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] | ||
4330 | |||
4331 | # Character class describing NM global symbol codes. | ||
4332 | symcode='[[BCDEGRST]]' | ||
4333 | |||
4334 | # Regexp to match symbols that can be accessed directly from C. | ||
4335 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' | ||
4336 | |||
4337 | # Transform the above into a raw symbol and a C symbol. | ||
4338 | symxfrm='\1 \2\3 \3' | ||
4339 | |||
4340 | # Transform an extracted symbol line into a proper C declaration | ||
4341 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" | ||
4342 | |||
4343 | # Transform an extracted symbol line into symbol name and symbol address | ||
4344 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" | ||
4345 | |||
4346 | # Define system-specific variables. | ||
4347 | case $host_os in | ||
4348 | aix*) | ||
4349 | symcode='[[BCDT]]' | ||
4350 | ;; | ||
4351 | cygwin* | mingw* | pw32*) | ||
4352 | symcode='[[ABCDGISTW]]' | ||
4353 | ;; | ||
4354 | hpux*) # Its linker distinguishes data from code symbols | ||
4355 | if test "$host_cpu" = ia64; then | ||
4356 | symcode='[[ABCDEGRST]]' | ||
4357 | fi | ||
4358 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | ||
4359 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" | ||
4360 | ;; | ||
4361 | irix* | nonstopux*) | ||
4362 | symcode='[[BCDEGRST]]' | ||
4363 | ;; | ||
4364 | osf*) | ||
4365 | symcode='[[BCDEGQRST]]' | ||
4366 | ;; | ||
4367 | solaris* | sysv5*) | ||
4368 | symcode='[[BDRT]]' | ||
4369 | ;; | ||
4370 | sysv4) | ||
4371 | symcode='[[DFNSTU]]' | ||
4372 | ;; | ||
4373 | esac | ||
4374 | |||
4375 | # Handle CRLF in mingw tool chain | ||
4376 | opt_cr= | ||
4377 | case $build_os in | ||
4378 | mingw*) | ||
4379 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp | ||
4380 | ;; | ||
4381 | esac | ||
4382 | |||
4383 | # If we're using GNU nm, then use its standard symbol codes. | ||
4384 | case `$NM -V 2>&1` in | ||
4385 | *GNU* | *'with BFD'*) | ||
4386 | symcode='[[ABCDGIRSTW]]' ;; | ||
4387 | esac | ||
4388 | |||
4389 | # Try without a prefix undercore, then with it. | ||
4390 | for ac_symprfx in "" "_"; do | ||
4391 | |||
4392 | # Write the raw and C identifiers. | ||
4393 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" | ||
4394 | |||
4395 | # Check to see that the pipe works correctly. | ||
4396 | pipe_works=no | ||
4397 | |||
4398 | rm -f conftest* | ||
4399 | cat > conftest.$ac_ext <<EOF | ||
4400 | #ifdef __cplusplus | ||
4401 | extern "C" { | ||
4402 | #endif | ||
4403 | char nm_test_var; | ||
4404 | void nm_test_func(){} | ||
4405 | #ifdef __cplusplus | ||
4406 | } | ||
4407 | #endif | ||
4408 | int main(){nm_test_var='a';nm_test_func();return(0);} | ||
4409 | EOF | ||
4410 | |||
4411 | if AC_TRY_EVAL(ac_compile); then | ||
4412 | # Now try to grab the symbols. | ||
4413 | nlist=conftest.nm | ||
4414 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then | ||
4415 | # Try sorting and uniquifying the output. | ||
4416 | if sort "$nlist" | uniq > "$nlist"T; then | ||
4417 | mv -f "$nlist"T "$nlist" | ||
4418 | else | ||
4419 | rm -f "$nlist"T | ||
4420 | fi | ||
4421 | |||
4422 | # Make sure that we snagged all the symbols we need. | ||
4423 | if grep ' nm_test_var$' "$nlist" >/dev/null; then | ||
4424 | if grep ' nm_test_func$' "$nlist" >/dev/null; then | ||
4425 | cat <<EOF > conftest.$ac_ext | ||
4426 | #ifdef __cplusplus | ||
4427 | extern "C" { | ||
4428 | #endif | ||
4429 | |||
4430 | EOF | ||
4431 | # Now generate the symbol file. | ||
4432 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' | ||
4433 | |||
4434 | cat <<EOF >> conftest.$ac_ext | ||
4435 | #if defined (__STDC__) && __STDC__ | ||
4436 | # define lt_ptr_t void * | ||
4437 | #else | ||
4438 | # define lt_ptr_t char * | ||
4439 | # define const | ||
4440 | #endif | ||
4441 | |||
4442 | /* The mapping between symbol names and symbols. */ | ||
4443 | const struct { | ||
4444 | const char *name; | ||
4445 | lt_ptr_t address; | ||
4446 | } | ||
4447 | lt_preloaded_symbols[[]] = | ||
4448 | { | ||
4449 | EOF | ||
4450 | $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext | ||
4451 | cat <<\EOF >> conftest.$ac_ext | ||
4452 | {0, (lt_ptr_t) 0} | ||
4453 | }; | ||
4454 | |||
4455 | #ifdef __cplusplus | ||
4456 | } | ||
4457 | #endif | ||
4458 | EOF | ||
4459 | # Now try linking the two files. | ||
4460 | mv conftest.$ac_objext conftstm.$ac_objext | ||
4461 | lt_save_LIBS="$LIBS" | ||
4462 | lt_save_CFLAGS="$CFLAGS" | ||
4463 | LIBS="conftstm.$ac_objext" | ||
4464 | CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" | ||
4465 | if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then | ||
4466 | pipe_works=yes | ||
4467 | fi | ||
4468 | LIBS="$lt_save_LIBS" | ||
4469 | CFLAGS="$lt_save_CFLAGS" | ||
4470 | else | ||
4471 | echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD | ||
4472 | fi | ||
4473 | else | ||
4474 | echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD | ||
4475 | fi | ||
4476 | else | ||
4477 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD | ||
4478 | fi | ||
4479 | else | ||
4480 | echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD | ||
4481 | cat conftest.$ac_ext >&5 | ||
4482 | fi | ||
4483 | rm -f conftest* conftst* | ||
4484 | |||
4485 | # Do not use the global_symbol_pipe unless it works. | ||
4486 | if test "$pipe_works" = yes; then | ||
4487 | break | ||
4488 | else | ||
4489 | lt_cv_sys_global_symbol_pipe= | ||
4490 | fi | ||
4491 | done | ||
4492 | ]) | ||
4493 | if test -z "$lt_cv_sys_global_symbol_pipe"; then | ||
4494 | lt_cv_sys_global_symbol_to_cdecl= | ||
4495 | fi | ||
4496 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then | ||
4497 | AC_MSG_RESULT(failed) | ||
4498 | else | ||
4499 | AC_MSG_RESULT(ok) | ||
4500 | fi | ||
4501 | ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | ||
4502 | |||
4503 | |||
4504 | # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) | ||
4505 | # --------------------------------------- | ||
4506 | AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], | ||
4507 | [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= | ||
4508 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4509 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= | ||
4510 | |||
4511 | AC_MSG_CHECKING([for $compiler option to produce PIC]) | ||
4512 | ifelse([$1],[CXX],[ | ||
4513 | # C++ specific cases for pic, static, wl, etc. | ||
4514 | if test "$GXX" = yes; then | ||
4515 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4516 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4517 | |||
4518 | case $host_os in | ||
4519 | aix*) | ||
4520 | # All AIX code is PIC. | ||
4521 | if test "$host_cpu" = ia64; then | ||
4522 | # AIX 5 now supports IA64 processor | ||
4523 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4524 | fi | ||
4525 | ;; | ||
4526 | amigaos*) | ||
4527 | # FIXME: we need at least 68020 code to build shared libraries, but | ||
4528 | # adding the `-m68020' flag to GCC prevents building anything better, | ||
4529 | # like `-m68040'. | ||
4530 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | ||
4531 | ;; | ||
4532 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | ||
4533 | # PIC is the default for these OSes. | ||
4534 | ;; | ||
4535 | mingw* | os2* | pw32*) | ||
4536 | # This hack is so that the source file can tell whether it is being | ||
4537 | # built for inclusion in a dll (and should export symbols for example). | ||
4538 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' | ||
4539 | ;; | ||
4540 | darwin* | rhapsody*) | ||
4541 | # PIC is the default on this platform | ||
4542 | # Common symbols not allowed in MH_DYLIB files | ||
4543 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | ||
4544 | ;; | ||
4545 | *djgpp*) | ||
4546 | # DJGPP does not support shared libraries at all | ||
4547 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4548 | ;; | ||
4549 | sysv4*MP*) | ||
4550 | if test -d /usr/nec; then | ||
4551 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | ||
4552 | fi | ||
4553 | ;; | ||
4554 | hpux*) | ||
4555 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
4556 | # not for PA HP-UX. | ||
4557 | case "$host_cpu" in | ||
4558 | hppa*64*|ia64*) | ||
4559 | ;; | ||
4560 | *) | ||
4561 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4562 | ;; | ||
4563 | esac | ||
4564 | ;; | ||
4565 | *) | ||
4566 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4567 | ;; | ||
4568 | esac | ||
4569 | else | ||
4570 | case $host_os in | ||
4571 | aix4* | aix5*) | ||
4572 | # All AIX code is PIC. | ||
4573 | if test "$host_cpu" = ia64; then | ||
4574 | # AIX 5 now supports IA64 processor | ||
4575 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4576 | else | ||
4577 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | ||
4578 | fi | ||
4579 | ;; | ||
4580 | chorus*) | ||
4581 | case $cc_basename in | ||
4582 | cxch68) | ||
4583 | # Green Hills C++ Compiler | ||
4584 | # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" | ||
4585 | ;; | ||
4586 | esac | ||
4587 | ;; | ||
4588 | dgux*) | ||
4589 | case $cc_basename in | ||
4590 | ec++) | ||
4591 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4592 | ;; | ||
4593 | ghcx) | ||
4594 | # Green Hills C++ Compiler | ||
4595 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
4596 | ;; | ||
4597 | *) | ||
4598 | ;; | ||
4599 | esac | ||
4600 | ;; | ||
4601 | freebsd* | kfreebsd*-gnu) | ||
4602 | # FreeBSD uses GNU C++ | ||
4603 | ;; | ||
4604 | hpux9* | hpux10* | hpux11*) | ||
4605 | case $cc_basename in | ||
4606 | CC) | ||
4607 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4608 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" | ||
4609 | if test "$host_cpu" != ia64; then | ||
4610 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | ||
4611 | fi | ||
4612 | ;; | ||
4613 | aCC) | ||
4614 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4615 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" | ||
4616 | case "$host_cpu" in | ||
4617 | hppa*64*|ia64*) | ||
4618 | # +Z the default | ||
4619 | ;; | ||
4620 | *) | ||
4621 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | ||
4622 | ;; | ||
4623 | esac | ||
4624 | ;; | ||
4625 | *) | ||
4626 | ;; | ||
4627 | esac | ||
4628 | ;; | ||
4629 | irix5* | irix6* | nonstopux*) | ||
4630 | case $cc_basename in | ||
4631 | CC) | ||
4632 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4633 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4634 | # CC pic flag -KPIC is the default. | ||
4635 | ;; | ||
4636 | *) | ||
4637 | ;; | ||
4638 | esac | ||
4639 | ;; | ||
4640 | linux*) | ||
4641 | case $cc_basename in | ||
4642 | KCC) | ||
4643 | # KAI C++ Compiler | ||
4644 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | ||
4645 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4646 | ;; | ||
4647 | icpc) | ||
4648 | # Intel C++ | ||
4649 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4650 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4651 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4652 | ;; | ||
4653 | cxx) | ||
4654 | # Compaq C++ | ||
4655 | # Make sure the PIC flag is empty. It appears that all Alpha | ||
4656 | # Linux and Compaq Tru64 Unix objects are PIC. | ||
4657 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4658 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4659 | ;; | ||
4660 | *) | ||
4661 | ;; | ||
4662 | esac | ||
4663 | ;; | ||
4664 | lynxos*) | ||
4665 | ;; | ||
4666 | m88k*) | ||
4667 | ;; | ||
4668 | mvs*) | ||
4669 | case $cc_basename in | ||
4670 | cxx) | ||
4671 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' | ||
4672 | ;; | ||
4673 | *) | ||
4674 | ;; | ||
4675 | esac | ||
4676 | ;; | ||
4677 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
4678 | ;; | ||
4679 | osf3* | osf4* | osf5*) | ||
4680 | case $cc_basename in | ||
4681 | KCC) | ||
4682 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' | ||
4683 | ;; | ||
4684 | RCC) | ||
4685 | # Rational C++ 2.4.1 | ||
4686 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
4687 | ;; | ||
4688 | cxx) | ||
4689 | # Digital/Compaq C++ | ||
4690 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4691 | # Make sure the PIC flag is empty. It appears that all Alpha | ||
4692 | # Linux and Compaq Tru64 Unix objects are PIC. | ||
4693 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4694 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4695 | ;; | ||
4696 | *) | ||
4697 | ;; | ||
4698 | esac | ||
4699 | ;; | ||
4700 | psos*) | ||
4701 | ;; | ||
4702 | sco*) | ||
4703 | case $cc_basename in | ||
4704 | CC) | ||
4705 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4706 | ;; | ||
4707 | *) | ||
4708 | ;; | ||
4709 | esac | ||
4710 | ;; | ||
4711 | solaris*) | ||
4712 | case $cc_basename in | ||
4713 | CC) | ||
4714 | # Sun C++ 4.2, 5.x and Centerline C++ | ||
4715 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4716 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4717 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | ||
4718 | ;; | ||
4719 | gcx) | ||
4720 | # Green Hills C++ Compiler | ||
4721 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | ||
4722 | ;; | ||
4723 | *) | ||
4724 | ;; | ||
4725 | esac | ||
4726 | ;; | ||
4727 | sunos4*) | ||
4728 | case $cc_basename in | ||
4729 | CC) | ||
4730 | # Sun C++ 4.x | ||
4731 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
4732 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4733 | ;; | ||
4734 | lcc) | ||
4735 | # Lucid | ||
4736 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
4737 | ;; | ||
4738 | *) | ||
4739 | ;; | ||
4740 | esac | ||
4741 | ;; | ||
4742 | tandem*) | ||
4743 | case $cc_basename in | ||
4744 | NCC) | ||
4745 | # NonStop-UX NCC 3.20 | ||
4746 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4747 | ;; | ||
4748 | *) | ||
4749 | ;; | ||
4750 | esac | ||
4751 | ;; | ||
4752 | unixware*) | ||
4753 | ;; | ||
4754 | vxworks*) | ||
4755 | ;; | ||
4756 | *) | ||
4757 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
4758 | ;; | ||
4759 | esac | ||
4760 | fi | ||
4761 | ], | ||
4762 | [ | ||
4763 | if test "$GCC" = yes; then | ||
4764 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4765 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4766 | |||
4767 | case $host_os in | ||
4768 | aix*) | ||
4769 | # All AIX code is PIC. | ||
4770 | if test "$host_cpu" = ia64; then | ||
4771 | # AIX 5 now supports IA64 processor | ||
4772 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4773 | fi | ||
4774 | ;; | ||
4775 | |||
4776 | amigaos*) | ||
4777 | # FIXME: we need at least 68020 code to build shared libraries, but | ||
4778 | # adding the `-m68020' flag to GCC prevents building anything better, | ||
4779 | # like `-m68040'. | ||
4780 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' | ||
4781 | ;; | ||
4782 | |||
4783 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | ||
4784 | # PIC is the default for these OSes. | ||
4785 | ;; | ||
4786 | |||
4787 | mingw* | pw32* | os2*) | ||
4788 | # This hack is so that the source file can tell whether it is being | ||
4789 | # built for inclusion in a dll (and should export symbols for example). | ||
4790 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' | ||
4791 | ;; | ||
4792 | |||
4793 | darwin* | rhapsody*) | ||
4794 | # PIC is the default on this platform | ||
4795 | # Common symbols not allowed in MH_DYLIB files | ||
4796 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' | ||
4797 | ;; | ||
4798 | |||
4799 | msdosdjgpp*) | ||
4800 | # Just because we use GCC doesn't mean we suddenly get shared libraries | ||
4801 | # on systems that don't support them. | ||
4802 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
4803 | enable_shared=no | ||
4804 | ;; | ||
4805 | |||
4806 | sysv4*MP*) | ||
4807 | if test -d /usr/nec; then | ||
4808 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic | ||
4809 | fi | ||
4810 | ;; | ||
4811 | |||
4812 | hpux*) | ||
4813 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
4814 | # not for PA HP-UX. | ||
4815 | case "$host_cpu" in | ||
4816 | hppa*64*|ia64*) | ||
4817 | # +Z the default | ||
4818 | ;; | ||
4819 | *) | ||
4820 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4821 | ;; | ||
4822 | esac | ||
4823 | ;; | ||
4824 | |||
4825 | *) | ||
4826 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' | ||
4827 | ;; | ||
4828 | esac | ||
4829 | else | ||
4830 | # PORTME Check for flag to pass linker flags through the system compiler. | ||
4831 | case $host_os in | ||
4832 | aix*) | ||
4833 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4834 | if test "$host_cpu" = ia64; then | ||
4835 | # AIX 5 now supports IA64 processor | ||
4836 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4837 | else | ||
4838 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' | ||
4839 | fi | ||
4840 | ;; | ||
4841 | |||
4842 | mingw* | pw32* | os2*) | ||
4843 | # This hack is so that the source file can tell whether it is being | ||
4844 | # built for inclusion in a dll (and should export symbols for example). | ||
4845 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' | ||
4846 | ;; | ||
4847 | |||
4848 | hpux9* | hpux10* | hpux11*) | ||
4849 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4850 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
4851 | # not for PA HP-UX. | ||
4852 | case "$host_cpu" in | ||
4853 | hppa*64*|ia64*) | ||
4854 | # +Z the default | ||
4855 | ;; | ||
4856 | *) | ||
4857 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' | ||
4858 | ;; | ||
4859 | esac | ||
4860 | # Is there a better lt_prog_compiler_static that works with the bundled CC? | ||
4861 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' | ||
4862 | ;; | ||
4863 | |||
4864 | irix5* | irix6* | nonstopux*) | ||
4865 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4866 | # PIC (with -KPIC) is the default. | ||
4867 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4868 | ;; | ||
4869 | |||
4870 | newsos6) | ||
4871 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4872 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4873 | ;; | ||
4874 | |||
4875 | linux*) | ||
4876 | case $CC in | ||
4877 | icc* | ecc*) | ||
4878 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4879 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4880 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' | ||
4881 | ;; | ||
4882 | ccc*) | ||
4883 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4884 | # All Alpha code is PIC. | ||
4885 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4886 | ;; | ||
4887 | esac | ||
4888 | ;; | ||
4889 | |||
4890 | osf3* | osf4* | osf5*) | ||
4891 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4892 | # All OSF/1 code is PIC. | ||
4893 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' | ||
4894 | ;; | ||
4895 | |||
4896 | sco3.2v5*) | ||
4897 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' | ||
4898 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' | ||
4899 | ;; | ||
4900 | |||
4901 | solaris*) | ||
4902 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4903 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4904 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4905 | ;; | ||
4906 | |||
4907 | sunos4*) | ||
4908 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' | ||
4909 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' | ||
4910 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4911 | ;; | ||
4912 | |||
4913 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
4914 | _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' | ||
4915 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' | ||
4916 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4917 | ;; | ||
4918 | |||
4919 | sysv4*MP*) | ||
4920 | if test -d /usr/nec ;then | ||
4921 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' | ||
4922 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4923 | fi | ||
4924 | ;; | ||
4925 | |||
4926 | uts4*) | ||
4927 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' | ||
4928 | _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' | ||
4929 | ;; | ||
4930 | |||
4931 | *) | ||
4932 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no | ||
4933 | ;; | ||
4934 | esac | ||
4935 | fi | ||
4936 | ]) | ||
4937 | AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) | ||
4938 | |||
4939 | # | ||
4940 | # Check to make sure the PIC flag actually works. | ||
4941 | # | ||
4942 | if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then | ||
4943 | AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], | ||
4944 | _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), | ||
4945 | [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], | ||
4946 | [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in | ||
4947 | "" | " "*) ;; | ||
4948 | *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; | ||
4949 | esac], | ||
4950 | [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4951 | _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) | ||
4952 | fi | ||
4953 | case "$host_os" in | ||
4954 | # For platforms which do not support PIC, -DPIC is meaningless: | ||
4955 | *djgpp*) | ||
4956 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= | ||
4957 | ;; | ||
4958 | *) | ||
4959 | _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" | ||
4960 | ;; | ||
4961 | esac | ||
4962 | ]) | ||
4963 | |||
4964 | |||
4965 | # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) | ||
4966 | # ------------------------------------ | ||
4967 | # See if the linker supports building shared libraries. | ||
4968 | AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], | ||
4969 | [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) | ||
4970 | ifelse([$1],[CXX],[ | ||
4971 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
4972 | case $host_os in | ||
4973 | aix4* | aix5*) | ||
4974 | # If we're using GNU nm, then we don't want the "-C" option. | ||
4975 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | ||
4976 | if $NM -V 2>&1 | grep 'GNU' > /dev/null; then | ||
4977 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' | ||
4978 | else | ||
4979 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' | ||
4980 | fi | ||
4981 | ;; | ||
4982 | pw32*) | ||
4983 | _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" | ||
4984 | ;; | ||
4985 | cygwin* | mingw*) | ||
4986 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' | ||
4987 | ;; | ||
4988 | linux*) | ||
4989 | _LT_AC_TAGVAR(link_all_deplibs, $1)=no | ||
4990 | ;; | ||
4991 | *) | ||
4992 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
4993 | ;; | ||
4994 | esac | ||
4995 | ],[ | ||
4996 | runpath_var= | ||
4997 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= | ||
4998 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no | ||
4999 | _LT_AC_TAGVAR(archive_cmds, $1)= | ||
5000 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)= | ||
5001 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= | ||
5002 | _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= | ||
5003 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= | ||
5004 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | ||
5005 | _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= | ||
5006 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
5007 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= | ||
5008 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | ||
5009 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
5010 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no | ||
5011 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | ||
5012 | _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown | ||
5013 | _LT_AC_TAGVAR(hardcode_automatic, $1)=no | ||
5014 | _LT_AC_TAGVAR(module_cmds, $1)= | ||
5015 | _LT_AC_TAGVAR(module_expsym_cmds, $1)= | ||
5016 | _LT_AC_TAGVAR(always_export_symbols, $1)=no | ||
5017 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
5018 | # include_expsyms should be a list of space-separated symbols to be *always* | ||
5019 | # included in the symbol list | ||
5020 | _LT_AC_TAGVAR(include_expsyms, $1)= | ||
5021 | # exclude_expsyms can be an extended regexp of symbols to exclude | ||
5022 | # it will be wrapped by ` (' and `)$', so one must not match beginning or | ||
5023 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | ||
5024 | # as well as any symbol that contains `d'. | ||
5025 | _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" | ||
5026 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | ||
5027 | # platforms (ab)use it in PIC code, but their linkers get confused if | ||
5028 | # the symbol is explicitly referenced. Since portable code cannot | ||
5029 | # rely on this symbol name, it's probably fine to never include it in | ||
5030 | # preloaded symbol tables. | ||
5031 | extract_expsyms_cmds= | ||
5032 | |||
5033 | case $host_os in | ||
5034 | cygwin* | mingw* | pw32*) | ||
5035 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | ||
5036 | # When not using gcc, we currently assume that we are using | ||
5037 | # Microsoft Visual C++. | ||
5038 | if test "$GCC" != yes; then | ||
5039 | with_gnu_ld=no | ||
5040 | fi | ||
5041 | ;; | ||
5042 | openbsd*) | ||
5043 | with_gnu_ld=no | ||
5044 | ;; | ||
5045 | esac | ||
5046 | |||
5047 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes | ||
5048 | if test "$with_gnu_ld" = yes; then | ||
5049 | # If archive_cmds runs LD, not CC, wlarc should be empty | ||
5050 | wlarc='${wl}' | ||
5051 | |||
5052 | # See if GNU ld supports shared libraries. | ||
5053 | case $host_os in | ||
5054 | aix3* | aix4* | aix5*) | ||
5055 | # On AIX/PPC, the GNU linker is very broken | ||
5056 | if test "$host_cpu" != ia64; then | ||
5057 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5058 | cat <<EOF 1>&2 | ||
5059 | |||
5060 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported | ||
5061 | *** to be unable to reliably create shared libraries on AIX. | ||
5062 | *** Therefore, libtool is disabling shared libraries support. If you | ||
5063 | *** really care for shared libraries, you may want to modify your PATH | ||
5064 | *** so that a non-GNU linker is found, and then restart. | ||
5065 | |||
5066 | EOF | ||
5067 | fi | ||
5068 | ;; | ||
5069 | |||
5070 | amigaos*) | ||
5071 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | ||
5072 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5073 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
5074 | |||
5075 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports | ||
5076 | # that the semantics of dynamic libraries on AmigaOS, at least up | ||
5077 | # to version 4, is to share data among multiple programs linked | ||
5078 | # with the same dynamic library. Since this doesn't match the | ||
5079 | # behavior of shared libraries on other platforms, we can't use | ||
5080 | # them. | ||
5081 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5082 | ;; | ||
5083 | |||
5084 | beos*) | ||
5085 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
5086 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5087 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | ||
5088 | # support --undefined. This deserves some investigation. FIXME | ||
5089 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
5090 | else | ||
5091 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5092 | fi | ||
5093 | ;; | ||
5094 | |||
5095 | cygwin* | mingw* | pw32*) | ||
5096 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, | ||
5097 | # as there is no search path for DLLs. | ||
5098 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5099 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5100 | _LT_AC_TAGVAR(always_export_symbols, $1)=no | ||
5101 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
5102 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' | ||
5103 | |||
5104 | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then | ||
5105 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
5106 | # If the export-symbols file already is a .def file (1st line | ||
5107 | # is EXPORTS), use it as is; otherwise, prepend... | ||
5108 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
5109 | cp $export_symbols $output_objdir/$soname.def; | ||
5110 | else | ||
5111 | echo EXPORTS > $output_objdir/$soname.def; | ||
5112 | cat $export_symbols >> $output_objdir/$soname.def; | ||
5113 | fi~ | ||
5114 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
5115 | else | ||
5116 | ld_shlibs=no | ||
5117 | fi | ||
5118 | ;; | ||
5119 | |||
5120 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
5121 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
5122 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
5123 | wlarc= | ||
5124 | else | ||
5125 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
5126 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
5127 | fi | ||
5128 | ;; | ||
5129 | |||
5130 | solaris* | sysv5*) | ||
5131 | if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then | ||
5132 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5133 | cat <<EOF 1>&2 | ||
5134 | |||
5135 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably | ||
5136 | *** create shared libraries on Solaris systems. Therefore, libtool | ||
5137 | *** is disabling shared libraries support. We urge you to upgrade GNU | ||
5138 | *** binutils to release 2.9.1 or newer. Another option is to modify | ||
5139 | *** your PATH or compiler configuration so that the native linker is | ||
5140 | *** used, and then restart. | ||
5141 | |||
5142 | EOF | ||
5143 | elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
5144 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
5145 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
5146 | else | ||
5147 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5148 | fi | ||
5149 | ;; | ||
5150 | |||
5151 | sunos4*) | ||
5152 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
5153 | wlarc= | ||
5154 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5155 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5156 | ;; | ||
5157 | |||
5158 | linux*) | ||
5159 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
5160 | tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
5161 | _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" | ||
5162 | supports_anon_versioning=no | ||
5163 | case `$LD -v 2>/dev/null` in | ||
5164 | *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 | ||
5165 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | ||
5166 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | ||
5167 | *\ 2.11.*) ;; # other 2.11 versions | ||
5168 | *) supports_anon_versioning=yes ;; | ||
5169 | esac | ||
5170 | if test $supports_anon_versioning = yes; then | ||
5171 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ | ||
5172 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
5173 | $echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
5174 | $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | ||
5175 | else | ||
5176 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" | ||
5177 | fi | ||
5178 | _LT_AC_TAGVAR(link_all_deplibs, $1)=no | ||
5179 | else | ||
5180 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5181 | fi | ||
5182 | ;; | ||
5183 | |||
5184 | *) | ||
5185 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
5186 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
5187 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
5188 | else | ||
5189 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5190 | fi | ||
5191 | ;; | ||
5192 | esac | ||
5193 | |||
5194 | if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then | ||
5195 | runpath_var=LD_RUN_PATH | ||
5196 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' | ||
5197 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' | ||
5198 | # ancient GNU ld didn't support --whole-archive et. al. | ||
5199 | if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then | ||
5200 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | ||
5201 | else | ||
5202 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= | ||
5203 | fi | ||
5204 | fi | ||
5205 | else | ||
5206 | # PORTME fill in a description of your system's linker (not GNU ld) | ||
5207 | case $host_os in | ||
5208 | aix3*) | ||
5209 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5210 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | ||
5211 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | ||
5212 | # Note: this linker hardcodes the directories in LIBPATH if there | ||
5213 | # are no directories specified by -L. | ||
5214 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
5215 | if test "$GCC" = yes && test -z "$link_static_flag"; then | ||
5216 | # Neither direct hardcoding nor static linking is supported with a | ||
5217 | # broken collect2. | ||
5218 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported | ||
5219 | fi | ||
5220 | ;; | ||
5221 | |||
5222 | aix4* | aix5*) | ||
5223 | if test "$host_cpu" = ia64; then | ||
5224 | # On IA64, the linker does run time linking by default, so we don't | ||
5225 | # have to do anything special. | ||
5226 | aix_use_runtimelinking=no | ||
5227 | exp_sym_flag='-Bexport' | ||
5228 | no_entry_flag="" | ||
5229 | else | ||
5230 | # If we're using GNU nm, then we don't want the "-C" option. | ||
5231 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | ||
5232 | if $NM -V 2>&1 | grep 'GNU' > /dev/null; then | ||
5233 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' | ||
5234 | else | ||
5235 | _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' | ||
5236 | fi | ||
5237 | aix_use_runtimelinking=no | ||
5238 | |||
5239 | # Test if we are trying to use run time linking or normal | ||
5240 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | ||
5241 | # need to do runtime linking. | ||
5242 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) | ||
5243 | for ld_flag in $LDFLAGS; do | ||
5244 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | ||
5245 | aix_use_runtimelinking=yes | ||
5246 | break | ||
5247 | fi | ||
5248 | done | ||
5249 | esac | ||
5250 | |||
5251 | exp_sym_flag='-bexport' | ||
5252 | no_entry_flag='-bnoentry' | ||
5253 | fi | ||
5254 | |||
5255 | # When large executables or shared objects are built, AIX ld can | ||
5256 | # have problems creating the table of contents. If linking a library | ||
5257 | # or program results in "error TOC overflow" add -mminimal-toc to | ||
5258 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | ||
5259 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | ||
5260 | |||
5261 | _LT_AC_TAGVAR(archive_cmds, $1)='' | ||
5262 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5263 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' | ||
5264 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | ||
5265 | |||
5266 | if test "$GCC" = yes; then | ||
5267 | case $host_os in aix4.[012]|aix4.[012].*) | ||
5268 | # We only want to do this on AIX 4.2 and lower, the check | ||
5269 | # below for broken collect2 doesn't work under 4.3+ | ||
5270 | collect2name=`${CC} -print-prog-name=collect2` | ||
5271 | if test -f "$collect2name" && \ | ||
5272 | strings "$collect2name" | grep resolve_lib_name >/dev/null | ||
5273 | then | ||
5274 | # We have reworked collect2 | ||
5275 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5276 | else | ||
5277 | # We have old collect2 | ||
5278 | _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported | ||
5279 | # It fails to find uninstalled libraries when the uninstalled | ||
5280 | # path is not listed in the libpath. Setting hardcode_minus_L | ||
5281 | # to unsupported forces relinking | ||
5282 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
5283 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5284 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= | ||
5285 | fi | ||
5286 | esac | ||
5287 | shared_flag='-shared' | ||
5288 | else | ||
5289 | # not using gcc | ||
5290 | if test "$host_cpu" = ia64; then | ||
5291 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | ||
5292 | # chokes on -Wl,-G. The following line is correct: | ||
5293 | shared_flag='-G' | ||
5294 | else | ||
5295 | if test "$aix_use_runtimelinking" = yes; then | ||
5296 | shared_flag='${wl}-G' | ||
5297 | else | ||
5298 | shared_flag='${wl}-bM:SRE' | ||
5299 | fi | ||
5300 | fi | ||
5301 | fi | ||
5302 | |||
5303 | # It seems that -bexpall does not export symbols beginning with | ||
5304 | # underscore (_), so it is better to generate a list of symbols to export. | ||
5305 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | ||
5306 | if test "$aix_use_runtimelinking" = yes; then | ||
5307 | # Warning - without using the other runtime loading flags (-brtl), | ||
5308 | # -berok will link without error, but may produce a broken library. | ||
5309 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' | ||
5310 | # Determine the default libpath from the value encoded in an empty executable. | ||
5311 | _LT_AC_SYS_LIBPATH_AIX | ||
5312 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
5313 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" | ||
5314 | else | ||
5315 | if test "$host_cpu" = ia64; then | ||
5316 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' | ||
5317 | _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" | ||
5318 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" | ||
5319 | else | ||
5320 | # Determine the default libpath from the value encoded in an empty executable. | ||
5321 | _LT_AC_SYS_LIBPATH_AIX | ||
5322 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
5323 | # Warning - without using the other run time loading flags, | ||
5324 | # -berok will link without error, but may produce a broken library. | ||
5325 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' | ||
5326 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' | ||
5327 | # -bexpall does not export symbols beginning with underscore (_) | ||
5328 | _LT_AC_TAGVAR(always_export_symbols, $1)=yes | ||
5329 | # Exported symbols can be pulled into shared objects from archives | ||
5330 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' | ||
5331 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
5332 | # This is similar to how AIX traditionally builds it's shared libraries. | ||
5333 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | ||
5334 | fi | ||
5335 | fi | ||
5336 | ;; | ||
5337 | |||
5338 | amigaos*) | ||
5339 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | ||
5340 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5341 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
5342 | # see comment about different semantics on the GNU ld section | ||
5343 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5344 | ;; | ||
5345 | |||
5346 | bsdi4*) | ||
5347 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic | ||
5348 | ;; | ||
5349 | |||
5350 | cygwin* | mingw* | pw32*) | ||
5351 | # When not using gcc, we currently assume that we are using | ||
5352 | # Microsoft Visual C++. | ||
5353 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
5354 | # no search path for DLLs. | ||
5355 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' | ||
5356 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5357 | # Tell ltmain to make .lib files, not .a files. | ||
5358 | libext=lib | ||
5359 | # Tell ltmain to make .dll files, not .so files. | ||
5360 | shrext_cmds=".dll" | ||
5361 | # FIXME: Setting linknames here is a bad hack. | ||
5362 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
5363 | # The linker will automatically build a .lib file if we build a DLL. | ||
5364 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' | ||
5365 | # FIXME: Should let the user specify the lib program. | ||
5366 | _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' | ||
5367 | fix_srcfile_path='`cygpath -w "$srcfile"`' | ||
5368 | _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes | ||
5369 | ;; | ||
5370 | |||
5371 | darwin* | rhapsody*) | ||
5372 | if test "$GXX" = yes ; then | ||
5373 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
5374 | case "$host_os" in | ||
5375 | rhapsody* | darwin1.[[012]]) | ||
5376 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' | ||
5377 | ;; | ||
5378 | *) # Darwin 1.3 on | ||
5379 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then | ||
5380 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' | ||
5381 | else | ||
5382 | case ${MACOSX_DEPLOYMENT_TARGET} in | ||
5383 | 10.[[012]]) | ||
5384 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' | ||
5385 | ;; | ||
5386 | 10.*) | ||
5387 | _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' | ||
5388 | ;; | ||
5389 | esac | ||
5390 | fi | ||
5391 | ;; | ||
5392 | esac | ||
5393 | lt_int_apple_cc_single_mod=no | ||
5394 | output_verbose_link_cmd='echo' | ||
5395 | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then | ||
5396 | lt_int_apple_cc_single_mod=yes | ||
5397 | fi | ||
5398 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
5399 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' | ||
5400 | else | ||
5401 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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' | ||
5402 | fi | ||
5403 | _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' | ||
5404 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's | ||
5405 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
5406 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
5407 | else | ||
5408 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
5409 | fi | ||
5410 | _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
5411 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
5412 | _LT_AC_TAGVAR(hardcode_automatic, $1)=yes | ||
5413 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported | ||
5414 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' | ||
5415 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | ||
5416 | else | ||
5417 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5418 | fi | ||
5419 | ;; | ||
5420 | |||
5421 | dgux*) | ||
5422 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5423 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5424 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5425 | ;; | ||
5426 | |||
5427 | freebsd1*) | ||
5428 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5429 | ;; | ||
5430 | |||
5431 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | ||
5432 | # support. Future versions do this automatically, but an explicit c++rt0.o | ||
5433 | # does not break anything, and helps significantly (at the cost of a little | ||
5434 | # extra space). | ||
5435 | freebsd2.2*) | ||
5436 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | ||
5437 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
5438 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5439 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5440 | ;; | ||
5441 | |||
5442 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. | ||
5443 | freebsd2*) | ||
5444 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
5445 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5446 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
5447 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5448 | ;; | ||
5449 | |||
5450 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
5451 | freebsd* | kfreebsd*-gnu) | ||
5452 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | ||
5453 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
5454 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5455 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5456 | ;; | ||
5457 | |||
5458 | hpux9*) | ||
5459 | if test "$GCC" = yes; then | ||
5460 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | ||
5461 | else | ||
5462 | _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | ||
5463 | fi | ||
5464 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
5465 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5466 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5467 | |||
5468 | # hardcode_minus_L: Not really in the search PATH, | ||
5469 | # but as the default location of the library. | ||
5470 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
5471 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
5472 | ;; | ||
5473 | |||
5474 | hpux10* | hpux11*) | ||
5475 | if test "$GCC" = yes -a "$with_gnu_ld" = no; then | ||
5476 | case "$host_cpu" in | ||
5477 | hppa*64*|ia64*) | ||
5478 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
5479 | ;; | ||
5480 | *) | ||
5481 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
5482 | ;; | ||
5483 | esac | ||
5484 | else | ||
5485 | case "$host_cpu" in | ||
5486 | hppa*64*|ia64*) | ||
5487 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5488 | ;; | ||
5489 | *) | ||
5490 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
5491 | ;; | ||
5492 | esac | ||
5493 | fi | ||
5494 | if test "$with_gnu_ld" = no; then | ||
5495 | case "$host_cpu" in | ||
5496 | hppa*64*) | ||
5497 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
5498 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' | ||
5499 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5500 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
5501 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5502 | ;; | ||
5503 | ia64*) | ||
5504 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5505 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
5506 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5507 | |||
5508 | # hardcode_minus_L: Not really in the search PATH, | ||
5509 | # but as the default location of the library. | ||
5510 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
5511 | ;; | ||
5512 | *) | ||
5513 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' | ||
5514 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5515 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5516 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
5517 | |||
5518 | # hardcode_minus_L: Not really in the search PATH, | ||
5519 | # but as the default location of the library. | ||
5520 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
5521 | ;; | ||
5522 | esac | ||
5523 | fi | ||
5524 | ;; | ||
5525 | |||
5526 | irix5* | irix6* | nonstopux*) | ||
5527 | if test "$GCC" = yes; then | ||
5528 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
5529 | else | ||
5530 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
5531 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' | ||
5532 | fi | ||
5533 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
5534 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5535 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | ||
5536 | ;; | ||
5537 | |||
5538 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
5539 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
5540 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | ||
5541 | else | ||
5542 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | ||
5543 | fi | ||
5544 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
5545 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5546 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5547 | ;; | ||
5548 | |||
5549 | newsos6) | ||
5550 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5551 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5552 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
5553 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5554 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5555 | ;; | ||
5556 | |||
5557 | openbsd*) | ||
5558 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5559 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5560 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
5561 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
5562 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
5563 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' | ||
5564 | else | ||
5565 | case $host_os in | ||
5566 | openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) | ||
5567 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
5568 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
5569 | ;; | ||
5570 | *) | ||
5571 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
5572 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' | ||
5573 | ;; | ||
5574 | esac | ||
5575 | fi | ||
5576 | ;; | ||
5577 | |||
5578 | os2*) | ||
5579 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5580 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
5581 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported | ||
5582 | _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' | ||
5583 | _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | ||
5584 | ;; | ||
5585 | |||
5586 | osf3*) | ||
5587 | if test "$GCC" = yes; then | ||
5588 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | ||
5589 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
5590 | else | ||
5591 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | ||
5592 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
5593 | fi | ||
5594 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
5595 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5596 | ;; | ||
5597 | |||
5598 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
5599 | if test "$GCC" = yes; then | ||
5600 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' | ||
5601 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
5602 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' | ||
5603 | else | ||
5604 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' | ||
5605 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
5606 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ | ||
5607 | $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' | ||
5608 | |||
5609 | # Both c and cxx compiler support -rpath directly | ||
5610 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' | ||
5611 | fi | ||
5612 | _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: | ||
5613 | ;; | ||
5614 | |||
5615 | sco3.2v5*) | ||
5616 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5617 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5618 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' | ||
5619 | runpath_var=LD_RUN_PATH | ||
5620 | hardcode_runpath_var=yes | ||
5621 | ;; | ||
5622 | |||
5623 | solaris*) | ||
5624 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' | ||
5625 | if test "$GCC" = yes; then | ||
5626 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
5627 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
5628 | $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' | ||
5629 | else | ||
5630 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5631 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
5632 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | ||
5633 | fi | ||
5634 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' | ||
5635 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5636 | case $host_os in | ||
5637 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | ||
5638 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) | ||
5639 | _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; | ||
5640 | esac | ||
5641 | _LT_AC_TAGVAR(link_all_deplibs, $1)=yes | ||
5642 | ;; | ||
5643 | |||
5644 | sunos4*) | ||
5645 | if test "x$host_vendor" = xsequent; then | ||
5646 | # Use $CC to link under sequent, because it throws in some extra .o | ||
5647 | # files that make .init and .fini sections work. | ||
5648 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | ||
5649 | else | ||
5650 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | ||
5651 | fi | ||
5652 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5653 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5654 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes | ||
5655 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5656 | ;; | ||
5657 | |||
5658 | sysv4) | ||
5659 | case $host_vendor in | ||
5660 | sni) | ||
5661 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5662 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? | ||
5663 | ;; | ||
5664 | siemens) | ||
5665 | ## LD is ld it makes a PLAMLIB | ||
5666 | ## CC just makes a GrossModule. | ||
5667 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' | ||
5668 | _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' | ||
5669 | _LT_AC_TAGVAR(hardcode_direct, $1)=no | ||
5670 | ;; | ||
5671 | motorola) | ||
5672 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5673 | _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie | ||
5674 | ;; | ||
5675 | esac | ||
5676 | runpath_var='LD_RUN_PATH' | ||
5677 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5678 | ;; | ||
5679 | |||
5680 | sysv4.3*) | ||
5681 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5682 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5683 | _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' | ||
5684 | ;; | ||
5685 | |||
5686 | sysv4*MP*) | ||
5687 | if test -d /usr/nec; then | ||
5688 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5689 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5690 | runpath_var=LD_RUN_PATH | ||
5691 | hardcode_runpath_var=yes | ||
5692 | _LT_AC_TAGVAR(ld_shlibs, $1)=yes | ||
5693 | fi | ||
5694 | ;; | ||
5695 | |||
5696 | sysv4.2uw2*) | ||
5697 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' | ||
5698 | _LT_AC_TAGVAR(hardcode_direct, $1)=yes | ||
5699 | _LT_AC_TAGVAR(hardcode_minus_L, $1)=no | ||
5700 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5701 | hardcode_runpath_var=yes | ||
5702 | runpath_var=LD_RUN_PATH | ||
5703 | ;; | ||
5704 | |||
5705 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) | ||
5706 | _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' | ||
5707 | if test "$GCC" = yes; then | ||
5708 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
5709 | else | ||
5710 | _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
5711 | fi | ||
5712 | runpath_var='LD_RUN_PATH' | ||
5713 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5714 | ;; | ||
5715 | |||
5716 | sysv5*) | ||
5717 | _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' | ||
5718 | # $CC -shared without GNU ld will not create a library from C++ | ||
5719 | # object files and a static libstdc++, better avoid it by now | ||
5720 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5721 | _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
5722 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | ||
5723 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= | ||
5724 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5725 | runpath_var='LD_RUN_PATH' | ||
5726 | ;; | ||
5727 | |||
5728 | uts4*) | ||
5729 | _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
5730 | _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' | ||
5731 | _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no | ||
5732 | ;; | ||
5733 | |||
5734 | *) | ||
5735 | _LT_AC_TAGVAR(ld_shlibs, $1)=no | ||
5736 | ;; | ||
5737 | esac | ||
5738 | fi | ||
5739 | ]) | ||
5740 | AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) | ||
5741 | test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no | ||
5742 | |||
5743 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | ||
5744 | if test "$GCC" = yes; then | ||
5745 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | ||
5746 | fi | ||
5747 | |||
5748 | # | ||
5749 | # Do we need to explicitly link libc? | ||
5750 | # | ||
5751 | case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in | ||
5752 | x|xyes) | ||
5753 | # Assume -lc should be added | ||
5754 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
5755 | |||
5756 | if test "$enable_shared" = yes && test "$GCC" = yes; then | ||
5757 | case $_LT_AC_TAGVAR(archive_cmds, $1) in | ||
5758 | *'~'*) | ||
5759 | # FIXME: we may have to deal with multi-command sequences. | ||
5760 | ;; | ||
5761 | '$CC '*) | ||
5762 | # Test whether the compiler implicitly links with -lc since on some | ||
5763 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | ||
5764 | # to ld, don't add -lc before -lgcc. | ||
5765 | AC_MSG_CHECKING([whether -lc should be explicitly linked in]) | ||
5766 | $rm conftest* | ||
5767 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
5768 | |||
5769 | if AC_TRY_EVAL(ac_compile) 2>conftest.err; then | ||
5770 | soname=conftest | ||
5771 | lib=conftest | ||
5772 | libobjs=conftest.$ac_objext | ||
5773 | deplibs= | ||
5774 | wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) | ||
5775 | compiler_flags=-v | ||
5776 | linker_flags=-v | ||
5777 | verstring= | ||
5778 | output_objdir=. | ||
5779 | libname=conftest | ||
5780 | lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) | ||
5781 | _LT_AC_TAGVAR(allow_undefined_flag, $1)= | ||
5782 | if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) | ||
5783 | then | ||
5784 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no | ||
5785 | else | ||
5786 | _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes | ||
5787 | fi | ||
5788 | _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag | ||
5789 | else | ||
5790 | cat conftest.err 1>&5 | ||
5791 | fi | ||
5792 | $rm conftest* | ||
5793 | AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) | ||
5794 | ;; | ||
5795 | esac | ||
5796 | fi | ||
5797 | ;; | ||
5798 | esac | ||
5799 | ])# AC_LIBTOOL_PROG_LD_SHLIBS | ||
5800 | |||
5801 | |||
5802 | # _LT_AC_FILE_LTDLL_C | ||
5803 | # ------------------- | ||
5804 | # Be careful that the start marker always follows a newline. | ||
5805 | AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ | ||
5806 | # /* ltdll.c starts here */ | ||
5807 | # #define WIN32_LEAN_AND_MEAN | ||
5808 | # #include <windows.h> | ||
5809 | # #undef WIN32_LEAN_AND_MEAN | ||
5810 | # #include <stdio.h> | ||
5811 | # | ||
5812 | # #ifndef __CYGWIN__ | ||
5813 | # # ifdef __CYGWIN32__ | ||
5814 | # # define __CYGWIN__ __CYGWIN32__ | ||
5815 | # # endif | ||
5816 | # #endif | ||
5817 | # | ||
5818 | # #ifdef __cplusplus | ||
5819 | # extern "C" { | ||
5820 | # #endif | ||
5821 | # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); | ||
5822 | # #ifdef __cplusplus | ||
5823 | # } | ||
5824 | # #endif | ||
5825 | # | ||
5826 | # #ifdef __CYGWIN__ | ||
5827 | # #include <cygwin/cygwin_dll.h> | ||
5828 | # DECLARE_CYGWIN_DLL( DllMain ); | ||
5829 | # #endif | ||
5830 | # HINSTANCE __hDllInstance_base; | ||
5831 | # | ||
5832 | # BOOL APIENTRY | ||
5833 | # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) | ||
5834 | # { | ||
5835 | # __hDllInstance_base = hInst; | ||
5836 | # return TRUE; | ||
5837 | # } | ||
5838 | # /* ltdll.c ends here */ | ||
5839 | ])# _LT_AC_FILE_LTDLL_C | ||
5840 | |||
5841 | |||
5842 | # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) | ||
5843 | # --------------------------------- | ||
5844 | AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) | ||
5845 | |||
5846 | |||
5847 | # old names | ||
5848 | AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) | ||
5849 | AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) | ||
5850 | AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) | ||
5851 | AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) | ||
5852 | AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) | ||
5853 | AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) | ||
5854 | AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) | ||
5855 | |||
5856 | # This is just to silence aclocal about the macro not being used | ||
5857 | ifelse([AC_DISABLE_FAST_INSTALL]) | ||
5858 | |||
5859 | AC_DEFUN([LT_AC_PROG_GCJ], | ||
5860 | [AC_CHECK_TOOL(GCJ, gcj, no) | ||
5861 | test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" | ||
5862 | AC_SUBST(GCJFLAGS) | ||
5863 | ]) | ||
5864 | |||
5865 | AC_DEFUN([LT_AC_PROG_RC], | ||
5866 | [AC_CHECK_TOOL(RC, windres, no) | ||
5867 | ]) | ||
5868 | |||
5869 | # NOTE: This macro has been submitted for inclusion into # | ||
5870 | # GNU Autoconf as AC_PROG_SED. When it is available in # | ||
5871 | # a released version of Autoconf we should remove this # | ||
5872 | # macro and use it instead. # | ||
5873 | # LT_AC_PROG_SED | ||
5874 | # -------------- | ||
5875 | # Check for a fully-functional sed program, that truncates | ||
5876 | # as few characters as possible. Prefer GNU sed if found. | ||
5877 | AC_DEFUN([LT_AC_PROG_SED], | ||
5878 | [AC_MSG_CHECKING([for a sed that does not truncate output]) | ||
5879 | AC_CACHE_VAL(lt_cv_path_SED, | ||
5880 | [# Loop through the user's path and test for sed and gsed. | ||
5881 | # Then use that list of sed's as ones to test for truncation. | ||
5882 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
5883 | for as_dir in $PATH | ||
5884 | do | ||
5885 | IFS=$as_save_IFS | ||
5886 | test -z "$as_dir" && as_dir=. | ||
5887 | for lt_ac_prog in sed gsed; do | ||
5888 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
5889 | if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then | ||
5890 | lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" | ||
5891 | fi | ||
5892 | done | ||
5893 | done | ||
5894 | done | ||
5895 | lt_ac_max=0 | ||
5896 | lt_ac_count=0 | ||
5897 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris | ||
5898 | # along with /bin/sed that truncates output. | ||
5899 | for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do | ||
5900 | test ! -f $lt_ac_sed && break | ||
5901 | cat /dev/null > conftest.in | ||
5902 | lt_ac_count=0 | ||
5903 | echo $ECHO_N "0123456789$ECHO_C" >conftest.in | ||
5904 | # Check for GNU sed and select it if it is found. | ||
5905 | if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then | ||
5906 | lt_cv_path_SED=$lt_ac_sed | ||
5907 | break | ||
5908 | fi | ||
5909 | while true; do | ||
5910 | cat conftest.in conftest.in >conftest.tmp | ||
5911 | mv conftest.tmp conftest.in | ||
5912 | cp conftest.in conftest.nl | ||
5913 | echo >>conftest.nl | ||
5914 | $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break | ||
5915 | cmp -s conftest.out conftest.nl || break | ||
5916 | # 10000 chars as input seems more than enough | ||
5917 | test $lt_ac_count -gt 10 && break | ||
5918 | lt_ac_count=`expr $lt_ac_count + 1` | ||
5919 | if test $lt_ac_count -gt $lt_ac_max; then | ||
5920 | lt_ac_max=$lt_ac_count | ||
5921 | lt_cv_path_SED=$lt_ac_sed | ||
5922 | fi | ||
5923 | done | ||
5924 | done | ||
5925 | SED=$lt_cv_path_SED | ||
5926 | ]) | ||
5927 | AC_MSG_RESULT([$SED]) | ||
5928 | ]) | ||
5929 | |||
5930 | |||
5931 | # serial 6 AC_LIB_LTDL | ||
5932 | # Debian $Rev: 214 $ | ||
5933 | |||
5934 | # AC_WITH_LTDL | ||
5935 | # ------------ | ||
5936 | # Clients of libltdl can use this macro to allow the installer to | ||
5937 | # choose between a shipped copy of the ltdl sources or a preinstalled | ||
5938 | # version of the library. | ||
5939 | AC_DEFUN([AC_WITH_LTDL], | ||
5940 | [AC_REQUIRE([AC_LIB_LTDL]) | ||
5941 | AC_SUBST([LIBLTDL]) | ||
5942 | AC_SUBST([INCLTDL]) | ||
5943 | |||
5944 | # Unless the user asks us to check, assume no installed ltdl exists. | ||
5945 | use_installed_libltdl=no | ||
5946 | |||
5947 | AC_ARG_WITH([included_ltdl], | ||
5948 | [ --with-included-ltdl use the GNU ltdl sources included here]) | ||
5949 | |||
5950 | if test "x$with_included_ltdl" != xyes; then | ||
5951 | # We are not being forced to use the included libltdl sources, so | ||
5952 | # decide whether there is a useful installed version we can use. | ||
5953 | AC_CHECK_HEADER([ltdl.h], | ||
5954 | [AC_CHECK_LIB([ltdl], [lt_dlcaller_register], | ||
5955 | [with_included_ltdl=no], | ||
5956 | [with_included_ltdl=yes]) | ||
5957 | ]) | ||
5958 | fi | ||
5959 | |||
5960 | if test "x$enable_ltdl_install" != xyes; then | ||
5961 | # If the user did not specify an installable libltdl, then default | ||
5962 | # to a convenience lib. | ||
5963 | AC_LIBLTDL_CONVENIENCE | ||
5964 | fi | ||
5965 | |||
5966 | if test "x$with_included_ltdl" = xno; then | ||
5967 | # If the included ltdl is not to be used. then Use the | ||
5968 | # preinstalled libltdl we found. | ||
5969 | AC_DEFINE([HAVE_LTDL], 1, | ||
5970 | [Define this if a modern libltdl is already installed]) | ||
5971 | LIBLTDL=-lltdl | ||
5972 | fi | ||
5973 | |||
5974 | # Report our decision... | ||
5975 | AC_MSG_CHECKING([whether to use included libltdl]) | ||
5976 | AC_MSG_RESULT([$with_included_ltdl]) | ||
5977 | |||
5978 | AC_CONFIG_SUBDIRS([libltdl]) | ||
5979 | ])# AC_WITH_LTDL | ||
5980 | |||
5981 | |||
5982 | # AC_LIB_LTDL | ||
5983 | # ----------- | ||
5984 | # Perform all the checks necessary for compilation of the ltdl objects | ||
5985 | # -- including compiler checks and header checks. | ||
5986 | AC_DEFUN([AC_LIB_LTDL], | ||
5987 | [AC_PREREQ(2.50) | ||
5988 | AC_REQUIRE([AC_PROG_CC]) | ||
5989 | AC_REQUIRE([AC_C_CONST]) | ||
5990 | AC_REQUIRE([AC_HEADER_STDC]) | ||
5991 | AC_REQUIRE([AC_HEADER_DIRENT]) | ||
5992 | AC_REQUIRE([_LT_AC_CHECK_DLFCN]) | ||
5993 | AC_REQUIRE([AC_LTDL_ENABLE_INSTALL]) | ||
5994 | AC_REQUIRE([AC_LTDL_SHLIBEXT]) | ||
5995 | AC_REQUIRE([AC_LTDL_SHLIBPATH]) | ||
5996 | AC_REQUIRE([AC_LTDL_SYSSEARCHPATH]) | ||
5997 | AC_REQUIRE([AC_LTDL_OBJDIR]) | ||
5998 | AC_REQUIRE([AC_LTDL_DLPREOPEN]) | ||
5999 | AC_REQUIRE([AC_LTDL_DLLIB]) | ||
6000 | AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) | ||
6001 | AC_REQUIRE([AC_LTDL_DLSYM_USCORE]) | ||
6002 | AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS]) | ||
6003 | AC_REQUIRE([AC_LTDL_FUNC_ARGZ]) | ||
6004 | |||
6005 | AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ | ||
6006 | stdio.h unistd.h]) | ||
6007 | AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h]) | ||
6008 | AC_CHECK_HEADERS([string.h strings.h], [break]) | ||
6009 | |||
6010 | AC_CHECK_FUNCS([strchr index], [break]) | ||
6011 | AC_CHECK_FUNCS([strrchr rindex], [break]) | ||
6012 | AC_CHECK_FUNCS([memcpy bcopy], [break]) | ||
6013 | AC_CHECK_FUNCS([memmove strcmp]) | ||
6014 | AC_CHECK_FUNCS([closedir opendir readdir]) | ||
6015 | ])# AC_LIB_LTDL | ||
6016 | |||
6017 | |||
6018 | # AC_LTDL_ENABLE_INSTALL | ||
6019 | # ---------------------- | ||
6020 | AC_DEFUN([AC_LTDL_ENABLE_INSTALL], | ||
6021 | [AC_ARG_ENABLE([ltdl-install], | ||
6022 | [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])]) | ||
6023 | |||
6024 | AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) | ||
6025 | AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) | ||
6026 | ])])# AC_LTDL_ENABLE_INSTALL | ||
6027 | |||
6028 | |||
6029 | # AC_LTDL_SYS_DLOPEN_DEPLIBS | ||
6030 | # -------------------------- | ||
6031 | AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], | ||
6032 | [AC_REQUIRE([AC_CANONICAL_HOST]) | ||
6033 | AC_CACHE_CHECK([whether deplibs are loaded by dlopen], | ||
6034 | [libltdl_cv_sys_dlopen_deplibs], | ||
6035 | [# PORTME does your system automatically load deplibs for dlopen? | ||
6036 | # or its logical equivalent (e.g. shl_load for HP-UX < 11) | ||
6037 | # For now, we just catch OSes we know something about -- in the | ||
6038 | # future, we'll try test this programmatically. | ||
6039 | libltdl_cv_sys_dlopen_deplibs=unknown | ||
6040 | case "$host_os" in | ||
6041 | aix3*|aix4.1.*|aix4.2.*) | ||
6042 | # Unknown whether this is true for these versions of AIX, but | ||
6043 | # we want this `case' here to explicitly catch those versions. | ||
6044 | libltdl_cv_sys_dlopen_deplibs=unknown | ||
6045 | ;; | ||
6046 | aix[[45]]*) | ||
6047 | libltdl_cv_sys_dlopen_deplibs=yes | ||
6048 | ;; | ||
6049 | darwin*) | ||
6050 | # Assuming the user has installed a libdl from somewhere, this is true | ||
6051 | # If you are looking for one http://www.opendarwin.org/projects/dlcompat | ||
6052 | libltdl_cv_sys_dlopen_deplibs=yes | ||
6053 | ;; | ||
6054 | gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) | ||
6055 | # GNU and its variants, using gnu ld.so (Glibc) | ||
6056 | libltdl_cv_sys_dlopen_deplibs=yes | ||
6057 | ;; | ||
6058 | hpux10*|hpux11*) | ||
6059 | libltdl_cv_sys_dlopen_deplibs=yes | ||
6060 | ;; | ||
6061 | irix[[12345]]*|irix6.[[01]]*) | ||
6062 | # Catch all versions of IRIX before 6.2, and indicate that we don't | ||
6063 | # know how it worked for any of those versions. | ||
6064 | libltdl_cv_sys_dlopen_deplibs=unknown | ||
6065 | ;; | ||
6066 | irix*) | ||
6067 | # The case above catches anything before 6.2, and it's known that | ||
6068 | # at 6.2 and later dlopen does load deplibs. | ||
6069 | libltdl_cv_sys_dlopen_deplibs=yes | ||
6070 | ;; | ||
6071 | netbsd* | netbsdelf*-gnu) | ||
6072 | libltdl_cv_sys_dlopen_deplibs=yes | ||
6073 | ;; | ||
6074 | openbsd*) | ||
6075 | libltdl_cv_sys_dlopen_deplibs=yes | ||
6076 | ;; | ||
6077 | osf[[1234]]*) | ||
6078 | # dlopen did load deplibs (at least at 4.x), but until the 5.x series, | ||
6079 | # it did *not* use an RPATH in a shared library to find objects the | ||
6080 | # library depends on, so we explictly say `no'. | ||
6081 | libltdl_cv_sys_dlopen_deplibs=no | ||
6082 | ;; | ||
6083 | osf5.0|osf5.0a|osf5.1) | ||
6084 | # dlopen *does* load deplibs and with the right loader patch applied | ||
6085 | # it even uses RPATH in a shared library to search for shared objects | ||
6086 | # that the library depends on, but there's no easy way to know if that | ||
6087 | # patch is installed. Since this is the case, all we can really | ||
6088 | # say is unknown -- it depends on the patch being installed. If | ||
6089 | # it is, this changes to `yes'. Without it, it would be `no'. | ||
6090 | libltdl_cv_sys_dlopen_deplibs=unknown | ||
6091 | ;; | ||
6092 | osf*) | ||
6093 | # the two cases above should catch all versions of osf <= 5.1. Read | ||
6094 | # the comments above for what we know about them. | ||
6095 | # At > 5.1, deplibs are loaded *and* any RPATH in a shared library | ||
6096 | # is used to find them so we can finally say `yes'. | ||
6097 | libltdl_cv_sys_dlopen_deplibs=yes | ||
6098 | ;; | ||
6099 | solaris*) | ||
6100 | libltdl_cv_sys_dlopen_deplibs=yes | ||
6101 | ;; | ||
6102 | esac | ||
6103 | ]) | ||
6104 | if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then | ||
6105 | AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], | ||
6106 | [Define if the OS needs help to load dependent libraries for dlopen().]) | ||
6107 | fi | ||
6108 | ])# AC_LTDL_SYS_DLOPEN_DEPLIBS | ||
6109 | |||
6110 | |||
6111 | # AC_LTDL_SHLIBEXT | ||
6112 | # ---------------- | ||
6113 | AC_DEFUN([AC_LTDL_SHLIBEXT], | ||
6114 | [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) | ||
6115 | AC_CACHE_CHECK([which extension is used for loadable modules], | ||
6116 | [libltdl_cv_shlibext], | ||
6117 | [ | ||
6118 | module=yes | ||
6119 | eval libltdl_cv_shlibext=$shrext_cmds | ||
6120 | ]) | ||
6121 | if test -n "$libltdl_cv_shlibext"; then | ||
6122 | AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext", | ||
6123 | [Define to the extension used for shared libraries, say, ".so".]) | ||
6124 | fi | ||
6125 | ])# AC_LTDL_SHLIBEXT | ||
6126 | |||
6127 | |||
6128 | # AC_LTDL_SHLIBPATH | ||
6129 | # ----------------- | ||
6130 | AC_DEFUN([AC_LTDL_SHLIBPATH], | ||
6131 | [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) | ||
6132 | AC_CACHE_CHECK([which variable specifies run-time library path], | ||
6133 | [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"]) | ||
6134 | if test -n "$libltdl_cv_shlibpath_var"; then | ||
6135 | AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var", | ||
6136 | [Define to the name of the environment variable that determines the dynamic library search path.]) | ||
6137 | fi | ||
6138 | ])# AC_LTDL_SHLIBPATH | ||
6139 | |||
6140 | |||
6141 | # AC_LTDL_SYSSEARCHPATH | ||
6142 | # --------------------- | ||
6143 | AC_DEFUN([AC_LTDL_SYSSEARCHPATH], | ||
6144 | [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) | ||
6145 | AC_CACHE_CHECK([for the default library search path], | ||
6146 | [libltdl_cv_sys_search_path], | ||
6147 | [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) | ||
6148 | if test -n "$libltdl_cv_sys_search_path"; then | ||
6149 | sys_search_path= | ||
6150 | for dir in $libltdl_cv_sys_search_path; do | ||
6151 | if test -z "$sys_search_path"; then | ||
6152 | sys_search_path="$dir" | ||
6153 | else | ||
6154 | sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" | ||
6155 | fi | ||
6156 | done | ||
6157 | AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path", | ||
6158 | [Define to the system default library search path.]) | ||
6159 | fi | ||
6160 | ])# AC_LTDL_SYSSEARCHPATH | ||
6161 | |||
6162 | |||
6163 | # AC_LTDL_OBJDIR | ||
6164 | # -------------- | ||
6165 | AC_DEFUN([AC_LTDL_OBJDIR], | ||
6166 | [AC_CACHE_CHECK([for objdir], | ||
6167 | [libltdl_cv_objdir], | ||
6168 | [libltdl_cv_objdir="$objdir" | ||
6169 | if test -n "$objdir"; then | ||
6170 | : | ||
6171 | else | ||
6172 | rm -f .libs 2>/dev/null | ||
6173 | mkdir .libs 2>/dev/null | ||
6174 | if test -d .libs; then | ||
6175 | libltdl_cv_objdir=.libs | ||
6176 | else | ||
6177 | # MS-DOS does not allow filenames that begin with a dot. | ||
6178 | libltdl_cv_objdir=_libs | ||
6179 | fi | ||
6180 | rmdir .libs 2>/dev/null | ||
6181 | fi | ||
6182 | ]) | ||
6183 | AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/", | ||
6184 | [Define to the sub-directory in which libtool stores uninstalled libraries.]) | ||
6185 | ])# AC_LTDL_OBJDIR | ||
6186 | |||
6187 | |||
6188 | # AC_LTDL_DLPREOPEN | ||
6189 | # ----------------- | ||
6190 | AC_DEFUN([AC_LTDL_DLPREOPEN], | ||
6191 | [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) | ||
6192 | AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], | ||
6193 | [libltdl_cv_preloaded_symbols], | ||
6194 | [if test -n "$lt_cv_sys_global_symbol_pipe"; then | ||
6195 | libltdl_cv_preloaded_symbols=yes | ||
6196 | else | ||
6197 | libltdl_cv_preloaded_symbols=no | ||
6198 | fi | ||
6199 | ]) | ||
6200 | if test x"$libltdl_cv_preloaded_symbols" = xyes; then | ||
6201 | AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1, | ||
6202 | [Define if libtool can extract symbol lists from object files.]) | ||
6203 | fi | ||
6204 | ])# AC_LTDL_DLPREOPEN | ||
6205 | |||
6206 | |||
6207 | # AC_LTDL_DLLIB | ||
6208 | # ------------- | ||
6209 | AC_DEFUN([AC_LTDL_DLLIB], | ||
6210 | [LIBADD_DL= | ||
6211 | AC_SUBST(LIBADD_DL) | ||
6212 | AC_LANG_PUSH([C]) | ||
6213 | |||
6214 | AC_CHECK_FUNC([shl_load], | ||
6215 | [AC_DEFINE([HAVE_SHL_LOAD], [1], | ||
6216 | [Define if you have the shl_load function.])], | ||
6217 | [AC_CHECK_LIB([dld], [shl_load], | ||
6218 | [AC_DEFINE([HAVE_SHL_LOAD], [1], | ||
6219 | [Define if you have the shl_load function.]) | ||
6220 | LIBADD_DL="$LIBADD_DL -ldld"], | ||
6221 | [AC_CHECK_LIB([dl], [dlopen], | ||
6222 | [AC_DEFINE([HAVE_LIBDL], [1], | ||
6223 | [Define if you have the libdl library or equivalent.]) | ||
6224 | LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"], | ||
6225 | [AC_TRY_LINK([#if HAVE_DLFCN_H | ||
6226 | # include <dlfcn.h> | ||
6227 | #endif | ||
6228 | ], | ||
6229 | [dlopen(0, 0);], | ||
6230 | [AC_DEFINE([HAVE_LIBDL], [1], | ||
6231 | [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"], | ||
6232 | [AC_CHECK_LIB([svld], [dlopen], | ||
6233 | [AC_DEFINE([HAVE_LIBDL], [1], | ||
6234 | [Define if you have the libdl library or equivalent.]) | ||
6235 | LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"], | ||
6236 | [AC_CHECK_LIB([dld], [dld_link], | ||
6237 | [AC_DEFINE([HAVE_DLD], [1], | ||
6238 | [Define if you have the GNU dld library.]) | ||
6239 | LIBADD_DL="$LIBADD_DL -ldld"], | ||
6240 | [AC_CHECK_FUNC([_dyld_func_lookup], | ||
6241 | [AC_DEFINE([HAVE_DYLD], [1], | ||
6242 | [Define if you have the _dyld_func_lookup function.])]) | ||
6243 | ]) | ||
6244 | ]) | ||
6245 | ]) | ||
6246 | ]) | ||
6247 | ]) | ||
6248 | ]) | ||
6249 | |||
6250 | if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes | ||
6251 | then | ||
6252 | lt_save_LIBS="$LIBS" | ||
6253 | LIBS="$LIBS $LIBADD_DL" | ||
6254 | AC_CHECK_FUNCS([dlerror]) | ||
6255 | LIBS="$lt_save_LIBS" | ||
6256 | fi | ||
6257 | AC_LANG_POP | ||
6258 | ])# AC_LTDL_DLLIB | ||
6259 | |||
6260 | |||
6261 | # AC_LTDL_SYMBOL_USCORE | ||
6262 | # --------------------- | ||
6263 | # does the compiler prefix global symbols with an underscore? | ||
6264 | AC_DEFUN([AC_LTDL_SYMBOL_USCORE], | ||
6265 | [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) | ||
6266 | AC_CACHE_CHECK([for _ prefix in compiled symbols], | ||
6267 | [ac_cv_sys_symbol_underscore], | ||
6268 | [ac_cv_sys_symbol_underscore=no | ||
6269 | cat > conftest.$ac_ext <<EOF | ||
6270 | void nm_test_func(){} | ||
6271 | int main(){nm_test_func;return 0;} | ||
6272 | EOF | ||
6273 | if AC_TRY_EVAL(ac_compile); then | ||
6274 | # Now try to grab the symbols. | ||
6275 | ac_nlist=conftest.nm | ||
6276 | if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then | ||
6277 | # See whether the symbols have a leading underscore. | ||
6278 | if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then | ||
6279 | ac_cv_sys_symbol_underscore=yes | ||
6280 | else | ||
6281 | if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then | ||
6282 | : | ||
6283 | else | ||
6284 | echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC | ||
6285 | fi | ||
6286 | fi | ||
6287 | else | ||
6288 | echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC | ||
6289 | fi | ||
6290 | else | ||
6291 | echo "configure: failed program was:" >&AC_FD_CC | ||
6292 | cat conftest.c >&AC_FD_CC | ||
6293 | fi | ||
6294 | rm -rf conftest* | ||
6295 | ]) | ||
6296 | ])# AC_LTDL_SYMBOL_USCORE | ||
6297 | |||
6298 | |||
6299 | # AC_LTDL_DLSYM_USCORE | ||
6300 | # -------------------- | ||
6301 | AC_DEFUN([AC_LTDL_DLSYM_USCORE], | ||
6302 | [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) | ||
6303 | if test x"$ac_cv_sys_symbol_underscore" = xyes; then | ||
6304 | if test x"$libltdl_cv_func_dlopen" = xyes || | ||
6305 | test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then | ||
6306 | AC_CACHE_CHECK([whether we have to add an underscore for dlsym], | ||
6307 | [libltdl_cv_need_uscore], | ||
6308 | [libltdl_cv_need_uscore=unknown | ||
6309 | save_LIBS="$LIBS" | ||
6310 | LIBS="$LIBS $LIBADD_DL" | ||
6311 | _LT_AC_TRY_DLOPEN_SELF( | ||
6312 | [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], | ||
6313 | [], [libltdl_cv_need_uscore=cross]) | ||
6314 | LIBS="$save_LIBS" | ||
6315 | ]) | ||
6316 | fi | ||
6317 | fi | ||
6318 | |||
6319 | if test x"$libltdl_cv_need_uscore" = xyes; then | ||
6320 | AC_DEFINE(NEED_USCORE, 1, | ||
6321 | [Define if dlsym() requires a leading underscore in symbol names.]) | ||
6322 | fi | ||
6323 | ])# AC_LTDL_DLSYM_USCORE | ||
6324 | |||
6325 | # AC_LTDL_FUNC_ARGZ | ||
6326 | # ----------------- | ||
6327 | AC_DEFUN([AC_LTDL_FUNC_ARGZ], | ||
6328 | [AC_CHECK_HEADERS([argz.h]) | ||
6329 | |||
6330 | AC_CHECK_TYPES([error_t], | ||
6331 | [], | ||
6332 | [AC_DEFINE([error_t], [int], | ||
6333 | [Define to a type to use for `error_t' if it is not otherwise available.])], | ||
6334 | [#if HAVE_ARGZ_H | ||
6335 | # include <argz.h> | ||
6336 | #endif]) | ||
6337 | |||
6338 | AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify]) | ||
6339 | ])# AC_LTDL_FUNC_ARGZ | ||
6340 | |||
6341 | # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. | ||
6342 | # | ||
6343 | # This file is free software; the Free Software Foundation | ||
6344 | # gives unlimited permission to copy and/or distribute it, | ||
6345 | # with or without modifications, as long as this notice is preserved. | ||
6346 | |||
6347 | # AM_AUTOMAKE_VERSION(VERSION) | ||
6348 | # ---------------------------- | ||
6349 | # Automake X.Y traces this macro to ensure aclocal.m4 has been | ||
6350 | # generated from the m4 files accompanying Automake X.Y. | ||
6351 | AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) | ||
6352 | |||
6353 | # AM_SET_CURRENT_AUTOMAKE_VERSION | ||
6354 | # ------------------------------- | ||
6355 | # Call AM_AUTOMAKE_VERSION so it can be traced. | ||
6356 | # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. | ||
6357 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | ||
6358 | [AM_AUTOMAKE_VERSION([1.9.5])]) | ||
6359 | |||
6360 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- | ||
6361 | |||
6362 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. | ||
6363 | # | ||
6364 | # This file is free software; the Free Software Foundation | ||
6365 | # gives unlimited permission to copy and/or distribute it, | ||
6366 | # with or without modifications, as long as this notice is preserved. | ||
6367 | |||
6368 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets | ||
6369 | # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to | ||
6370 | # `$srcdir', `$srcdir/..', or `$srcdir/../..'. | ||
6371 | # | ||
6372 | # Of course, Automake must honor this variable whenever it calls a | ||
6373 | # tool from the auxiliary directory. The problem is that $srcdir (and | ||
6374 | # therefore $ac_aux_dir as well) can be either absolute or relative, | ||
6375 | # depending on how configure is run. This is pretty annoying, since | ||
6376 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top | ||
6377 | # source directory, any form will work fine, but in subdirectories a | ||
6378 | # relative path needs to be adjusted first. | ||
6379 | # | ||
6380 | # $ac_aux_dir/missing | ||
6381 | # fails when called from a subdirectory if $ac_aux_dir is relative | ||
6382 | # $top_srcdir/$ac_aux_dir/missing | ||
6383 | # fails if $ac_aux_dir is absolute, | ||
6384 | # fails when called from a subdirectory in a VPATH build with | ||
6385 | # a relative $ac_aux_dir | ||
6386 | # | ||
6387 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir | ||
6388 | # are both prefixed by $srcdir. In an in-source build this is usually | ||
6389 | # harmless because $srcdir is `.', but things will broke when you | ||
6390 | # start a VPATH build or use an absolute $srcdir. | ||
6391 | # | ||
6392 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, | ||
6393 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: | ||
6394 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` | ||
6395 | # and then we would define $MISSING as | ||
6396 | # MISSING="\${SHELL} $am_aux_dir/missing" | ||
6397 | # This will work as long as MISSING is not called from configure, because | ||
6398 | # unfortunately $(top_srcdir) has no meaning in configure. | ||
6399 | # However there are other variables, like CC, which are often used in | ||
6400 | # configure, and could therefore not use this "fixed" $ac_aux_dir. | ||
6401 | # | ||
6402 | # Another solution, used here, is to always expand $ac_aux_dir to an | ||
6403 | # absolute PATH. The drawback is that using absolute paths prevent a | ||
6404 | # configured tree to be moved without reconfiguration. | ||
6405 | |||
6406 | AC_DEFUN([AM_AUX_DIR_EXPAND], | ||
6407 | [dnl Rely on autoconf to set up CDPATH properly. | ||
6408 | AC_PREREQ([2.50])dnl | ||
6409 | # expand $ac_aux_dir to an absolute path | ||
6410 | am_aux_dir=`cd $ac_aux_dir && pwd` | ||
6411 | ]) | ||
6412 | |||
6413 | # AM_CONDITIONAL -*- Autoconf -*- | ||
6414 | |||
6415 | # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 | ||
6416 | # Free Software Foundation, Inc. | ||
6417 | # | ||
6418 | # This file is free software; the Free Software Foundation | ||
6419 | # gives unlimited permission to copy and/or distribute it, | ||
6420 | # with or without modifications, as long as this notice is preserved. | ||
6421 | |||
6422 | # serial 7 | ||
6423 | |||
6424 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) | ||
6425 | # ------------------------------------- | ||
6426 | # Define a conditional. | ||
6427 | AC_DEFUN([AM_CONDITIONAL], | ||
6428 | [AC_PREREQ(2.52)dnl | ||
6429 | ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], | ||
6430 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl | ||
6431 | AC_SUBST([$1_TRUE]) | ||
6432 | AC_SUBST([$1_FALSE]) | ||
6433 | if $2; then | ||
6434 | $1_TRUE= | ||
6435 | $1_FALSE='#' | ||
6436 | else | ||
6437 | $1_TRUE='#' | ||
6438 | $1_FALSE= | ||
6439 | fi | ||
6440 | AC_CONFIG_COMMANDS_PRE( | ||
6441 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then | ||
6442 | AC_MSG_ERROR([[conditional "$1" was never defined. | ||
6443 | Usually this means the macro was only invoked conditionally.]]) | ||
6444 | fi])]) | ||
6445 | |||
6446 | |||
6447 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 | ||
6448 | # Free Software Foundation, Inc. | ||
6449 | # | ||
6450 | # This file is free software; the Free Software Foundation | ||
6451 | # gives unlimited permission to copy and/or distribute it, | ||
6452 | # with or without modifications, as long as this notice is preserved. | ||
6453 | |||
6454 | # serial 8 | ||
6455 | |||
6456 | # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be | ||
6457 | # written in clear, in which case automake, when reading aclocal.m4, | ||
6458 | # will think it sees a *use*, and therefore will trigger all it's | ||
6459 | # C support machinery. Also note that it means that autoscan, seeing | ||
6460 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... | ||
6461 | |||
6462 | |||
6463 | # _AM_DEPENDENCIES(NAME) | ||
6464 | # ---------------------- | ||
6465 | # See how the compiler implements dependency checking. | ||
6466 | # NAME is "CC", "CXX", "GCJ", or "OBJC". | ||
6467 | # We try a few techniques and use that to set a single cache variable. | ||
6468 | # | ||
6469 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was | ||
6470 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular | ||
6471 | # dependency, and given that the user is not expected to run this macro, | ||
6472 | # just rely on AC_PROG_CC. | ||
6473 | AC_DEFUN([_AM_DEPENDENCIES], | ||
6474 | [AC_REQUIRE([AM_SET_DEPDIR])dnl | ||
6475 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl | ||
6476 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl | ||
6477 | AC_REQUIRE([AM_DEP_TRACK])dnl | ||
6478 | |||
6479 | ifelse([$1], CC, [depcc="$CC" am_compiler_list=], | ||
6480 | [$1], CXX, [depcc="$CXX" am_compiler_list=], | ||
6481 | [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], | ||
6482 | [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], | ||
6483 | [depcc="$$1" am_compiler_list=]) | ||
6484 | |||
6485 | AC_CACHE_CHECK([dependency style of $depcc], | ||
6486 | [am_cv_$1_dependencies_compiler_type], | ||
6487 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | ||
6488 | # We make a subdir and do the tests there. Otherwise we can end up | ||
6489 | # making bogus files that we don't know about and never remove. For | ||
6490 | # instance it was reported that on HP-UX the gcc test will end up | ||
6491 | # making a dummy file named `D' -- because `-MD' means `put the output | ||
6492 | # in D'. | ||
6493 | mkdir conftest.dir | ||
6494 | # Copy depcomp to subdir because otherwise we won't find it if we're | ||
6495 | # using a relative directory. | ||
6496 | cp "$am_depcomp" conftest.dir | ||
6497 | cd conftest.dir | ||
6498 | # We will build objects and dependencies in a subdirectory because | ||
6499 | # it helps to detect inapplicable dependency modes. For instance | ||
6500 | # both Tru64's cc and ICC support -MD to output dependencies as a | ||
6501 | # side effect of compilation, but ICC will put the dependencies in | ||
6502 | # the current directory while Tru64 will put them in the object | ||
6503 | # directory. | ||
6504 | mkdir sub | ||
6505 | |||
6506 | am_cv_$1_dependencies_compiler_type=none | ||
6507 | if test "$am_compiler_list" = ""; then | ||
6508 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` | ||
6509 | fi | ||
6510 | for depmode in $am_compiler_list; do | ||
6511 | # Setup a source with many dependencies, because some compilers | ||
6512 | # like to wrap large dependency lists on column 80 (with \), and | ||
6513 | # we should not choose a depcomp mode which is confused by this. | ||
6514 | # | ||
6515 | # We need to recreate these files for each test, as the compiler may | ||
6516 | # overwrite some of them when testing with obscure command lines. | ||
6517 | # This happens at least with the AIX C compiler. | ||
6518 | : > sub/conftest.c | ||
6519 | for i in 1 2 3 4 5 6; do | ||
6520 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | ||
6521 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | ||
6522 | # Solaris 8's {/usr,}/bin/sh. | ||
6523 | touch sub/conftst$i.h | ||
6524 | done | ||
6525 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | ||
6526 | |||
6527 | case $depmode in | ||
6528 | nosideeffect) | ||
6529 | # after this tag, mechanisms are not by side-effect, so they'll | ||
6530 | # only be used when explicitly requested | ||
6531 | if test "x$enable_dependency_tracking" = xyes; then | ||
6532 | continue | ||
6533 | else | ||
6534 | break | ||
6535 | fi | ||
6536 | ;; | ||
6537 | none) break ;; | ||
6538 | esac | ||
6539 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | ||
6540 | # mode. It turns out that the SunPro C++ compiler does not properly | ||
6541 | # handle `-M -o', and we need to detect this. | ||
6542 | if depmode=$depmode \ | ||
6543 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | ||
6544 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | ||
6545 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ | ||
6546 | >/dev/null 2>conftest.err && | ||
6547 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | ||
6548 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && | ||
6549 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | ||
6550 | # icc doesn't choke on unknown options, it will just issue warnings | ||
6551 | # or remarks (even with -Werror). So we grep stderr for any message | ||
6552 | # that says an option was ignored or not supported. | ||
6553 | # When given -MP, icc 7.0 and 7.1 complain thusly: | ||
6554 | # icc: Command line warning: ignoring option '-M'; no argument required | ||
6555 | # The diagnosis changed in icc 8.0: | ||
6556 | # icc: Command line remark: option '-MP' not supported | ||
6557 | if (grep 'ignoring option' conftest.err || | ||
6558 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | ||
6559 | am_cv_$1_dependencies_compiler_type=$depmode | ||
6560 | break | ||
6561 | fi | ||
6562 | fi | ||
6563 | done | ||
6564 | |||
6565 | cd .. | ||
6566 | rm -rf conftest.dir | ||
6567 | else | ||
6568 | am_cv_$1_dependencies_compiler_type=none | ||
6569 | fi | ||
6570 | ]) | ||
6571 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) | ||
6572 | AM_CONDITIONAL([am__fastdep$1], [ | ||
6573 | test "x$enable_dependency_tracking" != xno \ | ||
6574 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) | ||
6575 | ]) | ||
6576 | |||
6577 | |||
6578 | # AM_SET_DEPDIR | ||
6579 | # ------------- | ||
6580 | # Choose a directory name for dependency files. | ||
6581 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES | ||
6582 | AC_DEFUN([AM_SET_DEPDIR], | ||
6583 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl | ||
6584 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl | ||
6585 | ]) | ||
6586 | |||
6587 | |||
6588 | # AM_DEP_TRACK | ||
6589 | # ------------ | ||
6590 | AC_DEFUN([AM_DEP_TRACK], | ||
6591 | [AC_ARG_ENABLE(dependency-tracking, | ||
6592 | [ --disable-dependency-tracking speeds up one-time build | ||
6593 | --enable-dependency-tracking do not reject slow dependency extractors]) | ||
6594 | if test "x$enable_dependency_tracking" != xno; then | ||
6595 | am_depcomp="$ac_aux_dir/depcomp" | ||
6596 | AMDEPBACKSLASH='\' | ||
6597 | fi | ||
6598 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) | ||
6599 | AC_SUBST([AMDEPBACKSLASH]) | ||
6600 | ]) | ||
6601 | |||
6602 | # Generate code to set up dependency tracking. -*- Autoconf -*- | ||
6603 | |||
6604 | # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 | ||
6605 | # Free Software Foundation, Inc. | ||
6606 | # | ||
6607 | # This file is free software; the Free Software Foundation | ||
6608 | # gives unlimited permission to copy and/or distribute it, | ||
6609 | # with or without modifications, as long as this notice is preserved. | ||
6610 | |||
6611 | #serial 3 | ||
6612 | |||
6613 | # _AM_OUTPUT_DEPENDENCY_COMMANDS | ||
6614 | # ------------------------------ | ||
6615 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], | ||
6616 | [for mf in $CONFIG_FILES; do | ||
6617 | # Strip MF so we end up with the name of the file. | ||
6618 | mf=`echo "$mf" | sed -e 's/:.*$//'` | ||
6619 | # Check whether this is an Automake generated Makefile or not. | ||
6620 | # We used to match only the files named `Makefile.in', but | ||
6621 | # some people rename them; so instead we look at the file content. | ||
6622 | # Grep'ing the first line is not enough: some people post-process | ||
6623 | # each Makefile.in and add a new line on top of each file to say so. | ||
6624 | # So let's grep whole file. | ||
6625 | if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then | ||
6626 | dirpart=`AS_DIRNAME("$mf")` | ||
6627 | else | ||
6628 | continue | ||
6629 | fi | ||
6630 | # Extract the definition of DEPDIR, am__include, and am__quote | ||
6631 | # from the Makefile without running `make'. | ||
6632 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | ||
6633 | test -z "$DEPDIR" && continue | ||
6634 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | ||
6635 | test -z "am__include" && continue | ||
6636 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | ||
6637 | # When using ansi2knr, U may be empty or an underscore; expand it | ||
6638 | U=`sed -n 's/^U = //p' < "$mf"` | ||
6639 | # Find all dependency output files, they are included files with | ||
6640 | # $(DEPDIR) in their names. We invoke sed twice because it is the | ||
6641 | # simplest approach to changing $(DEPDIR) to its actual value in the | ||
6642 | # expansion. | ||
6643 | for file in `sed -n " | ||
6644 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | ||
6645 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | ||
6646 | # Make sure the directory exists. | ||
6647 | test -f "$dirpart/$file" && continue | ||
6648 | fdir=`AS_DIRNAME(["$file"])` | ||
6649 | AS_MKDIR_P([$dirpart/$fdir]) | ||
6650 | # echo "creating $dirpart/$file" | ||
6651 | echo '# dummy' > "$dirpart/$file" | ||
6652 | done | ||
6653 | done | ||
6654 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS | ||
6655 | |||
6656 | |||
6657 | # AM_OUTPUT_DEPENDENCY_COMMANDS | ||
6658 | # ----------------------------- | ||
6659 | # This macro should only be invoked once -- use via AC_REQUIRE. | ||
6660 | # | ||
6661 | # This code is only required when automatic dependency tracking | ||
6662 | # is enabled. FIXME. This creates each `.P' file that we will | ||
6663 | # need in order to bootstrap the dependency handling code. | ||
6664 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], | ||
6665 | [AC_CONFIG_COMMANDS([depfiles], | ||
6666 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], | ||
6667 | [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) | ||
6668 | ]) | ||
6669 | |||
6670 | # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 | ||
6671 | # Free Software Foundation, Inc. | ||
6672 | # | ||
6673 | # This file is free software; the Free Software Foundation | ||
6674 | # gives unlimited permission to copy and/or distribute it, | ||
6675 | # with or without modifications, as long as this notice is preserved. | ||
6676 | |||
6677 | # serial 8 | ||
6678 | |||
6679 | # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. | ||
6680 | AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) | ||
6681 | |||
6682 | # Do all the work for Automake. -*- Autoconf -*- | ||
6683 | |||
6684 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 | ||
6685 | # Free Software Foundation, Inc. | ||
6686 | # | ||
6687 | # This file is free software; the Free Software Foundation | ||
6688 | # gives unlimited permission to copy and/or distribute it, | ||
6689 | # with or without modifications, as long as this notice is preserved. | ||
6690 | |||
6691 | # serial 12 | ||
6692 | |||
6693 | # This macro actually does too much. Some checks are only needed if | ||
6694 | # your package does certain things. But this isn't really a big deal. | ||
6695 | |||
6696 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) | ||
6697 | # AM_INIT_AUTOMAKE([OPTIONS]) | ||
6698 | # ----------------------------------------------- | ||
6699 | # The call with PACKAGE and VERSION arguments is the old style | ||
6700 | # call (pre autoconf-2.50), which is being phased out. PACKAGE | ||
6701 | # and VERSION should now be passed to AC_INIT and removed from | ||
6702 | # the call to AM_INIT_AUTOMAKE. | ||
6703 | # We support both call styles for the transition. After | ||
6704 | # the next Automake release, Autoconf can make the AC_INIT | ||
6705 | # arguments mandatory, and then we can depend on a new Autoconf | ||
6706 | # release and drop the old call support. | ||
6707 | AC_DEFUN([AM_INIT_AUTOMAKE], | ||
6708 | [AC_PREREQ([2.58])dnl | ||
6709 | dnl Autoconf wants to disallow AM_ names. We explicitly allow | ||
6710 | dnl the ones we care about. | ||
6711 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl | ||
6712 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl | ||
6713 | AC_REQUIRE([AC_PROG_INSTALL])dnl | ||
6714 | # test to see if srcdir already configured | ||
6715 | if test "`cd $srcdir && pwd`" != "`pwd`" && | ||
6716 | test -f $srcdir/config.status; then | ||
6717 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | ||
6718 | fi | ||
6719 | |||
6720 | # test whether we have cygpath | ||
6721 | if test -z "$CYGPATH_W"; then | ||
6722 | if (cygpath --version) >/dev/null 2>/dev/null; then | ||
6723 | CYGPATH_W='cygpath -w' | ||
6724 | else | ||
6725 | CYGPATH_W=echo | ||
6726 | fi | ||
6727 | fi | ||
6728 | AC_SUBST([CYGPATH_W]) | ||
6729 | |||
6730 | # Define the identity of the package. | ||
6731 | dnl Distinguish between old-style and new-style calls. | ||
6732 | m4_ifval([$2], | ||
6733 | [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl | ||
6734 | AC_SUBST([PACKAGE], [$1])dnl | ||
6735 | AC_SUBST([VERSION], [$2])], | ||
6736 | [_AM_SET_OPTIONS([$1])dnl | ||
6737 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl | ||
6738 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl | ||
6739 | |||
6740 | _AM_IF_OPTION([no-define],, | ||
6741 | [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) | ||
6742 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl | ||
6743 | |||
6744 | # Some tools Automake needs. | ||
6745 | AC_REQUIRE([AM_SANITY_CHECK])dnl | ||
6746 | AC_REQUIRE([AC_ARG_PROGRAM])dnl | ||
6747 | AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) | ||
6748 | AM_MISSING_PROG(AUTOCONF, autoconf) | ||
6749 | AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) | ||
6750 | AM_MISSING_PROG(AUTOHEADER, autoheader) | ||
6751 | AM_MISSING_PROG(MAKEINFO, makeinfo) | ||
6752 | AM_PROG_INSTALL_SH | ||
6753 | AM_PROG_INSTALL_STRIP | ||
6754 | AC_REQUIRE([AM_PROG_MKDIR_P])dnl | ||
6755 | # We need awk for the "check" target. The system "awk" is bad on | ||
6756 | # some platforms. | ||
6757 | AC_REQUIRE([AC_PROG_AWK])dnl | ||
6758 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl | ||
6759 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl | ||
6760 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], | ||
6761 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], | ||
6762 | [_AM_PROG_TAR([v7])])]) | ||
6763 | _AM_IF_OPTION([no-dependencies],, | ||
6764 | [AC_PROVIDE_IFELSE([AC_PROG_CC], | ||
6765 | [_AM_DEPENDENCIES(CC)], | ||
6766 | [define([AC_PROG_CC], | ||
6767 | defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl | ||
6768 | AC_PROVIDE_IFELSE([AC_PROG_CXX], | ||
6769 | [_AM_DEPENDENCIES(CXX)], | ||
6770 | [define([AC_PROG_CXX], | ||
6771 | defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl | ||
6772 | ]) | ||
6773 | ]) | ||
6774 | |||
6775 | |||
6776 | # When config.status generates a header, we must update the stamp-h file. | ||
6777 | # This file resides in the same directory as the config header | ||
6778 | # that is generated. The stamp files are numbered to have different names. | ||
6779 | |||
6780 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the | ||
6781 | # loop where config.status creates the headers, so we can generate | ||
6782 | # our stamp files there. | ||
6783 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], | ||
6784 | [# Compute $1's index in $config_headers. | ||
6785 | _am_stamp_count=1 | ||
6786 | for _am_header in $config_headers :; do | ||
6787 | case $_am_header in | ||
6788 | $1 | $1:* ) | ||
6789 | break ;; | ||
6790 | * ) | ||
6791 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | ||
6792 | esac | ||
6793 | done | ||
6794 | echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) | ||
6795 | |||
6796 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. | ||
6797 | # | ||
6798 | # This file is free software; the Free Software Foundation | ||
6799 | # gives unlimited permission to copy and/or distribute it, | ||
6800 | # with or without modifications, as long as this notice is preserved. | ||
6801 | |||
6802 | # AM_PROG_INSTALL_SH | ||
6803 | # ------------------ | ||
6804 | # Define $install_sh. | ||
6805 | AC_DEFUN([AM_PROG_INSTALL_SH], | ||
6806 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | ||
6807 | install_sh=${install_sh-"$am_aux_dir/install-sh"} | ||
6808 | AC_SUBST(install_sh)]) | ||
6809 | |||
6810 | # Copyright (C) 2003, 2005 Free Software Foundation, Inc. | ||
6811 | # | ||
6812 | # This file is free software; the Free Software Foundation | ||
6813 | # gives unlimited permission to copy and/or distribute it, | ||
6814 | # with or without modifications, as long as this notice is preserved. | ||
6815 | |||
6816 | # serial 2 | ||
6817 | |||
6818 | # Check whether the underlying file-system supports filenames | ||
6819 | # with a leading dot. For instance MS-DOS doesn't. | ||
6820 | AC_DEFUN([AM_SET_LEADING_DOT], | ||
6821 | [rm -rf .tst 2>/dev/null | ||
6822 | mkdir .tst 2>/dev/null | ||
6823 | if test -d .tst; then | ||
6824 | am__leading_dot=. | ||
6825 | else | ||
6826 | am__leading_dot=_ | ||
6827 | fi | ||
6828 | rmdir .tst 2>/dev/null | ||
6829 | AC_SUBST([am__leading_dot])]) | ||
6830 | |||
6831 | # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- | ||
6832 | # From Jim Meyering | ||
6833 | |||
6834 | # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 | ||
6835 | # Free Software Foundation, Inc. | ||
6836 | # | ||
6837 | # This file is free software; the Free Software Foundation | ||
6838 | # gives unlimited permission to copy and/or distribute it, | ||
6839 | # with or without modifications, as long as this notice is preserved. | ||
6840 | |||
6841 | # serial 4 | ||
6842 | |||
6843 | AC_DEFUN([AM_MAINTAINER_MODE], | ||
6844 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | ||
6845 | dnl maintainer-mode is disabled by default | ||
6846 | AC_ARG_ENABLE(maintainer-mode, | ||
6847 | [ --enable-maintainer-mode enable make rules and dependencies not useful | ||
6848 | (and sometimes confusing) to the casual installer], | ||
6849 | USE_MAINTAINER_MODE=$enableval, | ||
6850 | USE_MAINTAINER_MODE=no) | ||
6851 | AC_MSG_RESULT([$USE_MAINTAINER_MODE]) | ||
6852 | AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) | ||
6853 | MAINT=$MAINTAINER_MODE_TRUE | ||
6854 | AC_SUBST(MAINT)dnl | ||
6855 | ] | ||
6856 | ) | ||
6857 | |||
6858 | AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) | ||
6859 | |||
6860 | # Check to see how 'make' treats includes. -*- Autoconf -*- | ||
6861 | |||
6862 | # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. | ||
6863 | # | ||
6864 | # This file is free software; the Free Software Foundation | ||
6865 | # gives unlimited permission to copy and/or distribute it, | ||
6866 | # with or without modifications, as long as this notice is preserved. | ||
6867 | |||
6868 | # serial 3 | ||
6869 | |||
6870 | # AM_MAKE_INCLUDE() | ||
6871 | # ----------------- | ||
6872 | # Check to see how make treats includes. | ||
6873 | AC_DEFUN([AM_MAKE_INCLUDE], | ||
6874 | [am_make=${MAKE-make} | ||
6875 | cat > confinc << 'END' | ||
6876 | am__doit: | ||
6877 | @echo done | ||
6878 | .PHONY: am__doit | ||
6879 | END | ||
6880 | # If we don't find an include directive, just comment out the code. | ||
6881 | AC_MSG_CHECKING([for style of include used by $am_make]) | ||
6882 | am__include="#" | ||
6883 | am__quote= | ||
6884 | _am_result=none | ||
6885 | # First try GNU make style include. | ||
6886 | echo "include confinc" > confmf | ||
6887 | # We grep out `Entering directory' and `Leaving directory' | ||
6888 | # messages which can occur if `w' ends up in MAKEFLAGS. | ||
6889 | # In particular we don't look at `^make:' because GNU make might | ||
6890 | # be invoked under some other name (usually "gmake"), in which | ||
6891 | # case it prints its new name instead of `make'. | ||
6892 | if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then | ||
6893 | am__include=include | ||
6894 | am__quote= | ||
6895 | _am_result=GNU | ||
6896 | fi | ||
6897 | # Now try BSD make style include. | ||
6898 | if test "$am__include" = "#"; then | ||
6899 | echo '.include "confinc"' > confmf | ||
6900 | if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then | ||
6901 | am__include=.include | ||
6902 | am__quote="\"" | ||
6903 | _am_result=BSD | ||
6904 | fi | ||
6905 | fi | ||
6906 | AC_SUBST([am__include]) | ||
6907 | AC_SUBST([am__quote]) | ||
6908 | AC_MSG_RESULT([$_am_result]) | ||
6909 | rm -f confinc confmf | ||
6910 | ]) | ||
6911 | |||
6912 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- | ||
6913 | |||
6914 | # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 | ||
6915 | # Free Software Foundation, Inc. | ||
6916 | # | ||
6917 | # This file is free software; the Free Software Foundation | ||
6918 | # gives unlimited permission to copy and/or distribute it, | ||
6919 | # with or without modifications, as long as this notice is preserved. | ||
6920 | |||
6921 | # serial 4 | ||
6922 | |||
6923 | # AM_MISSING_PROG(NAME, PROGRAM) | ||
6924 | # ------------------------------ | ||
6925 | AC_DEFUN([AM_MISSING_PROG], | ||
6926 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) | ||
6927 | $1=${$1-"${am_missing_run}$2"} | ||
6928 | AC_SUBST($1)]) | ||
6929 | |||
6930 | |||
6931 | # AM_MISSING_HAS_RUN | ||
6932 | # ------------------ | ||
6933 | # Define MISSING if not defined so far and test if it supports --run. | ||
6934 | # If it does, set am_missing_run to use it, otherwise, to nothing. | ||
6935 | AC_DEFUN([AM_MISSING_HAS_RUN], | ||
6936 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl | ||
6937 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" | ||
6938 | # Use eval to expand $SHELL | ||
6939 | if eval "$MISSING --run true"; then | ||
6940 | am_missing_run="$MISSING --run " | ||
6941 | else | ||
6942 | am_missing_run= | ||
6943 | AC_MSG_WARN([`missing' script is too old or missing]) | ||
6944 | fi | ||
6945 | ]) | ||
6946 | |||
6947 | # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. | ||
6948 | # | ||
6949 | # This file is free software; the Free Software Foundation | ||
6950 | # gives unlimited permission to copy and/or distribute it, | ||
6951 | # with or without modifications, as long as this notice is preserved. | ||
6952 | |||
6953 | # AM_PROG_MKDIR_P | ||
6954 | # --------------- | ||
6955 | # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. | ||
6956 | # | ||
6957 | # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories | ||
6958 | # created by `make install' are always world readable, even if the | ||
6959 | # installer happens to have an overly restrictive umask (e.g. 077). | ||
6960 | # This was a mistake. There are at least two reasons why we must not | ||
6961 | # use `-m 0755': | ||
6962 | # - it causes special bits like SGID to be ignored, | ||
6963 | # - it may be too restrictive (some setups expect 775 directories). | ||
6964 | # | ||
6965 | # Do not use -m 0755 and let people choose whatever they expect by | ||
6966 | # setting umask. | ||
6967 | # | ||
6968 | # We cannot accept any implementation of `mkdir' that recognizes `-p'. | ||
6969 | # Some implementations (such as Solaris 8's) are not thread-safe: if a | ||
6970 | # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' | ||
6971 | # concurrently, both version can detect that a/ is missing, but only | ||
6972 | # one can create it and the other will error out. Consequently we | ||
6973 | # restrict ourselves to GNU make (using the --version option ensures | ||
6974 | # this.) | ||
6975 | AC_DEFUN([AM_PROG_MKDIR_P], | ||
6976 | [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then | ||
6977 | # We used to keeping the `.' as first argument, in order to | ||
6978 | # allow $(mkdir_p) to be used without argument. As in | ||
6979 | # $(mkdir_p) $(somedir) | ||
6980 | # where $(somedir) is conditionally defined. However this is wrong | ||
6981 | # for two reasons: | ||
6982 | # 1. if the package is installed by a user who cannot write `.' | ||
6983 | # make install will fail, | ||
6984 | # 2. the above comment should most certainly read | ||
6985 | # $(mkdir_p) $(DESTDIR)$(somedir) | ||
6986 | # so it does not work when $(somedir) is undefined and | ||
6987 | # $(DESTDIR) is not. | ||
6988 | # To support the latter case, we have to write | ||
6989 | # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), | ||
6990 | # so the `.' trick is pointless. | ||
6991 | mkdir_p='mkdir -p --' | ||
6992 | else | ||
6993 | # On NextStep and OpenStep, the `mkdir' command does not | ||
6994 | # recognize any option. It will interpret all options as | ||
6995 | # directories to create, and then abort because `.' already | ||
6996 | # exists. | ||
6997 | for d in ./-p ./--version; | ||
6998 | do | ||
6999 | test -d $d && rmdir $d | ||
7000 | done | ||
7001 | # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. | ||
7002 | if test -f "$ac_aux_dir/mkinstalldirs"; then | ||
7003 | mkdir_p='$(mkinstalldirs)' | ||
7004 | else | ||
7005 | mkdir_p='$(install_sh) -d' | ||
7006 | fi | ||
7007 | fi | ||
7008 | AC_SUBST([mkdir_p])]) | ||
7009 | |||
7010 | # Helper functions for option handling. -*- Autoconf -*- | ||
7011 | |||
7012 | # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. | ||
7013 | # | ||
7014 | # This file is free software; the Free Software Foundation | ||
7015 | # gives unlimited permission to copy and/or distribute it, | ||
7016 | # with or without modifications, as long as this notice is preserved. | ||
7017 | |||
7018 | # serial 3 | ||
7019 | |||
7020 | # _AM_MANGLE_OPTION(NAME) | ||
7021 | # ----------------------- | ||
7022 | AC_DEFUN([_AM_MANGLE_OPTION], | ||
7023 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) | ||
7024 | |||
7025 | # _AM_SET_OPTION(NAME) | ||
7026 | # ------------------------------ | ||
7027 | # Set option NAME. Presently that only means defining a flag for this option. | ||
7028 | AC_DEFUN([_AM_SET_OPTION], | ||
7029 | [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) | ||
7030 | |||
7031 | # _AM_SET_OPTIONS(OPTIONS) | ||
7032 | # ---------------------------------- | ||
7033 | # OPTIONS is a space-separated list of Automake options. | ||
7034 | AC_DEFUN([_AM_SET_OPTIONS], | ||
7035 | [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) | ||
7036 | |||
7037 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) | ||
7038 | # ------------------------------------------- | ||
7039 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. | ||
7040 | AC_DEFUN([_AM_IF_OPTION], | ||
7041 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) | ||
7042 | |||
7043 | # Check to make sure that the build environment is sane. -*- Autoconf -*- | ||
7044 | |||
7045 | # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 | ||
7046 | # Free Software Foundation, Inc. | ||
7047 | # | ||
7048 | # This file is free software; the Free Software Foundation | ||
7049 | # gives unlimited permission to copy and/or distribute it, | ||
7050 | # with or without modifications, as long as this notice is preserved. | ||
7051 | |||
7052 | # serial 4 | ||
7053 | |||
7054 | # AM_SANITY_CHECK | ||
7055 | # --------------- | ||
7056 | AC_DEFUN([AM_SANITY_CHECK], | ||
7057 | [AC_MSG_CHECKING([whether build environment is sane]) | ||
7058 | # Just in case | ||
7059 | sleep 1 | ||
7060 | echo timestamp > conftest.file | ||
7061 | # Do `set' in a subshell so we don't clobber the current shell's | ||
7062 | # arguments. Must try -L first in case configure is actually a | ||
7063 | # symlink; some systems play weird games with the mod time of symlinks | ||
7064 | # (eg FreeBSD returns the mod time of the symlink's containing | ||
7065 | # directory). | ||
7066 | if ( | ||
7067 | set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` | ||
7068 | if test "$[*]" = "X"; then | ||
7069 | # -L didn't work. | ||
7070 | set X `ls -t $srcdir/configure conftest.file` | ||
7071 | fi | ||
7072 | rm -f conftest.file | ||
7073 | if test "$[*]" != "X $srcdir/configure conftest.file" \ | ||
7074 | && test "$[*]" != "X conftest.file $srcdir/configure"; then | ||
7075 | |||
7076 | # If neither matched, then we have a broken ls. This can happen | ||
7077 | # if, for instance, CONFIG_SHELL is bash and it inherits a | ||
7078 | # broken ls alias from the environment. This has actually | ||
7079 | # happened. Such a system could not be considered "sane". | ||
7080 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | ||
7081 | alias in your environment]) | ||
7082 | fi | ||
7083 | |||
7084 | test "$[2]" = conftest.file | ||
7085 | ) | ||
7086 | then | ||
7087 | # Ok. | ||
7088 | : | ||
7089 | else | ||
7090 | AC_MSG_ERROR([newly created file is older than distributed files! | ||
7091 | Check your system clock]) | ||
7092 | fi | ||
7093 | AC_MSG_RESULT(yes)]) | ||
7094 | |||
7095 | # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. | ||
7096 | # | ||
7097 | # This file is free software; the Free Software Foundation | ||
7098 | # gives unlimited permission to copy and/or distribute it, | ||
7099 | # with or without modifications, as long as this notice is preserved. | ||
7100 | |||
7101 | # AM_PROG_INSTALL_STRIP | ||
7102 | # --------------------- | ||
7103 | # One issue with vendor `install' (even GNU) is that you can't | ||
7104 | # specify the program used to strip binaries. This is especially | ||
7105 | # annoying in cross-compiling environments, where the build's strip | ||
7106 | # is unlikely to handle the host's binaries. | ||
7107 | # Fortunately install-sh will honor a STRIPPROG variable, so we | ||
7108 | # always use install-sh in `make install-strip', and initialize | ||
7109 | # STRIPPROG with the value of the STRIP variable (set by the user). | ||
7110 | AC_DEFUN([AM_PROG_INSTALL_STRIP], | ||
7111 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl | ||
7112 | # Installed binaries are usually stripped using `strip' when the user | ||
7113 | # run `make install-strip'. However `strip' might not be the right | ||
7114 | # tool to use in cross-compilation environments, therefore Automake | ||
7115 | # will honor the `STRIP' environment variable to overrule this program. | ||
7116 | dnl Don't test for $cross_compiling = yes, because it might be `maybe'. | ||
7117 | if test "$cross_compiling" != no; then | ||
7118 | AC_CHECK_TOOL([STRIP], [strip], :) | ||
7119 | fi | ||
7120 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" | ||
7121 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) | ||
7122 | |||
7123 | # Check how to create a tarball. -*- Autoconf -*- | ||
7124 | |||
7125 | # Copyright (C) 2004, 2005 Free Software Foundation, Inc. | ||
7126 | # | ||
7127 | # This file is free software; the Free Software Foundation | ||
7128 | # gives unlimited permission to copy and/or distribute it, | ||
7129 | # with or without modifications, as long as this notice is preserved. | ||
7130 | |||
7131 | # serial 2 | ||
7132 | |||
7133 | # _AM_PROG_TAR(FORMAT) | ||
7134 | # -------------------- | ||
7135 | # Check how to create a tarball in format FORMAT. | ||
7136 | # FORMAT should be one of `v7', `ustar', or `pax'. | ||
7137 | # | ||
7138 | # Substitute a variable $(am__tar) that is a command | ||
7139 | # writing to stdout a FORMAT-tarball containing the directory | ||
7140 | # $tardir. | ||
7141 | # tardir=directory && $(am__tar) > result.tar | ||
7142 | # | ||
7143 | # Substitute a variable $(am__untar) that extract such | ||
7144 | # a tarball read from stdin. | ||
7145 | # $(am__untar) < result.tar | ||
7146 | AC_DEFUN([_AM_PROG_TAR], | ||
7147 | [# Always define AMTAR for backward compatibility. | ||
7148 | AM_MISSING_PROG([AMTAR], [tar]) | ||
7149 | m4_if([$1], [v7], | ||
7150 | [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], | ||
7151 | [m4_case([$1], [ustar],, [pax],, | ||
7152 | [m4_fatal([Unknown tar format])]) | ||
7153 | AC_MSG_CHECKING([how to create a $1 tar archive]) | ||
7154 | # Loop over all known methods to create a tar archive until one works. | ||
7155 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' | ||
7156 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} | ||
7157 | # Do not fold the above two line into one, because Tru64 sh and | ||
7158 | # Solaris sh will not grok spaces in the rhs of `-'. | ||
7159 | for _am_tool in $_am_tools | ||
7160 | do | ||
7161 | case $_am_tool in | ||
7162 | gnutar) | ||
7163 | for _am_tar in tar gnutar gtar; | ||
7164 | do | ||
7165 | AM_RUN_LOG([$_am_tar --version]) && break | ||
7166 | done | ||
7167 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' | ||
7168 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' | ||
7169 | am__untar="$_am_tar -xf -" | ||
7170 | ;; | ||
7171 | plaintar) | ||
7172 | # Must skip GNU tar: if it does not support --format= it doesn't create | ||
7173 | # ustar tarball either. | ||
7174 | (tar --version) >/dev/null 2>&1 && continue | ||
7175 | am__tar='tar chf - "$$tardir"' | ||
7176 | am__tar_='tar chf - "$tardir"' | ||
7177 | am__untar='tar xf -' | ||
7178 | ;; | ||
7179 | pax) | ||
7180 | am__tar='pax -L -x $1 -w "$$tardir"' | ||
7181 | am__tar_='pax -L -x $1 -w "$tardir"' | ||
7182 | am__untar='pax -r' | ||
7183 | ;; | ||
7184 | cpio) | ||
7185 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' | ||
7186 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' | ||
7187 | am__untar='cpio -i -H $1 -d' | ||
7188 | ;; | ||
7189 | none) | ||
7190 | am__tar=false | ||
7191 | am__tar_=false | ||
7192 | am__untar=false | ||
7193 | ;; | ||
7194 | esac | ||
7195 | |||
7196 | # If the value was cached, stop now. We just wanted to have am__tar | ||
7197 | # and am__untar set. | ||
7198 | test -n "${am_cv_prog_tar_$1}" && break | ||
7199 | |||
7200 | # tar/untar a dummy directory, and stop if the command works | ||
7201 | rm -rf conftest.dir | ||
7202 | mkdir conftest.dir | ||
7203 | echo GrepMe > conftest.dir/file | ||
7204 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) | ||
7205 | rm -rf conftest.dir | ||
7206 | if test -s conftest.tar; then | ||
7207 | AM_RUN_LOG([$am__untar <conftest.tar]) | ||
7208 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break | ||
7209 | fi | ||
7210 | done | ||
7211 | rm -rf conftest.dir | ||
7212 | |||
7213 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) | ||
7214 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) | ||
7215 | AC_SUBST([am__tar]) | ||
7216 | AC_SUBST([am__untar]) | ||
7217 | ]) # _AM_PROG_TAR | ||
7218 | |||
diff --git a/libltdl/config-h.in b/libltdl/config-h.in new file mode 100644 index 00000000..b8640710 --- /dev/null +++ b/libltdl/config-h.in | |||
@@ -0,0 +1,195 @@ | |||
1 | /* config-h.in. Generated from configure.ac by autoheader. */ | ||
2 | |||
3 | /* Define to 1 if you have the `argz_append' function. */ | ||
4 | #undef HAVE_ARGZ_APPEND | ||
5 | |||
6 | /* Define to 1 if you have the `argz_create_sep' function. */ | ||
7 | #undef HAVE_ARGZ_CREATE_SEP | ||
8 | |||
9 | /* Define to 1 if you have the <argz.h> header file. */ | ||
10 | #undef HAVE_ARGZ_H | ||
11 | |||
12 | /* Define to 1 if you have the `argz_insert' function. */ | ||
13 | #undef HAVE_ARGZ_INSERT | ||
14 | |||
15 | /* Define to 1 if you have the `argz_next' function. */ | ||
16 | #undef HAVE_ARGZ_NEXT | ||
17 | |||
18 | /* Define to 1 if you have the `argz_stringify' function. */ | ||
19 | #undef HAVE_ARGZ_STRINGIFY | ||
20 | |||
21 | /* Define to 1 if you have the <assert.h> header file. */ | ||
22 | #undef HAVE_ASSERT_H | ||
23 | |||
24 | /* Define to 1 if you have the `bcopy' function. */ | ||
25 | #undef HAVE_BCOPY | ||
26 | |||
27 | /* Define to 1 if you have the `closedir' function. */ | ||
28 | #undef HAVE_CLOSEDIR | ||
29 | |||
30 | /* Define to 1 if you have the <ctype.h> header file. */ | ||
31 | #undef HAVE_CTYPE_H | ||
32 | |||
33 | /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. | ||
34 | */ | ||
35 | #undef HAVE_DIRENT_H | ||
36 | |||
37 | /* Define if you have the GNU dld library. */ | ||
38 | #undef HAVE_DLD | ||
39 | |||
40 | /* Define to 1 if you have the <dld.h> header file. */ | ||
41 | #undef HAVE_DLD_H | ||
42 | |||
43 | /* Define to 1 if you have the `dlerror' function. */ | ||
44 | #undef HAVE_DLERROR | ||
45 | |||
46 | /* Define to 1 if you have the <dlfcn.h> header file. */ | ||
47 | #undef HAVE_DLFCN_H | ||
48 | |||
49 | /* Define to 1 if you have the <dl.h> header file. */ | ||
50 | #undef HAVE_DL_H | ||
51 | |||
52 | /* Define if you have the _dyld_func_lookup function. */ | ||
53 | #undef HAVE_DYLD | ||
54 | |||
55 | /* Define to 1 if you have the <errno.h> header file. */ | ||
56 | #undef HAVE_ERRNO_H | ||
57 | |||
58 | /* Define to 1 if the system has the type `error_t'. */ | ||
59 | #undef HAVE_ERROR_T | ||
60 | |||
61 | /* Define to 1 if you have the `index' function. */ | ||
62 | #undef HAVE_INDEX | ||
63 | |||
64 | /* Define to 1 if you have the <inttypes.h> header file. */ | ||
65 | #undef HAVE_INTTYPES_H | ||
66 | |||
67 | /* Define if you have the libdl library or equivalent. */ | ||
68 | #undef HAVE_LIBDL | ||
69 | |||
70 | /* Define to 1 if you have the <mach-o/dyld.h> header file. */ | ||
71 | #undef HAVE_MACH_O_DYLD_H | ||
72 | |||
73 | /* Define to 1 if you have the <malloc.h> header file. */ | ||
74 | #undef HAVE_MALLOC_H | ||
75 | |||
76 | /* Define to 1 if you have the `memcpy' function. */ | ||
77 | #undef HAVE_MEMCPY | ||
78 | |||
79 | /* Define to 1 if you have the `memmove' function. */ | ||
80 | #undef HAVE_MEMMOVE | ||
81 | |||
82 | /* Define to 1 if you have the <memory.h> header file. */ | ||
83 | #undef HAVE_MEMORY_H | ||
84 | |||
85 | /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ | ||
86 | #undef HAVE_NDIR_H | ||
87 | |||
88 | /* Define to 1 if you have the `opendir' function. */ | ||
89 | #undef HAVE_OPENDIR | ||
90 | |||
91 | /* Define if libtool can extract symbol lists from object files. */ | ||
92 | #undef HAVE_PRELOADED_SYMBOLS | ||
93 | |||
94 | /* Define to 1 if you have the `readdir' function. */ | ||
95 | #undef HAVE_READDIR | ||
96 | |||
97 | /* Define to 1 if you have the `rindex' function. */ | ||
98 | #undef HAVE_RINDEX | ||
99 | |||
100 | /* Define if you have the shl_load function. */ | ||
101 | #undef HAVE_SHL_LOAD | ||
102 | |||
103 | /* Define to 1 if you have the <stdint.h> header file. */ | ||
104 | #undef HAVE_STDINT_H | ||
105 | |||
106 | /* Define to 1 if you have the <stdio.h> header file. */ | ||
107 | #undef HAVE_STDIO_H | ||
108 | |||
109 | /* Define to 1 if you have the <stdlib.h> header file. */ | ||
110 | #undef HAVE_STDLIB_H | ||
111 | |||
112 | /* Define to 1 if you have the `strchr' function. */ | ||
113 | #undef HAVE_STRCHR | ||
114 | |||
115 | /* Define to 1 if you have the `strcmp' function. */ | ||
116 | #undef HAVE_STRCMP | ||
117 | |||
118 | /* Define to 1 if you have the <strings.h> header file. */ | ||
119 | #undef HAVE_STRINGS_H | ||
120 | |||
121 | /* Define to 1 if you have the <string.h> header file. */ | ||
122 | #undef HAVE_STRING_H | ||
123 | |||
124 | /* Define to 1 if you have the `strrchr' function. */ | ||
125 | #undef HAVE_STRRCHR | ||
126 | |||
127 | /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. | ||
128 | */ | ||
129 | #undef HAVE_SYS_DIR_H | ||
130 | |||
131 | /* Define to 1 if you have the <sys/dl.h> header file. */ | ||
132 | #undef HAVE_SYS_DL_H | ||
133 | |||
134 | /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. | ||
135 | */ | ||
136 | #undef HAVE_SYS_NDIR_H | ||
137 | |||
138 | /* Define to 1 if you have the <sys/stat.h> header file. */ | ||
139 | #undef HAVE_SYS_STAT_H | ||
140 | |||
141 | /* Define to 1 if you have the <sys/types.h> header file. */ | ||
142 | #undef HAVE_SYS_TYPES_H | ||
143 | |||
144 | /* Define to 1 if you have the <unistd.h> header file. */ | ||
145 | #undef HAVE_UNISTD_H | ||
146 | |||
147 | /* Define if the OS needs help to load dependent libraries for dlopen(). */ | ||
148 | #undef LTDL_DLOPEN_DEPLIBS | ||
149 | |||
150 | /* Define to the sub-directory in which libtool stores uninstalled libraries. | ||
151 | */ | ||
152 | #undef LTDL_OBJDIR | ||
153 | |||
154 | /* Define to the name of the environment variable that determines the dynamic | ||
155 | library search path. */ | ||
156 | #undef LTDL_SHLIBPATH_VAR | ||
157 | |||
158 | /* Define to the extension used for shared libraries, say, ".so". */ | ||
159 | #undef LTDL_SHLIB_EXT | ||
160 | |||
161 | /* Define to the system default library search path. */ | ||
162 | #undef LTDL_SYSSEARCHPATH | ||
163 | |||
164 | /* Define if dlsym() requires a leading underscore in symbol names. */ | ||
165 | #undef NEED_USCORE | ||
166 | |||
167 | /* Define to the address where bug reports for this package should be sent. */ | ||
168 | #undef PACKAGE_BUGREPORT | ||
169 | |||
170 | /* Define to the full name of this package. */ | ||
171 | #undef PACKAGE_NAME | ||
172 | |||
173 | /* Define to the full name and version of this package. */ | ||
174 | #undef PACKAGE_STRING | ||
175 | |||
176 | /* Define to the one symbol short name of this package. */ | ||
177 | #undef PACKAGE_TARNAME | ||
178 | |||
179 | /* Define to the version of this package. */ | ||
180 | #undef PACKAGE_VERSION | ||
181 | |||
182 | /* Define to 1 if you have the ANSI C header files. */ | ||
183 | #undef STDC_HEADERS | ||
184 | |||
185 | /* Define to empty if `const' does not conform to ANSI C. */ | ||
186 | #undef const | ||
187 | |||
188 | /* Define to a type to use for `error_t' if it is not otherwise available. */ | ||
189 | #undef error_t | ||
190 | |||
191 | /* Define to `__inline__' or `__inline' if that's what the C compiler | ||
192 | calls it, or to nothing if 'inline' is not supported under any name. */ | ||
193 | #ifndef __cplusplus | ||
194 | #undef inline | ||
195 | #endif | ||
diff --git a/libltdl/config.guess b/libltdl/config.guess new file mode 100755 index 00000000..45bee139 --- /dev/null +++ b/libltdl/config.guess | |||
@@ -0,0 +1,1465 @@ | |||
1 | #! /bin/sh | ||
2 | # Attempt to guess a canonical system name. | ||
3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | ||
4 | # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
5 | |||
6 | timestamp='2005-04-22' | ||
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, write to the Free Software | ||
20 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
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 | # Originally written by Per Bothner <per@bothner.com>. | ||
28 | # Please send patches to <config-patches@gnu.org>. Submit a context | ||
29 | # diff and a properly formatted ChangeLog 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 | # The plan is that this can be called by configure scripts if you | ||
36 | # don't specify an explicit build system type. | ||
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, 2001, 2002, 2003, 2004, 2005 | ||
57 | Free Software Foundation, Inc. | ||
58 | |||
59 | This is free software; see the source for copying conditions. There is NO | ||
60 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | ||
61 | |||
62 | help=" | ||
63 | Try \`$me --help' for more information." | ||
64 | |||
65 | # Parse command line | ||
66 | while test $# -gt 0 ; do | ||
67 | case $1 in | ||
68 | --time-stamp | --time* | -t ) | ||
69 | echo "$timestamp" ; exit 0 ;; | ||
70 | --version | -v ) | ||
71 | echo "$version" ; exit 0 ;; | ||
72 | --help | --h* | -h ) | ||
73 | echo "$usage"; exit 0 ;; | ||
74 | -- ) # Stop option processing | ||
75 | shift; break ;; | ||
76 | - ) # Use stdin as input. | ||
77 | break ;; | ||
78 | -* ) | ||
79 | echo "$me: invalid option $1$help" >&2 | ||
80 | exit 1 ;; | ||
81 | * ) | ||
82 | break ;; | ||
83 | esac | ||
84 | done | ||
85 | |||
86 | if test $# != 0; then | ||
87 | echo "$me: too many arguments$help" >&2 | ||
88 | exit 1 | ||
89 | fi | ||
90 | |||
91 | trap 'exit 1' 1 2 15 | ||
92 | |||
93 | # CC_FOR_BUILD -- compiler used by this script. Note that the use of a | ||
94 | # compiler to aid in system detection is discouraged as it requires | ||
95 | # temporary files to be created and, as you can see below, it is a | ||
96 | # headache to deal with in a portable fashion. | ||
97 | |||
98 | # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still | ||
99 | # use `HOST_CC' if defined, but it is deprecated. | ||
100 | |||
101 | # Portable tmp directory creation inspired by the Autoconf team. | ||
102 | |||
103 | set_cc_for_build=' | ||
104 | trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; | ||
105 | trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; | ||
106 | : ${TMPDIR=/tmp} ; | ||
107 | { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || | ||
108 | { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || | ||
109 | { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || | ||
110 | { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; | ||
111 | dummy=$tmp/dummy ; | ||
112 | tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; | ||
113 | case $CC_FOR_BUILD,$HOST_CC,$CC in | ||
114 | ,,) echo "int x;" > $dummy.c ; | ||
115 | for c in cc gcc c89 c99 ; do | ||
116 | if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then | ||
117 | CC_FOR_BUILD="$c"; break ; | ||
118 | fi ; | ||
119 | done ; | ||
120 | if test x"$CC_FOR_BUILD" = x ; then | ||
121 | CC_FOR_BUILD=no_compiler_found ; | ||
122 | fi | ||
123 | ;; | ||
124 | ,,*) CC_FOR_BUILD=$CC ;; | ||
125 | ,*,*) CC_FOR_BUILD=$HOST_CC ;; | ||
126 | esac ;' | ||
127 | |||
128 | # This is needed to find uname on a Pyramid OSx when run in the BSD universe. | ||
129 | # (ghazi@noc.rutgers.edu 1994-08-24) | ||
130 | if (test -f /.attbin/uname) >/dev/null 2>&1 ; then | ||
131 | PATH=$PATH:/.attbin ; export PATH | ||
132 | fi | ||
133 | |||
134 | UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown | ||
135 | UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown | ||
136 | UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown | ||
137 | UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown | ||
138 | |||
139 | # Note: order is significant - the case branches are not exclusive. | ||
140 | |||
141 | case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in | ||
142 | *:NetBSD:*:*) | ||
143 | # NetBSD (nbsd) targets should (where applicable) match one or | ||
144 | # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, | ||
145 | # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently | ||
146 | # switched to ELF, *-*-netbsd* would select the old | ||
147 | # object file format. This provides both forward | ||
148 | # compatibility and a consistent mechanism for selecting the | ||
149 | # object file format. | ||
150 | # | ||
151 | # Note: NetBSD doesn't particularly care about the vendor | ||
152 | # portion of the name. We always set it to "unknown". | ||
153 | sysctl="sysctl -n hw.machine_arch" | ||
154 | UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ | ||
155 | /usr/sbin/$sysctl 2>/dev/null || echo unknown)` | ||
156 | case "${UNAME_MACHINE_ARCH}" in | ||
157 | armeb) machine=armeb-unknown ;; | ||
158 | arm*) machine=arm-unknown ;; | ||
159 | sh3el) machine=shl-unknown ;; | ||
160 | sh3eb) machine=sh-unknown ;; | ||
161 | *) machine=${UNAME_MACHINE_ARCH}-unknown ;; | ||
162 | esac | ||
163 | # The Operating System including object format, if it has switched | ||
164 | # to ELF recently, or will in the future. | ||
165 | case "${UNAME_MACHINE_ARCH}" in | ||
166 | arm*|i386|m68k|ns32k|sh3*|sparc|vax) | ||
167 | eval $set_cc_for_build | ||
168 | if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | ||
169 | | grep __ELF__ >/dev/null | ||
170 | then | ||
171 | # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). | ||
172 | # Return netbsd for either. FIX? | ||
173 | os=netbsd | ||
174 | else | ||
175 | os=netbsdelf | ||
176 | fi | ||
177 | ;; | ||
178 | *) | ||
179 | os=netbsd | ||
180 | ;; | ||
181 | esac | ||
182 | # The OS release | ||
183 | # Debian GNU/NetBSD machines have a different userland, and | ||
184 | # thus, need a distinct triplet. However, they do not need | ||
185 | # kernel version information, so it can be replaced with a | ||
186 | # suitable tag, in the style of linux-gnu. | ||
187 | case "${UNAME_VERSION}" in | ||
188 | Debian*) | ||
189 | release='-gnu' | ||
190 | ;; | ||
191 | *) | ||
192 | release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` | ||
193 | ;; | ||
194 | esac | ||
195 | # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: | ||
196 | # contains redundant information, the shorter form: | ||
197 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. | ||
198 | echo "${machine}-${os}${release}" | ||
199 | exit 0 ;; | ||
200 | amd64:OpenBSD:*:*) | ||
201 | echo x86_64-unknown-openbsd${UNAME_RELEASE} | ||
202 | exit 0 ;; | ||
203 | amiga:OpenBSD:*:*) | ||
204 | echo m68k-unknown-openbsd${UNAME_RELEASE} | ||
205 | exit 0 ;; | ||
206 | cats:OpenBSD:*:*) | ||
207 | echo arm-unknown-openbsd${UNAME_RELEASE} | ||
208 | exit 0 ;; | ||
209 | hp300:OpenBSD:*:*) | ||
210 | echo m68k-unknown-openbsd${UNAME_RELEASE} | ||
211 | exit 0 ;; | ||
212 | luna88k:OpenBSD:*:*) | ||
213 | echo m88k-unknown-openbsd${UNAME_RELEASE} | ||
214 | exit 0 ;; | ||
215 | mac68k:OpenBSD:*:*) | ||
216 | echo m68k-unknown-openbsd${UNAME_RELEASE} | ||
217 | exit 0 ;; | ||
218 | macppc:OpenBSD:*:*) | ||
219 | echo powerpc-unknown-openbsd${UNAME_RELEASE} | ||
220 | exit 0 ;; | ||
221 | mvme68k:OpenBSD:*:*) | ||
222 | echo m68k-unknown-openbsd${UNAME_RELEASE} | ||
223 | exit 0 ;; | ||
224 | mvme88k:OpenBSD:*:*) | ||
225 | echo m88k-unknown-openbsd${UNAME_RELEASE} | ||
226 | exit 0 ;; | ||
227 | mvmeppc:OpenBSD:*:*) | ||
228 | echo powerpc-unknown-openbsd${UNAME_RELEASE} | ||
229 | exit 0 ;; | ||
230 | sgi:OpenBSD:*:*) | ||
231 | echo mips64-unknown-openbsd${UNAME_RELEASE} | ||
232 | exit 0 ;; | ||
233 | sun3:OpenBSD:*:*) | ||
234 | echo m68k-unknown-openbsd${UNAME_RELEASE} | ||
235 | exit 0 ;; | ||
236 | *:OpenBSD:*:*) | ||
237 | echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} | ||
238 | exit 0 ;; | ||
239 | *:ekkoBSD:*:*) | ||
240 | echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} | ||
241 | exit 0 ;; | ||
242 | macppc:MirBSD:*:*) | ||
243 | echo powerppc-unknown-mirbsd${UNAME_RELEASE} | ||
244 | exit 0 ;; | ||
245 | *:MirBSD:*:*) | ||
246 | echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} | ||
247 | exit 0 ;; | ||
248 | alpha:OSF1:*:*) | ||
249 | case $UNAME_RELEASE in | ||
250 | *4.0) | ||
251 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` | ||
252 | ;; | ||
253 | *5.*) | ||
254 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | ||
255 | ;; | ||
256 | esac | ||
257 | # According to Compaq, /usr/sbin/psrinfo has been available on | ||
258 | # OSF/1 and Tru64 systems produced since 1995. I hope that | ||
259 | # covers most systems running today. This code pipes the CPU | ||
260 | # types through head -n 1, so we only detect the type of CPU 0. | ||
261 | ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` | ||
262 | case "$ALPHA_CPU_TYPE" in | ||
263 | "EV4 (21064)") | ||
264 | UNAME_MACHINE="alpha" ;; | ||
265 | "EV4.5 (21064)") | ||
266 | UNAME_MACHINE="alpha" ;; | ||
267 | "LCA4 (21066/21068)") | ||
268 | UNAME_MACHINE="alpha" ;; | ||
269 | "EV5 (21164)") | ||
270 | UNAME_MACHINE="alphaev5" ;; | ||
271 | "EV5.6 (21164A)") | ||
272 | UNAME_MACHINE="alphaev56" ;; | ||
273 | "EV5.6 (21164PC)") | ||
274 | UNAME_MACHINE="alphapca56" ;; | ||
275 | "EV5.7 (21164PC)") | ||
276 | UNAME_MACHINE="alphapca57" ;; | ||
277 | "EV6 (21264)") | ||
278 | UNAME_MACHINE="alphaev6" ;; | ||
279 | "EV6.7 (21264A)") | ||
280 | UNAME_MACHINE="alphaev67" ;; | ||
281 | "EV6.8CB (21264C)") | ||
282 | UNAME_MACHINE="alphaev68" ;; | ||
283 | "EV6.8AL (21264B)") | ||
284 | UNAME_MACHINE="alphaev68" ;; | ||
285 | "EV6.8CX (21264D)") | ||
286 | UNAME_MACHINE="alphaev68" ;; | ||
287 | "EV6.9A (21264/EV69A)") | ||
288 | UNAME_MACHINE="alphaev69" ;; | ||
289 | "EV7 (21364)") | ||
290 | UNAME_MACHINE="alphaev7" ;; | ||
291 | "EV7.9 (21364A)") | ||
292 | UNAME_MACHINE="alphaev79" ;; | ||
293 | esac | ||
294 | # A Pn.n version is a patched version. | ||
295 | # A Vn.n version is a released version. | ||
296 | # A Tn.n version is a released field test version. | ||
297 | # A Xn.n version is an unreleased experimental baselevel. | ||
298 | # 1.2 uses "1.2" for uname -r. | ||
299 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | ||
300 | exit 0 ;; | ||
301 | Alpha\ *:Windows_NT*:*) | ||
302 | # How do we know it's Interix rather than the generic POSIX subsystem? | ||
303 | # Should we change UNAME_MACHINE based on the output of uname instead | ||
304 | # of the specific Alpha model? | ||
305 | echo alpha-pc-interix | ||
306 | exit 0 ;; | ||
307 | 21064:Windows_NT:50:3) | ||
308 | echo alpha-dec-winnt3.5 | ||
309 | exit 0 ;; | ||
310 | Amiga*:UNIX_System_V:4.0:*) | ||
311 | echo m68k-unknown-sysv4 | ||
312 | exit 0;; | ||
313 | *:[Aa]miga[Oo][Ss]:*:*) | ||
314 | echo ${UNAME_MACHINE}-unknown-amigaos | ||
315 | exit 0 ;; | ||
316 | *:[Mm]orph[Oo][Ss]:*:*) | ||
317 | echo ${UNAME_MACHINE}-unknown-morphos | ||
318 | exit 0 ;; | ||
319 | *:OS/390:*:*) | ||
320 | echo i370-ibm-openedition | ||
321 | exit 0 ;; | ||
322 | *:z/VM:*:*) | ||
323 | echo s390-ibm-zvmoe | ||
324 | exit 0 ;; | ||
325 | *:OS400:*:*) | ||
326 | echo powerpc-ibm-os400 | ||
327 | exit 0 ;; | ||
328 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) | ||
329 | echo arm-acorn-riscix${UNAME_RELEASE} | ||
330 | exit 0;; | ||
331 | SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) | ||
332 | echo hppa1.1-hitachi-hiuxmpp | ||
333 | exit 0;; | ||
334 | Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) | ||
335 | # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. | ||
336 | if test "`(/bin/universe) 2>/dev/null`" = att ; then | ||
337 | echo pyramid-pyramid-sysv3 | ||
338 | else | ||
339 | echo pyramid-pyramid-bsd | ||
340 | fi | ||
341 | exit 0 ;; | ||
342 | NILE*:*:*:dcosx) | ||
343 | echo pyramid-pyramid-svr4 | ||
344 | exit 0 ;; | ||
345 | DRS?6000:unix:4.0:6*) | ||
346 | echo sparc-icl-nx6 | ||
347 | exit 0 ;; | ||
348 | DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) | ||
349 | case `/usr/bin/uname -p` in | ||
350 | sparc) echo sparc-icl-nx7 && exit 0 ;; | ||
351 | esac ;; | ||
352 | sun4H:SunOS:5.*:*) | ||
353 | echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
354 | exit 0 ;; | ||
355 | sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) | ||
356 | echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
357 | exit 0 ;; | ||
358 | i86pc:SunOS:5.*:*) | ||
359 | echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
360 | exit 0 ;; | ||
361 | sun4*:SunOS:6*:*) | ||
362 | # According to config.sub, this is the proper way to canonicalize | ||
363 | # SunOS6. Hard to guess exactly what SunOS6 will be like, but | ||
364 | # it's likely to be more like Solaris than SunOS4. | ||
365 | echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
366 | exit 0 ;; | ||
367 | sun4*:SunOS:*:*) | ||
368 | case "`/usr/bin/arch -k`" in | ||
369 | Series*|S4*) | ||
370 | UNAME_RELEASE=`uname -v` | ||
371 | ;; | ||
372 | esac | ||
373 | # Japanese Language versions have a version number like `4.1.3-JL'. | ||
374 | echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` | ||
375 | exit 0 ;; | ||
376 | sun3*:SunOS:*:*) | ||
377 | echo m68k-sun-sunos${UNAME_RELEASE} | ||
378 | exit 0 ;; | ||
379 | sun*:*:4.2BSD:*) | ||
380 | UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` | ||
381 | test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 | ||
382 | case "`/bin/arch`" in | ||
383 | sun3) | ||
384 | echo m68k-sun-sunos${UNAME_RELEASE} | ||
385 | ;; | ||
386 | sun4) | ||
387 | echo sparc-sun-sunos${UNAME_RELEASE} | ||
388 | ;; | ||
389 | esac | ||
390 | exit 0 ;; | ||
391 | aushp:SunOS:*:*) | ||
392 | echo sparc-auspex-sunos${UNAME_RELEASE} | ||
393 | exit 0 ;; | ||
394 | # The situation for MiNT is a little confusing. The machine name | ||
395 | # can be virtually everything (everything which is not | ||
396 | # "atarist" or "atariste" at least should have a processor | ||
397 | # > m68000). The system name ranges from "MiNT" over "FreeMiNT" | ||
398 | # to the lowercase version "mint" (or "freemint"). Finally | ||
399 | # the system name "TOS" denotes a system which is actually not | ||
400 | # MiNT. But MiNT is downward compatible to TOS, so this should | ||
401 | # be no problem. | ||
402 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) | ||
403 | echo m68k-atari-mint${UNAME_RELEASE} | ||
404 | exit 0 ;; | ||
405 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) | ||
406 | echo m68k-atari-mint${UNAME_RELEASE} | ||
407 | exit 0 ;; | ||
408 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) | ||
409 | echo m68k-atari-mint${UNAME_RELEASE} | ||
410 | exit 0 ;; | ||
411 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) | ||
412 | echo m68k-milan-mint${UNAME_RELEASE} | ||
413 | exit 0 ;; | ||
414 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) | ||
415 | echo m68k-hades-mint${UNAME_RELEASE} | ||
416 | exit 0 ;; | ||
417 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) | ||
418 | echo m68k-unknown-mint${UNAME_RELEASE} | ||
419 | exit 0 ;; | ||
420 | m68k:machten:*:*) | ||
421 | echo m68k-apple-machten${UNAME_RELEASE} | ||
422 | exit 0 ;; | ||
423 | powerpc:machten:*:*) | ||
424 | echo powerpc-apple-machten${UNAME_RELEASE} | ||
425 | exit 0 ;; | ||
426 | RISC*:Mach:*:*) | ||
427 | echo mips-dec-mach_bsd4.3 | ||
428 | exit 0 ;; | ||
429 | RISC*:ULTRIX:*:*) | ||
430 | echo mips-dec-ultrix${UNAME_RELEASE} | ||
431 | exit 0 ;; | ||
432 | VAX*:ULTRIX*:*:*) | ||
433 | echo vax-dec-ultrix${UNAME_RELEASE} | ||
434 | exit 0 ;; | ||
435 | 2020:CLIX:*:* | 2430:CLIX:*:*) | ||
436 | echo clipper-intergraph-clix${UNAME_RELEASE} | ||
437 | exit 0 ;; | ||
438 | mips:*:*:UMIPS | mips:*:*:RISCos) | ||
439 | eval $set_cc_for_build | ||
440 | sed 's/^ //' << EOF >$dummy.c | ||
441 | #ifdef __cplusplus | ||
442 | #include <stdio.h> /* for printf() prototype */ | ||
443 | int main (int argc, char *argv[]) { | ||
444 | #else | ||
445 | int main (argc, argv) int argc; char *argv[]; { | ||
446 | #endif | ||
447 | #if defined (host_mips) && defined (MIPSEB) | ||
448 | #if defined (SYSTYPE_SYSV) | ||
449 | printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); | ||
450 | #endif | ||
451 | #if defined (SYSTYPE_SVR4) | ||
452 | printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); | ||
453 | #endif | ||
454 | #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) | ||
455 | printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); | ||
456 | #endif | ||
457 | #endif | ||
458 | exit (-1); | ||
459 | } | ||
460 | EOF | ||
461 | $CC_FOR_BUILD -o $dummy $dummy.c \ | ||
462 | && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ | ||
463 | && exit 0 | ||
464 | echo mips-mips-riscos${UNAME_RELEASE} | ||
465 | exit 0 ;; | ||
466 | Motorola:PowerMAX_OS:*:*) | ||
467 | echo powerpc-motorola-powermax | ||
468 | exit 0 ;; | ||
469 | Motorola:*:4.3:PL8-*) | ||
470 | echo powerpc-harris-powermax | ||
471 | exit 0 ;; | ||
472 | Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) | ||
473 | echo powerpc-harris-powermax | ||
474 | exit 0 ;; | ||
475 | Night_Hawk:Power_UNIX:*:*) | ||
476 | echo powerpc-harris-powerunix | ||
477 | exit 0 ;; | ||
478 | m88k:CX/UX:7*:*) | ||
479 | echo m88k-harris-cxux7 | ||
480 | exit 0 ;; | ||
481 | m88k:*:4*:R4*) | ||
482 | echo m88k-motorola-sysv4 | ||
483 | exit 0 ;; | ||
484 | m88k:*:3*:R3*) | ||
485 | echo m88k-motorola-sysv3 | ||
486 | exit 0 ;; | ||
487 | AViiON:dgux:*:*) | ||
488 | # DG/UX returns AViiON for all architectures | ||
489 | UNAME_PROCESSOR=`/usr/bin/uname -p` | ||
490 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] | ||
491 | then | ||
492 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ | ||
493 | [ ${TARGET_BINARY_INTERFACE}x = x ] | ||
494 | then | ||
495 | echo m88k-dg-dgux${UNAME_RELEASE} | ||
496 | else | ||
497 | echo m88k-dg-dguxbcs${UNAME_RELEASE} | ||
498 | fi | ||
499 | else | ||
500 | echo i586-dg-dgux${UNAME_RELEASE} | ||
501 | fi | ||
502 | exit 0 ;; | ||
503 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) | ||
504 | echo m88k-dolphin-sysv3 | ||
505 | exit 0 ;; | ||
506 | M88*:*:R3*:*) | ||
507 | # Delta 88k system running SVR3 | ||
508 | echo m88k-motorola-sysv3 | ||
509 | exit 0 ;; | ||
510 | XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) | ||
511 | echo m88k-tektronix-sysv3 | ||
512 | exit 0 ;; | ||
513 | Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) | ||
514 | echo m68k-tektronix-bsd | ||
515 | exit 0 ;; | ||
516 | *:IRIX*:*:*) | ||
517 | echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` | ||
518 | exit 0 ;; | ||
519 | ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. | ||
520 | echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id | ||
521 | exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' | ||
522 | i*86:AIX:*:*) | ||
523 | echo i386-ibm-aix | ||
524 | exit 0 ;; | ||
525 | ia64:AIX:*:*) | ||
526 | if [ -x /usr/bin/oslevel ] ; then | ||
527 | IBM_REV=`/usr/bin/oslevel` | ||
528 | else | ||
529 | IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} | ||
530 | fi | ||
531 | echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} | ||
532 | exit 0 ;; | ||
533 | *:AIX:2:3) | ||
534 | if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then | ||
535 | eval $set_cc_for_build | ||
536 | sed 's/^ //' << EOF >$dummy.c | ||
537 | #include <sys/systemcfg.h> | ||
538 | |||
539 | main() | ||
540 | { | ||
541 | if (!__power_pc()) | ||
542 | exit(1); | ||
543 | puts("powerpc-ibm-aix3.2.5"); | ||
544 | exit(0); | ||
545 | } | ||
546 | EOF | ||
547 | $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 | ||
548 | echo rs6000-ibm-aix3.2.5 | ||
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 0 ;; | ||
555 | *:AIX:*:[45]) | ||
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 0 ;; | ||
569 | *:AIX:*:*) | ||
570 | echo rs6000-ibm-aix | ||
571 | exit 0 ;; | ||
572 | ibmrt:4.4BSD:*|romp-ibm:BSD:*) | ||
573 | echo romp-ibm-bsd4.4 | ||
574 | exit 0 ;; | ||
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 0 ;; # report: romp-ibm BSD 4.3 | ||
578 | *:BOSX:*:*) | ||
579 | echo rs6000-bull-bosx | ||
580 | exit 0 ;; | ||
581 | DPX/2?00:B.O.S.:*:*) | ||
582 | echo m68k-bull-sysv3 | ||
583 | exit 0 ;; | ||
584 | 9000/[34]??:4.3bsd:1.*:*) | ||
585 | echo m68k-hp-bsd | ||
586 | exit 0 ;; | ||
587 | hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) | ||
588 | echo m68k-hp-bsd4.4 | ||
589 | exit 0 ;; | ||
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 | # avoid double evaluation of $set_cc_for_build | ||
652 | test -n "$CC_FOR_BUILD" || eval $set_cc_for_build | ||
653 | if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null | ||
654 | then | ||
655 | HP_ARCH="hppa2.0w" | ||
656 | else | ||
657 | HP_ARCH="hppa64" | ||
658 | fi | ||
659 | fi | ||
660 | echo ${HP_ARCH}-hp-hpux${HPUX_REV} | ||
661 | exit 0 ;; | ||
662 | ia64:HP-UX:*:*) | ||
663 | HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` | ||
664 | echo ia64-hp-hpux${HPUX_REV} | ||
665 | exit 0 ;; | ||
666 | 3050*:HI-UX:*:*) | ||
667 | eval $set_cc_for_build | ||
668 | sed 's/^ //' << EOF >$dummy.c | ||
669 | #include <unistd.h> | ||
670 | int | ||
671 | main () | ||
672 | { | ||
673 | long cpu = sysconf (_SC_CPU_VERSION); | ||
674 | /* The order matters, because CPU_IS_HP_MC68K erroneously returns | ||
675 | true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct | ||
676 | results, however. */ | ||
677 | if (CPU_IS_PA_RISC (cpu)) | ||
678 | { | ||
679 | switch (cpu) | ||
680 | { | ||
681 | case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; | ||
682 | case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; | ||
683 | case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; | ||
684 | default: puts ("hppa-hitachi-hiuxwe2"); break; | ||
685 | } | ||
686 | } | ||
687 | else if (CPU_IS_HP_MC68K (cpu)) | ||
688 | puts ("m68k-hitachi-hiuxwe2"); | ||
689 | else puts ("unknown-hitachi-hiuxwe2"); | ||
690 | exit (0); | ||
691 | } | ||
692 | EOF | ||
693 | $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 | ||
694 | echo unknown-hitachi-hiuxwe2 | ||
695 | exit 0 ;; | ||
696 | 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) | ||
697 | echo hppa1.1-hp-bsd | ||
698 | exit 0 ;; | ||
699 | 9000/8??:4.3bsd:*:*) | ||
700 | echo hppa1.0-hp-bsd | ||
701 | exit 0 ;; | ||
702 | *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) | ||
703 | echo hppa1.0-hp-mpeix | ||
704 | exit 0 ;; | ||
705 | hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) | ||
706 | echo hppa1.1-hp-osf | ||
707 | exit 0 ;; | ||
708 | hp8??:OSF1:*:*) | ||
709 | echo hppa1.0-hp-osf | ||
710 | exit 0 ;; | ||
711 | i*86:OSF1:*:*) | ||
712 | if [ -x /usr/sbin/sysversion ] ; then | ||
713 | echo ${UNAME_MACHINE}-unknown-osf1mk | ||
714 | else | ||
715 | echo ${UNAME_MACHINE}-unknown-osf1 | ||
716 | fi | ||
717 | exit 0 ;; | ||
718 | parisc*:Lites*:*:*) | ||
719 | echo hppa1.1-hp-lites | ||
720 | exit 0 ;; | ||
721 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) | ||
722 | echo c1-convex-bsd | ||
723 | exit 0 ;; | ||
724 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) | ||
725 | if getsysinfo -f scalar_acc | ||
726 | then echo c32-convex-bsd | ||
727 | else echo c2-convex-bsd | ||
728 | fi | ||
729 | exit 0 ;; | ||
730 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) | ||
731 | echo c34-convex-bsd | ||
732 | exit 0 ;; | ||
733 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) | ||
734 | echo c38-convex-bsd | ||
735 | exit 0 ;; | ||
736 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) | ||
737 | echo c4-convex-bsd | ||
738 | exit 0 ;; | ||
739 | CRAY*Y-MP:*:*:*) | ||
740 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
741 | exit 0 ;; | ||
742 | CRAY*[A-Z]90:*:*:*) | ||
743 | echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | ||
744 | | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ | ||
745 | -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ | ||
746 | -e 's/\.[^.]*$/.X/' | ||
747 | exit 0 ;; | ||
748 | CRAY*TS:*:*:*) | ||
749 | echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
750 | exit 0 ;; | ||
751 | CRAY*T3E:*:*:*) | ||
752 | echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
753 | exit 0 ;; | ||
754 | CRAY*SV1:*:*:*) | ||
755 | echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
756 | exit 0 ;; | ||
757 | *:UNICOS/mp:*:*) | ||
758 | echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' | ||
759 | exit 0 ;; | ||
760 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) | ||
761 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` | ||
762 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | ||
763 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | ||
764 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | ||
765 | exit 0 ;; | ||
766 | 5000:UNIX_System_V:4.*:*) | ||
767 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | ||
768 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | ||
769 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | ||
770 | exit 0 ;; | ||
771 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) | ||
772 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} | ||
773 | exit 0 ;; | ||
774 | sparc*:BSD/OS:*:*) | ||
775 | echo sparc-unknown-bsdi${UNAME_RELEASE} | ||
776 | exit 0 ;; | ||
777 | *:BSD/OS:*:*) | ||
778 | echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} | ||
779 | exit 0 ;; | ||
780 | *:FreeBSD:*:*) | ||
781 | echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | ||
782 | exit 0 ;; | ||
783 | i*:CYGWIN*:*) | ||
784 | echo ${UNAME_MACHINE}-pc-cygwin | ||
785 | exit 0 ;; | ||
786 | i*:MINGW*:*) | ||
787 | echo ${UNAME_MACHINE}-pc-mingw32 | ||
788 | exit 0 ;; | ||
789 | i*:PW*:*) | ||
790 | echo ${UNAME_MACHINE}-pc-pw32 | ||
791 | exit 0 ;; | ||
792 | x86:Interix*:[34]*) | ||
793 | echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' | ||
794 | exit 0 ;; | ||
795 | [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) | ||
796 | echo i${UNAME_MACHINE}-pc-mks | ||
797 | exit 0 ;; | ||
798 | i*:Windows_NT*:* | Pentium*:Windows_NT*:*) | ||
799 | # How do we know it's Interix rather than the generic POSIX subsystem? | ||
800 | # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we | ||
801 | # UNAME_MACHINE based on the output of uname instead of i386? | ||
802 | echo i586-pc-interix | ||
803 | exit 0 ;; | ||
804 | i*:UWIN*:*) | ||
805 | echo ${UNAME_MACHINE}-pc-uwin | ||
806 | exit 0 ;; | ||
807 | amd64:CYGWIN*:*:*) | ||
808 | echo x86_64-unknown-cygwin | ||
809 | exit 0 ;; | ||
810 | p*:CYGWIN*:*) | ||
811 | echo powerpcle-unknown-cygwin | ||
812 | exit 0 ;; | ||
813 | prep*:SunOS:5.*:*) | ||
814 | echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` | ||
815 | exit 0 ;; | ||
816 | *:GNU:*:*) | ||
817 | # the GNU system | ||
818 | echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` | ||
819 | exit 0 ;; | ||
820 | *:GNU/*:*:*) | ||
821 | # other systems with GNU libc and userland | ||
822 | echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu | ||
823 | exit 0 ;; | ||
824 | i*86:Minix:*:*) | ||
825 | echo ${UNAME_MACHINE}-pc-minix | ||
826 | exit 0 ;; | ||
827 | arm*:Linux:*:*) | ||
828 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
829 | exit 0 ;; | ||
830 | cris:Linux:*:*) | ||
831 | echo cris-axis-linux-gnu | ||
832 | exit 0 ;; | ||
833 | crisv32:Linux:*:*) | ||
834 | echo crisv32-axis-linux-gnu | ||
835 | exit 0 ;; | ||
836 | frv:Linux:*:*) | ||
837 | echo frv-unknown-linux-gnu | ||
838 | exit 0 ;; | ||
839 | ia64:Linux:*:*) | ||
840 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
841 | exit 0 ;; | ||
842 | m32r*:Linux:*:*) | ||
843 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
844 | exit 0 ;; | ||
845 | m68*:Linux:*:*) | ||
846 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
847 | exit 0 ;; | ||
848 | mips:Linux:*:*) | ||
849 | eval $set_cc_for_build | ||
850 | sed 's/^ //' << EOF >$dummy.c | ||
851 | #undef CPU | ||
852 | #undef mips | ||
853 | #undef mipsel | ||
854 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | ||
855 | CPU=mipsel | ||
856 | #else | ||
857 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | ||
858 | CPU=mips | ||
859 | #else | ||
860 | CPU= | ||
861 | #endif | ||
862 | #endif | ||
863 | EOF | ||
864 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` | ||
865 | test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 | ||
866 | ;; | ||
867 | mips64:Linux:*:*) | ||
868 | eval $set_cc_for_build | ||
869 | sed 's/^ //' << EOF >$dummy.c | ||
870 | #undef CPU | ||
871 | #undef mips64 | ||
872 | #undef mips64el | ||
873 | #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) | ||
874 | CPU=mips64el | ||
875 | #else | ||
876 | #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) | ||
877 | CPU=mips64 | ||
878 | #else | ||
879 | CPU= | ||
880 | #endif | ||
881 | #endif | ||
882 | EOF | ||
883 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` | ||
884 | test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 | ||
885 | ;; | ||
886 | ppc:Linux:*:*) | ||
887 | echo powerpc-unknown-linux-gnu | ||
888 | exit 0 ;; | ||
889 | ppc64:Linux:*:*) | ||
890 | echo powerpc64-unknown-linux-gnu | ||
891 | exit 0 ;; | ||
892 | alpha:Linux:*:*) | ||
893 | case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in | ||
894 | EV5) UNAME_MACHINE=alphaev5 ;; | ||
895 | EV56) UNAME_MACHINE=alphaev56 ;; | ||
896 | PCA56) UNAME_MACHINE=alphapca56 ;; | ||
897 | PCA57) UNAME_MACHINE=alphapca56 ;; | ||
898 | EV6) UNAME_MACHINE=alphaev6 ;; | ||
899 | EV67) UNAME_MACHINE=alphaev67 ;; | ||
900 | EV68*) UNAME_MACHINE=alphaev68 ;; | ||
901 | esac | ||
902 | objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null | ||
903 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi | ||
904 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} | ||
905 | exit 0 ;; | ||
906 | parisc:Linux:*:* | hppa:Linux:*:*) | ||
907 | # Look for CPU level | ||
908 | case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in | ||
909 | PA7*) echo hppa1.1-unknown-linux-gnu ;; | ||
910 | PA8*) echo hppa2.0-unknown-linux-gnu ;; | ||
911 | *) echo hppa-unknown-linux-gnu ;; | ||
912 | esac | ||
913 | exit 0 ;; | ||
914 | parisc64:Linux:*:* | hppa64:Linux:*:*) | ||
915 | echo hppa64-unknown-linux-gnu | ||
916 | exit 0 ;; | ||
917 | s390:Linux:*:* | s390x:Linux:*:*) | ||
918 | echo ${UNAME_MACHINE}-ibm-linux | ||
919 | exit 0 ;; | ||
920 | sh64*:Linux:*:*) | ||
921 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
922 | exit 0 ;; | ||
923 | sh*:Linux:*:*) | ||
924 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
925 | exit 0 ;; | ||
926 | sparc:Linux:*:* | sparc64:Linux:*:*) | ||
927 | echo ${UNAME_MACHINE}-unknown-linux-gnu | ||
928 | exit 0 ;; | ||
929 | x86_64:Linux:*:*) | ||
930 | echo x86_64-unknown-linux-gnu | ||
931 | exit 0 ;; | ||
932 | i*86:Linux:*:*) | ||
933 | # The BFD linker knows what the default object file format is, so | ||
934 | # first see if it will tell us. cd to the root directory to prevent | ||
935 | # problems with other programs or directories called `ld' in the path. | ||
936 | # Set LC_ALL=C to ensure ld outputs messages in English. | ||
937 | ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | ||
938 | | sed -ne '/supported targets:/!d | ||
939 | s/[ ][ ]*/ /g | ||
940 | s/.*supported targets: *// | ||
941 | s/ .*// | ||
942 | p'` | ||
943 | case "$ld_supported_targets" in | ||
944 | elf32-i386) | ||
945 | TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" | ||
946 | ;; | ||
947 | a.out-i386-linux) | ||
948 | echo "${UNAME_MACHINE}-pc-linux-gnuaout" | ||
949 | exit 0 ;; | ||
950 | coff-i386) | ||
951 | echo "${UNAME_MACHINE}-pc-linux-gnucoff" | ||
952 | exit 0 ;; | ||
953 | "") | ||
954 | # Either a pre-BFD a.out linker (linux-gnuoldld) or | ||
955 | # one that does not give us useful --help. | ||
956 | echo "${UNAME_MACHINE}-pc-linux-gnuoldld" | ||
957 | exit 0 ;; | ||
958 | esac | ||
959 | # Determine whether the default compiler is a.out or elf | ||
960 | eval $set_cc_for_build | ||
961 | sed 's/^ //' << EOF >$dummy.c | ||
962 | #include <features.h> | ||
963 | #ifdef __ELF__ | ||
964 | # ifdef __GLIBC__ | ||
965 | # if __GLIBC__ >= 2 | ||
966 | LIBC=gnu | ||
967 | # else | ||
968 | LIBC=gnulibc1 | ||
969 | # endif | ||
970 | # else | ||
971 | LIBC=gnulibc1 | ||
972 | # endif | ||
973 | #else | ||
974 | #ifdef __INTEL_COMPILER | ||
975 | LIBC=gnu | ||
976 | #else | ||
977 | LIBC=gnuaout | ||
978 | #endif | ||
979 | #endif | ||
980 | #ifdef __dietlibc__ | ||
981 | LIBC=dietlibc | ||
982 | #endif | ||
983 | EOF | ||
984 | eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` | ||
985 | test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 | ||
986 | test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 | ||
987 | ;; | ||
988 | i*86:DYNIX/ptx:4*:*) | ||
989 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. | ||
990 | # earlier versions are messed up and put the nodename in both | ||
991 | # sysname and nodename. | ||
992 | echo i386-sequent-sysv4 | ||
993 | exit 0 ;; | ||
994 | i*86:UNIX_SV:4.2MP:2.*) | ||
995 | # Unixware is an offshoot of SVR4, but it has its own version | ||
996 | # number series starting with 2... | ||
997 | # I am not positive that other SVR4 systems won't match this, | ||
998 | # I just have to hope. -- rms. | ||
999 | # Use sysv4.2uw... so that sysv4* matches it. | ||
1000 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} | ||
1001 | exit 0 ;; | ||
1002 | i*86:OS/2:*:*) | ||
1003 | # If we were able to find `uname', then EMX Unix compatibility | ||
1004 | # is probably installed. | ||
1005 | echo ${UNAME_MACHINE}-pc-os2-emx | ||
1006 | exit 0 ;; | ||
1007 | i*86:XTS-300:*:STOP) | ||
1008 | echo ${UNAME_MACHINE}-unknown-stop | ||
1009 | exit 0 ;; | ||
1010 | i*86:atheos:*:*) | ||
1011 | echo ${UNAME_MACHINE}-unknown-atheos | ||
1012 | exit 0 ;; | ||
1013 | i*86:syllable:*:*) | ||
1014 | echo ${UNAME_MACHINE}-pc-syllable | ||
1015 | exit 0 ;; | ||
1016 | i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) | ||
1017 | echo i386-unknown-lynxos${UNAME_RELEASE} | ||
1018 | exit 0 ;; | ||
1019 | i*86:*DOS:*:*) | ||
1020 | echo ${UNAME_MACHINE}-pc-msdosdjgpp | ||
1021 | exit 0 ;; | ||
1022 | i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) | ||
1023 | UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` | ||
1024 | if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then | ||
1025 | echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} | ||
1026 | else | ||
1027 | echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} | ||
1028 | fi | ||
1029 | exit 0 ;; | ||
1030 | i*86:*:5:[78]*) | ||
1031 | case `/bin/uname -X | grep "^Machine"` in | ||
1032 | *486*) UNAME_MACHINE=i486 ;; | ||
1033 | *Pentium) UNAME_MACHINE=i586 ;; | ||
1034 | *Pent*|*Celeron) UNAME_MACHINE=i686 ;; | ||
1035 | esac | ||
1036 | echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} | ||
1037 | exit 0 ;; | ||
1038 | i*86:*:3.2:*) | ||
1039 | if test -f /usr/options/cb.name; then | ||
1040 | UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` | ||
1041 | echo ${UNAME_MACHINE}-pc-isc$UNAME_REL | ||
1042 | elif /bin/uname -X 2>/dev/null >/dev/null ; then | ||
1043 | UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` | ||
1044 | (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 | ||
1045 | (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ | ||
1046 | && UNAME_MACHINE=i586 | ||
1047 | (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ | ||
1048 | && UNAME_MACHINE=i686 | ||
1049 | (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ | ||
1050 | && UNAME_MACHINE=i686 | ||
1051 | echo ${UNAME_MACHINE}-pc-sco$UNAME_REL | ||
1052 | else | ||
1053 | echo ${UNAME_MACHINE}-pc-sysv32 | ||
1054 | fi | ||
1055 | exit 0 ;; | ||
1056 | pc:*:*:*) | ||
1057 | # Left here for compatibility: | ||
1058 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | ||
1059 | # the processor, so we play safe by assuming i386. | ||
1060 | echo i386-pc-msdosdjgpp | ||
1061 | exit 0 ;; | ||
1062 | Intel:Mach:3*:*) | ||
1063 | echo i386-pc-mach3 | ||
1064 | exit 0 ;; | ||
1065 | paragon:*:*:*) | ||
1066 | echo i860-intel-osf1 | ||
1067 | exit 0 ;; | ||
1068 | i860:*:4.*:*) # i860-SVR4 | ||
1069 | if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then | ||
1070 | echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 | ||
1071 | else # Add other i860-SVR4 vendors below as they are discovered. | ||
1072 | echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 | ||
1073 | fi | ||
1074 | exit 0 ;; | ||
1075 | mini*:CTIX:SYS*5:*) | ||
1076 | # "miniframe" | ||
1077 | echo m68010-convergent-sysv | ||
1078 | exit 0 ;; | ||
1079 | mc68k:UNIX:SYSTEM5:3.51m) | ||
1080 | echo m68k-convergent-sysv | ||
1081 | exit 0 ;; | ||
1082 | M680?0:D-NIX:5.3:*) | ||
1083 | echo m68k-diab-dnix | ||
1084 | exit 0 ;; | ||
1085 | M68*:*:R3V[5678]*:*) | ||
1086 | test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; | ||
1087 | 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) | ||
1088 | OS_REL='' | ||
1089 | test -r /etc/.relid \ | ||
1090 | && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` | ||
1091 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | ||
1092 | && echo i486-ncr-sysv4.3${OS_REL} && exit 0 | ||
1093 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ | ||
1094 | && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; | ||
1095 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) | ||
1096 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | ||
1097 | && echo i486-ncr-sysv4 && exit 0 ;; | ||
1098 | m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) | ||
1099 | echo m68k-unknown-lynxos${UNAME_RELEASE} | ||
1100 | exit 0 ;; | ||
1101 | mc68030:UNIX_System_V:4.*:*) | ||
1102 | echo m68k-atari-sysv4 | ||
1103 | exit 0 ;; | ||
1104 | TSUNAMI:LynxOS:2.*:*) | ||
1105 | echo sparc-unknown-lynxos${UNAME_RELEASE} | ||
1106 | exit 0 ;; | ||
1107 | rs6000:LynxOS:2.*:*) | ||
1108 | echo rs6000-unknown-lynxos${UNAME_RELEASE} | ||
1109 | exit 0 ;; | ||
1110 | PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) | ||
1111 | echo powerpc-unknown-lynxos${UNAME_RELEASE} | ||
1112 | exit 0 ;; | ||
1113 | SM[BE]S:UNIX_SV:*:*) | ||
1114 | echo mips-dde-sysv${UNAME_RELEASE} | ||
1115 | exit 0 ;; | ||
1116 | RM*:ReliantUNIX-*:*:*) | ||
1117 | echo mips-sni-sysv4 | ||
1118 | exit 0 ;; | ||
1119 | RM*:SINIX-*:*:*) | ||
1120 | echo mips-sni-sysv4 | ||
1121 | exit 0 ;; | ||
1122 | *:SINIX-*:*:*) | ||
1123 | if uname -p 2>/dev/null >/dev/null ; then | ||
1124 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | ||
1125 | echo ${UNAME_MACHINE}-sni-sysv4 | ||
1126 | else | ||
1127 | echo ns32k-sni-sysv | ||
1128 | fi | ||
1129 | exit 0 ;; | ||
1130 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | ||
1131 | # says <Richard.M.Bartel@ccMail.Census.GOV> | ||
1132 | echo i586-unisys-sysv4 | ||
1133 | exit 0 ;; | ||
1134 | *:UNIX_System_V:4*:FTX*) | ||
1135 | # From Gerald Hewes <hewes@openmarket.com>. | ||
1136 | # How about differentiating between stratus architectures? -djm | ||
1137 | echo hppa1.1-stratus-sysv4 | ||
1138 | exit 0 ;; | ||
1139 | *:*:*:FTX*) | ||
1140 | # From seanf@swdc.stratus.com. | ||
1141 | echo i860-stratus-sysv4 | ||
1142 | exit 0 ;; | ||
1143 | i*86:VOS:*:*) | ||
1144 | # From Paul.Green@stratus.com. | ||
1145 | echo ${UNAME_MACHINE}-stratus-vos | ||
1146 | exit 0 ;; | ||
1147 | *:VOS:*:*) | ||
1148 | # From Paul.Green@stratus.com. | ||
1149 | echo hppa1.1-stratus-vos | ||
1150 | exit 0 ;; | ||
1151 | mc68*:A/UX:*:*) | ||
1152 | echo m68k-apple-aux${UNAME_RELEASE} | ||
1153 | exit 0 ;; | ||
1154 | news*:NEWS-OS:6*:*) | ||
1155 | echo mips-sony-newsos6 | ||
1156 | exit 0 ;; | ||
1157 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) | ||
1158 | if [ -d /usr/nec ]; then | ||
1159 | echo mips-nec-sysv${UNAME_RELEASE} | ||
1160 | else | ||
1161 | echo mips-unknown-sysv${UNAME_RELEASE} | ||
1162 | fi | ||
1163 | exit 0 ;; | ||
1164 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. | ||
1165 | echo powerpc-be-beos | ||
1166 | exit 0 ;; | ||
1167 | BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. | ||
1168 | echo powerpc-apple-beos | ||
1169 | exit 0 ;; | ||
1170 | BePC:BeOS:*:*) # BeOS running on Intel PC compatible. | ||
1171 | echo i586-pc-beos | ||
1172 | exit 0 ;; | ||
1173 | SX-4:SUPER-UX:*:*) | ||
1174 | echo sx4-nec-superux${UNAME_RELEASE} | ||
1175 | exit 0 ;; | ||
1176 | SX-5:SUPER-UX:*:*) | ||
1177 | echo sx5-nec-superux${UNAME_RELEASE} | ||
1178 | exit 0 ;; | ||
1179 | SX-6:SUPER-UX:*:*) | ||
1180 | echo sx6-nec-superux${UNAME_RELEASE} | ||
1181 | exit 0 ;; | ||
1182 | Power*:Rhapsody:*:*) | ||
1183 | echo powerpc-apple-rhapsody${UNAME_RELEASE} | ||
1184 | exit 0 ;; | ||
1185 | *:Rhapsody:*:*) | ||
1186 | echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} | ||
1187 | exit 0 ;; | ||
1188 | *:Darwin:*:*) | ||
1189 | UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown | ||
1190 | case $UNAME_PROCESSOR in | ||
1191 | *86) UNAME_PROCESSOR=i686 ;; | ||
1192 | unknown) UNAME_PROCESSOR=powerpc ;; | ||
1193 | esac | ||
1194 | echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} | ||
1195 | exit 0 ;; | ||
1196 | *:procnto*:*:* | *:QNX:[0123456789]*:*) | ||
1197 | UNAME_PROCESSOR=`uname -p` | ||
1198 | if test "$UNAME_PROCESSOR" = "x86"; then | ||
1199 | UNAME_PROCESSOR=i386 | ||
1200 | UNAME_MACHINE=pc | ||
1201 | fi | ||
1202 | echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} | ||
1203 | exit 0 ;; | ||
1204 | *:QNX:*:4*) | ||
1205 | echo i386-pc-qnx | ||
1206 | exit 0 ;; | ||
1207 | NSE-?:NONSTOP_KERNEL:*:*) | ||
1208 | echo nse-tandem-nsk${UNAME_RELEASE} | ||
1209 | exit 0 ;; | ||
1210 | NSR-?:NONSTOP_KERNEL:*:*) | ||
1211 | echo nsr-tandem-nsk${UNAME_RELEASE} | ||
1212 | exit 0 ;; | ||
1213 | *:NonStop-UX:*:*) | ||
1214 | echo mips-compaq-nonstopux | ||
1215 | exit 0 ;; | ||
1216 | BS2000:POSIX*:*:*) | ||
1217 | echo bs2000-siemens-sysv | ||
1218 | exit 0 ;; | ||
1219 | DS/*:UNIX_System_V:*:*) | ||
1220 | echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} | ||
1221 | exit 0 ;; | ||
1222 | *:Plan9:*:*) | ||
1223 | # "uname -m" is not consistent, so use $cputype instead. 386 | ||
1224 | # is converted to i386 for consistency with other x86 | ||
1225 | # operating systems. | ||
1226 | if test "$cputype" = "386"; then | ||
1227 | UNAME_MACHINE=i386 | ||
1228 | else | ||
1229 | UNAME_MACHINE="$cputype" | ||
1230 | fi | ||
1231 | echo ${UNAME_MACHINE}-unknown-plan9 | ||
1232 | exit 0 ;; | ||
1233 | *:TOPS-10:*:*) | ||
1234 | echo pdp10-unknown-tops10 | ||
1235 | exit 0 ;; | ||
1236 | *:TENEX:*:*) | ||
1237 | echo pdp10-unknown-tenex | ||
1238 | exit 0 ;; | ||
1239 | KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) | ||
1240 | echo pdp10-dec-tops20 | ||
1241 | exit 0 ;; | ||
1242 | XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) | ||
1243 | echo pdp10-xkl-tops20 | ||
1244 | exit 0 ;; | ||
1245 | *:TOPS-20:*:*) | ||
1246 | echo pdp10-unknown-tops20 | ||
1247 | exit 0 ;; | ||
1248 | *:ITS:*:*) | ||
1249 | echo pdp10-unknown-its | ||
1250 | exit 0 ;; | ||
1251 | SEI:*:*:SEIUX) | ||
1252 | echo mips-sei-seiux${UNAME_RELEASE} | ||
1253 | exit 0 ;; | ||
1254 | *:DragonFly:*:*) | ||
1255 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` | ||
1256 | exit 0 ;; | ||
1257 | *:*VMS:*:*) | ||
1258 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | ||
1259 | case "${UNAME_MACHINE}" in | ||
1260 | A*) echo alpha-dec-vms && exit 0 ;; | ||
1261 | I*) echo ia64-dec-vms && exit 0 ;; | ||
1262 | V*) echo vax-dec-vms && exit 0 ;; | ||
1263 | esac ;; | ||
1264 | *:XENIX:*:SysV) | ||
1265 | echo i386-pc-xenix | ||
1266 | exit 0 ;; | ||
1267 | esac | ||
1268 | |||
1269 | #echo '(No uname command or uname output not recognized.)' 1>&2 | ||
1270 | #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 | ||
1271 | |||
1272 | eval $set_cc_for_build | ||
1273 | cat >$dummy.c <<EOF | ||
1274 | #ifdef _SEQUENT_ | ||
1275 | # include <sys/types.h> | ||
1276 | # include <sys/utsname.h> | ||
1277 | #endif | ||
1278 | main () | ||
1279 | { | ||
1280 | #if defined (sony) | ||
1281 | #if defined (MIPSEB) | ||
1282 | /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, | ||
1283 | I don't know.... */ | ||
1284 | printf ("mips-sony-bsd\n"); exit (0); | ||
1285 | #else | ||
1286 | #include <sys/param.h> | ||
1287 | printf ("m68k-sony-newsos%s\n", | ||
1288 | #ifdef NEWSOS4 | ||
1289 | "4" | ||
1290 | #else | ||
1291 | "" | ||
1292 | #endif | ||
1293 | ); exit (0); | ||
1294 | #endif | ||
1295 | #endif | ||
1296 | |||
1297 | #if defined (__arm) && defined (__acorn) && defined (__unix) | ||
1298 | printf ("arm-acorn-riscix"); exit (0); | ||
1299 | #endif | ||
1300 | |||
1301 | #if defined (hp300) && !defined (hpux) | ||
1302 | printf ("m68k-hp-bsd\n"); exit (0); | ||
1303 | #endif | ||
1304 | |||
1305 | #if defined (NeXT) | ||
1306 | #if !defined (__ARCHITECTURE__) | ||
1307 | #define __ARCHITECTURE__ "m68k" | ||
1308 | #endif | ||
1309 | int version; | ||
1310 | version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; | ||
1311 | if (version < 4) | ||
1312 | printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); | ||
1313 | else | ||
1314 | printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); | ||
1315 | exit (0); | ||
1316 | #endif | ||
1317 | |||
1318 | #if defined (MULTIMAX) || defined (n16) | ||
1319 | #if defined (UMAXV) | ||
1320 | printf ("ns32k-encore-sysv\n"); exit (0); | ||
1321 | #else | ||
1322 | #if defined (CMU) | ||
1323 | printf ("ns32k-encore-mach\n"); exit (0); | ||
1324 | #else | ||
1325 | printf ("ns32k-encore-bsd\n"); exit (0); | ||
1326 | #endif | ||
1327 | #endif | ||
1328 | #endif | ||
1329 | |||
1330 | #if defined (__386BSD__) | ||
1331 | printf ("i386-pc-bsd\n"); exit (0); | ||
1332 | #endif | ||
1333 | |||
1334 | #if defined (sequent) | ||
1335 | #if defined (i386) | ||
1336 | printf ("i386-sequent-dynix\n"); exit (0); | ||
1337 | #endif | ||
1338 | #if defined (ns32000) | ||
1339 | printf ("ns32k-sequent-dynix\n"); exit (0); | ||
1340 | #endif | ||
1341 | #endif | ||
1342 | |||
1343 | #if defined (_SEQUENT_) | ||
1344 | struct utsname un; | ||
1345 | |||
1346 | uname(&un); | ||
1347 | |||
1348 | if (strncmp(un.version, "V2", 2) == 0) { | ||
1349 | printf ("i386-sequent-ptx2\n"); exit (0); | ||
1350 | } | ||
1351 | if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ | ||
1352 | printf ("i386-sequent-ptx1\n"); exit (0); | ||
1353 | } | ||
1354 | printf ("i386-sequent-ptx\n"); exit (0); | ||
1355 | |||
1356 | #endif | ||
1357 | |||
1358 | #if defined (vax) | ||
1359 | # if !defined (ultrix) | ||
1360 | # include <sys/param.h> | ||
1361 | # if defined (BSD) | ||
1362 | # if BSD == 43 | ||
1363 | printf ("vax-dec-bsd4.3\n"); exit (0); | ||
1364 | # else | ||
1365 | # if BSD == 199006 | ||
1366 | printf ("vax-dec-bsd4.3reno\n"); exit (0); | ||
1367 | # else | ||
1368 | printf ("vax-dec-bsd\n"); exit (0); | ||
1369 | # endif | ||
1370 | # endif | ||
1371 | # else | ||
1372 | printf ("vax-dec-bsd\n"); exit (0); | ||
1373 | # endif | ||
1374 | # else | ||
1375 | printf ("vax-dec-ultrix\n"); exit (0); | ||
1376 | # endif | ||
1377 | #endif | ||
1378 | |||
1379 | #if defined (alliant) && defined (i860) | ||
1380 | printf ("i860-alliant-bsd\n"); exit (0); | ||
1381 | #endif | ||
1382 | |||
1383 | exit (1); | ||
1384 | } | ||
1385 | EOF | ||
1386 | |||
1387 | $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 | ||
1388 | |||
1389 | # Apollos put the system type in the environment. | ||
1390 | |||
1391 | test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } | ||
1392 | |||
1393 | # Convex versions that predate uname can use getsysinfo(1) | ||
1394 | |||
1395 | if [ -x /usr/convex/getsysinfo ] | ||
1396 | then | ||
1397 | case `getsysinfo -f cpu_type` in | ||
1398 | c1*) | ||
1399 | echo c1-convex-bsd | ||
1400 | exit 0 ;; | ||
1401 | c2*) | ||
1402 | if getsysinfo -f scalar_acc | ||
1403 | then echo c32-convex-bsd | ||
1404 | else echo c2-convex-bsd | ||
1405 | fi | ||
1406 | exit 0 ;; | ||
1407 | c34*) | ||
1408 | echo c34-convex-bsd | ||
1409 | exit 0 ;; | ||
1410 | c38*) | ||
1411 | echo c38-convex-bsd | ||
1412 | exit 0 ;; | ||
1413 | c4*) | ||
1414 | echo c4-convex-bsd | ||
1415 | exit 0 ;; | ||
1416 | esac | ||
1417 | fi | ||
1418 | |||
1419 | cat >&2 <<EOF | ||
1420 | $0: unable to guess system type | ||
1421 | |||
1422 | This script, last modified $timestamp, has failed to recognize | ||
1423 | the operating system you are using. It is advised that you | ||
1424 | download the most up to date version of the config scripts from | ||
1425 | |||
1426 | http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess | ||
1427 | and | ||
1428 | http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub | ||
1429 | |||
1430 | If the version you run ($0) is already up to date, please | ||
1431 | send the following data and any information you think might be | ||
1432 | pertinent to <config-patches@gnu.org> in order to provide the needed | ||
1433 | information to handle your system. | ||
1434 | |||
1435 | config.guess timestamp = $timestamp | ||
1436 | |||
1437 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | ||
1438 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | ||
1439 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | ||
1440 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | ||
1441 | |||
1442 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` | ||
1443 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null` | ||
1444 | |||
1445 | hostinfo = `(hostinfo) 2>/dev/null` | ||
1446 | /bin/universe = `(/bin/universe) 2>/dev/null` | ||
1447 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` | ||
1448 | /bin/arch = `(/bin/arch) 2>/dev/null` | ||
1449 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` | ||
1450 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` | ||
1451 | |||
1452 | UNAME_MACHINE = ${UNAME_MACHINE} | ||
1453 | UNAME_RELEASE = ${UNAME_RELEASE} | ||
1454 | UNAME_SYSTEM = ${UNAME_SYSTEM} | ||
1455 | UNAME_VERSION = ${UNAME_VERSION} | ||
1456 | EOF | ||
1457 | |||
1458 | exit 1 | ||
1459 | |||
1460 | # Local variables: | ||
1461 | # eval: (add-hook 'write-file-hooks 'time-stamp) | ||
1462 | # time-stamp-start: "timestamp='" | ||
1463 | # time-stamp-format: "%:y-%02m-%02d" | ||
1464 | # time-stamp-end: "'" | ||
1465 | # End: | ||
diff --git a/libltdl/config.sub b/libltdl/config.sub new file mode 100755 index 00000000..87a1ee49 --- /dev/null +++ b/libltdl/config.sub | |||
@@ -0,0 +1,1569 @@ | |||
1 | #! /bin/sh | ||
2 | # Configuration validation subroutine script. | ||
3 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | ||
4 | # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
5 | |||
6 | timestamp='2005-04-22' | ||
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, write to the Free Software | ||
24 | # Foundation, Inc., 59 Temple Place - Suite 330, | ||
25 | # Boston, MA 02111-1307, USA. | ||
26 | |||
27 | # As a special exception to the GNU General Public License, if you | ||
28 | # distribute this file as part of a program that contains a | ||
29 | # configuration script generated by Autoconf, you may include it under | ||
30 | # the same distribution terms that you use for the rest of that program. | ||
31 | |||
32 | # Please send patches to <config-patches@gnu.org>. Submit a context | ||
33 | # diff and a properly formatted ChangeLog entry. | ||
34 | # | ||
35 | # Configuration subroutine to validate and canonicalize a configuration type. | ||
36 | # Supply the specified configuration type as an argument. | ||
37 | # If it is invalid, we print an error message on stderr and exit with code 1. | ||
38 | # Otherwise, we print the canonical config type on stdout and succeed. | ||
39 | |||
40 | # This file is supposed to be the same for all GNU packages | ||
41 | # and recognize all the CPU types, system types and aliases | ||
42 | # that are meaningful with *any* GNU software. | ||
43 | # Each package is responsible for reporting which valid configurations | ||
44 | # it does not support. The user should be able to distinguish | ||
45 | # a failure to support a valid configuration from a meaningless | ||
46 | # configuration. | ||
47 | |||
48 | # The goal of this file is to map all the various variations of a given | ||
49 | # machine specification into a single specification in the form: | ||
50 | # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM | ||
51 | # or in some cases, the newer four-part form: | ||
52 | # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM | ||
53 | # It is wrong to echo any other type of specification. | ||
54 | |||
55 | me=`echo "$0" | sed -e 's,.*/,,'` | ||
56 | |||
57 | usage="\ | ||
58 | Usage: $0 [OPTION] CPU-MFR-OPSYS | ||
59 | $0 [OPTION] ALIAS | ||
60 | |||
61 | Canonicalize a configuration name. | ||
62 | |||
63 | Operation modes: | ||
64 | -h, --help print this help, then exit | ||
65 | -t, --time-stamp print date of last modification, then exit | ||
66 | -v, --version print version number, then exit | ||
67 | |||
68 | Report bugs and patches to <config-patches@gnu.org>." | ||
69 | |||
70 | version="\ | ||
71 | GNU config.sub ($timestamp) | ||
72 | |||
73 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 | ||
74 | Free Software Foundation, Inc. | ||
75 | |||
76 | 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." | ||
78 | |||
79 | help=" | ||
80 | Try \`$me --help' for more information." | ||
81 | |||
82 | # Parse command line | ||
83 | while test $# -gt 0 ; do | ||
84 | case $1 in | ||
85 | --time-stamp | --time* | -t ) | ||
86 | echo "$timestamp" ; exit 0 ;; | ||
87 | --version | -v ) | ||
88 | echo "$version" ; exit 0 ;; | ||
89 | --help | --h* | -h ) | ||
90 | echo "$usage"; exit 0 ;; | ||
91 | -- ) # Stop option processing | ||
92 | shift; break ;; | ||
93 | - ) # Use stdin as input. | ||
94 | break ;; | ||
95 | -* ) | ||
96 | echo "$me: invalid option $1$help" | ||
97 | exit 1 ;; | ||
98 | |||
99 | *local*) | ||
100 | # First pass through any local machine types. | ||
101 | echo $1 | ||
102 | exit 0;; | ||
103 | |||
104 | * ) | ||
105 | break ;; | ||
106 | esac | ||
107 | done | ||
108 | |||
109 | case $# in | ||
110 | 0) echo "$me: missing argument$help" >&2 | ||
111 | exit 1;; | ||
112 | 1) ;; | ||
113 | *) echo "$me: too many arguments$help" >&2 | ||
114 | exit 1;; | ||
115 | esac | ||
116 | |||
117 | # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). | ||
118 | # Here we must recognize all the valid KERNEL-OS combinations. | ||
119 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` | ||
120 | case $maybe_os in | ||
121 | nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ | ||
122 | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) | ||
123 | os=-$maybe_os | ||
124 | basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` | ||
125 | ;; | ||
126 | *) | ||
127 | basic_machine=`echo $1 | sed 's/-[^-]*$//'` | ||
128 | if [ $basic_machine != $1 ] | ||
129 | then os=`echo $1 | sed 's/.*-/-/'` | ||
130 | else os=; fi | ||
131 | ;; | ||
132 | esac | ||
133 | |||
134 | ### Let's recognize common machines as not being operating systems so | ||
135 | ### that things like config.sub decstation-3100 work. We also | ||
136 | ### recognize some manufacturers as not being operating systems, so we | ||
137 | ### can provide default operating systems below. | ||
138 | case $os in | ||
139 | -sun*os*) | ||
140 | # Prevent following clause from handling this invalid input. | ||
141 | ;; | ||
142 | -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ | ||
143 | -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ | ||
144 | -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ | ||
145 | -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ | ||
146 | -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ | ||
147 | -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ | ||
148 | -apple | -axis | -knuth | -cray) | ||
149 | os= | ||
150 | basic_machine=$1 | ||
151 | ;; | ||
152 | -sim | -cisco | -oki | -wec | -winbond) | ||
153 | os= | ||
154 | basic_machine=$1 | ||
155 | ;; | ||
156 | -scout) | ||
157 | ;; | ||
158 | -wrs) | ||
159 | os=-vxworks | ||
160 | basic_machine=$1 | ||
161 | ;; | ||
162 | -chorusos*) | ||
163 | os=-chorusos | ||
164 | basic_machine=$1 | ||
165 | ;; | ||
166 | -chorusrdb) | ||
167 | os=-chorusrdb | ||
168 | basic_machine=$1 | ||
169 | ;; | ||
170 | -hiux*) | ||
171 | os=-hiuxwe2 | ||
172 | ;; | ||
173 | -sco5) | ||
174 | os=-sco3.2v5 | ||
175 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
176 | ;; | ||
177 | -sco4) | ||
178 | os=-sco3.2v4 | ||
179 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
180 | ;; | ||
181 | -sco3.2.[4-9]*) | ||
182 | os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` | ||
183 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
184 | ;; | ||
185 | -sco3.2v[4-9]*) | ||
186 | # Don't forget version if it is 3.2v4 or newer. | ||
187 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
188 | ;; | ||
189 | -sco*) | ||
190 | os=-sco3.2v2 | ||
191 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
192 | ;; | ||
193 | -udk*) | ||
194 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
195 | ;; | ||
196 | -isc) | ||
197 | os=-isc2.2 | ||
198 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
199 | ;; | ||
200 | -clix*) | ||
201 | basic_machine=clipper-intergraph | ||
202 | ;; | ||
203 | -isc*) | ||
204 | basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` | ||
205 | ;; | ||
206 | -lynx*) | ||
207 | os=-lynxos | ||
208 | ;; | ||
209 | -ptx*) | ||
210 | basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` | ||
211 | ;; | ||
212 | -windowsnt*) | ||
213 | os=`echo $os | sed -e 's/windowsnt/winnt/'` | ||
214 | ;; | ||
215 | -psos*) | ||
216 | os=-psos | ||
217 | ;; | ||
218 | -mint | -mint[0-9]*) | ||
219 | basic_machine=m68k-atari | ||
220 | os=-mint | ||
221 | ;; | ||
222 | esac | ||
223 | |||
224 | # Decode aliases for certain CPU-COMPANY combinations. | ||
225 | case $basic_machine in | ||
226 | # Recognize the basic CPU types without company name. | ||
227 | # Some are omitted here because they have special meanings below. | ||
228 | 1750a | 580 \ | ||
229 | | a29k \ | ||
230 | | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | ||
231 | | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | ||
232 | | am33_2.0 \ | ||
233 | | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | ||
234 | | bfin \ | ||
235 | | c4x | clipper \ | ||
236 | | d10v | d30v | dlx | dsp16xx \ | ||
237 | | fr30 | frv \ | ||
238 | | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | ||
239 | | i370 | i860 | i960 | ia64 \ | ||
240 | | ip2k | iq2000 \ | ||
241 | | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | ||
242 | | mips | mipsbe | mipseb | mipsel | mipsle \ | ||
243 | | mips16 \ | ||
244 | | mips64 | mips64el \ | ||
245 | | mips64vr | mips64vrel \ | ||
246 | | mips64orion | mips64orionel \ | ||
247 | | mips64vr4100 | mips64vr4100el \ | ||
248 | | mips64vr4300 | mips64vr4300el \ | ||
249 | | mips64vr5000 | mips64vr5000el \ | ||
250 | | mipsisa32 | mipsisa32el \ | ||
251 | | mipsisa32r2 | mipsisa32r2el \ | ||
252 | | mipsisa64 | mipsisa64el \ | ||
253 | | mipsisa64r2 | mipsisa64r2el \ | ||
254 | | mipsisa64sb1 | mipsisa64sb1el \ | ||
255 | | mipsisa64sr71k | mipsisa64sr71kel \ | ||
256 | | mipstx39 | mipstx39el \ | ||
257 | | mn10200 | mn10300 \ | ||
258 | | msp430 \ | ||
259 | | ns16k | ns32k \ | ||
260 | | openrisc | or32 \ | ||
261 | | pdp10 | pdp11 | pj | pjl \ | ||
262 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | ||
263 | | pyramid \ | ||
264 | | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | ||
265 | | sh64 | sh64le \ | ||
266 | | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | ||
267 | | sparcv8 | sparcv9 | sparcv9b \ | ||
268 | | strongarm \ | ||
269 | | tahoe | thumb | tic4x | tic80 | tron \ | ||
270 | | v850 | v850e \ | ||
271 | | we32k \ | ||
272 | | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | ||
273 | | z8k) | ||
274 | basic_machine=$basic_machine-unknown | ||
275 | ;; | ||
276 | m6811 | m68hc11 | m6812 | m68hc12) | ||
277 | # Motorola 68HC11/12. | ||
278 | basic_machine=$basic_machine-unknown | ||
279 | os=-none | ||
280 | ;; | ||
281 | m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) | ||
282 | ;; | ||
283 | |||
284 | # We use `pc' rather than `unknown' | ||
285 | # because (1) that's what they normally are, and | ||
286 | # (2) the word "unknown" tends to confuse beginning users. | ||
287 | i*86 | x86_64) | ||
288 | basic_machine=$basic_machine-pc | ||
289 | ;; | ||
290 | # Object if more than one company name word. | ||
291 | *-*-*) | ||
292 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | ||
293 | exit 1 | ||
294 | ;; | ||
295 | # Recognize the basic CPU types with company name. | ||
296 | 580-* \ | ||
297 | | a29k-* \ | ||
298 | | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | ||
299 | | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | ||
300 | | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | ||
301 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | ||
302 | | avr-* \ | ||
303 | | bfin-* | bs2000-* \ | ||
304 | | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | ||
305 | | clipper-* | craynv-* | cydra-* \ | ||
306 | | d10v-* | d30v-* | dlx-* \ | ||
307 | | elxsi-* \ | ||
308 | | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | ||
309 | | h8300-* | h8500-* \ | ||
310 | | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | ||
311 | | i*86-* | i860-* | i960-* | ia64-* \ | ||
312 | | ip2k-* | iq2000-* \ | ||
313 | | m32r-* | m32rle-* \ | ||
314 | | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | ||
315 | | m88110-* | m88k-* | maxq-* | mcore-* \ | ||
316 | | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | ||
317 | | mips16-* \ | ||
318 | | mips64-* | mips64el-* \ | ||
319 | | mips64vr-* | mips64vrel-* \ | ||
320 | | mips64orion-* | mips64orionel-* \ | ||
321 | | mips64vr4100-* | mips64vr4100el-* \ | ||
322 | | mips64vr4300-* | mips64vr4300el-* \ | ||
323 | | mips64vr5000-* | mips64vr5000el-* \ | ||
324 | | mipsisa32-* | mipsisa32el-* \ | ||
325 | | mipsisa32r2-* | mipsisa32r2el-* \ | ||
326 | | mipsisa64-* | mipsisa64el-* \ | ||
327 | | mipsisa64r2-* | mipsisa64r2el-* \ | ||
328 | | mipsisa64sb1-* | mipsisa64sb1el-* \ | ||
329 | | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | ||
330 | | mipstx39-* | mipstx39el-* \ | ||
331 | | mmix-* \ | ||
332 | | msp430-* \ | ||
333 | | none-* | np1-* | ns16k-* | ns32k-* \ | ||
334 | | orion-* \ | ||
335 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | ||
336 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | ||
337 | | pyramid-* \ | ||
338 | | romp-* | rs6000-* \ | ||
339 | | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | ||
340 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | ||
341 | | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | ||
342 | | sparclite-* \ | ||
343 | | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | ||
344 | | tahoe-* | thumb-* \ | ||
345 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | ||
346 | | tron-* \ | ||
347 | | v850-* | v850e-* | vax-* \ | ||
348 | | we32k-* \ | ||
349 | | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | ||
350 | | xstormy16-* | xtensa-* \ | ||
351 | | ymp-* \ | ||
352 | | z8k-*) | ||
353 | ;; | ||
354 | # Recognize the various machine names and aliases which stand | ||
355 | # for a CPU type and a company and sometimes even an OS. | ||
356 | 386bsd) | ||
357 | basic_machine=i386-unknown | ||
358 | os=-bsd | ||
359 | ;; | ||
360 | 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) | ||
361 | basic_machine=m68000-att | ||
362 | ;; | ||
363 | 3b*) | ||
364 | basic_machine=we32k-att | ||
365 | ;; | ||
366 | a29khif) | ||
367 | basic_machine=a29k-amd | ||
368 | os=-udi | ||
369 | ;; | ||
370 | abacus) | ||
371 | basic_machine=abacus-unknown | ||
372 | ;; | ||
373 | adobe68k) | ||
374 | basic_machine=m68010-adobe | ||
375 | os=-scout | ||
376 | ;; | ||
377 | alliant | fx80) | ||
378 | basic_machine=fx80-alliant | ||
379 | ;; | ||
380 | altos | altos3068) | ||
381 | basic_machine=m68k-altos | ||
382 | ;; | ||
383 | am29k) | ||
384 | basic_machine=a29k-none | ||
385 | os=-bsd | ||
386 | ;; | ||
387 | amd64) | ||
388 | basic_machine=x86_64-pc | ||
389 | ;; | ||
390 | amd64-*) | ||
391 | basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
392 | ;; | ||
393 | amdahl) | ||
394 | basic_machine=580-amdahl | ||
395 | os=-sysv | ||
396 | ;; | ||
397 | amiga | amiga-*) | ||
398 | basic_machine=m68k-unknown | ||
399 | ;; | ||
400 | amigaos | amigados) | ||
401 | basic_machine=m68k-unknown | ||
402 | os=-amigaos | ||
403 | ;; | ||
404 | amigaunix | amix) | ||
405 | basic_machine=m68k-unknown | ||
406 | os=-sysv4 | ||
407 | ;; | ||
408 | apollo68) | ||
409 | basic_machine=m68k-apollo | ||
410 | os=-sysv | ||
411 | ;; | ||
412 | apollo68bsd) | ||
413 | basic_machine=m68k-apollo | ||
414 | os=-bsd | ||
415 | ;; | ||
416 | aux) | ||
417 | basic_machine=m68k-apple | ||
418 | os=-aux | ||
419 | ;; | ||
420 | balance) | ||
421 | basic_machine=ns32k-sequent | ||
422 | os=-dynix | ||
423 | ;; | ||
424 | c90) | ||
425 | basic_machine=c90-cray | ||
426 | os=-unicos | ||
427 | ;; | ||
428 | convex-c1) | ||
429 | basic_machine=c1-convex | ||
430 | os=-bsd | ||
431 | ;; | ||
432 | convex-c2) | ||
433 | basic_machine=c2-convex | ||
434 | os=-bsd | ||
435 | ;; | ||
436 | convex-c32) | ||
437 | basic_machine=c32-convex | ||
438 | os=-bsd | ||
439 | ;; | ||
440 | convex-c34) | ||
441 | basic_machine=c34-convex | ||
442 | os=-bsd | ||
443 | ;; | ||
444 | convex-c38) | ||
445 | basic_machine=c38-convex | ||
446 | os=-bsd | ||
447 | ;; | ||
448 | cray | j90) | ||
449 | basic_machine=j90-cray | ||
450 | os=-unicos | ||
451 | ;; | ||
452 | craynv) | ||
453 | basic_machine=craynv-cray | ||
454 | os=-unicosmp | ||
455 | ;; | ||
456 | cr16c) | ||
457 | basic_machine=cr16c-unknown | ||
458 | os=-elf | ||
459 | ;; | ||
460 | crds | unos) | ||
461 | basic_machine=m68k-crds | ||
462 | ;; | ||
463 | crisv32 | crisv32-* | etraxfs*) | ||
464 | basic_machine=crisv32-axis | ||
465 | ;; | ||
466 | cris | cris-* | etrax*) | ||
467 | basic_machine=cris-axis | ||
468 | ;; | ||
469 | crx) | ||
470 | basic_machine=crx-unknown | ||
471 | os=-elf | ||
472 | ;; | ||
473 | da30 | da30-*) | ||
474 | basic_machine=m68k-da30 | ||
475 | ;; | ||
476 | decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) | ||
477 | basic_machine=mips-dec | ||
478 | ;; | ||
479 | decsystem10* | dec10*) | ||
480 | basic_machine=pdp10-dec | ||
481 | os=-tops10 | ||
482 | ;; | ||
483 | decsystem20* | dec20*) | ||
484 | basic_machine=pdp10-dec | ||
485 | os=-tops20 | ||
486 | ;; | ||
487 | delta | 3300 | motorola-3300 | motorola-delta \ | ||
488 | | 3300-motorola | delta-motorola) | ||
489 | basic_machine=m68k-motorola | ||
490 | ;; | ||
491 | delta88) | ||
492 | basic_machine=m88k-motorola | ||
493 | os=-sysv3 | ||
494 | ;; | ||
495 | djgpp) | ||
496 | basic_machine=i586-pc | ||
497 | os=-msdosdjgpp | ||
498 | ;; | ||
499 | dpx20 | dpx20-*) | ||
500 | basic_machine=rs6000-bull | ||
501 | os=-bosx | ||
502 | ;; | ||
503 | dpx2* | dpx2*-bull) | ||
504 | basic_machine=m68k-bull | ||
505 | os=-sysv3 | ||
506 | ;; | ||
507 | ebmon29k) | ||
508 | basic_machine=a29k-amd | ||
509 | os=-ebmon | ||
510 | ;; | ||
511 | elxsi) | ||
512 | basic_machine=elxsi-elxsi | ||
513 | os=-bsd | ||
514 | ;; | ||
515 | encore | umax | mmax) | ||
516 | basic_machine=ns32k-encore | ||
517 | ;; | ||
518 | es1800 | OSE68k | ose68k | ose | OSE) | ||
519 | basic_machine=m68k-ericsson | ||
520 | os=-ose | ||
521 | ;; | ||
522 | fx2800) | ||
523 | basic_machine=i860-alliant | ||
524 | ;; | ||
525 | genix) | ||
526 | basic_machine=ns32k-ns | ||
527 | ;; | ||
528 | gmicro) | ||
529 | basic_machine=tron-gmicro | ||
530 | os=-sysv | ||
531 | ;; | ||
532 | go32) | ||
533 | basic_machine=i386-pc | ||
534 | os=-go32 | ||
535 | ;; | ||
536 | h3050r* | hiux*) | ||
537 | basic_machine=hppa1.1-hitachi | ||
538 | os=-hiuxwe2 | ||
539 | ;; | ||
540 | h8300hms) | ||
541 | basic_machine=h8300-hitachi | ||
542 | os=-hms | ||
543 | ;; | ||
544 | h8300xray) | ||
545 | basic_machine=h8300-hitachi | ||
546 | os=-xray | ||
547 | ;; | ||
548 | h8500hms) | ||
549 | basic_machine=h8500-hitachi | ||
550 | os=-hms | ||
551 | ;; | ||
552 | harris) | ||
553 | basic_machine=m88k-harris | ||
554 | os=-sysv3 | ||
555 | ;; | ||
556 | hp300-*) | ||
557 | basic_machine=m68k-hp | ||
558 | ;; | ||
559 | hp300bsd) | ||
560 | basic_machine=m68k-hp | ||
561 | os=-bsd | ||
562 | ;; | ||
563 | hp300hpux) | ||
564 | basic_machine=m68k-hp | ||
565 | os=-hpux | ||
566 | ;; | ||
567 | hp3k9[0-9][0-9] | hp9[0-9][0-9]) | ||
568 | basic_machine=hppa1.0-hp | ||
569 | ;; | ||
570 | hp9k2[0-9][0-9] | hp9k31[0-9]) | ||
571 | basic_machine=m68000-hp | ||
572 | ;; | ||
573 | hp9k3[2-9][0-9]) | ||
574 | basic_machine=m68k-hp | ||
575 | ;; | ||
576 | hp9k6[0-9][0-9] | hp6[0-9][0-9]) | ||
577 | basic_machine=hppa1.0-hp | ||
578 | ;; | ||
579 | hp9k7[0-79][0-9] | hp7[0-79][0-9]) | ||
580 | basic_machine=hppa1.1-hp | ||
581 | ;; | ||
582 | hp9k78[0-9] | hp78[0-9]) | ||
583 | # FIXME: really hppa2.0-hp | ||
584 | basic_machine=hppa1.1-hp | ||
585 | ;; | ||
586 | hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) | ||
587 | # FIXME: really hppa2.0-hp | ||
588 | basic_machine=hppa1.1-hp | ||
589 | ;; | ||
590 | hp9k8[0-9][13679] | hp8[0-9][13679]) | ||
591 | basic_machine=hppa1.1-hp | ||
592 | ;; | ||
593 | hp9k8[0-9][0-9] | hp8[0-9][0-9]) | ||
594 | basic_machine=hppa1.0-hp | ||
595 | ;; | ||
596 | hppa-next) | ||
597 | os=-nextstep3 | ||
598 | ;; | ||
599 | hppaosf) | ||
600 | basic_machine=hppa1.1-hp | ||
601 | os=-osf | ||
602 | ;; | ||
603 | hppro) | ||
604 | basic_machine=hppa1.1-hp | ||
605 | os=-proelf | ||
606 | ;; | ||
607 | i370-ibm* | ibm*) | ||
608 | basic_machine=i370-ibm | ||
609 | ;; | ||
610 | # I'm not sure what "Sysv32" means. Should this be sysv3.2? | ||
611 | i*86v32) | ||
612 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | ||
613 | os=-sysv32 | ||
614 | ;; | ||
615 | i*86v4*) | ||
616 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | ||
617 | os=-sysv4 | ||
618 | ;; | ||
619 | i*86v) | ||
620 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | ||
621 | os=-sysv | ||
622 | ;; | ||
623 | i*86sol2) | ||
624 | basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` | ||
625 | os=-solaris2 | ||
626 | ;; | ||
627 | i386mach) | ||
628 | basic_machine=i386-mach | ||
629 | os=-mach | ||
630 | ;; | ||
631 | i386-vsta | vsta) | ||
632 | basic_machine=i386-unknown | ||
633 | os=-vsta | ||
634 | ;; | ||
635 | iris | iris4d) | ||
636 | basic_machine=mips-sgi | ||
637 | case $os in | ||
638 | -irix*) | ||
639 | ;; | ||
640 | *) | ||
641 | os=-irix4 | ||
642 | ;; | ||
643 | esac | ||
644 | ;; | ||
645 | isi68 | isi) | ||
646 | basic_machine=m68k-isi | ||
647 | os=-sysv | ||
648 | ;; | ||
649 | m88k-omron*) | ||
650 | basic_machine=m88k-omron | ||
651 | ;; | ||
652 | magnum | m3230) | ||
653 | basic_machine=mips-mips | ||
654 | os=-sysv | ||
655 | ;; | ||
656 | merlin) | ||
657 | basic_machine=ns32k-utek | ||
658 | os=-sysv | ||
659 | ;; | ||
660 | mingw32) | ||
661 | basic_machine=i386-pc | ||
662 | os=-mingw32 | ||
663 | ;; | ||
664 | miniframe) | ||
665 | basic_machine=m68000-convergent | ||
666 | ;; | ||
667 | *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) | ||
668 | basic_machine=m68k-atari | ||
669 | os=-mint | ||
670 | ;; | ||
671 | mips3*-*) | ||
672 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` | ||
673 | ;; | ||
674 | mips3*) | ||
675 | basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown | ||
676 | ;; | ||
677 | monitor) | ||
678 | basic_machine=m68k-rom68k | ||
679 | os=-coff | ||
680 | ;; | ||
681 | morphos) | ||
682 | basic_machine=powerpc-unknown | ||
683 | os=-morphos | ||
684 | ;; | ||
685 | msdos) | ||
686 | basic_machine=i386-pc | ||
687 | os=-msdos | ||
688 | ;; | ||
689 | mvs) | ||
690 | basic_machine=i370-ibm | ||
691 | os=-mvs | ||
692 | ;; | ||
693 | ncr3000) | ||
694 | basic_machine=i486-ncr | ||
695 | os=-sysv4 | ||
696 | ;; | ||
697 | netbsd386) | ||
698 | basic_machine=i386-unknown | ||
699 | os=-netbsd | ||
700 | ;; | ||
701 | netwinder) | ||
702 | basic_machine=armv4l-rebel | ||
703 | os=-linux | ||
704 | ;; | ||
705 | news | news700 | news800 | news900) | ||
706 | basic_machine=m68k-sony | ||
707 | os=-newsos | ||
708 | ;; | ||
709 | news1000) | ||
710 | basic_machine=m68030-sony | ||
711 | os=-newsos | ||
712 | ;; | ||
713 | news-3600 | risc-news) | ||
714 | basic_machine=mips-sony | ||
715 | os=-newsos | ||
716 | ;; | ||
717 | necv70) | ||
718 | basic_machine=v70-nec | ||
719 | os=-sysv | ||
720 | ;; | ||
721 | next | m*-next ) | ||
722 | basic_machine=m68k-next | ||
723 | case $os in | ||
724 | -nextstep* ) | ||
725 | ;; | ||
726 | -ns2*) | ||
727 | os=-nextstep2 | ||
728 | ;; | ||
729 | *) | ||
730 | os=-nextstep3 | ||
731 | ;; | ||
732 | esac | ||
733 | ;; | ||
734 | nh3000) | ||
735 | basic_machine=m68k-harris | ||
736 | os=-cxux | ||
737 | ;; | ||
738 | nh[45]000) | ||
739 | basic_machine=m88k-harris | ||
740 | os=-cxux | ||
741 | ;; | ||
742 | nindy960) | ||
743 | basic_machine=i960-intel | ||
744 | os=-nindy | ||
745 | ;; | ||
746 | mon960) | ||
747 | basic_machine=i960-intel | ||
748 | os=-mon960 | ||
749 | ;; | ||
750 | nonstopux) | ||
751 | basic_machine=mips-compaq | ||
752 | os=-nonstopux | ||
753 | ;; | ||
754 | np1) | ||
755 | basic_machine=np1-gould | ||
756 | ;; | ||
757 | nsr-tandem) | ||
758 | basic_machine=nsr-tandem | ||
759 | ;; | ||
760 | op50n-* | op60c-*) | ||
761 | basic_machine=hppa1.1-oki | ||
762 | os=-proelf | ||
763 | ;; | ||
764 | or32 | or32-*) | ||
765 | basic_machine=or32-unknown | ||
766 | os=-coff | ||
767 | ;; | ||
768 | os400) | ||
769 | basic_machine=powerpc-ibm | ||
770 | os=-os400 | ||
771 | ;; | ||
772 | OSE68000 | ose68000) | ||
773 | basic_machine=m68000-ericsson | ||
774 | os=-ose | ||
775 | ;; | ||
776 | os68k) | ||
777 | basic_machine=m68k-none | ||
778 | os=-os68k | ||
779 | ;; | ||
780 | pa-hitachi) | ||
781 | basic_machine=hppa1.1-hitachi | ||
782 | os=-hiuxwe2 | ||
783 | ;; | ||
784 | paragon) | ||
785 | basic_machine=i860-intel | ||
786 | os=-osf | ||
787 | ;; | ||
788 | pbd) | ||
789 | basic_machine=sparc-tti | ||
790 | ;; | ||
791 | pbb) | ||
792 | basic_machine=m68k-tti | ||
793 | ;; | ||
794 | pc532 | pc532-*) | ||
795 | basic_machine=ns32k-pc532 | ||
796 | ;; | ||
797 | pentium | p5 | k5 | k6 | nexgen | viac3) | ||
798 | basic_machine=i586-pc | ||
799 | ;; | ||
800 | pentiumpro | p6 | 6x86 | athlon | athlon_*) | ||
801 | basic_machine=i686-pc | ||
802 | ;; | ||
803 | pentiumii | pentium2 | pentiumiii | pentium3) | ||
804 | basic_machine=i686-pc | ||
805 | ;; | ||
806 | pentium4) | ||
807 | basic_machine=i786-pc | ||
808 | ;; | ||
809 | pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) | ||
810 | basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
811 | ;; | ||
812 | pentiumpro-* | p6-* | 6x86-* | athlon-*) | ||
813 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
814 | ;; | ||
815 | pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) | ||
816 | basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
817 | ;; | ||
818 | pentium4-*) | ||
819 | basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
820 | ;; | ||
821 | pn) | ||
822 | basic_machine=pn-gould | ||
823 | ;; | ||
824 | power) basic_machine=power-ibm | ||
825 | ;; | ||
826 | ppc) basic_machine=powerpc-unknown | ||
827 | ;; | ||
828 | ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
829 | ;; | ||
830 | ppcle | powerpclittle | ppc-le | powerpc-little) | ||
831 | basic_machine=powerpcle-unknown | ||
832 | ;; | ||
833 | ppcle-* | powerpclittle-*) | ||
834 | basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
835 | ;; | ||
836 | ppc64) basic_machine=powerpc64-unknown | ||
837 | ;; | ||
838 | ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
839 | ;; | ||
840 | ppc64le | powerpc64little | ppc64-le | powerpc64-little) | ||
841 | basic_machine=powerpc64le-unknown | ||
842 | ;; | ||
843 | ppc64le-* | powerpc64little-*) | ||
844 | basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` | ||
845 | ;; | ||
846 | ps2) | ||
847 | basic_machine=i386-ibm | ||
848 | ;; | ||
849 | pw32) | ||
850 | basic_machine=i586-unknown | ||
851 | os=-pw32 | ||
852 | ;; | ||
853 | rom68k) | ||
854 | basic_machine=m68k-rom68k | ||
855 | os=-coff | ||
856 | ;; | ||
857 | rm[46]00) | ||
858 | basic_machine=mips-siemens | ||
859 | ;; | ||
860 | rtpc | rtpc-*) | ||
861 | basic_machine=romp-ibm | ||
862 | ;; | ||
863 | s390 | s390-*) | ||
864 | basic_machine=s390-ibm | ||
865 | ;; | ||
866 | s390x | s390x-*) | ||
867 | basic_machine=s390x-ibm | ||
868 | ;; | ||
869 | sa29200) | ||
870 | basic_machine=a29k-amd | ||
871 | os=-udi | ||
872 | ;; | ||
873 | sb1) | ||
874 | basic_machine=mipsisa64sb1-unknown | ||
875 | ;; | ||
876 | sb1el) | ||
877 | basic_machine=mipsisa64sb1el-unknown | ||
878 | ;; | ||
879 | sei) | ||
880 | basic_machine=mips-sei | ||
881 | os=-seiux | ||
882 | ;; | ||
883 | sequent) | ||
884 | basic_machine=i386-sequent | ||
885 | ;; | ||
886 | sh) | ||
887 | basic_machine=sh-hitachi | ||
888 | os=-hms | ||
889 | ;; | ||
890 | sh64) | ||
891 | basic_machine=sh64-unknown | ||
892 | ;; | ||
893 | sparclite-wrs | simso-wrs) | ||
894 | basic_machine=sparclite-wrs | ||
895 | os=-vxworks | ||
896 | ;; | ||
897 | sps7) | ||
898 | basic_machine=m68k-bull | ||
899 | os=-sysv2 | ||
900 | ;; | ||
901 | spur) | ||
902 | basic_machine=spur-unknown | ||
903 | ;; | ||
904 | st2000) | ||
905 | basic_machine=m68k-tandem | ||
906 | ;; | ||
907 | stratus) | ||
908 | basic_machine=i860-stratus | ||
909 | os=-sysv4 | ||
910 | ;; | ||
911 | sun2) | ||
912 | basic_machine=m68000-sun | ||
913 | ;; | ||
914 | sun2os3) | ||
915 | basic_machine=m68000-sun | ||
916 | os=-sunos3 | ||
917 | ;; | ||
918 | sun2os4) | ||
919 | basic_machine=m68000-sun | ||
920 | os=-sunos4 | ||
921 | ;; | ||
922 | sun3os3) | ||
923 | basic_machine=m68k-sun | ||
924 | os=-sunos3 | ||
925 | ;; | ||
926 | sun3os4) | ||
927 | basic_machine=m68k-sun | ||
928 | os=-sunos4 | ||
929 | ;; | ||
930 | sun4os3) | ||
931 | basic_machine=sparc-sun | ||
932 | os=-sunos3 | ||
933 | ;; | ||
934 | sun4os4) | ||
935 | basic_machine=sparc-sun | ||
936 | os=-sunos4 | ||
937 | ;; | ||
938 | sun4sol2) | ||
939 | basic_machine=sparc-sun | ||
940 | os=-solaris2 | ||
941 | ;; | ||
942 | sun3 | sun3-*) | ||
943 | basic_machine=m68k-sun | ||
944 | ;; | ||
945 | sun4) | ||
946 | basic_machine=sparc-sun | ||
947 | ;; | ||
948 | sun386 | sun386i | roadrunner) | ||
949 | basic_machine=i386-sun | ||
950 | ;; | ||
951 | sv1) | ||
952 | basic_machine=sv1-cray | ||
953 | os=-unicos | ||
954 | ;; | ||
955 | symmetry) | ||
956 | basic_machine=i386-sequent | ||
957 | os=-dynix | ||
958 | ;; | ||
959 | t3e) | ||
960 | basic_machine=alphaev5-cray | ||
961 | os=-unicos | ||
962 | ;; | ||
963 | t90) | ||
964 | basic_machine=t90-cray | ||
965 | os=-unicos | ||
966 | ;; | ||
967 | tic54x | c54x*) | ||
968 | basic_machine=tic54x-unknown | ||
969 | os=-coff | ||
970 | ;; | ||
971 | tic55x | c55x*) | ||
972 | basic_machine=tic55x-unknown | ||
973 | os=-coff | ||
974 | ;; | ||
975 | tic6x | c6x*) | ||
976 | basic_machine=tic6x-unknown | ||
977 | os=-coff | ||
978 | ;; | ||
979 | tx39) | ||
980 | basic_machine=mipstx39-unknown | ||
981 | ;; | ||
982 | tx39el) | ||
983 | basic_machine=mipstx39el-unknown | ||
984 | ;; | ||
985 | toad1) | ||
986 | basic_machine=pdp10-xkl | ||
987 | os=-tops20 | ||
988 | ;; | ||
989 | tower | tower-32) | ||
990 | basic_machine=m68k-ncr | ||
991 | ;; | ||
992 | tpf) | ||
993 | basic_machine=s390x-ibm | ||
994 | os=-tpf | ||
995 | ;; | ||
996 | udi29k) | ||
997 | basic_machine=a29k-amd | ||
998 | os=-udi | ||
999 | ;; | ||
1000 | ultra3) | ||
1001 | basic_machine=a29k-nyu | ||
1002 | os=-sym1 | ||
1003 | ;; | ||
1004 | v810 | necv810) | ||
1005 | basic_machine=v810-nec | ||
1006 | os=-none | ||
1007 | ;; | ||
1008 | vaxv) | ||
1009 | basic_machine=vax-dec | ||
1010 | os=-sysv | ||
1011 | ;; | ||
1012 | vms) | ||
1013 | basic_machine=vax-dec | ||
1014 | os=-vms | ||
1015 | ;; | ||
1016 | vpp*|vx|vx-*) | ||
1017 | basic_machine=f301-fujitsu | ||
1018 | ;; | ||
1019 | vxworks960) | ||
1020 | basic_machine=i960-wrs | ||
1021 | os=-vxworks | ||
1022 | ;; | ||
1023 | vxworks68) | ||
1024 | basic_machine=m68k-wrs | ||
1025 | os=-vxworks | ||
1026 | ;; | ||
1027 | vxworks29k) | ||
1028 | basic_machine=a29k-wrs | ||
1029 | os=-vxworks | ||
1030 | ;; | ||
1031 | w65*) | ||
1032 | basic_machine=w65-wdc | ||
1033 | os=-none | ||
1034 | ;; | ||
1035 | w89k-*) | ||
1036 | basic_machine=hppa1.1-winbond | ||
1037 | os=-proelf | ||
1038 | ;; | ||
1039 | xbox) | ||
1040 | basic_machine=i686-pc | ||
1041 | os=-mingw32 | ||
1042 | ;; | ||
1043 | xps | xps100) | ||
1044 | basic_machine=xps100-honeywell | ||
1045 | ;; | ||
1046 | ymp) | ||
1047 | basic_machine=ymp-cray | ||
1048 | os=-unicos | ||
1049 | ;; | ||
1050 | z8k-*-coff) | ||
1051 | basic_machine=z8k-unknown | ||
1052 | os=-sim | ||
1053 | ;; | ||
1054 | none) | ||
1055 | basic_machine=none-none | ||
1056 | os=-none | ||
1057 | ;; | ||
1058 | |||
1059 | # Here we handle the default manufacturer of certain CPU types. It is in | ||
1060 | # some cases the only manufacturer, in others, it is the most popular. | ||
1061 | w89k) | ||
1062 | basic_machine=hppa1.1-winbond | ||
1063 | ;; | ||
1064 | op50n) | ||
1065 | basic_machine=hppa1.1-oki | ||
1066 | ;; | ||
1067 | op60c) | ||
1068 | basic_machine=hppa1.1-oki | ||
1069 | ;; | ||
1070 | romp) | ||
1071 | basic_machine=romp-ibm | ||
1072 | ;; | ||
1073 | mmix) | ||
1074 | basic_machine=mmix-knuth | ||
1075 | ;; | ||
1076 | rs6000) | ||
1077 | basic_machine=rs6000-ibm | ||
1078 | ;; | ||
1079 | vax) | ||
1080 | basic_machine=vax-dec | ||
1081 | ;; | ||
1082 | pdp10) | ||
1083 | # there are many clones, so DEC is not a safe bet | ||
1084 | basic_machine=pdp10-unknown | ||
1085 | ;; | ||
1086 | pdp11) | ||
1087 | basic_machine=pdp11-dec | ||
1088 | ;; | ||
1089 | we32k) | ||
1090 | basic_machine=we32k-att | ||
1091 | ;; | ||
1092 | sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) | ||
1093 | basic_machine=sh-unknown | ||
1094 | ;; | ||
1095 | sh64) | ||
1096 | basic_machine=sh64-unknown | ||
1097 | ;; | ||
1098 | sparc | sparcv8 | sparcv9 | sparcv9b) | ||
1099 | basic_machine=sparc-sun | ||
1100 | ;; | ||
1101 | cydra) | ||
1102 | basic_machine=cydra-cydrome | ||
1103 | ;; | ||
1104 | orion) | ||
1105 | basic_machine=orion-highlevel | ||
1106 | ;; | ||
1107 | orion105) | ||
1108 | basic_machine=clipper-highlevel | ||
1109 | ;; | ||
1110 | mac | mpw | mac-mpw) | ||
1111 | basic_machine=m68k-apple | ||
1112 | ;; | ||
1113 | pmac | pmac-mpw) | ||
1114 | basic_machine=powerpc-apple | ||
1115 | ;; | ||
1116 | *-unknown) | ||
1117 | # Make sure to match an already-canonicalized machine name. | ||
1118 | ;; | ||
1119 | *) | ||
1120 | echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 | ||
1121 | exit 1 | ||
1122 | ;; | ||
1123 | esac | ||
1124 | |||
1125 | # Here we canonicalize certain aliases for manufacturers. | ||
1126 | case $basic_machine in | ||
1127 | *-digital*) | ||
1128 | basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` | ||
1129 | ;; | ||
1130 | *-commodore*) | ||
1131 | basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` | ||
1132 | ;; | ||
1133 | *) | ||
1134 | ;; | ||
1135 | esac | ||
1136 | |||
1137 | # Decode manufacturer-specific aliases for certain operating systems. | ||
1138 | |||
1139 | if [ x"$os" != x"" ] | ||
1140 | then | ||
1141 | case $os in | ||
1142 | # First match some system type aliases | ||
1143 | # that might get confused with valid system types. | ||
1144 | # -solaris* is a basic system type, with this one exception. | ||
1145 | -solaris1 | -solaris1.*) | ||
1146 | os=`echo $os | sed -e 's|solaris1|sunos4|'` | ||
1147 | ;; | ||
1148 | -solaris) | ||
1149 | os=-solaris2 | ||
1150 | ;; | ||
1151 | -svr4*) | ||
1152 | os=-sysv4 | ||
1153 | ;; | ||
1154 | -unixware*) | ||
1155 | os=-sysv4.2uw | ||
1156 | ;; | ||
1157 | -gnu/linux*) | ||
1158 | os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` | ||
1159 | ;; | ||
1160 | # First accept the basic system types. | ||
1161 | # The portable systems comes first. | ||
1162 | # Each alternative MUST END IN A *, to match a version number. | ||
1163 | # -sysv* is not here because it comes later, after sysvr4. | ||
1164 | -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | ||
1165 | | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | ||
1166 | | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | ||
1167 | | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | ||
1168 | | -aos* \ | ||
1169 | | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | ||
1170 | | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | ||
1171 | | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | ||
1172 | | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | ||
1173 | | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | ||
1174 | | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | ||
1175 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | ||
1176 | | -chorusos* | -chorusrdb* \ | ||
1177 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | ||
1178 | | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | ||
1179 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | ||
1180 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | ||
1181 | | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | ||
1182 | | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | ||
1183 | | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | ||
1184 | | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) | ||
1185 | # Remember, each alternative MUST END IN *, to match a version number. | ||
1186 | ;; | ||
1187 | -qnx*) | ||
1188 | case $basic_machine in | ||
1189 | x86-* | i*86-*) | ||
1190 | ;; | ||
1191 | *) | ||
1192 | os=-nto$os | ||
1193 | ;; | ||
1194 | esac | ||
1195 | ;; | ||
1196 | -nto-qnx*) | ||
1197 | ;; | ||
1198 | -nto*) | ||
1199 | os=`echo $os | sed -e 's|nto|nto-qnx|'` | ||
1200 | ;; | ||
1201 | -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | ||
1202 | | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | ||
1203 | | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) | ||
1204 | ;; | ||
1205 | -mac*) | ||
1206 | os=`echo $os | sed -e 's|mac|macos|'` | ||
1207 | ;; | ||
1208 | -linux-dietlibc) | ||
1209 | os=-linux-dietlibc | ||
1210 | ;; | ||
1211 | -linux*) | ||
1212 | os=`echo $os | sed -e 's|linux|linux-gnu|'` | ||
1213 | ;; | ||
1214 | -sunos5*) | ||
1215 | os=`echo $os | sed -e 's|sunos5|solaris2|'` | ||
1216 | ;; | ||
1217 | -sunos6*) | ||
1218 | os=`echo $os | sed -e 's|sunos6|solaris3|'` | ||
1219 | ;; | ||
1220 | -opened*) | ||
1221 | os=-openedition | ||
1222 | ;; | ||
1223 | -os400*) | ||
1224 | os=-os400 | ||
1225 | ;; | ||
1226 | -wince*) | ||
1227 | os=-wince | ||
1228 | ;; | ||
1229 | -osfrose*) | ||
1230 | os=-osfrose | ||
1231 | ;; | ||
1232 | -osf*) | ||
1233 | os=-osf | ||
1234 | ;; | ||
1235 | -utek*) | ||
1236 | os=-bsd | ||
1237 | ;; | ||
1238 | -dynix*) | ||
1239 | os=-bsd | ||
1240 | ;; | ||
1241 | -acis*) | ||
1242 | os=-aos | ||
1243 | ;; | ||
1244 | -atheos*) | ||
1245 | os=-atheos | ||
1246 | ;; | ||
1247 | -syllable*) | ||
1248 | os=-syllable | ||
1249 | ;; | ||
1250 | -386bsd) | ||
1251 | os=-bsd | ||
1252 | ;; | ||
1253 | -ctix* | -uts*) | ||
1254 | os=-sysv | ||
1255 | ;; | ||
1256 | -nova*) | ||
1257 | os=-rtmk-nova | ||
1258 | ;; | ||
1259 | -ns2 ) | ||
1260 | os=-nextstep2 | ||
1261 | ;; | ||
1262 | -nsk*) | ||
1263 | os=-nsk | ||
1264 | ;; | ||
1265 | # Preserve the version number of sinix5. | ||
1266 | -sinix5.*) | ||
1267 | os=`echo $os | sed -e 's|sinix|sysv|'` | ||
1268 | ;; | ||
1269 | -sinix*) | ||
1270 | os=-sysv4 | ||
1271 | ;; | ||
1272 | -tpf*) | ||
1273 | os=-tpf | ||
1274 | ;; | ||
1275 | -triton*) | ||
1276 | os=-sysv3 | ||
1277 | ;; | ||
1278 | -oss*) | ||
1279 | os=-sysv3 | ||
1280 | ;; | ||
1281 | -svr4) | ||
1282 | os=-sysv4 | ||
1283 | ;; | ||
1284 | -svr3) | ||
1285 | os=-sysv3 | ||
1286 | ;; | ||
1287 | -sysvr4) | ||
1288 | os=-sysv4 | ||
1289 | ;; | ||
1290 | # This must come after -sysvr4. | ||
1291 | -sysv*) | ||
1292 | ;; | ||
1293 | -ose*) | ||
1294 | os=-ose | ||
1295 | ;; | ||
1296 | -es1800*) | ||
1297 | os=-ose | ||
1298 | ;; | ||
1299 | -xenix) | ||
1300 | os=-xenix | ||
1301 | ;; | ||
1302 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | ||
1303 | os=-mint | ||
1304 | ;; | ||
1305 | -aros*) | ||
1306 | os=-aros | ||
1307 | ;; | ||
1308 | -kaos*) | ||
1309 | os=-kaos | ||
1310 | ;; | ||
1311 | -zvmoe) | ||
1312 | os=-zvmoe | ||
1313 | ;; | ||
1314 | -none) | ||
1315 | ;; | ||
1316 | *) | ||
1317 | # Get rid of the `-' at the beginning of $os. | ||
1318 | os=`echo $os | sed 's/[^-]*-//'` | ||
1319 | echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 | ||
1320 | exit 1 | ||
1321 | ;; | ||
1322 | esac | ||
1323 | else | ||
1324 | |||
1325 | # Here we handle the default operating systems that come with various machines. | ||
1326 | # The value should be what the vendor currently ships out the door with their | ||
1327 | # machine or put another way, the most popular os provided with the machine. | ||
1328 | |||
1329 | # Note that if you're going to try to match "-MANUFACTURER" here (say, | ||
1330 | # "-sun"), then you have to tell the case statement up towards the top | ||
1331 | # that MANUFACTURER isn't an operating system. Otherwise, code above | ||
1332 | # will signal an error saying that MANUFACTURER isn't an operating | ||
1333 | # system, and we'll never get to this point. | ||
1334 | |||
1335 | case $basic_machine in | ||
1336 | *-acorn) | ||
1337 | os=-riscix1.2 | ||
1338 | ;; | ||
1339 | arm*-rebel) | ||
1340 | os=-linux | ||
1341 | ;; | ||
1342 | arm*-semi) | ||
1343 | os=-aout | ||
1344 | ;; | ||
1345 | c4x-* | tic4x-*) | ||
1346 | os=-coff | ||
1347 | ;; | ||
1348 | # This must come before the *-dec entry. | ||
1349 | pdp10-*) | ||
1350 | os=-tops20 | ||
1351 | ;; | ||
1352 | pdp11-*) | ||
1353 | os=-none | ||
1354 | ;; | ||
1355 | *-dec | vax-*) | ||
1356 | os=-ultrix4.2 | ||
1357 | ;; | ||
1358 | m68*-apollo) | ||
1359 | os=-domain | ||
1360 | ;; | ||
1361 | i386-sun) | ||
1362 | os=-sunos4.0.2 | ||
1363 | ;; | ||
1364 | m68000-sun) | ||
1365 | os=-sunos3 | ||
1366 | # This also exists in the configure program, but was not the | ||
1367 | # default. | ||
1368 | # os=-sunos4 | ||
1369 | ;; | ||
1370 | m68*-cisco) | ||
1371 | os=-aout | ||
1372 | ;; | ||
1373 | mips*-cisco) | ||
1374 | os=-elf | ||
1375 | ;; | ||
1376 | mips*-*) | ||
1377 | os=-elf | ||
1378 | ;; | ||
1379 | or32-*) | ||
1380 | os=-coff | ||
1381 | ;; | ||
1382 | *-tti) # must be before sparc entry or we get the wrong os. | ||
1383 | os=-sysv3 | ||
1384 | ;; | ||
1385 | sparc-* | *-sun) | ||
1386 | os=-sunos4.1.1 | ||
1387 | ;; | ||
1388 | *-be) | ||
1389 | os=-beos | ||
1390 | ;; | ||
1391 | *-ibm) | ||
1392 | os=-aix | ||
1393 | ;; | ||
1394 | *-knuth) | ||
1395 | os=-mmixware | ||
1396 | ;; | ||
1397 | *-wec) | ||
1398 | os=-proelf | ||
1399 | ;; | ||
1400 | *-winbond) | ||
1401 | os=-proelf | ||
1402 | ;; | ||
1403 | *-oki) | ||
1404 | os=-proelf | ||
1405 | ;; | ||
1406 | *-hp) | ||
1407 | os=-hpux | ||
1408 | ;; | ||
1409 | *-hitachi) | ||
1410 | os=-hiux | ||
1411 | ;; | ||
1412 | i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) | ||
1413 | os=-sysv | ||
1414 | ;; | ||
1415 | *-cbm) | ||
1416 | os=-amigaos | ||
1417 | ;; | ||
1418 | *-dg) | ||
1419 | os=-dgux | ||
1420 | ;; | ||
1421 | *-dolphin) | ||
1422 | os=-sysv3 | ||
1423 | ;; | ||
1424 | m68k-ccur) | ||
1425 | os=-rtu | ||
1426 | ;; | ||
1427 | m88k-omron*) | ||
1428 | os=-luna | ||
1429 | ;; | ||
1430 | *-next ) | ||
1431 | os=-nextstep | ||
1432 | ;; | ||
1433 | *-sequent) | ||
1434 | os=-ptx | ||
1435 | ;; | ||
1436 | *-crds) | ||
1437 | os=-unos | ||
1438 | ;; | ||
1439 | *-ns) | ||
1440 | os=-genix | ||
1441 | ;; | ||
1442 | i370-*) | ||
1443 | os=-mvs | ||
1444 | ;; | ||
1445 | *-next) | ||
1446 | os=-nextstep3 | ||
1447 | ;; | ||
1448 | *-gould) | ||
1449 | os=-sysv | ||
1450 | ;; | ||
1451 | *-highlevel) | ||
1452 | os=-bsd | ||
1453 | ;; | ||
1454 | *-encore) | ||
1455 | os=-bsd | ||
1456 | ;; | ||
1457 | *-sgi) | ||
1458 | os=-irix | ||
1459 | ;; | ||
1460 | *-siemens) | ||
1461 | os=-sysv4 | ||
1462 | ;; | ||
1463 | *-masscomp) | ||
1464 | os=-rtu | ||
1465 | ;; | ||
1466 | f30[01]-fujitsu | f700-fujitsu) | ||
1467 | os=-uxpv | ||
1468 | ;; | ||
1469 | *-rom68k) | ||
1470 | os=-coff | ||
1471 | ;; | ||
1472 | *-*bug) | ||
1473 | os=-coff | ||
1474 | ;; | ||
1475 | *-apple) | ||
1476 | os=-macos | ||
1477 | ;; | ||
1478 | *-atari*) | ||
1479 | os=-mint | ||
1480 | ;; | ||
1481 | *) | ||
1482 | os=-none | ||
1483 | ;; | ||
1484 | esac | ||
1485 | fi | ||
1486 | |||
1487 | # Here we handle the case where we know the os, and the CPU type, but not the | ||
1488 | # manufacturer. We pick the logical manufacturer. | ||
1489 | vendor=unknown | ||
1490 | case $basic_machine in | ||
1491 | *-unknown) | ||
1492 | case $os in | ||
1493 | -riscix*) | ||
1494 | vendor=acorn | ||
1495 | ;; | ||
1496 | -sunos*) | ||
1497 | vendor=sun | ||
1498 | ;; | ||
1499 | -aix*) | ||
1500 | vendor=ibm | ||
1501 | ;; | ||
1502 | -beos*) | ||
1503 | vendor=be | ||
1504 | ;; | ||
1505 | -hpux*) | ||
1506 | vendor=hp | ||
1507 | ;; | ||
1508 | -mpeix*) | ||
1509 | vendor=hp | ||
1510 | ;; | ||
1511 | -hiux*) | ||
1512 | vendor=hitachi | ||
1513 | ;; | ||
1514 | -unos*) | ||
1515 | vendor=crds | ||
1516 | ;; | ||
1517 | -dgux*) | ||
1518 | vendor=dg | ||
1519 | ;; | ||
1520 | -luna*) | ||
1521 | vendor=omron | ||
1522 | ;; | ||
1523 | -genix*) | ||
1524 | vendor=ns | ||
1525 | ;; | ||
1526 | -mvs* | -opened*) | ||
1527 | vendor=ibm | ||
1528 | ;; | ||
1529 | -os400*) | ||
1530 | vendor=ibm | ||
1531 | ;; | ||
1532 | -ptx*) | ||
1533 | vendor=sequent | ||
1534 | ;; | ||
1535 | -tpf*) | ||
1536 | vendor=ibm | ||
1537 | ;; | ||
1538 | -vxsim* | -vxworks* | -windiss*) | ||
1539 | vendor=wrs | ||
1540 | ;; | ||
1541 | -aux*) | ||
1542 | vendor=apple | ||
1543 | ;; | ||
1544 | -hms*) | ||
1545 | vendor=hitachi | ||
1546 | ;; | ||
1547 | -mpw* | -macos*) | ||
1548 | vendor=apple | ||
1549 | ;; | ||
1550 | -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) | ||
1551 | vendor=atari | ||
1552 | ;; | ||
1553 | -vos*) | ||
1554 | vendor=stratus | ||
1555 | ;; | ||
1556 | esac | ||
1557 | basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` | ||
1558 | ;; | ||
1559 | esac | ||
1560 | |||
1561 | echo $basic_machine$os | ||
1562 | exit 0 | ||
1563 | |||
1564 | # Local variables: | ||
1565 | # eval: (add-hook 'write-file-hooks 'time-stamp) | ||
1566 | # time-stamp-start: "timestamp='" | ||
1567 | # time-stamp-format: "%:y-%02m-%02d" | ||
1568 | # time-stamp-end: "'" | ||
1569 | # End: | ||
diff --git a/libltdl/configure b/libltdl/configure new file mode 100755 index 00000000..03678466 --- /dev/null +++ b/libltdl/configure | |||
@@ -0,0 +1,23702 @@ | |||
1 | #! /bin/sh | ||
2 | # Guess values for system-dependent variables and create Makefiles. | ||
3 | # Generated by GNU Autoconf 2.59 for libltdl 1.2. | ||
4 | # | ||
5 | # Report bugs to <bug-libtool@gnu.org>. | ||
6 | # | ||
7 | # Copyright (C) 2003 Free Software Foundation, Inc. | ||
8 | # This configure script is free software; the Free Software Foundation | ||
9 | # gives unlimited permission to copy, distribute and modify it. | ||
10 | ## --------------------- ## | ||
11 | ## M4sh Initialization. ## | ||
12 | ## --------------------- ## | ||
13 | |||
14 | # Be Bourne compatible | ||
15 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | ||
16 | emulate sh | ||
17 | NULLCMD=: | ||
18 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | ||
19 | # is contrary to our usage. Disable this feature. | ||
20 | alias -g '${1+"$@"}'='"$@"' | ||
21 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | ||
22 | set -o posix | ||
23 | fi | ||
24 | DUALCASE=1; export DUALCASE # for MKS sh | ||
25 | |||
26 | # Support unset when possible. | ||
27 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | ||
28 | as_unset=unset | ||
29 | else | ||
30 | as_unset=false | ||
31 | fi | ||
32 | |||
33 | |||
34 | # Work around bugs in pre-3.0 UWIN ksh. | ||
35 | $as_unset ENV MAIL MAILPATH | ||
36 | PS1='$ ' | ||
37 | PS2='> ' | ||
38 | PS4='+ ' | ||
39 | |||
40 | # NLS nuisances. | ||
41 | for as_var in \ | ||
42 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | ||
43 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | ||
44 | LC_TELEPHONE LC_TIME | ||
45 | do | ||
46 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then | ||
47 | eval $as_var=C; export $as_var | ||
48 | else | ||
49 | $as_unset $as_var | ||
50 | fi | ||
51 | done | ||
52 | |||
53 | # Required to use basename. | ||
54 | if expr a : '\(a\)' >/dev/null 2>&1; then | ||
55 | as_expr=expr | ||
56 | else | ||
57 | as_expr=false | ||
58 | fi | ||
59 | |||
60 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then | ||
61 | as_basename=basename | ||
62 | else | ||
63 | as_basename=false | ||
64 | fi | ||
65 | |||
66 | |||
67 | # Name of the executable. | ||
68 | as_me=`$as_basename "$0" || | ||
69 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | ||
70 | X"$0" : 'X\(//\)$' \| \ | ||
71 | X"$0" : 'X\(/\)$' \| \ | ||
72 | . : '\(.\)' 2>/dev/null || | ||
73 | echo X/"$0" | | ||
74 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | ||
75 | /^X\/\(\/\/\)$/{ s//\1/; q; } | ||
76 | /^X\/\(\/\).*/{ s//\1/; q; } | ||
77 | s/.*/./; q'` | ||
78 | |||
79 | |||
80 | # PATH needs CR, and LINENO needs CR and PATH. | ||
81 | # Avoid depending upon Character Ranges. | ||
82 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | ||
83 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | ||
84 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | ||
85 | as_cr_digits='0123456789' | ||
86 | as_cr_alnum=$as_cr_Letters$as_cr_digits | ||
87 | |||
88 | # The user is always right. | ||
89 | if test "${PATH_SEPARATOR+set}" != set; then | ||
90 | echo "#! /bin/sh" >conf$$.sh | ||
91 | echo "exit 0" >>conf$$.sh | ||
92 | chmod +x conf$$.sh | ||
93 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | ||
94 | PATH_SEPARATOR=';' | ||
95 | else | ||
96 | PATH_SEPARATOR=: | ||
97 | fi | ||
98 | rm -f conf$$.sh | ||
99 | fi | ||
100 | |||
101 | |||
102 | as_lineno_1=$LINENO | ||
103 | as_lineno_2=$LINENO | ||
104 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | ||
105 | test "x$as_lineno_1" != "x$as_lineno_2" && | ||
106 | test "x$as_lineno_3" = "x$as_lineno_2" || { | ||
107 | # Find who we are. Look in the path if we contain no path at all | ||
108 | # relative or not. | ||
109 | case $0 in | ||
110 | *[\\/]* ) as_myself=$0 ;; | ||
111 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
112 | for as_dir in $PATH | ||
113 | do | ||
114 | IFS=$as_save_IFS | ||
115 | test -z "$as_dir" && as_dir=. | ||
116 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | ||
117 | done | ||
118 | |||
119 | ;; | ||
120 | esac | ||
121 | # We did not find ourselves, most probably we were run as `sh COMMAND' | ||
122 | # in which case we are not to be found in the path. | ||
123 | if test "x$as_myself" = x; then | ||
124 | as_myself=$0 | ||
125 | fi | ||
126 | if test ! -f "$as_myself"; then | ||
127 | { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 | ||
128 | { (exit 1); exit 1; }; } | ||
129 | fi | ||
130 | case $CONFIG_SHELL in | ||
131 | '') | ||
132 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
133 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | ||
134 | do | ||
135 | IFS=$as_save_IFS | ||
136 | test -z "$as_dir" && as_dir=. | ||
137 | for as_base in sh bash ksh sh5; do | ||
138 | case $as_dir in | ||
139 | /*) | ||
140 | if ("$as_dir/$as_base" -c ' | ||
141 | as_lineno_1=$LINENO | ||
142 | as_lineno_2=$LINENO | ||
143 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | ||
144 | test "x$as_lineno_1" != "x$as_lineno_2" && | ||
145 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | ||
146 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | ||
147 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | ||
148 | CONFIG_SHELL=$as_dir/$as_base | ||
149 | export CONFIG_SHELL | ||
150 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | ||
151 | fi;; | ||
152 | esac | ||
153 | done | ||
154 | done | ||
155 | ;; | ||
156 | esac | ||
157 | |||
158 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | ||
159 | # uniformly replaced by the line number. The first 'sed' inserts a | ||
160 | # line-number line before each line; the second 'sed' does the real | ||
161 | # work. The second script uses 'N' to pair each line-number line | ||
162 | # with the numbered line, and appends trailing '-' during | ||
163 | # substitution so that $LINENO is not a special case at line end. | ||
164 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | ||
165 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | ||
166 | sed '=' <$as_myself | | ||
167 | sed ' | ||
168 | N | ||
169 | s,$,-, | ||
170 | : loop | ||
171 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | ||
172 | t loop | ||
173 | s,-$,, | ||
174 | s,^['$as_cr_digits']*\n,, | ||
175 | ' >$as_me.lineno && | ||
176 | chmod +x $as_me.lineno || | ||
177 | { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 | ||
178 | { (exit 1); exit 1; }; } | ||
179 | |||
180 | # Don't try to exec as it changes $[0], causing all sort of problems | ||
181 | # (the dirname of $[0] is not the place where we might find the | ||
182 | # original and so on. Autoconf is especially sensible to this). | ||
183 | . ./$as_me.lineno | ||
184 | # Exit status is that of the last command. | ||
185 | exit | ||
186 | } | ||
187 | |||
188 | |||
189 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | ||
190 | *c*,-n*) ECHO_N= ECHO_C=' | ||
191 | ' ECHO_T=' ' ;; | ||
192 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | ||
193 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | ||
194 | esac | ||
195 | |||
196 | if expr a : '\(a\)' >/dev/null 2>&1; then | ||
197 | as_expr=expr | ||
198 | else | ||
199 | as_expr=false | ||
200 | fi | ||
201 | |||
202 | rm -f conf$$ conf$$.exe conf$$.file | ||
203 | echo >conf$$.file | ||
204 | if ln -s conf$$.file conf$$ 2>/dev/null; then | ||
205 | # We could just check for DJGPP; but this test a) works b) is more generic | ||
206 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | ||
207 | if test -f conf$$.exe; then | ||
208 | # Don't use ln at all; we don't have any links | ||
209 | as_ln_s='cp -p' | ||
210 | else | ||
211 | as_ln_s='ln -s' | ||
212 | fi | ||
213 | elif ln conf$$.file conf$$ 2>/dev/null; then | ||
214 | as_ln_s=ln | ||
215 | else | ||
216 | as_ln_s='cp -p' | ||
217 | fi | ||
218 | rm -f conf$$ conf$$.exe conf$$.file | ||
219 | |||
220 | if mkdir -p . 2>/dev/null; then | ||
221 | as_mkdir_p=: | ||
222 | else | ||
223 | test -d ./-p && rmdir ./-p | ||
224 | as_mkdir_p=false | ||
225 | fi | ||
226 | |||
227 | as_executable_p="test -f" | ||
228 | |||
229 | # Sed expression to map a string onto a valid CPP name. | ||
230 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | ||
231 | |||
232 | # Sed expression to map a string onto a valid variable name. | ||
233 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | ||
234 | |||
235 | |||
236 | # IFS | ||
237 | # We need space, tab and new line, in precisely that order. | ||
238 | as_nl=' | ||
239 | ' | ||
240 | IFS=" $as_nl" | ||
241 | |||
242 | # CDPATH. | ||
243 | $as_unset CDPATH | ||
244 | |||
245 | |||
246 | |||
247 | # Check that we are running under the correct shell. | ||
248 | SHELL=${CONFIG_SHELL-/bin/sh} | ||
249 | |||
250 | case X$ECHO in | ||
251 | X*--fallback-echo) | ||
252 | # Remove one level of quotation (which was required for Make). | ||
253 | ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` | ||
254 | ;; | ||
255 | esac | ||
256 | |||
257 | echo=${ECHO-echo} | ||
258 | if test "X$1" = X--no-reexec; then | ||
259 | # Discard the --no-reexec flag, and continue. | ||
260 | shift | ||
261 | elif test "X$1" = X--fallback-echo; then | ||
262 | # Avoid inline document here, it may be left over | ||
263 | : | ||
264 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then | ||
265 | # Yippee, $echo works! | ||
266 | : | ||
267 | else | ||
268 | # Restart under the correct shell. | ||
269 | exec $SHELL "$0" --no-reexec ${1+"$@"} | ||
270 | fi | ||
271 | |||
272 | if test "X$1" = X--fallback-echo; then | ||
273 | # used as fallback echo | ||
274 | shift | ||
275 | cat <<EOF | ||
276 | $* | ||
277 | EOF | ||
278 | exit 0 | ||
279 | fi | ||
280 | |||
281 | # The HP-UX ksh and POSIX shell print the target directory to stdout | ||
282 | # if CDPATH is set. | ||
283 | if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | ||
284 | |||
285 | if test -z "$ECHO"; then | ||
286 | if test "X${echo_test_string+set}" != Xset; then | ||
287 | # find a string as large as possible, as long as the shell can cope with it | ||
288 | for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do | ||
289 | # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... | ||
290 | if (echo_test_string="`eval $cmd`") 2>/dev/null && | ||
291 | echo_test_string="`eval $cmd`" && | ||
292 | (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null | ||
293 | then | ||
294 | break | ||
295 | fi | ||
296 | done | ||
297 | fi | ||
298 | |||
299 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | ||
300 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | ||
301 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
302 | : | ||
303 | else | ||
304 | # The Solaris, AIX, and Digital Unix default echo programs unquote | ||
305 | # backslashes. This makes it impossible to quote backslashes using | ||
306 | # echo "$something" | sed 's/\\/\\\\/g' | ||
307 | # | ||
308 | # So, first we look for a working echo in the user's PATH. | ||
309 | |||
310 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
311 | for dir in $PATH /usr/ucb; do | ||
312 | IFS="$lt_save_ifs" | ||
313 | if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && | ||
314 | test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && | ||
315 | echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && | ||
316 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
317 | echo="$dir/echo" | ||
318 | break | ||
319 | fi | ||
320 | done | ||
321 | IFS="$lt_save_ifs" | ||
322 | |||
323 | if test "X$echo" = Xecho; then | ||
324 | # We didn't find a better echo, so look for alternatives. | ||
325 | if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && | ||
326 | echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && | ||
327 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
328 | # This shell has a builtin print -r that does the trick. | ||
329 | echo='print -r' | ||
330 | elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && | ||
331 | test "X$CONFIG_SHELL" != X/bin/ksh; then | ||
332 | # If we have ksh, try running configure again with it. | ||
333 | ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | ||
334 | export ORIGINAL_CONFIG_SHELL | ||
335 | CONFIG_SHELL=/bin/ksh | ||
336 | export CONFIG_SHELL | ||
337 | exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} | ||
338 | else | ||
339 | # Try using printf. | ||
340 | echo='printf %s\n' | ||
341 | if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | ||
342 | echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | ||
343 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
344 | # Cool, printf works | ||
345 | : | ||
346 | elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && | ||
347 | test "X$echo_testing_string" = 'X\t' && | ||
348 | echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && | ||
349 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
350 | CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL | ||
351 | export CONFIG_SHELL | ||
352 | SHELL="$CONFIG_SHELL" | ||
353 | export SHELL | ||
354 | echo="$CONFIG_SHELL $0 --fallback-echo" | ||
355 | elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && | ||
356 | test "X$echo_testing_string" = 'X\t' && | ||
357 | echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && | ||
358 | test "X$echo_testing_string" = "X$echo_test_string"; then | ||
359 | echo="$CONFIG_SHELL $0 --fallback-echo" | ||
360 | else | ||
361 | # maybe with a smaller string... | ||
362 | prev=: | ||
363 | |||
364 | for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do | ||
365 | if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null | ||
366 | then | ||
367 | break | ||
368 | fi | ||
369 | prev="$cmd" | ||
370 | done | ||
371 | |||
372 | if test "$prev" != 'sed 50q "$0"'; then | ||
373 | echo_test_string=`eval $prev` | ||
374 | export echo_test_string | ||
375 | exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} | ||
376 | else | ||
377 | # Oops. We lost completely, so just stick with echo. | ||
378 | echo=echo | ||
379 | fi | ||
380 | fi | ||
381 | fi | ||
382 | fi | ||
383 | fi | ||
384 | fi | ||
385 | |||
386 | # Copy echo and quote the copy suitably for passing to libtool from | ||
387 | # the Makefile, instead of quoting the original, which is used later. | ||
388 | ECHO=$echo | ||
389 | if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then | ||
390 | ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" | ||
391 | fi | ||
392 | |||
393 | |||
394 | |||
395 | |||
396 | tagnames=${tagnames+${tagnames},}CXX | ||
397 | |||
398 | tagnames=${tagnames+${tagnames},}F77 | ||
399 | |||
400 | # Name of the host. | ||
401 | # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, | ||
402 | # so uname gets run too. | ||
403 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | ||
404 | |||
405 | exec 6>&1 | ||
406 | |||
407 | # | ||
408 | # Initializations. | ||
409 | # | ||
410 | ac_default_prefix=/usr/local | ||
411 | ac_config_libobj_dir=. | ||
412 | cross_compiling=no | ||
413 | subdirs= | ||
414 | MFLAGS= | ||
415 | MAKEFLAGS= | ||
416 | SHELL=${CONFIG_SHELL-/bin/sh} | ||
417 | |||
418 | # Maximum number of lines to put in a shell here document. | ||
419 | # This variable seems obsolete. It should probably be removed, and | ||
420 | # only ac_max_sed_lines should be used. | ||
421 | : ${ac_max_here_lines=38} | ||
422 | |||
423 | # Identity of this package. | ||
424 | PACKAGE_NAME='libltdl' | ||
425 | PACKAGE_TARNAME='libltdl' | ||
426 | PACKAGE_VERSION='1.2' | ||
427 | PACKAGE_STRING='libltdl 1.2' | ||
428 | PACKAGE_BUGREPORT='bug-libtool@gnu.org' | ||
429 | |||
430 | ac_unique_file="ltdl.c" | ||
431 | # Factoring default headers for most tests. | ||
432 | ac_includes_default="\ | ||
433 | #include <stdio.h> | ||
434 | #if HAVE_SYS_TYPES_H | ||
435 | # include <sys/types.h> | ||
436 | #endif | ||
437 | #if HAVE_SYS_STAT_H | ||
438 | # include <sys/stat.h> | ||
439 | #endif | ||
440 | #if STDC_HEADERS | ||
441 | # include <stdlib.h> | ||
442 | # include <stddef.h> | ||
443 | #else | ||
444 | # if HAVE_STDLIB_H | ||
445 | # include <stdlib.h> | ||
446 | # endif | ||
447 | #endif | ||
448 | #if HAVE_STRING_H | ||
449 | # if !STDC_HEADERS && HAVE_MEMORY_H | ||
450 | # include <memory.h> | ||
451 | # endif | ||
452 | # include <string.h> | ||
453 | #endif | ||
454 | #if HAVE_STRINGS_H | ||
455 | # include <strings.h> | ||
456 | #endif | ||
457 | #if HAVE_INTTYPES_H | ||
458 | # include <inttypes.h> | ||
459 | #else | ||
460 | # if HAVE_STDINT_H | ||
461 | # include <stdint.h> | ||
462 | # endif | ||
463 | #endif | ||
464 | #if HAVE_UNISTD_H | ||
465 | # include <unistd.h> | ||
466 | #endif" | ||
467 | |||
468 | ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL LIBOBJS LTLIBOBJS' | ||
469 | ac_subst_files='' | ||
470 | |||
471 | # Initialize some variables set by options. | ||
472 | ac_init_help= | ||
473 | ac_init_version=false | ||
474 | # The variables have the same names as the options, with | ||
475 | # dashes changed to underlines. | ||
476 | cache_file=/dev/null | ||
477 | exec_prefix=NONE | ||
478 | no_create= | ||
479 | no_recursion= | ||
480 | prefix=NONE | ||
481 | program_prefix=NONE | ||
482 | program_suffix=NONE | ||
483 | program_transform_name=s,x,x, | ||
484 | silent= | ||
485 | site= | ||
486 | srcdir= | ||
487 | verbose= | ||
488 | x_includes=NONE | ||
489 | x_libraries=NONE | ||
490 | |||
491 | # Installation directory options. | ||
492 | # These are left unexpanded so users can "make install exec_prefix=/foo" | ||
493 | # and all the variables that are supposed to be based on exec_prefix | ||
494 | # by default will actually change. | ||
495 | # Use braces instead of parens because sh, perl, etc. also accept them. | ||
496 | bindir='${exec_prefix}/bin' | ||
497 | sbindir='${exec_prefix}/sbin' | ||
498 | libexecdir='${exec_prefix}/libexec' | ||
499 | datadir='${prefix}/share' | ||
500 | sysconfdir='${prefix}/etc' | ||
501 | sharedstatedir='${prefix}/com' | ||
502 | localstatedir='${prefix}/var' | ||
503 | libdir='${exec_prefix}/lib' | ||
504 | includedir='${prefix}/include' | ||
505 | oldincludedir='/usr/include' | ||
506 | infodir='${prefix}/info' | ||
507 | mandir='${prefix}/man' | ||
508 | |||
509 | ac_prev= | ||
510 | for ac_option | ||
511 | do | ||
512 | # If the previous option needs an argument, assign it. | ||
513 | if test -n "$ac_prev"; then | ||
514 | eval "$ac_prev=\$ac_option" | ||
515 | ac_prev= | ||
516 | continue | ||
517 | fi | ||
518 | |||
519 | ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` | ||
520 | |||
521 | # Accept the important Cygnus configure options, so we can diagnose typos. | ||
522 | |||
523 | case $ac_option in | ||
524 | |||
525 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | ||
526 | ac_prev=bindir ;; | ||
527 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | ||
528 | bindir=$ac_optarg ;; | ||
529 | |||
530 | -build | --build | --buil | --bui | --bu) | ||
531 | ac_prev=build_alias ;; | ||
532 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | ||
533 | build_alias=$ac_optarg ;; | ||
534 | |||
535 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | ||
536 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | ||
537 | ac_prev=cache_file ;; | ||
538 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | ||
539 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | ||
540 | cache_file=$ac_optarg ;; | ||
541 | |||
542 | --config-cache | -C) | ||
543 | cache_file=config.cache ;; | ||
544 | |||
545 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | ||
546 | ac_prev=datadir ;; | ||
547 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | ||
548 | | --da=*) | ||
549 | datadir=$ac_optarg ;; | ||
550 | |||
551 | -disable-* | --disable-*) | ||
552 | ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | ||
553 | # Reject names that are not valid shell variable names. | ||
554 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && | ||
555 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | ||
556 | { (exit 1); exit 1; }; } | ||
557 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | ||
558 | eval "enable_$ac_feature=no" ;; | ||
559 | |||
560 | -enable-* | --enable-*) | ||
561 | ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | ||
562 | # Reject names that are not valid shell variable names. | ||
563 | expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && | ||
564 | { echo "$as_me: error: invalid feature name: $ac_feature" >&2 | ||
565 | { (exit 1); exit 1; }; } | ||
566 | ac_feature=`echo $ac_feature | sed 's/-/_/g'` | ||
567 | case $ac_option in | ||
568 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | ||
569 | *) ac_optarg=yes ;; | ||
570 | esac | ||
571 | eval "enable_$ac_feature='$ac_optarg'" ;; | ||
572 | |||
573 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | ||
574 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | ||
575 | | --exec | --exe | --ex) | ||
576 | ac_prev=exec_prefix ;; | ||
577 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | ||
578 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | ||
579 | | --exec=* | --exe=* | --ex=*) | ||
580 | exec_prefix=$ac_optarg ;; | ||
581 | |||
582 | -gas | --gas | --ga | --g) | ||
583 | # Obsolete; use --with-gas. | ||
584 | with_gas=yes ;; | ||
585 | |||
586 | -help | --help | --hel | --he | -h) | ||
587 | ac_init_help=long ;; | ||
588 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | ||
589 | ac_init_help=recursive ;; | ||
590 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | ||
591 | ac_init_help=short ;; | ||
592 | |||
593 | -host | --host | --hos | --ho) | ||
594 | ac_prev=host_alias ;; | ||
595 | -host=* | --host=* | --hos=* | --ho=*) | ||
596 | host_alias=$ac_optarg ;; | ||
597 | |||
598 | -includedir | --includedir | --includedi | --included | --include \ | ||
599 | | --includ | --inclu | --incl | --inc) | ||
600 | ac_prev=includedir ;; | ||
601 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | ||
602 | | --includ=* | --inclu=* | --incl=* | --inc=*) | ||
603 | includedir=$ac_optarg ;; | ||
604 | |||
605 | -infodir | --infodir | --infodi | --infod | --info | --inf) | ||
606 | ac_prev=infodir ;; | ||
607 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | ||
608 | infodir=$ac_optarg ;; | ||
609 | |||
610 | -libdir | --libdir | --libdi | --libd) | ||
611 | ac_prev=libdir ;; | ||
612 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | ||
613 | libdir=$ac_optarg ;; | ||
614 | |||
615 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | ||
616 | | --libexe | --libex | --libe) | ||
617 | ac_prev=libexecdir ;; | ||
618 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | ||
619 | | --libexe=* | --libex=* | --libe=*) | ||
620 | libexecdir=$ac_optarg ;; | ||
621 | |||
622 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | ||
623 | | --localstate | --localstat | --localsta | --localst \ | ||
624 | | --locals | --local | --loca | --loc | --lo) | ||
625 | ac_prev=localstatedir ;; | ||
626 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | ||
627 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | ||
628 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | ||
629 | localstatedir=$ac_optarg ;; | ||
630 | |||
631 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | ||
632 | ac_prev=mandir ;; | ||
633 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | ||
634 | mandir=$ac_optarg ;; | ||
635 | |||
636 | -nfp | --nfp | --nf) | ||
637 | # Obsolete; use --without-fp. | ||
638 | with_fp=no ;; | ||
639 | |||
640 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | ||
641 | | --no-cr | --no-c | -n) | ||
642 | no_create=yes ;; | ||
643 | |||
644 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | ||
645 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | ||
646 | no_recursion=yes ;; | ||
647 | |||
648 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | ||
649 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | ||
650 | | --oldin | --oldi | --old | --ol | --o) | ||
651 | ac_prev=oldincludedir ;; | ||
652 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | ||
653 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | ||
654 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | ||
655 | oldincludedir=$ac_optarg ;; | ||
656 | |||
657 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | ||
658 | ac_prev=prefix ;; | ||
659 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | ||
660 | prefix=$ac_optarg ;; | ||
661 | |||
662 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | ||
663 | | --program-pre | --program-pr | --program-p) | ||
664 | ac_prev=program_prefix ;; | ||
665 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | ||
666 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | ||
667 | program_prefix=$ac_optarg ;; | ||
668 | |||
669 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | ||
670 | | --program-suf | --program-su | --program-s) | ||
671 | ac_prev=program_suffix ;; | ||
672 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | ||
673 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | ||
674 | program_suffix=$ac_optarg ;; | ||
675 | |||
676 | -program-transform-name | --program-transform-name \ | ||
677 | | --program-transform-nam | --program-transform-na \ | ||
678 | | --program-transform-n | --program-transform- \ | ||
679 | | --program-transform | --program-transfor \ | ||
680 | | --program-transfo | --program-transf \ | ||
681 | | --program-trans | --program-tran \ | ||
682 | | --progr-tra | --program-tr | --program-t) | ||
683 | ac_prev=program_transform_name ;; | ||
684 | -program-transform-name=* | --program-transform-name=* \ | ||
685 | | --program-transform-nam=* | --program-transform-na=* \ | ||
686 | | --program-transform-n=* | --program-transform-=* \ | ||
687 | | --program-transform=* | --program-transfor=* \ | ||
688 | | --program-transfo=* | --program-transf=* \ | ||
689 | | --program-trans=* | --program-tran=* \ | ||
690 | | --progr-tra=* | --program-tr=* | --program-t=*) | ||
691 | program_transform_name=$ac_optarg ;; | ||
692 | |||
693 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | ||
694 | | -silent | --silent | --silen | --sile | --sil) | ||
695 | silent=yes ;; | ||
696 | |||
697 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | ||
698 | ac_prev=sbindir ;; | ||
699 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | ||
700 | | --sbi=* | --sb=*) | ||
701 | sbindir=$ac_optarg ;; | ||
702 | |||
703 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | ||
704 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | ||
705 | | --sharedst | --shareds | --shared | --share | --shar \ | ||
706 | | --sha | --sh) | ||
707 | ac_prev=sharedstatedir ;; | ||
708 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | ||
709 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | ||
710 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | ||
711 | | --sha=* | --sh=*) | ||
712 | sharedstatedir=$ac_optarg ;; | ||
713 | |||
714 | -site | --site | --sit) | ||
715 | ac_prev=site ;; | ||
716 | -site=* | --site=* | --sit=*) | ||
717 | site=$ac_optarg ;; | ||
718 | |||
719 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | ||
720 | ac_prev=srcdir ;; | ||
721 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | ||
722 | srcdir=$ac_optarg ;; | ||
723 | |||
724 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | ||
725 | | --syscon | --sysco | --sysc | --sys | --sy) | ||
726 | ac_prev=sysconfdir ;; | ||
727 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | ||
728 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | ||
729 | sysconfdir=$ac_optarg ;; | ||
730 | |||
731 | -target | --target | --targe | --targ | --tar | --ta | --t) | ||
732 | ac_prev=target_alias ;; | ||
733 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | ||
734 | target_alias=$ac_optarg ;; | ||
735 | |||
736 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | ||
737 | verbose=yes ;; | ||
738 | |||
739 | -version | --version | --versio | --versi | --vers | -V) | ||
740 | ac_init_version=: ;; | ||
741 | |||
742 | -with-* | --with-*) | ||
743 | ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | ||
744 | # Reject names that are not valid shell variable names. | ||
745 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && | ||
746 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | ||
747 | { (exit 1); exit 1; }; } | ||
748 | ac_package=`echo $ac_package| sed 's/-/_/g'` | ||
749 | case $ac_option in | ||
750 | *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; | ||
751 | *) ac_optarg=yes ;; | ||
752 | esac | ||
753 | eval "with_$ac_package='$ac_optarg'" ;; | ||
754 | |||
755 | -without-* | --without-*) | ||
756 | ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` | ||
757 | # Reject names that are not valid shell variable names. | ||
758 | expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && | ||
759 | { echo "$as_me: error: invalid package name: $ac_package" >&2 | ||
760 | { (exit 1); exit 1; }; } | ||
761 | ac_package=`echo $ac_package | sed 's/-/_/g'` | ||
762 | eval "with_$ac_package=no" ;; | ||
763 | |||
764 | --x) | ||
765 | # Obsolete; use --with-x. | ||
766 | with_x=yes ;; | ||
767 | |||
768 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | ||
769 | | --x-incl | --x-inc | --x-in | --x-i) | ||
770 | ac_prev=x_includes ;; | ||
771 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | ||
772 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | ||
773 | x_includes=$ac_optarg ;; | ||
774 | |||
775 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | ||
776 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | ||
777 | ac_prev=x_libraries ;; | ||
778 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | ||
779 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | ||
780 | x_libraries=$ac_optarg ;; | ||
781 | |||
782 | -*) { echo "$as_me: error: unrecognized option: $ac_option | ||
783 | Try \`$0 --help' for more information." >&2 | ||
784 | { (exit 1); exit 1; }; } | ||
785 | ;; | ||
786 | |||
787 | *=*) | ||
788 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | ||
789 | # Reject names that are not valid shell variable names. | ||
790 | expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && | ||
791 | { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 | ||
792 | { (exit 1); exit 1; }; } | ||
793 | ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` | ||
794 | eval "$ac_envvar='$ac_optarg'" | ||
795 | export $ac_envvar ;; | ||
796 | |||
797 | *) | ||
798 | # FIXME: should be removed in autoconf 3.0. | ||
799 | echo "$as_me: WARNING: you should use --build, --host, --target" >&2 | ||
800 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | ||
801 | echo "$as_me: WARNING: invalid host type: $ac_option" >&2 | ||
802 | : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} | ||
803 | ;; | ||
804 | |||
805 | esac | ||
806 | done | ||
807 | |||
808 | if test -n "$ac_prev"; then | ||
809 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | ||
810 | { echo "$as_me: error: missing argument to $ac_option" >&2 | ||
811 | { (exit 1); exit 1; }; } | ||
812 | fi | ||
813 | |||
814 | # Be sure to have absolute paths. | ||
815 | for ac_var in exec_prefix prefix | ||
816 | do | ||
817 | eval ac_val=$`echo $ac_var` | ||
818 | case $ac_val in | ||
819 | [\\/$]* | ?:[\\/]* | NONE | '' ) ;; | ||
820 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | ||
821 | { (exit 1); exit 1; }; };; | ||
822 | esac | ||
823 | done | ||
824 | |||
825 | # Be sure to have absolute paths. | ||
826 | for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ | ||
827 | localstatedir libdir includedir oldincludedir infodir mandir | ||
828 | do | ||
829 | eval ac_val=$`echo $ac_var` | ||
830 | case $ac_val in | ||
831 | [\\/$]* | ?:[\\/]* ) ;; | ||
832 | *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 | ||
833 | { (exit 1); exit 1; }; };; | ||
834 | esac | ||
835 | done | ||
836 | |||
837 | # There might be people who depend on the old broken behavior: `$host' | ||
838 | # used to hold the argument of --host etc. | ||
839 | # FIXME: To remove some day. | ||
840 | build=$build_alias | ||
841 | host=$host_alias | ||
842 | target=$target_alias | ||
843 | |||
844 | # FIXME: To remove some day. | ||
845 | if test "x$host_alias" != x; then | ||
846 | if test "x$build_alias" = x; then | ||
847 | cross_compiling=maybe | ||
848 | echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. | ||
849 | If a cross compiler is detected then cross compile mode will be used." >&2 | ||
850 | elif test "x$build_alias" != "x$host_alias"; then | ||
851 | cross_compiling=yes | ||
852 | fi | ||
853 | fi | ||
854 | |||
855 | ac_tool_prefix= | ||
856 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | ||
857 | |||
858 | test "$silent" = yes && exec 6>/dev/null | ||
859 | |||
860 | |||
861 | # Find the source files, if location was not specified. | ||
862 | if test -z "$srcdir"; then | ||
863 | ac_srcdir_defaulted=yes | ||
864 | # Try the directory containing this script, then its parent. | ||
865 | ac_confdir=`(dirname "$0") 2>/dev/null || | ||
866 | $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
867 | X"$0" : 'X\(//\)[^/]' \| \ | ||
868 | X"$0" : 'X\(//\)$' \| \ | ||
869 | X"$0" : 'X\(/\)' \| \ | ||
870 | . : '\(.\)' 2>/dev/null || | ||
871 | echo X"$0" | | ||
872 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
873 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
874 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
875 | /^X\(\/\).*/{ s//\1/; q; } | ||
876 | s/.*/./; q'` | ||
877 | srcdir=$ac_confdir | ||
878 | if test ! -r $srcdir/$ac_unique_file; then | ||
879 | srcdir=.. | ||
880 | fi | ||
881 | else | ||
882 | ac_srcdir_defaulted=no | ||
883 | fi | ||
884 | if test ! -r $srcdir/$ac_unique_file; then | ||
885 | if test "$ac_srcdir_defaulted" = yes; then | ||
886 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 | ||
887 | { (exit 1); exit 1; }; } | ||
888 | else | ||
889 | { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 | ||
890 | { (exit 1); exit 1; }; } | ||
891 | fi | ||
892 | fi | ||
893 | (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || | ||
894 | { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 | ||
895 | { (exit 1); exit 1; }; } | ||
896 | srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` | ||
897 | ac_env_build_alias_set=${build_alias+set} | ||
898 | ac_env_build_alias_value=$build_alias | ||
899 | ac_cv_env_build_alias_set=${build_alias+set} | ||
900 | ac_cv_env_build_alias_value=$build_alias | ||
901 | ac_env_host_alias_set=${host_alias+set} | ||
902 | ac_env_host_alias_value=$host_alias | ||
903 | ac_cv_env_host_alias_set=${host_alias+set} | ||
904 | ac_cv_env_host_alias_value=$host_alias | ||
905 | ac_env_target_alias_set=${target_alias+set} | ||
906 | ac_env_target_alias_value=$target_alias | ||
907 | ac_cv_env_target_alias_set=${target_alias+set} | ||
908 | ac_cv_env_target_alias_value=$target_alias | ||
909 | ac_env_CC_set=${CC+set} | ||
910 | ac_env_CC_value=$CC | ||
911 | ac_cv_env_CC_set=${CC+set} | ||
912 | ac_cv_env_CC_value=$CC | ||
913 | ac_env_CFLAGS_set=${CFLAGS+set} | ||
914 | ac_env_CFLAGS_value=$CFLAGS | ||
915 | ac_cv_env_CFLAGS_set=${CFLAGS+set} | ||
916 | ac_cv_env_CFLAGS_value=$CFLAGS | ||
917 | ac_env_LDFLAGS_set=${LDFLAGS+set} | ||
918 | ac_env_LDFLAGS_value=$LDFLAGS | ||
919 | ac_cv_env_LDFLAGS_set=${LDFLAGS+set} | ||
920 | ac_cv_env_LDFLAGS_value=$LDFLAGS | ||
921 | ac_env_CPPFLAGS_set=${CPPFLAGS+set} | ||
922 | ac_env_CPPFLAGS_value=$CPPFLAGS | ||
923 | ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} | ||
924 | ac_cv_env_CPPFLAGS_value=$CPPFLAGS | ||
925 | ac_env_CPP_set=${CPP+set} | ||
926 | ac_env_CPP_value=$CPP | ||
927 | ac_cv_env_CPP_set=${CPP+set} | ||
928 | ac_cv_env_CPP_value=$CPP | ||
929 | ac_env_CXX_set=${CXX+set} | ||
930 | ac_env_CXX_value=$CXX | ||
931 | ac_cv_env_CXX_set=${CXX+set} | ||
932 | ac_cv_env_CXX_value=$CXX | ||
933 | ac_env_CXXFLAGS_set=${CXXFLAGS+set} | ||
934 | ac_env_CXXFLAGS_value=$CXXFLAGS | ||
935 | ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} | ||
936 | ac_cv_env_CXXFLAGS_value=$CXXFLAGS | ||
937 | ac_env_CXXCPP_set=${CXXCPP+set} | ||
938 | ac_env_CXXCPP_value=$CXXCPP | ||
939 | ac_cv_env_CXXCPP_set=${CXXCPP+set} | ||
940 | ac_cv_env_CXXCPP_value=$CXXCPP | ||
941 | ac_env_F77_set=${F77+set} | ||
942 | ac_env_F77_value=$F77 | ||
943 | ac_cv_env_F77_set=${F77+set} | ||
944 | ac_cv_env_F77_value=$F77 | ||
945 | ac_env_FFLAGS_set=${FFLAGS+set} | ||
946 | ac_env_FFLAGS_value=$FFLAGS | ||
947 | ac_cv_env_FFLAGS_set=${FFLAGS+set} | ||
948 | ac_cv_env_FFLAGS_value=$FFLAGS | ||
949 | |||
950 | # | ||
951 | # Report the --help message. | ||
952 | # | ||
953 | if test "$ac_init_help" = "long"; then | ||
954 | # Omit some internal or obsolete options to make the list less imposing. | ||
955 | # This message is too long to be a string in the A/UX 3.1 sh. | ||
956 | cat <<_ACEOF | ||
957 | \`configure' configures libltdl 1.2 to adapt to many kinds of systems. | ||
958 | |||
959 | Usage: $0 [OPTION]... [VAR=VALUE]... | ||
960 | |||
961 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | ||
962 | VAR=VALUE. See below for descriptions of some of the useful variables. | ||
963 | |||
964 | Defaults for the options are specified in brackets. | ||
965 | |||
966 | Configuration: | ||
967 | -h, --help display this help and exit | ||
968 | --help=short display options specific to this package | ||
969 | --help=recursive display the short help of all the included packages | ||
970 | -V, --version display version information and exit | ||
971 | -q, --quiet, --silent do not print \`checking...' messages | ||
972 | --cache-file=FILE cache test results in FILE [disabled] | ||
973 | -C, --config-cache alias for \`--cache-file=config.cache' | ||
974 | -n, --no-create do not create output files | ||
975 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] | ||
976 | |||
977 | _ACEOF | ||
978 | |||
979 | cat <<_ACEOF | ||
980 | Installation directories: | ||
981 | --prefix=PREFIX install architecture-independent files in PREFIX | ||
982 | [$ac_default_prefix] | ||
983 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | ||
984 | [PREFIX] | ||
985 | |||
986 | By default, \`make install' will install all the files in | ||
987 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify | ||
988 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', | ||
989 | for instance \`--prefix=\$HOME'. | ||
990 | |||
991 | For better control, use the options below. | ||
992 | |||
993 | Fine tuning of the installation directories: | ||
994 | --bindir=DIR user executables [EPREFIX/bin] | ||
995 | --sbindir=DIR system admin executables [EPREFIX/sbin] | ||
996 | --libexecdir=DIR program executables [EPREFIX/libexec] | ||
997 | --datadir=DIR read-only architecture-independent data [PREFIX/share] | ||
998 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | ||
999 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | ||
1000 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | ||
1001 | --libdir=DIR object code libraries [EPREFIX/lib] | ||
1002 | --includedir=DIR C header files [PREFIX/include] | ||
1003 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | ||
1004 | --infodir=DIR info documentation [PREFIX/info] | ||
1005 | --mandir=DIR man documentation [PREFIX/man] | ||
1006 | _ACEOF | ||
1007 | |||
1008 | cat <<\_ACEOF | ||
1009 | |||
1010 | Program names: | ||
1011 | --program-prefix=PREFIX prepend PREFIX to installed program names | ||
1012 | --program-suffix=SUFFIX append SUFFIX to installed program names | ||
1013 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names | ||
1014 | |||
1015 | System types: | ||
1016 | --build=BUILD configure for building on BUILD [guessed] | ||
1017 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | ||
1018 | _ACEOF | ||
1019 | fi | ||
1020 | |||
1021 | if test -n "$ac_init_help"; then | ||
1022 | case $ac_init_help in | ||
1023 | short | recursive ) echo "Configuration of libltdl 1.2:";; | ||
1024 | esac | ||
1025 | cat <<\_ACEOF | ||
1026 | |||
1027 | Optional Features: | ||
1028 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | ||
1029 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | ||
1030 | --enable-maintainer-mode enable make rules and dependencies not useful | ||
1031 | (and sometimes confusing) to the casual installer | ||
1032 | --disable-dependency-tracking speeds up one-time build | ||
1033 | --enable-dependency-tracking do not reject slow dependency extractors | ||
1034 | --enable-shared[=PKGS] | ||
1035 | build shared libraries [default=yes] | ||
1036 | --enable-static[=PKGS] | ||
1037 | build static libraries [default=yes] | ||
1038 | --enable-fast-install[=PKGS] | ||
1039 | optimize for fast installation [default=yes] | ||
1040 | --disable-libtool-lock avoid locking (might break parallel builds) | ||
1041 | --enable-ltdl-install install libltdl | ||
1042 | |||
1043 | Optional Packages: | ||
1044 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | ||
1045 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | ||
1046 | --with-gnu-ld assume the C compiler uses GNU ld [default=no] | ||
1047 | --with-pic try to use only PIC/non-PIC objects [default=use | ||
1048 | both] | ||
1049 | --with-tags[=TAGS] | ||
1050 | include additional configurations [automatic] | ||
1051 | |||
1052 | Some influential environment variables: | ||
1053 | CC C compiler command | ||
1054 | CFLAGS C compiler flags | ||
1055 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | ||
1056 | nonstandard directory <lib dir> | ||
1057 | CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have | ||
1058 | headers in a nonstandard directory <include dir> | ||
1059 | CPP C preprocessor | ||
1060 | CXX C++ compiler command | ||
1061 | CXXFLAGS C++ compiler flags | ||
1062 | CXXCPP C++ preprocessor | ||
1063 | F77 Fortran 77 compiler command | ||
1064 | FFLAGS Fortran 77 compiler flags | ||
1065 | |||
1066 | Use these variables to override the choices made by `configure' or to help | ||
1067 | it to find libraries and programs with nonstandard names/locations. | ||
1068 | |||
1069 | Report bugs to <bug-libtool@gnu.org>. | ||
1070 | _ACEOF | ||
1071 | fi | ||
1072 | |||
1073 | if test "$ac_init_help" = "recursive"; then | ||
1074 | # If there are subdirs, report their specific --help. | ||
1075 | ac_popdir=`pwd` | ||
1076 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | ||
1077 | test -d $ac_dir || continue | ||
1078 | ac_builddir=. | ||
1079 | |||
1080 | if test "$ac_dir" != .; then | ||
1081 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | ||
1082 | # A "../" for each directory in $ac_dir_suffix. | ||
1083 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | ||
1084 | else | ||
1085 | ac_dir_suffix= ac_top_builddir= | ||
1086 | fi | ||
1087 | |||
1088 | case $srcdir in | ||
1089 | .) # No --srcdir option. We are building in place. | ||
1090 | ac_srcdir=. | ||
1091 | if test -z "$ac_top_builddir"; then | ||
1092 | ac_top_srcdir=. | ||
1093 | else | ||
1094 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | ||
1095 | fi ;; | ||
1096 | [\\/]* | ?:[\\/]* ) # Absolute path. | ||
1097 | ac_srcdir=$srcdir$ac_dir_suffix; | ||
1098 | ac_top_srcdir=$srcdir ;; | ||
1099 | *) # Relative path. | ||
1100 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | ||
1101 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | ||
1102 | esac | ||
1103 | |||
1104 | # Do not use `cd foo && pwd` to compute absolute paths, because | ||
1105 | # the directories may not exist. | ||
1106 | case `pwd` in | ||
1107 | .) ac_abs_builddir="$ac_dir";; | ||
1108 | *) | ||
1109 | case "$ac_dir" in | ||
1110 | .) ac_abs_builddir=`pwd`;; | ||
1111 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | ||
1112 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | ||
1113 | esac;; | ||
1114 | esac | ||
1115 | case $ac_abs_builddir in | ||
1116 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | ||
1117 | *) | ||
1118 | case ${ac_top_builddir}. in | ||
1119 | .) ac_abs_top_builddir=$ac_abs_builddir;; | ||
1120 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | ||
1121 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | ||
1122 | esac;; | ||
1123 | esac | ||
1124 | case $ac_abs_builddir in | ||
1125 | .) ac_abs_srcdir=$ac_srcdir;; | ||
1126 | *) | ||
1127 | case $ac_srcdir in | ||
1128 | .) ac_abs_srcdir=$ac_abs_builddir;; | ||
1129 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | ||
1130 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | ||
1131 | esac;; | ||
1132 | esac | ||
1133 | case $ac_abs_builddir in | ||
1134 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | ||
1135 | *) | ||
1136 | case $ac_top_srcdir in | ||
1137 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | ||
1138 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | ||
1139 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | ||
1140 | esac;; | ||
1141 | esac | ||
1142 | |||
1143 | cd $ac_dir | ||
1144 | # Check for guested configure; otherwise get Cygnus style configure. | ||
1145 | if test -f $ac_srcdir/configure.gnu; then | ||
1146 | echo | ||
1147 | $SHELL $ac_srcdir/configure.gnu --help=recursive | ||
1148 | elif test -f $ac_srcdir/configure; then | ||
1149 | echo | ||
1150 | $SHELL $ac_srcdir/configure --help=recursive | ||
1151 | elif test -f $ac_srcdir/configure.ac || | ||
1152 | test -f $ac_srcdir/configure.in; then | ||
1153 | echo | ||
1154 | $ac_configure --help | ||
1155 | else | ||
1156 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | ||
1157 | fi | ||
1158 | cd "$ac_popdir" | ||
1159 | done | ||
1160 | fi | ||
1161 | |||
1162 | test -n "$ac_init_help" && exit 0 | ||
1163 | if $ac_init_version; then | ||
1164 | cat <<\_ACEOF | ||
1165 | libltdl configure 1.2 | ||
1166 | generated by GNU Autoconf 2.59 | ||
1167 | |||
1168 | Copyright (C) 2003 Free Software Foundation, Inc. | ||
1169 | This configure script is free software; the Free Software Foundation | ||
1170 | gives unlimited permission to copy, distribute and modify it. | ||
1171 | _ACEOF | ||
1172 | exit 0 | ||
1173 | fi | ||
1174 | exec 5>config.log | ||
1175 | cat >&5 <<_ACEOF | ||
1176 | This file contains any messages produced by compilers while | ||
1177 | running configure, to aid debugging if configure makes a mistake. | ||
1178 | |||
1179 | It was created by libltdl $as_me 1.2, which was | ||
1180 | generated by GNU Autoconf 2.59. Invocation command line was | ||
1181 | |||
1182 | $ $0 $@ | ||
1183 | |||
1184 | _ACEOF | ||
1185 | { | ||
1186 | cat <<_ASUNAME | ||
1187 | ## --------- ## | ||
1188 | ## Platform. ## | ||
1189 | ## --------- ## | ||
1190 | |||
1191 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | ||
1192 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | ||
1193 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | ||
1194 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | ||
1195 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | ||
1196 | |||
1197 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | ||
1198 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | ||
1199 | |||
1200 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | ||
1201 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | ||
1202 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | ||
1203 | hostinfo = `(hostinfo) 2>/dev/null || echo unknown` | ||
1204 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | ||
1205 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | ||
1206 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | ||
1207 | |||
1208 | _ASUNAME | ||
1209 | |||
1210 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
1211 | for as_dir in $PATH | ||
1212 | do | ||
1213 | IFS=$as_save_IFS | ||
1214 | test -z "$as_dir" && as_dir=. | ||
1215 | echo "PATH: $as_dir" | ||
1216 | done | ||
1217 | |||
1218 | } >&5 | ||
1219 | |||
1220 | cat >&5 <<_ACEOF | ||
1221 | |||
1222 | |||
1223 | ## ----------- ## | ||
1224 | ## Core tests. ## | ||
1225 | ## ----------- ## | ||
1226 | |||
1227 | _ACEOF | ||
1228 | |||
1229 | |||
1230 | # Keep a trace of the command line. | ||
1231 | # Strip out --no-create and --no-recursion so they do not pile up. | ||
1232 | # Strip out --silent because we don't want to record it for future runs. | ||
1233 | # Also quote any args containing shell meta-characters. | ||
1234 | # Make two passes to allow for proper duplicate-argument suppression. | ||
1235 | ac_configure_args= | ||
1236 | ac_configure_args0= | ||
1237 | ac_configure_args1= | ||
1238 | ac_sep= | ||
1239 | ac_must_keep_next=false | ||
1240 | for ac_pass in 1 2 | ||
1241 | do | ||
1242 | for ac_arg | ||
1243 | do | ||
1244 | case $ac_arg in | ||
1245 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | ||
1246 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | ||
1247 | | -silent | --silent | --silen | --sile | --sil) | ||
1248 | continue ;; | ||
1249 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | ||
1250 | ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | ||
1251 | esac | ||
1252 | case $ac_pass in | ||
1253 | 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; | ||
1254 | 2) | ||
1255 | ac_configure_args1="$ac_configure_args1 '$ac_arg'" | ||
1256 | if test $ac_must_keep_next = true; then | ||
1257 | ac_must_keep_next=false # Got value, back to normal. | ||
1258 | else | ||
1259 | case $ac_arg in | ||
1260 | *=* | --config-cache | -C | -disable-* | --disable-* \ | ||
1261 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | ||
1262 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | ||
1263 | | -with-* | --with-* | -without-* | --without-* | --x) | ||
1264 | case "$ac_configure_args0 " in | ||
1265 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | ||
1266 | esac | ||
1267 | ;; | ||
1268 | -* ) ac_must_keep_next=true ;; | ||
1269 | esac | ||
1270 | fi | ||
1271 | ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" | ||
1272 | # Get rid of the leading space. | ||
1273 | ac_sep=" " | ||
1274 | ;; | ||
1275 | esac | ||
1276 | done | ||
1277 | done | ||
1278 | $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } | ||
1279 | $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } | ||
1280 | |||
1281 | # When interrupted or exit'd, cleanup temporary files, and complete | ||
1282 | # config.log. We remove comments because anyway the quotes in there | ||
1283 | # would cause problems or look ugly. | ||
1284 | # WARNING: Be sure not to use single quotes in there, as some shells, | ||
1285 | # such as our DU 5.0 friend, will then `close' the trap. | ||
1286 | trap 'exit_status=$? | ||
1287 | # Save into config.log some information that might help in debugging. | ||
1288 | { | ||
1289 | echo | ||
1290 | |||
1291 | cat <<\_ASBOX | ||
1292 | ## ---------------- ## | ||
1293 | ## Cache variables. ## | ||
1294 | ## ---------------- ## | ||
1295 | _ASBOX | ||
1296 | echo | ||
1297 | # The following way of writing the cache mishandles newlines in values, | ||
1298 | { | ||
1299 | (set) 2>&1 | | ||
1300 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in | ||
1301 | *ac_space=\ *) | ||
1302 | sed -n \ | ||
1303 | "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; | ||
1304 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" | ||
1305 | ;; | ||
1306 | *) | ||
1307 | sed -n \ | ||
1308 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" | ||
1309 | ;; | ||
1310 | esac; | ||
1311 | } | ||
1312 | echo | ||
1313 | |||
1314 | cat <<\_ASBOX | ||
1315 | ## ----------------- ## | ||
1316 | ## Output variables. ## | ||
1317 | ## ----------------- ## | ||
1318 | _ASBOX | ||
1319 | echo | ||
1320 | for ac_var in $ac_subst_vars | ||
1321 | do | ||
1322 | eval ac_val=$`echo $ac_var` | ||
1323 | echo "$ac_var='"'"'$ac_val'"'"'" | ||
1324 | done | sort | ||
1325 | echo | ||
1326 | |||
1327 | if test -n "$ac_subst_files"; then | ||
1328 | cat <<\_ASBOX | ||
1329 | ## ------------- ## | ||
1330 | ## Output files. ## | ||
1331 | ## ------------- ## | ||
1332 | _ASBOX | ||
1333 | echo | ||
1334 | for ac_var in $ac_subst_files | ||
1335 | do | ||
1336 | eval ac_val=$`echo $ac_var` | ||
1337 | echo "$ac_var='"'"'$ac_val'"'"'" | ||
1338 | done | sort | ||
1339 | echo | ||
1340 | fi | ||
1341 | |||
1342 | if test -s confdefs.h; then | ||
1343 | cat <<\_ASBOX | ||
1344 | ## ----------- ## | ||
1345 | ## confdefs.h. ## | ||
1346 | ## ----------- ## | ||
1347 | _ASBOX | ||
1348 | echo | ||
1349 | sed "/^$/d" confdefs.h | sort | ||
1350 | echo | ||
1351 | fi | ||
1352 | test "$ac_signal" != 0 && | ||
1353 | echo "$as_me: caught signal $ac_signal" | ||
1354 | echo "$as_me: exit $exit_status" | ||
1355 | } >&5 | ||
1356 | rm -f core *.core && | ||
1357 | rm -rf conftest* confdefs* conf$$* $ac_clean_files && | ||
1358 | exit $exit_status | ||
1359 | ' 0 | ||
1360 | for ac_signal in 1 2 13 15; do | ||
1361 | trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal | ||
1362 | done | ||
1363 | ac_signal=0 | ||
1364 | |||
1365 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | ||
1366 | rm -rf conftest* confdefs.h | ||
1367 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | ||
1368 | echo >confdefs.h | ||
1369 | |||
1370 | # Predefined preprocessor variables. | ||
1371 | |||
1372 | cat >>confdefs.h <<_ACEOF | ||
1373 | #define PACKAGE_NAME "$PACKAGE_NAME" | ||
1374 | _ACEOF | ||
1375 | |||
1376 | |||
1377 | cat >>confdefs.h <<_ACEOF | ||
1378 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" | ||
1379 | _ACEOF | ||
1380 | |||
1381 | |||
1382 | cat >>confdefs.h <<_ACEOF | ||
1383 | #define PACKAGE_VERSION "$PACKAGE_VERSION" | ||
1384 | _ACEOF | ||
1385 | |||
1386 | |||
1387 | cat >>confdefs.h <<_ACEOF | ||
1388 | #define PACKAGE_STRING "$PACKAGE_STRING" | ||
1389 | _ACEOF | ||
1390 | |||
1391 | |||
1392 | cat >>confdefs.h <<_ACEOF | ||
1393 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" | ||
1394 | _ACEOF | ||
1395 | |||
1396 | |||
1397 | # Let the site file select an alternate cache file if it wants to. | ||
1398 | # Prefer explicitly selected file to automatically selected ones. | ||
1399 | if test -z "$CONFIG_SITE"; then | ||
1400 | if test "x$prefix" != xNONE; then | ||
1401 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | ||
1402 | else | ||
1403 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | ||
1404 | fi | ||
1405 | fi | ||
1406 | for ac_site_file in $CONFIG_SITE; do | ||
1407 | if test -r "$ac_site_file"; then | ||
1408 | { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 | ||
1409 | echo "$as_me: loading site script $ac_site_file" >&6;} | ||
1410 | sed 's/^/| /' "$ac_site_file" >&5 | ||
1411 | . "$ac_site_file" | ||
1412 | fi | ||
1413 | done | ||
1414 | |||
1415 | if test -r "$cache_file"; then | ||
1416 | # Some versions of bash will fail to source /dev/null (special | ||
1417 | # files actually), so we avoid doing that. | ||
1418 | if test -f "$cache_file"; then | ||
1419 | { echo "$as_me:$LINENO: loading cache $cache_file" >&5 | ||
1420 | echo "$as_me: loading cache $cache_file" >&6;} | ||
1421 | case $cache_file in | ||
1422 | [\\/]* | ?:[\\/]* ) . $cache_file;; | ||
1423 | *) . ./$cache_file;; | ||
1424 | esac | ||
1425 | fi | ||
1426 | else | ||
1427 | { echo "$as_me:$LINENO: creating cache $cache_file" >&5 | ||
1428 | echo "$as_me: creating cache $cache_file" >&6;} | ||
1429 | >$cache_file | ||
1430 | fi | ||
1431 | |||
1432 | # Check that the precious variables saved in the cache have kept the same | ||
1433 | # value. | ||
1434 | ac_cache_corrupted=false | ||
1435 | for ac_var in `(set) 2>&1 | | ||
1436 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do | ||
1437 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | ||
1438 | eval ac_new_set=\$ac_env_${ac_var}_set | ||
1439 | eval ac_old_val="\$ac_cv_env_${ac_var}_value" | ||
1440 | eval ac_new_val="\$ac_env_${ac_var}_value" | ||
1441 | case $ac_old_set,$ac_new_set in | ||
1442 | set,) | ||
1443 | { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 | ||
1444 | echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} | ||
1445 | ac_cache_corrupted=: ;; | ||
1446 | ,set) | ||
1447 | { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 | ||
1448 | echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} | ||
1449 | ac_cache_corrupted=: ;; | ||
1450 | ,);; | ||
1451 | *) | ||
1452 | if test "x$ac_old_val" != "x$ac_new_val"; then | ||
1453 | { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 | ||
1454 | echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} | ||
1455 | { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 | ||
1456 | echo "$as_me: former value: $ac_old_val" >&2;} | ||
1457 | { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 | ||
1458 | echo "$as_me: current value: $ac_new_val" >&2;} | ||
1459 | ac_cache_corrupted=: | ||
1460 | fi;; | ||
1461 | esac | ||
1462 | # Pass precious variables to config.status. | ||
1463 | if test "$ac_new_set" = set; then | ||
1464 | case $ac_new_val in | ||
1465 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) | ||
1466 | ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | ||
1467 | *) ac_arg=$ac_var=$ac_new_val ;; | ||
1468 | esac | ||
1469 | case " $ac_configure_args " in | ||
1470 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | ||
1471 | *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; | ||
1472 | esac | ||
1473 | fi | ||
1474 | done | ||
1475 | if $ac_cache_corrupted; then | ||
1476 | { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 | ||
1477 | echo "$as_me: error: changes in the environment can compromise the build" >&2;} | ||
1478 | { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 | ||
1479 | echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} | ||
1480 | { (exit 1); exit 1; }; } | ||
1481 | fi | ||
1482 | |||
1483 | ac_ext=c | ||
1484 | ac_cpp='$CPP $CPPFLAGS' | ||
1485 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
1486 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
1487 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
1488 | |||
1489 | |||
1490 | |||
1491 | |||
1492 | |||
1493 | |||
1494 | |||
1495 | |||
1496 | |||
1497 | |||
1498 | |||
1499 | |||
1500 | |||
1501 | |||
1502 | |||
1503 | |||
1504 | |||
1505 | |||
1506 | |||
1507 | |||
1508 | |||
1509 | |||
1510 | |||
1511 | |||
1512 | |||
1513 | |||
1514 | |||
1515 | |||
1516 | |||
1517 | |||
1518 | ## ------------------------------- ## | ||
1519 | ## Libltdl specific configuration. ## | ||
1520 | ## ------------------------------- ## | ||
1521 | |||
1522 | ac_aux_dir= | ||
1523 | for ac_dir in . $srcdir/.; do | ||
1524 | if test -f $ac_dir/install-sh; then | ||
1525 | ac_aux_dir=$ac_dir | ||
1526 | ac_install_sh="$ac_aux_dir/install-sh -c" | ||
1527 | break | ||
1528 | elif test -f $ac_dir/install.sh; then | ||
1529 | ac_aux_dir=$ac_dir | ||
1530 | ac_install_sh="$ac_aux_dir/install.sh -c" | ||
1531 | break | ||
1532 | elif test -f $ac_dir/shtool; then | ||
1533 | ac_aux_dir=$ac_dir | ||
1534 | ac_install_sh="$ac_aux_dir/shtool install -c" | ||
1535 | break | ||
1536 | fi | ||
1537 | done | ||
1538 | if test -z "$ac_aux_dir"; then | ||
1539 | { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . $srcdir/." >&5 | ||
1540 | echo "$as_me: error: cannot find install-sh or install.sh in . $srcdir/." >&2;} | ||
1541 | { (exit 1); exit 1; }; } | ||
1542 | fi | ||
1543 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" | ||
1544 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" | ||
1545 | ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. | ||
1546 | |||
1547 | |||
1548 | if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then | ||
1549 | if test -f ${srcdir}/ltmain.sh; then | ||
1550 | # if libltdl is libtoolized, it is assumed to be stand-alone and | ||
1551 | # installed unless the command line overrides it (tested above) | ||
1552 | enable_ltdl_install=yes | ||
1553 | else | ||
1554 | { echo "$as_me:$LINENO: WARNING: *** The top-level configure must select either" >&5 | ||
1555 | echo "$as_me: WARNING: *** The top-level configure must select either" >&2;} | ||
1556 | { echo "$as_me:$LINENO: WARNING: *** A\"\"C_LIBLTDL_INSTALLABLE or A\"\"C_LIBLTDL_CONVENIENCE." >&5 | ||
1557 | echo "$as_me: WARNING: *** A\"\"C_LIBLTDL_INSTALLABLE or A\"\"C_LIBLTDL_CONVENIENCE." >&2;} | ||
1558 | { { echo "$as_me:$LINENO: error: *** Maybe you want to --enable-ltdl-install?" >&5 | ||
1559 | echo "$as_me: error: *** Maybe you want to --enable-ltdl-install?" >&2;} | ||
1560 | { (exit 1); exit 1; }; } | ||
1561 | fi | ||
1562 | fi | ||
1563 | |||
1564 | |||
1565 | ## ------------------------ ## | ||
1566 | ## Automake Initialisation. ## | ||
1567 | ## ------------------------ ## | ||
1568 | am__api_version="1.9" | ||
1569 | # Find a good install program. We prefer a C program (faster), | ||
1570 | # so one script is as good as another. But avoid the broken or | ||
1571 | # incompatible versions: | ||
1572 | # SysV /etc/install, /usr/sbin/install | ||
1573 | # SunOS /usr/etc/install | ||
1574 | # IRIX /sbin/install | ||
1575 | # AIX /bin/install | ||
1576 | # AmigaOS /C/install, which installs bootblocks on floppy discs | ||
1577 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | ||
1578 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | ||
1579 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | ||
1580 | # OS/2's system install, which has a completely different semantic | ||
1581 | # ./install, which can be erroneously created by make from ./install.sh. | ||
1582 | echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 | ||
1583 | echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 | ||
1584 | if test -z "$INSTALL"; then | ||
1585 | if test "${ac_cv_path_install+set}" = set; then | ||
1586 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
1587 | else | ||
1588 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
1589 | for as_dir in $PATH | ||
1590 | do | ||
1591 | IFS=$as_save_IFS | ||
1592 | test -z "$as_dir" && as_dir=. | ||
1593 | # Account for people who put trailing slashes in PATH elements. | ||
1594 | case $as_dir/ in | ||
1595 | ./ | .// | /cC/* | \ | ||
1596 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | ||
1597 | ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ | ||
1598 | /usr/ucb/* ) ;; | ||
1599 | *) | ||
1600 | # OSF1 and SCO ODT 3.0 have their own names for install. | ||
1601 | # Don't use installbsd from OSF since it installs stuff as root | ||
1602 | # by default. | ||
1603 | for ac_prog in ginstall scoinst install; do | ||
1604 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
1605 | if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then | ||
1606 | if test $ac_prog = install && | ||
1607 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | ||
1608 | # AIX install. It has an incompatible calling convention. | ||
1609 | : | ||
1610 | elif test $ac_prog = install && | ||
1611 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | ||
1612 | # program-specific install script used by HP pwplus--don't use. | ||
1613 | : | ||
1614 | else | ||
1615 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" | ||
1616 | break 3 | ||
1617 | fi | ||
1618 | fi | ||
1619 | done | ||
1620 | done | ||
1621 | ;; | ||
1622 | esac | ||
1623 | done | ||
1624 | |||
1625 | |||
1626 | fi | ||
1627 | if test "${ac_cv_path_install+set}" = set; then | ||
1628 | INSTALL=$ac_cv_path_install | ||
1629 | else | ||
1630 | # As a last resort, use the slow shell script. We don't cache a | ||
1631 | # path for INSTALL within a source directory, because that will | ||
1632 | # break other packages using the cache if that directory is | ||
1633 | # removed, or if the path is relative. | ||
1634 | INSTALL=$ac_install_sh | ||
1635 | fi | ||
1636 | fi | ||
1637 | echo "$as_me:$LINENO: result: $INSTALL" >&5 | ||
1638 | echo "${ECHO_T}$INSTALL" >&6 | ||
1639 | |||
1640 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | ||
1641 | # It thinks the first close brace ends the variable substitution. | ||
1642 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | ||
1643 | |||
1644 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | ||
1645 | |||
1646 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | ||
1647 | |||
1648 | echo "$as_me:$LINENO: checking whether build environment is sane" >&5 | ||
1649 | echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 | ||
1650 | # Just in case | ||
1651 | sleep 1 | ||
1652 | echo timestamp > conftest.file | ||
1653 | # Do `set' in a subshell so we don't clobber the current shell's | ||
1654 | # arguments. Must try -L first in case configure is actually a | ||
1655 | # symlink; some systems play weird games with the mod time of symlinks | ||
1656 | # (eg FreeBSD returns the mod time of the symlink's containing | ||
1657 | # directory). | ||
1658 | if ( | ||
1659 | set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` | ||
1660 | if test "$*" = "X"; then | ||
1661 | # -L didn't work. | ||
1662 | set X `ls -t $srcdir/configure conftest.file` | ||
1663 | fi | ||
1664 | rm -f conftest.file | ||
1665 | if test "$*" != "X $srcdir/configure conftest.file" \ | ||
1666 | && test "$*" != "X conftest.file $srcdir/configure"; then | ||
1667 | |||
1668 | # If neither matched, then we have a broken ls. This can happen | ||
1669 | # if, for instance, CONFIG_SHELL is bash and it inherits a | ||
1670 | # broken ls alias from the environment. This has actually | ||
1671 | # happened. Such a system could not be considered "sane". | ||
1672 | { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken | ||
1673 | alias in your environment" >&5 | ||
1674 | echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken | ||
1675 | alias in your environment" >&2;} | ||
1676 | { (exit 1); exit 1; }; } | ||
1677 | fi | ||
1678 | |||
1679 | test "$2" = conftest.file | ||
1680 | ) | ||
1681 | then | ||
1682 | # Ok. | ||
1683 | : | ||
1684 | else | ||
1685 | { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! | ||
1686 | Check your system clock" >&5 | ||
1687 | echo "$as_me: error: newly created file is older than distributed files! | ||
1688 | Check your system clock" >&2;} | ||
1689 | { (exit 1); exit 1; }; } | ||
1690 | fi | ||
1691 | echo "$as_me:$LINENO: result: yes" >&5 | ||
1692 | echo "${ECHO_T}yes" >&6 | ||
1693 | test "$program_prefix" != NONE && | ||
1694 | program_transform_name="s,^,$program_prefix,;$program_transform_name" | ||
1695 | # Use a double $ so make ignores it. | ||
1696 | test "$program_suffix" != NONE && | ||
1697 | program_transform_name="s,\$,$program_suffix,;$program_transform_name" | ||
1698 | # Double any \ or $. echo might interpret backslashes. | ||
1699 | # By default was `s,x,x', remove it if useless. | ||
1700 | cat <<\_ACEOF >conftest.sed | ||
1701 | s/[\\$]/&&/g;s/;s,x,x,$// | ||
1702 | _ACEOF | ||
1703 | program_transform_name=`echo $program_transform_name | sed -f conftest.sed` | ||
1704 | rm conftest.sed | ||
1705 | |||
1706 | # expand $ac_aux_dir to an absolute path | ||
1707 | am_aux_dir=`cd $ac_aux_dir && pwd` | ||
1708 | |||
1709 | test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" | ||
1710 | # Use eval to expand $SHELL | ||
1711 | if eval "$MISSING --run true"; then | ||
1712 | am_missing_run="$MISSING --run " | ||
1713 | else | ||
1714 | am_missing_run= | ||
1715 | { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 | ||
1716 | echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} | ||
1717 | fi | ||
1718 | |||
1719 | if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then | ||
1720 | # We used to keeping the `.' as first argument, in order to | ||
1721 | # allow $(mkdir_p) to be used without argument. As in | ||
1722 | # $(mkdir_p) $(somedir) | ||
1723 | # where $(somedir) is conditionally defined. However this is wrong | ||
1724 | # for two reasons: | ||
1725 | # 1. if the package is installed by a user who cannot write `.' | ||
1726 | # make install will fail, | ||
1727 | # 2. the above comment should most certainly read | ||
1728 | # $(mkdir_p) $(DESTDIR)$(somedir) | ||
1729 | # so it does not work when $(somedir) is undefined and | ||
1730 | # $(DESTDIR) is not. | ||
1731 | # To support the latter case, we have to write | ||
1732 | # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), | ||
1733 | # so the `.' trick is pointless. | ||
1734 | mkdir_p='mkdir -p --' | ||
1735 | else | ||
1736 | # On NextStep and OpenStep, the `mkdir' command does not | ||
1737 | # recognize any option. It will interpret all options as | ||
1738 | # directories to create, and then abort because `.' already | ||
1739 | # exists. | ||
1740 | for d in ./-p ./--version; | ||
1741 | do | ||
1742 | test -d $d && rmdir $d | ||
1743 | done | ||
1744 | # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. | ||
1745 | if test -f "$ac_aux_dir/mkinstalldirs"; then | ||
1746 | mkdir_p='$(mkinstalldirs)' | ||
1747 | else | ||
1748 | mkdir_p='$(install_sh) -d' | ||
1749 | fi | ||
1750 | fi | ||
1751 | |||
1752 | for ac_prog in gawk mawk nawk awk | ||
1753 | do | ||
1754 | # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
1755 | set dummy $ac_prog; ac_word=$2 | ||
1756 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
1757 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
1758 | if test "${ac_cv_prog_AWK+set}" = set; then | ||
1759 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
1760 | else | ||
1761 | if test -n "$AWK"; then | ||
1762 | ac_cv_prog_AWK="$AWK" # Let the user override the test. | ||
1763 | else | ||
1764 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
1765 | for as_dir in $PATH | ||
1766 | do | ||
1767 | IFS=$as_save_IFS | ||
1768 | test -z "$as_dir" && as_dir=. | ||
1769 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
1770 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
1771 | ac_cv_prog_AWK="$ac_prog" | ||
1772 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
1773 | break 2 | ||
1774 | fi | ||
1775 | done | ||
1776 | done | ||
1777 | |||
1778 | fi | ||
1779 | fi | ||
1780 | AWK=$ac_cv_prog_AWK | ||
1781 | if test -n "$AWK"; then | ||
1782 | echo "$as_me:$LINENO: result: $AWK" >&5 | ||
1783 | echo "${ECHO_T}$AWK" >&6 | ||
1784 | else | ||
1785 | echo "$as_me:$LINENO: result: no" >&5 | ||
1786 | echo "${ECHO_T}no" >&6 | ||
1787 | fi | ||
1788 | |||
1789 | test -n "$AWK" && break | ||
1790 | done | ||
1791 | |||
1792 | echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | ||
1793 | echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 | ||
1794 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` | ||
1795 | if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then | ||
1796 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
1797 | else | ||
1798 | cat >conftest.make <<\_ACEOF | ||
1799 | all: | ||
1800 | @echo 'ac_maketemp="$(MAKE)"' | ||
1801 | _ACEOF | ||
1802 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | ||
1803 | eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` | ||
1804 | if test -n "$ac_maketemp"; then | ||
1805 | eval ac_cv_prog_make_${ac_make}_set=yes | ||
1806 | else | ||
1807 | eval ac_cv_prog_make_${ac_make}_set=no | ||
1808 | fi | ||
1809 | rm -f conftest.make | ||
1810 | fi | ||
1811 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | ||
1812 | echo "$as_me:$LINENO: result: yes" >&5 | ||
1813 | echo "${ECHO_T}yes" >&6 | ||
1814 | SET_MAKE= | ||
1815 | else | ||
1816 | echo "$as_me:$LINENO: result: no" >&5 | ||
1817 | echo "${ECHO_T}no" >&6 | ||
1818 | SET_MAKE="MAKE=${MAKE-make}" | ||
1819 | fi | ||
1820 | |||
1821 | rm -rf .tst 2>/dev/null | ||
1822 | mkdir .tst 2>/dev/null | ||
1823 | if test -d .tst; then | ||
1824 | am__leading_dot=. | ||
1825 | else | ||
1826 | am__leading_dot=_ | ||
1827 | fi | ||
1828 | rmdir .tst 2>/dev/null | ||
1829 | |||
1830 | # test to see if srcdir already configured | ||
1831 | if test "`cd $srcdir && pwd`" != "`pwd`" && | ||
1832 | test -f $srcdir/config.status; then | ||
1833 | { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 | ||
1834 | echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} | ||
1835 | { (exit 1); exit 1; }; } | ||
1836 | fi | ||
1837 | |||
1838 | # test whether we have cygpath | ||
1839 | if test -z "$CYGPATH_W"; then | ||
1840 | if (cygpath --version) >/dev/null 2>/dev/null; then | ||
1841 | CYGPATH_W='cygpath -w' | ||
1842 | else | ||
1843 | CYGPATH_W=echo | ||
1844 | fi | ||
1845 | fi | ||
1846 | |||
1847 | |||
1848 | # Define the identity of the package. | ||
1849 | PACKAGE=libltdl | ||
1850 | VERSION=1.2 | ||
1851 | |||
1852 | |||
1853 | # Some tools Automake needs. | ||
1854 | |||
1855 | ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} | ||
1856 | |||
1857 | |||
1858 | AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} | ||
1859 | |||
1860 | |||
1861 | AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} | ||
1862 | |||
1863 | |||
1864 | AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} | ||
1865 | |||
1866 | |||
1867 | MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} | ||
1868 | |||
1869 | install_sh=${install_sh-"$am_aux_dir/install-sh"} | ||
1870 | |||
1871 | # Installed binaries are usually stripped using `strip' when the user | ||
1872 | # run `make install-strip'. However `strip' might not be the right | ||
1873 | # tool to use in cross-compilation environments, therefore Automake | ||
1874 | # will honor the `STRIP' environment variable to overrule this program. | ||
1875 | if test "$cross_compiling" != no; then | ||
1876 | if test -n "$ac_tool_prefix"; then | ||
1877 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | ||
1878 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | ||
1879 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
1880 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
1881 | if test "${ac_cv_prog_STRIP+set}" = set; then | ||
1882 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
1883 | else | ||
1884 | if test -n "$STRIP"; then | ||
1885 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | ||
1886 | else | ||
1887 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
1888 | for as_dir in $PATH | ||
1889 | do | ||
1890 | IFS=$as_save_IFS | ||
1891 | test -z "$as_dir" && as_dir=. | ||
1892 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
1893 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
1894 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | ||
1895 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
1896 | break 2 | ||
1897 | fi | ||
1898 | done | ||
1899 | done | ||
1900 | |||
1901 | fi | ||
1902 | fi | ||
1903 | STRIP=$ac_cv_prog_STRIP | ||
1904 | if test -n "$STRIP"; then | ||
1905 | echo "$as_me:$LINENO: result: $STRIP" >&5 | ||
1906 | echo "${ECHO_T}$STRIP" >&6 | ||
1907 | else | ||
1908 | echo "$as_me:$LINENO: result: no" >&5 | ||
1909 | echo "${ECHO_T}no" >&6 | ||
1910 | fi | ||
1911 | |||
1912 | fi | ||
1913 | if test -z "$ac_cv_prog_STRIP"; then | ||
1914 | ac_ct_STRIP=$STRIP | ||
1915 | # Extract the first word of "strip", so it can be a program name with args. | ||
1916 | set dummy strip; ac_word=$2 | ||
1917 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
1918 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
1919 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then | ||
1920 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
1921 | else | ||
1922 | if test -n "$ac_ct_STRIP"; then | ||
1923 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | ||
1924 | else | ||
1925 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
1926 | for as_dir in $PATH | ||
1927 | do | ||
1928 | IFS=$as_save_IFS | ||
1929 | test -z "$as_dir" && as_dir=. | ||
1930 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
1931 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
1932 | ac_cv_prog_ac_ct_STRIP="strip" | ||
1933 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
1934 | break 2 | ||
1935 | fi | ||
1936 | done | ||
1937 | done | ||
1938 | |||
1939 | test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" | ||
1940 | fi | ||
1941 | fi | ||
1942 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | ||
1943 | if test -n "$ac_ct_STRIP"; then | ||
1944 | echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 | ||
1945 | echo "${ECHO_T}$ac_ct_STRIP" >&6 | ||
1946 | else | ||
1947 | echo "$as_me:$LINENO: result: no" >&5 | ||
1948 | echo "${ECHO_T}no" >&6 | ||
1949 | fi | ||
1950 | |||
1951 | STRIP=$ac_ct_STRIP | ||
1952 | else | ||
1953 | STRIP="$ac_cv_prog_STRIP" | ||
1954 | fi | ||
1955 | |||
1956 | fi | ||
1957 | INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" | ||
1958 | |||
1959 | # We need awk for the "check" target. The system "awk" is bad on | ||
1960 | # some platforms. | ||
1961 | # Always define AMTAR for backward compatibility. | ||
1962 | |||
1963 | AMTAR=${AMTAR-"${am_missing_run}tar"} | ||
1964 | |||
1965 | am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' | ||
1966 | |||
1967 | |||
1968 | |||
1969 | |||
1970 | |||
1971 | ac_config_headers="$ac_config_headers config.h:config-h.in" | ||
1972 | |||
1973 | echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 | ||
1974 | echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 | ||
1975 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. | ||
1976 | if test "${enable_maintainer_mode+set}" = set; then | ||
1977 | enableval="$enable_maintainer_mode" | ||
1978 | USE_MAINTAINER_MODE=$enableval | ||
1979 | else | ||
1980 | USE_MAINTAINER_MODE=no | ||
1981 | fi; | ||
1982 | echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 | ||
1983 | echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 | ||
1984 | |||
1985 | |||
1986 | if test $USE_MAINTAINER_MODE = yes; then | ||
1987 | MAINTAINER_MODE_TRUE= | ||
1988 | MAINTAINER_MODE_FALSE='#' | ||
1989 | else | ||
1990 | MAINTAINER_MODE_TRUE='#' | ||
1991 | MAINTAINER_MODE_FALSE= | ||
1992 | fi | ||
1993 | |||
1994 | MAINT=$MAINTAINER_MODE_TRUE | ||
1995 | |||
1996 | |||
1997 | |||
1998 | |||
1999 | ## ------------------ ## | ||
2000 | ## C compiler checks. ## | ||
2001 | ## ------------------ ## | ||
2002 | ac_ext=c | ||
2003 | ac_cpp='$CPP $CPPFLAGS' | ||
2004 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
2005 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
2006 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
2007 | if test -n "$ac_tool_prefix"; then | ||
2008 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | ||
2009 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | ||
2010 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
2011 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
2012 | if test "${ac_cv_prog_CC+set}" = set; then | ||
2013 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2014 | else | ||
2015 | if test -n "$CC"; then | ||
2016 | ac_cv_prog_CC="$CC" # Let the user override the test. | ||
2017 | else | ||
2018 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
2019 | for as_dir in $PATH | ||
2020 | do | ||
2021 | IFS=$as_save_IFS | ||
2022 | test -z "$as_dir" && as_dir=. | ||
2023 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
2024 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
2025 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | ||
2026 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
2027 | break 2 | ||
2028 | fi | ||
2029 | done | ||
2030 | done | ||
2031 | |||
2032 | fi | ||
2033 | fi | ||
2034 | CC=$ac_cv_prog_CC | ||
2035 | if test -n "$CC"; then | ||
2036 | echo "$as_me:$LINENO: result: $CC" >&5 | ||
2037 | echo "${ECHO_T}$CC" >&6 | ||
2038 | else | ||
2039 | echo "$as_me:$LINENO: result: no" >&5 | ||
2040 | echo "${ECHO_T}no" >&6 | ||
2041 | fi | ||
2042 | |||
2043 | fi | ||
2044 | if test -z "$ac_cv_prog_CC"; then | ||
2045 | ac_ct_CC=$CC | ||
2046 | # Extract the first word of "gcc", so it can be a program name with args. | ||
2047 | set dummy gcc; ac_word=$2 | ||
2048 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
2049 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
2050 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | ||
2051 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2052 | else | ||
2053 | if test -n "$ac_ct_CC"; then | ||
2054 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | ||
2055 | else | ||
2056 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
2057 | for as_dir in $PATH | ||
2058 | do | ||
2059 | IFS=$as_save_IFS | ||
2060 | test -z "$as_dir" && as_dir=. | ||
2061 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
2062 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
2063 | ac_cv_prog_ac_ct_CC="gcc" | ||
2064 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
2065 | break 2 | ||
2066 | fi | ||
2067 | done | ||
2068 | done | ||
2069 | |||
2070 | fi | ||
2071 | fi | ||
2072 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | ||
2073 | if test -n "$ac_ct_CC"; then | ||
2074 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | ||
2075 | echo "${ECHO_T}$ac_ct_CC" >&6 | ||
2076 | else | ||
2077 | echo "$as_me:$LINENO: result: no" >&5 | ||
2078 | echo "${ECHO_T}no" >&6 | ||
2079 | fi | ||
2080 | |||
2081 | CC=$ac_ct_CC | ||
2082 | else | ||
2083 | CC="$ac_cv_prog_CC" | ||
2084 | fi | ||
2085 | |||
2086 | if test -z "$CC"; then | ||
2087 | if test -n "$ac_tool_prefix"; then | ||
2088 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | ||
2089 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | ||
2090 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
2091 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
2092 | if test "${ac_cv_prog_CC+set}" = set; then | ||
2093 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2094 | else | ||
2095 | if test -n "$CC"; then | ||
2096 | ac_cv_prog_CC="$CC" # Let the user override the test. | ||
2097 | else | ||
2098 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
2099 | for as_dir in $PATH | ||
2100 | do | ||
2101 | IFS=$as_save_IFS | ||
2102 | test -z "$as_dir" && as_dir=. | ||
2103 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
2104 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
2105 | ac_cv_prog_CC="${ac_tool_prefix}cc" | ||
2106 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
2107 | break 2 | ||
2108 | fi | ||
2109 | done | ||
2110 | done | ||
2111 | |||
2112 | fi | ||
2113 | fi | ||
2114 | CC=$ac_cv_prog_CC | ||
2115 | if test -n "$CC"; then | ||
2116 | echo "$as_me:$LINENO: result: $CC" >&5 | ||
2117 | echo "${ECHO_T}$CC" >&6 | ||
2118 | else | ||
2119 | echo "$as_me:$LINENO: result: no" >&5 | ||
2120 | echo "${ECHO_T}no" >&6 | ||
2121 | fi | ||
2122 | |||
2123 | fi | ||
2124 | if test -z "$ac_cv_prog_CC"; then | ||
2125 | ac_ct_CC=$CC | ||
2126 | # Extract the first word of "cc", so it can be a program name with args. | ||
2127 | set dummy cc; ac_word=$2 | ||
2128 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
2129 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
2130 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | ||
2131 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2132 | else | ||
2133 | if test -n "$ac_ct_CC"; then | ||
2134 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | ||
2135 | else | ||
2136 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
2137 | for as_dir in $PATH | ||
2138 | do | ||
2139 | IFS=$as_save_IFS | ||
2140 | test -z "$as_dir" && as_dir=. | ||
2141 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
2142 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
2143 | ac_cv_prog_ac_ct_CC="cc" | ||
2144 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
2145 | break 2 | ||
2146 | fi | ||
2147 | done | ||
2148 | done | ||
2149 | |||
2150 | fi | ||
2151 | fi | ||
2152 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | ||
2153 | if test -n "$ac_ct_CC"; then | ||
2154 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | ||
2155 | echo "${ECHO_T}$ac_ct_CC" >&6 | ||
2156 | else | ||
2157 | echo "$as_me:$LINENO: result: no" >&5 | ||
2158 | echo "${ECHO_T}no" >&6 | ||
2159 | fi | ||
2160 | |||
2161 | CC=$ac_ct_CC | ||
2162 | else | ||
2163 | CC="$ac_cv_prog_CC" | ||
2164 | fi | ||
2165 | |||
2166 | fi | ||
2167 | if test -z "$CC"; then | ||
2168 | # Extract the first word of "cc", so it can be a program name with args. | ||
2169 | set dummy cc; ac_word=$2 | ||
2170 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
2171 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
2172 | if test "${ac_cv_prog_CC+set}" = set; then | ||
2173 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2174 | else | ||
2175 | if test -n "$CC"; then | ||
2176 | ac_cv_prog_CC="$CC" # Let the user override the test. | ||
2177 | else | ||
2178 | ac_prog_rejected=no | ||
2179 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
2180 | for as_dir in $PATH | ||
2181 | do | ||
2182 | IFS=$as_save_IFS | ||
2183 | test -z "$as_dir" && as_dir=. | ||
2184 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
2185 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
2186 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | ||
2187 | ac_prog_rejected=yes | ||
2188 | continue | ||
2189 | fi | ||
2190 | ac_cv_prog_CC="cc" | ||
2191 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
2192 | break 2 | ||
2193 | fi | ||
2194 | done | ||
2195 | done | ||
2196 | |||
2197 | if test $ac_prog_rejected = yes; then | ||
2198 | # We found a bogon in the path, so make sure we never use it. | ||
2199 | set dummy $ac_cv_prog_CC | ||
2200 | shift | ||
2201 | if test $# != 0; then | ||
2202 | # We chose a different compiler from the bogus one. | ||
2203 | # However, it has the same basename, so the bogon will be chosen | ||
2204 | # first if we set CC to just the basename; use the full file name. | ||
2205 | shift | ||
2206 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | ||
2207 | fi | ||
2208 | fi | ||
2209 | fi | ||
2210 | fi | ||
2211 | CC=$ac_cv_prog_CC | ||
2212 | if test -n "$CC"; then | ||
2213 | echo "$as_me:$LINENO: result: $CC" >&5 | ||
2214 | echo "${ECHO_T}$CC" >&6 | ||
2215 | else | ||
2216 | echo "$as_me:$LINENO: result: no" >&5 | ||
2217 | echo "${ECHO_T}no" >&6 | ||
2218 | fi | ||
2219 | |||
2220 | fi | ||
2221 | if test -z "$CC"; then | ||
2222 | if test -n "$ac_tool_prefix"; then | ||
2223 | for ac_prog in cl | ||
2224 | do | ||
2225 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | ||
2226 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | ||
2227 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
2228 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
2229 | if test "${ac_cv_prog_CC+set}" = set; then | ||
2230 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2231 | else | ||
2232 | if test -n "$CC"; then | ||
2233 | ac_cv_prog_CC="$CC" # Let the user override the test. | ||
2234 | else | ||
2235 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
2236 | for as_dir in $PATH | ||
2237 | do | ||
2238 | IFS=$as_save_IFS | ||
2239 | test -z "$as_dir" && as_dir=. | ||
2240 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
2241 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
2242 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | ||
2243 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
2244 | break 2 | ||
2245 | fi | ||
2246 | done | ||
2247 | done | ||
2248 | |||
2249 | fi | ||
2250 | fi | ||
2251 | CC=$ac_cv_prog_CC | ||
2252 | if test -n "$CC"; then | ||
2253 | echo "$as_me:$LINENO: result: $CC" >&5 | ||
2254 | echo "${ECHO_T}$CC" >&6 | ||
2255 | else | ||
2256 | echo "$as_me:$LINENO: result: no" >&5 | ||
2257 | echo "${ECHO_T}no" >&6 | ||
2258 | fi | ||
2259 | |||
2260 | test -n "$CC" && break | ||
2261 | done | ||
2262 | fi | ||
2263 | if test -z "$CC"; then | ||
2264 | ac_ct_CC=$CC | ||
2265 | for ac_prog in cl | ||
2266 | do | ||
2267 | # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
2268 | set dummy $ac_prog; ac_word=$2 | ||
2269 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
2270 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
2271 | if test "${ac_cv_prog_ac_ct_CC+set}" = set; then | ||
2272 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2273 | else | ||
2274 | if test -n "$ac_ct_CC"; then | ||
2275 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | ||
2276 | else | ||
2277 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
2278 | for as_dir in $PATH | ||
2279 | do | ||
2280 | IFS=$as_save_IFS | ||
2281 | test -z "$as_dir" && as_dir=. | ||
2282 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
2283 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
2284 | ac_cv_prog_ac_ct_CC="$ac_prog" | ||
2285 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
2286 | break 2 | ||
2287 | fi | ||
2288 | done | ||
2289 | done | ||
2290 | |||
2291 | fi | ||
2292 | fi | ||
2293 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | ||
2294 | if test -n "$ac_ct_CC"; then | ||
2295 | echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 | ||
2296 | echo "${ECHO_T}$ac_ct_CC" >&6 | ||
2297 | else | ||
2298 | echo "$as_me:$LINENO: result: no" >&5 | ||
2299 | echo "${ECHO_T}no" >&6 | ||
2300 | fi | ||
2301 | |||
2302 | test -n "$ac_ct_CC" && break | ||
2303 | done | ||
2304 | |||
2305 | CC=$ac_ct_CC | ||
2306 | fi | ||
2307 | |||
2308 | fi | ||
2309 | |||
2310 | |||
2311 | test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH | ||
2312 | See \`config.log' for more details." >&5 | ||
2313 | echo "$as_me: error: no acceptable C compiler found in \$PATH | ||
2314 | See \`config.log' for more details." >&2;} | ||
2315 | { (exit 1); exit 1; }; } | ||
2316 | |||
2317 | # Provide some information about the compiler. | ||
2318 | echo "$as_me:$LINENO:" \ | ||
2319 | "checking for C compiler version" >&5 | ||
2320 | ac_compiler=`set X $ac_compile; echo $2` | ||
2321 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | ||
2322 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | ||
2323 | ac_status=$? | ||
2324 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2325 | (exit $ac_status); } | ||
2326 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | ||
2327 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | ||
2328 | ac_status=$? | ||
2329 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2330 | (exit $ac_status); } | ||
2331 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | ||
2332 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | ||
2333 | ac_status=$? | ||
2334 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2335 | (exit $ac_status); } | ||
2336 | |||
2337 | cat >conftest.$ac_ext <<_ACEOF | ||
2338 | /* confdefs.h. */ | ||
2339 | _ACEOF | ||
2340 | cat confdefs.h >>conftest.$ac_ext | ||
2341 | cat >>conftest.$ac_ext <<_ACEOF | ||
2342 | /* end confdefs.h. */ | ||
2343 | |||
2344 | int | ||
2345 | main () | ||
2346 | { | ||
2347 | |||
2348 | ; | ||
2349 | return 0; | ||
2350 | } | ||
2351 | _ACEOF | ||
2352 | ac_clean_files_save=$ac_clean_files | ||
2353 | ac_clean_files="$ac_clean_files a.out a.exe b.out" | ||
2354 | # Try to create an executable without -o first, disregard a.out. | ||
2355 | # It will help us diagnose broken compilers, and finding out an intuition | ||
2356 | # of exeext. | ||
2357 | echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 | ||
2358 | echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 | ||
2359 | ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | ||
2360 | if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 | ||
2361 | (eval $ac_link_default) 2>&5 | ||
2362 | ac_status=$? | ||
2363 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2364 | (exit $ac_status); }; then | ||
2365 | # Find the output, starting from the most likely. This scheme is | ||
2366 | # not robust to junk in `.', hence go to wildcards (a.*) only as a last | ||
2367 | # resort. | ||
2368 | |||
2369 | # Be careful to initialize this variable, since it used to be cached. | ||
2370 | # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. | ||
2371 | ac_cv_exeext= | ||
2372 | # b.out is created by i960 compilers. | ||
2373 | for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out | ||
2374 | do | ||
2375 | test -f "$ac_file" || continue | ||
2376 | case $ac_file in | ||
2377 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) | ||
2378 | ;; | ||
2379 | conftest.$ac_ext ) | ||
2380 | # This is the source file. | ||
2381 | ;; | ||
2382 | [ab].out ) | ||
2383 | # We found the default executable, but exeext='' is most | ||
2384 | # certainly right. | ||
2385 | break;; | ||
2386 | *.* ) | ||
2387 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | ||
2388 | # FIXME: I believe we export ac_cv_exeext for Libtool, | ||
2389 | # but it would be cool to find out if it's true. Does anybody | ||
2390 | # maintain Libtool? --akim. | ||
2391 | export ac_cv_exeext | ||
2392 | break;; | ||
2393 | * ) | ||
2394 | break;; | ||
2395 | esac | ||
2396 | done | ||
2397 | else | ||
2398 | echo "$as_me: failed program was:" >&5 | ||
2399 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
2400 | |||
2401 | { { echo "$as_me:$LINENO: error: C compiler cannot create executables | ||
2402 | See \`config.log' for more details." >&5 | ||
2403 | echo "$as_me: error: C compiler cannot create executables | ||
2404 | See \`config.log' for more details." >&2;} | ||
2405 | { (exit 77); exit 77; }; } | ||
2406 | fi | ||
2407 | |||
2408 | ac_exeext=$ac_cv_exeext | ||
2409 | echo "$as_me:$LINENO: result: $ac_file" >&5 | ||
2410 | echo "${ECHO_T}$ac_file" >&6 | ||
2411 | |||
2412 | # Check the compiler produces executables we can run. If not, either | ||
2413 | # the compiler is broken, or we cross compile. | ||
2414 | echo "$as_me:$LINENO: checking whether the C compiler works" >&5 | ||
2415 | echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 | ||
2416 | # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 | ||
2417 | # If not cross compiling, check that we can run a simple program. | ||
2418 | if test "$cross_compiling" != yes; then | ||
2419 | if { ac_try='./$ac_file' | ||
2420 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2421 | (eval $ac_try) 2>&5 | ||
2422 | ac_status=$? | ||
2423 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2424 | (exit $ac_status); }; }; then | ||
2425 | cross_compiling=no | ||
2426 | else | ||
2427 | if test "$cross_compiling" = maybe; then | ||
2428 | cross_compiling=yes | ||
2429 | else | ||
2430 | { { echo "$as_me:$LINENO: error: cannot run C compiled programs. | ||
2431 | If you meant to cross compile, use \`--host'. | ||
2432 | See \`config.log' for more details." >&5 | ||
2433 | echo "$as_me: error: cannot run C compiled programs. | ||
2434 | If you meant to cross compile, use \`--host'. | ||
2435 | See \`config.log' for more details." >&2;} | ||
2436 | { (exit 1); exit 1; }; } | ||
2437 | fi | ||
2438 | fi | ||
2439 | fi | ||
2440 | echo "$as_me:$LINENO: result: yes" >&5 | ||
2441 | echo "${ECHO_T}yes" >&6 | ||
2442 | |||
2443 | rm -f a.out a.exe conftest$ac_cv_exeext b.out | ||
2444 | ac_clean_files=$ac_clean_files_save | ||
2445 | # Check the compiler produces executables we can run. If not, either | ||
2446 | # the compiler is broken, or we cross compile. | ||
2447 | echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 | ||
2448 | echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 | ||
2449 | echo "$as_me:$LINENO: result: $cross_compiling" >&5 | ||
2450 | echo "${ECHO_T}$cross_compiling" >&6 | ||
2451 | |||
2452 | echo "$as_me:$LINENO: checking for suffix of executables" >&5 | ||
2453 | echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 | ||
2454 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
2455 | (eval $ac_link) 2>&5 | ||
2456 | ac_status=$? | ||
2457 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2458 | (exit $ac_status); }; then | ||
2459 | # If both `conftest.exe' and `conftest' are `present' (well, observable) | ||
2460 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will | ||
2461 | # work properly (i.e., refer to `conftest.exe'), while it won't with | ||
2462 | # `rm'. | ||
2463 | for ac_file in conftest.exe conftest conftest.*; do | ||
2464 | test -f "$ac_file" || continue | ||
2465 | case $ac_file in | ||
2466 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; | ||
2467 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | ||
2468 | export ac_cv_exeext | ||
2469 | break;; | ||
2470 | * ) break;; | ||
2471 | esac | ||
2472 | done | ||
2473 | else | ||
2474 | { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link | ||
2475 | See \`config.log' for more details." >&5 | ||
2476 | echo "$as_me: error: cannot compute suffix of executables: cannot compile and link | ||
2477 | See \`config.log' for more details." >&2;} | ||
2478 | { (exit 1); exit 1; }; } | ||
2479 | fi | ||
2480 | |||
2481 | rm -f conftest$ac_cv_exeext | ||
2482 | echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 | ||
2483 | echo "${ECHO_T}$ac_cv_exeext" >&6 | ||
2484 | |||
2485 | rm -f conftest.$ac_ext | ||
2486 | EXEEXT=$ac_cv_exeext | ||
2487 | ac_exeext=$EXEEXT | ||
2488 | echo "$as_me:$LINENO: checking for suffix of object files" >&5 | ||
2489 | echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 | ||
2490 | if test "${ac_cv_objext+set}" = set; then | ||
2491 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2492 | else | ||
2493 | cat >conftest.$ac_ext <<_ACEOF | ||
2494 | /* confdefs.h. */ | ||
2495 | _ACEOF | ||
2496 | cat confdefs.h >>conftest.$ac_ext | ||
2497 | cat >>conftest.$ac_ext <<_ACEOF | ||
2498 | /* end confdefs.h. */ | ||
2499 | |||
2500 | int | ||
2501 | main () | ||
2502 | { | ||
2503 | |||
2504 | ; | ||
2505 | return 0; | ||
2506 | } | ||
2507 | _ACEOF | ||
2508 | rm -f conftest.o conftest.obj | ||
2509 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
2510 | (eval $ac_compile) 2>&5 | ||
2511 | ac_status=$? | ||
2512 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2513 | (exit $ac_status); }; then | ||
2514 | for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do | ||
2515 | case $ac_file in | ||
2516 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; | ||
2517 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | ||
2518 | break;; | ||
2519 | esac | ||
2520 | done | ||
2521 | else | ||
2522 | echo "$as_me: failed program was:" >&5 | ||
2523 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
2524 | |||
2525 | { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile | ||
2526 | See \`config.log' for more details." >&5 | ||
2527 | echo "$as_me: error: cannot compute suffix of object files: cannot compile | ||
2528 | See \`config.log' for more details." >&2;} | ||
2529 | { (exit 1); exit 1; }; } | ||
2530 | fi | ||
2531 | |||
2532 | rm -f conftest.$ac_cv_objext conftest.$ac_ext | ||
2533 | fi | ||
2534 | echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 | ||
2535 | echo "${ECHO_T}$ac_cv_objext" >&6 | ||
2536 | OBJEXT=$ac_cv_objext | ||
2537 | ac_objext=$OBJEXT | ||
2538 | echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 | ||
2539 | echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 | ||
2540 | if test "${ac_cv_c_compiler_gnu+set}" = set; then | ||
2541 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2542 | else | ||
2543 | cat >conftest.$ac_ext <<_ACEOF | ||
2544 | /* confdefs.h. */ | ||
2545 | _ACEOF | ||
2546 | cat confdefs.h >>conftest.$ac_ext | ||
2547 | cat >>conftest.$ac_ext <<_ACEOF | ||
2548 | /* end confdefs.h. */ | ||
2549 | |||
2550 | int | ||
2551 | main () | ||
2552 | { | ||
2553 | #ifndef __GNUC__ | ||
2554 | choke me | ||
2555 | #endif | ||
2556 | |||
2557 | ; | ||
2558 | return 0; | ||
2559 | } | ||
2560 | _ACEOF | ||
2561 | rm -f conftest.$ac_objext | ||
2562 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
2563 | (eval $ac_compile) 2>conftest.er1 | ||
2564 | ac_status=$? | ||
2565 | grep -v '^ *+' conftest.er1 >conftest.err | ||
2566 | rm -f conftest.er1 | ||
2567 | cat conftest.err >&5 | ||
2568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2569 | (exit $ac_status); } && | ||
2570 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
2571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2572 | (eval $ac_try) 2>&5 | ||
2573 | ac_status=$? | ||
2574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2575 | (exit $ac_status); }; } && | ||
2576 | { ac_try='test -s conftest.$ac_objext' | ||
2577 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2578 | (eval $ac_try) 2>&5 | ||
2579 | ac_status=$? | ||
2580 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2581 | (exit $ac_status); }; }; then | ||
2582 | ac_compiler_gnu=yes | ||
2583 | else | ||
2584 | echo "$as_me: failed program was:" >&5 | ||
2585 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
2586 | |||
2587 | ac_compiler_gnu=no | ||
2588 | fi | ||
2589 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
2590 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | ||
2591 | |||
2592 | fi | ||
2593 | echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 | ||
2594 | echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 | ||
2595 | GCC=`test $ac_compiler_gnu = yes && echo yes` | ||
2596 | ac_test_CFLAGS=${CFLAGS+set} | ||
2597 | ac_save_CFLAGS=$CFLAGS | ||
2598 | CFLAGS="-g" | ||
2599 | echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 | ||
2600 | echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 | ||
2601 | if test "${ac_cv_prog_cc_g+set}" = set; then | ||
2602 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2603 | else | ||
2604 | cat >conftest.$ac_ext <<_ACEOF | ||
2605 | /* confdefs.h. */ | ||
2606 | _ACEOF | ||
2607 | cat confdefs.h >>conftest.$ac_ext | ||
2608 | cat >>conftest.$ac_ext <<_ACEOF | ||
2609 | /* end confdefs.h. */ | ||
2610 | |||
2611 | int | ||
2612 | main () | ||
2613 | { | ||
2614 | |||
2615 | ; | ||
2616 | return 0; | ||
2617 | } | ||
2618 | _ACEOF | ||
2619 | rm -f conftest.$ac_objext | ||
2620 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
2621 | (eval $ac_compile) 2>conftest.er1 | ||
2622 | ac_status=$? | ||
2623 | grep -v '^ *+' conftest.er1 >conftest.err | ||
2624 | rm -f conftest.er1 | ||
2625 | cat conftest.err >&5 | ||
2626 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2627 | (exit $ac_status); } && | ||
2628 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
2629 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2630 | (eval $ac_try) 2>&5 | ||
2631 | ac_status=$? | ||
2632 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2633 | (exit $ac_status); }; } && | ||
2634 | { ac_try='test -s conftest.$ac_objext' | ||
2635 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2636 | (eval $ac_try) 2>&5 | ||
2637 | ac_status=$? | ||
2638 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2639 | (exit $ac_status); }; }; then | ||
2640 | ac_cv_prog_cc_g=yes | ||
2641 | else | ||
2642 | echo "$as_me: failed program was:" >&5 | ||
2643 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
2644 | |||
2645 | ac_cv_prog_cc_g=no | ||
2646 | fi | ||
2647 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
2648 | fi | ||
2649 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 | ||
2650 | echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 | ||
2651 | if test "$ac_test_CFLAGS" = set; then | ||
2652 | CFLAGS=$ac_save_CFLAGS | ||
2653 | elif test $ac_cv_prog_cc_g = yes; then | ||
2654 | if test "$GCC" = yes; then | ||
2655 | CFLAGS="-g -O2" | ||
2656 | else | ||
2657 | CFLAGS="-g" | ||
2658 | fi | ||
2659 | else | ||
2660 | if test "$GCC" = yes; then | ||
2661 | CFLAGS="-O2" | ||
2662 | else | ||
2663 | CFLAGS= | ||
2664 | fi | ||
2665 | fi | ||
2666 | echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 | ||
2667 | echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 | ||
2668 | if test "${ac_cv_prog_cc_stdc+set}" = set; then | ||
2669 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2670 | else | ||
2671 | ac_cv_prog_cc_stdc=no | ||
2672 | ac_save_CC=$CC | ||
2673 | cat >conftest.$ac_ext <<_ACEOF | ||
2674 | /* confdefs.h. */ | ||
2675 | _ACEOF | ||
2676 | cat confdefs.h >>conftest.$ac_ext | ||
2677 | cat >>conftest.$ac_ext <<_ACEOF | ||
2678 | /* end confdefs.h. */ | ||
2679 | #include <stdarg.h> | ||
2680 | #include <stdio.h> | ||
2681 | #include <sys/types.h> | ||
2682 | #include <sys/stat.h> | ||
2683 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | ||
2684 | struct buf { int x; }; | ||
2685 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | ||
2686 | static char *e (p, i) | ||
2687 | char **p; | ||
2688 | int i; | ||
2689 | { | ||
2690 | return p[i]; | ||
2691 | } | ||
2692 | static char *f (char * (*g) (char **, int), char **p, ...) | ||
2693 | { | ||
2694 | char *s; | ||
2695 | va_list v; | ||
2696 | va_start (v,p); | ||
2697 | s = g (p, va_arg (v,int)); | ||
2698 | va_end (v); | ||
2699 | return s; | ||
2700 | } | ||
2701 | |||
2702 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | ||
2703 | function prototypes and stuff, but not '\xHH' hex character constants. | ||
2704 | These don't provoke an error unfortunately, instead are silently treated | ||
2705 | as 'x'. The following induces an error, until -std1 is added to get | ||
2706 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | ||
2707 | array size at least. It's necessary to write '\x00'==0 to get something | ||
2708 | that's true only with -std1. */ | ||
2709 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | ||
2710 | |||
2711 | int test (int i, double x); | ||
2712 | struct s1 {int (*f) (int a);}; | ||
2713 | struct s2 {int (*f) (double a);}; | ||
2714 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | ||
2715 | int argc; | ||
2716 | char **argv; | ||
2717 | int | ||
2718 | main () | ||
2719 | { | ||
2720 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | ||
2721 | ; | ||
2722 | return 0; | ||
2723 | } | ||
2724 | _ACEOF | ||
2725 | # Don't try gcc -ansi; that turns off useful extensions and | ||
2726 | # breaks some systems' header files. | ||
2727 | # AIX -qlanglvl=ansi | ||
2728 | # Ultrix and OSF/1 -std1 | ||
2729 | # HP-UX 10.20 and later -Ae | ||
2730 | # HP-UX older versions -Aa -D_HPUX_SOURCE | ||
2731 | # SVR4 -Xc -D__EXTENSIONS__ | ||
2732 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | ||
2733 | do | ||
2734 | CC="$ac_save_CC $ac_arg" | ||
2735 | rm -f conftest.$ac_objext | ||
2736 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
2737 | (eval $ac_compile) 2>conftest.er1 | ||
2738 | ac_status=$? | ||
2739 | grep -v '^ *+' conftest.er1 >conftest.err | ||
2740 | rm -f conftest.er1 | ||
2741 | cat conftest.err >&5 | ||
2742 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2743 | (exit $ac_status); } && | ||
2744 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
2745 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2746 | (eval $ac_try) 2>&5 | ||
2747 | ac_status=$? | ||
2748 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2749 | (exit $ac_status); }; } && | ||
2750 | { ac_try='test -s conftest.$ac_objext' | ||
2751 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2752 | (eval $ac_try) 2>&5 | ||
2753 | ac_status=$? | ||
2754 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2755 | (exit $ac_status); }; }; then | ||
2756 | ac_cv_prog_cc_stdc=$ac_arg | ||
2757 | break | ||
2758 | else | ||
2759 | echo "$as_me: failed program was:" >&5 | ||
2760 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
2761 | |||
2762 | fi | ||
2763 | rm -f conftest.err conftest.$ac_objext | ||
2764 | done | ||
2765 | rm -f conftest.$ac_ext conftest.$ac_objext | ||
2766 | CC=$ac_save_CC | ||
2767 | |||
2768 | fi | ||
2769 | |||
2770 | case "x$ac_cv_prog_cc_stdc" in | ||
2771 | x|xno) | ||
2772 | echo "$as_me:$LINENO: result: none needed" >&5 | ||
2773 | echo "${ECHO_T}none needed" >&6 ;; | ||
2774 | *) | ||
2775 | echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 | ||
2776 | echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 | ||
2777 | CC="$CC $ac_cv_prog_cc_stdc" ;; | ||
2778 | esac | ||
2779 | |||
2780 | # Some people use a C++ compiler to compile C. Since we use `exit', | ||
2781 | # in C++ we need to declare it. In case someone uses the same compiler | ||
2782 | # for both compiling C and C++ we need to have the C++ compiler decide | ||
2783 | # the declaration of exit, since it's the most demanding environment. | ||
2784 | cat >conftest.$ac_ext <<_ACEOF | ||
2785 | #ifndef __cplusplus | ||
2786 | choke me | ||
2787 | #endif | ||
2788 | _ACEOF | ||
2789 | rm -f conftest.$ac_objext | ||
2790 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
2791 | (eval $ac_compile) 2>conftest.er1 | ||
2792 | ac_status=$? | ||
2793 | grep -v '^ *+' conftest.er1 >conftest.err | ||
2794 | rm -f conftest.er1 | ||
2795 | cat conftest.err >&5 | ||
2796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2797 | (exit $ac_status); } && | ||
2798 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
2799 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2800 | (eval $ac_try) 2>&5 | ||
2801 | ac_status=$? | ||
2802 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2803 | (exit $ac_status); }; } && | ||
2804 | { ac_try='test -s conftest.$ac_objext' | ||
2805 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2806 | (eval $ac_try) 2>&5 | ||
2807 | ac_status=$? | ||
2808 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2809 | (exit $ac_status); }; }; then | ||
2810 | for ac_declaration in \ | ||
2811 | '' \ | ||
2812 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ | ||
2813 | 'extern "C" void std::exit (int); using std::exit;' \ | ||
2814 | 'extern "C" void exit (int) throw ();' \ | ||
2815 | 'extern "C" void exit (int);' \ | ||
2816 | 'void exit (int);' | ||
2817 | do | ||
2818 | cat >conftest.$ac_ext <<_ACEOF | ||
2819 | /* confdefs.h. */ | ||
2820 | _ACEOF | ||
2821 | cat confdefs.h >>conftest.$ac_ext | ||
2822 | cat >>conftest.$ac_ext <<_ACEOF | ||
2823 | /* end confdefs.h. */ | ||
2824 | $ac_declaration | ||
2825 | #include <stdlib.h> | ||
2826 | int | ||
2827 | main () | ||
2828 | { | ||
2829 | exit (42); | ||
2830 | ; | ||
2831 | return 0; | ||
2832 | } | ||
2833 | _ACEOF | ||
2834 | rm -f conftest.$ac_objext | ||
2835 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
2836 | (eval $ac_compile) 2>conftest.er1 | ||
2837 | ac_status=$? | ||
2838 | grep -v '^ *+' conftest.er1 >conftest.err | ||
2839 | rm -f conftest.er1 | ||
2840 | cat conftest.err >&5 | ||
2841 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2842 | (exit $ac_status); } && | ||
2843 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
2844 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2845 | (eval $ac_try) 2>&5 | ||
2846 | ac_status=$? | ||
2847 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2848 | (exit $ac_status); }; } && | ||
2849 | { ac_try='test -s conftest.$ac_objext' | ||
2850 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2851 | (eval $ac_try) 2>&5 | ||
2852 | ac_status=$? | ||
2853 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2854 | (exit $ac_status); }; }; then | ||
2855 | : | ||
2856 | else | ||
2857 | echo "$as_me: failed program was:" >&5 | ||
2858 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
2859 | |||
2860 | continue | ||
2861 | fi | ||
2862 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
2863 | cat >conftest.$ac_ext <<_ACEOF | ||
2864 | /* confdefs.h. */ | ||
2865 | _ACEOF | ||
2866 | cat confdefs.h >>conftest.$ac_ext | ||
2867 | cat >>conftest.$ac_ext <<_ACEOF | ||
2868 | /* end confdefs.h. */ | ||
2869 | $ac_declaration | ||
2870 | int | ||
2871 | main () | ||
2872 | { | ||
2873 | exit (42); | ||
2874 | ; | ||
2875 | return 0; | ||
2876 | } | ||
2877 | _ACEOF | ||
2878 | rm -f conftest.$ac_objext | ||
2879 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
2880 | (eval $ac_compile) 2>conftest.er1 | ||
2881 | ac_status=$? | ||
2882 | grep -v '^ *+' conftest.er1 >conftest.err | ||
2883 | rm -f conftest.er1 | ||
2884 | cat conftest.err >&5 | ||
2885 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2886 | (exit $ac_status); } && | ||
2887 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
2888 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2889 | (eval $ac_try) 2>&5 | ||
2890 | ac_status=$? | ||
2891 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2892 | (exit $ac_status); }; } && | ||
2893 | { ac_try='test -s conftest.$ac_objext' | ||
2894 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
2895 | (eval $ac_try) 2>&5 | ||
2896 | ac_status=$? | ||
2897 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
2898 | (exit $ac_status); }; }; then | ||
2899 | break | ||
2900 | else | ||
2901 | echo "$as_me: failed program was:" >&5 | ||
2902 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
2903 | |||
2904 | fi | ||
2905 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
2906 | done | ||
2907 | rm -f conftest* | ||
2908 | if test -n "$ac_declaration"; then | ||
2909 | echo '#ifdef __cplusplus' >>confdefs.h | ||
2910 | echo $ac_declaration >>confdefs.h | ||
2911 | echo '#endif' >>confdefs.h | ||
2912 | fi | ||
2913 | |||
2914 | else | ||
2915 | echo "$as_me: failed program was:" >&5 | ||
2916 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
2917 | |||
2918 | fi | ||
2919 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
2920 | ac_ext=c | ||
2921 | ac_cpp='$CPP $CPPFLAGS' | ||
2922 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
2923 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
2924 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
2925 | DEPDIR="${am__leading_dot}deps" | ||
2926 | |||
2927 | ac_config_commands="$ac_config_commands depfiles" | ||
2928 | |||
2929 | |||
2930 | am_make=${MAKE-make} | ||
2931 | cat > confinc << 'END' | ||
2932 | am__doit: | ||
2933 | @echo done | ||
2934 | .PHONY: am__doit | ||
2935 | END | ||
2936 | # If we don't find an include directive, just comment out the code. | ||
2937 | echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 | ||
2938 | echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 | ||
2939 | am__include="#" | ||
2940 | am__quote= | ||
2941 | _am_result=none | ||
2942 | # First try GNU make style include. | ||
2943 | echo "include confinc" > confmf | ||
2944 | # We grep out `Entering directory' and `Leaving directory' | ||
2945 | # messages which can occur if `w' ends up in MAKEFLAGS. | ||
2946 | # In particular we don't look at `^make:' because GNU make might | ||
2947 | # be invoked under some other name (usually "gmake"), in which | ||
2948 | # case it prints its new name instead of `make'. | ||
2949 | if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then | ||
2950 | am__include=include | ||
2951 | am__quote= | ||
2952 | _am_result=GNU | ||
2953 | fi | ||
2954 | # Now try BSD make style include. | ||
2955 | if test "$am__include" = "#"; then | ||
2956 | echo '.include "confinc"' > confmf | ||
2957 | if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then | ||
2958 | am__include=.include | ||
2959 | am__quote="\"" | ||
2960 | _am_result=BSD | ||
2961 | fi | ||
2962 | fi | ||
2963 | |||
2964 | |||
2965 | echo "$as_me:$LINENO: result: $_am_result" >&5 | ||
2966 | echo "${ECHO_T}$_am_result" >&6 | ||
2967 | rm -f confinc confmf | ||
2968 | |||
2969 | # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. | ||
2970 | if test "${enable_dependency_tracking+set}" = set; then | ||
2971 | enableval="$enable_dependency_tracking" | ||
2972 | |||
2973 | fi; | ||
2974 | if test "x$enable_dependency_tracking" != xno; then | ||
2975 | am_depcomp="$ac_aux_dir/depcomp" | ||
2976 | AMDEPBACKSLASH='\' | ||
2977 | fi | ||
2978 | |||
2979 | |||
2980 | if test "x$enable_dependency_tracking" != xno; then | ||
2981 | AMDEP_TRUE= | ||
2982 | AMDEP_FALSE='#' | ||
2983 | else | ||
2984 | AMDEP_TRUE='#' | ||
2985 | AMDEP_FALSE= | ||
2986 | fi | ||
2987 | |||
2988 | |||
2989 | |||
2990 | |||
2991 | depcc="$CC" am_compiler_list= | ||
2992 | |||
2993 | echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 | ||
2994 | echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 | ||
2995 | if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then | ||
2996 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
2997 | else | ||
2998 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | ||
2999 | # We make a subdir and do the tests there. Otherwise we can end up | ||
3000 | # making bogus files that we don't know about and never remove. For | ||
3001 | # instance it was reported that on HP-UX the gcc test will end up | ||
3002 | # making a dummy file named `D' -- because `-MD' means `put the output | ||
3003 | # in D'. | ||
3004 | mkdir conftest.dir | ||
3005 | # Copy depcomp to subdir because otherwise we won't find it if we're | ||
3006 | # using a relative directory. | ||
3007 | cp "$am_depcomp" conftest.dir | ||
3008 | cd conftest.dir | ||
3009 | # We will build objects and dependencies in a subdirectory because | ||
3010 | # it helps to detect inapplicable dependency modes. For instance | ||
3011 | # both Tru64's cc and ICC support -MD to output dependencies as a | ||
3012 | # side effect of compilation, but ICC will put the dependencies in | ||
3013 | # the current directory while Tru64 will put them in the object | ||
3014 | # directory. | ||
3015 | mkdir sub | ||
3016 | |||
3017 | am_cv_CC_dependencies_compiler_type=none | ||
3018 | if test "$am_compiler_list" = ""; then | ||
3019 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | ||
3020 | fi | ||
3021 | for depmode in $am_compiler_list; do | ||
3022 | # Setup a source with many dependencies, because some compilers | ||
3023 | # like to wrap large dependency lists on column 80 (with \), and | ||
3024 | # we should not choose a depcomp mode which is confused by this. | ||
3025 | # | ||
3026 | # We need to recreate these files for each test, as the compiler may | ||
3027 | # overwrite some of them when testing with obscure command lines. | ||
3028 | # This happens at least with the AIX C compiler. | ||
3029 | : > sub/conftest.c | ||
3030 | for i in 1 2 3 4 5 6; do | ||
3031 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | ||
3032 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | ||
3033 | # Solaris 8's {/usr,}/bin/sh. | ||
3034 | touch sub/conftst$i.h | ||
3035 | done | ||
3036 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | ||
3037 | |||
3038 | case $depmode in | ||
3039 | nosideeffect) | ||
3040 | # after this tag, mechanisms are not by side-effect, so they'll | ||
3041 | # only be used when explicitly requested | ||
3042 | if test "x$enable_dependency_tracking" = xyes; then | ||
3043 | continue | ||
3044 | else | ||
3045 | break | ||
3046 | fi | ||
3047 | ;; | ||
3048 | none) break ;; | ||
3049 | esac | ||
3050 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | ||
3051 | # mode. It turns out that the SunPro C++ compiler does not properly | ||
3052 | # handle `-M -o', and we need to detect this. | ||
3053 | if depmode=$depmode \ | ||
3054 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | ||
3055 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | ||
3056 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ | ||
3057 | >/dev/null 2>conftest.err && | ||
3058 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | ||
3059 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && | ||
3060 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | ||
3061 | # icc doesn't choke on unknown options, it will just issue warnings | ||
3062 | # or remarks (even with -Werror). So we grep stderr for any message | ||
3063 | # that says an option was ignored or not supported. | ||
3064 | # When given -MP, icc 7.0 and 7.1 complain thusly: | ||
3065 | # icc: Command line warning: ignoring option '-M'; no argument required | ||
3066 | # The diagnosis changed in icc 8.0: | ||
3067 | # icc: Command line remark: option '-MP' not supported | ||
3068 | if (grep 'ignoring option' conftest.err || | ||
3069 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | ||
3070 | am_cv_CC_dependencies_compiler_type=$depmode | ||
3071 | break | ||
3072 | fi | ||
3073 | fi | ||
3074 | done | ||
3075 | |||
3076 | cd .. | ||
3077 | rm -rf conftest.dir | ||
3078 | else | ||
3079 | am_cv_CC_dependencies_compiler_type=none | ||
3080 | fi | ||
3081 | |||
3082 | fi | ||
3083 | echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 | ||
3084 | echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 | ||
3085 | CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type | ||
3086 | |||
3087 | |||
3088 | |||
3089 | if | ||
3090 | test "x$enable_dependency_tracking" != xno \ | ||
3091 | && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then | ||
3092 | am__fastdepCC_TRUE= | ||
3093 | am__fastdepCC_FALSE='#' | ||
3094 | else | ||
3095 | am__fastdepCC_TRUE='#' | ||
3096 | am__fastdepCC_FALSE= | ||
3097 | fi | ||
3098 | |||
3099 | |||
3100 | |||
3101 | echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 | ||
3102 | echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 | ||
3103 | if test "${ac_cv_c_const+set}" = set; then | ||
3104 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3105 | else | ||
3106 | cat >conftest.$ac_ext <<_ACEOF | ||
3107 | /* confdefs.h. */ | ||
3108 | _ACEOF | ||
3109 | cat confdefs.h >>conftest.$ac_ext | ||
3110 | cat >>conftest.$ac_ext <<_ACEOF | ||
3111 | /* end confdefs.h. */ | ||
3112 | |||
3113 | int | ||
3114 | main () | ||
3115 | { | ||
3116 | /* FIXME: Include the comments suggested by Paul. */ | ||
3117 | #ifndef __cplusplus | ||
3118 | /* Ultrix mips cc rejects this. */ | ||
3119 | typedef int charset[2]; | ||
3120 | const charset x; | ||
3121 | /* SunOS 4.1.1 cc rejects this. */ | ||
3122 | char const *const *ccp; | ||
3123 | char **p; | ||
3124 | /* NEC SVR4.0.2 mips cc rejects this. */ | ||
3125 | struct point {int x, y;}; | ||
3126 | static struct point const zero = {0,0}; | ||
3127 | /* AIX XL C 1.02.0.0 rejects this. | ||
3128 | It does not let you subtract one const X* pointer from another in | ||
3129 | an arm of an if-expression whose if-part is not a constant | ||
3130 | expression */ | ||
3131 | const char *g = "string"; | ||
3132 | ccp = &g + (g ? g-g : 0); | ||
3133 | /* HPUX 7.0 cc rejects these. */ | ||
3134 | ++ccp; | ||
3135 | p = (char**) ccp; | ||
3136 | ccp = (char const *const *) p; | ||
3137 | { /* SCO 3.2v4 cc rejects this. */ | ||
3138 | char *t; | ||
3139 | char const *s = 0 ? (char *) 0 : (char const *) 0; | ||
3140 | |||
3141 | *t++ = 0; | ||
3142 | } | ||
3143 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | ||
3144 | int x[] = {25, 17}; | ||
3145 | const int *foo = &x[0]; | ||
3146 | ++foo; | ||
3147 | } | ||
3148 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | ||
3149 | typedef const int *iptr; | ||
3150 | iptr p = 0; | ||
3151 | ++p; | ||
3152 | } | ||
3153 | { /* AIX XL C 1.02.0.0 rejects this saying | ||
3154 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | ||
3155 | struct s { int j; const int *ap[3]; }; | ||
3156 | struct s *b; b->j = 5; | ||
3157 | } | ||
3158 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | ||
3159 | const int foo = 10; | ||
3160 | } | ||
3161 | #endif | ||
3162 | |||
3163 | ; | ||
3164 | return 0; | ||
3165 | } | ||
3166 | _ACEOF | ||
3167 | rm -f conftest.$ac_objext | ||
3168 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
3169 | (eval $ac_compile) 2>conftest.er1 | ||
3170 | ac_status=$? | ||
3171 | grep -v '^ *+' conftest.er1 >conftest.err | ||
3172 | rm -f conftest.er1 | ||
3173 | cat conftest.err >&5 | ||
3174 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
3175 | (exit $ac_status); } && | ||
3176 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
3177 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
3178 | (eval $ac_try) 2>&5 | ||
3179 | ac_status=$? | ||
3180 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
3181 | (exit $ac_status); }; } && | ||
3182 | { ac_try='test -s conftest.$ac_objext' | ||
3183 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
3184 | (eval $ac_try) 2>&5 | ||
3185 | ac_status=$? | ||
3186 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
3187 | (exit $ac_status); }; }; then | ||
3188 | ac_cv_c_const=yes | ||
3189 | else | ||
3190 | echo "$as_me: failed program was:" >&5 | ||
3191 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
3192 | |||
3193 | ac_cv_c_const=no | ||
3194 | fi | ||
3195 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
3196 | fi | ||
3197 | echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 | ||
3198 | echo "${ECHO_T}$ac_cv_c_const" >&6 | ||
3199 | if test $ac_cv_c_const = no; then | ||
3200 | |||
3201 | cat >>confdefs.h <<\_ACEOF | ||
3202 | #define const | ||
3203 | _ACEOF | ||
3204 | |||
3205 | fi | ||
3206 | |||
3207 | echo "$as_me:$LINENO: checking for inline" >&5 | ||
3208 | echo $ECHO_N "checking for inline... $ECHO_C" >&6 | ||
3209 | if test "${ac_cv_c_inline+set}" = set; then | ||
3210 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3211 | else | ||
3212 | ac_cv_c_inline=no | ||
3213 | for ac_kw in inline __inline__ __inline; do | ||
3214 | cat >conftest.$ac_ext <<_ACEOF | ||
3215 | /* confdefs.h. */ | ||
3216 | _ACEOF | ||
3217 | cat confdefs.h >>conftest.$ac_ext | ||
3218 | cat >>conftest.$ac_ext <<_ACEOF | ||
3219 | /* end confdefs.h. */ | ||
3220 | #ifndef __cplusplus | ||
3221 | typedef int foo_t; | ||
3222 | static $ac_kw foo_t static_foo () {return 0; } | ||
3223 | $ac_kw foo_t foo () {return 0; } | ||
3224 | #endif | ||
3225 | |||
3226 | _ACEOF | ||
3227 | rm -f conftest.$ac_objext | ||
3228 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
3229 | (eval $ac_compile) 2>conftest.er1 | ||
3230 | ac_status=$? | ||
3231 | grep -v '^ *+' conftest.er1 >conftest.err | ||
3232 | rm -f conftest.er1 | ||
3233 | cat conftest.err >&5 | ||
3234 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
3235 | (exit $ac_status); } && | ||
3236 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
3237 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
3238 | (eval $ac_try) 2>&5 | ||
3239 | ac_status=$? | ||
3240 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
3241 | (exit $ac_status); }; } && | ||
3242 | { ac_try='test -s conftest.$ac_objext' | ||
3243 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
3244 | (eval $ac_try) 2>&5 | ||
3245 | ac_status=$? | ||
3246 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
3247 | (exit $ac_status); }; }; then | ||
3248 | ac_cv_c_inline=$ac_kw; break | ||
3249 | else | ||
3250 | echo "$as_me: failed program was:" >&5 | ||
3251 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
3252 | |||
3253 | fi | ||
3254 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
3255 | done | ||
3256 | |||
3257 | fi | ||
3258 | echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 | ||
3259 | echo "${ECHO_T}$ac_cv_c_inline" >&6 | ||
3260 | |||
3261 | |||
3262 | case $ac_cv_c_inline in | ||
3263 | inline | yes) ;; | ||
3264 | *) | ||
3265 | case $ac_cv_c_inline in | ||
3266 | no) ac_val=;; | ||
3267 | *) ac_val=$ac_cv_c_inline;; | ||
3268 | esac | ||
3269 | cat >>confdefs.h <<_ACEOF | ||
3270 | #ifndef __cplusplus | ||
3271 | #define inline $ac_val | ||
3272 | #endif | ||
3273 | _ACEOF | ||
3274 | ;; | ||
3275 | esac | ||
3276 | |||
3277 | |||
3278 | |||
3279 | ## ----------------------- ## | ||
3280 | ## Libtool initialisation. ## | ||
3281 | ## ----------------------- ## | ||
3282 | |||
3283 | |||
3284 | # Check whether --enable-shared or --disable-shared was given. | ||
3285 | if test "${enable_shared+set}" = set; then | ||
3286 | enableval="$enable_shared" | ||
3287 | p=${PACKAGE-default} | ||
3288 | case $enableval in | ||
3289 | yes) enable_shared=yes ;; | ||
3290 | no) enable_shared=no ;; | ||
3291 | *) | ||
3292 | enable_shared=no | ||
3293 | # Look at the argument we got. We use all the common list separators. | ||
3294 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
3295 | for pkg in $enableval; do | ||
3296 | IFS="$lt_save_ifs" | ||
3297 | if test "X$pkg" = "X$p"; then | ||
3298 | enable_shared=yes | ||
3299 | fi | ||
3300 | done | ||
3301 | IFS="$lt_save_ifs" | ||
3302 | ;; | ||
3303 | esac | ||
3304 | else | ||
3305 | enable_shared=yes | ||
3306 | fi; | ||
3307 | |||
3308 | # Check whether --enable-static or --disable-static was given. | ||
3309 | if test "${enable_static+set}" = set; then | ||
3310 | enableval="$enable_static" | ||
3311 | p=${PACKAGE-default} | ||
3312 | case $enableval in | ||
3313 | yes) enable_static=yes ;; | ||
3314 | no) enable_static=no ;; | ||
3315 | *) | ||
3316 | enable_static=no | ||
3317 | # Look at the argument we got. We use all the common list separators. | ||
3318 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
3319 | for pkg in $enableval; do | ||
3320 | IFS="$lt_save_ifs" | ||
3321 | if test "X$pkg" = "X$p"; then | ||
3322 | enable_static=yes | ||
3323 | fi | ||
3324 | done | ||
3325 | IFS="$lt_save_ifs" | ||
3326 | ;; | ||
3327 | esac | ||
3328 | else | ||
3329 | enable_static=yes | ||
3330 | fi; | ||
3331 | |||
3332 | # Check whether --enable-fast-install or --disable-fast-install was given. | ||
3333 | if test "${enable_fast_install+set}" = set; then | ||
3334 | enableval="$enable_fast_install" | ||
3335 | p=${PACKAGE-default} | ||
3336 | case $enableval in | ||
3337 | yes) enable_fast_install=yes ;; | ||
3338 | no) enable_fast_install=no ;; | ||
3339 | *) | ||
3340 | enable_fast_install=no | ||
3341 | # Look at the argument we got. We use all the common list separators. | ||
3342 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
3343 | for pkg in $enableval; do | ||
3344 | IFS="$lt_save_ifs" | ||
3345 | if test "X$pkg" = "X$p"; then | ||
3346 | enable_fast_install=yes | ||
3347 | fi | ||
3348 | done | ||
3349 | IFS="$lt_save_ifs" | ||
3350 | ;; | ||
3351 | esac | ||
3352 | else | ||
3353 | enable_fast_install=yes | ||
3354 | fi; | ||
3355 | |||
3356 | # Make sure we can run config.sub. | ||
3357 | $ac_config_sub sun4 >/dev/null 2>&1 || | ||
3358 | { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 | ||
3359 | echo "$as_me: error: cannot run $ac_config_sub" >&2;} | ||
3360 | { (exit 1); exit 1; }; } | ||
3361 | |||
3362 | echo "$as_me:$LINENO: checking build system type" >&5 | ||
3363 | echo $ECHO_N "checking build system type... $ECHO_C" >&6 | ||
3364 | if test "${ac_cv_build+set}" = set; then | ||
3365 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3366 | else | ||
3367 | ac_cv_build_alias=$build_alias | ||
3368 | test -z "$ac_cv_build_alias" && | ||
3369 | ac_cv_build_alias=`$ac_config_guess` | ||
3370 | test -z "$ac_cv_build_alias" && | ||
3371 | { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 | ||
3372 | echo "$as_me: error: cannot guess build type; you must specify one" >&2;} | ||
3373 | { (exit 1); exit 1; }; } | ||
3374 | ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || | ||
3375 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 | ||
3376 | echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} | ||
3377 | { (exit 1); exit 1; }; } | ||
3378 | |||
3379 | fi | ||
3380 | echo "$as_me:$LINENO: result: $ac_cv_build" >&5 | ||
3381 | echo "${ECHO_T}$ac_cv_build" >&6 | ||
3382 | build=$ac_cv_build | ||
3383 | build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | ||
3384 | build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | ||
3385 | build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | ||
3386 | |||
3387 | |||
3388 | echo "$as_me:$LINENO: checking host system type" >&5 | ||
3389 | echo $ECHO_N "checking host system type... $ECHO_C" >&6 | ||
3390 | if test "${ac_cv_host+set}" = set; then | ||
3391 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3392 | else | ||
3393 | ac_cv_host_alias=$host_alias | ||
3394 | test -z "$ac_cv_host_alias" && | ||
3395 | ac_cv_host_alias=$ac_cv_build_alias | ||
3396 | ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || | ||
3397 | { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 | ||
3398 | echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} | ||
3399 | { (exit 1); exit 1; }; } | ||
3400 | |||
3401 | fi | ||
3402 | echo "$as_me:$LINENO: result: $ac_cv_host" >&5 | ||
3403 | echo "${ECHO_T}$ac_cv_host" >&6 | ||
3404 | host=$ac_cv_host | ||
3405 | host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | ||
3406 | host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | ||
3407 | host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | ||
3408 | |||
3409 | |||
3410 | echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 | ||
3411 | echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 | ||
3412 | if test "${lt_cv_path_SED+set}" = set; then | ||
3413 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3414 | else | ||
3415 | # Loop through the user's path and test for sed and gsed. | ||
3416 | # Then use that list of sed's as ones to test for truncation. | ||
3417 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
3418 | for as_dir in $PATH | ||
3419 | do | ||
3420 | IFS=$as_save_IFS | ||
3421 | test -z "$as_dir" && as_dir=. | ||
3422 | for lt_ac_prog in sed gsed; do | ||
3423 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
3424 | if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then | ||
3425 | lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" | ||
3426 | fi | ||
3427 | done | ||
3428 | done | ||
3429 | done | ||
3430 | lt_ac_max=0 | ||
3431 | lt_ac_count=0 | ||
3432 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris | ||
3433 | # along with /bin/sed that truncates output. | ||
3434 | for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do | ||
3435 | test ! -f $lt_ac_sed && break | ||
3436 | cat /dev/null > conftest.in | ||
3437 | lt_ac_count=0 | ||
3438 | echo $ECHO_N "0123456789$ECHO_C" >conftest.in | ||
3439 | # Check for GNU sed and select it if it is found. | ||
3440 | if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then | ||
3441 | lt_cv_path_SED=$lt_ac_sed | ||
3442 | break | ||
3443 | fi | ||
3444 | while true; do | ||
3445 | cat conftest.in conftest.in >conftest.tmp | ||
3446 | mv conftest.tmp conftest.in | ||
3447 | cp conftest.in conftest.nl | ||
3448 | echo >>conftest.nl | ||
3449 | $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break | ||
3450 | cmp -s conftest.out conftest.nl || break | ||
3451 | # 10000 chars as input seems more than enough | ||
3452 | test $lt_ac_count -gt 10 && break | ||
3453 | lt_ac_count=`expr $lt_ac_count + 1` | ||
3454 | if test $lt_ac_count -gt $lt_ac_max; then | ||
3455 | lt_ac_max=$lt_ac_count | ||
3456 | lt_cv_path_SED=$lt_ac_sed | ||
3457 | fi | ||
3458 | done | ||
3459 | done | ||
3460 | SED=$lt_cv_path_SED | ||
3461 | |||
3462 | fi | ||
3463 | |||
3464 | echo "$as_me:$LINENO: result: $SED" >&5 | ||
3465 | echo "${ECHO_T}$SED" >&6 | ||
3466 | |||
3467 | echo "$as_me:$LINENO: checking for egrep" >&5 | ||
3468 | echo $ECHO_N "checking for egrep... $ECHO_C" >&6 | ||
3469 | if test "${ac_cv_prog_egrep+set}" = set; then | ||
3470 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3471 | else | ||
3472 | if echo a | (grep -E '(a|b)') >/dev/null 2>&1 | ||
3473 | then ac_cv_prog_egrep='grep -E' | ||
3474 | else ac_cv_prog_egrep='egrep' | ||
3475 | fi | ||
3476 | fi | ||
3477 | echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 | ||
3478 | echo "${ECHO_T}$ac_cv_prog_egrep" >&6 | ||
3479 | EGREP=$ac_cv_prog_egrep | ||
3480 | |||
3481 | |||
3482 | |||
3483 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | ||
3484 | if test "${with_gnu_ld+set}" = set; then | ||
3485 | withval="$with_gnu_ld" | ||
3486 | test "$withval" = no || with_gnu_ld=yes | ||
3487 | else | ||
3488 | with_gnu_ld=no | ||
3489 | fi; | ||
3490 | ac_prog=ld | ||
3491 | if test "$GCC" = yes; then | ||
3492 | # Check if gcc -print-prog-name=ld gives a path. | ||
3493 | echo "$as_me:$LINENO: checking for ld used by $CC" >&5 | ||
3494 | echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 | ||
3495 | case $host in | ||
3496 | *-*-mingw*) | ||
3497 | # gcc leaves a trailing carriage return which upsets mingw | ||
3498 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
3499 | *) | ||
3500 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
3501 | esac | ||
3502 | case $ac_prog in | ||
3503 | # Accept absolute paths. | ||
3504 | [\\/]* | ?:[\\/]*) | ||
3505 | re_direlt='/[^/][^/]*/\.\./' | ||
3506 | # Canonicalize the pathname of ld | ||
3507 | ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` | ||
3508 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | ||
3509 | ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` | ||
3510 | done | ||
3511 | test -z "$LD" && LD="$ac_prog" | ||
3512 | ;; | ||
3513 | "") | ||
3514 | # If it fails, then pretend we aren't using GCC. | ||
3515 | ac_prog=ld | ||
3516 | ;; | ||
3517 | *) | ||
3518 | # If it is relative, then search for the first ld in PATH. | ||
3519 | with_gnu_ld=unknown | ||
3520 | ;; | ||
3521 | esac | ||
3522 | elif test "$with_gnu_ld" = yes; then | ||
3523 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | ||
3524 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | ||
3525 | else | ||
3526 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 | ||
3527 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | ||
3528 | fi | ||
3529 | if test "${lt_cv_path_LD+set}" = set; then | ||
3530 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3531 | else | ||
3532 | if test -z "$LD"; then | ||
3533 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
3534 | for ac_dir in $PATH; do | ||
3535 | IFS="$lt_save_ifs" | ||
3536 | test -z "$ac_dir" && ac_dir=. | ||
3537 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
3538 | lt_cv_path_LD="$ac_dir/$ac_prog" | ||
3539 | # Check to see if the program is GNU ld. I'd rather use --version, | ||
3540 | # but apparently some GNU ld's only accept -v. | ||
3541 | # Break only if it was the GNU/non-GNU ld that we prefer. | ||
3542 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | ||
3543 | *GNU* | *'with BFD'*) | ||
3544 | test "$with_gnu_ld" != no && break | ||
3545 | ;; | ||
3546 | *) | ||
3547 | test "$with_gnu_ld" != yes && break | ||
3548 | ;; | ||
3549 | esac | ||
3550 | fi | ||
3551 | done | ||
3552 | IFS="$lt_save_ifs" | ||
3553 | else | ||
3554 | lt_cv_path_LD="$LD" # Let the user override the test with a path. | ||
3555 | fi | ||
3556 | fi | ||
3557 | |||
3558 | LD="$lt_cv_path_LD" | ||
3559 | if test -n "$LD"; then | ||
3560 | echo "$as_me:$LINENO: result: $LD" >&5 | ||
3561 | echo "${ECHO_T}$LD" >&6 | ||
3562 | else | ||
3563 | echo "$as_me:$LINENO: result: no" >&5 | ||
3564 | echo "${ECHO_T}no" >&6 | ||
3565 | fi | ||
3566 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 | ||
3567 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | ||
3568 | { (exit 1); exit 1; }; } | ||
3569 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | ||
3570 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | ||
3571 | if test "${lt_cv_prog_gnu_ld+set}" = set; then | ||
3572 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3573 | else | ||
3574 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | ||
3575 | case `$LD -v 2>&1 </dev/null` in | ||
3576 | *GNU* | *'with BFD'*) | ||
3577 | lt_cv_prog_gnu_ld=yes | ||
3578 | ;; | ||
3579 | *) | ||
3580 | lt_cv_prog_gnu_ld=no | ||
3581 | ;; | ||
3582 | esac | ||
3583 | fi | ||
3584 | echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 | ||
3585 | echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 | ||
3586 | with_gnu_ld=$lt_cv_prog_gnu_ld | ||
3587 | |||
3588 | |||
3589 | echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 | ||
3590 | echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 | ||
3591 | if test "${lt_cv_ld_reload_flag+set}" = set; then | ||
3592 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3593 | else | ||
3594 | lt_cv_ld_reload_flag='-r' | ||
3595 | fi | ||
3596 | echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 | ||
3597 | echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 | ||
3598 | reload_flag=$lt_cv_ld_reload_flag | ||
3599 | case $reload_flag in | ||
3600 | "" | " "*) ;; | ||
3601 | *) reload_flag=" $reload_flag" ;; | ||
3602 | esac | ||
3603 | reload_cmds='$LD$reload_flag -o $output$reload_objs' | ||
3604 | |||
3605 | echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 | ||
3606 | echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 | ||
3607 | if test "${lt_cv_path_NM+set}" = set; then | ||
3608 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3609 | else | ||
3610 | if test -n "$NM"; then | ||
3611 | # Let the user override the test. | ||
3612 | lt_cv_path_NM="$NM" | ||
3613 | else | ||
3614 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
3615 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do | ||
3616 | IFS="$lt_save_ifs" | ||
3617 | test -z "$ac_dir" && ac_dir=. | ||
3618 | tmp_nm="$ac_dir/${ac_tool_prefix}nm" | ||
3619 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then | ||
3620 | # Check to see if the nm accepts a BSD-compat flag. | ||
3621 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | ||
3622 | # nm: unknown option "B" ignored | ||
3623 | # Tru64's nm complains that /dev/null is an invalid object file | ||
3624 | case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in | ||
3625 | */dev/null* | *'Invalid file or object type'*) | ||
3626 | lt_cv_path_NM="$tmp_nm -B" | ||
3627 | break | ||
3628 | ;; | ||
3629 | *) | ||
3630 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in | ||
3631 | */dev/null*) | ||
3632 | lt_cv_path_NM="$tmp_nm -p" | ||
3633 | break | ||
3634 | ;; | ||
3635 | *) | ||
3636 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | ||
3637 | continue # so that we can try to find one that supports BSD flags | ||
3638 | ;; | ||
3639 | esac | ||
3640 | esac | ||
3641 | fi | ||
3642 | done | ||
3643 | IFS="$lt_save_ifs" | ||
3644 | test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm | ||
3645 | fi | ||
3646 | fi | ||
3647 | echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 | ||
3648 | echo "${ECHO_T}$lt_cv_path_NM" >&6 | ||
3649 | NM="$lt_cv_path_NM" | ||
3650 | |||
3651 | echo "$as_me:$LINENO: checking whether ln -s works" >&5 | ||
3652 | echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 | ||
3653 | LN_S=$as_ln_s | ||
3654 | if test "$LN_S" = "ln -s"; then | ||
3655 | echo "$as_me:$LINENO: result: yes" >&5 | ||
3656 | echo "${ECHO_T}yes" >&6 | ||
3657 | else | ||
3658 | echo "$as_me:$LINENO: result: no, using $LN_S" >&5 | ||
3659 | echo "${ECHO_T}no, using $LN_S" >&6 | ||
3660 | fi | ||
3661 | |||
3662 | echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 | ||
3663 | echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 | ||
3664 | if test "${lt_cv_deplibs_check_method+set}" = set; then | ||
3665 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3666 | else | ||
3667 | lt_cv_file_magic_cmd='$MAGIC_CMD' | ||
3668 | lt_cv_file_magic_test_file= | ||
3669 | lt_cv_deplibs_check_method='unknown' | ||
3670 | # Need to set the preceding variable on all platforms that support | ||
3671 | # interlibrary dependencies. | ||
3672 | # 'none' -- dependencies not supported. | ||
3673 | # `unknown' -- same as none, but documents that we really don't know. | ||
3674 | # 'pass_all' -- all dependencies passed with no checks. | ||
3675 | # 'test_compile' -- check by making test program. | ||
3676 | # 'file_magic [[regex]]' -- check by looking for files in library path | ||
3677 | # which responds to the $file_magic_cmd with a given extended regex. | ||
3678 | # If you have `file' or equivalent on your system and you're not sure | ||
3679 | # whether `pass_all' will *always* work, you probably want this one. | ||
3680 | |||
3681 | case $host_os in | ||
3682 | aix4* | aix5*) | ||
3683 | lt_cv_deplibs_check_method=pass_all | ||
3684 | ;; | ||
3685 | |||
3686 | beos*) | ||
3687 | lt_cv_deplibs_check_method=pass_all | ||
3688 | ;; | ||
3689 | |||
3690 | bsdi4*) | ||
3691 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' | ||
3692 | lt_cv_file_magic_cmd='/usr/bin/file -L' | ||
3693 | lt_cv_file_magic_test_file=/shlib/libc.so | ||
3694 | ;; | ||
3695 | |||
3696 | cygwin*) | ||
3697 | # func_win32_libid is a shell function defined in ltmain.sh | ||
3698 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' | ||
3699 | lt_cv_file_magic_cmd='func_win32_libid' | ||
3700 | ;; | ||
3701 | |||
3702 | mingw* | pw32*) | ||
3703 | # Base MSYS/MinGW do not provide the 'file' command needed by | ||
3704 | # func_win32_libid shell function, so use a weaker test based on 'objdump'. | ||
3705 | lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | ||
3706 | lt_cv_file_magic_cmd='$OBJDUMP -f' | ||
3707 | ;; | ||
3708 | |||
3709 | darwin* | rhapsody*) | ||
3710 | lt_cv_deplibs_check_method=pass_all | ||
3711 | ;; | ||
3712 | |||
3713 | freebsd* | kfreebsd*-gnu) | ||
3714 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
3715 | case $host_cpu in | ||
3716 | i*86 ) | ||
3717 | # Not sure whether the presence of OpenBSD here was a mistake. | ||
3718 | # Let's accept both of them until this is cleared up. | ||
3719 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' | ||
3720 | lt_cv_file_magic_cmd=/usr/bin/file | ||
3721 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | ||
3722 | ;; | ||
3723 | esac | ||
3724 | else | ||
3725 | lt_cv_deplibs_check_method=pass_all | ||
3726 | fi | ||
3727 | ;; | ||
3728 | |||
3729 | gnu*) | ||
3730 | lt_cv_deplibs_check_method=pass_all | ||
3731 | ;; | ||
3732 | |||
3733 | hpux10.20* | hpux11*) | ||
3734 | lt_cv_file_magic_cmd=/usr/bin/file | ||
3735 | case "$host_cpu" in | ||
3736 | ia64*) | ||
3737 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' | ||
3738 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so | ||
3739 | ;; | ||
3740 | hppa*64*) | ||
3741 | 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]' | ||
3742 | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl | ||
3743 | ;; | ||
3744 | *) | ||
3745 | lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' | ||
3746 | lt_cv_file_magic_test_file=/usr/lib/libc.sl | ||
3747 | ;; | ||
3748 | esac | ||
3749 | ;; | ||
3750 | |||
3751 | irix5* | irix6* | nonstopux*) | ||
3752 | case $LD in | ||
3753 | *-32|*"-32 ") libmagic=32-bit;; | ||
3754 | *-n32|*"-n32 ") libmagic=N32;; | ||
3755 | *-64|*"-64 ") libmagic=64-bit;; | ||
3756 | *) libmagic=never-match;; | ||
3757 | esac | ||
3758 | lt_cv_deplibs_check_method=pass_all | ||
3759 | ;; | ||
3760 | |||
3761 | # This must be Linux ELF. | ||
3762 | linux*) | ||
3763 | lt_cv_deplibs_check_method=pass_all | ||
3764 | ;; | ||
3765 | |||
3766 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
3767 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
3768 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' | ||
3769 | else | ||
3770 | lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' | ||
3771 | fi | ||
3772 | ;; | ||
3773 | |||
3774 | newos6*) | ||
3775 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' | ||
3776 | lt_cv_file_magic_cmd=/usr/bin/file | ||
3777 | lt_cv_file_magic_test_file=/usr/lib/libnls.so | ||
3778 | ;; | ||
3779 | |||
3780 | nto-qnx*) | ||
3781 | lt_cv_deplibs_check_method=unknown | ||
3782 | ;; | ||
3783 | |||
3784 | openbsd*) | ||
3785 | lt_cv_file_magic_cmd=/usr/bin/file | ||
3786 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | ||
3787 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
3788 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' | ||
3789 | else | ||
3790 | lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' | ||
3791 | fi | ||
3792 | ;; | ||
3793 | |||
3794 | osf3* | osf4* | osf5*) | ||
3795 | lt_cv_deplibs_check_method=pass_all | ||
3796 | ;; | ||
3797 | |||
3798 | sco3.2v5*) | ||
3799 | lt_cv_deplibs_check_method=pass_all | ||
3800 | ;; | ||
3801 | |||
3802 | solaris*) | ||
3803 | lt_cv_deplibs_check_method=pass_all | ||
3804 | ;; | ||
3805 | |||
3806 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
3807 | case $host_vendor in | ||
3808 | motorola) | ||
3809 | 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]' | ||
3810 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | ||
3811 | ;; | ||
3812 | ncr) | ||
3813 | lt_cv_deplibs_check_method=pass_all | ||
3814 | ;; | ||
3815 | sequent) | ||
3816 | lt_cv_file_magic_cmd='/bin/file' | ||
3817 | lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' | ||
3818 | ;; | ||
3819 | sni) | ||
3820 | lt_cv_file_magic_cmd='/bin/file' | ||
3821 | lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" | ||
3822 | lt_cv_file_magic_test_file=/lib/libc.so | ||
3823 | ;; | ||
3824 | siemens) | ||
3825 | lt_cv_deplibs_check_method=pass_all | ||
3826 | ;; | ||
3827 | esac | ||
3828 | ;; | ||
3829 | |||
3830 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) | ||
3831 | lt_cv_deplibs_check_method=pass_all | ||
3832 | ;; | ||
3833 | esac | ||
3834 | |||
3835 | fi | ||
3836 | echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 | ||
3837 | echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 | ||
3838 | file_magic_cmd=$lt_cv_file_magic_cmd | ||
3839 | deplibs_check_method=$lt_cv_deplibs_check_method | ||
3840 | test -z "$deplibs_check_method" && deplibs_check_method=unknown | ||
3841 | |||
3842 | |||
3843 | |||
3844 | |||
3845 | # If no C compiler was specified, use CC. | ||
3846 | LTCC=${LTCC-"$CC"} | ||
3847 | |||
3848 | # Allow CC to be a program name with arguments. | ||
3849 | compiler=$CC | ||
3850 | |||
3851 | # Check whether --enable-libtool-lock or --disable-libtool-lock was given. | ||
3852 | if test "${enable_libtool_lock+set}" = set; then | ||
3853 | enableval="$enable_libtool_lock" | ||
3854 | |||
3855 | fi; | ||
3856 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | ||
3857 | |||
3858 | # Some flags need to be propagated to the compiler or linker for good | ||
3859 | # libtool support. | ||
3860 | case $host in | ||
3861 | ia64-*-hpux*) | ||
3862 | # Find out which ABI we are using. | ||
3863 | echo 'int i;' > conftest.$ac_ext | ||
3864 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
3865 | (eval $ac_compile) 2>&5 | ||
3866 | ac_status=$? | ||
3867 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
3868 | (exit $ac_status); }; then | ||
3869 | case `/usr/bin/file conftest.$ac_objext` in | ||
3870 | *ELF-32*) | ||
3871 | HPUX_IA64_MODE="32" | ||
3872 | ;; | ||
3873 | *ELF-64*) | ||
3874 | HPUX_IA64_MODE="64" | ||
3875 | ;; | ||
3876 | esac | ||
3877 | fi | ||
3878 | rm -rf conftest* | ||
3879 | ;; | ||
3880 | *-*-irix6*) | ||
3881 | # Find out which ABI we are using. | ||
3882 | echo '#line 3882 "configure"' > conftest.$ac_ext | ||
3883 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
3884 | (eval $ac_compile) 2>&5 | ||
3885 | ac_status=$? | ||
3886 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
3887 | (exit $ac_status); }; then | ||
3888 | if test "$lt_cv_prog_gnu_ld" = yes; then | ||
3889 | case `/usr/bin/file conftest.$ac_objext` in | ||
3890 | *32-bit*) | ||
3891 | LD="${LD-ld} -melf32bsmip" | ||
3892 | ;; | ||
3893 | *N32*) | ||
3894 | LD="${LD-ld} -melf32bmipn32" | ||
3895 | ;; | ||
3896 | *64-bit*) | ||
3897 | LD="${LD-ld} -melf64bmip" | ||
3898 | ;; | ||
3899 | esac | ||
3900 | else | ||
3901 | case `/usr/bin/file conftest.$ac_objext` in | ||
3902 | *32-bit*) | ||
3903 | LD="${LD-ld} -32" | ||
3904 | ;; | ||
3905 | *N32*) | ||
3906 | LD="${LD-ld} -n32" | ||
3907 | ;; | ||
3908 | *64-bit*) | ||
3909 | LD="${LD-ld} -64" | ||
3910 | ;; | ||
3911 | esac | ||
3912 | fi | ||
3913 | fi | ||
3914 | rm -rf conftest* | ||
3915 | ;; | ||
3916 | |||
3917 | x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) | ||
3918 | # Find out which ABI we are using. | ||
3919 | echo 'int i;' > conftest.$ac_ext | ||
3920 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
3921 | (eval $ac_compile) 2>&5 | ||
3922 | ac_status=$? | ||
3923 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
3924 | (exit $ac_status); }; then | ||
3925 | case "`/usr/bin/file conftest.o`" in | ||
3926 | *32-bit*) | ||
3927 | case $host in | ||
3928 | x86_64-*linux*) | ||
3929 | LD="${LD-ld} -m elf_i386" | ||
3930 | ;; | ||
3931 | ppc64-*linux*|powerpc64-*linux*) | ||
3932 | LD="${LD-ld} -m elf32ppclinux" | ||
3933 | ;; | ||
3934 | s390x-*linux*) | ||
3935 | LD="${LD-ld} -m elf_s390" | ||
3936 | ;; | ||
3937 | sparc64-*linux*) | ||
3938 | LD="${LD-ld} -m elf32_sparc" | ||
3939 | ;; | ||
3940 | esac | ||
3941 | ;; | ||
3942 | *64-bit*) | ||
3943 | case $host in | ||
3944 | x86_64-*linux*) | ||
3945 | LD="${LD-ld} -m elf_x86_64" | ||
3946 | ;; | ||
3947 | ppc*-*linux*|powerpc*-*linux*) | ||
3948 | LD="${LD-ld} -m elf64ppc" | ||
3949 | ;; | ||
3950 | s390*-*linux*) | ||
3951 | LD="${LD-ld} -m elf64_s390" | ||
3952 | ;; | ||
3953 | sparc*-*linux*) | ||
3954 | LD="${LD-ld} -m elf64_sparc" | ||
3955 | ;; | ||
3956 | esac | ||
3957 | ;; | ||
3958 | esac | ||
3959 | fi | ||
3960 | rm -rf conftest* | ||
3961 | ;; | ||
3962 | |||
3963 | *-*-sco3.2v5*) | ||
3964 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | ||
3965 | SAVE_CFLAGS="$CFLAGS" | ||
3966 | CFLAGS="$CFLAGS -belf" | ||
3967 | echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 | ||
3968 | echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 | ||
3969 | if test "${lt_cv_cc_needs_belf+set}" = set; then | ||
3970 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
3971 | else | ||
3972 | ac_ext=c | ||
3973 | ac_cpp='$CPP $CPPFLAGS' | ||
3974 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
3975 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
3976 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
3977 | |||
3978 | cat >conftest.$ac_ext <<_ACEOF | ||
3979 | /* confdefs.h. */ | ||
3980 | _ACEOF | ||
3981 | cat confdefs.h >>conftest.$ac_ext | ||
3982 | cat >>conftest.$ac_ext <<_ACEOF | ||
3983 | /* end confdefs.h. */ | ||
3984 | |||
3985 | int | ||
3986 | main () | ||
3987 | { | ||
3988 | |||
3989 | ; | ||
3990 | return 0; | ||
3991 | } | ||
3992 | _ACEOF | ||
3993 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
3994 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
3995 | (eval $ac_link) 2>conftest.er1 | ||
3996 | ac_status=$? | ||
3997 | grep -v '^ *+' conftest.er1 >conftest.err | ||
3998 | rm -f conftest.er1 | ||
3999 | cat conftest.err >&5 | ||
4000 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4001 | (exit $ac_status); } && | ||
4002 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
4003 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
4004 | (eval $ac_try) 2>&5 | ||
4005 | ac_status=$? | ||
4006 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4007 | (exit $ac_status); }; } && | ||
4008 | { ac_try='test -s conftest$ac_exeext' | ||
4009 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
4010 | (eval $ac_try) 2>&5 | ||
4011 | ac_status=$? | ||
4012 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4013 | (exit $ac_status); }; }; then | ||
4014 | lt_cv_cc_needs_belf=yes | ||
4015 | else | ||
4016 | echo "$as_me: failed program was:" >&5 | ||
4017 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
4018 | |||
4019 | lt_cv_cc_needs_belf=no | ||
4020 | fi | ||
4021 | rm -f conftest.err conftest.$ac_objext \ | ||
4022 | conftest$ac_exeext conftest.$ac_ext | ||
4023 | ac_ext=c | ||
4024 | ac_cpp='$CPP $CPPFLAGS' | ||
4025 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
4026 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
4027 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
4028 | |||
4029 | fi | ||
4030 | echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 | ||
4031 | echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 | ||
4032 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | ||
4033 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | ||
4034 | CFLAGS="$SAVE_CFLAGS" | ||
4035 | fi | ||
4036 | ;; | ||
4037 | *-*-cygwin* | *-*-mingw* | *-*-pw32*) | ||
4038 | if test -n "$ac_tool_prefix"; then | ||
4039 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. | ||
4040 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 | ||
4041 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
4042 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
4043 | if test "${ac_cv_prog_DLLTOOL+set}" = set; then | ||
4044 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4045 | else | ||
4046 | if test -n "$DLLTOOL"; then | ||
4047 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. | ||
4048 | else | ||
4049 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
4050 | for as_dir in $PATH | ||
4051 | do | ||
4052 | IFS=$as_save_IFS | ||
4053 | test -z "$as_dir" && as_dir=. | ||
4054 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
4055 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
4056 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" | ||
4057 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
4058 | break 2 | ||
4059 | fi | ||
4060 | done | ||
4061 | done | ||
4062 | |||
4063 | fi | ||
4064 | fi | ||
4065 | DLLTOOL=$ac_cv_prog_DLLTOOL | ||
4066 | if test -n "$DLLTOOL"; then | ||
4067 | echo "$as_me:$LINENO: result: $DLLTOOL" >&5 | ||
4068 | echo "${ECHO_T}$DLLTOOL" >&6 | ||
4069 | else | ||
4070 | echo "$as_me:$LINENO: result: no" >&5 | ||
4071 | echo "${ECHO_T}no" >&6 | ||
4072 | fi | ||
4073 | |||
4074 | fi | ||
4075 | if test -z "$ac_cv_prog_DLLTOOL"; then | ||
4076 | ac_ct_DLLTOOL=$DLLTOOL | ||
4077 | # Extract the first word of "dlltool", so it can be a program name with args. | ||
4078 | set dummy dlltool; ac_word=$2 | ||
4079 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
4080 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
4081 | if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then | ||
4082 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4083 | else | ||
4084 | if test -n "$ac_ct_DLLTOOL"; then | ||
4085 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. | ||
4086 | else | ||
4087 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
4088 | for as_dir in $PATH | ||
4089 | do | ||
4090 | IFS=$as_save_IFS | ||
4091 | test -z "$as_dir" && as_dir=. | ||
4092 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
4093 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
4094 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" | ||
4095 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
4096 | break 2 | ||
4097 | fi | ||
4098 | done | ||
4099 | done | ||
4100 | |||
4101 | test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false" | ||
4102 | fi | ||
4103 | fi | ||
4104 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL | ||
4105 | if test -n "$ac_ct_DLLTOOL"; then | ||
4106 | echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 | ||
4107 | echo "${ECHO_T}$ac_ct_DLLTOOL" >&6 | ||
4108 | else | ||
4109 | echo "$as_me:$LINENO: result: no" >&5 | ||
4110 | echo "${ECHO_T}no" >&6 | ||
4111 | fi | ||
4112 | |||
4113 | DLLTOOL=$ac_ct_DLLTOOL | ||
4114 | else | ||
4115 | DLLTOOL="$ac_cv_prog_DLLTOOL" | ||
4116 | fi | ||
4117 | |||
4118 | if test -n "$ac_tool_prefix"; then | ||
4119 | # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. | ||
4120 | set dummy ${ac_tool_prefix}as; ac_word=$2 | ||
4121 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
4122 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
4123 | if test "${ac_cv_prog_AS+set}" = set; then | ||
4124 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4125 | else | ||
4126 | if test -n "$AS"; then | ||
4127 | ac_cv_prog_AS="$AS" # Let the user override the test. | ||
4128 | else | ||
4129 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
4130 | for as_dir in $PATH | ||
4131 | do | ||
4132 | IFS=$as_save_IFS | ||
4133 | test -z "$as_dir" && as_dir=. | ||
4134 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
4135 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
4136 | ac_cv_prog_AS="${ac_tool_prefix}as" | ||
4137 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
4138 | break 2 | ||
4139 | fi | ||
4140 | done | ||
4141 | done | ||
4142 | |||
4143 | fi | ||
4144 | fi | ||
4145 | AS=$ac_cv_prog_AS | ||
4146 | if test -n "$AS"; then | ||
4147 | echo "$as_me:$LINENO: result: $AS" >&5 | ||
4148 | echo "${ECHO_T}$AS" >&6 | ||
4149 | else | ||
4150 | echo "$as_me:$LINENO: result: no" >&5 | ||
4151 | echo "${ECHO_T}no" >&6 | ||
4152 | fi | ||
4153 | |||
4154 | fi | ||
4155 | if test -z "$ac_cv_prog_AS"; then | ||
4156 | ac_ct_AS=$AS | ||
4157 | # Extract the first word of "as", so it can be a program name with args. | ||
4158 | set dummy as; ac_word=$2 | ||
4159 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
4160 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
4161 | if test "${ac_cv_prog_ac_ct_AS+set}" = set; then | ||
4162 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4163 | else | ||
4164 | if test -n "$ac_ct_AS"; then | ||
4165 | ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. | ||
4166 | else | ||
4167 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
4168 | for as_dir in $PATH | ||
4169 | do | ||
4170 | IFS=$as_save_IFS | ||
4171 | test -z "$as_dir" && as_dir=. | ||
4172 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
4173 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
4174 | ac_cv_prog_ac_ct_AS="as" | ||
4175 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
4176 | break 2 | ||
4177 | fi | ||
4178 | done | ||
4179 | done | ||
4180 | |||
4181 | test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false" | ||
4182 | fi | ||
4183 | fi | ||
4184 | ac_ct_AS=$ac_cv_prog_ac_ct_AS | ||
4185 | if test -n "$ac_ct_AS"; then | ||
4186 | echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 | ||
4187 | echo "${ECHO_T}$ac_ct_AS" >&6 | ||
4188 | else | ||
4189 | echo "$as_me:$LINENO: result: no" >&5 | ||
4190 | echo "${ECHO_T}no" >&6 | ||
4191 | fi | ||
4192 | |||
4193 | AS=$ac_ct_AS | ||
4194 | else | ||
4195 | AS="$ac_cv_prog_AS" | ||
4196 | fi | ||
4197 | |||
4198 | if test -n "$ac_tool_prefix"; then | ||
4199 | # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. | ||
4200 | set dummy ${ac_tool_prefix}objdump; ac_word=$2 | ||
4201 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
4202 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
4203 | if test "${ac_cv_prog_OBJDUMP+set}" = set; then | ||
4204 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4205 | else | ||
4206 | if test -n "$OBJDUMP"; then | ||
4207 | ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. | ||
4208 | else | ||
4209 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
4210 | for as_dir in $PATH | ||
4211 | do | ||
4212 | IFS=$as_save_IFS | ||
4213 | test -z "$as_dir" && as_dir=. | ||
4214 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
4215 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
4216 | ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" | ||
4217 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
4218 | break 2 | ||
4219 | fi | ||
4220 | done | ||
4221 | done | ||
4222 | |||
4223 | fi | ||
4224 | fi | ||
4225 | OBJDUMP=$ac_cv_prog_OBJDUMP | ||
4226 | if test -n "$OBJDUMP"; then | ||
4227 | echo "$as_me:$LINENO: result: $OBJDUMP" >&5 | ||
4228 | echo "${ECHO_T}$OBJDUMP" >&6 | ||
4229 | else | ||
4230 | echo "$as_me:$LINENO: result: no" >&5 | ||
4231 | echo "${ECHO_T}no" >&6 | ||
4232 | fi | ||
4233 | |||
4234 | fi | ||
4235 | if test -z "$ac_cv_prog_OBJDUMP"; then | ||
4236 | ac_ct_OBJDUMP=$OBJDUMP | ||
4237 | # Extract the first word of "objdump", so it can be a program name with args. | ||
4238 | set dummy objdump; ac_word=$2 | ||
4239 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
4240 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
4241 | if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then | ||
4242 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4243 | else | ||
4244 | if test -n "$ac_ct_OBJDUMP"; then | ||
4245 | ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. | ||
4246 | else | ||
4247 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
4248 | for as_dir in $PATH | ||
4249 | do | ||
4250 | IFS=$as_save_IFS | ||
4251 | test -z "$as_dir" && as_dir=. | ||
4252 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
4253 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
4254 | ac_cv_prog_ac_ct_OBJDUMP="objdump" | ||
4255 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
4256 | break 2 | ||
4257 | fi | ||
4258 | done | ||
4259 | done | ||
4260 | |||
4261 | test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false" | ||
4262 | fi | ||
4263 | fi | ||
4264 | ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP | ||
4265 | if test -n "$ac_ct_OBJDUMP"; then | ||
4266 | echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 | ||
4267 | echo "${ECHO_T}$ac_ct_OBJDUMP" >&6 | ||
4268 | else | ||
4269 | echo "$as_me:$LINENO: result: no" >&5 | ||
4270 | echo "${ECHO_T}no" >&6 | ||
4271 | fi | ||
4272 | |||
4273 | OBJDUMP=$ac_ct_OBJDUMP | ||
4274 | else | ||
4275 | OBJDUMP="$ac_cv_prog_OBJDUMP" | ||
4276 | fi | ||
4277 | |||
4278 | ;; | ||
4279 | |||
4280 | esac | ||
4281 | |||
4282 | need_locks="$enable_libtool_lock" | ||
4283 | |||
4284 | |||
4285 | ac_ext=c | ||
4286 | ac_cpp='$CPP $CPPFLAGS' | ||
4287 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
4288 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
4289 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
4290 | echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 | ||
4291 | echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 | ||
4292 | # On Suns, sometimes $CPP names a directory. | ||
4293 | if test -n "$CPP" && test -d "$CPP"; then | ||
4294 | CPP= | ||
4295 | fi | ||
4296 | if test -z "$CPP"; then | ||
4297 | if test "${ac_cv_prog_CPP+set}" = set; then | ||
4298 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4299 | else | ||
4300 | # Double quotes because CPP needs to be expanded | ||
4301 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" | ||
4302 | do | ||
4303 | ac_preproc_ok=false | ||
4304 | for ac_c_preproc_warn_flag in '' yes | ||
4305 | do | ||
4306 | # Use a header file that comes with gcc, so configuring glibc | ||
4307 | # with a fresh cross-compiler works. | ||
4308 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
4309 | # <limits.h> exists even on freestanding compilers. | ||
4310 | # On the NeXT, cc -E runs the code through the compiler's parser, | ||
4311 | # not just through cpp. "Syntax error" is here to catch this case. | ||
4312 | cat >conftest.$ac_ext <<_ACEOF | ||
4313 | /* confdefs.h. */ | ||
4314 | _ACEOF | ||
4315 | cat confdefs.h >>conftest.$ac_ext | ||
4316 | cat >>conftest.$ac_ext <<_ACEOF | ||
4317 | /* end confdefs.h. */ | ||
4318 | #ifdef __STDC__ | ||
4319 | # include <limits.h> | ||
4320 | #else | ||
4321 | # include <assert.h> | ||
4322 | #endif | ||
4323 | Syntax error | ||
4324 | _ACEOF | ||
4325 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
4326 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
4327 | ac_status=$? | ||
4328 | grep -v '^ *+' conftest.er1 >conftest.err | ||
4329 | rm -f conftest.er1 | ||
4330 | cat conftest.err >&5 | ||
4331 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4332 | (exit $ac_status); } >/dev/null; then | ||
4333 | if test -s conftest.err; then | ||
4334 | ac_cpp_err=$ac_c_preproc_warn_flag | ||
4335 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | ||
4336 | else | ||
4337 | ac_cpp_err= | ||
4338 | fi | ||
4339 | else | ||
4340 | ac_cpp_err=yes | ||
4341 | fi | ||
4342 | if test -z "$ac_cpp_err"; then | ||
4343 | : | ||
4344 | else | ||
4345 | echo "$as_me: failed program was:" >&5 | ||
4346 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
4347 | |||
4348 | # Broken: fails on valid input. | ||
4349 | continue | ||
4350 | fi | ||
4351 | rm -f conftest.err conftest.$ac_ext | ||
4352 | |||
4353 | # OK, works on sane cases. Now check whether non-existent headers | ||
4354 | # can be detected and how. | ||
4355 | cat >conftest.$ac_ext <<_ACEOF | ||
4356 | /* confdefs.h. */ | ||
4357 | _ACEOF | ||
4358 | cat confdefs.h >>conftest.$ac_ext | ||
4359 | cat >>conftest.$ac_ext <<_ACEOF | ||
4360 | /* end confdefs.h. */ | ||
4361 | #include <ac_nonexistent.h> | ||
4362 | _ACEOF | ||
4363 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
4364 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
4365 | ac_status=$? | ||
4366 | grep -v '^ *+' conftest.er1 >conftest.err | ||
4367 | rm -f conftest.er1 | ||
4368 | cat conftest.err >&5 | ||
4369 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4370 | (exit $ac_status); } >/dev/null; then | ||
4371 | if test -s conftest.err; then | ||
4372 | ac_cpp_err=$ac_c_preproc_warn_flag | ||
4373 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | ||
4374 | else | ||
4375 | ac_cpp_err= | ||
4376 | fi | ||
4377 | else | ||
4378 | ac_cpp_err=yes | ||
4379 | fi | ||
4380 | if test -z "$ac_cpp_err"; then | ||
4381 | # Broken: success on invalid input. | ||
4382 | continue | ||
4383 | else | ||
4384 | echo "$as_me: failed program was:" >&5 | ||
4385 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
4386 | |||
4387 | # Passes both tests. | ||
4388 | ac_preproc_ok=: | ||
4389 | break | ||
4390 | fi | ||
4391 | rm -f conftest.err conftest.$ac_ext | ||
4392 | |||
4393 | done | ||
4394 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | ||
4395 | rm -f conftest.err conftest.$ac_ext | ||
4396 | if $ac_preproc_ok; then | ||
4397 | break | ||
4398 | fi | ||
4399 | |||
4400 | done | ||
4401 | ac_cv_prog_CPP=$CPP | ||
4402 | |||
4403 | fi | ||
4404 | CPP=$ac_cv_prog_CPP | ||
4405 | else | ||
4406 | ac_cv_prog_CPP=$CPP | ||
4407 | fi | ||
4408 | echo "$as_me:$LINENO: result: $CPP" >&5 | ||
4409 | echo "${ECHO_T}$CPP" >&6 | ||
4410 | ac_preproc_ok=false | ||
4411 | for ac_c_preproc_warn_flag in '' yes | ||
4412 | do | ||
4413 | # Use a header file that comes with gcc, so configuring glibc | ||
4414 | # with a fresh cross-compiler works. | ||
4415 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
4416 | # <limits.h> exists even on freestanding compilers. | ||
4417 | # On the NeXT, cc -E runs the code through the compiler's parser, | ||
4418 | # not just through cpp. "Syntax error" is here to catch this case. | ||
4419 | cat >conftest.$ac_ext <<_ACEOF | ||
4420 | /* confdefs.h. */ | ||
4421 | _ACEOF | ||
4422 | cat confdefs.h >>conftest.$ac_ext | ||
4423 | cat >>conftest.$ac_ext <<_ACEOF | ||
4424 | /* end confdefs.h. */ | ||
4425 | #ifdef __STDC__ | ||
4426 | # include <limits.h> | ||
4427 | #else | ||
4428 | # include <assert.h> | ||
4429 | #endif | ||
4430 | Syntax error | ||
4431 | _ACEOF | ||
4432 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
4433 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
4434 | ac_status=$? | ||
4435 | grep -v '^ *+' conftest.er1 >conftest.err | ||
4436 | rm -f conftest.er1 | ||
4437 | cat conftest.err >&5 | ||
4438 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4439 | (exit $ac_status); } >/dev/null; then | ||
4440 | if test -s conftest.err; then | ||
4441 | ac_cpp_err=$ac_c_preproc_warn_flag | ||
4442 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | ||
4443 | else | ||
4444 | ac_cpp_err= | ||
4445 | fi | ||
4446 | else | ||
4447 | ac_cpp_err=yes | ||
4448 | fi | ||
4449 | if test -z "$ac_cpp_err"; then | ||
4450 | : | ||
4451 | else | ||
4452 | echo "$as_me: failed program was:" >&5 | ||
4453 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
4454 | |||
4455 | # Broken: fails on valid input. | ||
4456 | continue | ||
4457 | fi | ||
4458 | rm -f conftest.err conftest.$ac_ext | ||
4459 | |||
4460 | # OK, works on sane cases. Now check whether non-existent headers | ||
4461 | # can be detected and how. | ||
4462 | cat >conftest.$ac_ext <<_ACEOF | ||
4463 | /* confdefs.h. */ | ||
4464 | _ACEOF | ||
4465 | cat confdefs.h >>conftest.$ac_ext | ||
4466 | cat >>conftest.$ac_ext <<_ACEOF | ||
4467 | /* end confdefs.h. */ | ||
4468 | #include <ac_nonexistent.h> | ||
4469 | _ACEOF | ||
4470 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
4471 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
4472 | ac_status=$? | ||
4473 | grep -v '^ *+' conftest.er1 >conftest.err | ||
4474 | rm -f conftest.er1 | ||
4475 | cat conftest.err >&5 | ||
4476 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4477 | (exit $ac_status); } >/dev/null; then | ||
4478 | if test -s conftest.err; then | ||
4479 | ac_cpp_err=$ac_c_preproc_warn_flag | ||
4480 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | ||
4481 | else | ||
4482 | ac_cpp_err= | ||
4483 | fi | ||
4484 | else | ||
4485 | ac_cpp_err=yes | ||
4486 | fi | ||
4487 | if test -z "$ac_cpp_err"; then | ||
4488 | # Broken: success on invalid input. | ||
4489 | continue | ||
4490 | else | ||
4491 | echo "$as_me: failed program was:" >&5 | ||
4492 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
4493 | |||
4494 | # Passes both tests. | ||
4495 | ac_preproc_ok=: | ||
4496 | break | ||
4497 | fi | ||
4498 | rm -f conftest.err conftest.$ac_ext | ||
4499 | |||
4500 | done | ||
4501 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | ||
4502 | rm -f conftest.err conftest.$ac_ext | ||
4503 | if $ac_preproc_ok; then | ||
4504 | : | ||
4505 | else | ||
4506 | { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check | ||
4507 | See \`config.log' for more details." >&5 | ||
4508 | echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check | ||
4509 | See \`config.log' for more details." >&2;} | ||
4510 | { (exit 1); exit 1; }; } | ||
4511 | fi | ||
4512 | |||
4513 | ac_ext=c | ||
4514 | ac_cpp='$CPP $CPPFLAGS' | ||
4515 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
4516 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
4517 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
4518 | |||
4519 | |||
4520 | echo "$as_me:$LINENO: checking for ANSI C header files" >&5 | ||
4521 | echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 | ||
4522 | if test "${ac_cv_header_stdc+set}" = set; then | ||
4523 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4524 | else | ||
4525 | cat >conftest.$ac_ext <<_ACEOF | ||
4526 | /* confdefs.h. */ | ||
4527 | _ACEOF | ||
4528 | cat confdefs.h >>conftest.$ac_ext | ||
4529 | cat >>conftest.$ac_ext <<_ACEOF | ||
4530 | /* end confdefs.h. */ | ||
4531 | #include <stdlib.h> | ||
4532 | #include <stdarg.h> | ||
4533 | #include <string.h> | ||
4534 | #include <float.h> | ||
4535 | |||
4536 | int | ||
4537 | main () | ||
4538 | { | ||
4539 | |||
4540 | ; | ||
4541 | return 0; | ||
4542 | } | ||
4543 | _ACEOF | ||
4544 | rm -f conftest.$ac_objext | ||
4545 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
4546 | (eval $ac_compile) 2>conftest.er1 | ||
4547 | ac_status=$? | ||
4548 | grep -v '^ *+' conftest.er1 >conftest.err | ||
4549 | rm -f conftest.er1 | ||
4550 | cat conftest.err >&5 | ||
4551 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4552 | (exit $ac_status); } && | ||
4553 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
4554 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
4555 | (eval $ac_try) 2>&5 | ||
4556 | ac_status=$? | ||
4557 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4558 | (exit $ac_status); }; } && | ||
4559 | { ac_try='test -s conftest.$ac_objext' | ||
4560 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
4561 | (eval $ac_try) 2>&5 | ||
4562 | ac_status=$? | ||
4563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4564 | (exit $ac_status); }; }; then | ||
4565 | ac_cv_header_stdc=yes | ||
4566 | else | ||
4567 | echo "$as_me: failed program was:" >&5 | ||
4568 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
4569 | |||
4570 | ac_cv_header_stdc=no | ||
4571 | fi | ||
4572 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
4573 | |||
4574 | if test $ac_cv_header_stdc = yes; then | ||
4575 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | ||
4576 | cat >conftest.$ac_ext <<_ACEOF | ||
4577 | /* confdefs.h. */ | ||
4578 | _ACEOF | ||
4579 | cat confdefs.h >>conftest.$ac_ext | ||
4580 | cat >>conftest.$ac_ext <<_ACEOF | ||
4581 | /* end confdefs.h. */ | ||
4582 | #include <string.h> | ||
4583 | |||
4584 | _ACEOF | ||
4585 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | ||
4586 | $EGREP "memchr" >/dev/null 2>&1; then | ||
4587 | : | ||
4588 | else | ||
4589 | ac_cv_header_stdc=no | ||
4590 | fi | ||
4591 | rm -f conftest* | ||
4592 | |||
4593 | fi | ||
4594 | |||
4595 | if test $ac_cv_header_stdc = yes; then | ||
4596 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | ||
4597 | cat >conftest.$ac_ext <<_ACEOF | ||
4598 | /* confdefs.h. */ | ||
4599 | _ACEOF | ||
4600 | cat confdefs.h >>conftest.$ac_ext | ||
4601 | cat >>conftest.$ac_ext <<_ACEOF | ||
4602 | /* end confdefs.h. */ | ||
4603 | #include <stdlib.h> | ||
4604 | |||
4605 | _ACEOF | ||
4606 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | ||
4607 | $EGREP "free" >/dev/null 2>&1; then | ||
4608 | : | ||
4609 | else | ||
4610 | ac_cv_header_stdc=no | ||
4611 | fi | ||
4612 | rm -f conftest* | ||
4613 | |||
4614 | fi | ||
4615 | |||
4616 | if test $ac_cv_header_stdc = yes; then | ||
4617 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | ||
4618 | if test "$cross_compiling" = yes; then | ||
4619 | : | ||
4620 | else | ||
4621 | cat >conftest.$ac_ext <<_ACEOF | ||
4622 | /* confdefs.h. */ | ||
4623 | _ACEOF | ||
4624 | cat confdefs.h >>conftest.$ac_ext | ||
4625 | cat >>conftest.$ac_ext <<_ACEOF | ||
4626 | /* end confdefs.h. */ | ||
4627 | #include <ctype.h> | ||
4628 | #if ((' ' & 0x0FF) == 0x020) | ||
4629 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | ||
4630 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | ||
4631 | #else | ||
4632 | # define ISLOWER(c) \ | ||
4633 | (('a' <= (c) && (c) <= 'i') \ | ||
4634 | || ('j' <= (c) && (c) <= 'r') \ | ||
4635 | || ('s' <= (c) && (c) <= 'z')) | ||
4636 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) | ||
4637 | #endif | ||
4638 | |||
4639 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | ||
4640 | int | ||
4641 | main () | ||
4642 | { | ||
4643 | int i; | ||
4644 | for (i = 0; i < 256; i++) | ||
4645 | if (XOR (islower (i), ISLOWER (i)) | ||
4646 | || toupper (i) != TOUPPER (i)) | ||
4647 | exit(2); | ||
4648 | exit (0); | ||
4649 | } | ||
4650 | _ACEOF | ||
4651 | rm -f conftest$ac_exeext | ||
4652 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
4653 | (eval $ac_link) 2>&5 | ||
4654 | ac_status=$? | ||
4655 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4656 | (exit $ac_status); } && { ac_try='./conftest$ac_exeext' | ||
4657 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
4658 | (eval $ac_try) 2>&5 | ||
4659 | ac_status=$? | ||
4660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4661 | (exit $ac_status); }; }; then | ||
4662 | : | ||
4663 | else | ||
4664 | echo "$as_me: program exited with status $ac_status" >&5 | ||
4665 | echo "$as_me: failed program was:" >&5 | ||
4666 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
4667 | |||
4668 | ( exit $ac_status ) | ||
4669 | ac_cv_header_stdc=no | ||
4670 | fi | ||
4671 | rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext | ||
4672 | fi | ||
4673 | fi | ||
4674 | fi | ||
4675 | echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 | ||
4676 | echo "${ECHO_T}$ac_cv_header_stdc" >&6 | ||
4677 | if test $ac_cv_header_stdc = yes; then | ||
4678 | |||
4679 | cat >>confdefs.h <<\_ACEOF | ||
4680 | #define STDC_HEADERS 1 | ||
4681 | _ACEOF | ||
4682 | |||
4683 | fi | ||
4684 | |||
4685 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. | ||
4686 | |||
4687 | |||
4688 | |||
4689 | |||
4690 | |||
4691 | |||
4692 | |||
4693 | |||
4694 | |||
4695 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ | ||
4696 | inttypes.h stdint.h unistd.h | ||
4697 | do | ||
4698 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | ||
4699 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
4700 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
4701 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
4702 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4703 | else | ||
4704 | cat >conftest.$ac_ext <<_ACEOF | ||
4705 | /* confdefs.h. */ | ||
4706 | _ACEOF | ||
4707 | cat confdefs.h >>conftest.$ac_ext | ||
4708 | cat >>conftest.$ac_ext <<_ACEOF | ||
4709 | /* end confdefs.h. */ | ||
4710 | $ac_includes_default | ||
4711 | |||
4712 | #include <$ac_header> | ||
4713 | _ACEOF | ||
4714 | rm -f conftest.$ac_objext | ||
4715 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
4716 | (eval $ac_compile) 2>conftest.er1 | ||
4717 | ac_status=$? | ||
4718 | grep -v '^ *+' conftest.er1 >conftest.err | ||
4719 | rm -f conftest.er1 | ||
4720 | cat conftest.err >&5 | ||
4721 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4722 | (exit $ac_status); } && | ||
4723 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
4724 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
4725 | (eval $ac_try) 2>&5 | ||
4726 | ac_status=$? | ||
4727 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4728 | (exit $ac_status); }; } && | ||
4729 | { ac_try='test -s conftest.$ac_objext' | ||
4730 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
4731 | (eval $ac_try) 2>&5 | ||
4732 | ac_status=$? | ||
4733 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4734 | (exit $ac_status); }; }; then | ||
4735 | eval "$as_ac_Header=yes" | ||
4736 | else | ||
4737 | echo "$as_me: failed program was:" >&5 | ||
4738 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
4739 | |||
4740 | eval "$as_ac_Header=no" | ||
4741 | fi | ||
4742 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
4743 | fi | ||
4744 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
4745 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
4746 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | ||
4747 | cat >>confdefs.h <<_ACEOF | ||
4748 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | ||
4749 | _ACEOF | ||
4750 | |||
4751 | fi | ||
4752 | |||
4753 | done | ||
4754 | |||
4755 | |||
4756 | |||
4757 | for ac_header in dlfcn.h | ||
4758 | do | ||
4759 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | ||
4760 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
4761 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
4762 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
4763 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
4764 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4765 | fi | ||
4766 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
4767 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
4768 | else | ||
4769 | # Is the header compilable? | ||
4770 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | ||
4771 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | ||
4772 | cat >conftest.$ac_ext <<_ACEOF | ||
4773 | /* confdefs.h. */ | ||
4774 | _ACEOF | ||
4775 | cat confdefs.h >>conftest.$ac_ext | ||
4776 | cat >>conftest.$ac_ext <<_ACEOF | ||
4777 | /* end confdefs.h. */ | ||
4778 | $ac_includes_default | ||
4779 | #include <$ac_header> | ||
4780 | _ACEOF | ||
4781 | rm -f conftest.$ac_objext | ||
4782 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
4783 | (eval $ac_compile) 2>conftest.er1 | ||
4784 | ac_status=$? | ||
4785 | grep -v '^ *+' conftest.er1 >conftest.err | ||
4786 | rm -f conftest.er1 | ||
4787 | cat conftest.err >&5 | ||
4788 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4789 | (exit $ac_status); } && | ||
4790 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
4791 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
4792 | (eval $ac_try) 2>&5 | ||
4793 | ac_status=$? | ||
4794 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4795 | (exit $ac_status); }; } && | ||
4796 | { ac_try='test -s conftest.$ac_objext' | ||
4797 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
4798 | (eval $ac_try) 2>&5 | ||
4799 | ac_status=$? | ||
4800 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4801 | (exit $ac_status); }; }; then | ||
4802 | ac_header_compiler=yes | ||
4803 | else | ||
4804 | echo "$as_me: failed program was:" >&5 | ||
4805 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
4806 | |||
4807 | ac_header_compiler=no | ||
4808 | fi | ||
4809 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
4810 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | ||
4811 | echo "${ECHO_T}$ac_header_compiler" >&6 | ||
4812 | |||
4813 | # Is the header present? | ||
4814 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | ||
4815 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | ||
4816 | cat >conftest.$ac_ext <<_ACEOF | ||
4817 | /* confdefs.h. */ | ||
4818 | _ACEOF | ||
4819 | cat confdefs.h >>conftest.$ac_ext | ||
4820 | cat >>conftest.$ac_ext <<_ACEOF | ||
4821 | /* end confdefs.h. */ | ||
4822 | #include <$ac_header> | ||
4823 | _ACEOF | ||
4824 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
4825 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
4826 | ac_status=$? | ||
4827 | grep -v '^ *+' conftest.er1 >conftest.err | ||
4828 | rm -f conftest.er1 | ||
4829 | cat conftest.err >&5 | ||
4830 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
4831 | (exit $ac_status); } >/dev/null; then | ||
4832 | if test -s conftest.err; then | ||
4833 | ac_cpp_err=$ac_c_preproc_warn_flag | ||
4834 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | ||
4835 | else | ||
4836 | ac_cpp_err= | ||
4837 | fi | ||
4838 | else | ||
4839 | ac_cpp_err=yes | ||
4840 | fi | ||
4841 | if test -z "$ac_cpp_err"; then | ||
4842 | ac_header_preproc=yes | ||
4843 | else | ||
4844 | echo "$as_me: failed program was:" >&5 | ||
4845 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
4846 | |||
4847 | ac_header_preproc=no | ||
4848 | fi | ||
4849 | rm -f conftest.err conftest.$ac_ext | ||
4850 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | ||
4851 | echo "${ECHO_T}$ac_header_preproc" >&6 | ||
4852 | |||
4853 | # So? What about this header? | ||
4854 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | ||
4855 | yes:no: ) | ||
4856 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | ||
4857 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | ||
4858 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | ||
4859 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | ||
4860 | ac_header_preproc=yes | ||
4861 | ;; | ||
4862 | no:yes:* ) | ||
4863 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | ||
4864 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | ||
4865 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | ||
4866 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | ||
4867 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | ||
4868 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | ||
4869 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | ||
4870 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | ||
4871 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | ||
4872 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | ||
4873 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | ||
4874 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | ||
4875 | ( | ||
4876 | cat <<\_ASBOX | ||
4877 | ## ---------------------------------- ## | ||
4878 | ## Report this to bug-libtool@gnu.org ## | ||
4879 | ## ---------------------------------- ## | ||
4880 | _ASBOX | ||
4881 | ) | | ||
4882 | sed "s/^/$as_me: WARNING: /" >&2 | ||
4883 | ;; | ||
4884 | esac | ||
4885 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
4886 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
4887 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
4888 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4889 | else | ||
4890 | eval "$as_ac_Header=\$ac_header_preproc" | ||
4891 | fi | ||
4892 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
4893 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
4894 | |||
4895 | fi | ||
4896 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | ||
4897 | cat >>confdefs.h <<_ACEOF | ||
4898 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | ||
4899 | _ACEOF | ||
4900 | |||
4901 | fi | ||
4902 | |||
4903 | done | ||
4904 | |||
4905 | ac_ext=cc | ||
4906 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
4907 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
4908 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
4909 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | ||
4910 | if test -n "$ac_tool_prefix"; then | ||
4911 | for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC | ||
4912 | do | ||
4913 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | ||
4914 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | ||
4915 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
4916 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
4917 | if test "${ac_cv_prog_CXX+set}" = set; then | ||
4918 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4919 | else | ||
4920 | if test -n "$CXX"; then | ||
4921 | ac_cv_prog_CXX="$CXX" # Let the user override the test. | ||
4922 | else | ||
4923 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
4924 | for as_dir in $PATH | ||
4925 | do | ||
4926 | IFS=$as_save_IFS | ||
4927 | test -z "$as_dir" && as_dir=. | ||
4928 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
4929 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
4930 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" | ||
4931 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
4932 | break 2 | ||
4933 | fi | ||
4934 | done | ||
4935 | done | ||
4936 | |||
4937 | fi | ||
4938 | fi | ||
4939 | CXX=$ac_cv_prog_CXX | ||
4940 | if test -n "$CXX"; then | ||
4941 | echo "$as_me:$LINENO: result: $CXX" >&5 | ||
4942 | echo "${ECHO_T}$CXX" >&6 | ||
4943 | else | ||
4944 | echo "$as_me:$LINENO: result: no" >&5 | ||
4945 | echo "${ECHO_T}no" >&6 | ||
4946 | fi | ||
4947 | |||
4948 | test -n "$CXX" && break | ||
4949 | done | ||
4950 | fi | ||
4951 | if test -z "$CXX"; then | ||
4952 | ac_ct_CXX=$CXX | ||
4953 | for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC | ||
4954 | do | ||
4955 | # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
4956 | set dummy $ac_prog; ac_word=$2 | ||
4957 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
4958 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
4959 | if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then | ||
4960 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
4961 | else | ||
4962 | if test -n "$ac_ct_CXX"; then | ||
4963 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. | ||
4964 | else | ||
4965 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
4966 | for as_dir in $PATH | ||
4967 | do | ||
4968 | IFS=$as_save_IFS | ||
4969 | test -z "$as_dir" && as_dir=. | ||
4970 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
4971 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
4972 | ac_cv_prog_ac_ct_CXX="$ac_prog" | ||
4973 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
4974 | break 2 | ||
4975 | fi | ||
4976 | done | ||
4977 | done | ||
4978 | |||
4979 | fi | ||
4980 | fi | ||
4981 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX | ||
4982 | if test -n "$ac_ct_CXX"; then | ||
4983 | echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 | ||
4984 | echo "${ECHO_T}$ac_ct_CXX" >&6 | ||
4985 | else | ||
4986 | echo "$as_me:$LINENO: result: no" >&5 | ||
4987 | echo "${ECHO_T}no" >&6 | ||
4988 | fi | ||
4989 | |||
4990 | test -n "$ac_ct_CXX" && break | ||
4991 | done | ||
4992 | test -n "$ac_ct_CXX" || ac_ct_CXX="g++" | ||
4993 | |||
4994 | CXX=$ac_ct_CXX | ||
4995 | fi | ||
4996 | |||
4997 | |||
4998 | # Provide some information about the compiler. | ||
4999 | echo "$as_me:$LINENO:" \ | ||
5000 | "checking for C++ compiler version" >&5 | ||
5001 | ac_compiler=`set X $ac_compile; echo $2` | ||
5002 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | ||
5003 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | ||
5004 | ac_status=$? | ||
5005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5006 | (exit $ac_status); } | ||
5007 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | ||
5008 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | ||
5009 | ac_status=$? | ||
5010 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5011 | (exit $ac_status); } | ||
5012 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | ||
5013 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | ||
5014 | ac_status=$? | ||
5015 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5016 | (exit $ac_status); } | ||
5017 | |||
5018 | echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 | ||
5019 | echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 | ||
5020 | if test "${ac_cv_cxx_compiler_gnu+set}" = set; then | ||
5021 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
5022 | else | ||
5023 | cat >conftest.$ac_ext <<_ACEOF | ||
5024 | /* confdefs.h. */ | ||
5025 | _ACEOF | ||
5026 | cat confdefs.h >>conftest.$ac_ext | ||
5027 | cat >>conftest.$ac_ext <<_ACEOF | ||
5028 | /* end confdefs.h. */ | ||
5029 | |||
5030 | int | ||
5031 | main () | ||
5032 | { | ||
5033 | #ifndef __GNUC__ | ||
5034 | choke me | ||
5035 | #endif | ||
5036 | |||
5037 | ; | ||
5038 | return 0; | ||
5039 | } | ||
5040 | _ACEOF | ||
5041 | rm -f conftest.$ac_objext | ||
5042 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
5043 | (eval $ac_compile) 2>conftest.er1 | ||
5044 | ac_status=$? | ||
5045 | grep -v '^ *+' conftest.er1 >conftest.err | ||
5046 | rm -f conftest.er1 | ||
5047 | cat conftest.err >&5 | ||
5048 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5049 | (exit $ac_status); } && | ||
5050 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
5051 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5052 | (eval $ac_try) 2>&5 | ||
5053 | ac_status=$? | ||
5054 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5055 | (exit $ac_status); }; } && | ||
5056 | { ac_try='test -s conftest.$ac_objext' | ||
5057 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5058 | (eval $ac_try) 2>&5 | ||
5059 | ac_status=$? | ||
5060 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5061 | (exit $ac_status); }; }; then | ||
5062 | ac_compiler_gnu=yes | ||
5063 | else | ||
5064 | echo "$as_me: failed program was:" >&5 | ||
5065 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
5066 | |||
5067 | ac_compiler_gnu=no | ||
5068 | fi | ||
5069 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
5070 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu | ||
5071 | |||
5072 | fi | ||
5073 | echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 | ||
5074 | echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 | ||
5075 | GXX=`test $ac_compiler_gnu = yes && echo yes` | ||
5076 | ac_test_CXXFLAGS=${CXXFLAGS+set} | ||
5077 | ac_save_CXXFLAGS=$CXXFLAGS | ||
5078 | CXXFLAGS="-g" | ||
5079 | echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 | ||
5080 | echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 | ||
5081 | if test "${ac_cv_prog_cxx_g+set}" = set; then | ||
5082 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
5083 | else | ||
5084 | cat >conftest.$ac_ext <<_ACEOF | ||
5085 | /* confdefs.h. */ | ||
5086 | _ACEOF | ||
5087 | cat confdefs.h >>conftest.$ac_ext | ||
5088 | cat >>conftest.$ac_ext <<_ACEOF | ||
5089 | /* end confdefs.h. */ | ||
5090 | |||
5091 | int | ||
5092 | main () | ||
5093 | { | ||
5094 | |||
5095 | ; | ||
5096 | return 0; | ||
5097 | } | ||
5098 | _ACEOF | ||
5099 | rm -f conftest.$ac_objext | ||
5100 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
5101 | (eval $ac_compile) 2>conftest.er1 | ||
5102 | ac_status=$? | ||
5103 | grep -v '^ *+' conftest.er1 >conftest.err | ||
5104 | rm -f conftest.er1 | ||
5105 | cat conftest.err >&5 | ||
5106 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5107 | (exit $ac_status); } && | ||
5108 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
5109 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5110 | (eval $ac_try) 2>&5 | ||
5111 | ac_status=$? | ||
5112 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5113 | (exit $ac_status); }; } && | ||
5114 | { ac_try='test -s conftest.$ac_objext' | ||
5115 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5116 | (eval $ac_try) 2>&5 | ||
5117 | ac_status=$? | ||
5118 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5119 | (exit $ac_status); }; }; then | ||
5120 | ac_cv_prog_cxx_g=yes | ||
5121 | else | ||
5122 | echo "$as_me: failed program was:" >&5 | ||
5123 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
5124 | |||
5125 | ac_cv_prog_cxx_g=no | ||
5126 | fi | ||
5127 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
5128 | fi | ||
5129 | echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 | ||
5130 | echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 | ||
5131 | if test "$ac_test_CXXFLAGS" = set; then | ||
5132 | CXXFLAGS=$ac_save_CXXFLAGS | ||
5133 | elif test $ac_cv_prog_cxx_g = yes; then | ||
5134 | if test "$GXX" = yes; then | ||
5135 | CXXFLAGS="-g -O2" | ||
5136 | else | ||
5137 | CXXFLAGS="-g" | ||
5138 | fi | ||
5139 | else | ||
5140 | if test "$GXX" = yes; then | ||
5141 | CXXFLAGS="-O2" | ||
5142 | else | ||
5143 | CXXFLAGS= | ||
5144 | fi | ||
5145 | fi | ||
5146 | for ac_declaration in \ | ||
5147 | '' \ | ||
5148 | 'extern "C" void std::exit (int) throw (); using std::exit;' \ | ||
5149 | 'extern "C" void std::exit (int); using std::exit;' \ | ||
5150 | 'extern "C" void exit (int) throw ();' \ | ||
5151 | 'extern "C" void exit (int);' \ | ||
5152 | 'void exit (int);' | ||
5153 | do | ||
5154 | cat >conftest.$ac_ext <<_ACEOF | ||
5155 | /* confdefs.h. */ | ||
5156 | _ACEOF | ||
5157 | cat confdefs.h >>conftest.$ac_ext | ||
5158 | cat >>conftest.$ac_ext <<_ACEOF | ||
5159 | /* end confdefs.h. */ | ||
5160 | $ac_declaration | ||
5161 | #include <stdlib.h> | ||
5162 | int | ||
5163 | main () | ||
5164 | { | ||
5165 | exit (42); | ||
5166 | ; | ||
5167 | return 0; | ||
5168 | } | ||
5169 | _ACEOF | ||
5170 | rm -f conftest.$ac_objext | ||
5171 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
5172 | (eval $ac_compile) 2>conftest.er1 | ||
5173 | ac_status=$? | ||
5174 | grep -v '^ *+' conftest.er1 >conftest.err | ||
5175 | rm -f conftest.er1 | ||
5176 | cat conftest.err >&5 | ||
5177 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5178 | (exit $ac_status); } && | ||
5179 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
5180 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5181 | (eval $ac_try) 2>&5 | ||
5182 | ac_status=$? | ||
5183 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5184 | (exit $ac_status); }; } && | ||
5185 | { ac_try='test -s conftest.$ac_objext' | ||
5186 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5187 | (eval $ac_try) 2>&5 | ||
5188 | ac_status=$? | ||
5189 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5190 | (exit $ac_status); }; }; then | ||
5191 | : | ||
5192 | else | ||
5193 | echo "$as_me: failed program was:" >&5 | ||
5194 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
5195 | |||
5196 | continue | ||
5197 | fi | ||
5198 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
5199 | cat >conftest.$ac_ext <<_ACEOF | ||
5200 | /* confdefs.h. */ | ||
5201 | _ACEOF | ||
5202 | cat confdefs.h >>conftest.$ac_ext | ||
5203 | cat >>conftest.$ac_ext <<_ACEOF | ||
5204 | /* end confdefs.h. */ | ||
5205 | $ac_declaration | ||
5206 | int | ||
5207 | main () | ||
5208 | { | ||
5209 | exit (42); | ||
5210 | ; | ||
5211 | return 0; | ||
5212 | } | ||
5213 | _ACEOF | ||
5214 | rm -f conftest.$ac_objext | ||
5215 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
5216 | (eval $ac_compile) 2>conftest.er1 | ||
5217 | ac_status=$? | ||
5218 | grep -v '^ *+' conftest.er1 >conftest.err | ||
5219 | rm -f conftest.er1 | ||
5220 | cat conftest.err >&5 | ||
5221 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5222 | (exit $ac_status); } && | ||
5223 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
5224 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5225 | (eval $ac_try) 2>&5 | ||
5226 | ac_status=$? | ||
5227 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5228 | (exit $ac_status); }; } && | ||
5229 | { ac_try='test -s conftest.$ac_objext' | ||
5230 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5231 | (eval $ac_try) 2>&5 | ||
5232 | ac_status=$? | ||
5233 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5234 | (exit $ac_status); }; }; then | ||
5235 | break | ||
5236 | else | ||
5237 | echo "$as_me: failed program was:" >&5 | ||
5238 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
5239 | |||
5240 | fi | ||
5241 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
5242 | done | ||
5243 | rm -f conftest* | ||
5244 | if test -n "$ac_declaration"; then | ||
5245 | echo '#ifdef __cplusplus' >>confdefs.h | ||
5246 | echo $ac_declaration >>confdefs.h | ||
5247 | echo '#endif' >>confdefs.h | ||
5248 | fi | ||
5249 | |||
5250 | ac_ext=cc | ||
5251 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
5252 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
5253 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
5254 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | ||
5255 | |||
5256 | depcc="$CXX" am_compiler_list= | ||
5257 | |||
5258 | echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 | ||
5259 | echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 | ||
5260 | if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then | ||
5261 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
5262 | else | ||
5263 | if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then | ||
5264 | # We make a subdir and do the tests there. Otherwise we can end up | ||
5265 | # making bogus files that we don't know about and never remove. For | ||
5266 | # instance it was reported that on HP-UX the gcc test will end up | ||
5267 | # making a dummy file named `D' -- because `-MD' means `put the output | ||
5268 | # in D'. | ||
5269 | mkdir conftest.dir | ||
5270 | # Copy depcomp to subdir because otherwise we won't find it if we're | ||
5271 | # using a relative directory. | ||
5272 | cp "$am_depcomp" conftest.dir | ||
5273 | cd conftest.dir | ||
5274 | # We will build objects and dependencies in a subdirectory because | ||
5275 | # it helps to detect inapplicable dependency modes. For instance | ||
5276 | # both Tru64's cc and ICC support -MD to output dependencies as a | ||
5277 | # side effect of compilation, but ICC will put the dependencies in | ||
5278 | # the current directory while Tru64 will put them in the object | ||
5279 | # directory. | ||
5280 | mkdir sub | ||
5281 | |||
5282 | am_cv_CXX_dependencies_compiler_type=none | ||
5283 | if test "$am_compiler_list" = ""; then | ||
5284 | am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` | ||
5285 | fi | ||
5286 | for depmode in $am_compiler_list; do | ||
5287 | # Setup a source with many dependencies, because some compilers | ||
5288 | # like to wrap large dependency lists on column 80 (with \), and | ||
5289 | # we should not choose a depcomp mode which is confused by this. | ||
5290 | # | ||
5291 | # We need to recreate these files for each test, as the compiler may | ||
5292 | # overwrite some of them when testing with obscure command lines. | ||
5293 | # This happens at least with the AIX C compiler. | ||
5294 | : > sub/conftest.c | ||
5295 | for i in 1 2 3 4 5 6; do | ||
5296 | echo '#include "conftst'$i'.h"' >> sub/conftest.c | ||
5297 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with | ||
5298 | # Solaris 8's {/usr,}/bin/sh. | ||
5299 | touch sub/conftst$i.h | ||
5300 | done | ||
5301 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf | ||
5302 | |||
5303 | case $depmode in | ||
5304 | nosideeffect) | ||
5305 | # after this tag, mechanisms are not by side-effect, so they'll | ||
5306 | # only be used when explicitly requested | ||
5307 | if test "x$enable_dependency_tracking" = xyes; then | ||
5308 | continue | ||
5309 | else | ||
5310 | break | ||
5311 | fi | ||
5312 | ;; | ||
5313 | none) break ;; | ||
5314 | esac | ||
5315 | # We check with `-c' and `-o' for the sake of the "dashmstdout" | ||
5316 | # mode. It turns out that the SunPro C++ compiler does not properly | ||
5317 | # handle `-M -o', and we need to detect this. | ||
5318 | if depmode=$depmode \ | ||
5319 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ | ||
5320 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ | ||
5321 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ | ||
5322 | >/dev/null 2>conftest.err && | ||
5323 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && | ||
5324 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && | ||
5325 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then | ||
5326 | # icc doesn't choke on unknown options, it will just issue warnings | ||
5327 | # or remarks (even with -Werror). So we grep stderr for any message | ||
5328 | # that says an option was ignored or not supported. | ||
5329 | # When given -MP, icc 7.0 and 7.1 complain thusly: | ||
5330 | # icc: Command line warning: ignoring option '-M'; no argument required | ||
5331 | # The diagnosis changed in icc 8.0: | ||
5332 | # icc: Command line remark: option '-MP' not supported | ||
5333 | if (grep 'ignoring option' conftest.err || | ||
5334 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else | ||
5335 | am_cv_CXX_dependencies_compiler_type=$depmode | ||
5336 | break | ||
5337 | fi | ||
5338 | fi | ||
5339 | done | ||
5340 | |||
5341 | cd .. | ||
5342 | rm -rf conftest.dir | ||
5343 | else | ||
5344 | am_cv_CXX_dependencies_compiler_type=none | ||
5345 | fi | ||
5346 | |||
5347 | fi | ||
5348 | echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 | ||
5349 | echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 | ||
5350 | CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type | ||
5351 | |||
5352 | |||
5353 | |||
5354 | if | ||
5355 | test "x$enable_dependency_tracking" != xno \ | ||
5356 | && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then | ||
5357 | am__fastdepCXX_TRUE= | ||
5358 | am__fastdepCXX_FALSE='#' | ||
5359 | else | ||
5360 | am__fastdepCXX_TRUE='#' | ||
5361 | am__fastdepCXX_FALSE= | ||
5362 | fi | ||
5363 | |||
5364 | |||
5365 | ac_ext=cc | ||
5366 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
5367 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
5368 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
5369 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | ||
5370 | echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 | ||
5371 | echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 | ||
5372 | if test -z "$CXXCPP"; then | ||
5373 | if test "${ac_cv_prog_CXXCPP+set}" = set; then | ||
5374 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
5375 | else | ||
5376 | # Double quotes because CXXCPP needs to be expanded | ||
5377 | for CXXCPP in "$CXX -E" "/lib/cpp" | ||
5378 | do | ||
5379 | ac_preproc_ok=false | ||
5380 | for ac_cxx_preproc_warn_flag in '' yes | ||
5381 | do | ||
5382 | # Use a header file that comes with gcc, so configuring glibc | ||
5383 | # with a fresh cross-compiler works. | ||
5384 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
5385 | # <limits.h> exists even on freestanding compilers. | ||
5386 | # On the NeXT, cc -E runs the code through the compiler's parser, | ||
5387 | # not just through cpp. "Syntax error" is here to catch this case. | ||
5388 | cat >conftest.$ac_ext <<_ACEOF | ||
5389 | /* confdefs.h. */ | ||
5390 | _ACEOF | ||
5391 | cat confdefs.h >>conftest.$ac_ext | ||
5392 | cat >>conftest.$ac_ext <<_ACEOF | ||
5393 | /* end confdefs.h. */ | ||
5394 | #ifdef __STDC__ | ||
5395 | # include <limits.h> | ||
5396 | #else | ||
5397 | # include <assert.h> | ||
5398 | #endif | ||
5399 | Syntax error | ||
5400 | _ACEOF | ||
5401 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
5402 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
5403 | ac_status=$? | ||
5404 | grep -v '^ *+' conftest.er1 >conftest.err | ||
5405 | rm -f conftest.er1 | ||
5406 | cat conftest.err >&5 | ||
5407 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5408 | (exit $ac_status); } >/dev/null; then | ||
5409 | if test -s conftest.err; then | ||
5410 | ac_cpp_err=$ac_cxx_preproc_warn_flag | ||
5411 | ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag | ||
5412 | else | ||
5413 | ac_cpp_err= | ||
5414 | fi | ||
5415 | else | ||
5416 | ac_cpp_err=yes | ||
5417 | fi | ||
5418 | if test -z "$ac_cpp_err"; then | ||
5419 | : | ||
5420 | else | ||
5421 | echo "$as_me: failed program was:" >&5 | ||
5422 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
5423 | |||
5424 | # Broken: fails on valid input. | ||
5425 | continue | ||
5426 | fi | ||
5427 | rm -f conftest.err conftest.$ac_ext | ||
5428 | |||
5429 | # OK, works on sane cases. Now check whether non-existent headers | ||
5430 | # can be detected and how. | ||
5431 | cat >conftest.$ac_ext <<_ACEOF | ||
5432 | /* confdefs.h. */ | ||
5433 | _ACEOF | ||
5434 | cat confdefs.h >>conftest.$ac_ext | ||
5435 | cat >>conftest.$ac_ext <<_ACEOF | ||
5436 | /* end confdefs.h. */ | ||
5437 | #include <ac_nonexistent.h> | ||
5438 | _ACEOF | ||
5439 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
5440 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
5441 | ac_status=$? | ||
5442 | grep -v '^ *+' conftest.er1 >conftest.err | ||
5443 | rm -f conftest.er1 | ||
5444 | cat conftest.err >&5 | ||
5445 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5446 | (exit $ac_status); } >/dev/null; then | ||
5447 | if test -s conftest.err; then | ||
5448 | ac_cpp_err=$ac_cxx_preproc_warn_flag | ||
5449 | ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag | ||
5450 | else | ||
5451 | ac_cpp_err= | ||
5452 | fi | ||
5453 | else | ||
5454 | ac_cpp_err=yes | ||
5455 | fi | ||
5456 | if test -z "$ac_cpp_err"; then | ||
5457 | # Broken: success on invalid input. | ||
5458 | continue | ||
5459 | else | ||
5460 | echo "$as_me: failed program was:" >&5 | ||
5461 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
5462 | |||
5463 | # Passes both tests. | ||
5464 | ac_preproc_ok=: | ||
5465 | break | ||
5466 | fi | ||
5467 | rm -f conftest.err conftest.$ac_ext | ||
5468 | |||
5469 | done | ||
5470 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | ||
5471 | rm -f conftest.err conftest.$ac_ext | ||
5472 | if $ac_preproc_ok; then | ||
5473 | break | ||
5474 | fi | ||
5475 | |||
5476 | done | ||
5477 | ac_cv_prog_CXXCPP=$CXXCPP | ||
5478 | |||
5479 | fi | ||
5480 | CXXCPP=$ac_cv_prog_CXXCPP | ||
5481 | else | ||
5482 | ac_cv_prog_CXXCPP=$CXXCPP | ||
5483 | fi | ||
5484 | echo "$as_me:$LINENO: result: $CXXCPP" >&5 | ||
5485 | echo "${ECHO_T}$CXXCPP" >&6 | ||
5486 | ac_preproc_ok=false | ||
5487 | for ac_cxx_preproc_warn_flag in '' yes | ||
5488 | do | ||
5489 | # Use a header file that comes with gcc, so configuring glibc | ||
5490 | # with a fresh cross-compiler works. | ||
5491 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
5492 | # <limits.h> exists even on freestanding compilers. | ||
5493 | # On the NeXT, cc -E runs the code through the compiler's parser, | ||
5494 | # not just through cpp. "Syntax error" is here to catch this case. | ||
5495 | cat >conftest.$ac_ext <<_ACEOF | ||
5496 | /* confdefs.h. */ | ||
5497 | _ACEOF | ||
5498 | cat confdefs.h >>conftest.$ac_ext | ||
5499 | cat >>conftest.$ac_ext <<_ACEOF | ||
5500 | /* end confdefs.h. */ | ||
5501 | #ifdef __STDC__ | ||
5502 | # include <limits.h> | ||
5503 | #else | ||
5504 | # include <assert.h> | ||
5505 | #endif | ||
5506 | Syntax error | ||
5507 | _ACEOF | ||
5508 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
5509 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
5510 | ac_status=$? | ||
5511 | grep -v '^ *+' conftest.er1 >conftest.err | ||
5512 | rm -f conftest.er1 | ||
5513 | cat conftest.err >&5 | ||
5514 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5515 | (exit $ac_status); } >/dev/null; then | ||
5516 | if test -s conftest.err; then | ||
5517 | ac_cpp_err=$ac_cxx_preproc_warn_flag | ||
5518 | ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag | ||
5519 | else | ||
5520 | ac_cpp_err= | ||
5521 | fi | ||
5522 | else | ||
5523 | ac_cpp_err=yes | ||
5524 | fi | ||
5525 | if test -z "$ac_cpp_err"; then | ||
5526 | : | ||
5527 | else | ||
5528 | echo "$as_me: failed program was:" >&5 | ||
5529 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
5530 | |||
5531 | # Broken: fails on valid input. | ||
5532 | continue | ||
5533 | fi | ||
5534 | rm -f conftest.err conftest.$ac_ext | ||
5535 | |||
5536 | # OK, works on sane cases. Now check whether non-existent headers | ||
5537 | # can be detected and how. | ||
5538 | cat >conftest.$ac_ext <<_ACEOF | ||
5539 | /* confdefs.h. */ | ||
5540 | _ACEOF | ||
5541 | cat confdefs.h >>conftest.$ac_ext | ||
5542 | cat >>conftest.$ac_ext <<_ACEOF | ||
5543 | /* end confdefs.h. */ | ||
5544 | #include <ac_nonexistent.h> | ||
5545 | _ACEOF | ||
5546 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
5547 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
5548 | ac_status=$? | ||
5549 | grep -v '^ *+' conftest.er1 >conftest.err | ||
5550 | rm -f conftest.er1 | ||
5551 | cat conftest.err >&5 | ||
5552 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5553 | (exit $ac_status); } >/dev/null; then | ||
5554 | if test -s conftest.err; then | ||
5555 | ac_cpp_err=$ac_cxx_preproc_warn_flag | ||
5556 | ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag | ||
5557 | else | ||
5558 | ac_cpp_err= | ||
5559 | fi | ||
5560 | else | ||
5561 | ac_cpp_err=yes | ||
5562 | fi | ||
5563 | if test -z "$ac_cpp_err"; then | ||
5564 | # Broken: success on invalid input. | ||
5565 | continue | ||
5566 | else | ||
5567 | echo "$as_me: failed program was:" >&5 | ||
5568 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
5569 | |||
5570 | # Passes both tests. | ||
5571 | ac_preproc_ok=: | ||
5572 | break | ||
5573 | fi | ||
5574 | rm -f conftest.err conftest.$ac_ext | ||
5575 | |||
5576 | done | ||
5577 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. | ||
5578 | rm -f conftest.err conftest.$ac_ext | ||
5579 | if $ac_preproc_ok; then | ||
5580 | : | ||
5581 | else | ||
5582 | { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check | ||
5583 | See \`config.log' for more details." >&5 | ||
5584 | echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check | ||
5585 | See \`config.log' for more details." >&2;} | ||
5586 | { (exit 1); exit 1; }; } | ||
5587 | fi | ||
5588 | |||
5589 | ac_ext=cc | ||
5590 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
5591 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
5592 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
5593 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | ||
5594 | |||
5595 | |||
5596 | ac_ext=f | ||
5597 | ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' | ||
5598 | ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
5599 | ac_compiler_gnu=$ac_cv_f77_compiler_gnu | ||
5600 | if test -n "$ac_tool_prefix"; then | ||
5601 | for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran | ||
5602 | do | ||
5603 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | ||
5604 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | ||
5605 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
5606 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
5607 | if test "${ac_cv_prog_F77+set}" = set; then | ||
5608 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
5609 | else | ||
5610 | if test -n "$F77"; then | ||
5611 | ac_cv_prog_F77="$F77" # Let the user override the test. | ||
5612 | else | ||
5613 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
5614 | for as_dir in $PATH | ||
5615 | do | ||
5616 | IFS=$as_save_IFS | ||
5617 | test -z "$as_dir" && as_dir=. | ||
5618 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
5619 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
5620 | ac_cv_prog_F77="$ac_tool_prefix$ac_prog" | ||
5621 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
5622 | break 2 | ||
5623 | fi | ||
5624 | done | ||
5625 | done | ||
5626 | |||
5627 | fi | ||
5628 | fi | ||
5629 | F77=$ac_cv_prog_F77 | ||
5630 | if test -n "$F77"; then | ||
5631 | echo "$as_me:$LINENO: result: $F77" >&5 | ||
5632 | echo "${ECHO_T}$F77" >&6 | ||
5633 | else | ||
5634 | echo "$as_me:$LINENO: result: no" >&5 | ||
5635 | echo "${ECHO_T}no" >&6 | ||
5636 | fi | ||
5637 | |||
5638 | test -n "$F77" && break | ||
5639 | done | ||
5640 | fi | ||
5641 | if test -z "$F77"; then | ||
5642 | ac_ct_F77=$F77 | ||
5643 | for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran | ||
5644 | do | ||
5645 | # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
5646 | set dummy $ac_prog; ac_word=$2 | ||
5647 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
5648 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
5649 | if test "${ac_cv_prog_ac_ct_F77+set}" = set; then | ||
5650 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
5651 | else | ||
5652 | if test -n "$ac_ct_F77"; then | ||
5653 | ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. | ||
5654 | else | ||
5655 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
5656 | for as_dir in $PATH | ||
5657 | do | ||
5658 | IFS=$as_save_IFS | ||
5659 | test -z "$as_dir" && as_dir=. | ||
5660 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
5661 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
5662 | ac_cv_prog_ac_ct_F77="$ac_prog" | ||
5663 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
5664 | break 2 | ||
5665 | fi | ||
5666 | done | ||
5667 | done | ||
5668 | |||
5669 | fi | ||
5670 | fi | ||
5671 | ac_ct_F77=$ac_cv_prog_ac_ct_F77 | ||
5672 | if test -n "$ac_ct_F77"; then | ||
5673 | echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 | ||
5674 | echo "${ECHO_T}$ac_ct_F77" >&6 | ||
5675 | else | ||
5676 | echo "$as_me:$LINENO: result: no" >&5 | ||
5677 | echo "${ECHO_T}no" >&6 | ||
5678 | fi | ||
5679 | |||
5680 | test -n "$ac_ct_F77" && break | ||
5681 | done | ||
5682 | |||
5683 | F77=$ac_ct_F77 | ||
5684 | fi | ||
5685 | |||
5686 | |||
5687 | # Provide some information about the compiler. | ||
5688 | echo "$as_me:5688:" \ | ||
5689 | "checking for Fortran 77 compiler version" >&5 | ||
5690 | ac_compiler=`set X $ac_compile; echo $2` | ||
5691 | { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 | ||
5692 | (eval $ac_compiler --version </dev/null >&5) 2>&5 | ||
5693 | ac_status=$? | ||
5694 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5695 | (exit $ac_status); } | ||
5696 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 | ||
5697 | (eval $ac_compiler -v </dev/null >&5) 2>&5 | ||
5698 | ac_status=$? | ||
5699 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5700 | (exit $ac_status); } | ||
5701 | { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 | ||
5702 | (eval $ac_compiler -V </dev/null >&5) 2>&5 | ||
5703 | ac_status=$? | ||
5704 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5705 | (exit $ac_status); } | ||
5706 | rm -f a.out | ||
5707 | |||
5708 | # If we don't use `.F' as extension, the preprocessor is not run on the | ||
5709 | # input file. (Note that this only needs to work for GNU compilers.) | ||
5710 | ac_save_ext=$ac_ext | ||
5711 | ac_ext=F | ||
5712 | echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 | ||
5713 | echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 | ||
5714 | if test "${ac_cv_f77_compiler_gnu+set}" = set; then | ||
5715 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
5716 | else | ||
5717 | cat >conftest.$ac_ext <<_ACEOF | ||
5718 | program main | ||
5719 | #ifndef __GNUC__ | ||
5720 | choke me | ||
5721 | #endif | ||
5722 | |||
5723 | end | ||
5724 | _ACEOF | ||
5725 | rm -f conftest.$ac_objext | ||
5726 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
5727 | (eval $ac_compile) 2>conftest.er1 | ||
5728 | ac_status=$? | ||
5729 | grep -v '^ *+' conftest.er1 >conftest.err | ||
5730 | rm -f conftest.er1 | ||
5731 | cat conftest.err >&5 | ||
5732 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5733 | (exit $ac_status); } && | ||
5734 | { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' | ||
5735 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5736 | (eval $ac_try) 2>&5 | ||
5737 | ac_status=$? | ||
5738 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5739 | (exit $ac_status); }; } && | ||
5740 | { ac_try='test -s conftest.$ac_objext' | ||
5741 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5742 | (eval $ac_try) 2>&5 | ||
5743 | ac_status=$? | ||
5744 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5745 | (exit $ac_status); }; }; then | ||
5746 | ac_compiler_gnu=yes | ||
5747 | else | ||
5748 | echo "$as_me: failed program was:" >&5 | ||
5749 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
5750 | |||
5751 | ac_compiler_gnu=no | ||
5752 | fi | ||
5753 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
5754 | ac_cv_f77_compiler_gnu=$ac_compiler_gnu | ||
5755 | |||
5756 | fi | ||
5757 | echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 | ||
5758 | echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 | ||
5759 | ac_ext=$ac_save_ext | ||
5760 | ac_test_FFLAGS=${FFLAGS+set} | ||
5761 | ac_save_FFLAGS=$FFLAGS | ||
5762 | FFLAGS= | ||
5763 | echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 | ||
5764 | echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 | ||
5765 | if test "${ac_cv_prog_f77_g+set}" = set; then | ||
5766 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
5767 | else | ||
5768 | FFLAGS=-g | ||
5769 | cat >conftest.$ac_ext <<_ACEOF | ||
5770 | program main | ||
5771 | |||
5772 | end | ||
5773 | _ACEOF | ||
5774 | rm -f conftest.$ac_objext | ||
5775 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
5776 | (eval $ac_compile) 2>conftest.er1 | ||
5777 | ac_status=$? | ||
5778 | grep -v '^ *+' conftest.er1 >conftest.err | ||
5779 | rm -f conftest.er1 | ||
5780 | cat conftest.err >&5 | ||
5781 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5782 | (exit $ac_status); } && | ||
5783 | { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' | ||
5784 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5785 | (eval $ac_try) 2>&5 | ||
5786 | ac_status=$? | ||
5787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5788 | (exit $ac_status); }; } && | ||
5789 | { ac_try='test -s conftest.$ac_objext' | ||
5790 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
5791 | (eval $ac_try) 2>&5 | ||
5792 | ac_status=$? | ||
5793 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
5794 | (exit $ac_status); }; }; then | ||
5795 | ac_cv_prog_f77_g=yes | ||
5796 | else | ||
5797 | echo "$as_me: failed program was:" >&5 | ||
5798 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
5799 | |||
5800 | ac_cv_prog_f77_g=no | ||
5801 | fi | ||
5802 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
5803 | |||
5804 | fi | ||
5805 | echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 | ||
5806 | echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 | ||
5807 | if test "$ac_test_FFLAGS" = set; then | ||
5808 | FFLAGS=$ac_save_FFLAGS | ||
5809 | elif test $ac_cv_prog_f77_g = yes; then | ||
5810 | if test "x$ac_cv_f77_compiler_gnu" = xyes; then | ||
5811 | FFLAGS="-g -O2" | ||
5812 | else | ||
5813 | FFLAGS="-g" | ||
5814 | fi | ||
5815 | else | ||
5816 | if test "x$ac_cv_f77_compiler_gnu" = xyes; then | ||
5817 | FFLAGS="-O2" | ||
5818 | else | ||
5819 | FFLAGS= | ||
5820 | fi | ||
5821 | fi | ||
5822 | |||
5823 | G77=`test $ac_compiler_gnu = yes && echo yes` | ||
5824 | ac_ext=c | ||
5825 | ac_cpp='$CPP $CPPFLAGS' | ||
5826 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
5827 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
5828 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
5829 | |||
5830 | |||
5831 | |||
5832 | # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! | ||
5833 | |||
5834 | # find the maximum length of command line arguments | ||
5835 | echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 | ||
5836 | echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 | ||
5837 | if test "${lt_cv_sys_max_cmd_len+set}" = set; then | ||
5838 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
5839 | else | ||
5840 | i=0 | ||
5841 | teststring="ABCD" | ||
5842 | |||
5843 | case $build_os in | ||
5844 | msdosdjgpp*) | ||
5845 | # On DJGPP, this test can blow up pretty badly due to problems in libc | ||
5846 | # (any single argument exceeding 2000 bytes causes a buffer overrun | ||
5847 | # during glob expansion). Even if it were fixed, the result of this | ||
5848 | # check would be larger than it should be. | ||
5849 | lt_cv_sys_max_cmd_len=12288; # 12K is about right | ||
5850 | ;; | ||
5851 | |||
5852 | gnu*) | ||
5853 | # Under GNU Hurd, this test is not required because there is | ||
5854 | # no limit to the length of command line arguments. | ||
5855 | # Libtool will interpret -1 as no limit whatsoever | ||
5856 | lt_cv_sys_max_cmd_len=-1; | ||
5857 | ;; | ||
5858 | |||
5859 | cygwin* | mingw*) | ||
5860 | # On Win9x/ME, this test blows up -- it succeeds, but takes | ||
5861 | # about 5 minutes as the teststring grows exponentially. | ||
5862 | # Worse, since 9x/ME are not pre-emptively multitasking, | ||
5863 | # you end up with a "frozen" computer, even though with patience | ||
5864 | # the test eventually succeeds (with a max line length of 256k). | ||
5865 | # Instead, let's just punt: use the minimum linelength reported by | ||
5866 | # all of the supported platforms: 8192 (on NT/2K/XP). | ||
5867 | lt_cv_sys_max_cmd_len=8192; | ||
5868 | ;; | ||
5869 | |||
5870 | amigaos*) | ||
5871 | # On AmigaOS with pdksh, this test takes hours, literally. | ||
5872 | # So we just punt and use a minimum line length of 8192. | ||
5873 | lt_cv_sys_max_cmd_len=8192; | ||
5874 | ;; | ||
5875 | |||
5876 | *) | ||
5877 | # If test is not a shell built-in, we'll probably end up computing a | ||
5878 | # maximum length that is only half of the actual maximum length, but | ||
5879 | # we can't tell. | ||
5880 | while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ | ||
5881 | = "XX$teststring") >/dev/null 2>&1 && | ||
5882 | new_result=`expr "X$teststring" : ".*" 2>&1` && | ||
5883 | lt_cv_sys_max_cmd_len=$new_result && | ||
5884 | test $i != 17 # 1/2 MB should be enough | ||
5885 | do | ||
5886 | i=`expr $i + 1` | ||
5887 | teststring=$teststring$teststring | ||
5888 | done | ||
5889 | teststring= | ||
5890 | # Add a significant safety factor because C++ compilers can tack on massive | ||
5891 | # amounts of additional arguments before passing them to the linker. | ||
5892 | # It appears as though 1/2 is a usable value. | ||
5893 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` | ||
5894 | ;; | ||
5895 | esac | ||
5896 | |||
5897 | fi | ||
5898 | |||
5899 | if test -n $lt_cv_sys_max_cmd_len ; then | ||
5900 | echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 | ||
5901 | echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 | ||
5902 | else | ||
5903 | echo "$as_me:$LINENO: result: none" >&5 | ||
5904 | echo "${ECHO_T}none" >&6 | ||
5905 | fi | ||
5906 | |||
5907 | |||
5908 | |||
5909 | |||
5910 | # Check for command to grab the raw symbol name followed by C symbol from nm. | ||
5911 | echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 | ||
5912 | echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 | ||
5913 | if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then | ||
5914 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
5915 | else | ||
5916 | |||
5917 | # These are sane defaults that work on at least a few old systems. | ||
5918 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] | ||
5919 | |||
5920 | # Character class describing NM global symbol codes. | ||
5921 | symcode='[BCDEGRST]' | ||
5922 | |||
5923 | # Regexp to match symbols that can be accessed directly from C. | ||
5924 | sympat='\([_A-Za-z][_A-Za-z0-9]*\)' | ||
5925 | |||
5926 | # Transform the above into a raw symbol and a C symbol. | ||
5927 | symxfrm='\1 \2\3 \3' | ||
5928 | |||
5929 | # Transform an extracted symbol line into a proper C declaration | ||
5930 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" | ||
5931 | |||
5932 | # Transform an extracted symbol line into symbol name and symbol address | ||
5933 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" | ||
5934 | |||
5935 | # Define system-specific variables. | ||
5936 | case $host_os in | ||
5937 | aix*) | ||
5938 | symcode='[BCDT]' | ||
5939 | ;; | ||
5940 | cygwin* | mingw* | pw32*) | ||
5941 | symcode='[ABCDGISTW]' | ||
5942 | ;; | ||
5943 | hpux*) # Its linker distinguishes data from code symbols | ||
5944 | if test "$host_cpu" = ia64; then | ||
5945 | symcode='[ABCDEGRST]' | ||
5946 | fi | ||
5947 | lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | ||
5948 | lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" | ||
5949 | ;; | ||
5950 | irix* | nonstopux*) | ||
5951 | symcode='[BCDEGRST]' | ||
5952 | ;; | ||
5953 | osf*) | ||
5954 | symcode='[BCDEGQRST]' | ||
5955 | ;; | ||
5956 | solaris* | sysv5*) | ||
5957 | symcode='[BDRT]' | ||
5958 | ;; | ||
5959 | sysv4) | ||
5960 | symcode='[DFNSTU]' | ||
5961 | ;; | ||
5962 | esac | ||
5963 | |||
5964 | # Handle CRLF in mingw tool chain | ||
5965 | opt_cr= | ||
5966 | case $build_os in | ||
5967 | mingw*) | ||
5968 | opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp | ||
5969 | ;; | ||
5970 | esac | ||
5971 | |||
5972 | # If we're using GNU nm, then use its standard symbol codes. | ||
5973 | case `$NM -V 2>&1` in | ||
5974 | *GNU* | *'with BFD'*) | ||
5975 | symcode='[ABCDGIRSTW]' ;; | ||
5976 | esac | ||
5977 | |||
5978 | # Try without a prefix undercore, then with it. | ||
5979 | for ac_symprfx in "" "_"; do | ||
5980 | |||
5981 | # Write the raw and C identifiers. | ||
5982 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" | ||
5983 | |||
5984 | # Check to see that the pipe works correctly. | ||
5985 | pipe_works=no | ||
5986 | |||
5987 | rm -f conftest* | ||
5988 | cat > conftest.$ac_ext <<EOF | ||
5989 | #ifdef __cplusplus | ||
5990 | extern "C" { | ||
5991 | #endif | ||
5992 | char nm_test_var; | ||
5993 | void nm_test_func(){} | ||
5994 | #ifdef __cplusplus | ||
5995 | } | ||
5996 | #endif | ||
5997 | int main(){nm_test_var='a';nm_test_func();return(0);} | ||
5998 | EOF | ||
5999 | |||
6000 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
6001 | (eval $ac_compile) 2>&5 | ||
6002 | ac_status=$? | ||
6003 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
6004 | (exit $ac_status); }; then | ||
6005 | # Now try to grab the symbols. | ||
6006 | nlist=conftest.nm | ||
6007 | if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 | ||
6008 | (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 | ||
6009 | ac_status=$? | ||
6010 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
6011 | (exit $ac_status); } && test -s "$nlist"; then | ||
6012 | # Try sorting and uniquifying the output. | ||
6013 | if sort "$nlist" | uniq > "$nlist"T; then | ||
6014 | mv -f "$nlist"T "$nlist" | ||
6015 | else | ||
6016 | rm -f "$nlist"T | ||
6017 | fi | ||
6018 | |||
6019 | # Make sure that we snagged all the symbols we need. | ||
6020 | if grep ' nm_test_var$' "$nlist" >/dev/null; then | ||
6021 | if grep ' nm_test_func$' "$nlist" >/dev/null; then | ||
6022 | cat <<EOF > conftest.$ac_ext | ||
6023 | #ifdef __cplusplus | ||
6024 | extern "C" { | ||
6025 | #endif | ||
6026 | |||
6027 | EOF | ||
6028 | # Now generate the symbol file. | ||
6029 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' | ||
6030 | |||
6031 | cat <<EOF >> conftest.$ac_ext | ||
6032 | #if defined (__STDC__) && __STDC__ | ||
6033 | # define lt_ptr_t void * | ||
6034 | #else | ||
6035 | # define lt_ptr_t char * | ||
6036 | # define const | ||
6037 | #endif | ||
6038 | |||
6039 | /* The mapping between symbol names and symbols. */ | ||
6040 | const struct { | ||
6041 | const char *name; | ||
6042 | lt_ptr_t address; | ||
6043 | } | ||
6044 | lt_preloaded_symbols[] = | ||
6045 | { | ||
6046 | EOF | ||
6047 | $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext | ||
6048 | cat <<\EOF >> conftest.$ac_ext | ||
6049 | {0, (lt_ptr_t) 0} | ||
6050 | }; | ||
6051 | |||
6052 | #ifdef __cplusplus | ||
6053 | } | ||
6054 | #endif | ||
6055 | EOF | ||
6056 | # Now try linking the two files. | ||
6057 | mv conftest.$ac_objext conftstm.$ac_objext | ||
6058 | lt_save_LIBS="$LIBS" | ||
6059 | lt_save_CFLAGS="$CFLAGS" | ||
6060 | LIBS="conftstm.$ac_objext" | ||
6061 | CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" | ||
6062 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
6063 | (eval $ac_link) 2>&5 | ||
6064 | ac_status=$? | ||
6065 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
6066 | (exit $ac_status); } && test -s conftest${ac_exeext}; then | ||
6067 | pipe_works=yes | ||
6068 | fi | ||
6069 | LIBS="$lt_save_LIBS" | ||
6070 | CFLAGS="$lt_save_CFLAGS" | ||
6071 | else | ||
6072 | echo "cannot find nm_test_func in $nlist" >&5 | ||
6073 | fi | ||
6074 | else | ||
6075 | echo "cannot find nm_test_var in $nlist" >&5 | ||
6076 | fi | ||
6077 | else | ||
6078 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 | ||
6079 | fi | ||
6080 | else | ||
6081 | echo "$progname: failed program was:" >&5 | ||
6082 | cat conftest.$ac_ext >&5 | ||
6083 | fi | ||
6084 | rm -f conftest* conftst* | ||
6085 | |||
6086 | # Do not use the global_symbol_pipe unless it works. | ||
6087 | if test "$pipe_works" = yes; then | ||
6088 | break | ||
6089 | else | ||
6090 | lt_cv_sys_global_symbol_pipe= | ||
6091 | fi | ||
6092 | done | ||
6093 | |||
6094 | fi | ||
6095 | |||
6096 | if test -z "$lt_cv_sys_global_symbol_pipe"; then | ||
6097 | lt_cv_sys_global_symbol_to_cdecl= | ||
6098 | fi | ||
6099 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then | ||
6100 | echo "$as_me:$LINENO: result: failed" >&5 | ||
6101 | echo "${ECHO_T}failed" >&6 | ||
6102 | else | ||
6103 | echo "$as_me:$LINENO: result: ok" >&5 | ||
6104 | echo "${ECHO_T}ok" >&6 | ||
6105 | fi | ||
6106 | |||
6107 | echo "$as_me:$LINENO: checking for objdir" >&5 | ||
6108 | echo $ECHO_N "checking for objdir... $ECHO_C" >&6 | ||
6109 | if test "${lt_cv_objdir+set}" = set; then | ||
6110 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6111 | else | ||
6112 | rm -f .libs 2>/dev/null | ||
6113 | mkdir .libs 2>/dev/null | ||
6114 | if test -d .libs; then | ||
6115 | lt_cv_objdir=.libs | ||
6116 | else | ||
6117 | # MS-DOS does not allow filenames that begin with a dot. | ||
6118 | lt_cv_objdir=_libs | ||
6119 | fi | ||
6120 | rmdir .libs 2>/dev/null | ||
6121 | fi | ||
6122 | echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 | ||
6123 | echo "${ECHO_T}$lt_cv_objdir" >&6 | ||
6124 | objdir=$lt_cv_objdir | ||
6125 | |||
6126 | |||
6127 | |||
6128 | |||
6129 | |||
6130 | case $host_os in | ||
6131 | aix3*) | ||
6132 | # AIX sometimes has problems with the GCC collect2 program. For some | ||
6133 | # reason, if we set the COLLECT_NAMES environment variable, the problems | ||
6134 | # vanish in a puff of smoke. | ||
6135 | if test "X${COLLECT_NAMES+set}" != Xset; then | ||
6136 | COLLECT_NAMES= | ||
6137 | export COLLECT_NAMES | ||
6138 | fi | ||
6139 | ;; | ||
6140 | esac | ||
6141 | |||
6142 | # Sed substitution that helps us do robust quoting. It backslashifies | ||
6143 | # metacharacters that are still active within double-quoted strings. | ||
6144 | Xsed='sed -e s/^X//' | ||
6145 | sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' | ||
6146 | |||
6147 | # Same as above, but do not quote variable references. | ||
6148 | double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' | ||
6149 | |||
6150 | # Sed substitution to delay expansion of an escaped shell variable in a | ||
6151 | # double_quote_subst'ed string. | ||
6152 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | ||
6153 | |||
6154 | # Sed substitution to avoid accidental globbing in evaled expressions | ||
6155 | no_glob_subst='s/\*/\\\*/g' | ||
6156 | |||
6157 | # Constants: | ||
6158 | rm="rm -f" | ||
6159 | |||
6160 | # Global variables: | ||
6161 | default_ofile=libtool | ||
6162 | can_build_shared=yes | ||
6163 | |||
6164 | # All known linkers require a `.a' archive for static linking (except M$VC, | ||
6165 | # which needs '.lib'). | ||
6166 | libext=a | ||
6167 | ltmain="$ac_aux_dir/ltmain.sh" | ||
6168 | ofile="$default_ofile" | ||
6169 | with_gnu_ld="$lt_cv_prog_gnu_ld" | ||
6170 | |||
6171 | if test -n "$ac_tool_prefix"; then | ||
6172 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | ||
6173 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | ||
6174 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
6175 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
6176 | if test "${ac_cv_prog_AR+set}" = set; then | ||
6177 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6178 | else | ||
6179 | if test -n "$AR"; then | ||
6180 | ac_cv_prog_AR="$AR" # Let the user override the test. | ||
6181 | else | ||
6182 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
6183 | for as_dir in $PATH | ||
6184 | do | ||
6185 | IFS=$as_save_IFS | ||
6186 | test -z "$as_dir" && as_dir=. | ||
6187 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
6188 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
6189 | ac_cv_prog_AR="${ac_tool_prefix}ar" | ||
6190 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
6191 | break 2 | ||
6192 | fi | ||
6193 | done | ||
6194 | done | ||
6195 | |||
6196 | fi | ||
6197 | fi | ||
6198 | AR=$ac_cv_prog_AR | ||
6199 | if test -n "$AR"; then | ||
6200 | echo "$as_me:$LINENO: result: $AR" >&5 | ||
6201 | echo "${ECHO_T}$AR" >&6 | ||
6202 | else | ||
6203 | echo "$as_me:$LINENO: result: no" >&5 | ||
6204 | echo "${ECHO_T}no" >&6 | ||
6205 | fi | ||
6206 | |||
6207 | fi | ||
6208 | if test -z "$ac_cv_prog_AR"; then | ||
6209 | ac_ct_AR=$AR | ||
6210 | # Extract the first word of "ar", so it can be a program name with args. | ||
6211 | set dummy ar; ac_word=$2 | ||
6212 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
6213 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
6214 | if test "${ac_cv_prog_ac_ct_AR+set}" = set; then | ||
6215 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6216 | else | ||
6217 | if test -n "$ac_ct_AR"; then | ||
6218 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | ||
6219 | else | ||
6220 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
6221 | for as_dir in $PATH | ||
6222 | do | ||
6223 | IFS=$as_save_IFS | ||
6224 | test -z "$as_dir" && as_dir=. | ||
6225 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
6226 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
6227 | ac_cv_prog_ac_ct_AR="ar" | ||
6228 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
6229 | break 2 | ||
6230 | fi | ||
6231 | done | ||
6232 | done | ||
6233 | |||
6234 | test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" | ||
6235 | fi | ||
6236 | fi | ||
6237 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | ||
6238 | if test -n "$ac_ct_AR"; then | ||
6239 | echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 | ||
6240 | echo "${ECHO_T}$ac_ct_AR" >&6 | ||
6241 | else | ||
6242 | echo "$as_me:$LINENO: result: no" >&5 | ||
6243 | echo "${ECHO_T}no" >&6 | ||
6244 | fi | ||
6245 | |||
6246 | AR=$ac_ct_AR | ||
6247 | else | ||
6248 | AR="$ac_cv_prog_AR" | ||
6249 | fi | ||
6250 | |||
6251 | if test -n "$ac_tool_prefix"; then | ||
6252 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | ||
6253 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | ||
6254 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
6255 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
6256 | if test "${ac_cv_prog_RANLIB+set}" = set; then | ||
6257 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6258 | else | ||
6259 | if test -n "$RANLIB"; then | ||
6260 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | ||
6261 | else | ||
6262 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
6263 | for as_dir in $PATH | ||
6264 | do | ||
6265 | IFS=$as_save_IFS | ||
6266 | test -z "$as_dir" && as_dir=. | ||
6267 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
6268 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
6269 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | ||
6270 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
6271 | break 2 | ||
6272 | fi | ||
6273 | done | ||
6274 | done | ||
6275 | |||
6276 | fi | ||
6277 | fi | ||
6278 | RANLIB=$ac_cv_prog_RANLIB | ||
6279 | if test -n "$RANLIB"; then | ||
6280 | echo "$as_me:$LINENO: result: $RANLIB" >&5 | ||
6281 | echo "${ECHO_T}$RANLIB" >&6 | ||
6282 | else | ||
6283 | echo "$as_me:$LINENO: result: no" >&5 | ||
6284 | echo "${ECHO_T}no" >&6 | ||
6285 | fi | ||
6286 | |||
6287 | fi | ||
6288 | if test -z "$ac_cv_prog_RANLIB"; then | ||
6289 | ac_ct_RANLIB=$RANLIB | ||
6290 | # Extract the first word of "ranlib", so it can be a program name with args. | ||
6291 | set dummy ranlib; ac_word=$2 | ||
6292 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
6293 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
6294 | if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then | ||
6295 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6296 | else | ||
6297 | if test -n "$ac_ct_RANLIB"; then | ||
6298 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | ||
6299 | else | ||
6300 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
6301 | for as_dir in $PATH | ||
6302 | do | ||
6303 | IFS=$as_save_IFS | ||
6304 | test -z "$as_dir" && as_dir=. | ||
6305 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
6306 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
6307 | ac_cv_prog_ac_ct_RANLIB="ranlib" | ||
6308 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
6309 | break 2 | ||
6310 | fi | ||
6311 | done | ||
6312 | done | ||
6313 | |||
6314 | test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" | ||
6315 | fi | ||
6316 | fi | ||
6317 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | ||
6318 | if test -n "$ac_ct_RANLIB"; then | ||
6319 | echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 | ||
6320 | echo "${ECHO_T}$ac_ct_RANLIB" >&6 | ||
6321 | else | ||
6322 | echo "$as_me:$LINENO: result: no" >&5 | ||
6323 | echo "${ECHO_T}no" >&6 | ||
6324 | fi | ||
6325 | |||
6326 | RANLIB=$ac_ct_RANLIB | ||
6327 | else | ||
6328 | RANLIB="$ac_cv_prog_RANLIB" | ||
6329 | fi | ||
6330 | |||
6331 | if test -n "$ac_tool_prefix"; then | ||
6332 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | ||
6333 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | ||
6334 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
6335 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
6336 | if test "${ac_cv_prog_STRIP+set}" = set; then | ||
6337 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6338 | else | ||
6339 | if test -n "$STRIP"; then | ||
6340 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | ||
6341 | else | ||
6342 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
6343 | for as_dir in $PATH | ||
6344 | do | ||
6345 | IFS=$as_save_IFS | ||
6346 | test -z "$as_dir" && as_dir=. | ||
6347 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
6348 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
6349 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | ||
6350 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
6351 | break 2 | ||
6352 | fi | ||
6353 | done | ||
6354 | done | ||
6355 | |||
6356 | fi | ||
6357 | fi | ||
6358 | STRIP=$ac_cv_prog_STRIP | ||
6359 | if test -n "$STRIP"; then | ||
6360 | echo "$as_me:$LINENO: result: $STRIP" >&5 | ||
6361 | echo "${ECHO_T}$STRIP" >&6 | ||
6362 | else | ||
6363 | echo "$as_me:$LINENO: result: no" >&5 | ||
6364 | echo "${ECHO_T}no" >&6 | ||
6365 | fi | ||
6366 | |||
6367 | fi | ||
6368 | if test -z "$ac_cv_prog_STRIP"; then | ||
6369 | ac_ct_STRIP=$STRIP | ||
6370 | # Extract the first word of "strip", so it can be a program name with args. | ||
6371 | set dummy strip; ac_word=$2 | ||
6372 | echo "$as_me:$LINENO: checking for $ac_word" >&5 | ||
6373 | echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 | ||
6374 | if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then | ||
6375 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6376 | else | ||
6377 | if test -n "$ac_ct_STRIP"; then | ||
6378 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | ||
6379 | else | ||
6380 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
6381 | for as_dir in $PATH | ||
6382 | do | ||
6383 | IFS=$as_save_IFS | ||
6384 | test -z "$as_dir" && as_dir=. | ||
6385 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
6386 | if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
6387 | ac_cv_prog_ac_ct_STRIP="strip" | ||
6388 | echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
6389 | break 2 | ||
6390 | fi | ||
6391 | done | ||
6392 | done | ||
6393 | |||
6394 | test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" | ||
6395 | fi | ||
6396 | fi | ||
6397 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | ||
6398 | if test -n "$ac_ct_STRIP"; then | ||
6399 | echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 | ||
6400 | echo "${ECHO_T}$ac_ct_STRIP" >&6 | ||
6401 | else | ||
6402 | echo "$as_me:$LINENO: result: no" >&5 | ||
6403 | echo "${ECHO_T}no" >&6 | ||
6404 | fi | ||
6405 | |||
6406 | STRIP=$ac_ct_STRIP | ||
6407 | else | ||
6408 | STRIP="$ac_cv_prog_STRIP" | ||
6409 | fi | ||
6410 | |||
6411 | |||
6412 | old_CC="$CC" | ||
6413 | old_CFLAGS="$CFLAGS" | ||
6414 | |||
6415 | # Set sane defaults for various variables | ||
6416 | test -z "$AR" && AR=ar | ||
6417 | test -z "$AR_FLAGS" && AR_FLAGS=cru | ||
6418 | test -z "$AS" && AS=as | ||
6419 | test -z "$CC" && CC=cc | ||
6420 | test -z "$LTCC" && LTCC=$CC | ||
6421 | test -z "$DLLTOOL" && DLLTOOL=dlltool | ||
6422 | test -z "$LD" && LD=ld | ||
6423 | test -z "$LN_S" && LN_S="ln -s" | ||
6424 | test -z "$MAGIC_CMD" && MAGIC_CMD=file | ||
6425 | test -z "$NM" && NM=nm | ||
6426 | test -z "$SED" && SED=sed | ||
6427 | test -z "$OBJDUMP" && OBJDUMP=objdump | ||
6428 | test -z "$RANLIB" && RANLIB=: | ||
6429 | test -z "$STRIP" && STRIP=: | ||
6430 | test -z "$ac_objext" && ac_objext=o | ||
6431 | |||
6432 | # Determine commands to create old-style static archives. | ||
6433 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' | ||
6434 | old_postinstall_cmds='chmod 644 $oldlib' | ||
6435 | old_postuninstall_cmds= | ||
6436 | |||
6437 | if test -n "$RANLIB"; then | ||
6438 | case $host_os in | ||
6439 | openbsd*) | ||
6440 | old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" | ||
6441 | ;; | ||
6442 | *) | ||
6443 | old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" | ||
6444 | ;; | ||
6445 | esac | ||
6446 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" | ||
6447 | fi | ||
6448 | |||
6449 | # Only perform the check for file, if the check method requires it | ||
6450 | case $deplibs_check_method in | ||
6451 | file_magic*) | ||
6452 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then | ||
6453 | echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 | ||
6454 | echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 | ||
6455 | if test "${lt_cv_path_MAGIC_CMD+set}" = set; then | ||
6456 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6457 | else | ||
6458 | case $MAGIC_CMD in | ||
6459 | [\\/*] | ?:[\\/]*) | ||
6460 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | ||
6461 | ;; | ||
6462 | *) | ||
6463 | lt_save_MAGIC_CMD="$MAGIC_CMD" | ||
6464 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
6465 | ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" | ||
6466 | for ac_dir in $ac_dummy; do | ||
6467 | IFS="$lt_save_ifs" | ||
6468 | test -z "$ac_dir" && ac_dir=. | ||
6469 | if test -f $ac_dir/${ac_tool_prefix}file; then | ||
6470 | lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" | ||
6471 | if test -n "$file_magic_test_file"; then | ||
6472 | case $deplibs_check_method in | ||
6473 | "file_magic "*) | ||
6474 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | ||
6475 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | ||
6476 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | ||
6477 | $EGREP "$file_magic_regex" > /dev/null; then | ||
6478 | : | ||
6479 | else | ||
6480 | cat <<EOF 1>&2 | ||
6481 | |||
6482 | *** Warning: the command libtool uses to detect shared libraries, | ||
6483 | *** $file_magic_cmd, produces output that libtool cannot recognize. | ||
6484 | *** The result is that libtool may fail to recognize shared libraries | ||
6485 | *** as such. This will affect the creation of libtool libraries that | ||
6486 | *** depend on shared libraries, but programs linked with such libtool | ||
6487 | *** libraries will work regardless of this problem. Nevertheless, you | ||
6488 | *** may want to report the problem to your system manager and/or to | ||
6489 | *** bug-libtool@gnu.org | ||
6490 | |||
6491 | EOF | ||
6492 | fi ;; | ||
6493 | esac | ||
6494 | fi | ||
6495 | break | ||
6496 | fi | ||
6497 | done | ||
6498 | IFS="$lt_save_ifs" | ||
6499 | MAGIC_CMD="$lt_save_MAGIC_CMD" | ||
6500 | ;; | ||
6501 | esac | ||
6502 | fi | ||
6503 | |||
6504 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | ||
6505 | if test -n "$MAGIC_CMD"; then | ||
6506 | echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 | ||
6507 | echo "${ECHO_T}$MAGIC_CMD" >&6 | ||
6508 | else | ||
6509 | echo "$as_me:$LINENO: result: no" >&5 | ||
6510 | echo "${ECHO_T}no" >&6 | ||
6511 | fi | ||
6512 | |||
6513 | if test -z "$lt_cv_path_MAGIC_CMD"; then | ||
6514 | if test -n "$ac_tool_prefix"; then | ||
6515 | echo "$as_me:$LINENO: checking for file" >&5 | ||
6516 | echo $ECHO_N "checking for file... $ECHO_C" >&6 | ||
6517 | if test "${lt_cv_path_MAGIC_CMD+set}" = set; then | ||
6518 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6519 | else | ||
6520 | case $MAGIC_CMD in | ||
6521 | [\\/*] | ?:[\\/]*) | ||
6522 | lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | ||
6523 | ;; | ||
6524 | *) | ||
6525 | lt_save_MAGIC_CMD="$MAGIC_CMD" | ||
6526 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
6527 | ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" | ||
6528 | for ac_dir in $ac_dummy; do | ||
6529 | IFS="$lt_save_ifs" | ||
6530 | test -z "$ac_dir" && ac_dir=. | ||
6531 | if test -f $ac_dir/file; then | ||
6532 | lt_cv_path_MAGIC_CMD="$ac_dir/file" | ||
6533 | if test -n "$file_magic_test_file"; then | ||
6534 | case $deplibs_check_method in | ||
6535 | "file_magic "*) | ||
6536 | file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | ||
6537 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | ||
6538 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | ||
6539 | $EGREP "$file_magic_regex" > /dev/null; then | ||
6540 | : | ||
6541 | else | ||
6542 | cat <<EOF 1>&2 | ||
6543 | |||
6544 | *** Warning: the command libtool uses to detect shared libraries, | ||
6545 | *** $file_magic_cmd, produces output that libtool cannot recognize. | ||
6546 | *** The result is that libtool may fail to recognize shared libraries | ||
6547 | *** as such. This will affect the creation of libtool libraries that | ||
6548 | *** depend on shared libraries, but programs linked with such libtool | ||
6549 | *** libraries will work regardless of this problem. Nevertheless, you | ||
6550 | *** may want to report the problem to your system manager and/or to | ||
6551 | *** bug-libtool@gnu.org | ||
6552 | |||
6553 | EOF | ||
6554 | fi ;; | ||
6555 | esac | ||
6556 | fi | ||
6557 | break | ||
6558 | fi | ||
6559 | done | ||
6560 | IFS="$lt_save_ifs" | ||
6561 | MAGIC_CMD="$lt_save_MAGIC_CMD" | ||
6562 | ;; | ||
6563 | esac | ||
6564 | fi | ||
6565 | |||
6566 | MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | ||
6567 | if test -n "$MAGIC_CMD"; then | ||
6568 | echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 | ||
6569 | echo "${ECHO_T}$MAGIC_CMD" >&6 | ||
6570 | else | ||
6571 | echo "$as_me:$LINENO: result: no" >&5 | ||
6572 | echo "${ECHO_T}no" >&6 | ||
6573 | fi | ||
6574 | |||
6575 | else | ||
6576 | MAGIC_CMD=: | ||
6577 | fi | ||
6578 | fi | ||
6579 | |||
6580 | fi | ||
6581 | ;; | ||
6582 | esac | ||
6583 | |||
6584 | enable_dlopen=no | ||
6585 | enable_win32_dll=yes | ||
6586 | |||
6587 | # Check whether --enable-libtool-lock or --disable-libtool-lock was given. | ||
6588 | if test "${enable_libtool_lock+set}" = set; then | ||
6589 | enableval="$enable_libtool_lock" | ||
6590 | |||
6591 | fi; | ||
6592 | test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | ||
6593 | |||
6594 | |||
6595 | # Check whether --with-pic or --without-pic was given. | ||
6596 | if test "${with_pic+set}" = set; then | ||
6597 | withval="$with_pic" | ||
6598 | pic_mode="$withval" | ||
6599 | else | ||
6600 | pic_mode=default | ||
6601 | fi; | ||
6602 | test -z "$pic_mode" && pic_mode=default | ||
6603 | |||
6604 | # Use C for the default configuration in the libtool script | ||
6605 | tagname= | ||
6606 | lt_save_CC="$CC" | ||
6607 | ac_ext=c | ||
6608 | ac_cpp='$CPP $CPPFLAGS' | ||
6609 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
6610 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
6611 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
6612 | |||
6613 | |||
6614 | # Source file extension for C test sources. | ||
6615 | ac_ext=c | ||
6616 | |||
6617 | # Object file extension for compiled C test sources. | ||
6618 | objext=o | ||
6619 | objext=$objext | ||
6620 | |||
6621 | # Code to be used in simple compile tests | ||
6622 | lt_simple_compile_test_code="int some_variable = 0;\n" | ||
6623 | |||
6624 | # Code to be used in simple link tests | ||
6625 | lt_simple_link_test_code='int main(){return(0);}\n' | ||
6626 | |||
6627 | |||
6628 | # If no C compiler was specified, use CC. | ||
6629 | LTCC=${LTCC-"$CC"} | ||
6630 | |||
6631 | # Allow CC to be a program name with arguments. | ||
6632 | compiler=$CC | ||
6633 | |||
6634 | |||
6635 | # | ||
6636 | # Check for any special shared library compilation flags. | ||
6637 | # | ||
6638 | lt_prog_cc_shlib= | ||
6639 | if test "$GCC" = no; then | ||
6640 | case $host_os in | ||
6641 | sco3.2v5*) | ||
6642 | lt_prog_cc_shlib='-belf' | ||
6643 | ;; | ||
6644 | esac | ||
6645 | fi | ||
6646 | if test -n "$lt_prog_cc_shlib"; then | ||
6647 | { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 | ||
6648 | echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} | ||
6649 | if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : | ||
6650 | else | ||
6651 | { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 | ||
6652 | echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} | ||
6653 | lt_cv_prog_cc_can_build_shared=no | ||
6654 | fi | ||
6655 | fi | ||
6656 | |||
6657 | |||
6658 | # | ||
6659 | # Check to make sure the static flag actually works. | ||
6660 | # | ||
6661 | echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 | ||
6662 | echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 | ||
6663 | if test "${lt_prog_compiler_static_works+set}" = set; then | ||
6664 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6665 | else | ||
6666 | lt_prog_compiler_static_works=no | ||
6667 | save_LDFLAGS="$LDFLAGS" | ||
6668 | LDFLAGS="$LDFLAGS $lt_prog_compiler_static" | ||
6669 | printf "$lt_simple_link_test_code" > conftest.$ac_ext | ||
6670 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then | ||
6671 | # The compiler can only warn and ignore the option if not recognized | ||
6672 | # So say no if there are warnings | ||
6673 | if test -s conftest.err; then | ||
6674 | # Append any errors to the config.log. | ||
6675 | cat conftest.err 1>&5 | ||
6676 | else | ||
6677 | lt_prog_compiler_static_works=yes | ||
6678 | fi | ||
6679 | fi | ||
6680 | $rm conftest* | ||
6681 | LDFLAGS="$save_LDFLAGS" | ||
6682 | |||
6683 | fi | ||
6684 | echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 | ||
6685 | echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 | ||
6686 | |||
6687 | if test x"$lt_prog_compiler_static_works" = xyes; then | ||
6688 | : | ||
6689 | else | ||
6690 | lt_prog_compiler_static= | ||
6691 | fi | ||
6692 | |||
6693 | |||
6694 | |||
6695 | |||
6696 | lt_prog_compiler_no_builtin_flag= | ||
6697 | |||
6698 | if test "$GCC" = yes; then | ||
6699 | lt_prog_compiler_no_builtin_flag=' -fno-builtin' | ||
6700 | |||
6701 | |||
6702 | echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 | ||
6703 | echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 | ||
6704 | if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then | ||
6705 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6706 | else | ||
6707 | lt_cv_prog_compiler_rtti_exceptions=no | ||
6708 | ac_outfile=conftest.$ac_objext | ||
6709 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
6710 | lt_compiler_flag="-fno-rtti -fno-exceptions" | ||
6711 | # Insert the option either (1) after the last *FLAGS variable, or | ||
6712 | # (2) before a word containing "conftest.", or (3) at the end. | ||
6713 | # Note that $ac_compile itself does not contain backslashes and begins | ||
6714 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
6715 | # The option is referenced via a variable to avoid confusing sed. | ||
6716 | lt_compile=`echo "$ac_compile" | $SED \ | ||
6717 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
6718 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||
6719 | -e 's:$: $lt_compiler_flag:'` | ||
6720 | (eval echo "\"\$as_me:6720: $lt_compile\"" >&5) | ||
6721 | (eval "$lt_compile" 2>conftest.err) | ||
6722 | ac_status=$? | ||
6723 | cat conftest.err >&5 | ||
6724 | echo "$as_me:6724: \$? = $ac_status" >&5 | ||
6725 | if (exit $ac_status) && test -s "$ac_outfile"; then | ||
6726 | # The compiler can only warn and ignore the option if not recognized | ||
6727 | # So say no if there are warnings | ||
6728 | if test ! -s conftest.err; then | ||
6729 | lt_cv_prog_compiler_rtti_exceptions=yes | ||
6730 | fi | ||
6731 | fi | ||
6732 | $rm conftest* | ||
6733 | |||
6734 | fi | ||
6735 | echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 | ||
6736 | echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 | ||
6737 | |||
6738 | if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then | ||
6739 | lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" | ||
6740 | else | ||
6741 | : | ||
6742 | fi | ||
6743 | |||
6744 | fi | ||
6745 | |||
6746 | lt_prog_compiler_wl= | ||
6747 | lt_prog_compiler_pic= | ||
6748 | lt_prog_compiler_static= | ||
6749 | |||
6750 | echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 | ||
6751 | echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 | ||
6752 | |||
6753 | if test "$GCC" = yes; then | ||
6754 | lt_prog_compiler_wl='-Wl,' | ||
6755 | lt_prog_compiler_static='-static' | ||
6756 | |||
6757 | case $host_os in | ||
6758 | aix*) | ||
6759 | # All AIX code is PIC. | ||
6760 | if test "$host_cpu" = ia64; then | ||
6761 | # AIX 5 now supports IA64 processor | ||
6762 | lt_prog_compiler_static='-Bstatic' | ||
6763 | fi | ||
6764 | ;; | ||
6765 | |||
6766 | amigaos*) | ||
6767 | # FIXME: we need at least 68020 code to build shared libraries, but | ||
6768 | # adding the `-m68020' flag to GCC prevents building anything better, | ||
6769 | # like `-m68040'. | ||
6770 | lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' | ||
6771 | ;; | ||
6772 | |||
6773 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | ||
6774 | # PIC is the default for these OSes. | ||
6775 | ;; | ||
6776 | |||
6777 | mingw* | pw32* | os2*) | ||
6778 | # This hack is so that the source file can tell whether it is being | ||
6779 | # built for inclusion in a dll (and should export symbols for example). | ||
6780 | lt_prog_compiler_pic='-DDLL_EXPORT' | ||
6781 | ;; | ||
6782 | |||
6783 | darwin* | rhapsody*) | ||
6784 | # PIC is the default on this platform | ||
6785 | # Common symbols not allowed in MH_DYLIB files | ||
6786 | lt_prog_compiler_pic='-fno-common' | ||
6787 | ;; | ||
6788 | |||
6789 | msdosdjgpp*) | ||
6790 | # Just because we use GCC doesn't mean we suddenly get shared libraries | ||
6791 | # on systems that don't support them. | ||
6792 | lt_prog_compiler_can_build_shared=no | ||
6793 | enable_shared=no | ||
6794 | ;; | ||
6795 | |||
6796 | sysv4*MP*) | ||
6797 | if test -d /usr/nec; then | ||
6798 | lt_prog_compiler_pic=-Kconform_pic | ||
6799 | fi | ||
6800 | ;; | ||
6801 | |||
6802 | hpux*) | ||
6803 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
6804 | # not for PA HP-UX. | ||
6805 | case "$host_cpu" in | ||
6806 | hppa*64*|ia64*) | ||
6807 | # +Z the default | ||
6808 | ;; | ||
6809 | *) | ||
6810 | lt_prog_compiler_pic='-fPIC' | ||
6811 | ;; | ||
6812 | esac | ||
6813 | ;; | ||
6814 | |||
6815 | *) | ||
6816 | lt_prog_compiler_pic='-fPIC' | ||
6817 | ;; | ||
6818 | esac | ||
6819 | else | ||
6820 | # PORTME Check for flag to pass linker flags through the system compiler. | ||
6821 | case $host_os in | ||
6822 | aix*) | ||
6823 | lt_prog_compiler_wl='-Wl,' | ||
6824 | if test "$host_cpu" = ia64; then | ||
6825 | # AIX 5 now supports IA64 processor | ||
6826 | lt_prog_compiler_static='-Bstatic' | ||
6827 | else | ||
6828 | lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' | ||
6829 | fi | ||
6830 | ;; | ||
6831 | |||
6832 | mingw* | pw32* | os2*) | ||
6833 | # This hack is so that the source file can tell whether it is being | ||
6834 | # built for inclusion in a dll (and should export symbols for example). | ||
6835 | lt_prog_compiler_pic='-DDLL_EXPORT' | ||
6836 | ;; | ||
6837 | |||
6838 | hpux9* | hpux10* | hpux11*) | ||
6839 | lt_prog_compiler_wl='-Wl,' | ||
6840 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
6841 | # not for PA HP-UX. | ||
6842 | case "$host_cpu" in | ||
6843 | hppa*64*|ia64*) | ||
6844 | # +Z the default | ||
6845 | ;; | ||
6846 | *) | ||
6847 | lt_prog_compiler_pic='+Z' | ||
6848 | ;; | ||
6849 | esac | ||
6850 | # Is there a better lt_prog_compiler_static that works with the bundled CC? | ||
6851 | lt_prog_compiler_static='${wl}-a ${wl}archive' | ||
6852 | ;; | ||
6853 | |||
6854 | irix5* | irix6* | nonstopux*) | ||
6855 | lt_prog_compiler_wl='-Wl,' | ||
6856 | # PIC (with -KPIC) is the default. | ||
6857 | lt_prog_compiler_static='-non_shared' | ||
6858 | ;; | ||
6859 | |||
6860 | newsos6) | ||
6861 | lt_prog_compiler_pic='-KPIC' | ||
6862 | lt_prog_compiler_static='-Bstatic' | ||
6863 | ;; | ||
6864 | |||
6865 | linux*) | ||
6866 | case $CC in | ||
6867 | icc* | ecc*) | ||
6868 | lt_prog_compiler_wl='-Wl,' | ||
6869 | lt_prog_compiler_pic='-KPIC' | ||
6870 | lt_prog_compiler_static='-static' | ||
6871 | ;; | ||
6872 | ccc*) | ||
6873 | lt_prog_compiler_wl='-Wl,' | ||
6874 | # All Alpha code is PIC. | ||
6875 | lt_prog_compiler_static='-non_shared' | ||
6876 | ;; | ||
6877 | esac | ||
6878 | ;; | ||
6879 | |||
6880 | osf3* | osf4* | osf5*) | ||
6881 | lt_prog_compiler_wl='-Wl,' | ||
6882 | # All OSF/1 code is PIC. | ||
6883 | lt_prog_compiler_static='-non_shared' | ||
6884 | ;; | ||
6885 | |||
6886 | sco3.2v5*) | ||
6887 | lt_prog_compiler_pic='-Kpic' | ||
6888 | lt_prog_compiler_static='-dn' | ||
6889 | ;; | ||
6890 | |||
6891 | solaris*) | ||
6892 | lt_prog_compiler_wl='-Wl,' | ||
6893 | lt_prog_compiler_pic='-KPIC' | ||
6894 | lt_prog_compiler_static='-Bstatic' | ||
6895 | ;; | ||
6896 | |||
6897 | sunos4*) | ||
6898 | lt_prog_compiler_wl='-Qoption ld ' | ||
6899 | lt_prog_compiler_pic='-PIC' | ||
6900 | lt_prog_compiler_static='-Bstatic' | ||
6901 | ;; | ||
6902 | |||
6903 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
6904 | lt_prog_compiler_wl='-Wl,' | ||
6905 | lt_prog_compiler_pic='-KPIC' | ||
6906 | lt_prog_compiler_static='-Bstatic' | ||
6907 | ;; | ||
6908 | |||
6909 | sysv4*MP*) | ||
6910 | if test -d /usr/nec ;then | ||
6911 | lt_prog_compiler_pic='-Kconform_pic' | ||
6912 | lt_prog_compiler_static='-Bstatic' | ||
6913 | fi | ||
6914 | ;; | ||
6915 | |||
6916 | uts4*) | ||
6917 | lt_prog_compiler_pic='-pic' | ||
6918 | lt_prog_compiler_static='-Bstatic' | ||
6919 | ;; | ||
6920 | |||
6921 | *) | ||
6922 | lt_prog_compiler_can_build_shared=no | ||
6923 | ;; | ||
6924 | esac | ||
6925 | fi | ||
6926 | |||
6927 | echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 | ||
6928 | echo "${ECHO_T}$lt_prog_compiler_pic" >&6 | ||
6929 | |||
6930 | # | ||
6931 | # Check to make sure the PIC flag actually works. | ||
6932 | # | ||
6933 | if test -n "$lt_prog_compiler_pic"; then | ||
6934 | |||
6935 | echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 | ||
6936 | echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 | ||
6937 | if test "${lt_prog_compiler_pic_works+set}" = set; then | ||
6938 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6939 | else | ||
6940 | lt_prog_compiler_pic_works=no | ||
6941 | ac_outfile=conftest.$ac_objext | ||
6942 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
6943 | lt_compiler_flag="$lt_prog_compiler_pic -DPIC" | ||
6944 | # Insert the option either (1) after the last *FLAGS variable, or | ||
6945 | # (2) before a word containing "conftest.", or (3) at the end. | ||
6946 | # Note that $ac_compile itself does not contain backslashes and begins | ||
6947 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
6948 | # The option is referenced via a variable to avoid confusing sed. | ||
6949 | lt_compile=`echo "$ac_compile" | $SED \ | ||
6950 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
6951 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||
6952 | -e 's:$: $lt_compiler_flag:'` | ||
6953 | (eval echo "\"\$as_me:6953: $lt_compile\"" >&5) | ||
6954 | (eval "$lt_compile" 2>conftest.err) | ||
6955 | ac_status=$? | ||
6956 | cat conftest.err >&5 | ||
6957 | echo "$as_me:6957: \$? = $ac_status" >&5 | ||
6958 | if (exit $ac_status) && test -s "$ac_outfile"; then | ||
6959 | # The compiler can only warn and ignore the option if not recognized | ||
6960 | # So say no if there are warnings | ||
6961 | if test ! -s conftest.err; then | ||
6962 | lt_prog_compiler_pic_works=yes | ||
6963 | fi | ||
6964 | fi | ||
6965 | $rm conftest* | ||
6966 | |||
6967 | fi | ||
6968 | echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 | ||
6969 | echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 | ||
6970 | |||
6971 | if test x"$lt_prog_compiler_pic_works" = xyes; then | ||
6972 | case $lt_prog_compiler_pic in | ||
6973 | "" | " "*) ;; | ||
6974 | *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; | ||
6975 | esac | ||
6976 | else | ||
6977 | lt_prog_compiler_pic= | ||
6978 | lt_prog_compiler_can_build_shared=no | ||
6979 | fi | ||
6980 | |||
6981 | fi | ||
6982 | case "$host_os" in | ||
6983 | # For platforms which do not support PIC, -DPIC is meaningless: | ||
6984 | *djgpp*) | ||
6985 | lt_prog_compiler_pic= | ||
6986 | ;; | ||
6987 | *) | ||
6988 | lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" | ||
6989 | ;; | ||
6990 | esac | ||
6991 | |||
6992 | echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 | ||
6993 | echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 | ||
6994 | if test "${lt_cv_prog_compiler_c_o+set}" = set; then | ||
6995 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
6996 | else | ||
6997 | lt_cv_prog_compiler_c_o=no | ||
6998 | $rm -r conftest 2>/dev/null | ||
6999 | mkdir conftest | ||
7000 | cd conftest | ||
7001 | mkdir out | ||
7002 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
7003 | |||
7004 | lt_compiler_flag="-o out/conftest2.$ac_objext" | ||
7005 | # Insert the option either (1) after the last *FLAGS variable, or | ||
7006 | # (2) before a word containing "conftest.", or (3) at the end. | ||
7007 | # Note that $ac_compile itself does not contain backslashes and begins | ||
7008 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
7009 | lt_compile=`echo "$ac_compile" | $SED \ | ||
7010 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
7011 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||
7012 | -e 's:$: $lt_compiler_flag:'` | ||
7013 | (eval echo "\"\$as_me:7013: $lt_compile\"" >&5) | ||
7014 | (eval "$lt_compile" 2>out/conftest.err) | ||
7015 | ac_status=$? | ||
7016 | cat out/conftest.err >&5 | ||
7017 | echo "$as_me:7017: \$? = $ac_status" >&5 | ||
7018 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | ||
7019 | then | ||
7020 | # The compiler can only warn and ignore the option if not recognized | ||
7021 | # So say no if there are warnings | ||
7022 | if test ! -s out/conftest.err; then | ||
7023 | lt_cv_prog_compiler_c_o=yes | ||
7024 | fi | ||
7025 | fi | ||
7026 | chmod u+w . | ||
7027 | $rm conftest* | ||
7028 | # SGI C++ compiler will create directory out/ii_files/ for | ||
7029 | # template instantiation | ||
7030 | test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files | ||
7031 | $rm out/* && rmdir out | ||
7032 | cd .. | ||
7033 | rmdir conftest | ||
7034 | $rm conftest* | ||
7035 | |||
7036 | fi | ||
7037 | echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 | ||
7038 | echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 | ||
7039 | |||
7040 | |||
7041 | hard_links="nottested" | ||
7042 | if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then | ||
7043 | # do not overwrite the value of need_locks provided by the user | ||
7044 | echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 | ||
7045 | echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 | ||
7046 | hard_links=yes | ||
7047 | $rm conftest* | ||
7048 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
7049 | touch conftest.a | ||
7050 | ln conftest.a conftest.b 2>&5 || hard_links=no | ||
7051 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
7052 | echo "$as_me:$LINENO: result: $hard_links" >&5 | ||
7053 | echo "${ECHO_T}$hard_links" >&6 | ||
7054 | if test "$hard_links" = no; then | ||
7055 | { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 | ||
7056 | echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} | ||
7057 | need_locks=warn | ||
7058 | fi | ||
7059 | else | ||
7060 | need_locks=no | ||
7061 | fi | ||
7062 | |||
7063 | echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 | ||
7064 | echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 | ||
7065 | |||
7066 | runpath_var= | ||
7067 | allow_undefined_flag= | ||
7068 | enable_shared_with_static_runtimes=no | ||
7069 | archive_cmds= | ||
7070 | archive_expsym_cmds= | ||
7071 | old_archive_From_new_cmds= | ||
7072 | old_archive_from_expsyms_cmds= | ||
7073 | export_dynamic_flag_spec= | ||
7074 | whole_archive_flag_spec= | ||
7075 | thread_safe_flag_spec= | ||
7076 | hardcode_libdir_flag_spec= | ||
7077 | hardcode_libdir_flag_spec_ld= | ||
7078 | hardcode_libdir_separator= | ||
7079 | hardcode_direct=no | ||
7080 | hardcode_minus_L=no | ||
7081 | hardcode_shlibpath_var=unsupported | ||
7082 | link_all_deplibs=unknown | ||
7083 | hardcode_automatic=no | ||
7084 | module_cmds= | ||
7085 | module_expsym_cmds= | ||
7086 | always_export_symbols=no | ||
7087 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
7088 | # include_expsyms should be a list of space-separated symbols to be *always* | ||
7089 | # included in the symbol list | ||
7090 | include_expsyms= | ||
7091 | # exclude_expsyms can be an extended regexp of symbols to exclude | ||
7092 | # it will be wrapped by ` (' and `)$', so one must not match beginning or | ||
7093 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | ||
7094 | # as well as any symbol that contains `d'. | ||
7095 | exclude_expsyms="_GLOBAL_OFFSET_TABLE_" | ||
7096 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | ||
7097 | # platforms (ab)use it in PIC code, but their linkers get confused if | ||
7098 | # the symbol is explicitly referenced. Since portable code cannot | ||
7099 | # rely on this symbol name, it's probably fine to never include it in | ||
7100 | # preloaded symbol tables. | ||
7101 | extract_expsyms_cmds= | ||
7102 | |||
7103 | case $host_os in | ||
7104 | cygwin* | mingw* | pw32*) | ||
7105 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | ||
7106 | # When not using gcc, we currently assume that we are using | ||
7107 | # Microsoft Visual C++. | ||
7108 | if test "$GCC" != yes; then | ||
7109 | with_gnu_ld=no | ||
7110 | fi | ||
7111 | ;; | ||
7112 | openbsd*) | ||
7113 | with_gnu_ld=no | ||
7114 | ;; | ||
7115 | esac | ||
7116 | |||
7117 | ld_shlibs=yes | ||
7118 | if test "$with_gnu_ld" = yes; then | ||
7119 | # If archive_cmds runs LD, not CC, wlarc should be empty | ||
7120 | wlarc='${wl}' | ||
7121 | |||
7122 | # See if GNU ld supports shared libraries. | ||
7123 | case $host_os in | ||
7124 | aix3* | aix4* | aix5*) | ||
7125 | # On AIX/PPC, the GNU linker is very broken | ||
7126 | if test "$host_cpu" != ia64; then | ||
7127 | ld_shlibs=no | ||
7128 | cat <<EOF 1>&2 | ||
7129 | |||
7130 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported | ||
7131 | *** to be unable to reliably create shared libraries on AIX. | ||
7132 | *** Therefore, libtool is disabling shared libraries support. If you | ||
7133 | *** really care for shared libraries, you may want to modify your PATH | ||
7134 | *** so that a non-GNU linker is found, and then restart. | ||
7135 | |||
7136 | EOF | ||
7137 | fi | ||
7138 | ;; | ||
7139 | |||
7140 | amigaos*) | ||
7141 | archive_cmds='$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)' | ||
7142 | hardcode_libdir_flag_spec='-L$libdir' | ||
7143 | hardcode_minus_L=yes | ||
7144 | |||
7145 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports | ||
7146 | # that the semantics of dynamic libraries on AmigaOS, at least up | ||
7147 | # to version 4, is to share data among multiple programs linked | ||
7148 | # with the same dynamic library. Since this doesn't match the | ||
7149 | # behavior of shared libraries on other platforms, we can't use | ||
7150 | # them. | ||
7151 | ld_shlibs=no | ||
7152 | ;; | ||
7153 | |||
7154 | beos*) | ||
7155 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
7156 | allow_undefined_flag=unsupported | ||
7157 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | ||
7158 | # support --undefined. This deserves some investigation. FIXME | ||
7159 | archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
7160 | else | ||
7161 | ld_shlibs=no | ||
7162 | fi | ||
7163 | ;; | ||
7164 | |||
7165 | cygwin* | mingw* | pw32*) | ||
7166 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, | ||
7167 | # as there is no search path for DLLs. | ||
7168 | hardcode_libdir_flag_spec='-L$libdir' | ||
7169 | allow_undefined_flag=unsupported | ||
7170 | always_export_symbols=no | ||
7171 | enable_shared_with_static_runtimes=yes | ||
7172 | export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' | ||
7173 | |||
7174 | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then | ||
7175 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
7176 | # If the export-symbols file already is a .def file (1st line | ||
7177 | # is EXPORTS), use it as is; otherwise, prepend... | ||
7178 | archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
7179 | cp $export_symbols $output_objdir/$soname.def; | ||
7180 | else | ||
7181 | echo EXPORTS > $output_objdir/$soname.def; | ||
7182 | cat $export_symbols >> $output_objdir/$soname.def; | ||
7183 | fi~ | ||
7184 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
7185 | else | ||
7186 | ld_shlibs=no | ||
7187 | fi | ||
7188 | ;; | ||
7189 | |||
7190 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
7191 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
7192 | archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
7193 | wlarc= | ||
7194 | else | ||
7195 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
7196 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
7197 | fi | ||
7198 | ;; | ||
7199 | |||
7200 | solaris* | sysv5*) | ||
7201 | if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then | ||
7202 | ld_shlibs=no | ||
7203 | cat <<EOF 1>&2 | ||
7204 | |||
7205 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably | ||
7206 | *** create shared libraries on Solaris systems. Therefore, libtool | ||
7207 | *** is disabling shared libraries support. We urge you to upgrade GNU | ||
7208 | *** binutils to release 2.9.1 or newer. Another option is to modify | ||
7209 | *** your PATH or compiler configuration so that the native linker is | ||
7210 | *** used, and then restart. | ||
7211 | |||
7212 | EOF | ||
7213 | elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
7214 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
7215 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
7216 | else | ||
7217 | ld_shlibs=no | ||
7218 | fi | ||
7219 | ;; | ||
7220 | |||
7221 | sunos4*) | ||
7222 | archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
7223 | wlarc= | ||
7224 | hardcode_direct=yes | ||
7225 | hardcode_shlibpath_var=no | ||
7226 | ;; | ||
7227 | |||
7228 | linux*) | ||
7229 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
7230 | tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
7231 | archive_cmds="$tmp_archive_cmds" | ||
7232 | supports_anon_versioning=no | ||
7233 | case `$LD -v 2>/dev/null` in | ||
7234 | *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 | ||
7235 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | ||
7236 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | ||
7237 | *\ 2.11.*) ;; # other 2.11 versions | ||
7238 | *) supports_anon_versioning=yes ;; | ||
7239 | esac | ||
7240 | if test $supports_anon_versioning = yes; then | ||
7241 | archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ | ||
7242 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
7243 | $echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
7244 | $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | ||
7245 | else | ||
7246 | archive_expsym_cmds="$tmp_archive_cmds" | ||
7247 | fi | ||
7248 | link_all_deplibs=no | ||
7249 | else | ||
7250 | ld_shlibs=no | ||
7251 | fi | ||
7252 | ;; | ||
7253 | |||
7254 | *) | ||
7255 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
7256 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
7257 | archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
7258 | else | ||
7259 | ld_shlibs=no | ||
7260 | fi | ||
7261 | ;; | ||
7262 | esac | ||
7263 | |||
7264 | if test "$ld_shlibs" = yes; then | ||
7265 | runpath_var=LD_RUN_PATH | ||
7266 | hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' | ||
7267 | export_dynamic_flag_spec='${wl}--export-dynamic' | ||
7268 | # ancient GNU ld didn't support --whole-archive et. al. | ||
7269 | if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then | ||
7270 | whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | ||
7271 | else | ||
7272 | whole_archive_flag_spec= | ||
7273 | fi | ||
7274 | fi | ||
7275 | else | ||
7276 | # PORTME fill in a description of your system's linker (not GNU ld) | ||
7277 | case $host_os in | ||
7278 | aix3*) | ||
7279 | allow_undefined_flag=unsupported | ||
7280 | always_export_symbols=yes | ||
7281 | archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | ||
7282 | # Note: this linker hardcodes the directories in LIBPATH if there | ||
7283 | # are no directories specified by -L. | ||
7284 | hardcode_minus_L=yes | ||
7285 | if test "$GCC" = yes && test -z "$link_static_flag"; then | ||
7286 | # Neither direct hardcoding nor static linking is supported with a | ||
7287 | # broken collect2. | ||
7288 | hardcode_direct=unsupported | ||
7289 | fi | ||
7290 | ;; | ||
7291 | |||
7292 | aix4* | aix5*) | ||
7293 | if test "$host_cpu" = ia64; then | ||
7294 | # On IA64, the linker does run time linking by default, so we don't | ||
7295 | # have to do anything special. | ||
7296 | aix_use_runtimelinking=no | ||
7297 | exp_sym_flag='-Bexport' | ||
7298 | no_entry_flag="" | ||
7299 | else | ||
7300 | # If we're using GNU nm, then we don't want the "-C" option. | ||
7301 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | ||
7302 | if $NM -V 2>&1 | grep 'GNU' > /dev/null; then | ||
7303 | 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' | ||
7304 | else | ||
7305 | 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' | ||
7306 | fi | ||
7307 | aix_use_runtimelinking=no | ||
7308 | |||
7309 | # Test if we are trying to use run time linking or normal | ||
7310 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | ||
7311 | # need to do runtime linking. | ||
7312 | case $host_os in aix4.[23]|aix4.[23].*|aix5*) | ||
7313 | for ld_flag in $LDFLAGS; do | ||
7314 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | ||
7315 | aix_use_runtimelinking=yes | ||
7316 | break | ||
7317 | fi | ||
7318 | done | ||
7319 | esac | ||
7320 | |||
7321 | exp_sym_flag='-bexport' | ||
7322 | no_entry_flag='-bnoentry' | ||
7323 | fi | ||
7324 | |||
7325 | # When large executables or shared objects are built, AIX ld can | ||
7326 | # have problems creating the table of contents. If linking a library | ||
7327 | # or program results in "error TOC overflow" add -mminimal-toc to | ||
7328 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | ||
7329 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | ||
7330 | |||
7331 | archive_cmds='' | ||
7332 | hardcode_direct=yes | ||
7333 | hardcode_libdir_separator=':' | ||
7334 | link_all_deplibs=yes | ||
7335 | |||
7336 | if test "$GCC" = yes; then | ||
7337 | case $host_os in aix4.012|aix4.012.*) | ||
7338 | # We only want to do this on AIX 4.2 and lower, the check | ||
7339 | # below for broken collect2 doesn't work under 4.3+ | ||
7340 | collect2name=`${CC} -print-prog-name=collect2` | ||
7341 | if test -f "$collect2name" && \ | ||
7342 | strings "$collect2name" | grep resolve_lib_name >/dev/null | ||
7343 | then | ||
7344 | # We have reworked collect2 | ||
7345 | hardcode_direct=yes | ||
7346 | else | ||
7347 | # We have old collect2 | ||
7348 | hardcode_direct=unsupported | ||
7349 | # It fails to find uninstalled libraries when the uninstalled | ||
7350 | # path is not listed in the libpath. Setting hardcode_minus_L | ||
7351 | # to unsupported forces relinking | ||
7352 | hardcode_minus_L=yes | ||
7353 | hardcode_libdir_flag_spec='-L$libdir' | ||
7354 | hardcode_libdir_separator= | ||
7355 | fi | ||
7356 | esac | ||
7357 | shared_flag='-shared' | ||
7358 | else | ||
7359 | # not using gcc | ||
7360 | if test "$host_cpu" = ia64; then | ||
7361 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | ||
7362 | # chokes on -Wl,-G. The following line is correct: | ||
7363 | shared_flag='-G' | ||
7364 | else | ||
7365 | if test "$aix_use_runtimelinking" = yes; then | ||
7366 | shared_flag='${wl}-G' | ||
7367 | else | ||
7368 | shared_flag='${wl}-bM:SRE' | ||
7369 | fi | ||
7370 | fi | ||
7371 | fi | ||
7372 | |||
7373 | # It seems that -bexpall does not export symbols beginning with | ||
7374 | # underscore (_), so it is better to generate a list of symbols to export. | ||
7375 | always_export_symbols=yes | ||
7376 | if test "$aix_use_runtimelinking" = yes; then | ||
7377 | # Warning - without using the other runtime loading flags (-brtl), | ||
7378 | # -berok will link without error, but may produce a broken library. | ||
7379 | allow_undefined_flag='-berok' | ||
7380 | # Determine the default libpath from the value encoded in an empty executable. | ||
7381 | cat >conftest.$ac_ext <<_ACEOF | ||
7382 | /* confdefs.h. */ | ||
7383 | _ACEOF | ||
7384 | cat confdefs.h >>conftest.$ac_ext | ||
7385 | cat >>conftest.$ac_ext <<_ACEOF | ||
7386 | /* end confdefs.h. */ | ||
7387 | |||
7388 | int | ||
7389 | main () | ||
7390 | { | ||
7391 | |||
7392 | ; | ||
7393 | return 0; | ||
7394 | } | ||
7395 | _ACEOF | ||
7396 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
7397 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
7398 | (eval $ac_link) 2>conftest.er1 | ||
7399 | ac_status=$? | ||
7400 | grep -v '^ *+' conftest.er1 >conftest.err | ||
7401 | rm -f conftest.er1 | ||
7402 | cat conftest.err >&5 | ||
7403 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
7404 | (exit $ac_status); } && | ||
7405 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
7406 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
7407 | (eval $ac_try) 2>&5 | ||
7408 | ac_status=$? | ||
7409 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
7410 | (exit $ac_status); }; } && | ||
7411 | { ac_try='test -s conftest$ac_exeext' | ||
7412 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
7413 | (eval $ac_try) 2>&5 | ||
7414 | ac_status=$? | ||
7415 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
7416 | (exit $ac_status); }; }; then | ||
7417 | |||
7418 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
7419 | }'` | ||
7420 | # Check for a 64-bit object if we didn't find anything. | ||
7421 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
7422 | }'`; fi | ||
7423 | else | ||
7424 | echo "$as_me: failed program was:" >&5 | ||
7425 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
7426 | |||
7427 | fi | ||
7428 | rm -f conftest.err conftest.$ac_objext \ | ||
7429 | conftest$ac_exeext conftest.$ac_ext | ||
7430 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
7431 | |||
7432 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
7433 | archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" | ||
7434 | else | ||
7435 | if test "$host_cpu" = ia64; then | ||
7436 | hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' | ||
7437 | allow_undefined_flag="-z nodefs" | ||
7438 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" | ||
7439 | else | ||
7440 | # Determine the default libpath from the value encoded in an empty executable. | ||
7441 | cat >conftest.$ac_ext <<_ACEOF | ||
7442 | /* confdefs.h. */ | ||
7443 | _ACEOF | ||
7444 | cat confdefs.h >>conftest.$ac_ext | ||
7445 | cat >>conftest.$ac_ext <<_ACEOF | ||
7446 | /* end confdefs.h. */ | ||
7447 | |||
7448 | int | ||
7449 | main () | ||
7450 | { | ||
7451 | |||
7452 | ; | ||
7453 | return 0; | ||
7454 | } | ||
7455 | _ACEOF | ||
7456 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
7457 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
7458 | (eval $ac_link) 2>conftest.er1 | ||
7459 | ac_status=$? | ||
7460 | grep -v '^ *+' conftest.er1 >conftest.err | ||
7461 | rm -f conftest.er1 | ||
7462 | cat conftest.err >&5 | ||
7463 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
7464 | (exit $ac_status); } && | ||
7465 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
7466 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
7467 | (eval $ac_try) 2>&5 | ||
7468 | ac_status=$? | ||
7469 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
7470 | (exit $ac_status); }; } && | ||
7471 | { ac_try='test -s conftest$ac_exeext' | ||
7472 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
7473 | (eval $ac_try) 2>&5 | ||
7474 | ac_status=$? | ||
7475 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
7476 | (exit $ac_status); }; }; then | ||
7477 | |||
7478 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
7479 | }'` | ||
7480 | # Check for a 64-bit object if we didn't find anything. | ||
7481 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
7482 | }'`; fi | ||
7483 | else | ||
7484 | echo "$as_me: failed program was:" >&5 | ||
7485 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
7486 | |||
7487 | fi | ||
7488 | rm -f conftest.err conftest.$ac_objext \ | ||
7489 | conftest$ac_exeext conftest.$ac_ext | ||
7490 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
7491 | |||
7492 | hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
7493 | # Warning - without using the other run time loading flags, | ||
7494 | # -berok will link without error, but may produce a broken library. | ||
7495 | no_undefined_flag=' ${wl}-bernotok' | ||
7496 | allow_undefined_flag=' ${wl}-berok' | ||
7497 | # -bexpall does not export symbols beginning with underscore (_) | ||
7498 | always_export_symbols=yes | ||
7499 | # Exported symbols can be pulled into shared objects from archives | ||
7500 | whole_archive_flag_spec=' ' | ||
7501 | archive_cmds_need_lc=yes | ||
7502 | # This is similar to how AIX traditionally builds it's shared libraries. | ||
7503 | archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | ||
7504 | fi | ||
7505 | fi | ||
7506 | ;; | ||
7507 | |||
7508 | amigaos*) | ||
7509 | archive_cmds='$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)' | ||
7510 | hardcode_libdir_flag_spec='-L$libdir' | ||
7511 | hardcode_minus_L=yes | ||
7512 | # see comment about different semantics on the GNU ld section | ||
7513 | ld_shlibs=no | ||
7514 | ;; | ||
7515 | |||
7516 | bsdi4*) | ||
7517 | export_dynamic_flag_spec=-rdynamic | ||
7518 | ;; | ||
7519 | |||
7520 | cygwin* | mingw* | pw32*) | ||
7521 | # When not using gcc, we currently assume that we are using | ||
7522 | # Microsoft Visual C++. | ||
7523 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
7524 | # no search path for DLLs. | ||
7525 | hardcode_libdir_flag_spec=' ' | ||
7526 | allow_undefined_flag=unsupported | ||
7527 | # Tell ltmain to make .lib files, not .a files. | ||
7528 | libext=lib | ||
7529 | # Tell ltmain to make .dll files, not .so files. | ||
7530 | shrext_cmds=".dll" | ||
7531 | # FIXME: Setting linknames here is a bad hack. | ||
7532 | archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
7533 | # The linker will automatically build a .lib file if we build a DLL. | ||
7534 | old_archive_From_new_cmds='true' | ||
7535 | # FIXME: Should let the user specify the lib program. | ||
7536 | old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' | ||
7537 | fix_srcfile_path='`cygpath -w "$srcfile"`' | ||
7538 | enable_shared_with_static_runtimes=yes | ||
7539 | ;; | ||
7540 | |||
7541 | darwin* | rhapsody*) | ||
7542 | if test "$GXX" = yes ; then | ||
7543 | archive_cmds_need_lc=no | ||
7544 | case "$host_os" in | ||
7545 | rhapsody* | darwin1.[012]) | ||
7546 | allow_undefined_flag='-undefined suppress' | ||
7547 | ;; | ||
7548 | *) # Darwin 1.3 on | ||
7549 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then | ||
7550 | allow_undefined_flag='-flat_namespace -undefined suppress' | ||
7551 | else | ||
7552 | case ${MACOSX_DEPLOYMENT_TARGET} in | ||
7553 | 10.[012]) | ||
7554 | allow_undefined_flag='-flat_namespace -undefined suppress' | ||
7555 | ;; | ||
7556 | 10.*) | ||
7557 | allow_undefined_flag='-undefined dynamic_lookup' | ||
7558 | ;; | ||
7559 | esac | ||
7560 | fi | ||
7561 | ;; | ||
7562 | esac | ||
7563 | lt_int_apple_cc_single_mod=no | ||
7564 | output_verbose_link_cmd='echo' | ||
7565 | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then | ||
7566 | lt_int_apple_cc_single_mod=yes | ||
7567 | fi | ||
7568 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
7569 | archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' | ||
7570 | else | ||
7571 | archive_cmds='$CC -r ${wl}-bind_at_load -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' | ||
7572 | fi | ||
7573 | module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' | ||
7574 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's | ||
7575 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
7576 | archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
7577 | else | ||
7578 | archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
7579 | fi | ||
7580 | module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
7581 | hardcode_direct=no | ||
7582 | hardcode_automatic=yes | ||
7583 | hardcode_shlibpath_var=unsupported | ||
7584 | whole_archive_flag_spec='-all_load $convenience' | ||
7585 | link_all_deplibs=yes | ||
7586 | else | ||
7587 | ld_shlibs=no | ||
7588 | fi | ||
7589 | ;; | ||
7590 | |||
7591 | dgux*) | ||
7592 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7593 | hardcode_libdir_flag_spec='-L$libdir' | ||
7594 | hardcode_shlibpath_var=no | ||
7595 | ;; | ||
7596 | |||
7597 | freebsd1*) | ||
7598 | ld_shlibs=no | ||
7599 | ;; | ||
7600 | |||
7601 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | ||
7602 | # support. Future versions do this automatically, but an explicit c++rt0.o | ||
7603 | # does not break anything, and helps significantly (at the cost of a little | ||
7604 | # extra space). | ||
7605 | freebsd2.2*) | ||
7606 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | ||
7607 | hardcode_libdir_flag_spec='-R$libdir' | ||
7608 | hardcode_direct=yes | ||
7609 | hardcode_shlibpath_var=no | ||
7610 | ;; | ||
7611 | |||
7612 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. | ||
7613 | freebsd2*) | ||
7614 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
7615 | hardcode_direct=yes | ||
7616 | hardcode_minus_L=yes | ||
7617 | hardcode_shlibpath_var=no | ||
7618 | ;; | ||
7619 | |||
7620 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
7621 | freebsd* | kfreebsd*-gnu) | ||
7622 | archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | ||
7623 | hardcode_libdir_flag_spec='-R$libdir' | ||
7624 | hardcode_direct=yes | ||
7625 | hardcode_shlibpath_var=no | ||
7626 | ;; | ||
7627 | |||
7628 | hpux9*) | ||
7629 | if test "$GCC" = yes; then | ||
7630 | 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' | ||
7631 | else | ||
7632 | 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' | ||
7633 | fi | ||
7634 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | ||
7635 | hardcode_libdir_separator=: | ||
7636 | hardcode_direct=yes | ||
7637 | |||
7638 | # hardcode_minus_L: Not really in the search PATH, | ||
7639 | # but as the default location of the library. | ||
7640 | hardcode_minus_L=yes | ||
7641 | export_dynamic_flag_spec='${wl}-E' | ||
7642 | ;; | ||
7643 | |||
7644 | hpux10* | hpux11*) | ||
7645 | if test "$GCC" = yes -a "$with_gnu_ld" = no; then | ||
7646 | case "$host_cpu" in | ||
7647 | hppa*64*|ia64*) | ||
7648 | archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7649 | ;; | ||
7650 | *) | ||
7651 | archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
7652 | ;; | ||
7653 | esac | ||
7654 | else | ||
7655 | case "$host_cpu" in | ||
7656 | hppa*64*|ia64*) | ||
7657 | archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7658 | ;; | ||
7659 | *) | ||
7660 | archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
7661 | ;; | ||
7662 | esac | ||
7663 | fi | ||
7664 | if test "$with_gnu_ld" = no; then | ||
7665 | case "$host_cpu" in | ||
7666 | hppa*64*) | ||
7667 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | ||
7668 | hardcode_libdir_flag_spec_ld='+b $libdir' | ||
7669 | hardcode_libdir_separator=: | ||
7670 | hardcode_direct=no | ||
7671 | hardcode_shlibpath_var=no | ||
7672 | ;; | ||
7673 | ia64*) | ||
7674 | hardcode_libdir_flag_spec='-L$libdir' | ||
7675 | hardcode_direct=no | ||
7676 | hardcode_shlibpath_var=no | ||
7677 | |||
7678 | # hardcode_minus_L: Not really in the search PATH, | ||
7679 | # but as the default location of the library. | ||
7680 | hardcode_minus_L=yes | ||
7681 | ;; | ||
7682 | *) | ||
7683 | hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | ||
7684 | hardcode_libdir_separator=: | ||
7685 | hardcode_direct=yes | ||
7686 | export_dynamic_flag_spec='${wl}-E' | ||
7687 | |||
7688 | # hardcode_minus_L: Not really in the search PATH, | ||
7689 | # but as the default location of the library. | ||
7690 | hardcode_minus_L=yes | ||
7691 | ;; | ||
7692 | esac | ||
7693 | fi | ||
7694 | ;; | ||
7695 | |||
7696 | irix5* | irix6* | nonstopux*) | ||
7697 | if test "$GCC" = yes; then | ||
7698 | archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
7699 | else | ||
7700 | archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
7701 | hardcode_libdir_flag_spec_ld='-rpath $libdir' | ||
7702 | fi | ||
7703 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
7704 | hardcode_libdir_separator=: | ||
7705 | link_all_deplibs=yes | ||
7706 | ;; | ||
7707 | |||
7708 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
7709 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
7710 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | ||
7711 | else | ||
7712 | archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | ||
7713 | fi | ||
7714 | hardcode_libdir_flag_spec='-R$libdir' | ||
7715 | hardcode_direct=yes | ||
7716 | hardcode_shlibpath_var=no | ||
7717 | ;; | ||
7718 | |||
7719 | newsos6) | ||
7720 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7721 | hardcode_direct=yes | ||
7722 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
7723 | hardcode_libdir_separator=: | ||
7724 | hardcode_shlibpath_var=no | ||
7725 | ;; | ||
7726 | |||
7727 | openbsd*) | ||
7728 | hardcode_direct=yes | ||
7729 | hardcode_shlibpath_var=no | ||
7730 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
7731 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
7732 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | ||
7733 | export_dynamic_flag_spec='${wl}-E' | ||
7734 | else | ||
7735 | case $host_os in | ||
7736 | openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) | ||
7737 | archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
7738 | hardcode_libdir_flag_spec='-R$libdir' | ||
7739 | ;; | ||
7740 | *) | ||
7741 | archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
7742 | hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | ||
7743 | ;; | ||
7744 | esac | ||
7745 | fi | ||
7746 | ;; | ||
7747 | |||
7748 | os2*) | ||
7749 | hardcode_libdir_flag_spec='-L$libdir' | ||
7750 | hardcode_minus_L=yes | ||
7751 | allow_undefined_flag=unsupported | ||
7752 | 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' | ||
7753 | old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | ||
7754 | ;; | ||
7755 | |||
7756 | osf3*) | ||
7757 | if test "$GCC" = yes; then | ||
7758 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | ||
7759 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
7760 | else | ||
7761 | allow_undefined_flag=' -expect_unresolved \*' | ||
7762 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
7763 | fi | ||
7764 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
7765 | hardcode_libdir_separator=: | ||
7766 | ;; | ||
7767 | |||
7768 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
7769 | if test "$GCC" = yes; then | ||
7770 | allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | ||
7771 | archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
7772 | hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | ||
7773 | else | ||
7774 | allow_undefined_flag=' -expect_unresolved \*' | ||
7775 | archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
7776 | archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ | ||
7777 | $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' | ||
7778 | |||
7779 | # Both c and cxx compiler support -rpath directly | ||
7780 | hardcode_libdir_flag_spec='-rpath $libdir' | ||
7781 | fi | ||
7782 | hardcode_libdir_separator=: | ||
7783 | ;; | ||
7784 | |||
7785 | sco3.2v5*) | ||
7786 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7787 | hardcode_shlibpath_var=no | ||
7788 | export_dynamic_flag_spec='${wl}-Bexport' | ||
7789 | runpath_var=LD_RUN_PATH | ||
7790 | hardcode_runpath_var=yes | ||
7791 | ;; | ||
7792 | |||
7793 | solaris*) | ||
7794 | no_undefined_flag=' -z text' | ||
7795 | if test "$GCC" = yes; then | ||
7796 | archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7797 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
7798 | $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' | ||
7799 | else | ||
7800 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7801 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
7802 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | ||
7803 | fi | ||
7804 | hardcode_libdir_flag_spec='-R$libdir' | ||
7805 | hardcode_shlibpath_var=no | ||
7806 | case $host_os in | ||
7807 | solaris2.[0-5] | solaris2.[0-5].*) ;; | ||
7808 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) | ||
7809 | whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; | ||
7810 | esac | ||
7811 | link_all_deplibs=yes | ||
7812 | ;; | ||
7813 | |||
7814 | sunos4*) | ||
7815 | if test "x$host_vendor" = xsequent; then | ||
7816 | # Use $CC to link under sequent, because it throws in some extra .o | ||
7817 | # files that make .init and .fini sections work. | ||
7818 | archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7819 | else | ||
7820 | archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | ||
7821 | fi | ||
7822 | hardcode_libdir_flag_spec='-L$libdir' | ||
7823 | hardcode_direct=yes | ||
7824 | hardcode_minus_L=yes | ||
7825 | hardcode_shlibpath_var=no | ||
7826 | ;; | ||
7827 | |||
7828 | sysv4) | ||
7829 | case $host_vendor in | ||
7830 | sni) | ||
7831 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7832 | hardcode_direct=yes # is this really true??? | ||
7833 | ;; | ||
7834 | siemens) | ||
7835 | ## LD is ld it makes a PLAMLIB | ||
7836 | ## CC just makes a GrossModule. | ||
7837 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' | ||
7838 | reload_cmds='$CC -r -o $output$reload_objs' | ||
7839 | hardcode_direct=no | ||
7840 | ;; | ||
7841 | motorola) | ||
7842 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7843 | hardcode_direct=no #Motorola manual says yes, but my tests say they lie | ||
7844 | ;; | ||
7845 | esac | ||
7846 | runpath_var='LD_RUN_PATH' | ||
7847 | hardcode_shlibpath_var=no | ||
7848 | ;; | ||
7849 | |||
7850 | sysv4.3*) | ||
7851 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7852 | hardcode_shlibpath_var=no | ||
7853 | export_dynamic_flag_spec='-Bexport' | ||
7854 | ;; | ||
7855 | |||
7856 | sysv4*MP*) | ||
7857 | if test -d /usr/nec; then | ||
7858 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7859 | hardcode_shlibpath_var=no | ||
7860 | runpath_var=LD_RUN_PATH | ||
7861 | hardcode_runpath_var=yes | ||
7862 | ld_shlibs=yes | ||
7863 | fi | ||
7864 | ;; | ||
7865 | |||
7866 | sysv4.2uw2*) | ||
7867 | archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' | ||
7868 | hardcode_direct=yes | ||
7869 | hardcode_minus_L=no | ||
7870 | hardcode_shlibpath_var=no | ||
7871 | hardcode_runpath_var=yes | ||
7872 | runpath_var=LD_RUN_PATH | ||
7873 | ;; | ||
7874 | |||
7875 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) | ||
7876 | no_undefined_flag='${wl}-z ${wl}text' | ||
7877 | if test "$GCC" = yes; then | ||
7878 | archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7879 | else | ||
7880 | archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
7881 | fi | ||
7882 | runpath_var='LD_RUN_PATH' | ||
7883 | hardcode_shlibpath_var=no | ||
7884 | ;; | ||
7885 | |||
7886 | sysv5*) | ||
7887 | no_undefined_flag=' -z text' | ||
7888 | # $CC -shared without GNU ld will not create a library from C++ | ||
7889 | # object files and a static libstdc++, better avoid it by now | ||
7890 | archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7891 | archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
7892 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | ||
7893 | hardcode_libdir_flag_spec= | ||
7894 | hardcode_shlibpath_var=no | ||
7895 | runpath_var='LD_RUN_PATH' | ||
7896 | ;; | ||
7897 | |||
7898 | uts4*) | ||
7899 | archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
7900 | hardcode_libdir_flag_spec='-L$libdir' | ||
7901 | hardcode_shlibpath_var=no | ||
7902 | ;; | ||
7903 | |||
7904 | *) | ||
7905 | ld_shlibs=no | ||
7906 | ;; | ||
7907 | esac | ||
7908 | fi | ||
7909 | |||
7910 | echo "$as_me:$LINENO: result: $ld_shlibs" >&5 | ||
7911 | echo "${ECHO_T}$ld_shlibs" >&6 | ||
7912 | test "$ld_shlibs" = no && can_build_shared=no | ||
7913 | |||
7914 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | ||
7915 | if test "$GCC" = yes; then | ||
7916 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | ||
7917 | fi | ||
7918 | |||
7919 | # | ||
7920 | # Do we need to explicitly link libc? | ||
7921 | # | ||
7922 | case "x$archive_cmds_need_lc" in | ||
7923 | x|xyes) | ||
7924 | # Assume -lc should be added | ||
7925 | archive_cmds_need_lc=yes | ||
7926 | |||
7927 | if test "$enable_shared" = yes && test "$GCC" = yes; then | ||
7928 | case $archive_cmds in | ||
7929 | *'~'*) | ||
7930 | # FIXME: we may have to deal with multi-command sequences. | ||
7931 | ;; | ||
7932 | '$CC '*) | ||
7933 | # Test whether the compiler implicitly links with -lc since on some | ||
7934 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | ||
7935 | # to ld, don't add -lc before -lgcc. | ||
7936 | echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 | ||
7937 | echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 | ||
7938 | $rm conftest* | ||
7939 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
7940 | |||
7941 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
7942 | (eval $ac_compile) 2>&5 | ||
7943 | ac_status=$? | ||
7944 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
7945 | (exit $ac_status); } 2>conftest.err; then | ||
7946 | soname=conftest | ||
7947 | lib=conftest | ||
7948 | libobjs=conftest.$ac_objext | ||
7949 | deplibs= | ||
7950 | wl=$lt_prog_compiler_wl | ||
7951 | compiler_flags=-v | ||
7952 | linker_flags=-v | ||
7953 | verstring= | ||
7954 | output_objdir=. | ||
7955 | libname=conftest | ||
7956 | lt_save_allow_undefined_flag=$allow_undefined_flag | ||
7957 | allow_undefined_flag= | ||
7958 | if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 | ||
7959 | (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 | ||
7960 | ac_status=$? | ||
7961 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
7962 | (exit $ac_status); } | ||
7963 | then | ||
7964 | archive_cmds_need_lc=no | ||
7965 | else | ||
7966 | archive_cmds_need_lc=yes | ||
7967 | fi | ||
7968 | allow_undefined_flag=$lt_save_allow_undefined_flag | ||
7969 | else | ||
7970 | cat conftest.err 1>&5 | ||
7971 | fi | ||
7972 | $rm conftest* | ||
7973 | echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 | ||
7974 | echo "${ECHO_T}$archive_cmds_need_lc" >&6 | ||
7975 | ;; | ||
7976 | esac | ||
7977 | fi | ||
7978 | ;; | ||
7979 | esac | ||
7980 | |||
7981 | echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 | ||
7982 | echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 | ||
7983 | library_names_spec= | ||
7984 | libname_spec='lib$name' | ||
7985 | soname_spec= | ||
7986 | shrext_cmds=".so" | ||
7987 | postinstall_cmds= | ||
7988 | postuninstall_cmds= | ||
7989 | finish_cmds= | ||
7990 | finish_eval= | ||
7991 | shlibpath_var= | ||
7992 | shlibpath_overrides_runpath=unknown | ||
7993 | version_type=none | ||
7994 | dynamic_linker="$host_os ld.so" | ||
7995 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | ||
7996 | if test "$GCC" = yes; then | ||
7997 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | ||
7998 | if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then | ||
7999 | # if the path contains ";" then we assume it to be the separator | ||
8000 | # otherwise default to the standard path separator (i.e. ":") - it is | ||
8001 | # assumed that no part of a normal pathname contains ";" but that should | ||
8002 | # okay in the real world where ";" in dirpaths is itself problematic. | ||
8003 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
8004 | else | ||
8005 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
8006 | fi | ||
8007 | else | ||
8008 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | ||
8009 | fi | ||
8010 | need_lib_prefix=unknown | ||
8011 | hardcode_into_libs=no | ||
8012 | |||
8013 | # when you set need_version to no, make sure it does not cause -set_version | ||
8014 | # flags to be left without arguments | ||
8015 | need_version=unknown | ||
8016 | |||
8017 | case $host_os in | ||
8018 | aix3*) | ||
8019 | version_type=linux | ||
8020 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | ||
8021 | shlibpath_var=LIBPATH | ||
8022 | |||
8023 | # AIX 3 has no versioning support, so we append a major version to the name. | ||
8024 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8025 | ;; | ||
8026 | |||
8027 | aix4* | aix5*) | ||
8028 | version_type=linux | ||
8029 | need_lib_prefix=no | ||
8030 | need_version=no | ||
8031 | hardcode_into_libs=yes | ||
8032 | if test "$host_cpu" = ia64; then | ||
8033 | # AIX 5 supports IA64 | ||
8034 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | ||
8035 | shlibpath_var=LD_LIBRARY_PATH | ||
8036 | else | ||
8037 | # With GCC up to 2.95.x, collect2 would create an import file | ||
8038 | # for dependence libraries. The import file would start with | ||
8039 | # the line `#! .'. This would cause the generated library to | ||
8040 | # depend on `.', always an invalid library. This was fixed in | ||
8041 | # development snapshots of GCC prior to 3.0. | ||
8042 | case $host_os in | ||
8043 | aix4 | aix4.[01] | aix4.[01].*) | ||
8044 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | ||
8045 | echo ' yes ' | ||
8046 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | ||
8047 | : | ||
8048 | else | ||
8049 | can_build_shared=no | ||
8050 | fi | ||
8051 | ;; | ||
8052 | esac | ||
8053 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | ||
8054 | # soname into executable. Probably we can add versioning support to | ||
8055 | # collect2, so additional links can be useful in future. | ||
8056 | if test "$aix_use_runtimelinking" = yes; then | ||
8057 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | ||
8058 | # instead of lib<name>.a to let people know that these are not | ||
8059 | # typical AIX shared libraries. | ||
8060 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8061 | else | ||
8062 | # We preserve .a as extension for shared libraries through AIX4.2 | ||
8063 | # and later when we are not doing run time linking. | ||
8064 | library_names_spec='${libname}${release}.a $libname.a' | ||
8065 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8066 | fi | ||
8067 | shlibpath_var=LIBPATH | ||
8068 | fi | ||
8069 | ;; | ||
8070 | |||
8071 | amigaos*) | ||
8072 | library_names_spec='$libname.ixlibrary $libname.a' | ||
8073 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | ||
8074 | 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' | ||
8075 | ;; | ||
8076 | |||
8077 | beos*) | ||
8078 | library_names_spec='${libname}${shared_ext}' | ||
8079 | dynamic_linker="$host_os ld.so" | ||
8080 | shlibpath_var=LIBRARY_PATH | ||
8081 | ;; | ||
8082 | |||
8083 | bsdi4*) | ||
8084 | version_type=linux | ||
8085 | need_version=no | ||
8086 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8087 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8088 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | ||
8089 | shlibpath_var=LD_LIBRARY_PATH | ||
8090 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | ||
8091 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | ||
8092 | # the default ld.so.conf also contains /usr/contrib/lib and | ||
8093 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | ||
8094 | # libtool to hard-code these into programs | ||
8095 | ;; | ||
8096 | |||
8097 | cygwin* | mingw* | pw32*) | ||
8098 | version_type=windows | ||
8099 | shrext_cmds=".dll" | ||
8100 | need_version=no | ||
8101 | need_lib_prefix=no | ||
8102 | |||
8103 | case $GCC,$host_os in | ||
8104 | yes,cygwin* | yes,mingw* | yes,pw32*) | ||
8105 | library_names_spec='$libname.dll.a' | ||
8106 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
8107 | postinstall_cmds='base_file=`basename \${file}`~ | ||
8108 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ | ||
8109 | dldir=$destdir/`dirname \$dlpath`~ | ||
8110 | test -d \$dldir || mkdir -p \$dldir~ | ||
8111 | $install_prog $dir/$dlname \$dldir/$dlname' | ||
8112 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
8113 | dlpath=$dir/\$dldll~ | ||
8114 | $rm \$dlpath' | ||
8115 | shlibpath_overrides_runpath=yes | ||
8116 | |||
8117 | case $host_os in | ||
8118 | cygwin*) | ||
8119 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | ||
8120 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
8121 | sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" | ||
8122 | ;; | ||
8123 | mingw*) | ||
8124 | # MinGW DLLs use traditional 'lib' prefix | ||
8125 | soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
8126 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | ||
8127 | if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then | ||
8128 | # It is most probably a Windows format PATH printed by | ||
8129 | # mingw gcc, but we are running on Cygwin. Gcc prints its search | ||
8130 | # path with ; separators, and with drive letters. We can handle the | ||
8131 | # drive letters (cygwin fileutils understands them), so leave them, | ||
8132 | # especially as we might pass files found there to a mingw objdump, | ||
8133 | # which wouldn't understand a cygwinified path. Ahh. | ||
8134 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
8135 | else | ||
8136 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
8137 | fi | ||
8138 | ;; | ||
8139 | pw32*) | ||
8140 | # pw32 DLLs use 'pw' prefix rather than 'lib' | ||
8141 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' | ||
8142 | ;; | ||
8143 | esac | ||
8144 | ;; | ||
8145 | |||
8146 | *) | ||
8147 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
8148 | ;; | ||
8149 | esac | ||
8150 | dynamic_linker='Win32 ld.exe' | ||
8151 | # FIXME: first we should search . and the directory the executable is in | ||
8152 | shlibpath_var=PATH | ||
8153 | ;; | ||
8154 | |||
8155 | darwin* | rhapsody*) | ||
8156 | dynamic_linker="$host_os dyld" | ||
8157 | version_type=darwin | ||
8158 | need_lib_prefix=no | ||
8159 | need_version=no | ||
8160 | library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' | ||
8161 | soname_spec='${libname}${release}${major}$shared_ext' | ||
8162 | shlibpath_overrides_runpath=yes | ||
8163 | shlibpath_var=DYLD_LIBRARY_PATH | ||
8164 | shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' | ||
8165 | # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. | ||
8166 | if test "$GCC" = yes; then | ||
8167 | sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` | ||
8168 | else | ||
8169 | sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' | ||
8170 | fi | ||
8171 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | ||
8172 | ;; | ||
8173 | |||
8174 | dgux*) | ||
8175 | version_type=linux | ||
8176 | need_lib_prefix=no | ||
8177 | need_version=no | ||
8178 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | ||
8179 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8180 | shlibpath_var=LD_LIBRARY_PATH | ||
8181 | ;; | ||
8182 | |||
8183 | freebsd1*) | ||
8184 | dynamic_linker=no | ||
8185 | ;; | ||
8186 | |||
8187 | kfreebsd*-gnu) | ||
8188 | version_type=linux | ||
8189 | need_lib_prefix=no | ||
8190 | need_version=no | ||
8191 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
8192 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8193 | shlibpath_var=LD_LIBRARY_PATH | ||
8194 | shlibpath_overrides_runpath=no | ||
8195 | hardcode_into_libs=yes | ||
8196 | dynamic_linker='GNU ld.so' | ||
8197 | ;; | ||
8198 | |||
8199 | freebsd*) | ||
8200 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` | ||
8201 | version_type=freebsd-$objformat | ||
8202 | case $version_type in | ||
8203 | freebsd-elf*) | ||
8204 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
8205 | need_version=no | ||
8206 | need_lib_prefix=no | ||
8207 | ;; | ||
8208 | freebsd-*) | ||
8209 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | ||
8210 | need_version=yes | ||
8211 | ;; | ||
8212 | esac | ||
8213 | shlibpath_var=LD_LIBRARY_PATH | ||
8214 | case $host_os in | ||
8215 | freebsd2*) | ||
8216 | shlibpath_overrides_runpath=yes | ||
8217 | ;; | ||
8218 | freebsd3.01* | freebsdelf3.01*) | ||
8219 | shlibpath_overrides_runpath=yes | ||
8220 | hardcode_into_libs=yes | ||
8221 | ;; | ||
8222 | *) # from 3.2 on | ||
8223 | shlibpath_overrides_runpath=no | ||
8224 | hardcode_into_libs=yes | ||
8225 | ;; | ||
8226 | esac | ||
8227 | ;; | ||
8228 | |||
8229 | gnu*) | ||
8230 | version_type=linux | ||
8231 | need_lib_prefix=no | ||
8232 | need_version=no | ||
8233 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | ||
8234 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8235 | shlibpath_var=LD_LIBRARY_PATH | ||
8236 | hardcode_into_libs=yes | ||
8237 | ;; | ||
8238 | |||
8239 | hpux9* | hpux10* | hpux11*) | ||
8240 | # Give a soname corresponding to the major version so that dld.sl refuses to | ||
8241 | # link against other versions. | ||
8242 | version_type=sunos | ||
8243 | need_lib_prefix=no | ||
8244 | need_version=no | ||
8245 | case "$host_cpu" in | ||
8246 | ia64*) | ||
8247 | shrext_cmds='.so' | ||
8248 | hardcode_into_libs=yes | ||
8249 | dynamic_linker="$host_os dld.so" | ||
8250 | shlibpath_var=LD_LIBRARY_PATH | ||
8251 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
8252 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8253 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8254 | if test "X$HPUX_IA64_MODE" = X32; then | ||
8255 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | ||
8256 | else | ||
8257 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | ||
8258 | fi | ||
8259 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
8260 | ;; | ||
8261 | hppa*64*) | ||
8262 | shrext_cmds='.sl' | ||
8263 | hardcode_into_libs=yes | ||
8264 | dynamic_linker="$host_os dld.sl" | ||
8265 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | ||
8266 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
8267 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8268 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8269 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | ||
8270 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
8271 | ;; | ||
8272 | *) | ||
8273 | shrext_cmds='.sl' | ||
8274 | dynamic_linker="$host_os dld.sl" | ||
8275 | shlibpath_var=SHLIB_PATH | ||
8276 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | ||
8277 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8278 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8279 | ;; | ||
8280 | esac | ||
8281 | # HP-UX runs *really* slowly unless shared libraries are mode 555. | ||
8282 | postinstall_cmds='chmod 555 $lib' | ||
8283 | ;; | ||
8284 | |||
8285 | irix5* | irix6* | nonstopux*) | ||
8286 | case $host_os in | ||
8287 | nonstopux*) version_type=nonstopux ;; | ||
8288 | *) | ||
8289 | if test "$lt_cv_prog_gnu_ld" = yes; then | ||
8290 | version_type=linux | ||
8291 | else | ||
8292 | version_type=irix | ||
8293 | fi ;; | ||
8294 | esac | ||
8295 | need_lib_prefix=no | ||
8296 | need_version=no | ||
8297 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8298 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
8299 | case $host_os in | ||
8300 | irix5* | nonstopux*) | ||
8301 | libsuff= shlibsuff= | ||
8302 | ;; | ||
8303 | *) | ||
8304 | case $LD in # libtool.m4 will add one of these switches to LD | ||
8305 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | ||
8306 | libsuff= shlibsuff= libmagic=32-bit;; | ||
8307 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | ||
8308 | libsuff=32 shlibsuff=N32 libmagic=N32;; | ||
8309 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | ||
8310 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | ||
8311 | *) libsuff= shlibsuff= libmagic=never-match;; | ||
8312 | esac | ||
8313 | ;; | ||
8314 | esac | ||
8315 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | ||
8316 | shlibpath_overrides_runpath=no | ||
8317 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | ||
8318 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | ||
8319 | hardcode_into_libs=yes | ||
8320 | ;; | ||
8321 | |||
8322 | # No shared lib support for Linux oldld, aout, or coff. | ||
8323 | linux*oldld* | linux*aout* | linux*coff*) | ||
8324 | dynamic_linker=no | ||
8325 | ;; | ||
8326 | |||
8327 | # This must be Linux ELF. | ||
8328 | linux*) | ||
8329 | version_type=linux | ||
8330 | need_lib_prefix=no | ||
8331 | need_version=no | ||
8332 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8333 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8334 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | ||
8335 | shlibpath_var=LD_LIBRARY_PATH | ||
8336 | shlibpath_overrides_runpath=no | ||
8337 | # This implies no fast_install, which is unacceptable. | ||
8338 | # Some rework will be needed to allow for fast_install | ||
8339 | # before this can be enabled. | ||
8340 | hardcode_into_libs=yes | ||
8341 | |||
8342 | # Append ld.so.conf contents to the search path | ||
8343 | if test -f /etc/ld.so.conf; then | ||
8344 | lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` | ||
8345 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" | ||
8346 | fi | ||
8347 | |||
8348 | # We used to test for /lib/ld.so.1 and disable shared libraries on | ||
8349 | # powerpc, because MkLinux only supported shared libraries with the | ||
8350 | # GNU dynamic linker. Since this was broken with cross compilers, | ||
8351 | # most powerpc-linux boxes support dynamic linking these days and | ||
8352 | # people can always --disable-shared, the test was removed, and we | ||
8353 | # assume the GNU/Linux dynamic linker is in use. | ||
8354 | dynamic_linker='GNU/Linux ld.so' | ||
8355 | ;; | ||
8356 | |||
8357 | netbsdelf*-gnu) | ||
8358 | version_type=linux | ||
8359 | need_lib_prefix=no | ||
8360 | need_version=no | ||
8361 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
8362 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8363 | shlibpath_var=LD_LIBRARY_PATH | ||
8364 | shlibpath_overrides_runpath=no | ||
8365 | hardcode_into_libs=yes | ||
8366 | dynamic_linker='NetBSD ld.elf_so' | ||
8367 | ;; | ||
8368 | |||
8369 | knetbsd*-gnu) | ||
8370 | version_type=linux | ||
8371 | need_lib_prefix=no | ||
8372 | need_version=no | ||
8373 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
8374 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8375 | shlibpath_var=LD_LIBRARY_PATH | ||
8376 | shlibpath_overrides_runpath=no | ||
8377 | hardcode_into_libs=yes | ||
8378 | dynamic_linker='GNU ld.so' | ||
8379 | ;; | ||
8380 | |||
8381 | netbsd*) | ||
8382 | version_type=sunos | ||
8383 | need_lib_prefix=no | ||
8384 | need_version=no | ||
8385 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
8386 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
8387 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
8388 | dynamic_linker='NetBSD (a.out) ld.so' | ||
8389 | else | ||
8390 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
8391 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8392 | dynamic_linker='NetBSD ld.elf_so' | ||
8393 | fi | ||
8394 | shlibpath_var=LD_LIBRARY_PATH | ||
8395 | shlibpath_overrides_runpath=yes | ||
8396 | hardcode_into_libs=yes | ||
8397 | ;; | ||
8398 | |||
8399 | newsos6) | ||
8400 | version_type=linux | ||
8401 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8402 | shlibpath_var=LD_LIBRARY_PATH | ||
8403 | shlibpath_overrides_runpath=yes | ||
8404 | ;; | ||
8405 | |||
8406 | nto-qnx*) | ||
8407 | version_type=linux | ||
8408 | need_lib_prefix=no | ||
8409 | need_version=no | ||
8410 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8411 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8412 | shlibpath_var=LD_LIBRARY_PATH | ||
8413 | shlibpath_overrides_runpath=yes | ||
8414 | ;; | ||
8415 | |||
8416 | openbsd*) | ||
8417 | version_type=sunos | ||
8418 | need_lib_prefix=no | ||
8419 | need_version=yes | ||
8420 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
8421 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
8422 | shlibpath_var=LD_LIBRARY_PATH | ||
8423 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
8424 | case $host_os in | ||
8425 | openbsd2.[89] | openbsd2.[89].*) | ||
8426 | shlibpath_overrides_runpath=no | ||
8427 | ;; | ||
8428 | *) | ||
8429 | shlibpath_overrides_runpath=yes | ||
8430 | ;; | ||
8431 | esac | ||
8432 | else | ||
8433 | shlibpath_overrides_runpath=yes | ||
8434 | fi | ||
8435 | ;; | ||
8436 | |||
8437 | os2*) | ||
8438 | libname_spec='$name' | ||
8439 | shrext_cmds=".dll" | ||
8440 | need_lib_prefix=no | ||
8441 | library_names_spec='$libname${shared_ext} $libname.a' | ||
8442 | dynamic_linker='OS/2 ld.exe' | ||
8443 | shlibpath_var=LIBPATH | ||
8444 | ;; | ||
8445 | |||
8446 | osf3* | osf4* | osf5*) | ||
8447 | version_type=osf | ||
8448 | need_lib_prefix=no | ||
8449 | need_version=no | ||
8450 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8451 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8452 | shlibpath_var=LD_LIBRARY_PATH | ||
8453 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | ||
8454 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | ||
8455 | ;; | ||
8456 | |||
8457 | sco3.2v5*) | ||
8458 | version_type=osf | ||
8459 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8460 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8461 | shlibpath_var=LD_LIBRARY_PATH | ||
8462 | ;; | ||
8463 | |||
8464 | solaris*) | ||
8465 | version_type=linux | ||
8466 | need_lib_prefix=no | ||
8467 | need_version=no | ||
8468 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8469 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8470 | shlibpath_var=LD_LIBRARY_PATH | ||
8471 | shlibpath_overrides_runpath=yes | ||
8472 | hardcode_into_libs=yes | ||
8473 | # ldd complains unless libraries are executable | ||
8474 | postinstall_cmds='chmod +x $lib' | ||
8475 | ;; | ||
8476 | |||
8477 | sunos4*) | ||
8478 | version_type=sunos | ||
8479 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
8480 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | ||
8481 | shlibpath_var=LD_LIBRARY_PATH | ||
8482 | shlibpath_overrides_runpath=yes | ||
8483 | if test "$with_gnu_ld" = yes; then | ||
8484 | need_lib_prefix=no | ||
8485 | fi | ||
8486 | need_version=yes | ||
8487 | ;; | ||
8488 | |||
8489 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
8490 | version_type=linux | ||
8491 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8492 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8493 | shlibpath_var=LD_LIBRARY_PATH | ||
8494 | case $host_vendor in | ||
8495 | sni) | ||
8496 | shlibpath_overrides_runpath=no | ||
8497 | need_lib_prefix=no | ||
8498 | export_dynamic_flag_spec='${wl}-Blargedynsym' | ||
8499 | runpath_var=LD_RUN_PATH | ||
8500 | ;; | ||
8501 | siemens) | ||
8502 | need_lib_prefix=no | ||
8503 | ;; | ||
8504 | motorola) | ||
8505 | need_lib_prefix=no | ||
8506 | need_version=no | ||
8507 | shlibpath_overrides_runpath=no | ||
8508 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | ||
8509 | ;; | ||
8510 | esac | ||
8511 | ;; | ||
8512 | |||
8513 | sysv4*MP*) | ||
8514 | if test -d /usr/nec ;then | ||
8515 | version_type=linux | ||
8516 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | ||
8517 | soname_spec='$libname${shared_ext}.$major' | ||
8518 | shlibpath_var=LD_LIBRARY_PATH | ||
8519 | fi | ||
8520 | ;; | ||
8521 | |||
8522 | uts4*) | ||
8523 | version_type=linux | ||
8524 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
8525 | soname_spec='${libname}${release}${shared_ext}$major' | ||
8526 | shlibpath_var=LD_LIBRARY_PATH | ||
8527 | ;; | ||
8528 | |||
8529 | *) | ||
8530 | dynamic_linker=no | ||
8531 | ;; | ||
8532 | esac | ||
8533 | echo "$as_me:$LINENO: result: $dynamic_linker" >&5 | ||
8534 | echo "${ECHO_T}$dynamic_linker" >&6 | ||
8535 | test "$dynamic_linker" = no && can_build_shared=no | ||
8536 | |||
8537 | echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 | ||
8538 | echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 | ||
8539 | hardcode_action= | ||
8540 | if test -n "$hardcode_libdir_flag_spec" || \ | ||
8541 | test -n "$runpath_var " || \ | ||
8542 | test "X$hardcode_automatic"="Xyes" ; then | ||
8543 | |||
8544 | # We can hardcode non-existant directories. | ||
8545 | if test "$hardcode_direct" != no && | ||
8546 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | ||
8547 | # have to relink, otherwise we might link with an installed library | ||
8548 | # when we should be linking with a yet-to-be-installed one | ||
8549 | ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && | ||
8550 | test "$hardcode_minus_L" != no; then | ||
8551 | # Linking always hardcodes the temporary library directory. | ||
8552 | hardcode_action=relink | ||
8553 | else | ||
8554 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | ||
8555 | hardcode_action=immediate | ||
8556 | fi | ||
8557 | else | ||
8558 | # We cannot hardcode anything, or else we can only hardcode existing | ||
8559 | # directories. | ||
8560 | hardcode_action=unsupported | ||
8561 | fi | ||
8562 | echo "$as_me:$LINENO: result: $hardcode_action" >&5 | ||
8563 | echo "${ECHO_T}$hardcode_action" >&6 | ||
8564 | |||
8565 | if test "$hardcode_action" = relink; then | ||
8566 | # Fast installation is not supported | ||
8567 | enable_fast_install=no | ||
8568 | elif test "$shlibpath_overrides_runpath" = yes || | ||
8569 | test "$enable_shared" = no; then | ||
8570 | # Fast installation is not necessary | ||
8571 | enable_fast_install=needless | ||
8572 | fi | ||
8573 | |||
8574 | striplib= | ||
8575 | old_striplib= | ||
8576 | echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 | ||
8577 | echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 | ||
8578 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then | ||
8579 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | ||
8580 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | ||
8581 | echo "$as_me:$LINENO: result: yes" >&5 | ||
8582 | echo "${ECHO_T}yes" >&6 | ||
8583 | else | ||
8584 | # FIXME - insert some real tests, host_os isn't really good enough | ||
8585 | case $host_os in | ||
8586 | darwin*) | ||
8587 | if test -n "$STRIP" ; then | ||
8588 | striplib="$STRIP -x" | ||
8589 | echo "$as_me:$LINENO: result: yes" >&5 | ||
8590 | echo "${ECHO_T}yes" >&6 | ||
8591 | else | ||
8592 | echo "$as_me:$LINENO: result: no" >&5 | ||
8593 | echo "${ECHO_T}no" >&6 | ||
8594 | fi | ||
8595 | ;; | ||
8596 | *) | ||
8597 | echo "$as_me:$LINENO: result: no" >&5 | ||
8598 | echo "${ECHO_T}no" >&6 | ||
8599 | ;; | ||
8600 | esac | ||
8601 | fi | ||
8602 | |||
8603 | if test "x$enable_dlopen" != xyes; then | ||
8604 | enable_dlopen=unknown | ||
8605 | enable_dlopen_self=unknown | ||
8606 | enable_dlopen_self_static=unknown | ||
8607 | else | ||
8608 | lt_cv_dlopen=no | ||
8609 | lt_cv_dlopen_libs= | ||
8610 | |||
8611 | case $host_os in | ||
8612 | beos*) | ||
8613 | lt_cv_dlopen="load_add_on" | ||
8614 | lt_cv_dlopen_libs= | ||
8615 | lt_cv_dlopen_self=yes | ||
8616 | ;; | ||
8617 | |||
8618 | mingw* | pw32*) | ||
8619 | lt_cv_dlopen="LoadLibrary" | ||
8620 | lt_cv_dlopen_libs= | ||
8621 | ;; | ||
8622 | |||
8623 | cygwin*) | ||
8624 | lt_cv_dlopen="dlopen" | ||
8625 | lt_cv_dlopen_libs= | ||
8626 | ;; | ||
8627 | |||
8628 | darwin*) | ||
8629 | # if libdl is installed we need to link against it | ||
8630 | echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 | ||
8631 | echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 | ||
8632 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then | ||
8633 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
8634 | else | ||
8635 | ac_check_lib_save_LIBS=$LIBS | ||
8636 | LIBS="-ldl $LIBS" | ||
8637 | cat >conftest.$ac_ext <<_ACEOF | ||
8638 | /* confdefs.h. */ | ||
8639 | _ACEOF | ||
8640 | cat confdefs.h >>conftest.$ac_ext | ||
8641 | cat >>conftest.$ac_ext <<_ACEOF | ||
8642 | /* end confdefs.h. */ | ||
8643 | |||
8644 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
8645 | #ifdef __cplusplus | ||
8646 | extern "C" | ||
8647 | #endif | ||
8648 | /* We use char because int might match the return type of a gcc2 | ||
8649 | builtin and then its argument prototype would still apply. */ | ||
8650 | char dlopen (); | ||
8651 | int | ||
8652 | main () | ||
8653 | { | ||
8654 | dlopen (); | ||
8655 | ; | ||
8656 | return 0; | ||
8657 | } | ||
8658 | _ACEOF | ||
8659 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
8660 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
8661 | (eval $ac_link) 2>conftest.er1 | ||
8662 | ac_status=$? | ||
8663 | grep -v '^ *+' conftest.er1 >conftest.err | ||
8664 | rm -f conftest.er1 | ||
8665 | cat conftest.err >&5 | ||
8666 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8667 | (exit $ac_status); } && | ||
8668 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
8669 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
8670 | (eval $ac_try) 2>&5 | ||
8671 | ac_status=$? | ||
8672 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8673 | (exit $ac_status); }; } && | ||
8674 | { ac_try='test -s conftest$ac_exeext' | ||
8675 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
8676 | (eval $ac_try) 2>&5 | ||
8677 | ac_status=$? | ||
8678 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8679 | (exit $ac_status); }; }; then | ||
8680 | ac_cv_lib_dl_dlopen=yes | ||
8681 | else | ||
8682 | echo "$as_me: failed program was:" >&5 | ||
8683 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
8684 | |||
8685 | ac_cv_lib_dl_dlopen=no | ||
8686 | fi | ||
8687 | rm -f conftest.err conftest.$ac_objext \ | ||
8688 | conftest$ac_exeext conftest.$ac_ext | ||
8689 | LIBS=$ac_check_lib_save_LIBS | ||
8690 | fi | ||
8691 | echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 | ||
8692 | echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 | ||
8693 | if test $ac_cv_lib_dl_dlopen = yes; then | ||
8694 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" | ||
8695 | else | ||
8696 | |||
8697 | lt_cv_dlopen="dyld" | ||
8698 | lt_cv_dlopen_libs= | ||
8699 | lt_cv_dlopen_self=yes | ||
8700 | |||
8701 | fi | ||
8702 | |||
8703 | ;; | ||
8704 | |||
8705 | *) | ||
8706 | echo "$as_me:$LINENO: checking for shl_load" >&5 | ||
8707 | echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 | ||
8708 | if test "${ac_cv_func_shl_load+set}" = set; then | ||
8709 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
8710 | else | ||
8711 | cat >conftest.$ac_ext <<_ACEOF | ||
8712 | /* confdefs.h. */ | ||
8713 | _ACEOF | ||
8714 | cat confdefs.h >>conftest.$ac_ext | ||
8715 | cat >>conftest.$ac_ext <<_ACEOF | ||
8716 | /* end confdefs.h. */ | ||
8717 | /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. | ||
8718 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
8719 | #define shl_load innocuous_shl_load | ||
8720 | |||
8721 | /* System header to define __stub macros and hopefully few prototypes, | ||
8722 | which can conflict with char shl_load (); below. | ||
8723 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
8724 | <limits.h> exists even on freestanding compilers. */ | ||
8725 | |||
8726 | #ifdef __STDC__ | ||
8727 | # include <limits.h> | ||
8728 | #else | ||
8729 | # include <assert.h> | ||
8730 | #endif | ||
8731 | |||
8732 | #undef shl_load | ||
8733 | |||
8734 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
8735 | #ifdef __cplusplus | ||
8736 | extern "C" | ||
8737 | { | ||
8738 | #endif | ||
8739 | /* We use char because int might match the return type of a gcc2 | ||
8740 | builtin and then its argument prototype would still apply. */ | ||
8741 | char shl_load (); | ||
8742 | /* The GNU C library defines this for functions which it implements | ||
8743 | to always fail with ENOSYS. Some functions are actually named | ||
8744 | something starting with __ and the normal name is an alias. */ | ||
8745 | #if defined (__stub_shl_load) || defined (__stub___shl_load) | ||
8746 | choke me | ||
8747 | #else | ||
8748 | char (*f) () = shl_load; | ||
8749 | #endif | ||
8750 | #ifdef __cplusplus | ||
8751 | } | ||
8752 | #endif | ||
8753 | |||
8754 | int | ||
8755 | main () | ||
8756 | { | ||
8757 | return f != shl_load; | ||
8758 | ; | ||
8759 | return 0; | ||
8760 | } | ||
8761 | _ACEOF | ||
8762 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
8763 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
8764 | (eval $ac_link) 2>conftest.er1 | ||
8765 | ac_status=$? | ||
8766 | grep -v '^ *+' conftest.er1 >conftest.err | ||
8767 | rm -f conftest.er1 | ||
8768 | cat conftest.err >&5 | ||
8769 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8770 | (exit $ac_status); } && | ||
8771 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
8772 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
8773 | (eval $ac_try) 2>&5 | ||
8774 | ac_status=$? | ||
8775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8776 | (exit $ac_status); }; } && | ||
8777 | { ac_try='test -s conftest$ac_exeext' | ||
8778 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
8779 | (eval $ac_try) 2>&5 | ||
8780 | ac_status=$? | ||
8781 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8782 | (exit $ac_status); }; }; then | ||
8783 | ac_cv_func_shl_load=yes | ||
8784 | else | ||
8785 | echo "$as_me: failed program was:" >&5 | ||
8786 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
8787 | |||
8788 | ac_cv_func_shl_load=no | ||
8789 | fi | ||
8790 | rm -f conftest.err conftest.$ac_objext \ | ||
8791 | conftest$ac_exeext conftest.$ac_ext | ||
8792 | fi | ||
8793 | echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 | ||
8794 | echo "${ECHO_T}$ac_cv_func_shl_load" >&6 | ||
8795 | if test $ac_cv_func_shl_load = yes; then | ||
8796 | lt_cv_dlopen="shl_load" | ||
8797 | else | ||
8798 | echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 | ||
8799 | echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 | ||
8800 | if test "${ac_cv_lib_dld_shl_load+set}" = set; then | ||
8801 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
8802 | else | ||
8803 | ac_check_lib_save_LIBS=$LIBS | ||
8804 | LIBS="-ldld $LIBS" | ||
8805 | cat >conftest.$ac_ext <<_ACEOF | ||
8806 | /* confdefs.h. */ | ||
8807 | _ACEOF | ||
8808 | cat confdefs.h >>conftest.$ac_ext | ||
8809 | cat >>conftest.$ac_ext <<_ACEOF | ||
8810 | /* end confdefs.h. */ | ||
8811 | |||
8812 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
8813 | #ifdef __cplusplus | ||
8814 | extern "C" | ||
8815 | #endif | ||
8816 | /* We use char because int might match the return type of a gcc2 | ||
8817 | builtin and then its argument prototype would still apply. */ | ||
8818 | char shl_load (); | ||
8819 | int | ||
8820 | main () | ||
8821 | { | ||
8822 | shl_load (); | ||
8823 | ; | ||
8824 | return 0; | ||
8825 | } | ||
8826 | _ACEOF | ||
8827 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
8828 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
8829 | (eval $ac_link) 2>conftest.er1 | ||
8830 | ac_status=$? | ||
8831 | grep -v '^ *+' conftest.er1 >conftest.err | ||
8832 | rm -f conftest.er1 | ||
8833 | cat conftest.err >&5 | ||
8834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8835 | (exit $ac_status); } && | ||
8836 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
8837 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
8838 | (eval $ac_try) 2>&5 | ||
8839 | ac_status=$? | ||
8840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8841 | (exit $ac_status); }; } && | ||
8842 | { ac_try='test -s conftest$ac_exeext' | ||
8843 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
8844 | (eval $ac_try) 2>&5 | ||
8845 | ac_status=$? | ||
8846 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8847 | (exit $ac_status); }; }; then | ||
8848 | ac_cv_lib_dld_shl_load=yes | ||
8849 | else | ||
8850 | echo "$as_me: failed program was:" >&5 | ||
8851 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
8852 | |||
8853 | ac_cv_lib_dld_shl_load=no | ||
8854 | fi | ||
8855 | rm -f conftest.err conftest.$ac_objext \ | ||
8856 | conftest$ac_exeext conftest.$ac_ext | ||
8857 | LIBS=$ac_check_lib_save_LIBS | ||
8858 | fi | ||
8859 | echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 | ||
8860 | echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 | ||
8861 | if test $ac_cv_lib_dld_shl_load = yes; then | ||
8862 | lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" | ||
8863 | else | ||
8864 | echo "$as_me:$LINENO: checking for dlopen" >&5 | ||
8865 | echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 | ||
8866 | if test "${ac_cv_func_dlopen+set}" = set; then | ||
8867 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
8868 | else | ||
8869 | cat >conftest.$ac_ext <<_ACEOF | ||
8870 | /* confdefs.h. */ | ||
8871 | _ACEOF | ||
8872 | cat confdefs.h >>conftest.$ac_ext | ||
8873 | cat >>conftest.$ac_ext <<_ACEOF | ||
8874 | /* end confdefs.h. */ | ||
8875 | /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. | ||
8876 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
8877 | #define dlopen innocuous_dlopen | ||
8878 | |||
8879 | /* System header to define __stub macros and hopefully few prototypes, | ||
8880 | which can conflict with char dlopen (); below. | ||
8881 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
8882 | <limits.h> exists even on freestanding compilers. */ | ||
8883 | |||
8884 | #ifdef __STDC__ | ||
8885 | # include <limits.h> | ||
8886 | #else | ||
8887 | # include <assert.h> | ||
8888 | #endif | ||
8889 | |||
8890 | #undef dlopen | ||
8891 | |||
8892 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
8893 | #ifdef __cplusplus | ||
8894 | extern "C" | ||
8895 | { | ||
8896 | #endif | ||
8897 | /* We use char because int might match the return type of a gcc2 | ||
8898 | builtin and then its argument prototype would still apply. */ | ||
8899 | char dlopen (); | ||
8900 | /* The GNU C library defines this for functions which it implements | ||
8901 | to always fail with ENOSYS. Some functions are actually named | ||
8902 | something starting with __ and the normal name is an alias. */ | ||
8903 | #if defined (__stub_dlopen) || defined (__stub___dlopen) | ||
8904 | choke me | ||
8905 | #else | ||
8906 | char (*f) () = dlopen; | ||
8907 | #endif | ||
8908 | #ifdef __cplusplus | ||
8909 | } | ||
8910 | #endif | ||
8911 | |||
8912 | int | ||
8913 | main () | ||
8914 | { | ||
8915 | return f != dlopen; | ||
8916 | ; | ||
8917 | return 0; | ||
8918 | } | ||
8919 | _ACEOF | ||
8920 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
8921 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
8922 | (eval $ac_link) 2>conftest.er1 | ||
8923 | ac_status=$? | ||
8924 | grep -v '^ *+' conftest.er1 >conftest.err | ||
8925 | rm -f conftest.er1 | ||
8926 | cat conftest.err >&5 | ||
8927 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8928 | (exit $ac_status); } && | ||
8929 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
8930 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
8931 | (eval $ac_try) 2>&5 | ||
8932 | ac_status=$? | ||
8933 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8934 | (exit $ac_status); }; } && | ||
8935 | { ac_try='test -s conftest$ac_exeext' | ||
8936 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
8937 | (eval $ac_try) 2>&5 | ||
8938 | ac_status=$? | ||
8939 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8940 | (exit $ac_status); }; }; then | ||
8941 | ac_cv_func_dlopen=yes | ||
8942 | else | ||
8943 | echo "$as_me: failed program was:" >&5 | ||
8944 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
8945 | |||
8946 | ac_cv_func_dlopen=no | ||
8947 | fi | ||
8948 | rm -f conftest.err conftest.$ac_objext \ | ||
8949 | conftest$ac_exeext conftest.$ac_ext | ||
8950 | fi | ||
8951 | echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 | ||
8952 | echo "${ECHO_T}$ac_cv_func_dlopen" >&6 | ||
8953 | if test $ac_cv_func_dlopen = yes; then | ||
8954 | lt_cv_dlopen="dlopen" | ||
8955 | else | ||
8956 | echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 | ||
8957 | echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 | ||
8958 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then | ||
8959 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
8960 | else | ||
8961 | ac_check_lib_save_LIBS=$LIBS | ||
8962 | LIBS="-ldl $LIBS" | ||
8963 | cat >conftest.$ac_ext <<_ACEOF | ||
8964 | /* confdefs.h. */ | ||
8965 | _ACEOF | ||
8966 | cat confdefs.h >>conftest.$ac_ext | ||
8967 | cat >>conftest.$ac_ext <<_ACEOF | ||
8968 | /* end confdefs.h. */ | ||
8969 | |||
8970 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
8971 | #ifdef __cplusplus | ||
8972 | extern "C" | ||
8973 | #endif | ||
8974 | /* We use char because int might match the return type of a gcc2 | ||
8975 | builtin and then its argument prototype would still apply. */ | ||
8976 | char dlopen (); | ||
8977 | int | ||
8978 | main () | ||
8979 | { | ||
8980 | dlopen (); | ||
8981 | ; | ||
8982 | return 0; | ||
8983 | } | ||
8984 | _ACEOF | ||
8985 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
8986 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
8987 | (eval $ac_link) 2>conftest.er1 | ||
8988 | ac_status=$? | ||
8989 | grep -v '^ *+' conftest.er1 >conftest.err | ||
8990 | rm -f conftest.er1 | ||
8991 | cat conftest.err >&5 | ||
8992 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8993 | (exit $ac_status); } && | ||
8994 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
8995 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
8996 | (eval $ac_try) 2>&5 | ||
8997 | ac_status=$? | ||
8998 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
8999 | (exit $ac_status); }; } && | ||
9000 | { ac_try='test -s conftest$ac_exeext' | ||
9001 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
9002 | (eval $ac_try) 2>&5 | ||
9003 | ac_status=$? | ||
9004 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
9005 | (exit $ac_status); }; }; then | ||
9006 | ac_cv_lib_dl_dlopen=yes | ||
9007 | else | ||
9008 | echo "$as_me: failed program was:" >&5 | ||
9009 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
9010 | |||
9011 | ac_cv_lib_dl_dlopen=no | ||
9012 | fi | ||
9013 | rm -f conftest.err conftest.$ac_objext \ | ||
9014 | conftest$ac_exeext conftest.$ac_ext | ||
9015 | LIBS=$ac_check_lib_save_LIBS | ||
9016 | fi | ||
9017 | echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 | ||
9018 | echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 | ||
9019 | if test $ac_cv_lib_dl_dlopen = yes; then | ||
9020 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" | ||
9021 | else | ||
9022 | echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 | ||
9023 | echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 | ||
9024 | if test "${ac_cv_lib_svld_dlopen+set}" = set; then | ||
9025 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
9026 | else | ||
9027 | ac_check_lib_save_LIBS=$LIBS | ||
9028 | LIBS="-lsvld $LIBS" | ||
9029 | cat >conftest.$ac_ext <<_ACEOF | ||
9030 | /* confdefs.h. */ | ||
9031 | _ACEOF | ||
9032 | cat confdefs.h >>conftest.$ac_ext | ||
9033 | cat >>conftest.$ac_ext <<_ACEOF | ||
9034 | /* end confdefs.h. */ | ||
9035 | |||
9036 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
9037 | #ifdef __cplusplus | ||
9038 | extern "C" | ||
9039 | #endif | ||
9040 | /* We use char because int might match the return type of a gcc2 | ||
9041 | builtin and then its argument prototype would still apply. */ | ||
9042 | char dlopen (); | ||
9043 | int | ||
9044 | main () | ||
9045 | { | ||
9046 | dlopen (); | ||
9047 | ; | ||
9048 | return 0; | ||
9049 | } | ||
9050 | _ACEOF | ||
9051 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
9052 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
9053 | (eval $ac_link) 2>conftest.er1 | ||
9054 | ac_status=$? | ||
9055 | grep -v '^ *+' conftest.er1 >conftest.err | ||
9056 | rm -f conftest.er1 | ||
9057 | cat conftest.err >&5 | ||
9058 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
9059 | (exit $ac_status); } && | ||
9060 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
9061 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
9062 | (eval $ac_try) 2>&5 | ||
9063 | ac_status=$? | ||
9064 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
9065 | (exit $ac_status); }; } && | ||
9066 | { ac_try='test -s conftest$ac_exeext' | ||
9067 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
9068 | (eval $ac_try) 2>&5 | ||
9069 | ac_status=$? | ||
9070 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
9071 | (exit $ac_status); }; }; then | ||
9072 | ac_cv_lib_svld_dlopen=yes | ||
9073 | else | ||
9074 | echo "$as_me: failed program was:" >&5 | ||
9075 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
9076 | |||
9077 | ac_cv_lib_svld_dlopen=no | ||
9078 | fi | ||
9079 | rm -f conftest.err conftest.$ac_objext \ | ||
9080 | conftest$ac_exeext conftest.$ac_ext | ||
9081 | LIBS=$ac_check_lib_save_LIBS | ||
9082 | fi | ||
9083 | echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 | ||
9084 | echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 | ||
9085 | if test $ac_cv_lib_svld_dlopen = yes; then | ||
9086 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" | ||
9087 | else | ||
9088 | echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 | ||
9089 | echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 | ||
9090 | if test "${ac_cv_lib_dld_dld_link+set}" = set; then | ||
9091 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
9092 | else | ||
9093 | ac_check_lib_save_LIBS=$LIBS | ||
9094 | LIBS="-ldld $LIBS" | ||
9095 | cat >conftest.$ac_ext <<_ACEOF | ||
9096 | /* confdefs.h. */ | ||
9097 | _ACEOF | ||
9098 | cat confdefs.h >>conftest.$ac_ext | ||
9099 | cat >>conftest.$ac_ext <<_ACEOF | ||
9100 | /* end confdefs.h. */ | ||
9101 | |||
9102 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
9103 | #ifdef __cplusplus | ||
9104 | extern "C" | ||
9105 | #endif | ||
9106 | /* We use char because int might match the return type of a gcc2 | ||
9107 | builtin and then its argument prototype would still apply. */ | ||
9108 | char dld_link (); | ||
9109 | int | ||
9110 | main () | ||
9111 | { | ||
9112 | dld_link (); | ||
9113 | ; | ||
9114 | return 0; | ||
9115 | } | ||
9116 | _ACEOF | ||
9117 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
9118 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
9119 | (eval $ac_link) 2>conftest.er1 | ||
9120 | ac_status=$? | ||
9121 | grep -v '^ *+' conftest.er1 >conftest.err | ||
9122 | rm -f conftest.er1 | ||
9123 | cat conftest.err >&5 | ||
9124 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
9125 | (exit $ac_status); } && | ||
9126 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
9127 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
9128 | (eval $ac_try) 2>&5 | ||
9129 | ac_status=$? | ||
9130 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
9131 | (exit $ac_status); }; } && | ||
9132 | { ac_try='test -s conftest$ac_exeext' | ||
9133 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
9134 | (eval $ac_try) 2>&5 | ||
9135 | ac_status=$? | ||
9136 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
9137 | (exit $ac_status); }; }; then | ||
9138 | ac_cv_lib_dld_dld_link=yes | ||
9139 | else | ||
9140 | echo "$as_me: failed program was:" >&5 | ||
9141 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
9142 | |||
9143 | ac_cv_lib_dld_dld_link=no | ||
9144 | fi | ||
9145 | rm -f conftest.err conftest.$ac_objext \ | ||
9146 | conftest$ac_exeext conftest.$ac_ext | ||
9147 | LIBS=$ac_check_lib_save_LIBS | ||
9148 | fi | ||
9149 | echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 | ||
9150 | echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 | ||
9151 | if test $ac_cv_lib_dld_dld_link = yes; then | ||
9152 | lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" | ||
9153 | fi | ||
9154 | |||
9155 | |||
9156 | fi | ||
9157 | |||
9158 | |||
9159 | fi | ||
9160 | |||
9161 | |||
9162 | fi | ||
9163 | |||
9164 | |||
9165 | fi | ||
9166 | |||
9167 | |||
9168 | fi | ||
9169 | |||
9170 | ;; | ||
9171 | esac | ||
9172 | |||
9173 | if test "x$lt_cv_dlopen" != xno; then | ||
9174 | enable_dlopen=yes | ||
9175 | else | ||
9176 | enable_dlopen=no | ||
9177 | fi | ||
9178 | |||
9179 | case $lt_cv_dlopen in | ||
9180 | dlopen) | ||
9181 | save_CPPFLAGS="$CPPFLAGS" | ||
9182 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | ||
9183 | |||
9184 | save_LDFLAGS="$LDFLAGS" | ||
9185 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | ||
9186 | |||
9187 | save_LIBS="$LIBS" | ||
9188 | LIBS="$lt_cv_dlopen_libs $LIBS" | ||
9189 | |||
9190 | echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 | ||
9191 | echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 | ||
9192 | if test "${lt_cv_dlopen_self+set}" = set; then | ||
9193 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
9194 | else | ||
9195 | if test "$cross_compiling" = yes; then : | ||
9196 | lt_cv_dlopen_self=cross | ||
9197 | else | ||
9198 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
9199 | lt_status=$lt_dlunknown | ||
9200 | cat > conftest.$ac_ext <<EOF | ||
9201 | #line 9201 "configure" | ||
9202 | #include "confdefs.h" | ||
9203 | |||
9204 | #if HAVE_DLFCN_H | ||
9205 | #include <dlfcn.h> | ||
9206 | #endif | ||
9207 | |||
9208 | #include <stdio.h> | ||
9209 | |||
9210 | #ifdef RTLD_GLOBAL | ||
9211 | # define LT_DLGLOBAL RTLD_GLOBAL | ||
9212 | #else | ||
9213 | # ifdef DL_GLOBAL | ||
9214 | # define LT_DLGLOBAL DL_GLOBAL | ||
9215 | # else | ||
9216 | # define LT_DLGLOBAL 0 | ||
9217 | # endif | ||
9218 | #endif | ||
9219 | |||
9220 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | ||
9221 | find out it does not work in some platform. */ | ||
9222 | #ifndef LT_DLLAZY_OR_NOW | ||
9223 | # ifdef RTLD_LAZY | ||
9224 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | ||
9225 | # else | ||
9226 | # ifdef DL_LAZY | ||
9227 | # define LT_DLLAZY_OR_NOW DL_LAZY | ||
9228 | # else | ||
9229 | # ifdef RTLD_NOW | ||
9230 | # define LT_DLLAZY_OR_NOW RTLD_NOW | ||
9231 | # else | ||
9232 | # ifdef DL_NOW | ||
9233 | # define LT_DLLAZY_OR_NOW DL_NOW | ||
9234 | # else | ||
9235 | # define LT_DLLAZY_OR_NOW 0 | ||
9236 | # endif | ||
9237 | # endif | ||
9238 | # endif | ||
9239 | # endif | ||
9240 | #endif | ||
9241 | |||
9242 | #ifdef __cplusplus | ||
9243 | extern "C" void exit (int); | ||
9244 | #endif | ||
9245 | |||
9246 | void fnord() { int i=42;} | ||
9247 | int main () | ||
9248 | { | ||
9249 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
9250 | int status = $lt_dlunknown; | ||
9251 | |||
9252 | if (self) | ||
9253 | { | ||
9254 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | ||
9255 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | ||
9256 | /* dlclose (self); */ | ||
9257 | } | ||
9258 | |||
9259 | exit (status); | ||
9260 | } | ||
9261 | EOF | ||
9262 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
9263 | (eval $ac_link) 2>&5 | ||
9264 | ac_status=$? | ||
9265 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
9266 | (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then | ||
9267 | (./conftest; exit; ) 2>/dev/null | ||
9268 | lt_status=$? | ||
9269 | case x$lt_status in | ||
9270 | x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; | ||
9271 | x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; | ||
9272 | x$lt_unknown|x*) lt_cv_dlopen_self=no ;; | ||
9273 | esac | ||
9274 | else : | ||
9275 | # compilation failed | ||
9276 | lt_cv_dlopen_self=no | ||
9277 | fi | ||
9278 | fi | ||
9279 | rm -fr conftest* | ||
9280 | |||
9281 | |||
9282 | fi | ||
9283 | echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 | ||
9284 | echo "${ECHO_T}$lt_cv_dlopen_self" >&6 | ||
9285 | |||
9286 | if test "x$lt_cv_dlopen_self" = xyes; then | ||
9287 | LDFLAGS="$LDFLAGS $link_static_flag" | ||
9288 | echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 | ||
9289 | echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 | ||
9290 | if test "${lt_cv_dlopen_self_static+set}" = set; then | ||
9291 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
9292 | else | ||
9293 | if test "$cross_compiling" = yes; then : | ||
9294 | lt_cv_dlopen_self_static=cross | ||
9295 | else | ||
9296 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
9297 | lt_status=$lt_dlunknown | ||
9298 | cat > conftest.$ac_ext <<EOF | ||
9299 | #line 9299 "configure" | ||
9300 | #include "confdefs.h" | ||
9301 | |||
9302 | #if HAVE_DLFCN_H | ||
9303 | #include <dlfcn.h> | ||
9304 | #endif | ||
9305 | |||
9306 | #include <stdio.h> | ||
9307 | |||
9308 | #ifdef RTLD_GLOBAL | ||
9309 | # define LT_DLGLOBAL RTLD_GLOBAL | ||
9310 | #else | ||
9311 | # ifdef DL_GLOBAL | ||
9312 | # define LT_DLGLOBAL DL_GLOBAL | ||
9313 | # else | ||
9314 | # define LT_DLGLOBAL 0 | ||
9315 | # endif | ||
9316 | #endif | ||
9317 | |||
9318 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | ||
9319 | find out it does not work in some platform. */ | ||
9320 | #ifndef LT_DLLAZY_OR_NOW | ||
9321 | # ifdef RTLD_LAZY | ||
9322 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | ||
9323 | # else | ||
9324 | # ifdef DL_LAZY | ||
9325 | # define LT_DLLAZY_OR_NOW DL_LAZY | ||
9326 | # else | ||
9327 | # ifdef RTLD_NOW | ||
9328 | # define LT_DLLAZY_OR_NOW RTLD_NOW | ||
9329 | # else | ||
9330 | # ifdef DL_NOW | ||
9331 | # define LT_DLLAZY_OR_NOW DL_NOW | ||
9332 | # else | ||
9333 | # define LT_DLLAZY_OR_NOW 0 | ||
9334 | # endif | ||
9335 | # endif | ||
9336 | # endif | ||
9337 | # endif | ||
9338 | #endif | ||
9339 | |||
9340 | #ifdef __cplusplus | ||
9341 | extern "C" void exit (int); | ||
9342 | #endif | ||
9343 | |||
9344 | void fnord() { int i=42;} | ||
9345 | int main () | ||
9346 | { | ||
9347 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
9348 | int status = $lt_dlunknown; | ||
9349 | |||
9350 | if (self) | ||
9351 | { | ||
9352 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | ||
9353 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | ||
9354 | /* dlclose (self); */ | ||
9355 | } | ||
9356 | |||
9357 | exit (status); | ||
9358 | } | ||
9359 | EOF | ||
9360 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
9361 | (eval $ac_link) 2>&5 | ||
9362 | ac_status=$? | ||
9363 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
9364 | (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then | ||
9365 | (./conftest; exit; ) 2>/dev/null | ||
9366 | lt_status=$? | ||
9367 | case x$lt_status in | ||
9368 | x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; | ||
9369 | x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; | ||
9370 | x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; | ||
9371 | esac | ||
9372 | else : | ||
9373 | # compilation failed | ||
9374 | lt_cv_dlopen_self_static=no | ||
9375 | fi | ||
9376 | fi | ||
9377 | rm -fr conftest* | ||
9378 | |||
9379 | |||
9380 | fi | ||
9381 | echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 | ||
9382 | echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 | ||
9383 | fi | ||
9384 | |||
9385 | CPPFLAGS="$save_CPPFLAGS" | ||
9386 | LDFLAGS="$save_LDFLAGS" | ||
9387 | LIBS="$save_LIBS" | ||
9388 | ;; | ||
9389 | esac | ||
9390 | |||
9391 | case $lt_cv_dlopen_self in | ||
9392 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | ||
9393 | *) enable_dlopen_self=unknown ;; | ||
9394 | esac | ||
9395 | |||
9396 | case $lt_cv_dlopen_self_static in | ||
9397 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | ||
9398 | *) enable_dlopen_self_static=unknown ;; | ||
9399 | esac | ||
9400 | fi | ||
9401 | |||
9402 | |||
9403 | # Report which librarie types wil actually be built | ||
9404 | echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 | ||
9405 | echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 | ||
9406 | echo "$as_me:$LINENO: result: $can_build_shared" >&5 | ||
9407 | echo "${ECHO_T}$can_build_shared" >&6 | ||
9408 | |||
9409 | echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 | ||
9410 | echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 | ||
9411 | test "$can_build_shared" = "no" && enable_shared=no | ||
9412 | |||
9413 | # On AIX, shared libraries and static libraries use the same namespace, and | ||
9414 | # are all built from PIC. | ||
9415 | case "$host_os" in | ||
9416 | aix3*) | ||
9417 | test "$enable_shared" = yes && enable_static=no | ||
9418 | if test -n "$RANLIB"; then | ||
9419 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | ||
9420 | postinstall_cmds='$RANLIB $lib' | ||
9421 | fi | ||
9422 | ;; | ||
9423 | |||
9424 | aix4* | aix5*) | ||
9425 | if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | ||
9426 | test "$enable_shared" = yes && enable_static=no | ||
9427 | fi | ||
9428 | ;; | ||
9429 | darwin* | rhapsody*) | ||
9430 | if test "$GCC" = yes; then | ||
9431 | archive_cmds_need_lc=no | ||
9432 | case "$host_os" in | ||
9433 | rhapsody* | darwin1.[012]) | ||
9434 | allow_undefined_flag='-undefined suppress' | ||
9435 | ;; | ||
9436 | *) # Darwin 1.3 on | ||
9437 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then | ||
9438 | allow_undefined_flag='-flat_namespace -undefined suppress' | ||
9439 | else | ||
9440 | case ${MACOSX_DEPLOYMENT_TARGET} in | ||
9441 | 10.[012]) | ||
9442 | allow_undefined_flag='-flat_namespace -undefined suppress' | ||
9443 | ;; | ||
9444 | 10.*) | ||
9445 | allow_undefined_flag='-undefined dynamic_lookup' | ||
9446 | ;; | ||
9447 | esac | ||
9448 | fi | ||
9449 | ;; | ||
9450 | esac | ||
9451 | output_verbose_link_cmd='echo' | ||
9452 | archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' | ||
9453 | module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' | ||
9454 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's | ||
9455 | archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
9456 | module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
9457 | hardcode_direct=no | ||
9458 | hardcode_automatic=yes | ||
9459 | hardcode_shlibpath_var=unsupported | ||
9460 | whole_archive_flag_spec='-all_load $convenience' | ||
9461 | link_all_deplibs=yes | ||
9462 | else | ||
9463 | ld_shlibs=no | ||
9464 | fi | ||
9465 | ;; | ||
9466 | esac | ||
9467 | echo "$as_me:$LINENO: result: $enable_shared" >&5 | ||
9468 | echo "${ECHO_T}$enable_shared" >&6 | ||
9469 | |||
9470 | echo "$as_me:$LINENO: checking whether to build static libraries" >&5 | ||
9471 | echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 | ||
9472 | # Make sure either enable_shared or enable_static is yes. | ||
9473 | test "$enable_shared" = yes || enable_static=yes | ||
9474 | echo "$as_me:$LINENO: result: $enable_static" >&5 | ||
9475 | echo "${ECHO_T}$enable_static" >&6 | ||
9476 | |||
9477 | # The else clause should only fire when bootstrapping the | ||
9478 | # libtool distribution, otherwise you forgot to ship ltmain.sh | ||
9479 | # with your package, and you will get complaints that there are | ||
9480 | # no rules to generate ltmain.sh. | ||
9481 | if test -f "$ltmain"; then | ||
9482 | # See if we are running on zsh, and set the options which allow our commands through | ||
9483 | # without removal of \ escapes. | ||
9484 | if test -n "${ZSH_VERSION+set}" ; then | ||
9485 | setopt NO_GLOB_SUBST | ||
9486 | fi | ||
9487 | # Now quote all the things that may contain metacharacters while being | ||
9488 | # careful not to overquote the AC_SUBSTed values. We take copies of the | ||
9489 | # variables and quote the copies for generation of the libtool script. | ||
9490 | for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ | ||
9491 | SED SHELL STRIP \ | ||
9492 | libname_spec library_names_spec soname_spec extract_expsyms_cmds \ | ||
9493 | old_striplib striplib file_magic_cmd finish_cmds finish_eval \ | ||
9494 | deplibs_check_method reload_flag reload_cmds need_locks \ | ||
9495 | lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ | ||
9496 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
9497 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | ||
9498 | old_postinstall_cmds old_postuninstall_cmds \ | ||
9499 | compiler \ | ||
9500 | CC \ | ||
9501 | LD \ | ||
9502 | lt_prog_compiler_wl \ | ||
9503 | lt_prog_compiler_pic \ | ||
9504 | lt_prog_compiler_static \ | ||
9505 | lt_prog_compiler_no_builtin_flag \ | ||
9506 | export_dynamic_flag_spec \ | ||
9507 | thread_safe_flag_spec \ | ||
9508 | whole_archive_flag_spec \ | ||
9509 | enable_shared_with_static_runtimes \ | ||
9510 | old_archive_cmds \ | ||
9511 | old_archive_from_new_cmds \ | ||
9512 | predep_objects \ | ||
9513 | postdep_objects \ | ||
9514 | predeps \ | ||
9515 | postdeps \ | ||
9516 | compiler_lib_search_path \ | ||
9517 | archive_cmds \ | ||
9518 | archive_expsym_cmds \ | ||
9519 | postinstall_cmds \ | ||
9520 | postuninstall_cmds \ | ||
9521 | old_archive_from_expsyms_cmds \ | ||
9522 | allow_undefined_flag \ | ||
9523 | no_undefined_flag \ | ||
9524 | export_symbols_cmds \ | ||
9525 | hardcode_libdir_flag_spec \ | ||
9526 | hardcode_libdir_flag_spec_ld \ | ||
9527 | hardcode_libdir_separator \ | ||
9528 | hardcode_automatic \ | ||
9529 | module_cmds \ | ||
9530 | module_expsym_cmds \ | ||
9531 | lt_cv_prog_compiler_c_o \ | ||
9532 | exclude_expsyms \ | ||
9533 | include_expsyms; do | ||
9534 | |||
9535 | case $var in | ||
9536 | old_archive_cmds | \ | ||
9537 | old_archive_from_new_cmds | \ | ||
9538 | archive_cmds | \ | ||
9539 | archive_expsym_cmds | \ | ||
9540 | module_cmds | \ | ||
9541 | module_expsym_cmds | \ | ||
9542 | old_archive_from_expsyms_cmds | \ | ||
9543 | export_symbols_cmds | \ | ||
9544 | extract_expsyms_cmds | reload_cmds | finish_cmds | \ | ||
9545 | postinstall_cmds | postuninstall_cmds | \ | ||
9546 | old_postinstall_cmds | old_postuninstall_cmds | \ | ||
9547 | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | ||
9548 | # Double-quote double-evaled strings. | ||
9549 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" | ||
9550 | ;; | ||
9551 | *) | ||
9552 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" | ||
9553 | ;; | ||
9554 | esac | ||
9555 | done | ||
9556 | |||
9557 | case $lt_echo in | ||
9558 | *'\$0 --fallback-echo"') | ||
9559 | lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` | ||
9560 | ;; | ||
9561 | esac | ||
9562 | |||
9563 | cfgfile="${ofile}T" | ||
9564 | trap "$rm \"$cfgfile\"; exit 1" 1 2 15 | ||
9565 | $rm -f "$cfgfile" | ||
9566 | { echo "$as_me:$LINENO: creating $ofile" >&5 | ||
9567 | echo "$as_me: creating $ofile" >&6;} | ||
9568 | |||
9569 | cat <<__EOF__ >> "$cfgfile" | ||
9570 | #! $SHELL | ||
9571 | |||
9572 | # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. | ||
9573 | # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) | ||
9574 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. | ||
9575 | # | ||
9576 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 | ||
9577 | # Free Software Foundation, Inc. | ||
9578 | # | ||
9579 | # This file is part of GNU Libtool: | ||
9580 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | ||
9581 | # | ||
9582 | # This program is free software; you can redistribute it and/or modify | ||
9583 | # it under the terms of the GNU General Public License as published by | ||
9584 | # the Free Software Foundation; either version 2 of the License, or | ||
9585 | # (at your option) any later version. | ||
9586 | # | ||
9587 | # This program is distributed in the hope that it will be useful, but | ||
9588 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9589 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
9590 | # General Public License for more details. | ||
9591 | # | ||
9592 | # You should have received a copy of the GNU General Public License | ||
9593 | # along with this program; if not, write to the Free Software | ||
9594 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
9595 | # | ||
9596 | # As a special exception to the GNU General Public License, if you | ||
9597 | # distribute this file as part of a program that contains a | ||
9598 | # configuration script generated by Autoconf, you may include it under | ||
9599 | # the same distribution terms that you use for the rest of that program. | ||
9600 | |||
9601 | # A sed program that does not truncate output. | ||
9602 | SED=$lt_SED | ||
9603 | |||
9604 | # Sed that helps us avoid accidentally triggering echo(1) options like -n. | ||
9605 | Xsed="$SED -e s/^X//" | ||
9606 | |||
9607 | # The HP-UX ksh and POSIX shell print the target directory to stdout | ||
9608 | # if CDPATH is set. | ||
9609 | if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | ||
9610 | |||
9611 | # The names of the tagged configurations supported by this script. | ||
9612 | available_tags= | ||
9613 | |||
9614 | # ### BEGIN LIBTOOL CONFIG | ||
9615 | |||
9616 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | ||
9617 | |||
9618 | # Shell to use when invoking shell scripts. | ||
9619 | SHELL=$lt_SHELL | ||
9620 | |||
9621 | # Whether or not to build shared libraries. | ||
9622 | build_libtool_libs=$enable_shared | ||
9623 | |||
9624 | # Whether or not to build static libraries. | ||
9625 | build_old_libs=$enable_static | ||
9626 | |||
9627 | # Whether or not to add -lc for building shared libraries. | ||
9628 | build_libtool_need_lc=$archive_cmds_need_lc | ||
9629 | |||
9630 | # Whether or not to disallow shared libs when runtime libs are static | ||
9631 | allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes | ||
9632 | |||
9633 | # Whether or not to optimize for fast installation. | ||
9634 | fast_install=$enable_fast_install | ||
9635 | |||
9636 | # The host system. | ||
9637 | host_alias=$host_alias | ||
9638 | host=$host | ||
9639 | |||
9640 | # An echo program that does not interpret backslashes. | ||
9641 | echo=$lt_echo | ||
9642 | |||
9643 | # The archiver. | ||
9644 | AR=$lt_AR | ||
9645 | AR_FLAGS=$lt_AR_FLAGS | ||
9646 | |||
9647 | # A C compiler. | ||
9648 | LTCC=$lt_LTCC | ||
9649 | |||
9650 | # A language-specific compiler. | ||
9651 | CC=$lt_compiler | ||
9652 | |||
9653 | # Is the compiler the GNU C compiler? | ||
9654 | with_gcc=$GCC | ||
9655 | |||
9656 | # An ERE matcher. | ||
9657 | EGREP=$lt_EGREP | ||
9658 | |||
9659 | # The linker used to build libraries. | ||
9660 | LD=$lt_LD | ||
9661 | |||
9662 | # Whether we need hard or soft links. | ||
9663 | LN_S=$lt_LN_S | ||
9664 | |||
9665 | # A BSD-compatible nm program. | ||
9666 | NM=$lt_NM | ||
9667 | |||
9668 | # A symbol stripping program | ||
9669 | STRIP=$lt_STRIP | ||
9670 | |||
9671 | # Used to examine libraries when file_magic_cmd begins "file" | ||
9672 | MAGIC_CMD=$MAGIC_CMD | ||
9673 | |||
9674 | # Used on cygwin: DLL creation program. | ||
9675 | DLLTOOL="$DLLTOOL" | ||
9676 | |||
9677 | # Used on cygwin: object dumper. | ||
9678 | OBJDUMP="$OBJDUMP" | ||
9679 | |||
9680 | # Used on cygwin: assembler. | ||
9681 | AS="$AS" | ||
9682 | |||
9683 | # The name of the directory that contains temporary libtool files. | ||
9684 | objdir=$objdir | ||
9685 | |||
9686 | # How to create reloadable object files. | ||
9687 | reload_flag=$lt_reload_flag | ||
9688 | reload_cmds=$lt_reload_cmds | ||
9689 | |||
9690 | # How to pass a linker flag through the compiler. | ||
9691 | wl=$lt_lt_prog_compiler_wl | ||
9692 | |||
9693 | # Object file suffix (normally "o"). | ||
9694 | objext="$ac_objext" | ||
9695 | |||
9696 | # Old archive suffix (normally "a"). | ||
9697 | libext="$libext" | ||
9698 | |||
9699 | # Shared library suffix (normally ".so"). | ||
9700 | shrext_cmds='$shrext_cmds' | ||
9701 | |||
9702 | # Executable file suffix (normally ""). | ||
9703 | exeext="$exeext" | ||
9704 | |||
9705 | # Additional compiler flags for building library objects. | ||
9706 | pic_flag=$lt_lt_prog_compiler_pic | ||
9707 | pic_mode=$pic_mode | ||
9708 | |||
9709 | # What is the maximum length of a command? | ||
9710 | max_cmd_len=$lt_cv_sys_max_cmd_len | ||
9711 | |||
9712 | # Does compiler simultaneously support -c and -o options? | ||
9713 | compiler_c_o=$lt_lt_cv_prog_compiler_c_o | ||
9714 | |||
9715 | # Must we lock files when doing compilation ? | ||
9716 | need_locks=$lt_need_locks | ||
9717 | |||
9718 | # Do we need the lib prefix for modules? | ||
9719 | need_lib_prefix=$need_lib_prefix | ||
9720 | |||
9721 | # Do we need a version for libraries? | ||
9722 | need_version=$need_version | ||
9723 | |||
9724 | # Whether dlopen is supported. | ||
9725 | dlopen_support=$enable_dlopen | ||
9726 | |||
9727 | # Whether dlopen of programs is supported. | ||
9728 | dlopen_self=$enable_dlopen_self | ||
9729 | |||
9730 | # Whether dlopen of statically linked programs is supported. | ||
9731 | dlopen_self_static=$enable_dlopen_self_static | ||
9732 | |||
9733 | # Compiler flag to prevent dynamic linking. | ||
9734 | link_static_flag=$lt_lt_prog_compiler_static | ||
9735 | |||
9736 | # Compiler flag to turn off builtin functions. | ||
9737 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag | ||
9738 | |||
9739 | # Compiler flag to allow reflexive dlopens. | ||
9740 | export_dynamic_flag_spec=$lt_export_dynamic_flag_spec | ||
9741 | |||
9742 | # Compiler flag to generate shared objects directly from archives. | ||
9743 | whole_archive_flag_spec=$lt_whole_archive_flag_spec | ||
9744 | |||
9745 | # Compiler flag to generate thread-safe objects. | ||
9746 | thread_safe_flag_spec=$lt_thread_safe_flag_spec | ||
9747 | |||
9748 | # Library versioning type. | ||
9749 | version_type=$version_type | ||
9750 | |||
9751 | # Format of library name prefix. | ||
9752 | libname_spec=$lt_libname_spec | ||
9753 | |||
9754 | # List of archive names. First name is the real one, the rest are links. | ||
9755 | # The last name is the one that the linker finds with -lNAME. | ||
9756 | library_names_spec=$lt_library_names_spec | ||
9757 | |||
9758 | # The coded name of the library, if different from the real name. | ||
9759 | soname_spec=$lt_soname_spec | ||
9760 | |||
9761 | # Commands used to build and install an old-style archive. | ||
9762 | RANLIB=$lt_RANLIB | ||
9763 | old_archive_cmds=$lt_old_archive_cmds | ||
9764 | old_postinstall_cmds=$lt_old_postinstall_cmds | ||
9765 | old_postuninstall_cmds=$lt_old_postuninstall_cmds | ||
9766 | |||
9767 | # Create an old-style archive from a shared archive. | ||
9768 | old_archive_from_new_cmds=$lt_old_archive_from_new_cmds | ||
9769 | |||
9770 | # Create a temporary old-style archive to link instead of a shared archive. | ||
9771 | old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds | ||
9772 | |||
9773 | # Commands used to build and install a shared archive. | ||
9774 | archive_cmds=$lt_archive_cmds | ||
9775 | archive_expsym_cmds=$lt_archive_expsym_cmds | ||
9776 | postinstall_cmds=$lt_postinstall_cmds | ||
9777 | postuninstall_cmds=$lt_postuninstall_cmds | ||
9778 | |||
9779 | # Commands used to build a loadable module (assumed same as above if empty) | ||
9780 | module_cmds=$lt_module_cmds | ||
9781 | module_expsym_cmds=$lt_module_expsym_cmds | ||
9782 | |||
9783 | # Commands to strip libraries. | ||
9784 | old_striplib=$lt_old_striplib | ||
9785 | striplib=$lt_striplib | ||
9786 | |||
9787 | # Dependencies to place before the objects being linked to create a | ||
9788 | # shared library. | ||
9789 | predep_objects=$lt_predep_objects | ||
9790 | |||
9791 | # Dependencies to place after the objects being linked to create a | ||
9792 | # shared library. | ||
9793 | postdep_objects=$lt_postdep_objects | ||
9794 | |||
9795 | # Dependencies to place before the objects being linked to create a | ||
9796 | # shared library. | ||
9797 | predeps=$lt_predeps | ||
9798 | |||
9799 | # Dependencies to place after the objects being linked to create a | ||
9800 | # shared library. | ||
9801 | postdeps=$lt_postdeps | ||
9802 | |||
9803 | # The library search path used internally by the compiler when linking | ||
9804 | # a shared library. | ||
9805 | compiler_lib_search_path=$lt_compiler_lib_search_path | ||
9806 | |||
9807 | # Method to check whether dependent libraries are shared objects. | ||
9808 | deplibs_check_method=$lt_deplibs_check_method | ||
9809 | |||
9810 | # Command to use when deplibs_check_method == file_magic. | ||
9811 | file_magic_cmd=$lt_file_magic_cmd | ||
9812 | |||
9813 | # Flag that allows shared libraries with undefined symbols to be built. | ||
9814 | allow_undefined_flag=$lt_allow_undefined_flag | ||
9815 | |||
9816 | # Flag that forces no undefined symbols. | ||
9817 | no_undefined_flag=$lt_no_undefined_flag | ||
9818 | |||
9819 | # Commands used to finish a libtool library installation in a directory. | ||
9820 | finish_cmds=$lt_finish_cmds | ||
9821 | |||
9822 | # Same as above, but a single script fragment to be evaled but not shown. | ||
9823 | finish_eval=$lt_finish_eval | ||
9824 | |||
9825 | # Take the output of nm and produce a listing of raw symbols and C names. | ||
9826 | global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe | ||
9827 | |||
9828 | # Transform the output of nm in a proper C declaration | ||
9829 | global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl | ||
9830 | |||
9831 | # Transform the output of nm in a C name address pair | ||
9832 | global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address | ||
9833 | |||
9834 | # This is the shared library runtime path variable. | ||
9835 | runpath_var=$runpath_var | ||
9836 | |||
9837 | # This is the shared library path variable. | ||
9838 | shlibpath_var=$shlibpath_var | ||
9839 | |||
9840 | # Is shlibpath searched before the hard-coded library search path? | ||
9841 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath | ||
9842 | |||
9843 | # How to hardcode a shared library path into an executable. | ||
9844 | hardcode_action=$hardcode_action | ||
9845 | |||
9846 | # Whether we should hardcode library paths into libraries. | ||
9847 | hardcode_into_libs=$hardcode_into_libs | ||
9848 | |||
9849 | # Flag to hardcode \$libdir into a binary during linking. | ||
9850 | # This must work even if \$libdir does not exist. | ||
9851 | hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec | ||
9852 | |||
9853 | # If ld is used when linking, flag to hardcode \$libdir into | ||
9854 | # a binary during linking. This must work even if \$libdir does | ||
9855 | # not exist. | ||
9856 | hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld | ||
9857 | |||
9858 | # Whether we need a single -rpath flag with a separated argument. | ||
9859 | hardcode_libdir_separator=$lt_hardcode_libdir_separator | ||
9860 | |||
9861 | # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the | ||
9862 | # resulting binary. | ||
9863 | hardcode_direct=$hardcode_direct | ||
9864 | |||
9865 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | ||
9866 | # resulting binary. | ||
9867 | hardcode_minus_L=$hardcode_minus_L | ||
9868 | |||
9869 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | ||
9870 | # the resulting binary. | ||
9871 | hardcode_shlibpath_var=$hardcode_shlibpath_var | ||
9872 | |||
9873 | # Set to yes if building a shared library automatically hardcodes DIR into the library | ||
9874 | # and all subsequent libraries and executables linked against it. | ||
9875 | hardcode_automatic=$hardcode_automatic | ||
9876 | |||
9877 | # Variables whose values should be saved in libtool wrapper scripts and | ||
9878 | # restored at relink time. | ||
9879 | variables_saved_for_relink="$variables_saved_for_relink" | ||
9880 | |||
9881 | # Whether libtool must link a program against all its dependency libraries. | ||
9882 | link_all_deplibs=$link_all_deplibs | ||
9883 | |||
9884 | # Compile-time system search path for libraries | ||
9885 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec | ||
9886 | |||
9887 | # Run-time system search path for libraries | ||
9888 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec | ||
9889 | |||
9890 | # Fix the shell variable \$srcfile for the compiler. | ||
9891 | fix_srcfile_path="$fix_srcfile_path" | ||
9892 | |||
9893 | # Set to yes if exported symbols are required. | ||
9894 | always_export_symbols=$always_export_symbols | ||
9895 | |||
9896 | # The commands to list exported symbols. | ||
9897 | export_symbols_cmds=$lt_export_symbols_cmds | ||
9898 | |||
9899 | # The commands to extract the exported symbol list from a shared archive. | ||
9900 | extract_expsyms_cmds=$lt_extract_expsyms_cmds | ||
9901 | |||
9902 | # Symbols that should not be listed in the preloaded symbols. | ||
9903 | exclude_expsyms=$lt_exclude_expsyms | ||
9904 | |||
9905 | # Symbols that must always be exported. | ||
9906 | include_expsyms=$lt_include_expsyms | ||
9907 | |||
9908 | # ### END LIBTOOL CONFIG | ||
9909 | |||
9910 | __EOF__ | ||
9911 | |||
9912 | |||
9913 | case $host_os in | ||
9914 | aix3*) | ||
9915 | cat <<\EOF >> "$cfgfile" | ||
9916 | |||
9917 | # AIX sometimes has problems with the GCC collect2 program. For some | ||
9918 | # reason, if we set the COLLECT_NAMES environment variable, the problems | ||
9919 | # vanish in a puff of smoke. | ||
9920 | if test "X${COLLECT_NAMES+set}" != Xset; then | ||
9921 | COLLECT_NAMES= | ||
9922 | export COLLECT_NAMES | ||
9923 | fi | ||
9924 | EOF | ||
9925 | ;; | ||
9926 | esac | ||
9927 | |||
9928 | # We use sed instead of cat because bash on DJGPP gets confused if | ||
9929 | # if finds mixed CR/LF and LF-only lines. Since sed operates in | ||
9930 | # text mode, it properly converts lines to CR/LF. This bash problem | ||
9931 | # is reportedly fixed, but why not run on old versions too? | ||
9932 | sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) | ||
9933 | |||
9934 | mv -f "$cfgfile" "$ofile" || \ | ||
9935 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") | ||
9936 | chmod +x "$ofile" | ||
9937 | |||
9938 | else | ||
9939 | # If there is no Makefile yet, we rely on a make rule to execute | ||
9940 | # `config.status --recheck' to rerun these tests and create the | ||
9941 | # libtool script then. | ||
9942 | ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` | ||
9943 | if test -f "$ltmain_in"; then | ||
9944 | test -f Makefile && make "$ltmain" | ||
9945 | fi | ||
9946 | fi | ||
9947 | |||
9948 | |||
9949 | ac_ext=c | ||
9950 | ac_cpp='$CPP $CPPFLAGS' | ||
9951 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
9952 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
9953 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
9954 | |||
9955 | CC="$lt_save_CC" | ||
9956 | |||
9957 | |||
9958 | # Check whether --with-tags or --without-tags was given. | ||
9959 | if test "${with_tags+set}" = set; then | ||
9960 | withval="$with_tags" | ||
9961 | tagnames="$withval" | ||
9962 | fi; | ||
9963 | |||
9964 | if test -f "$ltmain" && test -n "$tagnames"; then | ||
9965 | if test ! -f "${ofile}"; then | ||
9966 | { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 | ||
9967 | echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} | ||
9968 | fi | ||
9969 | |||
9970 | if test -z "$LTCC"; then | ||
9971 | eval "`$SHELL ${ofile} --config | grep '^LTCC='`" | ||
9972 | if test -z "$LTCC"; then | ||
9973 | { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 | ||
9974 | echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} | ||
9975 | else | ||
9976 | { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 | ||
9977 | echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} | ||
9978 | fi | ||
9979 | fi | ||
9980 | |||
9981 | # Extract list of available tagged configurations in $ofile. | ||
9982 | # Note that this assumes the entire list is on one line. | ||
9983 | available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` | ||
9984 | |||
9985 | lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," | ||
9986 | for tagname in $tagnames; do | ||
9987 | IFS="$lt_save_ifs" | ||
9988 | # Check whether tagname contains only valid characters | ||
9989 | case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in | ||
9990 | "") ;; | ||
9991 | *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 | ||
9992 | echo "$as_me: error: invalid tag name: $tagname" >&2;} | ||
9993 | { (exit 1); exit 1; }; } | ||
9994 | ;; | ||
9995 | esac | ||
9996 | |||
9997 | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null | ||
9998 | then | ||
9999 | { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 | ||
10000 | echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} | ||
10001 | { (exit 1); exit 1; }; } | ||
10002 | fi | ||
10003 | |||
10004 | # Update the list of available tags. | ||
10005 | if test -n "$tagname"; then | ||
10006 | echo appending configuration tag \"$tagname\" to $ofile | ||
10007 | |||
10008 | case $tagname in | ||
10009 | CXX) | ||
10010 | if test -n "$CXX" && test "X$CXX" != "Xno"; then | ||
10011 | ac_ext=cc | ||
10012 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
10013 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
10014 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
10015 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu | ||
10016 | |||
10017 | |||
10018 | |||
10019 | |||
10020 | archive_cmds_need_lc_CXX=no | ||
10021 | allow_undefined_flag_CXX= | ||
10022 | always_export_symbols_CXX=no | ||
10023 | archive_expsym_cmds_CXX= | ||
10024 | export_dynamic_flag_spec_CXX= | ||
10025 | hardcode_direct_CXX=no | ||
10026 | hardcode_libdir_flag_spec_CXX= | ||
10027 | hardcode_libdir_flag_spec_ld_CXX= | ||
10028 | hardcode_libdir_separator_CXX= | ||
10029 | hardcode_minus_L_CXX=no | ||
10030 | hardcode_automatic_CXX=no | ||
10031 | module_cmds_CXX= | ||
10032 | module_expsym_cmds_CXX= | ||
10033 | link_all_deplibs_CXX=unknown | ||
10034 | old_archive_cmds_CXX=$old_archive_cmds | ||
10035 | no_undefined_flag_CXX= | ||
10036 | whole_archive_flag_spec_CXX= | ||
10037 | enable_shared_with_static_runtimes_CXX=no | ||
10038 | |||
10039 | # Dependencies to place before and after the object being linked: | ||
10040 | predep_objects_CXX= | ||
10041 | postdep_objects_CXX= | ||
10042 | predeps_CXX= | ||
10043 | postdeps_CXX= | ||
10044 | compiler_lib_search_path_CXX= | ||
10045 | |||
10046 | # Source file extension for C++ test sources. | ||
10047 | ac_ext=cc | ||
10048 | |||
10049 | # Object file extension for compiled C++ test sources. | ||
10050 | objext=o | ||
10051 | objext_CXX=$objext | ||
10052 | |||
10053 | # Code to be used in simple compile tests | ||
10054 | lt_simple_compile_test_code="int some_variable = 0;\n" | ||
10055 | |||
10056 | # Code to be used in simple link tests | ||
10057 | lt_simple_link_test_code='int main(int, char *) { return(0); }\n' | ||
10058 | |||
10059 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
10060 | |||
10061 | # If no C compiler was specified, use CC. | ||
10062 | LTCC=${LTCC-"$CC"} | ||
10063 | |||
10064 | # Allow CC to be a program name with arguments. | ||
10065 | compiler=$CC | ||
10066 | |||
10067 | |||
10068 | # Allow CC to be a program name with arguments. | ||
10069 | lt_save_CC=$CC | ||
10070 | lt_save_LD=$LD | ||
10071 | lt_save_GCC=$GCC | ||
10072 | GCC=$GXX | ||
10073 | lt_save_with_gnu_ld=$with_gnu_ld | ||
10074 | lt_save_path_LD=$lt_cv_path_LD | ||
10075 | if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then | ||
10076 | lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx | ||
10077 | else | ||
10078 | unset lt_cv_prog_gnu_ld | ||
10079 | fi | ||
10080 | if test -n "${lt_cv_path_LDCXX+set}"; then | ||
10081 | lt_cv_path_LD=$lt_cv_path_LDCXX | ||
10082 | else | ||
10083 | unset lt_cv_path_LD | ||
10084 | fi | ||
10085 | test -z "${LDCXX+set}" || LD=$LDCXX | ||
10086 | CC=${CXX-"c++"} | ||
10087 | compiler=$CC | ||
10088 | compiler_CXX=$CC | ||
10089 | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` | ||
10090 | |||
10091 | # We don't want -fno-exception wen compiling C++ code, so set the | ||
10092 | # no_builtin_flag separately | ||
10093 | if test "$GXX" = yes; then | ||
10094 | lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' | ||
10095 | else | ||
10096 | lt_prog_compiler_no_builtin_flag_CXX= | ||
10097 | fi | ||
10098 | |||
10099 | if test "$GXX" = yes; then | ||
10100 | # Set up default GNU C++ configuration | ||
10101 | |||
10102 | |||
10103 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | ||
10104 | if test "${with_gnu_ld+set}" = set; then | ||
10105 | withval="$with_gnu_ld" | ||
10106 | test "$withval" = no || with_gnu_ld=yes | ||
10107 | else | ||
10108 | with_gnu_ld=no | ||
10109 | fi; | ||
10110 | ac_prog=ld | ||
10111 | if test "$GCC" = yes; then | ||
10112 | # Check if gcc -print-prog-name=ld gives a path. | ||
10113 | echo "$as_me:$LINENO: checking for ld used by $CC" >&5 | ||
10114 | echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 | ||
10115 | case $host in | ||
10116 | *-*-mingw*) | ||
10117 | # gcc leaves a trailing carriage return which upsets mingw | ||
10118 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
10119 | *) | ||
10120 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
10121 | esac | ||
10122 | case $ac_prog in | ||
10123 | # Accept absolute paths. | ||
10124 | [\\/]* | ?:[\\/]*) | ||
10125 | re_direlt='/[^/][^/]*/\.\./' | ||
10126 | # Canonicalize the pathname of ld | ||
10127 | ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` | ||
10128 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | ||
10129 | ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` | ||
10130 | done | ||
10131 | test -z "$LD" && LD="$ac_prog" | ||
10132 | ;; | ||
10133 | "") | ||
10134 | # If it fails, then pretend we aren't using GCC. | ||
10135 | ac_prog=ld | ||
10136 | ;; | ||
10137 | *) | ||
10138 | # If it is relative, then search for the first ld in PATH. | ||
10139 | with_gnu_ld=unknown | ||
10140 | ;; | ||
10141 | esac | ||
10142 | elif test "$with_gnu_ld" = yes; then | ||
10143 | echo "$as_me:$LINENO: checking for GNU ld" >&5 | ||
10144 | echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 | ||
10145 | else | ||
10146 | echo "$as_me:$LINENO: checking for non-GNU ld" >&5 | ||
10147 | echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 | ||
10148 | fi | ||
10149 | if test "${lt_cv_path_LD+set}" = set; then | ||
10150 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
10151 | else | ||
10152 | if test -z "$LD"; then | ||
10153 | lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | ||
10154 | for ac_dir in $PATH; do | ||
10155 | IFS="$lt_save_ifs" | ||
10156 | test -z "$ac_dir" && ac_dir=. | ||
10157 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
10158 | lt_cv_path_LD="$ac_dir/$ac_prog" | ||
10159 | # Check to see if the program is GNU ld. I'd rather use --version, | ||
10160 | # but apparently some GNU ld's only accept -v. | ||
10161 | # Break only if it was the GNU/non-GNU ld that we prefer. | ||
10162 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in | ||
10163 | *GNU* | *'with BFD'*) | ||
10164 | test "$with_gnu_ld" != no && break | ||
10165 | ;; | ||
10166 | *) | ||
10167 | test "$with_gnu_ld" != yes && break | ||
10168 | ;; | ||
10169 | esac | ||
10170 | fi | ||
10171 | done | ||
10172 | IFS="$lt_save_ifs" | ||
10173 | else | ||
10174 | lt_cv_path_LD="$LD" # Let the user override the test with a path. | ||
10175 | fi | ||
10176 | fi | ||
10177 | |||
10178 | LD="$lt_cv_path_LD" | ||
10179 | if test -n "$LD"; then | ||
10180 | echo "$as_me:$LINENO: result: $LD" >&5 | ||
10181 | echo "${ECHO_T}$LD" >&6 | ||
10182 | else | ||
10183 | echo "$as_me:$LINENO: result: no" >&5 | ||
10184 | echo "${ECHO_T}no" >&6 | ||
10185 | fi | ||
10186 | test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 | ||
10187 | echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} | ||
10188 | { (exit 1); exit 1; }; } | ||
10189 | echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 | ||
10190 | echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 | ||
10191 | if test "${lt_cv_prog_gnu_ld+set}" = set; then | ||
10192 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
10193 | else | ||
10194 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | ||
10195 | case `$LD -v 2>&1 </dev/null` in | ||
10196 | *GNU* | *'with BFD'*) | ||
10197 | lt_cv_prog_gnu_ld=yes | ||
10198 | ;; | ||
10199 | *) | ||
10200 | lt_cv_prog_gnu_ld=no | ||
10201 | ;; | ||
10202 | esac | ||
10203 | fi | ||
10204 | echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 | ||
10205 | echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 | ||
10206 | with_gnu_ld=$lt_cv_prog_gnu_ld | ||
10207 | |||
10208 | |||
10209 | |||
10210 | # Check if GNU C++ uses GNU ld as the underlying linker, since the | ||
10211 | # archiving commands below assume that GNU ld is being used. | ||
10212 | if test "$with_gnu_ld" = yes; then | ||
10213 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
10214 | archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
10215 | |||
10216 | hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' | ||
10217 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | ||
10218 | |||
10219 | # If archive_cmds runs LD, not CC, wlarc should be empty | ||
10220 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to | ||
10221 | # investigate it a little bit more. (MM) | ||
10222 | wlarc='${wl}' | ||
10223 | |||
10224 | # ancient GNU ld didn't support --whole-archive et. al. | ||
10225 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ | ||
10226 | grep 'no-whole-archive' > /dev/null; then | ||
10227 | whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | ||
10228 | else | ||
10229 | whole_archive_flag_spec_CXX= | ||
10230 | fi | ||
10231 | else | ||
10232 | with_gnu_ld=no | ||
10233 | wlarc= | ||
10234 | |||
10235 | # A generic and very simple default shared library creation | ||
10236 | # command for GNU C++ for the case where it uses the native | ||
10237 | # linker, instead of GNU ld. If possible, this setting should | ||
10238 | # overridden to take advantage of the native linker features on | ||
10239 | # the platform it is being used on. | ||
10240 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' | ||
10241 | fi | ||
10242 | |||
10243 | # Commands to make compiler produce verbose output that lists | ||
10244 | # what "hidden" libraries, object files and flags are used when | ||
10245 | # linking a shared library. | ||
10246 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' | ||
10247 | |||
10248 | else | ||
10249 | GXX=no | ||
10250 | with_gnu_ld=no | ||
10251 | wlarc= | ||
10252 | fi | ||
10253 | |||
10254 | # PORTME: fill in a description of your system's C++ link characteristics | ||
10255 | echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 | ||
10256 | echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 | ||
10257 | ld_shlibs_CXX=yes | ||
10258 | case $host_os in | ||
10259 | aix3*) | ||
10260 | # FIXME: insert proper C++ library support | ||
10261 | ld_shlibs_CXX=no | ||
10262 | ;; | ||
10263 | aix4* | aix5*) | ||
10264 | if test "$host_cpu" = ia64; then | ||
10265 | # On IA64, the linker does run time linking by default, so we don't | ||
10266 | # have to do anything special. | ||
10267 | aix_use_runtimelinking=no | ||
10268 | exp_sym_flag='-Bexport' | ||
10269 | no_entry_flag="" | ||
10270 | else | ||
10271 | aix_use_runtimelinking=no | ||
10272 | |||
10273 | # Test if we are trying to use run time linking or normal | ||
10274 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | ||
10275 | # need to do runtime linking. | ||
10276 | case $host_os in aix4.[23]|aix4.[23].*|aix5*) | ||
10277 | for ld_flag in $LDFLAGS; do | ||
10278 | case $ld_flag in | ||
10279 | *-brtl*) | ||
10280 | aix_use_runtimelinking=yes | ||
10281 | break | ||
10282 | ;; | ||
10283 | esac | ||
10284 | done | ||
10285 | esac | ||
10286 | |||
10287 | exp_sym_flag='-bexport' | ||
10288 | no_entry_flag='-bnoentry' | ||
10289 | fi | ||
10290 | |||
10291 | # When large executables or shared objects are built, AIX ld can | ||
10292 | # have problems creating the table of contents. If linking a library | ||
10293 | # or program results in "error TOC overflow" add -mminimal-toc to | ||
10294 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | ||
10295 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | ||
10296 | |||
10297 | archive_cmds_CXX='' | ||
10298 | hardcode_direct_CXX=yes | ||
10299 | hardcode_libdir_separator_CXX=':' | ||
10300 | link_all_deplibs_CXX=yes | ||
10301 | |||
10302 | if test "$GXX" = yes; then | ||
10303 | case $host_os in aix4.012|aix4.012.*) | ||
10304 | # We only want to do this on AIX 4.2 and lower, the check | ||
10305 | # below for broken collect2 doesn't work under 4.3+ | ||
10306 | collect2name=`${CC} -print-prog-name=collect2` | ||
10307 | if test -f "$collect2name" && \ | ||
10308 | strings "$collect2name" | grep resolve_lib_name >/dev/null | ||
10309 | then | ||
10310 | # We have reworked collect2 | ||
10311 | hardcode_direct_CXX=yes | ||
10312 | else | ||
10313 | # We have old collect2 | ||
10314 | hardcode_direct_CXX=unsupported | ||
10315 | # It fails to find uninstalled libraries when the uninstalled | ||
10316 | # path is not listed in the libpath. Setting hardcode_minus_L | ||
10317 | # to unsupported forces relinking | ||
10318 | hardcode_minus_L_CXX=yes | ||
10319 | hardcode_libdir_flag_spec_CXX='-L$libdir' | ||
10320 | hardcode_libdir_separator_CXX= | ||
10321 | fi | ||
10322 | esac | ||
10323 | shared_flag='-shared' | ||
10324 | else | ||
10325 | # not using gcc | ||
10326 | if test "$host_cpu" = ia64; then | ||
10327 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | ||
10328 | # chokes on -Wl,-G. The following line is correct: | ||
10329 | shared_flag='-G' | ||
10330 | else | ||
10331 | if test "$aix_use_runtimelinking" = yes; then | ||
10332 | shared_flag='${wl}-G' | ||
10333 | else | ||
10334 | shared_flag='${wl}-bM:SRE' | ||
10335 | fi | ||
10336 | fi | ||
10337 | fi | ||
10338 | |||
10339 | # It seems that -bexpall does not export symbols beginning with | ||
10340 | # underscore (_), so it is better to generate a list of symbols to export. | ||
10341 | always_export_symbols_CXX=yes | ||
10342 | if test "$aix_use_runtimelinking" = yes; then | ||
10343 | # Warning - without using the other runtime loading flags (-brtl), | ||
10344 | # -berok will link without error, but may produce a broken library. | ||
10345 | allow_undefined_flag_CXX='-berok' | ||
10346 | # Determine the default libpath from the value encoded in an empty executable. | ||
10347 | cat >conftest.$ac_ext <<_ACEOF | ||
10348 | /* confdefs.h. */ | ||
10349 | _ACEOF | ||
10350 | cat confdefs.h >>conftest.$ac_ext | ||
10351 | cat >>conftest.$ac_ext <<_ACEOF | ||
10352 | /* end confdefs.h. */ | ||
10353 | |||
10354 | int | ||
10355 | main () | ||
10356 | { | ||
10357 | |||
10358 | ; | ||
10359 | return 0; | ||
10360 | } | ||
10361 | _ACEOF | ||
10362 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
10363 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
10364 | (eval $ac_link) 2>conftest.er1 | ||
10365 | ac_status=$? | ||
10366 | grep -v '^ *+' conftest.er1 >conftest.err | ||
10367 | rm -f conftest.er1 | ||
10368 | cat conftest.err >&5 | ||
10369 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
10370 | (exit $ac_status); } && | ||
10371 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
10372 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
10373 | (eval $ac_try) 2>&5 | ||
10374 | ac_status=$? | ||
10375 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
10376 | (exit $ac_status); }; } && | ||
10377 | { ac_try='test -s conftest$ac_exeext' | ||
10378 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
10379 | (eval $ac_try) 2>&5 | ||
10380 | ac_status=$? | ||
10381 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
10382 | (exit $ac_status); }; }; then | ||
10383 | |||
10384 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
10385 | }'` | ||
10386 | # Check for a 64-bit object if we didn't find anything. | ||
10387 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
10388 | }'`; fi | ||
10389 | else | ||
10390 | echo "$as_me: failed program was:" >&5 | ||
10391 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
10392 | |||
10393 | fi | ||
10394 | rm -f conftest.err conftest.$ac_objext \ | ||
10395 | conftest$ac_exeext conftest.$ac_ext | ||
10396 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
10397 | |||
10398 | hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
10399 | |||
10400 | archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" | ||
10401 | else | ||
10402 | if test "$host_cpu" = ia64; then | ||
10403 | hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' | ||
10404 | allow_undefined_flag_CXX="-z nodefs" | ||
10405 | archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" | ||
10406 | else | ||
10407 | # Determine the default libpath from the value encoded in an empty executable. | ||
10408 | cat >conftest.$ac_ext <<_ACEOF | ||
10409 | /* confdefs.h. */ | ||
10410 | _ACEOF | ||
10411 | cat confdefs.h >>conftest.$ac_ext | ||
10412 | cat >>conftest.$ac_ext <<_ACEOF | ||
10413 | /* end confdefs.h. */ | ||
10414 | |||
10415 | int | ||
10416 | main () | ||
10417 | { | ||
10418 | |||
10419 | ; | ||
10420 | return 0; | ||
10421 | } | ||
10422 | _ACEOF | ||
10423 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
10424 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
10425 | (eval $ac_link) 2>conftest.er1 | ||
10426 | ac_status=$? | ||
10427 | grep -v '^ *+' conftest.er1 >conftest.err | ||
10428 | rm -f conftest.er1 | ||
10429 | cat conftest.err >&5 | ||
10430 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
10431 | (exit $ac_status); } && | ||
10432 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
10433 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
10434 | (eval $ac_try) 2>&5 | ||
10435 | ac_status=$? | ||
10436 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
10437 | (exit $ac_status); }; } && | ||
10438 | { ac_try='test -s conftest$ac_exeext' | ||
10439 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
10440 | (eval $ac_try) 2>&5 | ||
10441 | ac_status=$? | ||
10442 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
10443 | (exit $ac_status); }; }; then | ||
10444 | |||
10445 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
10446 | }'` | ||
10447 | # Check for a 64-bit object if we didn't find anything. | ||
10448 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
10449 | }'`; fi | ||
10450 | else | ||
10451 | echo "$as_me: failed program was:" >&5 | ||
10452 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
10453 | |||
10454 | fi | ||
10455 | rm -f conftest.err conftest.$ac_objext \ | ||
10456 | conftest$ac_exeext conftest.$ac_ext | ||
10457 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
10458 | |||
10459 | hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
10460 | # Warning - without using the other run time loading flags, | ||
10461 | # -berok will link without error, but may produce a broken library. | ||
10462 | no_undefined_flag_CXX=' ${wl}-bernotok' | ||
10463 | allow_undefined_flag_CXX=' ${wl}-berok' | ||
10464 | # -bexpall does not export symbols beginning with underscore (_) | ||
10465 | always_export_symbols_CXX=yes | ||
10466 | # Exported symbols can be pulled into shared objects from archives | ||
10467 | whole_archive_flag_spec_CXX=' ' | ||
10468 | archive_cmds_need_lc_CXX=yes | ||
10469 | # This is similar to how AIX traditionally builds it's shared libraries. | ||
10470 | archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | ||
10471 | fi | ||
10472 | fi | ||
10473 | ;; | ||
10474 | chorus*) | ||
10475 | case $cc_basename in | ||
10476 | *) | ||
10477 | # FIXME: insert proper C++ library support | ||
10478 | ld_shlibs_CXX=no | ||
10479 | ;; | ||
10480 | esac | ||
10481 | ;; | ||
10482 | |||
10483 | cygwin* | mingw* | pw32*) | ||
10484 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, | ||
10485 | # as there is no search path for DLLs. | ||
10486 | hardcode_libdir_flag_spec_CXX='-L$libdir' | ||
10487 | allow_undefined_flag_CXX=unsupported | ||
10488 | always_export_symbols_CXX=no | ||
10489 | enable_shared_with_static_runtimes_CXX=yes | ||
10490 | |||
10491 | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then | ||
10492 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
10493 | # If the export-symbols file already is a .def file (1st line | ||
10494 | # is EXPORTS), use it as is; otherwise, prepend... | ||
10495 | archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
10496 | cp $export_symbols $output_objdir/$soname.def; | ||
10497 | else | ||
10498 | echo EXPORTS > $output_objdir/$soname.def; | ||
10499 | cat $export_symbols >> $output_objdir/$soname.def; | ||
10500 | fi~ | ||
10501 | $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
10502 | else | ||
10503 | ld_shlibs_CXX=no | ||
10504 | fi | ||
10505 | ;; | ||
10506 | |||
10507 | darwin* | rhapsody*) | ||
10508 | if test "$GXX" = yes; then | ||
10509 | archive_cmds_need_lc_CXX=no | ||
10510 | case "$host_os" in | ||
10511 | rhapsody* | darwin1.[012]) | ||
10512 | allow_undefined_flag_CXX='-undefined suppress' | ||
10513 | ;; | ||
10514 | *) # Darwin 1.3 on | ||
10515 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then | ||
10516 | allow_undefined_flag_CXX='-flat_namespace -undefined suppress' | ||
10517 | else | ||
10518 | case ${MACOSX_DEPLOYMENT_TARGET} in | ||
10519 | 10.[012]) | ||
10520 | allow_undefined_flag_CXX='-flat_namespace -undefined suppress' | ||
10521 | ;; | ||
10522 | 10.*) | ||
10523 | allow_undefined_flag_CXX='-undefined dynamic_lookup' | ||
10524 | ;; | ||
10525 | esac | ||
10526 | fi | ||
10527 | ;; | ||
10528 | esac | ||
10529 | lt_int_apple_cc_single_mod=no | ||
10530 | output_verbose_link_cmd='echo' | ||
10531 | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then | ||
10532 | lt_int_apple_cc_single_mod=yes | ||
10533 | fi | ||
10534 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
10535 | archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' | ||
10536 | else | ||
10537 | archive_cmds_CXX='$CC -r ${wl}-bind_at_load -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' | ||
10538 | fi | ||
10539 | module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' | ||
10540 | |||
10541 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's | ||
10542 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
10543 | archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
10544 | else | ||
10545 | archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
10546 | fi | ||
10547 | module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
10548 | hardcode_direct_CXX=no | ||
10549 | hardcode_automatic_CXX=yes | ||
10550 | hardcode_shlibpath_var_CXX=unsupported | ||
10551 | whole_archive_flag_spec_CXX='-all_load $convenience' | ||
10552 | link_all_deplibs_CXX=yes | ||
10553 | else | ||
10554 | ld_shlibs_CXX=no | ||
10555 | fi | ||
10556 | ;; | ||
10557 | |||
10558 | dgux*) | ||
10559 | case $cc_basename in | ||
10560 | ec++) | ||
10561 | # FIXME: insert proper C++ library support | ||
10562 | ld_shlibs_CXX=no | ||
10563 | ;; | ||
10564 | ghcx) | ||
10565 | # Green Hills C++ Compiler | ||
10566 | # FIXME: insert proper C++ library support | ||
10567 | ld_shlibs_CXX=no | ||
10568 | ;; | ||
10569 | *) | ||
10570 | # FIXME: insert proper C++ library support | ||
10571 | ld_shlibs_CXX=no | ||
10572 | ;; | ||
10573 | esac | ||
10574 | ;; | ||
10575 | freebsd12*) | ||
10576 | # C++ shared libraries reported to be fairly broken before switch to ELF | ||
10577 | ld_shlibs_CXX=no | ||
10578 | ;; | ||
10579 | freebsd-elf*) | ||
10580 | archive_cmds_need_lc_CXX=no | ||
10581 | ;; | ||
10582 | freebsd* | kfreebsd*-gnu) | ||
10583 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF | ||
10584 | # conventions | ||
10585 | ld_shlibs_CXX=yes | ||
10586 | ;; | ||
10587 | gnu*) | ||
10588 | ;; | ||
10589 | hpux9*) | ||
10590 | hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' | ||
10591 | hardcode_libdir_separator_CXX=: | ||
10592 | export_dynamic_flag_spec_CXX='${wl}-E' | ||
10593 | hardcode_direct_CXX=yes | ||
10594 | hardcode_minus_L_CXX=yes # Not in the search PATH, | ||
10595 | # but as the default | ||
10596 | # location of the library. | ||
10597 | |||
10598 | case $cc_basename in | ||
10599 | CC) | ||
10600 | # FIXME: insert proper C++ library support | ||
10601 | ld_shlibs_CXX=no | ||
10602 | ;; | ||
10603 | aCC) | ||
10604 | archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | ||
10605 | # Commands to make compiler produce verbose output that lists | ||
10606 | # what "hidden" libraries, object files and flags are used when | ||
10607 | # linking a shared library. | ||
10608 | # | ||
10609 | # There doesn't appear to be a way to prevent this compiler from | ||
10610 | # explicitly linking system object files so we need to strip them | ||
10611 | # from the output so that they don't get included in the library | ||
10612 | # dependencies. | ||
10613 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
10614 | ;; | ||
10615 | *) | ||
10616 | if test "$GXX" = yes; then | ||
10617 | archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' | ||
10618 | else | ||
10619 | # FIXME: insert proper C++ library support | ||
10620 | ld_shlibs_CXX=no | ||
10621 | fi | ||
10622 | ;; | ||
10623 | esac | ||
10624 | ;; | ||
10625 | hpux10*|hpux11*) | ||
10626 | if test $with_gnu_ld = no; then | ||
10627 | case "$host_cpu" in | ||
10628 | hppa*64*) | ||
10629 | hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' | ||
10630 | hardcode_libdir_flag_spec_ld_CXX='+b $libdir' | ||
10631 | hardcode_libdir_separator_CXX=: | ||
10632 | ;; | ||
10633 | ia64*) | ||
10634 | hardcode_libdir_flag_spec_CXX='-L$libdir' | ||
10635 | ;; | ||
10636 | *) | ||
10637 | hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' | ||
10638 | hardcode_libdir_separator_CXX=: | ||
10639 | export_dynamic_flag_spec_CXX='${wl}-E' | ||
10640 | ;; | ||
10641 | esac | ||
10642 | fi | ||
10643 | case "$host_cpu" in | ||
10644 | hppa*64*) | ||
10645 | hardcode_direct_CXX=no | ||
10646 | hardcode_shlibpath_var_CXX=no | ||
10647 | ;; | ||
10648 | ia64*) | ||
10649 | hardcode_direct_CXX=no | ||
10650 | hardcode_shlibpath_var_CXX=no | ||
10651 | hardcode_minus_L_CXX=yes # Not in the search PATH, | ||
10652 | # but as the default | ||
10653 | # location of the library. | ||
10654 | ;; | ||
10655 | *) | ||
10656 | hardcode_direct_CXX=yes | ||
10657 | hardcode_minus_L_CXX=yes # Not in the search PATH, | ||
10658 | # but as the default | ||
10659 | # location of the library. | ||
10660 | ;; | ||
10661 | esac | ||
10662 | |||
10663 | case $cc_basename in | ||
10664 | CC) | ||
10665 | # FIXME: insert proper C++ library support | ||
10666 | ld_shlibs_CXX=no | ||
10667 | ;; | ||
10668 | aCC) | ||
10669 | case "$host_cpu" in | ||
10670 | hppa*64*|ia64*) | ||
10671 | archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' | ||
10672 | ;; | ||
10673 | *) | ||
10674 | archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
10675 | ;; | ||
10676 | esac | ||
10677 | # Commands to make compiler produce verbose output that lists | ||
10678 | # what "hidden" libraries, object files and flags are used when | ||
10679 | # linking a shared library. | ||
10680 | # | ||
10681 | # There doesn't appear to be a way to prevent this compiler from | ||
10682 | # explicitly linking system object files so we need to strip them | ||
10683 | # from the output so that they don't get included in the library | ||
10684 | # dependencies. | ||
10685 | output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
10686 | ;; | ||
10687 | *) | ||
10688 | if test "$GXX" = yes; then | ||
10689 | if test $with_gnu_ld = no; then | ||
10690 | case "$host_cpu" in | ||
10691 | ia64*|hppa*64*) | ||
10692 | archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' | ||
10693 | ;; | ||
10694 | *) | ||
10695 | archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
10696 | ;; | ||
10697 | esac | ||
10698 | fi | ||
10699 | else | ||
10700 | # FIXME: insert proper C++ library support | ||
10701 | ld_shlibs_CXX=no | ||
10702 | fi | ||
10703 | ;; | ||
10704 | esac | ||
10705 | ;; | ||
10706 | irix5* | irix6*) | ||
10707 | case $cc_basename in | ||
10708 | CC) | ||
10709 | # SGI C++ | ||
10710 | archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' | ||
10711 | |||
10712 | # Archives containing C++ object files must be created using | ||
10713 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is | ||
10714 | # necessary to make sure instantiated templates are included | ||
10715 | # in the archive. | ||
10716 | old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' | ||
10717 | ;; | ||
10718 | *) | ||
10719 | if test "$GXX" = yes; then | ||
10720 | if test "$with_gnu_ld" = no; then | ||
10721 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' | ||
10722 | else | ||
10723 | archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' | ||
10724 | fi | ||
10725 | fi | ||
10726 | link_all_deplibs_CXX=yes | ||
10727 | ;; | ||
10728 | esac | ||
10729 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | ||
10730 | hardcode_libdir_separator_CXX=: | ||
10731 | ;; | ||
10732 | linux*) | ||
10733 | case $cc_basename in | ||
10734 | KCC) | ||
10735 | # Kuck and Associates, Inc. (KAI) C++ Compiler | ||
10736 | |||
10737 | # KCC will only create a shared library if the output file | ||
10738 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | ||
10739 | # to its proper name (with version) after linking. | ||
10740 | archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | ||
10741 | archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' | ||
10742 | # Commands to make compiler produce verbose output that lists | ||
10743 | # what "hidden" libraries, object files and flags are used when | ||
10744 | # linking a shared library. | ||
10745 | # | ||
10746 | # There doesn't appear to be a way to prevent this compiler from | ||
10747 | # explicitly linking system object files so we need to strip them | ||
10748 | # from the output so that they don't get included in the library | ||
10749 | # dependencies. | ||
10750 | output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
10751 | |||
10752 | hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' | ||
10753 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | ||
10754 | |||
10755 | # Archives containing C++ object files must be created using | ||
10756 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | ||
10757 | old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' | ||
10758 | ;; | ||
10759 | icpc) | ||
10760 | # Intel C++ | ||
10761 | with_gnu_ld=yes | ||
10762 | archive_cmds_need_lc_CXX=no | ||
10763 | archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
10764 | archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
10765 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | ||
10766 | export_dynamic_flag_spec_CXX='${wl}--export-dynamic' | ||
10767 | whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' | ||
10768 | ;; | ||
10769 | cxx) | ||
10770 | # Compaq C++ | ||
10771 | archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
10772 | archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' | ||
10773 | |||
10774 | runpath_var=LD_RUN_PATH | ||
10775 | hardcode_libdir_flag_spec_CXX='-rpath $libdir' | ||
10776 | hardcode_libdir_separator_CXX=: | ||
10777 | |||
10778 | # Commands to make compiler produce verbose output that lists | ||
10779 | # what "hidden" libraries, object files and flags are used when | ||
10780 | # linking a shared library. | ||
10781 | # | ||
10782 | # There doesn't appear to be a way to prevent this compiler from | ||
10783 | # explicitly linking system object files so we need to strip them | ||
10784 | # from the output so that they don't get included in the library | ||
10785 | # dependencies. | ||
10786 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
10787 | ;; | ||
10788 | esac | ||
10789 | ;; | ||
10790 | lynxos*) | ||
10791 | # FIXME: insert proper C++ library support | ||
10792 | ld_shlibs_CXX=no | ||
10793 | ;; | ||
10794 | m88k*) | ||
10795 | # FIXME: insert proper C++ library support | ||
10796 | ld_shlibs_CXX=no | ||
10797 | ;; | ||
10798 | mvs*) | ||
10799 | case $cc_basename in | ||
10800 | cxx) | ||
10801 | # FIXME: insert proper C++ library support | ||
10802 | ld_shlibs_CXX=no | ||
10803 | ;; | ||
10804 | *) | ||
10805 | # FIXME: insert proper C++ library support | ||
10806 | ld_shlibs_CXX=no | ||
10807 | ;; | ||
10808 | esac | ||
10809 | ;; | ||
10810 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
10811 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
10812 | archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' | ||
10813 | wlarc= | ||
10814 | hardcode_libdir_flag_spec_CXX='-R$libdir' | ||
10815 | hardcode_direct_CXX=yes | ||
10816 | hardcode_shlibpath_var_CXX=no | ||
10817 | fi | ||
10818 | # Workaround some broken pre-1.5 toolchains | ||
10819 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' | ||
10820 | ;; | ||
10821 | osf3*) | ||
10822 | case $cc_basename in | ||
10823 | KCC) | ||
10824 | # Kuck and Associates, Inc. (KAI) C++ Compiler | ||
10825 | |||
10826 | # KCC will only create a shared library if the output file | ||
10827 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | ||
10828 | # to its proper name (with version) after linking. | ||
10829 | archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | ||
10830 | |||
10831 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | ||
10832 | hardcode_libdir_separator_CXX=: | ||
10833 | |||
10834 | # Archives containing C++ object files must be created using | ||
10835 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. | ||
10836 | old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' | ||
10837 | |||
10838 | ;; | ||
10839 | RCC) | ||
10840 | # Rational C++ 2.4.1 | ||
10841 | # FIXME: insert proper C++ library support | ||
10842 | ld_shlibs_CXX=no | ||
10843 | ;; | ||
10844 | cxx) | ||
10845 | allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' | ||
10846 | archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' | ||
10847 | |||
10848 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | ||
10849 | hardcode_libdir_separator_CXX=: | ||
10850 | |||
10851 | # Commands to make compiler produce verbose output that lists | ||
10852 | # what "hidden" libraries, object files and flags are used when | ||
10853 | # linking a shared library. | ||
10854 | # | ||
10855 | # There doesn't appear to be a way to prevent this compiler from | ||
10856 | # explicitly linking system object files so we need to strip them | ||
10857 | # from the output so that they don't get included in the library | ||
10858 | # dependencies. | ||
10859 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
10860 | ;; | ||
10861 | *) | ||
10862 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | ||
10863 | allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' | ||
10864 | archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' | ||
10865 | |||
10866 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | ||
10867 | hardcode_libdir_separator_CXX=: | ||
10868 | |||
10869 | # Commands to make compiler produce verbose output that lists | ||
10870 | # what "hidden" libraries, object files and flags are used when | ||
10871 | # linking a shared library. | ||
10872 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' | ||
10873 | |||
10874 | else | ||
10875 | # FIXME: insert proper C++ library support | ||
10876 | ld_shlibs_CXX=no | ||
10877 | fi | ||
10878 | ;; | ||
10879 | esac | ||
10880 | ;; | ||
10881 | osf4* | osf5*) | ||
10882 | case $cc_basename in | ||
10883 | KCC) | ||
10884 | # Kuck and Associates, Inc. (KAI) C++ Compiler | ||
10885 | |||
10886 | # KCC will only create a shared library if the output file | ||
10887 | # ends with ".so" (or ".sl" for HP-UX), so rename the library | ||
10888 | # to its proper name (with version) after linking. | ||
10889 | archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' | ||
10890 | |||
10891 | hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' | ||
10892 | hardcode_libdir_separator_CXX=: | ||
10893 | |||
10894 | # Archives containing C++ object files must be created using | ||
10895 | # the KAI C++ compiler. | ||
10896 | old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' | ||
10897 | ;; | ||
10898 | RCC) | ||
10899 | # Rational C++ 2.4.1 | ||
10900 | # FIXME: insert proper C++ library support | ||
10901 | ld_shlibs_CXX=no | ||
10902 | ;; | ||
10903 | cxx) | ||
10904 | allow_undefined_flag_CXX=' -expect_unresolved \*' | ||
10905 | archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' | ||
10906 | archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ | ||
10907 | echo "-hidden">> $lib.exp~ | ||
10908 | $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ | ||
10909 | $rm $lib.exp' | ||
10910 | |||
10911 | hardcode_libdir_flag_spec_CXX='-rpath $libdir' | ||
10912 | hardcode_libdir_separator_CXX=: | ||
10913 | |||
10914 | # Commands to make compiler produce verbose output that lists | ||
10915 | # what "hidden" libraries, object files and flags are used when | ||
10916 | # linking a shared library. | ||
10917 | # | ||
10918 | # There doesn't appear to be a way to prevent this compiler from | ||
10919 | # explicitly linking system object files so we need to strip them | ||
10920 | # from the output so that they don't get included in the library | ||
10921 | # dependencies. | ||
10922 | output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
10923 | ;; | ||
10924 | *) | ||
10925 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | ||
10926 | allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' | ||
10927 | archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' | ||
10928 | |||
10929 | hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' | ||
10930 | hardcode_libdir_separator_CXX=: | ||
10931 | |||
10932 | # Commands to make compiler produce verbose output that lists | ||
10933 | # what "hidden" libraries, object files and flags are used when | ||
10934 | # linking a shared library. | ||
10935 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' | ||
10936 | |||
10937 | else | ||
10938 | # FIXME: insert proper C++ library support | ||
10939 | ld_shlibs_CXX=no | ||
10940 | fi | ||
10941 | ;; | ||
10942 | esac | ||
10943 | ;; | ||
10944 | psos*) | ||
10945 | # FIXME: insert proper C++ library support | ||
10946 | ld_shlibs_CXX=no | ||
10947 | ;; | ||
10948 | sco*) | ||
10949 | archive_cmds_need_lc_CXX=no | ||
10950 | case $cc_basename in | ||
10951 | CC) | ||
10952 | # FIXME: insert proper C++ library support | ||
10953 | ld_shlibs_CXX=no | ||
10954 | ;; | ||
10955 | *) | ||
10956 | # FIXME: insert proper C++ library support | ||
10957 | ld_shlibs_CXX=no | ||
10958 | ;; | ||
10959 | esac | ||
10960 | ;; | ||
10961 | sunos4*) | ||
10962 | case $cc_basename in | ||
10963 | CC) | ||
10964 | # Sun C++ 4.x | ||
10965 | # FIXME: insert proper C++ library support | ||
10966 | ld_shlibs_CXX=no | ||
10967 | ;; | ||
10968 | lcc) | ||
10969 | # Lucid | ||
10970 | # FIXME: insert proper C++ library support | ||
10971 | ld_shlibs_CXX=no | ||
10972 | ;; | ||
10973 | *) | ||
10974 | # FIXME: insert proper C++ library support | ||
10975 | ld_shlibs_CXX=no | ||
10976 | ;; | ||
10977 | esac | ||
10978 | ;; | ||
10979 | solaris*) | ||
10980 | case $cc_basename in | ||
10981 | CC) | ||
10982 | # Sun C++ 4.2, 5.x and Centerline C++ | ||
10983 | no_undefined_flag_CXX=' -zdefs' | ||
10984 | archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' | ||
10985 | archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
10986 | $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' | ||
10987 | |||
10988 | hardcode_libdir_flag_spec_CXX='-R$libdir' | ||
10989 | hardcode_shlibpath_var_CXX=no | ||
10990 | case $host_os in | ||
10991 | solaris2.0-5 | solaris2.0-5.*) ;; | ||
10992 | *) | ||
10993 | # The C++ compiler is used as linker so we must use $wl | ||
10994 | # flag to pass the commands to the underlying system | ||
10995 | # linker. | ||
10996 | # Supported since Solaris 2.6 (maybe 2.5.1?) | ||
10997 | whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' | ||
10998 | ;; | ||
10999 | esac | ||
11000 | link_all_deplibs_CXX=yes | ||
11001 | |||
11002 | # Commands to make compiler produce verbose output that lists | ||
11003 | # what "hidden" libraries, object files and flags are used when | ||
11004 | # linking a shared library. | ||
11005 | # | ||
11006 | # There doesn't appear to be a way to prevent this compiler from | ||
11007 | # explicitly linking system object files so we need to strip them | ||
11008 | # from the output so that they don't get included in the library | ||
11009 | # dependencies. | ||
11010 | output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' | ||
11011 | |||
11012 | # Archives containing C++ object files must be created using | ||
11013 | # "CC -xar", where "CC" is the Sun C++ compiler. This is | ||
11014 | # necessary to make sure instantiated templates are included | ||
11015 | # in the archive. | ||
11016 | old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' | ||
11017 | ;; | ||
11018 | gcx) | ||
11019 | # Green Hills C++ Compiler | ||
11020 | archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
11021 | |||
11022 | # The C++ compiler must be used to create the archive. | ||
11023 | old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' | ||
11024 | ;; | ||
11025 | *) | ||
11026 | # GNU C++ compiler with Solaris linker | ||
11027 | if test "$GXX" = yes && test "$with_gnu_ld" = no; then | ||
11028 | no_undefined_flag_CXX=' ${wl}-z ${wl}defs' | ||
11029 | if $CC --version | grep -v '^2\.7' > /dev/null; then | ||
11030 | archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
11031 | archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
11032 | $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' | ||
11033 | |||
11034 | # Commands to make compiler produce verbose output that lists | ||
11035 | # what "hidden" libraries, object files and flags are used when | ||
11036 | # linking a shared library. | ||
11037 | output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" | ||
11038 | else | ||
11039 | # g++ 2.7 appears to require `-G' NOT `-shared' on this | ||
11040 | # platform. | ||
11041 | archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' | ||
11042 | archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
11043 | $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' | ||
11044 | |||
11045 | # Commands to make compiler produce verbose output that lists | ||
11046 | # what "hidden" libraries, object files and flags are used when | ||
11047 | # linking a shared library. | ||
11048 | output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" | ||
11049 | fi | ||
11050 | |||
11051 | hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' | ||
11052 | fi | ||
11053 | ;; | ||
11054 | esac | ||
11055 | ;; | ||
11056 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) | ||
11057 | archive_cmds_need_lc_CXX=no | ||
11058 | ;; | ||
11059 | tandem*) | ||
11060 | case $cc_basename in | ||
11061 | NCC) | ||
11062 | # NonStop-UX NCC 3.20 | ||
11063 | # FIXME: insert proper C++ library support | ||
11064 | ld_shlibs_CXX=no | ||
11065 | ;; | ||
11066 | *) | ||
11067 | # FIXME: insert proper C++ library support | ||
11068 | ld_shlibs_CXX=no | ||
11069 | ;; | ||
11070 | esac | ||
11071 | ;; | ||
11072 | vxworks*) | ||
11073 | # FIXME: insert proper C++ library support | ||
11074 | ld_shlibs_CXX=no | ||
11075 | ;; | ||
11076 | *) | ||
11077 | # FIXME: insert proper C++ library support | ||
11078 | ld_shlibs_CXX=no | ||
11079 | ;; | ||
11080 | esac | ||
11081 | echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 | ||
11082 | echo "${ECHO_T}$ld_shlibs_CXX" >&6 | ||
11083 | test "$ld_shlibs_CXX" = no && can_build_shared=no | ||
11084 | |||
11085 | GCC_CXX="$GXX" | ||
11086 | LD_CXX="$LD" | ||
11087 | |||
11088 | |||
11089 | cat > conftest.$ac_ext <<EOF | ||
11090 | class Foo | ||
11091 | { | ||
11092 | public: | ||
11093 | Foo (void) { a = 0; } | ||
11094 | private: | ||
11095 | int a; | ||
11096 | }; | ||
11097 | EOF | ||
11098 | |||
11099 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
11100 | (eval $ac_compile) 2>&5 | ||
11101 | ac_status=$? | ||
11102 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
11103 | (exit $ac_status); }; then | ||
11104 | # Parse the compiler output and extract the necessary | ||
11105 | # objects, libraries and library flags. | ||
11106 | |||
11107 | # Sentinel used to keep track of whether or not we are before | ||
11108 | # the conftest object file. | ||
11109 | pre_test_object_deps_done=no | ||
11110 | |||
11111 | # The `*' in the case matches for architectures that use `case' in | ||
11112 | # $output_verbose_cmd can trigger glob expansion during the loop | ||
11113 | # eval without this substitution. | ||
11114 | output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" | ||
11115 | |||
11116 | for p in `eval $output_verbose_link_cmd`; do | ||
11117 | case $p in | ||
11118 | |||
11119 | -L* | -R* | -l*) | ||
11120 | # Some compilers place space between "-{L,R}" and the path. | ||
11121 | # Remove the space. | ||
11122 | if test $p = "-L" \ | ||
11123 | || test $p = "-R"; then | ||
11124 | prev=$p | ||
11125 | continue | ||
11126 | else | ||
11127 | prev= | ||
11128 | fi | ||
11129 | |||
11130 | if test "$pre_test_object_deps_done" = no; then | ||
11131 | case $p in | ||
11132 | -L* | -R*) | ||
11133 | # Internal compiler library paths should come after those | ||
11134 | # provided the user. The postdeps already come after the | ||
11135 | # user supplied libs so there is no need to process them. | ||
11136 | if test -z "$compiler_lib_search_path_CXX"; then | ||
11137 | compiler_lib_search_path_CXX="${prev}${p}" | ||
11138 | else | ||
11139 | compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" | ||
11140 | fi | ||
11141 | ;; | ||
11142 | # The "-l" case would never come before the object being | ||
11143 | # linked, so don't bother handling this case. | ||
11144 | esac | ||
11145 | else | ||
11146 | if test -z "$postdeps_CXX"; then | ||
11147 | postdeps_CXX="${prev}${p}" | ||
11148 | else | ||
11149 | postdeps_CXX="${postdeps_CXX} ${prev}${p}" | ||
11150 | fi | ||
11151 | fi | ||
11152 | ;; | ||
11153 | |||
11154 | *.$objext) | ||
11155 | # This assumes that the test object file only shows up | ||
11156 | # once in the compiler output. | ||
11157 | if test "$p" = "conftest.$objext"; then | ||
11158 | pre_test_object_deps_done=yes | ||
11159 | continue | ||
11160 | fi | ||
11161 | |||
11162 | if test "$pre_test_object_deps_done" = no; then | ||
11163 | if test -z "$predep_objects_CXX"; then | ||
11164 | predep_objects_CXX="$p" | ||
11165 | else | ||
11166 | predep_objects_CXX="$predep_objects_CXX $p" | ||
11167 | fi | ||
11168 | else | ||
11169 | if test -z "$postdep_objects_CXX"; then | ||
11170 | postdep_objects_CXX="$p" | ||
11171 | else | ||
11172 | postdep_objects_CXX="$postdep_objects_CXX $p" | ||
11173 | fi | ||
11174 | fi | ||
11175 | ;; | ||
11176 | |||
11177 | *) ;; # Ignore the rest. | ||
11178 | |||
11179 | esac | ||
11180 | done | ||
11181 | |||
11182 | # Clean up. | ||
11183 | rm -f a.out a.exe | ||
11184 | else | ||
11185 | echo "libtool.m4: error: problem compiling CXX test program" | ||
11186 | fi | ||
11187 | |||
11188 | $rm -f confest.$objext | ||
11189 | |||
11190 | case " $postdeps_CXX " in | ||
11191 | *" -lc "*) archive_cmds_need_lc_CXX=no ;; | ||
11192 | esac | ||
11193 | |||
11194 | lt_prog_compiler_wl_CXX= | ||
11195 | lt_prog_compiler_pic_CXX= | ||
11196 | lt_prog_compiler_static_CXX= | ||
11197 | |||
11198 | echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 | ||
11199 | echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 | ||
11200 | |||
11201 | # C++ specific cases for pic, static, wl, etc. | ||
11202 | if test "$GXX" = yes; then | ||
11203 | lt_prog_compiler_wl_CXX='-Wl,' | ||
11204 | lt_prog_compiler_static_CXX='-static' | ||
11205 | |||
11206 | case $host_os in | ||
11207 | aix*) | ||
11208 | # All AIX code is PIC. | ||
11209 | if test "$host_cpu" = ia64; then | ||
11210 | # AIX 5 now supports IA64 processor | ||
11211 | lt_prog_compiler_static_CXX='-Bstatic' | ||
11212 | fi | ||
11213 | ;; | ||
11214 | amigaos*) | ||
11215 | # FIXME: we need at least 68020 code to build shared libraries, but | ||
11216 | # adding the `-m68020' flag to GCC prevents building anything better, | ||
11217 | # like `-m68040'. | ||
11218 | lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' | ||
11219 | ;; | ||
11220 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | ||
11221 | # PIC is the default for these OSes. | ||
11222 | ;; | ||
11223 | mingw* | os2* | pw32*) | ||
11224 | # This hack is so that the source file can tell whether it is being | ||
11225 | # built for inclusion in a dll (and should export symbols for example). | ||
11226 | lt_prog_compiler_pic_CXX='-DDLL_EXPORT' | ||
11227 | ;; | ||
11228 | darwin* | rhapsody*) | ||
11229 | # PIC is the default on this platform | ||
11230 | # Common symbols not allowed in MH_DYLIB files | ||
11231 | lt_prog_compiler_pic_CXX='-fno-common' | ||
11232 | ;; | ||
11233 | *djgpp*) | ||
11234 | # DJGPP does not support shared libraries at all | ||
11235 | lt_prog_compiler_pic_CXX= | ||
11236 | ;; | ||
11237 | sysv4*MP*) | ||
11238 | if test -d /usr/nec; then | ||
11239 | lt_prog_compiler_pic_CXX=-Kconform_pic | ||
11240 | fi | ||
11241 | ;; | ||
11242 | hpux*) | ||
11243 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
11244 | # not for PA HP-UX. | ||
11245 | case "$host_cpu" in | ||
11246 | hppa*64*|ia64*) | ||
11247 | ;; | ||
11248 | *) | ||
11249 | lt_prog_compiler_pic_CXX='-fPIC' | ||
11250 | ;; | ||
11251 | esac | ||
11252 | ;; | ||
11253 | *) | ||
11254 | lt_prog_compiler_pic_CXX='-fPIC' | ||
11255 | ;; | ||
11256 | esac | ||
11257 | else | ||
11258 | case $host_os in | ||
11259 | aix4* | aix5*) | ||
11260 | # All AIX code is PIC. | ||
11261 | if test "$host_cpu" = ia64; then | ||
11262 | # AIX 5 now supports IA64 processor | ||
11263 | lt_prog_compiler_static_CXX='-Bstatic' | ||
11264 | else | ||
11265 | lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' | ||
11266 | fi | ||
11267 | ;; | ||
11268 | chorus*) | ||
11269 | case $cc_basename in | ||
11270 | cxch68) | ||
11271 | # Green Hills C++ Compiler | ||
11272 | # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" | ||
11273 | ;; | ||
11274 | esac | ||
11275 | ;; | ||
11276 | dgux*) | ||
11277 | case $cc_basename in | ||
11278 | ec++) | ||
11279 | lt_prog_compiler_pic_CXX='-KPIC' | ||
11280 | ;; | ||
11281 | ghcx) | ||
11282 | # Green Hills C++ Compiler | ||
11283 | lt_prog_compiler_pic_CXX='-pic' | ||
11284 | ;; | ||
11285 | *) | ||
11286 | ;; | ||
11287 | esac | ||
11288 | ;; | ||
11289 | freebsd* | kfreebsd*-gnu) | ||
11290 | # FreeBSD uses GNU C++ | ||
11291 | ;; | ||
11292 | hpux9* | hpux10* | hpux11*) | ||
11293 | case $cc_basename in | ||
11294 | CC) | ||
11295 | lt_prog_compiler_wl_CXX='-Wl,' | ||
11296 | lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" | ||
11297 | if test "$host_cpu" != ia64; then | ||
11298 | lt_prog_compiler_pic_CXX='+Z' | ||
11299 | fi | ||
11300 | ;; | ||
11301 | aCC) | ||
11302 | lt_prog_compiler_wl_CXX='-Wl,' | ||
11303 | lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" | ||
11304 | case "$host_cpu" in | ||
11305 | hppa*64*|ia64*) | ||
11306 | # +Z the default | ||
11307 | ;; | ||
11308 | *) | ||
11309 | lt_prog_compiler_pic_CXX='+Z' | ||
11310 | ;; | ||
11311 | esac | ||
11312 | ;; | ||
11313 | *) | ||
11314 | ;; | ||
11315 | esac | ||
11316 | ;; | ||
11317 | irix5* | irix6* | nonstopux*) | ||
11318 | case $cc_basename in | ||
11319 | CC) | ||
11320 | lt_prog_compiler_wl_CXX='-Wl,' | ||
11321 | lt_prog_compiler_static_CXX='-non_shared' | ||
11322 | # CC pic flag -KPIC is the default. | ||
11323 | ;; | ||
11324 | *) | ||
11325 | ;; | ||
11326 | esac | ||
11327 | ;; | ||
11328 | linux*) | ||
11329 | case $cc_basename in | ||
11330 | KCC) | ||
11331 | # KAI C++ Compiler | ||
11332 | lt_prog_compiler_wl_CXX='--backend -Wl,' | ||
11333 | lt_prog_compiler_pic_CXX='-fPIC' | ||
11334 | ;; | ||
11335 | icpc) | ||
11336 | # Intel C++ | ||
11337 | lt_prog_compiler_wl_CXX='-Wl,' | ||
11338 | lt_prog_compiler_pic_CXX='-KPIC' | ||
11339 | lt_prog_compiler_static_CXX='-static' | ||
11340 | ;; | ||
11341 | cxx) | ||
11342 | # Compaq C++ | ||
11343 | # Make sure the PIC flag is empty. It appears that all Alpha | ||
11344 | # Linux and Compaq Tru64 Unix objects are PIC. | ||
11345 | lt_prog_compiler_pic_CXX= | ||
11346 | lt_prog_compiler_static_CXX='-non_shared' | ||
11347 | ;; | ||
11348 | *) | ||
11349 | ;; | ||
11350 | esac | ||
11351 | ;; | ||
11352 | lynxos*) | ||
11353 | ;; | ||
11354 | m88k*) | ||
11355 | ;; | ||
11356 | mvs*) | ||
11357 | case $cc_basename in | ||
11358 | cxx) | ||
11359 | lt_prog_compiler_pic_CXX='-W c,exportall' | ||
11360 | ;; | ||
11361 | *) | ||
11362 | ;; | ||
11363 | esac | ||
11364 | ;; | ||
11365 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
11366 | ;; | ||
11367 | osf3* | osf4* | osf5*) | ||
11368 | case $cc_basename in | ||
11369 | KCC) | ||
11370 | lt_prog_compiler_wl_CXX='--backend -Wl,' | ||
11371 | ;; | ||
11372 | RCC) | ||
11373 | # Rational C++ 2.4.1 | ||
11374 | lt_prog_compiler_pic_CXX='-pic' | ||
11375 | ;; | ||
11376 | cxx) | ||
11377 | # Digital/Compaq C++ | ||
11378 | lt_prog_compiler_wl_CXX='-Wl,' | ||
11379 | # Make sure the PIC flag is empty. It appears that all Alpha | ||
11380 | # Linux and Compaq Tru64 Unix objects are PIC. | ||
11381 | lt_prog_compiler_pic_CXX= | ||
11382 | lt_prog_compiler_static_CXX='-non_shared' | ||
11383 | ;; | ||
11384 | *) | ||
11385 | ;; | ||
11386 | esac | ||
11387 | ;; | ||
11388 | psos*) | ||
11389 | ;; | ||
11390 | sco*) | ||
11391 | case $cc_basename in | ||
11392 | CC) | ||
11393 | lt_prog_compiler_pic_CXX='-fPIC' | ||
11394 | ;; | ||
11395 | *) | ||
11396 | ;; | ||
11397 | esac | ||
11398 | ;; | ||
11399 | solaris*) | ||
11400 | case $cc_basename in | ||
11401 | CC) | ||
11402 | # Sun C++ 4.2, 5.x and Centerline C++ | ||
11403 | lt_prog_compiler_pic_CXX='-KPIC' | ||
11404 | lt_prog_compiler_static_CXX='-Bstatic' | ||
11405 | lt_prog_compiler_wl_CXX='-Qoption ld ' | ||
11406 | ;; | ||
11407 | gcx) | ||
11408 | # Green Hills C++ Compiler | ||
11409 | lt_prog_compiler_pic_CXX='-PIC' | ||
11410 | ;; | ||
11411 | *) | ||
11412 | ;; | ||
11413 | esac | ||
11414 | ;; | ||
11415 | sunos4*) | ||
11416 | case $cc_basename in | ||
11417 | CC) | ||
11418 | # Sun C++ 4.x | ||
11419 | lt_prog_compiler_pic_CXX='-pic' | ||
11420 | lt_prog_compiler_static_CXX='-Bstatic' | ||
11421 | ;; | ||
11422 | lcc) | ||
11423 | # Lucid | ||
11424 | lt_prog_compiler_pic_CXX='-pic' | ||
11425 | ;; | ||
11426 | *) | ||
11427 | ;; | ||
11428 | esac | ||
11429 | ;; | ||
11430 | tandem*) | ||
11431 | case $cc_basename in | ||
11432 | NCC) | ||
11433 | # NonStop-UX NCC 3.20 | ||
11434 | lt_prog_compiler_pic_CXX='-KPIC' | ||
11435 | ;; | ||
11436 | *) | ||
11437 | ;; | ||
11438 | esac | ||
11439 | ;; | ||
11440 | unixware*) | ||
11441 | ;; | ||
11442 | vxworks*) | ||
11443 | ;; | ||
11444 | *) | ||
11445 | lt_prog_compiler_can_build_shared_CXX=no | ||
11446 | ;; | ||
11447 | esac | ||
11448 | fi | ||
11449 | |||
11450 | echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 | ||
11451 | echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 | ||
11452 | |||
11453 | # | ||
11454 | # Check to make sure the PIC flag actually works. | ||
11455 | # | ||
11456 | if test -n "$lt_prog_compiler_pic_CXX"; then | ||
11457 | |||
11458 | echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 | ||
11459 | echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 | ||
11460 | if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then | ||
11461 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
11462 | else | ||
11463 | lt_prog_compiler_pic_works_CXX=no | ||
11464 | ac_outfile=conftest.$ac_objext | ||
11465 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
11466 | lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" | ||
11467 | # Insert the option either (1) after the last *FLAGS variable, or | ||
11468 | # (2) before a word containing "conftest.", or (3) at the end. | ||
11469 | # Note that $ac_compile itself does not contain backslashes and begins | ||
11470 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
11471 | # The option is referenced via a variable to avoid confusing sed. | ||
11472 | lt_compile=`echo "$ac_compile" | $SED \ | ||
11473 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
11474 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||
11475 | -e 's:$: $lt_compiler_flag:'` | ||
11476 | (eval echo "\"\$as_me:11476: $lt_compile\"" >&5) | ||
11477 | (eval "$lt_compile" 2>conftest.err) | ||
11478 | ac_status=$? | ||
11479 | cat conftest.err >&5 | ||
11480 | echo "$as_me:11480: \$? = $ac_status" >&5 | ||
11481 | if (exit $ac_status) && test -s "$ac_outfile"; then | ||
11482 | # The compiler can only warn and ignore the option if not recognized | ||
11483 | # So say no if there are warnings | ||
11484 | if test ! -s conftest.err; then | ||
11485 | lt_prog_compiler_pic_works_CXX=yes | ||
11486 | fi | ||
11487 | fi | ||
11488 | $rm conftest* | ||
11489 | |||
11490 | fi | ||
11491 | echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 | ||
11492 | echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 | ||
11493 | |||
11494 | if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then | ||
11495 | case $lt_prog_compiler_pic_CXX in | ||
11496 | "" | " "*) ;; | ||
11497 | *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; | ||
11498 | esac | ||
11499 | else | ||
11500 | lt_prog_compiler_pic_CXX= | ||
11501 | lt_prog_compiler_can_build_shared_CXX=no | ||
11502 | fi | ||
11503 | |||
11504 | fi | ||
11505 | case "$host_os" in | ||
11506 | # For platforms which do not support PIC, -DPIC is meaningless: | ||
11507 | *djgpp*) | ||
11508 | lt_prog_compiler_pic_CXX= | ||
11509 | ;; | ||
11510 | *) | ||
11511 | lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" | ||
11512 | ;; | ||
11513 | esac | ||
11514 | |||
11515 | echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 | ||
11516 | echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 | ||
11517 | if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then | ||
11518 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
11519 | else | ||
11520 | lt_cv_prog_compiler_c_o_CXX=no | ||
11521 | $rm -r conftest 2>/dev/null | ||
11522 | mkdir conftest | ||
11523 | cd conftest | ||
11524 | mkdir out | ||
11525 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
11526 | |||
11527 | lt_compiler_flag="-o out/conftest2.$ac_objext" | ||
11528 | # Insert the option either (1) after the last *FLAGS variable, or | ||
11529 | # (2) before a word containing "conftest.", or (3) at the end. | ||
11530 | # Note that $ac_compile itself does not contain backslashes and begins | ||
11531 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
11532 | lt_compile=`echo "$ac_compile" | $SED \ | ||
11533 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
11534 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||
11535 | -e 's:$: $lt_compiler_flag:'` | ||
11536 | (eval echo "\"\$as_me:11536: $lt_compile\"" >&5) | ||
11537 | (eval "$lt_compile" 2>out/conftest.err) | ||
11538 | ac_status=$? | ||
11539 | cat out/conftest.err >&5 | ||
11540 | echo "$as_me:11540: \$? = $ac_status" >&5 | ||
11541 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | ||
11542 | then | ||
11543 | # The compiler can only warn and ignore the option if not recognized | ||
11544 | # So say no if there are warnings | ||
11545 | if test ! -s out/conftest.err; then | ||
11546 | lt_cv_prog_compiler_c_o_CXX=yes | ||
11547 | fi | ||
11548 | fi | ||
11549 | chmod u+w . | ||
11550 | $rm conftest* | ||
11551 | # SGI C++ compiler will create directory out/ii_files/ for | ||
11552 | # template instantiation | ||
11553 | test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files | ||
11554 | $rm out/* && rmdir out | ||
11555 | cd .. | ||
11556 | rmdir conftest | ||
11557 | $rm conftest* | ||
11558 | |||
11559 | fi | ||
11560 | echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 | ||
11561 | echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 | ||
11562 | |||
11563 | |||
11564 | hard_links="nottested" | ||
11565 | if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then | ||
11566 | # do not overwrite the value of need_locks provided by the user | ||
11567 | echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 | ||
11568 | echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 | ||
11569 | hard_links=yes | ||
11570 | $rm conftest* | ||
11571 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
11572 | touch conftest.a | ||
11573 | ln conftest.a conftest.b 2>&5 || hard_links=no | ||
11574 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
11575 | echo "$as_me:$LINENO: result: $hard_links" >&5 | ||
11576 | echo "${ECHO_T}$hard_links" >&6 | ||
11577 | if test "$hard_links" = no; then | ||
11578 | { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 | ||
11579 | echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} | ||
11580 | need_locks=warn | ||
11581 | fi | ||
11582 | else | ||
11583 | need_locks=no | ||
11584 | fi | ||
11585 | |||
11586 | echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 | ||
11587 | echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 | ||
11588 | |||
11589 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
11590 | case $host_os in | ||
11591 | aix4* | aix5*) | ||
11592 | # If we're using GNU nm, then we don't want the "-C" option. | ||
11593 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | ||
11594 | if $NM -V 2>&1 | grep 'GNU' > /dev/null; then | ||
11595 | export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' | ||
11596 | else | ||
11597 | export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' | ||
11598 | fi | ||
11599 | ;; | ||
11600 | pw32*) | ||
11601 | export_symbols_cmds_CXX="$ltdll_cmds" | ||
11602 | ;; | ||
11603 | cygwin* | mingw*) | ||
11604 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' | ||
11605 | ;; | ||
11606 | linux*) | ||
11607 | link_all_deplibs_CXX=no | ||
11608 | ;; | ||
11609 | *) | ||
11610 | export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
11611 | ;; | ||
11612 | esac | ||
11613 | |||
11614 | echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 | ||
11615 | echo "${ECHO_T}$ld_shlibs_CXX" >&6 | ||
11616 | test "$ld_shlibs_CXX" = no && can_build_shared=no | ||
11617 | |||
11618 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | ||
11619 | if test "$GCC" = yes; then | ||
11620 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | ||
11621 | fi | ||
11622 | |||
11623 | # | ||
11624 | # Do we need to explicitly link libc? | ||
11625 | # | ||
11626 | case "x$archive_cmds_need_lc_CXX" in | ||
11627 | x|xyes) | ||
11628 | # Assume -lc should be added | ||
11629 | archive_cmds_need_lc_CXX=yes | ||
11630 | |||
11631 | if test "$enable_shared" = yes && test "$GCC" = yes; then | ||
11632 | case $archive_cmds_CXX in | ||
11633 | *'~'*) | ||
11634 | # FIXME: we may have to deal with multi-command sequences. | ||
11635 | ;; | ||
11636 | '$CC '*) | ||
11637 | # Test whether the compiler implicitly links with -lc since on some | ||
11638 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | ||
11639 | # to ld, don't add -lc before -lgcc. | ||
11640 | echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 | ||
11641 | echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 | ||
11642 | $rm conftest* | ||
11643 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
11644 | |||
11645 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
11646 | (eval $ac_compile) 2>&5 | ||
11647 | ac_status=$? | ||
11648 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
11649 | (exit $ac_status); } 2>conftest.err; then | ||
11650 | soname=conftest | ||
11651 | lib=conftest | ||
11652 | libobjs=conftest.$ac_objext | ||
11653 | deplibs= | ||
11654 | wl=$lt_prog_compiler_wl_CXX | ||
11655 | compiler_flags=-v | ||
11656 | linker_flags=-v | ||
11657 | verstring= | ||
11658 | output_objdir=. | ||
11659 | libname=conftest | ||
11660 | lt_save_allow_undefined_flag=$allow_undefined_flag_CXX | ||
11661 | allow_undefined_flag_CXX= | ||
11662 | if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 | ||
11663 | (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 | ||
11664 | ac_status=$? | ||
11665 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
11666 | (exit $ac_status); } | ||
11667 | then | ||
11668 | archive_cmds_need_lc_CXX=no | ||
11669 | else | ||
11670 | archive_cmds_need_lc_CXX=yes | ||
11671 | fi | ||
11672 | allow_undefined_flag_CXX=$lt_save_allow_undefined_flag | ||
11673 | else | ||
11674 | cat conftest.err 1>&5 | ||
11675 | fi | ||
11676 | $rm conftest* | ||
11677 | echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 | ||
11678 | echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 | ||
11679 | ;; | ||
11680 | esac | ||
11681 | fi | ||
11682 | ;; | ||
11683 | esac | ||
11684 | |||
11685 | echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 | ||
11686 | echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 | ||
11687 | library_names_spec= | ||
11688 | libname_spec='lib$name' | ||
11689 | soname_spec= | ||
11690 | shrext_cmds=".so" | ||
11691 | postinstall_cmds= | ||
11692 | postuninstall_cmds= | ||
11693 | finish_cmds= | ||
11694 | finish_eval= | ||
11695 | shlibpath_var= | ||
11696 | shlibpath_overrides_runpath=unknown | ||
11697 | version_type=none | ||
11698 | dynamic_linker="$host_os ld.so" | ||
11699 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | ||
11700 | if test "$GCC" = yes; then | ||
11701 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | ||
11702 | if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then | ||
11703 | # if the path contains ";" then we assume it to be the separator | ||
11704 | # otherwise default to the standard path separator (i.e. ":") - it is | ||
11705 | # assumed that no part of a normal pathname contains ";" but that should | ||
11706 | # okay in the real world where ";" in dirpaths is itself problematic. | ||
11707 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
11708 | else | ||
11709 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
11710 | fi | ||
11711 | else | ||
11712 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | ||
11713 | fi | ||
11714 | need_lib_prefix=unknown | ||
11715 | hardcode_into_libs=no | ||
11716 | |||
11717 | # when you set need_version to no, make sure it does not cause -set_version | ||
11718 | # flags to be left without arguments | ||
11719 | need_version=unknown | ||
11720 | |||
11721 | case $host_os in | ||
11722 | aix3*) | ||
11723 | version_type=linux | ||
11724 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | ||
11725 | shlibpath_var=LIBPATH | ||
11726 | |||
11727 | # AIX 3 has no versioning support, so we append a major version to the name. | ||
11728 | soname_spec='${libname}${release}${shared_ext}$major' | ||
11729 | ;; | ||
11730 | |||
11731 | aix4* | aix5*) | ||
11732 | version_type=linux | ||
11733 | need_lib_prefix=no | ||
11734 | need_version=no | ||
11735 | hardcode_into_libs=yes | ||
11736 | if test "$host_cpu" = ia64; then | ||
11737 | # AIX 5 supports IA64 | ||
11738 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | ||
11739 | shlibpath_var=LD_LIBRARY_PATH | ||
11740 | else | ||
11741 | # With GCC up to 2.95.x, collect2 would create an import file | ||
11742 | # for dependence libraries. The import file would start with | ||
11743 | # the line `#! .'. This would cause the generated library to | ||
11744 | # depend on `.', always an invalid library. This was fixed in | ||
11745 | # development snapshots of GCC prior to 3.0. | ||
11746 | case $host_os in | ||
11747 | aix4 | aix4.[01] | aix4.[01].*) | ||
11748 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | ||
11749 | echo ' yes ' | ||
11750 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | ||
11751 | : | ||
11752 | else | ||
11753 | can_build_shared=no | ||
11754 | fi | ||
11755 | ;; | ||
11756 | esac | ||
11757 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | ||
11758 | # soname into executable. Probably we can add versioning support to | ||
11759 | # collect2, so additional links can be useful in future. | ||
11760 | if test "$aix_use_runtimelinking" = yes; then | ||
11761 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | ||
11762 | # instead of lib<name>.a to let people know that these are not | ||
11763 | # typical AIX shared libraries. | ||
11764 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
11765 | else | ||
11766 | # We preserve .a as extension for shared libraries through AIX4.2 | ||
11767 | # and later when we are not doing run time linking. | ||
11768 | library_names_spec='${libname}${release}.a $libname.a' | ||
11769 | soname_spec='${libname}${release}${shared_ext}$major' | ||
11770 | fi | ||
11771 | shlibpath_var=LIBPATH | ||
11772 | fi | ||
11773 | ;; | ||
11774 | |||
11775 | amigaos*) | ||
11776 | library_names_spec='$libname.ixlibrary $libname.a' | ||
11777 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | ||
11778 | 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' | ||
11779 | ;; | ||
11780 | |||
11781 | beos*) | ||
11782 | library_names_spec='${libname}${shared_ext}' | ||
11783 | dynamic_linker="$host_os ld.so" | ||
11784 | shlibpath_var=LIBRARY_PATH | ||
11785 | ;; | ||
11786 | |||
11787 | bsdi4*) | ||
11788 | version_type=linux | ||
11789 | need_version=no | ||
11790 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
11791 | soname_spec='${libname}${release}${shared_ext}$major' | ||
11792 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | ||
11793 | shlibpath_var=LD_LIBRARY_PATH | ||
11794 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | ||
11795 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | ||
11796 | # the default ld.so.conf also contains /usr/contrib/lib and | ||
11797 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | ||
11798 | # libtool to hard-code these into programs | ||
11799 | ;; | ||
11800 | |||
11801 | cygwin* | mingw* | pw32*) | ||
11802 | version_type=windows | ||
11803 | shrext_cmds=".dll" | ||
11804 | need_version=no | ||
11805 | need_lib_prefix=no | ||
11806 | |||
11807 | case $GCC,$host_os in | ||
11808 | yes,cygwin* | yes,mingw* | yes,pw32*) | ||
11809 | library_names_spec='$libname.dll.a' | ||
11810 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
11811 | postinstall_cmds='base_file=`basename \${file}`~ | ||
11812 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ | ||
11813 | dldir=$destdir/`dirname \$dlpath`~ | ||
11814 | test -d \$dldir || mkdir -p \$dldir~ | ||
11815 | $install_prog $dir/$dlname \$dldir/$dlname' | ||
11816 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
11817 | dlpath=$dir/\$dldll~ | ||
11818 | $rm \$dlpath' | ||
11819 | shlibpath_overrides_runpath=yes | ||
11820 | |||
11821 | case $host_os in | ||
11822 | cygwin*) | ||
11823 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | ||
11824 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
11825 | sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" | ||
11826 | ;; | ||
11827 | mingw*) | ||
11828 | # MinGW DLLs use traditional 'lib' prefix | ||
11829 | soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
11830 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | ||
11831 | if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then | ||
11832 | # It is most probably a Windows format PATH printed by | ||
11833 | # mingw gcc, but we are running on Cygwin. Gcc prints its search | ||
11834 | # path with ; separators, and with drive letters. We can handle the | ||
11835 | # drive letters (cygwin fileutils understands them), so leave them, | ||
11836 | # especially as we might pass files found there to a mingw objdump, | ||
11837 | # which wouldn't understand a cygwinified path. Ahh. | ||
11838 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
11839 | else | ||
11840 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
11841 | fi | ||
11842 | ;; | ||
11843 | pw32*) | ||
11844 | # pw32 DLLs use 'pw' prefix rather than 'lib' | ||
11845 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' | ||
11846 | ;; | ||
11847 | esac | ||
11848 | ;; | ||
11849 | |||
11850 | *) | ||
11851 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
11852 | ;; | ||
11853 | esac | ||
11854 | dynamic_linker='Win32 ld.exe' | ||
11855 | # FIXME: first we should search . and the directory the executable is in | ||
11856 | shlibpath_var=PATH | ||
11857 | ;; | ||
11858 | |||
11859 | darwin* | rhapsody*) | ||
11860 | dynamic_linker="$host_os dyld" | ||
11861 | version_type=darwin | ||
11862 | need_lib_prefix=no | ||
11863 | need_version=no | ||
11864 | library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' | ||
11865 | soname_spec='${libname}${release}${major}$shared_ext' | ||
11866 | shlibpath_overrides_runpath=yes | ||
11867 | shlibpath_var=DYLD_LIBRARY_PATH | ||
11868 | shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' | ||
11869 | # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. | ||
11870 | if test "$GCC" = yes; then | ||
11871 | sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` | ||
11872 | else | ||
11873 | sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' | ||
11874 | fi | ||
11875 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | ||
11876 | ;; | ||
11877 | |||
11878 | dgux*) | ||
11879 | version_type=linux | ||
11880 | need_lib_prefix=no | ||
11881 | need_version=no | ||
11882 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | ||
11883 | soname_spec='${libname}${release}${shared_ext}$major' | ||
11884 | shlibpath_var=LD_LIBRARY_PATH | ||
11885 | ;; | ||
11886 | |||
11887 | freebsd1*) | ||
11888 | dynamic_linker=no | ||
11889 | ;; | ||
11890 | |||
11891 | kfreebsd*-gnu) | ||
11892 | version_type=linux | ||
11893 | need_lib_prefix=no | ||
11894 | need_version=no | ||
11895 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
11896 | soname_spec='${libname}${release}${shared_ext}$major' | ||
11897 | shlibpath_var=LD_LIBRARY_PATH | ||
11898 | shlibpath_overrides_runpath=no | ||
11899 | hardcode_into_libs=yes | ||
11900 | dynamic_linker='GNU ld.so' | ||
11901 | ;; | ||
11902 | |||
11903 | freebsd*) | ||
11904 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` | ||
11905 | version_type=freebsd-$objformat | ||
11906 | case $version_type in | ||
11907 | freebsd-elf*) | ||
11908 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
11909 | need_version=no | ||
11910 | need_lib_prefix=no | ||
11911 | ;; | ||
11912 | freebsd-*) | ||
11913 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | ||
11914 | need_version=yes | ||
11915 | ;; | ||
11916 | esac | ||
11917 | shlibpath_var=LD_LIBRARY_PATH | ||
11918 | case $host_os in | ||
11919 | freebsd2*) | ||
11920 | shlibpath_overrides_runpath=yes | ||
11921 | ;; | ||
11922 | freebsd3.01* | freebsdelf3.01*) | ||
11923 | shlibpath_overrides_runpath=yes | ||
11924 | hardcode_into_libs=yes | ||
11925 | ;; | ||
11926 | *) # from 3.2 on | ||
11927 | shlibpath_overrides_runpath=no | ||
11928 | hardcode_into_libs=yes | ||
11929 | ;; | ||
11930 | esac | ||
11931 | ;; | ||
11932 | |||
11933 | gnu*) | ||
11934 | version_type=linux | ||
11935 | need_lib_prefix=no | ||
11936 | need_version=no | ||
11937 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | ||
11938 | soname_spec='${libname}${release}${shared_ext}$major' | ||
11939 | shlibpath_var=LD_LIBRARY_PATH | ||
11940 | hardcode_into_libs=yes | ||
11941 | ;; | ||
11942 | |||
11943 | hpux9* | hpux10* | hpux11*) | ||
11944 | # Give a soname corresponding to the major version so that dld.sl refuses to | ||
11945 | # link against other versions. | ||
11946 | version_type=sunos | ||
11947 | need_lib_prefix=no | ||
11948 | need_version=no | ||
11949 | case "$host_cpu" in | ||
11950 | ia64*) | ||
11951 | shrext_cmds='.so' | ||
11952 | hardcode_into_libs=yes | ||
11953 | dynamic_linker="$host_os dld.so" | ||
11954 | shlibpath_var=LD_LIBRARY_PATH | ||
11955 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
11956 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
11957 | soname_spec='${libname}${release}${shared_ext}$major' | ||
11958 | if test "X$HPUX_IA64_MODE" = X32; then | ||
11959 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | ||
11960 | else | ||
11961 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | ||
11962 | fi | ||
11963 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
11964 | ;; | ||
11965 | hppa*64*) | ||
11966 | shrext_cmds='.sl' | ||
11967 | hardcode_into_libs=yes | ||
11968 | dynamic_linker="$host_os dld.sl" | ||
11969 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | ||
11970 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
11971 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
11972 | soname_spec='${libname}${release}${shared_ext}$major' | ||
11973 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | ||
11974 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
11975 | ;; | ||
11976 | *) | ||
11977 | shrext_cmds='.sl' | ||
11978 | dynamic_linker="$host_os dld.sl" | ||
11979 | shlibpath_var=SHLIB_PATH | ||
11980 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | ||
11981 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
11982 | soname_spec='${libname}${release}${shared_ext}$major' | ||
11983 | ;; | ||
11984 | esac | ||
11985 | # HP-UX runs *really* slowly unless shared libraries are mode 555. | ||
11986 | postinstall_cmds='chmod 555 $lib' | ||
11987 | ;; | ||
11988 | |||
11989 | irix5* | irix6* | nonstopux*) | ||
11990 | case $host_os in | ||
11991 | nonstopux*) version_type=nonstopux ;; | ||
11992 | *) | ||
11993 | if test "$lt_cv_prog_gnu_ld" = yes; then | ||
11994 | version_type=linux | ||
11995 | else | ||
11996 | version_type=irix | ||
11997 | fi ;; | ||
11998 | esac | ||
11999 | need_lib_prefix=no | ||
12000 | need_version=no | ||
12001 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12002 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
12003 | case $host_os in | ||
12004 | irix5* | nonstopux*) | ||
12005 | libsuff= shlibsuff= | ||
12006 | ;; | ||
12007 | *) | ||
12008 | case $LD in # libtool.m4 will add one of these switches to LD | ||
12009 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | ||
12010 | libsuff= shlibsuff= libmagic=32-bit;; | ||
12011 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | ||
12012 | libsuff=32 shlibsuff=N32 libmagic=N32;; | ||
12013 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | ||
12014 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | ||
12015 | *) libsuff= shlibsuff= libmagic=never-match;; | ||
12016 | esac | ||
12017 | ;; | ||
12018 | esac | ||
12019 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | ||
12020 | shlibpath_overrides_runpath=no | ||
12021 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | ||
12022 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | ||
12023 | hardcode_into_libs=yes | ||
12024 | ;; | ||
12025 | |||
12026 | # No shared lib support for Linux oldld, aout, or coff. | ||
12027 | linux*oldld* | linux*aout* | linux*coff*) | ||
12028 | dynamic_linker=no | ||
12029 | ;; | ||
12030 | |||
12031 | # This must be Linux ELF. | ||
12032 | linux*) | ||
12033 | version_type=linux | ||
12034 | need_lib_prefix=no | ||
12035 | need_version=no | ||
12036 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
12037 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12038 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | ||
12039 | shlibpath_var=LD_LIBRARY_PATH | ||
12040 | shlibpath_overrides_runpath=no | ||
12041 | # This implies no fast_install, which is unacceptable. | ||
12042 | # Some rework will be needed to allow for fast_install | ||
12043 | # before this can be enabled. | ||
12044 | hardcode_into_libs=yes | ||
12045 | |||
12046 | # Append ld.so.conf contents to the search path | ||
12047 | if test -f /etc/ld.so.conf; then | ||
12048 | lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` | ||
12049 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" | ||
12050 | fi | ||
12051 | |||
12052 | # We used to test for /lib/ld.so.1 and disable shared libraries on | ||
12053 | # powerpc, because MkLinux only supported shared libraries with the | ||
12054 | # GNU dynamic linker. Since this was broken with cross compilers, | ||
12055 | # most powerpc-linux boxes support dynamic linking these days and | ||
12056 | # people can always --disable-shared, the test was removed, and we | ||
12057 | # assume the GNU/Linux dynamic linker is in use. | ||
12058 | dynamic_linker='GNU/Linux ld.so' | ||
12059 | ;; | ||
12060 | |||
12061 | netbsdelf*-gnu) | ||
12062 | version_type=linux | ||
12063 | need_lib_prefix=no | ||
12064 | need_version=no | ||
12065 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
12066 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12067 | shlibpath_var=LD_LIBRARY_PATH | ||
12068 | shlibpath_overrides_runpath=no | ||
12069 | hardcode_into_libs=yes | ||
12070 | dynamic_linker='NetBSD ld.elf_so' | ||
12071 | ;; | ||
12072 | |||
12073 | knetbsd*-gnu) | ||
12074 | version_type=linux | ||
12075 | need_lib_prefix=no | ||
12076 | need_version=no | ||
12077 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
12078 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12079 | shlibpath_var=LD_LIBRARY_PATH | ||
12080 | shlibpath_overrides_runpath=no | ||
12081 | hardcode_into_libs=yes | ||
12082 | dynamic_linker='GNU ld.so' | ||
12083 | ;; | ||
12084 | |||
12085 | netbsd*) | ||
12086 | version_type=sunos | ||
12087 | need_lib_prefix=no | ||
12088 | need_version=no | ||
12089 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
12090 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
12091 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
12092 | dynamic_linker='NetBSD (a.out) ld.so' | ||
12093 | else | ||
12094 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
12095 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12096 | dynamic_linker='NetBSD ld.elf_so' | ||
12097 | fi | ||
12098 | shlibpath_var=LD_LIBRARY_PATH | ||
12099 | shlibpath_overrides_runpath=yes | ||
12100 | hardcode_into_libs=yes | ||
12101 | ;; | ||
12102 | |||
12103 | newsos6) | ||
12104 | version_type=linux | ||
12105 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
12106 | shlibpath_var=LD_LIBRARY_PATH | ||
12107 | shlibpath_overrides_runpath=yes | ||
12108 | ;; | ||
12109 | |||
12110 | nto-qnx*) | ||
12111 | version_type=linux | ||
12112 | need_lib_prefix=no | ||
12113 | need_version=no | ||
12114 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
12115 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12116 | shlibpath_var=LD_LIBRARY_PATH | ||
12117 | shlibpath_overrides_runpath=yes | ||
12118 | ;; | ||
12119 | |||
12120 | openbsd*) | ||
12121 | version_type=sunos | ||
12122 | need_lib_prefix=no | ||
12123 | need_version=yes | ||
12124 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
12125 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
12126 | shlibpath_var=LD_LIBRARY_PATH | ||
12127 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
12128 | case $host_os in | ||
12129 | openbsd2.[89] | openbsd2.[89].*) | ||
12130 | shlibpath_overrides_runpath=no | ||
12131 | ;; | ||
12132 | *) | ||
12133 | shlibpath_overrides_runpath=yes | ||
12134 | ;; | ||
12135 | esac | ||
12136 | else | ||
12137 | shlibpath_overrides_runpath=yes | ||
12138 | fi | ||
12139 | ;; | ||
12140 | |||
12141 | os2*) | ||
12142 | libname_spec='$name' | ||
12143 | shrext_cmds=".dll" | ||
12144 | need_lib_prefix=no | ||
12145 | library_names_spec='$libname${shared_ext} $libname.a' | ||
12146 | dynamic_linker='OS/2 ld.exe' | ||
12147 | shlibpath_var=LIBPATH | ||
12148 | ;; | ||
12149 | |||
12150 | osf3* | osf4* | osf5*) | ||
12151 | version_type=osf | ||
12152 | need_lib_prefix=no | ||
12153 | need_version=no | ||
12154 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12155 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
12156 | shlibpath_var=LD_LIBRARY_PATH | ||
12157 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | ||
12158 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | ||
12159 | ;; | ||
12160 | |||
12161 | sco3.2v5*) | ||
12162 | version_type=osf | ||
12163 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12164 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
12165 | shlibpath_var=LD_LIBRARY_PATH | ||
12166 | ;; | ||
12167 | |||
12168 | solaris*) | ||
12169 | version_type=linux | ||
12170 | need_lib_prefix=no | ||
12171 | need_version=no | ||
12172 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
12173 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12174 | shlibpath_var=LD_LIBRARY_PATH | ||
12175 | shlibpath_overrides_runpath=yes | ||
12176 | hardcode_into_libs=yes | ||
12177 | # ldd complains unless libraries are executable | ||
12178 | postinstall_cmds='chmod +x $lib' | ||
12179 | ;; | ||
12180 | |||
12181 | sunos4*) | ||
12182 | version_type=sunos | ||
12183 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
12184 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | ||
12185 | shlibpath_var=LD_LIBRARY_PATH | ||
12186 | shlibpath_overrides_runpath=yes | ||
12187 | if test "$with_gnu_ld" = yes; then | ||
12188 | need_lib_prefix=no | ||
12189 | fi | ||
12190 | need_version=yes | ||
12191 | ;; | ||
12192 | |||
12193 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
12194 | version_type=linux | ||
12195 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
12196 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12197 | shlibpath_var=LD_LIBRARY_PATH | ||
12198 | case $host_vendor in | ||
12199 | sni) | ||
12200 | shlibpath_overrides_runpath=no | ||
12201 | need_lib_prefix=no | ||
12202 | export_dynamic_flag_spec='${wl}-Blargedynsym' | ||
12203 | runpath_var=LD_RUN_PATH | ||
12204 | ;; | ||
12205 | siemens) | ||
12206 | need_lib_prefix=no | ||
12207 | ;; | ||
12208 | motorola) | ||
12209 | need_lib_prefix=no | ||
12210 | need_version=no | ||
12211 | shlibpath_overrides_runpath=no | ||
12212 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | ||
12213 | ;; | ||
12214 | esac | ||
12215 | ;; | ||
12216 | |||
12217 | sysv4*MP*) | ||
12218 | if test -d /usr/nec ;then | ||
12219 | version_type=linux | ||
12220 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | ||
12221 | soname_spec='$libname${shared_ext}.$major' | ||
12222 | shlibpath_var=LD_LIBRARY_PATH | ||
12223 | fi | ||
12224 | ;; | ||
12225 | |||
12226 | uts4*) | ||
12227 | version_type=linux | ||
12228 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
12229 | soname_spec='${libname}${release}${shared_ext}$major' | ||
12230 | shlibpath_var=LD_LIBRARY_PATH | ||
12231 | ;; | ||
12232 | |||
12233 | *) | ||
12234 | dynamic_linker=no | ||
12235 | ;; | ||
12236 | esac | ||
12237 | echo "$as_me:$LINENO: result: $dynamic_linker" >&5 | ||
12238 | echo "${ECHO_T}$dynamic_linker" >&6 | ||
12239 | test "$dynamic_linker" = no && can_build_shared=no | ||
12240 | |||
12241 | echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 | ||
12242 | echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 | ||
12243 | hardcode_action_CXX= | ||
12244 | if test -n "$hardcode_libdir_flag_spec_CXX" || \ | ||
12245 | test -n "$runpath_var CXX" || \ | ||
12246 | test "X$hardcode_automatic_CXX"="Xyes" ; then | ||
12247 | |||
12248 | # We can hardcode non-existant directories. | ||
12249 | if test "$hardcode_direct_CXX" != no && | ||
12250 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | ||
12251 | # have to relink, otherwise we might link with an installed library | ||
12252 | # when we should be linking with a yet-to-be-installed one | ||
12253 | ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && | ||
12254 | test "$hardcode_minus_L_CXX" != no; then | ||
12255 | # Linking always hardcodes the temporary library directory. | ||
12256 | hardcode_action_CXX=relink | ||
12257 | else | ||
12258 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | ||
12259 | hardcode_action_CXX=immediate | ||
12260 | fi | ||
12261 | else | ||
12262 | # We cannot hardcode anything, or else we can only hardcode existing | ||
12263 | # directories. | ||
12264 | hardcode_action_CXX=unsupported | ||
12265 | fi | ||
12266 | echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 | ||
12267 | echo "${ECHO_T}$hardcode_action_CXX" >&6 | ||
12268 | |||
12269 | if test "$hardcode_action_CXX" = relink; then | ||
12270 | # Fast installation is not supported | ||
12271 | enable_fast_install=no | ||
12272 | elif test "$shlibpath_overrides_runpath" = yes || | ||
12273 | test "$enable_shared" = no; then | ||
12274 | # Fast installation is not necessary | ||
12275 | enable_fast_install=needless | ||
12276 | fi | ||
12277 | |||
12278 | striplib= | ||
12279 | old_striplib= | ||
12280 | echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 | ||
12281 | echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 | ||
12282 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then | ||
12283 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | ||
12284 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | ||
12285 | echo "$as_me:$LINENO: result: yes" >&5 | ||
12286 | echo "${ECHO_T}yes" >&6 | ||
12287 | else | ||
12288 | # FIXME - insert some real tests, host_os isn't really good enough | ||
12289 | case $host_os in | ||
12290 | darwin*) | ||
12291 | if test -n "$STRIP" ; then | ||
12292 | striplib="$STRIP -x" | ||
12293 | echo "$as_me:$LINENO: result: yes" >&5 | ||
12294 | echo "${ECHO_T}yes" >&6 | ||
12295 | else | ||
12296 | echo "$as_me:$LINENO: result: no" >&5 | ||
12297 | echo "${ECHO_T}no" >&6 | ||
12298 | fi | ||
12299 | ;; | ||
12300 | *) | ||
12301 | echo "$as_me:$LINENO: result: no" >&5 | ||
12302 | echo "${ECHO_T}no" >&6 | ||
12303 | ;; | ||
12304 | esac | ||
12305 | fi | ||
12306 | |||
12307 | if test "x$enable_dlopen" != xyes; then | ||
12308 | enable_dlopen=unknown | ||
12309 | enable_dlopen_self=unknown | ||
12310 | enable_dlopen_self_static=unknown | ||
12311 | else | ||
12312 | lt_cv_dlopen=no | ||
12313 | lt_cv_dlopen_libs= | ||
12314 | |||
12315 | case $host_os in | ||
12316 | beos*) | ||
12317 | lt_cv_dlopen="load_add_on" | ||
12318 | lt_cv_dlopen_libs= | ||
12319 | lt_cv_dlopen_self=yes | ||
12320 | ;; | ||
12321 | |||
12322 | mingw* | pw32*) | ||
12323 | lt_cv_dlopen="LoadLibrary" | ||
12324 | lt_cv_dlopen_libs= | ||
12325 | ;; | ||
12326 | |||
12327 | cygwin*) | ||
12328 | lt_cv_dlopen="dlopen" | ||
12329 | lt_cv_dlopen_libs= | ||
12330 | ;; | ||
12331 | |||
12332 | darwin*) | ||
12333 | # if libdl is installed we need to link against it | ||
12334 | echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 | ||
12335 | echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 | ||
12336 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then | ||
12337 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
12338 | else | ||
12339 | ac_check_lib_save_LIBS=$LIBS | ||
12340 | LIBS="-ldl $LIBS" | ||
12341 | cat >conftest.$ac_ext <<_ACEOF | ||
12342 | /* confdefs.h. */ | ||
12343 | _ACEOF | ||
12344 | cat confdefs.h >>conftest.$ac_ext | ||
12345 | cat >>conftest.$ac_ext <<_ACEOF | ||
12346 | /* end confdefs.h. */ | ||
12347 | |||
12348 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
12349 | #ifdef __cplusplus | ||
12350 | extern "C" | ||
12351 | #endif | ||
12352 | /* We use char because int might match the return type of a gcc2 | ||
12353 | builtin and then its argument prototype would still apply. */ | ||
12354 | char dlopen (); | ||
12355 | int | ||
12356 | main () | ||
12357 | { | ||
12358 | dlopen (); | ||
12359 | ; | ||
12360 | return 0; | ||
12361 | } | ||
12362 | _ACEOF | ||
12363 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
12364 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
12365 | (eval $ac_link) 2>conftest.er1 | ||
12366 | ac_status=$? | ||
12367 | grep -v '^ *+' conftest.er1 >conftest.err | ||
12368 | rm -f conftest.er1 | ||
12369 | cat conftest.err >&5 | ||
12370 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12371 | (exit $ac_status); } && | ||
12372 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
12373 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12374 | (eval $ac_try) 2>&5 | ||
12375 | ac_status=$? | ||
12376 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12377 | (exit $ac_status); }; } && | ||
12378 | { ac_try='test -s conftest$ac_exeext' | ||
12379 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12380 | (eval $ac_try) 2>&5 | ||
12381 | ac_status=$? | ||
12382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12383 | (exit $ac_status); }; }; then | ||
12384 | ac_cv_lib_dl_dlopen=yes | ||
12385 | else | ||
12386 | echo "$as_me: failed program was:" >&5 | ||
12387 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
12388 | |||
12389 | ac_cv_lib_dl_dlopen=no | ||
12390 | fi | ||
12391 | rm -f conftest.err conftest.$ac_objext \ | ||
12392 | conftest$ac_exeext conftest.$ac_ext | ||
12393 | LIBS=$ac_check_lib_save_LIBS | ||
12394 | fi | ||
12395 | echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 | ||
12396 | echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 | ||
12397 | if test $ac_cv_lib_dl_dlopen = yes; then | ||
12398 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" | ||
12399 | else | ||
12400 | |||
12401 | lt_cv_dlopen="dyld" | ||
12402 | lt_cv_dlopen_libs= | ||
12403 | lt_cv_dlopen_self=yes | ||
12404 | |||
12405 | fi | ||
12406 | |||
12407 | ;; | ||
12408 | |||
12409 | *) | ||
12410 | echo "$as_me:$LINENO: checking for shl_load" >&5 | ||
12411 | echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 | ||
12412 | if test "${ac_cv_func_shl_load+set}" = set; then | ||
12413 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
12414 | else | ||
12415 | cat >conftest.$ac_ext <<_ACEOF | ||
12416 | /* confdefs.h. */ | ||
12417 | _ACEOF | ||
12418 | cat confdefs.h >>conftest.$ac_ext | ||
12419 | cat >>conftest.$ac_ext <<_ACEOF | ||
12420 | /* end confdefs.h. */ | ||
12421 | /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. | ||
12422 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
12423 | #define shl_load innocuous_shl_load | ||
12424 | |||
12425 | /* System header to define __stub macros and hopefully few prototypes, | ||
12426 | which can conflict with char shl_load (); below. | ||
12427 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
12428 | <limits.h> exists even on freestanding compilers. */ | ||
12429 | |||
12430 | #ifdef __STDC__ | ||
12431 | # include <limits.h> | ||
12432 | #else | ||
12433 | # include <assert.h> | ||
12434 | #endif | ||
12435 | |||
12436 | #undef shl_load | ||
12437 | |||
12438 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
12439 | #ifdef __cplusplus | ||
12440 | extern "C" | ||
12441 | { | ||
12442 | #endif | ||
12443 | /* We use char because int might match the return type of a gcc2 | ||
12444 | builtin and then its argument prototype would still apply. */ | ||
12445 | char shl_load (); | ||
12446 | /* The GNU C library defines this for functions which it implements | ||
12447 | to always fail with ENOSYS. Some functions are actually named | ||
12448 | something starting with __ and the normal name is an alias. */ | ||
12449 | #if defined (__stub_shl_load) || defined (__stub___shl_load) | ||
12450 | choke me | ||
12451 | #else | ||
12452 | char (*f) () = shl_load; | ||
12453 | #endif | ||
12454 | #ifdef __cplusplus | ||
12455 | } | ||
12456 | #endif | ||
12457 | |||
12458 | int | ||
12459 | main () | ||
12460 | { | ||
12461 | return f != shl_load; | ||
12462 | ; | ||
12463 | return 0; | ||
12464 | } | ||
12465 | _ACEOF | ||
12466 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
12467 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
12468 | (eval $ac_link) 2>conftest.er1 | ||
12469 | ac_status=$? | ||
12470 | grep -v '^ *+' conftest.er1 >conftest.err | ||
12471 | rm -f conftest.er1 | ||
12472 | cat conftest.err >&5 | ||
12473 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12474 | (exit $ac_status); } && | ||
12475 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
12476 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12477 | (eval $ac_try) 2>&5 | ||
12478 | ac_status=$? | ||
12479 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12480 | (exit $ac_status); }; } && | ||
12481 | { ac_try='test -s conftest$ac_exeext' | ||
12482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12483 | (eval $ac_try) 2>&5 | ||
12484 | ac_status=$? | ||
12485 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12486 | (exit $ac_status); }; }; then | ||
12487 | ac_cv_func_shl_load=yes | ||
12488 | else | ||
12489 | echo "$as_me: failed program was:" >&5 | ||
12490 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
12491 | |||
12492 | ac_cv_func_shl_load=no | ||
12493 | fi | ||
12494 | rm -f conftest.err conftest.$ac_objext \ | ||
12495 | conftest$ac_exeext conftest.$ac_ext | ||
12496 | fi | ||
12497 | echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 | ||
12498 | echo "${ECHO_T}$ac_cv_func_shl_load" >&6 | ||
12499 | if test $ac_cv_func_shl_load = yes; then | ||
12500 | lt_cv_dlopen="shl_load" | ||
12501 | else | ||
12502 | echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 | ||
12503 | echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 | ||
12504 | if test "${ac_cv_lib_dld_shl_load+set}" = set; then | ||
12505 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
12506 | else | ||
12507 | ac_check_lib_save_LIBS=$LIBS | ||
12508 | LIBS="-ldld $LIBS" | ||
12509 | cat >conftest.$ac_ext <<_ACEOF | ||
12510 | /* confdefs.h. */ | ||
12511 | _ACEOF | ||
12512 | cat confdefs.h >>conftest.$ac_ext | ||
12513 | cat >>conftest.$ac_ext <<_ACEOF | ||
12514 | /* end confdefs.h. */ | ||
12515 | |||
12516 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
12517 | #ifdef __cplusplus | ||
12518 | extern "C" | ||
12519 | #endif | ||
12520 | /* We use char because int might match the return type of a gcc2 | ||
12521 | builtin and then its argument prototype would still apply. */ | ||
12522 | char shl_load (); | ||
12523 | int | ||
12524 | main () | ||
12525 | { | ||
12526 | shl_load (); | ||
12527 | ; | ||
12528 | return 0; | ||
12529 | } | ||
12530 | _ACEOF | ||
12531 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
12532 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
12533 | (eval $ac_link) 2>conftest.er1 | ||
12534 | ac_status=$? | ||
12535 | grep -v '^ *+' conftest.er1 >conftest.err | ||
12536 | rm -f conftest.er1 | ||
12537 | cat conftest.err >&5 | ||
12538 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12539 | (exit $ac_status); } && | ||
12540 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
12541 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12542 | (eval $ac_try) 2>&5 | ||
12543 | ac_status=$? | ||
12544 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12545 | (exit $ac_status); }; } && | ||
12546 | { ac_try='test -s conftest$ac_exeext' | ||
12547 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12548 | (eval $ac_try) 2>&5 | ||
12549 | ac_status=$? | ||
12550 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12551 | (exit $ac_status); }; }; then | ||
12552 | ac_cv_lib_dld_shl_load=yes | ||
12553 | else | ||
12554 | echo "$as_me: failed program was:" >&5 | ||
12555 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
12556 | |||
12557 | ac_cv_lib_dld_shl_load=no | ||
12558 | fi | ||
12559 | rm -f conftest.err conftest.$ac_objext \ | ||
12560 | conftest$ac_exeext conftest.$ac_ext | ||
12561 | LIBS=$ac_check_lib_save_LIBS | ||
12562 | fi | ||
12563 | echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 | ||
12564 | echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 | ||
12565 | if test $ac_cv_lib_dld_shl_load = yes; then | ||
12566 | lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" | ||
12567 | else | ||
12568 | echo "$as_me:$LINENO: checking for dlopen" >&5 | ||
12569 | echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 | ||
12570 | if test "${ac_cv_func_dlopen+set}" = set; then | ||
12571 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
12572 | else | ||
12573 | cat >conftest.$ac_ext <<_ACEOF | ||
12574 | /* confdefs.h. */ | ||
12575 | _ACEOF | ||
12576 | cat confdefs.h >>conftest.$ac_ext | ||
12577 | cat >>conftest.$ac_ext <<_ACEOF | ||
12578 | /* end confdefs.h. */ | ||
12579 | /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. | ||
12580 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
12581 | #define dlopen innocuous_dlopen | ||
12582 | |||
12583 | /* System header to define __stub macros and hopefully few prototypes, | ||
12584 | which can conflict with char dlopen (); below. | ||
12585 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
12586 | <limits.h> exists even on freestanding compilers. */ | ||
12587 | |||
12588 | #ifdef __STDC__ | ||
12589 | # include <limits.h> | ||
12590 | #else | ||
12591 | # include <assert.h> | ||
12592 | #endif | ||
12593 | |||
12594 | #undef dlopen | ||
12595 | |||
12596 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
12597 | #ifdef __cplusplus | ||
12598 | extern "C" | ||
12599 | { | ||
12600 | #endif | ||
12601 | /* We use char because int might match the return type of a gcc2 | ||
12602 | builtin and then its argument prototype would still apply. */ | ||
12603 | char dlopen (); | ||
12604 | /* The GNU C library defines this for functions which it implements | ||
12605 | to always fail with ENOSYS. Some functions are actually named | ||
12606 | something starting with __ and the normal name is an alias. */ | ||
12607 | #if defined (__stub_dlopen) || defined (__stub___dlopen) | ||
12608 | choke me | ||
12609 | #else | ||
12610 | char (*f) () = dlopen; | ||
12611 | #endif | ||
12612 | #ifdef __cplusplus | ||
12613 | } | ||
12614 | #endif | ||
12615 | |||
12616 | int | ||
12617 | main () | ||
12618 | { | ||
12619 | return f != dlopen; | ||
12620 | ; | ||
12621 | return 0; | ||
12622 | } | ||
12623 | _ACEOF | ||
12624 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
12625 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
12626 | (eval $ac_link) 2>conftest.er1 | ||
12627 | ac_status=$? | ||
12628 | grep -v '^ *+' conftest.er1 >conftest.err | ||
12629 | rm -f conftest.er1 | ||
12630 | cat conftest.err >&5 | ||
12631 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12632 | (exit $ac_status); } && | ||
12633 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
12634 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12635 | (eval $ac_try) 2>&5 | ||
12636 | ac_status=$? | ||
12637 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12638 | (exit $ac_status); }; } && | ||
12639 | { ac_try='test -s conftest$ac_exeext' | ||
12640 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12641 | (eval $ac_try) 2>&5 | ||
12642 | ac_status=$? | ||
12643 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12644 | (exit $ac_status); }; }; then | ||
12645 | ac_cv_func_dlopen=yes | ||
12646 | else | ||
12647 | echo "$as_me: failed program was:" >&5 | ||
12648 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
12649 | |||
12650 | ac_cv_func_dlopen=no | ||
12651 | fi | ||
12652 | rm -f conftest.err conftest.$ac_objext \ | ||
12653 | conftest$ac_exeext conftest.$ac_ext | ||
12654 | fi | ||
12655 | echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 | ||
12656 | echo "${ECHO_T}$ac_cv_func_dlopen" >&6 | ||
12657 | if test $ac_cv_func_dlopen = yes; then | ||
12658 | lt_cv_dlopen="dlopen" | ||
12659 | else | ||
12660 | echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 | ||
12661 | echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 | ||
12662 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then | ||
12663 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
12664 | else | ||
12665 | ac_check_lib_save_LIBS=$LIBS | ||
12666 | LIBS="-ldl $LIBS" | ||
12667 | cat >conftest.$ac_ext <<_ACEOF | ||
12668 | /* confdefs.h. */ | ||
12669 | _ACEOF | ||
12670 | cat confdefs.h >>conftest.$ac_ext | ||
12671 | cat >>conftest.$ac_ext <<_ACEOF | ||
12672 | /* end confdefs.h. */ | ||
12673 | |||
12674 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
12675 | #ifdef __cplusplus | ||
12676 | extern "C" | ||
12677 | #endif | ||
12678 | /* We use char because int might match the return type of a gcc2 | ||
12679 | builtin and then its argument prototype would still apply. */ | ||
12680 | char dlopen (); | ||
12681 | int | ||
12682 | main () | ||
12683 | { | ||
12684 | dlopen (); | ||
12685 | ; | ||
12686 | return 0; | ||
12687 | } | ||
12688 | _ACEOF | ||
12689 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
12690 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
12691 | (eval $ac_link) 2>conftest.er1 | ||
12692 | ac_status=$? | ||
12693 | grep -v '^ *+' conftest.er1 >conftest.err | ||
12694 | rm -f conftest.er1 | ||
12695 | cat conftest.err >&5 | ||
12696 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12697 | (exit $ac_status); } && | ||
12698 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
12699 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12700 | (eval $ac_try) 2>&5 | ||
12701 | ac_status=$? | ||
12702 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12703 | (exit $ac_status); }; } && | ||
12704 | { ac_try='test -s conftest$ac_exeext' | ||
12705 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12706 | (eval $ac_try) 2>&5 | ||
12707 | ac_status=$? | ||
12708 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12709 | (exit $ac_status); }; }; then | ||
12710 | ac_cv_lib_dl_dlopen=yes | ||
12711 | else | ||
12712 | echo "$as_me: failed program was:" >&5 | ||
12713 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
12714 | |||
12715 | ac_cv_lib_dl_dlopen=no | ||
12716 | fi | ||
12717 | rm -f conftest.err conftest.$ac_objext \ | ||
12718 | conftest$ac_exeext conftest.$ac_ext | ||
12719 | LIBS=$ac_check_lib_save_LIBS | ||
12720 | fi | ||
12721 | echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 | ||
12722 | echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 | ||
12723 | if test $ac_cv_lib_dl_dlopen = yes; then | ||
12724 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" | ||
12725 | else | ||
12726 | echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 | ||
12727 | echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 | ||
12728 | if test "${ac_cv_lib_svld_dlopen+set}" = set; then | ||
12729 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
12730 | else | ||
12731 | ac_check_lib_save_LIBS=$LIBS | ||
12732 | LIBS="-lsvld $LIBS" | ||
12733 | cat >conftest.$ac_ext <<_ACEOF | ||
12734 | /* confdefs.h. */ | ||
12735 | _ACEOF | ||
12736 | cat confdefs.h >>conftest.$ac_ext | ||
12737 | cat >>conftest.$ac_ext <<_ACEOF | ||
12738 | /* end confdefs.h. */ | ||
12739 | |||
12740 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
12741 | #ifdef __cplusplus | ||
12742 | extern "C" | ||
12743 | #endif | ||
12744 | /* We use char because int might match the return type of a gcc2 | ||
12745 | builtin and then its argument prototype would still apply. */ | ||
12746 | char dlopen (); | ||
12747 | int | ||
12748 | main () | ||
12749 | { | ||
12750 | dlopen (); | ||
12751 | ; | ||
12752 | return 0; | ||
12753 | } | ||
12754 | _ACEOF | ||
12755 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
12756 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
12757 | (eval $ac_link) 2>conftest.er1 | ||
12758 | ac_status=$? | ||
12759 | grep -v '^ *+' conftest.er1 >conftest.err | ||
12760 | rm -f conftest.er1 | ||
12761 | cat conftest.err >&5 | ||
12762 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12763 | (exit $ac_status); } && | ||
12764 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
12765 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12766 | (eval $ac_try) 2>&5 | ||
12767 | ac_status=$? | ||
12768 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12769 | (exit $ac_status); }; } && | ||
12770 | { ac_try='test -s conftest$ac_exeext' | ||
12771 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12772 | (eval $ac_try) 2>&5 | ||
12773 | ac_status=$? | ||
12774 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12775 | (exit $ac_status); }; }; then | ||
12776 | ac_cv_lib_svld_dlopen=yes | ||
12777 | else | ||
12778 | echo "$as_me: failed program was:" >&5 | ||
12779 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
12780 | |||
12781 | ac_cv_lib_svld_dlopen=no | ||
12782 | fi | ||
12783 | rm -f conftest.err conftest.$ac_objext \ | ||
12784 | conftest$ac_exeext conftest.$ac_ext | ||
12785 | LIBS=$ac_check_lib_save_LIBS | ||
12786 | fi | ||
12787 | echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 | ||
12788 | echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 | ||
12789 | if test $ac_cv_lib_svld_dlopen = yes; then | ||
12790 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" | ||
12791 | else | ||
12792 | echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 | ||
12793 | echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 | ||
12794 | if test "${ac_cv_lib_dld_dld_link+set}" = set; then | ||
12795 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
12796 | else | ||
12797 | ac_check_lib_save_LIBS=$LIBS | ||
12798 | LIBS="-ldld $LIBS" | ||
12799 | cat >conftest.$ac_ext <<_ACEOF | ||
12800 | /* confdefs.h. */ | ||
12801 | _ACEOF | ||
12802 | cat confdefs.h >>conftest.$ac_ext | ||
12803 | cat >>conftest.$ac_ext <<_ACEOF | ||
12804 | /* end confdefs.h. */ | ||
12805 | |||
12806 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
12807 | #ifdef __cplusplus | ||
12808 | extern "C" | ||
12809 | #endif | ||
12810 | /* We use char because int might match the return type of a gcc2 | ||
12811 | builtin and then its argument prototype would still apply. */ | ||
12812 | char dld_link (); | ||
12813 | int | ||
12814 | main () | ||
12815 | { | ||
12816 | dld_link (); | ||
12817 | ; | ||
12818 | return 0; | ||
12819 | } | ||
12820 | _ACEOF | ||
12821 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
12822 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
12823 | (eval $ac_link) 2>conftest.er1 | ||
12824 | ac_status=$? | ||
12825 | grep -v '^ *+' conftest.er1 >conftest.err | ||
12826 | rm -f conftest.er1 | ||
12827 | cat conftest.err >&5 | ||
12828 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12829 | (exit $ac_status); } && | ||
12830 | { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' | ||
12831 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12832 | (eval $ac_try) 2>&5 | ||
12833 | ac_status=$? | ||
12834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12835 | (exit $ac_status); }; } && | ||
12836 | { ac_try='test -s conftest$ac_exeext' | ||
12837 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
12838 | (eval $ac_try) 2>&5 | ||
12839 | ac_status=$? | ||
12840 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12841 | (exit $ac_status); }; }; then | ||
12842 | ac_cv_lib_dld_dld_link=yes | ||
12843 | else | ||
12844 | echo "$as_me: failed program was:" >&5 | ||
12845 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
12846 | |||
12847 | ac_cv_lib_dld_dld_link=no | ||
12848 | fi | ||
12849 | rm -f conftest.err conftest.$ac_objext \ | ||
12850 | conftest$ac_exeext conftest.$ac_ext | ||
12851 | LIBS=$ac_check_lib_save_LIBS | ||
12852 | fi | ||
12853 | echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 | ||
12854 | echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 | ||
12855 | if test $ac_cv_lib_dld_dld_link = yes; then | ||
12856 | lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" | ||
12857 | fi | ||
12858 | |||
12859 | |||
12860 | fi | ||
12861 | |||
12862 | |||
12863 | fi | ||
12864 | |||
12865 | |||
12866 | fi | ||
12867 | |||
12868 | |||
12869 | fi | ||
12870 | |||
12871 | |||
12872 | fi | ||
12873 | |||
12874 | ;; | ||
12875 | esac | ||
12876 | |||
12877 | if test "x$lt_cv_dlopen" != xno; then | ||
12878 | enable_dlopen=yes | ||
12879 | else | ||
12880 | enable_dlopen=no | ||
12881 | fi | ||
12882 | |||
12883 | case $lt_cv_dlopen in | ||
12884 | dlopen) | ||
12885 | save_CPPFLAGS="$CPPFLAGS" | ||
12886 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | ||
12887 | |||
12888 | save_LDFLAGS="$LDFLAGS" | ||
12889 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | ||
12890 | |||
12891 | save_LIBS="$LIBS" | ||
12892 | LIBS="$lt_cv_dlopen_libs $LIBS" | ||
12893 | |||
12894 | echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 | ||
12895 | echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 | ||
12896 | if test "${lt_cv_dlopen_self+set}" = set; then | ||
12897 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
12898 | else | ||
12899 | if test "$cross_compiling" = yes; then : | ||
12900 | lt_cv_dlopen_self=cross | ||
12901 | else | ||
12902 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
12903 | lt_status=$lt_dlunknown | ||
12904 | cat > conftest.$ac_ext <<EOF | ||
12905 | #line 12905 "configure" | ||
12906 | #include "confdefs.h" | ||
12907 | |||
12908 | #if HAVE_DLFCN_H | ||
12909 | #include <dlfcn.h> | ||
12910 | #endif | ||
12911 | |||
12912 | #include <stdio.h> | ||
12913 | |||
12914 | #ifdef RTLD_GLOBAL | ||
12915 | # define LT_DLGLOBAL RTLD_GLOBAL | ||
12916 | #else | ||
12917 | # ifdef DL_GLOBAL | ||
12918 | # define LT_DLGLOBAL DL_GLOBAL | ||
12919 | # else | ||
12920 | # define LT_DLGLOBAL 0 | ||
12921 | # endif | ||
12922 | #endif | ||
12923 | |||
12924 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | ||
12925 | find out it does not work in some platform. */ | ||
12926 | #ifndef LT_DLLAZY_OR_NOW | ||
12927 | # ifdef RTLD_LAZY | ||
12928 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | ||
12929 | # else | ||
12930 | # ifdef DL_LAZY | ||
12931 | # define LT_DLLAZY_OR_NOW DL_LAZY | ||
12932 | # else | ||
12933 | # ifdef RTLD_NOW | ||
12934 | # define LT_DLLAZY_OR_NOW RTLD_NOW | ||
12935 | # else | ||
12936 | # ifdef DL_NOW | ||
12937 | # define LT_DLLAZY_OR_NOW DL_NOW | ||
12938 | # else | ||
12939 | # define LT_DLLAZY_OR_NOW 0 | ||
12940 | # endif | ||
12941 | # endif | ||
12942 | # endif | ||
12943 | # endif | ||
12944 | #endif | ||
12945 | |||
12946 | #ifdef __cplusplus | ||
12947 | extern "C" void exit (int); | ||
12948 | #endif | ||
12949 | |||
12950 | void fnord() { int i=42;} | ||
12951 | int main () | ||
12952 | { | ||
12953 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
12954 | int status = $lt_dlunknown; | ||
12955 | |||
12956 | if (self) | ||
12957 | { | ||
12958 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | ||
12959 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | ||
12960 | /* dlclose (self); */ | ||
12961 | } | ||
12962 | |||
12963 | exit (status); | ||
12964 | } | ||
12965 | EOF | ||
12966 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
12967 | (eval $ac_link) 2>&5 | ||
12968 | ac_status=$? | ||
12969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
12970 | (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then | ||
12971 | (./conftest; exit; ) 2>/dev/null | ||
12972 | lt_status=$? | ||
12973 | case x$lt_status in | ||
12974 | x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; | ||
12975 | x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; | ||
12976 | x$lt_unknown|x*) lt_cv_dlopen_self=no ;; | ||
12977 | esac | ||
12978 | else : | ||
12979 | # compilation failed | ||
12980 | lt_cv_dlopen_self=no | ||
12981 | fi | ||
12982 | fi | ||
12983 | rm -fr conftest* | ||
12984 | |||
12985 | |||
12986 | fi | ||
12987 | echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 | ||
12988 | echo "${ECHO_T}$lt_cv_dlopen_self" >&6 | ||
12989 | |||
12990 | if test "x$lt_cv_dlopen_self" = xyes; then | ||
12991 | LDFLAGS="$LDFLAGS $link_static_flag" | ||
12992 | echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 | ||
12993 | echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 | ||
12994 | if test "${lt_cv_dlopen_self_static+set}" = set; then | ||
12995 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
12996 | else | ||
12997 | if test "$cross_compiling" = yes; then : | ||
12998 | lt_cv_dlopen_self_static=cross | ||
12999 | else | ||
13000 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
13001 | lt_status=$lt_dlunknown | ||
13002 | cat > conftest.$ac_ext <<EOF | ||
13003 | #line 13003 "configure" | ||
13004 | #include "confdefs.h" | ||
13005 | |||
13006 | #if HAVE_DLFCN_H | ||
13007 | #include <dlfcn.h> | ||
13008 | #endif | ||
13009 | |||
13010 | #include <stdio.h> | ||
13011 | |||
13012 | #ifdef RTLD_GLOBAL | ||
13013 | # define LT_DLGLOBAL RTLD_GLOBAL | ||
13014 | #else | ||
13015 | # ifdef DL_GLOBAL | ||
13016 | # define LT_DLGLOBAL DL_GLOBAL | ||
13017 | # else | ||
13018 | # define LT_DLGLOBAL 0 | ||
13019 | # endif | ||
13020 | #endif | ||
13021 | |||
13022 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | ||
13023 | find out it does not work in some platform. */ | ||
13024 | #ifndef LT_DLLAZY_OR_NOW | ||
13025 | # ifdef RTLD_LAZY | ||
13026 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | ||
13027 | # else | ||
13028 | # ifdef DL_LAZY | ||
13029 | # define LT_DLLAZY_OR_NOW DL_LAZY | ||
13030 | # else | ||
13031 | # ifdef RTLD_NOW | ||
13032 | # define LT_DLLAZY_OR_NOW RTLD_NOW | ||
13033 | # else | ||
13034 | # ifdef DL_NOW | ||
13035 | # define LT_DLLAZY_OR_NOW DL_NOW | ||
13036 | # else | ||
13037 | # define LT_DLLAZY_OR_NOW 0 | ||
13038 | # endif | ||
13039 | # endif | ||
13040 | # endif | ||
13041 | # endif | ||
13042 | #endif | ||
13043 | |||
13044 | #ifdef __cplusplus | ||
13045 | extern "C" void exit (int); | ||
13046 | #endif | ||
13047 | |||
13048 | void fnord() { int i=42;} | ||
13049 | int main () | ||
13050 | { | ||
13051 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
13052 | int status = $lt_dlunknown; | ||
13053 | |||
13054 | if (self) | ||
13055 | { | ||
13056 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | ||
13057 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | ||
13058 | /* dlclose (self); */ | ||
13059 | } | ||
13060 | |||
13061 | exit (status); | ||
13062 | } | ||
13063 | EOF | ||
13064 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
13065 | (eval $ac_link) 2>&5 | ||
13066 | ac_status=$? | ||
13067 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
13068 | (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then | ||
13069 | (./conftest; exit; ) 2>/dev/null | ||
13070 | lt_status=$? | ||
13071 | case x$lt_status in | ||
13072 | x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; | ||
13073 | x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; | ||
13074 | x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; | ||
13075 | esac | ||
13076 | else : | ||
13077 | # compilation failed | ||
13078 | lt_cv_dlopen_self_static=no | ||
13079 | fi | ||
13080 | fi | ||
13081 | rm -fr conftest* | ||
13082 | |||
13083 | |||
13084 | fi | ||
13085 | echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 | ||
13086 | echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 | ||
13087 | fi | ||
13088 | |||
13089 | CPPFLAGS="$save_CPPFLAGS" | ||
13090 | LDFLAGS="$save_LDFLAGS" | ||
13091 | LIBS="$save_LIBS" | ||
13092 | ;; | ||
13093 | esac | ||
13094 | |||
13095 | case $lt_cv_dlopen_self in | ||
13096 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | ||
13097 | *) enable_dlopen_self=unknown ;; | ||
13098 | esac | ||
13099 | |||
13100 | case $lt_cv_dlopen_self_static in | ||
13101 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | ||
13102 | *) enable_dlopen_self_static=unknown ;; | ||
13103 | esac | ||
13104 | fi | ||
13105 | |||
13106 | |||
13107 | # The else clause should only fire when bootstrapping the | ||
13108 | # libtool distribution, otherwise you forgot to ship ltmain.sh | ||
13109 | # with your package, and you will get complaints that there are | ||
13110 | # no rules to generate ltmain.sh. | ||
13111 | if test -f "$ltmain"; then | ||
13112 | # See if we are running on zsh, and set the options which allow our commands through | ||
13113 | # without removal of \ escapes. | ||
13114 | if test -n "${ZSH_VERSION+set}" ; then | ||
13115 | setopt NO_GLOB_SUBST | ||
13116 | fi | ||
13117 | # Now quote all the things that may contain metacharacters while being | ||
13118 | # careful not to overquote the AC_SUBSTed values. We take copies of the | ||
13119 | # variables and quote the copies for generation of the libtool script. | ||
13120 | for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ | ||
13121 | SED SHELL STRIP \ | ||
13122 | libname_spec library_names_spec soname_spec extract_expsyms_cmds \ | ||
13123 | old_striplib striplib file_magic_cmd finish_cmds finish_eval \ | ||
13124 | deplibs_check_method reload_flag reload_cmds need_locks \ | ||
13125 | lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ | ||
13126 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
13127 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | ||
13128 | old_postinstall_cmds old_postuninstall_cmds \ | ||
13129 | compiler_CXX \ | ||
13130 | CC_CXX \ | ||
13131 | LD_CXX \ | ||
13132 | lt_prog_compiler_wl_CXX \ | ||
13133 | lt_prog_compiler_pic_CXX \ | ||
13134 | lt_prog_compiler_static_CXX \ | ||
13135 | lt_prog_compiler_no_builtin_flag_CXX \ | ||
13136 | export_dynamic_flag_spec_CXX \ | ||
13137 | thread_safe_flag_spec_CXX \ | ||
13138 | whole_archive_flag_spec_CXX \ | ||
13139 | enable_shared_with_static_runtimes_CXX \ | ||
13140 | old_archive_cmds_CXX \ | ||
13141 | old_archive_from_new_cmds_CXX \ | ||
13142 | predep_objects_CXX \ | ||
13143 | postdep_objects_CXX \ | ||
13144 | predeps_CXX \ | ||
13145 | postdeps_CXX \ | ||
13146 | compiler_lib_search_path_CXX \ | ||
13147 | archive_cmds_CXX \ | ||
13148 | archive_expsym_cmds_CXX \ | ||
13149 | postinstall_cmds_CXX \ | ||
13150 | postuninstall_cmds_CXX \ | ||
13151 | old_archive_from_expsyms_cmds_CXX \ | ||
13152 | allow_undefined_flag_CXX \ | ||
13153 | no_undefined_flag_CXX \ | ||
13154 | export_symbols_cmds_CXX \ | ||
13155 | hardcode_libdir_flag_spec_CXX \ | ||
13156 | hardcode_libdir_flag_spec_ld_CXX \ | ||
13157 | hardcode_libdir_separator_CXX \ | ||
13158 | hardcode_automatic_CXX \ | ||
13159 | module_cmds_CXX \ | ||
13160 | module_expsym_cmds_CXX \ | ||
13161 | lt_cv_prog_compiler_c_o_CXX \ | ||
13162 | exclude_expsyms_CXX \ | ||
13163 | include_expsyms_CXX; do | ||
13164 | |||
13165 | case $var in | ||
13166 | old_archive_cmds_CXX | \ | ||
13167 | old_archive_from_new_cmds_CXX | \ | ||
13168 | archive_cmds_CXX | \ | ||
13169 | archive_expsym_cmds_CXX | \ | ||
13170 | module_cmds_CXX | \ | ||
13171 | module_expsym_cmds_CXX | \ | ||
13172 | old_archive_from_expsyms_cmds_CXX | \ | ||
13173 | export_symbols_cmds_CXX | \ | ||
13174 | extract_expsyms_cmds | reload_cmds | finish_cmds | \ | ||
13175 | postinstall_cmds | postuninstall_cmds | \ | ||
13176 | old_postinstall_cmds | old_postuninstall_cmds | \ | ||
13177 | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | ||
13178 | # Double-quote double-evaled strings. | ||
13179 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" | ||
13180 | ;; | ||
13181 | *) | ||
13182 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" | ||
13183 | ;; | ||
13184 | esac | ||
13185 | done | ||
13186 | |||
13187 | case $lt_echo in | ||
13188 | *'\$0 --fallback-echo"') | ||
13189 | lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` | ||
13190 | ;; | ||
13191 | esac | ||
13192 | |||
13193 | cfgfile="$ofile" | ||
13194 | |||
13195 | cat <<__EOF__ >> "$cfgfile" | ||
13196 | # ### BEGIN LIBTOOL TAG CONFIG: $tagname | ||
13197 | |||
13198 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | ||
13199 | |||
13200 | # Shell to use when invoking shell scripts. | ||
13201 | SHELL=$lt_SHELL | ||
13202 | |||
13203 | # Whether or not to build shared libraries. | ||
13204 | build_libtool_libs=$enable_shared | ||
13205 | |||
13206 | # Whether or not to build static libraries. | ||
13207 | build_old_libs=$enable_static | ||
13208 | |||
13209 | # Whether or not to add -lc for building shared libraries. | ||
13210 | build_libtool_need_lc=$archive_cmds_need_lc_CXX | ||
13211 | |||
13212 | # Whether or not to disallow shared libs when runtime libs are static | ||
13213 | allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX | ||
13214 | |||
13215 | # Whether or not to optimize for fast installation. | ||
13216 | fast_install=$enable_fast_install | ||
13217 | |||
13218 | # The host system. | ||
13219 | host_alias=$host_alias | ||
13220 | host=$host | ||
13221 | |||
13222 | # An echo program that does not interpret backslashes. | ||
13223 | echo=$lt_echo | ||
13224 | |||
13225 | # The archiver. | ||
13226 | AR=$lt_AR | ||
13227 | AR_FLAGS=$lt_AR_FLAGS | ||
13228 | |||
13229 | # A C compiler. | ||
13230 | LTCC=$lt_LTCC | ||
13231 | |||
13232 | # A language-specific compiler. | ||
13233 | CC=$lt_compiler_CXX | ||
13234 | |||
13235 | # Is the compiler the GNU C compiler? | ||
13236 | with_gcc=$GCC_CXX | ||
13237 | |||
13238 | # An ERE matcher. | ||
13239 | EGREP=$lt_EGREP | ||
13240 | |||
13241 | # The linker used to build libraries. | ||
13242 | LD=$lt_LD_CXX | ||
13243 | |||
13244 | # Whether we need hard or soft links. | ||
13245 | LN_S=$lt_LN_S | ||
13246 | |||
13247 | # A BSD-compatible nm program. | ||
13248 | NM=$lt_NM | ||
13249 | |||
13250 | # A symbol stripping program | ||
13251 | STRIP=$lt_STRIP | ||
13252 | |||
13253 | # Used to examine libraries when file_magic_cmd begins "file" | ||
13254 | MAGIC_CMD=$MAGIC_CMD | ||
13255 | |||
13256 | # Used on cygwin: DLL creation program. | ||
13257 | DLLTOOL="$DLLTOOL" | ||
13258 | |||
13259 | # Used on cygwin: object dumper. | ||
13260 | OBJDUMP="$OBJDUMP" | ||
13261 | |||
13262 | # Used on cygwin: assembler. | ||
13263 | AS="$AS" | ||
13264 | |||
13265 | # The name of the directory that contains temporary libtool files. | ||
13266 | objdir=$objdir | ||
13267 | |||
13268 | # How to create reloadable object files. | ||
13269 | reload_flag=$lt_reload_flag | ||
13270 | reload_cmds=$lt_reload_cmds | ||
13271 | |||
13272 | # How to pass a linker flag through the compiler. | ||
13273 | wl=$lt_lt_prog_compiler_wl_CXX | ||
13274 | |||
13275 | # Object file suffix (normally "o"). | ||
13276 | objext="$ac_objext" | ||
13277 | |||
13278 | # Old archive suffix (normally "a"). | ||
13279 | libext="$libext" | ||
13280 | |||
13281 | # Shared library suffix (normally ".so"). | ||
13282 | shrext_cmds='$shrext_cmds' | ||
13283 | |||
13284 | # Executable file suffix (normally ""). | ||
13285 | exeext="$exeext" | ||
13286 | |||
13287 | # Additional compiler flags for building library objects. | ||
13288 | pic_flag=$lt_lt_prog_compiler_pic_CXX | ||
13289 | pic_mode=$pic_mode | ||
13290 | |||
13291 | # What is the maximum length of a command? | ||
13292 | max_cmd_len=$lt_cv_sys_max_cmd_len | ||
13293 | |||
13294 | # Does compiler simultaneously support -c and -o options? | ||
13295 | compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX | ||
13296 | |||
13297 | # Must we lock files when doing compilation ? | ||
13298 | need_locks=$lt_need_locks | ||
13299 | |||
13300 | # Do we need the lib prefix for modules? | ||
13301 | need_lib_prefix=$need_lib_prefix | ||
13302 | |||
13303 | # Do we need a version for libraries? | ||
13304 | need_version=$need_version | ||
13305 | |||
13306 | # Whether dlopen is supported. | ||
13307 | dlopen_support=$enable_dlopen | ||
13308 | |||
13309 | # Whether dlopen of programs is supported. | ||
13310 | dlopen_self=$enable_dlopen_self | ||
13311 | |||
13312 | # Whether dlopen of statically linked programs is supported. | ||
13313 | dlopen_self_static=$enable_dlopen_self_static | ||
13314 | |||
13315 | # Compiler flag to prevent dynamic linking. | ||
13316 | link_static_flag=$lt_lt_prog_compiler_static_CXX | ||
13317 | |||
13318 | # Compiler flag to turn off builtin functions. | ||
13319 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX | ||
13320 | |||
13321 | # Compiler flag to allow reflexive dlopens. | ||
13322 | export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX | ||
13323 | |||
13324 | # Compiler flag to generate shared objects directly from archives. | ||
13325 | whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX | ||
13326 | |||
13327 | # Compiler flag to generate thread-safe objects. | ||
13328 | thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX | ||
13329 | |||
13330 | # Library versioning type. | ||
13331 | version_type=$version_type | ||
13332 | |||
13333 | # Format of library name prefix. | ||
13334 | libname_spec=$lt_libname_spec | ||
13335 | |||
13336 | # List of archive names. First name is the real one, the rest are links. | ||
13337 | # The last name is the one that the linker finds with -lNAME. | ||
13338 | library_names_spec=$lt_library_names_spec | ||
13339 | |||
13340 | # The coded name of the library, if different from the real name. | ||
13341 | soname_spec=$lt_soname_spec | ||
13342 | |||
13343 | # Commands used to build and install an old-style archive. | ||
13344 | RANLIB=$lt_RANLIB | ||
13345 | old_archive_cmds=$lt_old_archive_cmds_CXX | ||
13346 | old_postinstall_cmds=$lt_old_postinstall_cmds | ||
13347 | old_postuninstall_cmds=$lt_old_postuninstall_cmds | ||
13348 | |||
13349 | # Create an old-style archive from a shared archive. | ||
13350 | old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX | ||
13351 | |||
13352 | # Create a temporary old-style archive to link instead of a shared archive. | ||
13353 | old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX | ||
13354 | |||
13355 | # Commands used to build and install a shared archive. | ||
13356 | archive_cmds=$lt_archive_cmds_CXX | ||
13357 | archive_expsym_cmds=$lt_archive_expsym_cmds_CXX | ||
13358 | postinstall_cmds=$lt_postinstall_cmds | ||
13359 | postuninstall_cmds=$lt_postuninstall_cmds | ||
13360 | |||
13361 | # Commands used to build a loadable module (assumed same as above if empty) | ||
13362 | module_cmds=$lt_module_cmds_CXX | ||
13363 | module_expsym_cmds=$lt_module_expsym_cmds_CXX | ||
13364 | |||
13365 | # Commands to strip libraries. | ||
13366 | old_striplib=$lt_old_striplib | ||
13367 | striplib=$lt_striplib | ||
13368 | |||
13369 | # Dependencies to place before the objects being linked to create a | ||
13370 | # shared library. | ||
13371 | predep_objects=$lt_predep_objects_CXX | ||
13372 | |||
13373 | # Dependencies to place after the objects being linked to create a | ||
13374 | # shared library. | ||
13375 | postdep_objects=$lt_postdep_objects_CXX | ||
13376 | |||
13377 | # Dependencies to place before the objects being linked to create a | ||
13378 | # shared library. | ||
13379 | predeps=$lt_predeps_CXX | ||
13380 | |||
13381 | # Dependencies to place after the objects being linked to create a | ||
13382 | # shared library. | ||
13383 | postdeps=$lt_postdeps_CXX | ||
13384 | |||
13385 | # The library search path used internally by the compiler when linking | ||
13386 | # a shared library. | ||
13387 | compiler_lib_search_path=$lt_compiler_lib_search_path_CXX | ||
13388 | |||
13389 | # Method to check whether dependent libraries are shared objects. | ||
13390 | deplibs_check_method=$lt_deplibs_check_method | ||
13391 | |||
13392 | # Command to use when deplibs_check_method == file_magic. | ||
13393 | file_magic_cmd=$lt_file_magic_cmd | ||
13394 | |||
13395 | # Flag that allows shared libraries with undefined symbols to be built. | ||
13396 | allow_undefined_flag=$lt_allow_undefined_flag_CXX | ||
13397 | |||
13398 | # Flag that forces no undefined symbols. | ||
13399 | no_undefined_flag=$lt_no_undefined_flag_CXX | ||
13400 | |||
13401 | # Commands used to finish a libtool library installation in a directory. | ||
13402 | finish_cmds=$lt_finish_cmds | ||
13403 | |||
13404 | # Same as above, but a single script fragment to be evaled but not shown. | ||
13405 | finish_eval=$lt_finish_eval | ||
13406 | |||
13407 | # Take the output of nm and produce a listing of raw symbols and C names. | ||
13408 | global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe | ||
13409 | |||
13410 | # Transform the output of nm in a proper C declaration | ||
13411 | global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl | ||
13412 | |||
13413 | # Transform the output of nm in a C name address pair | ||
13414 | global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address | ||
13415 | |||
13416 | # This is the shared library runtime path variable. | ||
13417 | runpath_var=$runpath_var | ||
13418 | |||
13419 | # This is the shared library path variable. | ||
13420 | shlibpath_var=$shlibpath_var | ||
13421 | |||
13422 | # Is shlibpath searched before the hard-coded library search path? | ||
13423 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath | ||
13424 | |||
13425 | # How to hardcode a shared library path into an executable. | ||
13426 | hardcode_action=$hardcode_action_CXX | ||
13427 | |||
13428 | # Whether we should hardcode library paths into libraries. | ||
13429 | hardcode_into_libs=$hardcode_into_libs | ||
13430 | |||
13431 | # Flag to hardcode \$libdir into a binary during linking. | ||
13432 | # This must work even if \$libdir does not exist. | ||
13433 | hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX | ||
13434 | |||
13435 | # If ld is used when linking, flag to hardcode \$libdir into | ||
13436 | # a binary during linking. This must work even if \$libdir does | ||
13437 | # not exist. | ||
13438 | hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX | ||
13439 | |||
13440 | # Whether we need a single -rpath flag with a separated argument. | ||
13441 | hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX | ||
13442 | |||
13443 | # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the | ||
13444 | # resulting binary. | ||
13445 | hardcode_direct=$hardcode_direct_CXX | ||
13446 | |||
13447 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | ||
13448 | # resulting binary. | ||
13449 | hardcode_minus_L=$hardcode_minus_L_CXX | ||
13450 | |||
13451 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | ||
13452 | # the resulting binary. | ||
13453 | hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX | ||
13454 | |||
13455 | # Set to yes if building a shared library automatically hardcodes DIR into the library | ||
13456 | # and all subsequent libraries and executables linked against it. | ||
13457 | hardcode_automatic=$hardcode_automatic_CXX | ||
13458 | |||
13459 | # Variables whose values should be saved in libtool wrapper scripts and | ||
13460 | # restored at relink time. | ||
13461 | variables_saved_for_relink="$variables_saved_for_relink" | ||
13462 | |||
13463 | # Whether libtool must link a program against all its dependency libraries. | ||
13464 | link_all_deplibs=$link_all_deplibs_CXX | ||
13465 | |||
13466 | # Compile-time system search path for libraries | ||
13467 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec | ||
13468 | |||
13469 | # Run-time system search path for libraries | ||
13470 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec | ||
13471 | |||
13472 | # Fix the shell variable \$srcfile for the compiler. | ||
13473 | fix_srcfile_path="$fix_srcfile_path_CXX" | ||
13474 | |||
13475 | # Set to yes if exported symbols are required. | ||
13476 | always_export_symbols=$always_export_symbols_CXX | ||
13477 | |||
13478 | # The commands to list exported symbols. | ||
13479 | export_symbols_cmds=$lt_export_symbols_cmds_CXX | ||
13480 | |||
13481 | # The commands to extract the exported symbol list from a shared archive. | ||
13482 | extract_expsyms_cmds=$lt_extract_expsyms_cmds | ||
13483 | |||
13484 | # Symbols that should not be listed in the preloaded symbols. | ||
13485 | exclude_expsyms=$lt_exclude_expsyms_CXX | ||
13486 | |||
13487 | # Symbols that must always be exported. | ||
13488 | include_expsyms=$lt_include_expsyms_CXX | ||
13489 | |||
13490 | # ### END LIBTOOL TAG CONFIG: $tagname | ||
13491 | |||
13492 | __EOF__ | ||
13493 | |||
13494 | |||
13495 | else | ||
13496 | # If there is no Makefile yet, we rely on a make rule to execute | ||
13497 | # `config.status --recheck' to rerun these tests and create the | ||
13498 | # libtool script then. | ||
13499 | ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` | ||
13500 | if test -f "$ltmain_in"; then | ||
13501 | test -f Makefile && make "$ltmain" | ||
13502 | fi | ||
13503 | fi | ||
13504 | |||
13505 | |||
13506 | ac_ext=c | ||
13507 | ac_cpp='$CPP $CPPFLAGS' | ||
13508 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
13509 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
13510 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
13511 | |||
13512 | CC=$lt_save_CC | ||
13513 | LDCXX=$LD | ||
13514 | LD=$lt_save_LD | ||
13515 | GCC=$lt_save_GCC | ||
13516 | with_gnu_ldcxx=$with_gnu_ld | ||
13517 | with_gnu_ld=$lt_save_with_gnu_ld | ||
13518 | lt_cv_path_LDCXX=$lt_cv_path_LD | ||
13519 | lt_cv_path_LD=$lt_save_path_LD | ||
13520 | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld | ||
13521 | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld | ||
13522 | |||
13523 | else | ||
13524 | tagname="" | ||
13525 | fi | ||
13526 | ;; | ||
13527 | |||
13528 | F77) | ||
13529 | if test -n "$F77" && test "X$F77" != "Xno"; then | ||
13530 | |||
13531 | ac_ext=f | ||
13532 | ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' | ||
13533 | ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
13534 | ac_compiler_gnu=$ac_cv_f77_compiler_gnu | ||
13535 | |||
13536 | |||
13537 | archive_cmds_need_lc_F77=no | ||
13538 | allow_undefined_flag_F77= | ||
13539 | always_export_symbols_F77=no | ||
13540 | archive_expsym_cmds_F77= | ||
13541 | export_dynamic_flag_spec_F77= | ||
13542 | hardcode_direct_F77=no | ||
13543 | hardcode_libdir_flag_spec_F77= | ||
13544 | hardcode_libdir_flag_spec_ld_F77= | ||
13545 | hardcode_libdir_separator_F77= | ||
13546 | hardcode_minus_L_F77=no | ||
13547 | hardcode_automatic_F77=no | ||
13548 | module_cmds_F77= | ||
13549 | module_expsym_cmds_F77= | ||
13550 | link_all_deplibs_F77=unknown | ||
13551 | old_archive_cmds_F77=$old_archive_cmds | ||
13552 | no_undefined_flag_F77= | ||
13553 | whole_archive_flag_spec_F77= | ||
13554 | enable_shared_with_static_runtimes_F77=no | ||
13555 | |||
13556 | # Source file extension for f77 test sources. | ||
13557 | ac_ext=f | ||
13558 | |||
13559 | # Object file extension for compiled f77 test sources. | ||
13560 | objext=o | ||
13561 | objext_F77=$objext | ||
13562 | |||
13563 | # Code to be used in simple compile tests | ||
13564 | lt_simple_compile_test_code=" subroutine t\n return\n end\n" | ||
13565 | |||
13566 | # Code to be used in simple link tests | ||
13567 | lt_simple_link_test_code=" program t\n end\n" | ||
13568 | |||
13569 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
13570 | |||
13571 | # If no C compiler was specified, use CC. | ||
13572 | LTCC=${LTCC-"$CC"} | ||
13573 | |||
13574 | # Allow CC to be a program name with arguments. | ||
13575 | compiler=$CC | ||
13576 | |||
13577 | |||
13578 | # Allow CC to be a program name with arguments. | ||
13579 | lt_save_CC="$CC" | ||
13580 | CC=${F77-"f77"} | ||
13581 | compiler=$CC | ||
13582 | compiler_F77=$CC | ||
13583 | cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` | ||
13584 | |||
13585 | echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 | ||
13586 | echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 | ||
13587 | echo "$as_me:$LINENO: result: $can_build_shared" >&5 | ||
13588 | echo "${ECHO_T}$can_build_shared" >&6 | ||
13589 | |||
13590 | echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 | ||
13591 | echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 | ||
13592 | test "$can_build_shared" = "no" && enable_shared=no | ||
13593 | |||
13594 | # On AIX, shared libraries and static libraries use the same namespace, and | ||
13595 | # are all built from PIC. | ||
13596 | case "$host_os" in | ||
13597 | aix3*) | ||
13598 | test "$enable_shared" = yes && enable_static=no | ||
13599 | if test -n "$RANLIB"; then | ||
13600 | archive_cmds="$archive_cmds~\$RANLIB \$lib" | ||
13601 | postinstall_cmds='$RANLIB $lib' | ||
13602 | fi | ||
13603 | ;; | ||
13604 | aix4* | aix5*) | ||
13605 | test "$enable_shared" = yes && enable_static=no | ||
13606 | ;; | ||
13607 | esac | ||
13608 | echo "$as_me:$LINENO: result: $enable_shared" >&5 | ||
13609 | echo "${ECHO_T}$enable_shared" >&6 | ||
13610 | |||
13611 | echo "$as_me:$LINENO: checking whether to build static libraries" >&5 | ||
13612 | echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 | ||
13613 | # Make sure either enable_shared or enable_static is yes. | ||
13614 | test "$enable_shared" = yes || enable_static=yes | ||
13615 | echo "$as_me:$LINENO: result: $enable_static" >&5 | ||
13616 | echo "${ECHO_T}$enable_static" >&6 | ||
13617 | |||
13618 | test "$ld_shlibs_F77" = no && can_build_shared=no | ||
13619 | |||
13620 | GCC_F77="$G77" | ||
13621 | LD_F77="$LD" | ||
13622 | |||
13623 | lt_prog_compiler_wl_F77= | ||
13624 | lt_prog_compiler_pic_F77= | ||
13625 | lt_prog_compiler_static_F77= | ||
13626 | |||
13627 | echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 | ||
13628 | echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 | ||
13629 | |||
13630 | if test "$GCC" = yes; then | ||
13631 | lt_prog_compiler_wl_F77='-Wl,' | ||
13632 | lt_prog_compiler_static_F77='-static' | ||
13633 | |||
13634 | case $host_os in | ||
13635 | aix*) | ||
13636 | # All AIX code is PIC. | ||
13637 | if test "$host_cpu" = ia64; then | ||
13638 | # AIX 5 now supports IA64 processor | ||
13639 | lt_prog_compiler_static_F77='-Bstatic' | ||
13640 | fi | ||
13641 | ;; | ||
13642 | |||
13643 | amigaos*) | ||
13644 | # FIXME: we need at least 68020 code to build shared libraries, but | ||
13645 | # adding the `-m68020' flag to GCC prevents building anything better, | ||
13646 | # like `-m68040'. | ||
13647 | lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' | ||
13648 | ;; | ||
13649 | |||
13650 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | ||
13651 | # PIC is the default for these OSes. | ||
13652 | ;; | ||
13653 | |||
13654 | mingw* | pw32* | os2*) | ||
13655 | # This hack is so that the source file can tell whether it is being | ||
13656 | # built for inclusion in a dll (and should export symbols for example). | ||
13657 | lt_prog_compiler_pic_F77='-DDLL_EXPORT' | ||
13658 | ;; | ||
13659 | |||
13660 | darwin* | rhapsody*) | ||
13661 | # PIC is the default on this platform | ||
13662 | # Common symbols not allowed in MH_DYLIB files | ||
13663 | lt_prog_compiler_pic_F77='-fno-common' | ||
13664 | ;; | ||
13665 | |||
13666 | msdosdjgpp*) | ||
13667 | # Just because we use GCC doesn't mean we suddenly get shared libraries | ||
13668 | # on systems that don't support them. | ||
13669 | lt_prog_compiler_can_build_shared_F77=no | ||
13670 | enable_shared=no | ||
13671 | ;; | ||
13672 | |||
13673 | sysv4*MP*) | ||
13674 | if test -d /usr/nec; then | ||
13675 | lt_prog_compiler_pic_F77=-Kconform_pic | ||
13676 | fi | ||
13677 | ;; | ||
13678 | |||
13679 | hpux*) | ||
13680 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
13681 | # not for PA HP-UX. | ||
13682 | case "$host_cpu" in | ||
13683 | hppa*64*|ia64*) | ||
13684 | # +Z the default | ||
13685 | ;; | ||
13686 | *) | ||
13687 | lt_prog_compiler_pic_F77='-fPIC' | ||
13688 | ;; | ||
13689 | esac | ||
13690 | ;; | ||
13691 | |||
13692 | *) | ||
13693 | lt_prog_compiler_pic_F77='-fPIC' | ||
13694 | ;; | ||
13695 | esac | ||
13696 | else | ||
13697 | # PORTME Check for flag to pass linker flags through the system compiler. | ||
13698 | case $host_os in | ||
13699 | aix*) | ||
13700 | lt_prog_compiler_wl_F77='-Wl,' | ||
13701 | if test "$host_cpu" = ia64; then | ||
13702 | # AIX 5 now supports IA64 processor | ||
13703 | lt_prog_compiler_static_F77='-Bstatic' | ||
13704 | else | ||
13705 | lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' | ||
13706 | fi | ||
13707 | ;; | ||
13708 | |||
13709 | mingw* | pw32* | os2*) | ||
13710 | # This hack is so that the source file can tell whether it is being | ||
13711 | # built for inclusion in a dll (and should export symbols for example). | ||
13712 | lt_prog_compiler_pic_F77='-DDLL_EXPORT' | ||
13713 | ;; | ||
13714 | |||
13715 | hpux9* | hpux10* | hpux11*) | ||
13716 | lt_prog_compiler_wl_F77='-Wl,' | ||
13717 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
13718 | # not for PA HP-UX. | ||
13719 | case "$host_cpu" in | ||
13720 | hppa*64*|ia64*) | ||
13721 | # +Z the default | ||
13722 | ;; | ||
13723 | *) | ||
13724 | lt_prog_compiler_pic_F77='+Z' | ||
13725 | ;; | ||
13726 | esac | ||
13727 | # Is there a better lt_prog_compiler_static that works with the bundled CC? | ||
13728 | lt_prog_compiler_static_F77='${wl}-a ${wl}archive' | ||
13729 | ;; | ||
13730 | |||
13731 | irix5* | irix6* | nonstopux*) | ||
13732 | lt_prog_compiler_wl_F77='-Wl,' | ||
13733 | # PIC (with -KPIC) is the default. | ||
13734 | lt_prog_compiler_static_F77='-non_shared' | ||
13735 | ;; | ||
13736 | |||
13737 | newsos6) | ||
13738 | lt_prog_compiler_pic_F77='-KPIC' | ||
13739 | lt_prog_compiler_static_F77='-Bstatic' | ||
13740 | ;; | ||
13741 | |||
13742 | linux*) | ||
13743 | case $CC in | ||
13744 | icc* | ecc*) | ||
13745 | lt_prog_compiler_wl_F77='-Wl,' | ||
13746 | lt_prog_compiler_pic_F77='-KPIC' | ||
13747 | lt_prog_compiler_static_F77='-static' | ||
13748 | ;; | ||
13749 | ccc*) | ||
13750 | lt_prog_compiler_wl_F77='-Wl,' | ||
13751 | # All Alpha code is PIC. | ||
13752 | lt_prog_compiler_static_F77='-non_shared' | ||
13753 | ;; | ||
13754 | esac | ||
13755 | ;; | ||
13756 | |||
13757 | osf3* | osf4* | osf5*) | ||
13758 | lt_prog_compiler_wl_F77='-Wl,' | ||
13759 | # All OSF/1 code is PIC. | ||
13760 | lt_prog_compiler_static_F77='-non_shared' | ||
13761 | ;; | ||
13762 | |||
13763 | sco3.2v5*) | ||
13764 | lt_prog_compiler_pic_F77='-Kpic' | ||
13765 | lt_prog_compiler_static_F77='-dn' | ||
13766 | ;; | ||
13767 | |||
13768 | solaris*) | ||
13769 | lt_prog_compiler_wl_F77='-Wl,' | ||
13770 | lt_prog_compiler_pic_F77='-KPIC' | ||
13771 | lt_prog_compiler_static_F77='-Bstatic' | ||
13772 | ;; | ||
13773 | |||
13774 | sunos4*) | ||
13775 | lt_prog_compiler_wl_F77='-Qoption ld ' | ||
13776 | lt_prog_compiler_pic_F77='-PIC' | ||
13777 | lt_prog_compiler_static_F77='-Bstatic' | ||
13778 | ;; | ||
13779 | |||
13780 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
13781 | lt_prog_compiler_wl_F77='-Wl,' | ||
13782 | lt_prog_compiler_pic_F77='-KPIC' | ||
13783 | lt_prog_compiler_static_F77='-Bstatic' | ||
13784 | ;; | ||
13785 | |||
13786 | sysv4*MP*) | ||
13787 | if test -d /usr/nec ;then | ||
13788 | lt_prog_compiler_pic_F77='-Kconform_pic' | ||
13789 | lt_prog_compiler_static_F77='-Bstatic' | ||
13790 | fi | ||
13791 | ;; | ||
13792 | |||
13793 | uts4*) | ||
13794 | lt_prog_compiler_pic_F77='-pic' | ||
13795 | lt_prog_compiler_static_F77='-Bstatic' | ||
13796 | ;; | ||
13797 | |||
13798 | *) | ||
13799 | lt_prog_compiler_can_build_shared_F77=no | ||
13800 | ;; | ||
13801 | esac | ||
13802 | fi | ||
13803 | |||
13804 | echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 | ||
13805 | echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 | ||
13806 | |||
13807 | # | ||
13808 | # Check to make sure the PIC flag actually works. | ||
13809 | # | ||
13810 | if test -n "$lt_prog_compiler_pic_F77"; then | ||
13811 | |||
13812 | echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 | ||
13813 | echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 | ||
13814 | if test "${lt_prog_compiler_pic_works_F77+set}" = set; then | ||
13815 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
13816 | else | ||
13817 | lt_prog_compiler_pic_works_F77=no | ||
13818 | ac_outfile=conftest.$ac_objext | ||
13819 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
13820 | lt_compiler_flag="$lt_prog_compiler_pic_F77" | ||
13821 | # Insert the option either (1) after the last *FLAGS variable, or | ||
13822 | # (2) before a word containing "conftest.", or (3) at the end. | ||
13823 | # Note that $ac_compile itself does not contain backslashes and begins | ||
13824 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
13825 | # The option is referenced via a variable to avoid confusing sed. | ||
13826 | lt_compile=`echo "$ac_compile" | $SED \ | ||
13827 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
13828 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||
13829 | -e 's:$: $lt_compiler_flag:'` | ||
13830 | (eval echo "\"\$as_me:13830: $lt_compile\"" >&5) | ||
13831 | (eval "$lt_compile" 2>conftest.err) | ||
13832 | ac_status=$? | ||
13833 | cat conftest.err >&5 | ||
13834 | echo "$as_me:13834: \$? = $ac_status" >&5 | ||
13835 | if (exit $ac_status) && test -s "$ac_outfile"; then | ||
13836 | # The compiler can only warn and ignore the option if not recognized | ||
13837 | # So say no if there are warnings | ||
13838 | if test ! -s conftest.err; then | ||
13839 | lt_prog_compiler_pic_works_F77=yes | ||
13840 | fi | ||
13841 | fi | ||
13842 | $rm conftest* | ||
13843 | |||
13844 | fi | ||
13845 | echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 | ||
13846 | echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 | ||
13847 | |||
13848 | if test x"$lt_prog_compiler_pic_works_F77" = xyes; then | ||
13849 | case $lt_prog_compiler_pic_F77 in | ||
13850 | "" | " "*) ;; | ||
13851 | *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; | ||
13852 | esac | ||
13853 | else | ||
13854 | lt_prog_compiler_pic_F77= | ||
13855 | lt_prog_compiler_can_build_shared_F77=no | ||
13856 | fi | ||
13857 | |||
13858 | fi | ||
13859 | case "$host_os" in | ||
13860 | # For platforms which do not support PIC, -DPIC is meaningless: | ||
13861 | *djgpp*) | ||
13862 | lt_prog_compiler_pic_F77= | ||
13863 | ;; | ||
13864 | *) | ||
13865 | lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" | ||
13866 | ;; | ||
13867 | esac | ||
13868 | |||
13869 | echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 | ||
13870 | echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 | ||
13871 | if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then | ||
13872 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
13873 | else | ||
13874 | lt_cv_prog_compiler_c_o_F77=no | ||
13875 | $rm -r conftest 2>/dev/null | ||
13876 | mkdir conftest | ||
13877 | cd conftest | ||
13878 | mkdir out | ||
13879 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
13880 | |||
13881 | lt_compiler_flag="-o out/conftest2.$ac_objext" | ||
13882 | # Insert the option either (1) after the last *FLAGS variable, or | ||
13883 | # (2) before a word containing "conftest.", or (3) at the end. | ||
13884 | # Note that $ac_compile itself does not contain backslashes and begins | ||
13885 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
13886 | lt_compile=`echo "$ac_compile" | $SED \ | ||
13887 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
13888 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||
13889 | -e 's:$: $lt_compiler_flag:'` | ||
13890 | (eval echo "\"\$as_me:13890: $lt_compile\"" >&5) | ||
13891 | (eval "$lt_compile" 2>out/conftest.err) | ||
13892 | ac_status=$? | ||
13893 | cat out/conftest.err >&5 | ||
13894 | echo "$as_me:13894: \$? = $ac_status" >&5 | ||
13895 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | ||
13896 | then | ||
13897 | # The compiler can only warn and ignore the option if not recognized | ||
13898 | # So say no if there are warnings | ||
13899 | if test ! -s out/conftest.err; then | ||
13900 | lt_cv_prog_compiler_c_o_F77=yes | ||
13901 | fi | ||
13902 | fi | ||
13903 | chmod u+w . | ||
13904 | $rm conftest* | ||
13905 | # SGI C++ compiler will create directory out/ii_files/ for | ||
13906 | # template instantiation | ||
13907 | test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files | ||
13908 | $rm out/* && rmdir out | ||
13909 | cd .. | ||
13910 | rmdir conftest | ||
13911 | $rm conftest* | ||
13912 | |||
13913 | fi | ||
13914 | echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 | ||
13915 | echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 | ||
13916 | |||
13917 | |||
13918 | hard_links="nottested" | ||
13919 | if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then | ||
13920 | # do not overwrite the value of need_locks provided by the user | ||
13921 | echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 | ||
13922 | echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 | ||
13923 | hard_links=yes | ||
13924 | $rm conftest* | ||
13925 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
13926 | touch conftest.a | ||
13927 | ln conftest.a conftest.b 2>&5 || hard_links=no | ||
13928 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
13929 | echo "$as_me:$LINENO: result: $hard_links" >&5 | ||
13930 | echo "${ECHO_T}$hard_links" >&6 | ||
13931 | if test "$hard_links" = no; then | ||
13932 | { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 | ||
13933 | echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} | ||
13934 | need_locks=warn | ||
13935 | fi | ||
13936 | else | ||
13937 | need_locks=no | ||
13938 | fi | ||
13939 | |||
13940 | echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 | ||
13941 | echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 | ||
13942 | |||
13943 | runpath_var= | ||
13944 | allow_undefined_flag_F77= | ||
13945 | enable_shared_with_static_runtimes_F77=no | ||
13946 | archive_cmds_F77= | ||
13947 | archive_expsym_cmds_F77= | ||
13948 | old_archive_From_new_cmds_F77= | ||
13949 | old_archive_from_expsyms_cmds_F77= | ||
13950 | export_dynamic_flag_spec_F77= | ||
13951 | whole_archive_flag_spec_F77= | ||
13952 | thread_safe_flag_spec_F77= | ||
13953 | hardcode_libdir_flag_spec_F77= | ||
13954 | hardcode_libdir_flag_spec_ld_F77= | ||
13955 | hardcode_libdir_separator_F77= | ||
13956 | hardcode_direct_F77=no | ||
13957 | hardcode_minus_L_F77=no | ||
13958 | hardcode_shlibpath_var_F77=unsupported | ||
13959 | link_all_deplibs_F77=unknown | ||
13960 | hardcode_automatic_F77=no | ||
13961 | module_cmds_F77= | ||
13962 | module_expsym_cmds_F77= | ||
13963 | always_export_symbols_F77=no | ||
13964 | export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
13965 | # include_expsyms should be a list of space-separated symbols to be *always* | ||
13966 | # included in the symbol list | ||
13967 | include_expsyms_F77= | ||
13968 | # exclude_expsyms can be an extended regexp of symbols to exclude | ||
13969 | # it will be wrapped by ` (' and `)$', so one must not match beginning or | ||
13970 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | ||
13971 | # as well as any symbol that contains `d'. | ||
13972 | exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" | ||
13973 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | ||
13974 | # platforms (ab)use it in PIC code, but their linkers get confused if | ||
13975 | # the symbol is explicitly referenced. Since portable code cannot | ||
13976 | # rely on this symbol name, it's probably fine to never include it in | ||
13977 | # preloaded symbol tables. | ||
13978 | extract_expsyms_cmds= | ||
13979 | |||
13980 | case $host_os in | ||
13981 | cygwin* | mingw* | pw32*) | ||
13982 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | ||
13983 | # When not using gcc, we currently assume that we are using | ||
13984 | # Microsoft Visual C++. | ||
13985 | if test "$GCC" != yes; then | ||
13986 | with_gnu_ld=no | ||
13987 | fi | ||
13988 | ;; | ||
13989 | openbsd*) | ||
13990 | with_gnu_ld=no | ||
13991 | ;; | ||
13992 | esac | ||
13993 | |||
13994 | ld_shlibs_F77=yes | ||
13995 | if test "$with_gnu_ld" = yes; then | ||
13996 | # If archive_cmds runs LD, not CC, wlarc should be empty | ||
13997 | wlarc='${wl}' | ||
13998 | |||
13999 | # See if GNU ld supports shared libraries. | ||
14000 | case $host_os in | ||
14001 | aix3* | aix4* | aix5*) | ||
14002 | # On AIX/PPC, the GNU linker is very broken | ||
14003 | if test "$host_cpu" != ia64; then | ||
14004 | ld_shlibs_F77=no | ||
14005 | cat <<EOF 1>&2 | ||
14006 | |||
14007 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported | ||
14008 | *** to be unable to reliably create shared libraries on AIX. | ||
14009 | *** Therefore, libtool is disabling shared libraries support. If you | ||
14010 | *** really care for shared libraries, you may want to modify your PATH | ||
14011 | *** so that a non-GNU linker is found, and then restart. | ||
14012 | |||
14013 | EOF | ||
14014 | fi | ||
14015 | ;; | ||
14016 | |||
14017 | amigaos*) | ||
14018 | archive_cmds_F77='$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)' | ||
14019 | hardcode_libdir_flag_spec_F77='-L$libdir' | ||
14020 | hardcode_minus_L_F77=yes | ||
14021 | |||
14022 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports | ||
14023 | # that the semantics of dynamic libraries on AmigaOS, at least up | ||
14024 | # to version 4, is to share data among multiple programs linked | ||
14025 | # with the same dynamic library. Since this doesn't match the | ||
14026 | # behavior of shared libraries on other platforms, we can't use | ||
14027 | # them. | ||
14028 | ld_shlibs_F77=no | ||
14029 | ;; | ||
14030 | |||
14031 | beos*) | ||
14032 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
14033 | allow_undefined_flag_F77=unsupported | ||
14034 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | ||
14035 | # support --undefined. This deserves some investigation. FIXME | ||
14036 | archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
14037 | else | ||
14038 | ld_shlibs_F77=no | ||
14039 | fi | ||
14040 | ;; | ||
14041 | |||
14042 | cygwin* | mingw* | pw32*) | ||
14043 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, | ||
14044 | # as there is no search path for DLLs. | ||
14045 | hardcode_libdir_flag_spec_F77='-L$libdir' | ||
14046 | allow_undefined_flag_F77=unsupported | ||
14047 | always_export_symbols_F77=no | ||
14048 | enable_shared_with_static_runtimes_F77=yes | ||
14049 | export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' | ||
14050 | |||
14051 | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then | ||
14052 | archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
14053 | # If the export-symbols file already is a .def file (1st line | ||
14054 | # is EXPORTS), use it as is; otherwise, prepend... | ||
14055 | archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
14056 | cp $export_symbols $output_objdir/$soname.def; | ||
14057 | else | ||
14058 | echo EXPORTS > $output_objdir/$soname.def; | ||
14059 | cat $export_symbols >> $output_objdir/$soname.def; | ||
14060 | fi~ | ||
14061 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
14062 | else | ||
14063 | ld_shlibs=no | ||
14064 | fi | ||
14065 | ;; | ||
14066 | |||
14067 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
14068 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
14069 | archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
14070 | wlarc= | ||
14071 | else | ||
14072 | archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
14073 | archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
14074 | fi | ||
14075 | ;; | ||
14076 | |||
14077 | solaris* | sysv5*) | ||
14078 | if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then | ||
14079 | ld_shlibs_F77=no | ||
14080 | cat <<EOF 1>&2 | ||
14081 | |||
14082 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably | ||
14083 | *** create shared libraries on Solaris systems. Therefore, libtool | ||
14084 | *** is disabling shared libraries support. We urge you to upgrade GNU | ||
14085 | *** binutils to release 2.9.1 or newer. Another option is to modify | ||
14086 | *** your PATH or compiler configuration so that the native linker is | ||
14087 | *** used, and then restart. | ||
14088 | |||
14089 | EOF | ||
14090 | elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
14091 | archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
14092 | archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
14093 | else | ||
14094 | ld_shlibs_F77=no | ||
14095 | fi | ||
14096 | ;; | ||
14097 | |||
14098 | sunos4*) | ||
14099 | archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
14100 | wlarc= | ||
14101 | hardcode_direct_F77=yes | ||
14102 | hardcode_shlibpath_var_F77=no | ||
14103 | ;; | ||
14104 | |||
14105 | linux*) | ||
14106 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
14107 | tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
14108 | archive_cmds_F77="$tmp_archive_cmds" | ||
14109 | supports_anon_versioning=no | ||
14110 | case `$LD -v 2>/dev/null` in | ||
14111 | *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 | ||
14112 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | ||
14113 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | ||
14114 | *\ 2.11.*) ;; # other 2.11 versions | ||
14115 | *) supports_anon_versioning=yes ;; | ||
14116 | esac | ||
14117 | if test $supports_anon_versioning = yes; then | ||
14118 | archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ | ||
14119 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
14120 | $echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
14121 | $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | ||
14122 | else | ||
14123 | archive_expsym_cmds_F77="$tmp_archive_cmds" | ||
14124 | fi | ||
14125 | link_all_deplibs_F77=no | ||
14126 | else | ||
14127 | ld_shlibs_F77=no | ||
14128 | fi | ||
14129 | ;; | ||
14130 | |||
14131 | *) | ||
14132 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
14133 | archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
14134 | archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
14135 | else | ||
14136 | ld_shlibs_F77=no | ||
14137 | fi | ||
14138 | ;; | ||
14139 | esac | ||
14140 | |||
14141 | if test "$ld_shlibs_F77" = yes; then | ||
14142 | runpath_var=LD_RUN_PATH | ||
14143 | hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' | ||
14144 | export_dynamic_flag_spec_F77='${wl}--export-dynamic' | ||
14145 | # ancient GNU ld didn't support --whole-archive et. al. | ||
14146 | if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then | ||
14147 | whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | ||
14148 | else | ||
14149 | whole_archive_flag_spec_F77= | ||
14150 | fi | ||
14151 | fi | ||
14152 | else | ||
14153 | # PORTME fill in a description of your system's linker (not GNU ld) | ||
14154 | case $host_os in | ||
14155 | aix3*) | ||
14156 | allow_undefined_flag_F77=unsupported | ||
14157 | always_export_symbols_F77=yes | ||
14158 | archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | ||
14159 | # Note: this linker hardcodes the directories in LIBPATH if there | ||
14160 | # are no directories specified by -L. | ||
14161 | hardcode_minus_L_F77=yes | ||
14162 | if test "$GCC" = yes && test -z "$link_static_flag"; then | ||
14163 | # Neither direct hardcoding nor static linking is supported with a | ||
14164 | # broken collect2. | ||
14165 | hardcode_direct_F77=unsupported | ||
14166 | fi | ||
14167 | ;; | ||
14168 | |||
14169 | aix4* | aix5*) | ||
14170 | if test "$host_cpu" = ia64; then | ||
14171 | # On IA64, the linker does run time linking by default, so we don't | ||
14172 | # have to do anything special. | ||
14173 | aix_use_runtimelinking=no | ||
14174 | exp_sym_flag='-Bexport' | ||
14175 | no_entry_flag="" | ||
14176 | else | ||
14177 | # If we're using GNU nm, then we don't want the "-C" option. | ||
14178 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | ||
14179 | if $NM -V 2>&1 | grep 'GNU' > /dev/null; then | ||
14180 | export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' | ||
14181 | else | ||
14182 | export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' | ||
14183 | fi | ||
14184 | aix_use_runtimelinking=no | ||
14185 | |||
14186 | # Test if we are trying to use run time linking or normal | ||
14187 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | ||
14188 | # need to do runtime linking. | ||
14189 | case $host_os in aix4.[23]|aix4.[23].*|aix5*) | ||
14190 | for ld_flag in $LDFLAGS; do | ||
14191 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | ||
14192 | aix_use_runtimelinking=yes | ||
14193 | break | ||
14194 | fi | ||
14195 | done | ||
14196 | esac | ||
14197 | |||
14198 | exp_sym_flag='-bexport' | ||
14199 | no_entry_flag='-bnoentry' | ||
14200 | fi | ||
14201 | |||
14202 | # When large executables or shared objects are built, AIX ld can | ||
14203 | # have problems creating the table of contents. If linking a library | ||
14204 | # or program results in "error TOC overflow" add -mminimal-toc to | ||
14205 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | ||
14206 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | ||
14207 | |||
14208 | archive_cmds_F77='' | ||
14209 | hardcode_direct_F77=yes | ||
14210 | hardcode_libdir_separator_F77=':' | ||
14211 | link_all_deplibs_F77=yes | ||
14212 | |||
14213 | if test "$GCC" = yes; then | ||
14214 | case $host_os in aix4.012|aix4.012.*) | ||
14215 | # We only want to do this on AIX 4.2 and lower, the check | ||
14216 | # below for broken collect2 doesn't work under 4.3+ | ||
14217 | collect2name=`${CC} -print-prog-name=collect2` | ||
14218 | if test -f "$collect2name" && \ | ||
14219 | strings "$collect2name" | grep resolve_lib_name >/dev/null | ||
14220 | then | ||
14221 | # We have reworked collect2 | ||
14222 | hardcode_direct_F77=yes | ||
14223 | else | ||
14224 | # We have old collect2 | ||
14225 | hardcode_direct_F77=unsupported | ||
14226 | # It fails to find uninstalled libraries when the uninstalled | ||
14227 | # path is not listed in the libpath. Setting hardcode_minus_L | ||
14228 | # to unsupported forces relinking | ||
14229 | hardcode_minus_L_F77=yes | ||
14230 | hardcode_libdir_flag_spec_F77='-L$libdir' | ||
14231 | hardcode_libdir_separator_F77= | ||
14232 | fi | ||
14233 | esac | ||
14234 | shared_flag='-shared' | ||
14235 | else | ||
14236 | # not using gcc | ||
14237 | if test "$host_cpu" = ia64; then | ||
14238 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | ||
14239 | # chokes on -Wl,-G. The following line is correct: | ||
14240 | shared_flag='-G' | ||
14241 | else | ||
14242 | if test "$aix_use_runtimelinking" = yes; then | ||
14243 | shared_flag='${wl}-G' | ||
14244 | else | ||
14245 | shared_flag='${wl}-bM:SRE' | ||
14246 | fi | ||
14247 | fi | ||
14248 | fi | ||
14249 | |||
14250 | # It seems that -bexpall does not export symbols beginning with | ||
14251 | # underscore (_), so it is better to generate a list of symbols to export. | ||
14252 | always_export_symbols_F77=yes | ||
14253 | if test "$aix_use_runtimelinking" = yes; then | ||
14254 | # Warning - without using the other runtime loading flags (-brtl), | ||
14255 | # -berok will link without error, but may produce a broken library. | ||
14256 | allow_undefined_flag_F77='-berok' | ||
14257 | # Determine the default libpath from the value encoded in an empty executable. | ||
14258 | cat >conftest.$ac_ext <<_ACEOF | ||
14259 | program main | ||
14260 | |||
14261 | end | ||
14262 | _ACEOF | ||
14263 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
14264 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
14265 | (eval $ac_link) 2>conftest.er1 | ||
14266 | ac_status=$? | ||
14267 | grep -v '^ *+' conftest.er1 >conftest.err | ||
14268 | rm -f conftest.er1 | ||
14269 | cat conftest.err >&5 | ||
14270 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
14271 | (exit $ac_status); } && | ||
14272 | { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' | ||
14273 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
14274 | (eval $ac_try) 2>&5 | ||
14275 | ac_status=$? | ||
14276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
14277 | (exit $ac_status); }; } && | ||
14278 | { ac_try='test -s conftest$ac_exeext' | ||
14279 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
14280 | (eval $ac_try) 2>&5 | ||
14281 | ac_status=$? | ||
14282 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
14283 | (exit $ac_status); }; }; then | ||
14284 | |||
14285 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
14286 | }'` | ||
14287 | # Check for a 64-bit object if we didn't find anything. | ||
14288 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
14289 | }'`; fi | ||
14290 | else | ||
14291 | echo "$as_me: failed program was:" >&5 | ||
14292 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
14293 | |||
14294 | fi | ||
14295 | rm -f conftest.err conftest.$ac_objext \ | ||
14296 | conftest$ac_exeext conftest.$ac_ext | ||
14297 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
14298 | |||
14299 | hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
14300 | archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" | ||
14301 | else | ||
14302 | if test "$host_cpu" = ia64; then | ||
14303 | hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' | ||
14304 | allow_undefined_flag_F77="-z nodefs" | ||
14305 | archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" | ||
14306 | else | ||
14307 | # Determine the default libpath from the value encoded in an empty executable. | ||
14308 | cat >conftest.$ac_ext <<_ACEOF | ||
14309 | program main | ||
14310 | |||
14311 | end | ||
14312 | _ACEOF | ||
14313 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
14314 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
14315 | (eval $ac_link) 2>conftest.er1 | ||
14316 | ac_status=$? | ||
14317 | grep -v '^ *+' conftest.er1 >conftest.err | ||
14318 | rm -f conftest.er1 | ||
14319 | cat conftest.err >&5 | ||
14320 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
14321 | (exit $ac_status); } && | ||
14322 | { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' | ||
14323 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
14324 | (eval $ac_try) 2>&5 | ||
14325 | ac_status=$? | ||
14326 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
14327 | (exit $ac_status); }; } && | ||
14328 | { ac_try='test -s conftest$ac_exeext' | ||
14329 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
14330 | (eval $ac_try) 2>&5 | ||
14331 | ac_status=$? | ||
14332 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
14333 | (exit $ac_status); }; }; then | ||
14334 | |||
14335 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
14336 | }'` | ||
14337 | # Check for a 64-bit object if we didn't find anything. | ||
14338 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
14339 | }'`; fi | ||
14340 | else | ||
14341 | echo "$as_me: failed program was:" >&5 | ||
14342 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
14343 | |||
14344 | fi | ||
14345 | rm -f conftest.err conftest.$ac_objext \ | ||
14346 | conftest$ac_exeext conftest.$ac_ext | ||
14347 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
14348 | |||
14349 | hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
14350 | # Warning - without using the other run time loading flags, | ||
14351 | # -berok will link without error, but may produce a broken library. | ||
14352 | no_undefined_flag_F77=' ${wl}-bernotok' | ||
14353 | allow_undefined_flag_F77=' ${wl}-berok' | ||
14354 | # -bexpall does not export symbols beginning with underscore (_) | ||
14355 | always_export_symbols_F77=yes | ||
14356 | # Exported symbols can be pulled into shared objects from archives | ||
14357 | whole_archive_flag_spec_F77=' ' | ||
14358 | archive_cmds_need_lc_F77=yes | ||
14359 | # This is similar to how AIX traditionally builds it's shared libraries. | ||
14360 | archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | ||
14361 | fi | ||
14362 | fi | ||
14363 | ;; | ||
14364 | |||
14365 | amigaos*) | ||
14366 | archive_cmds_F77='$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)' | ||
14367 | hardcode_libdir_flag_spec_F77='-L$libdir' | ||
14368 | hardcode_minus_L_F77=yes | ||
14369 | # see comment about different semantics on the GNU ld section | ||
14370 | ld_shlibs_F77=no | ||
14371 | ;; | ||
14372 | |||
14373 | bsdi4*) | ||
14374 | export_dynamic_flag_spec_F77=-rdynamic | ||
14375 | ;; | ||
14376 | |||
14377 | cygwin* | mingw* | pw32*) | ||
14378 | # When not using gcc, we currently assume that we are using | ||
14379 | # Microsoft Visual C++. | ||
14380 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
14381 | # no search path for DLLs. | ||
14382 | hardcode_libdir_flag_spec_F77=' ' | ||
14383 | allow_undefined_flag_F77=unsupported | ||
14384 | # Tell ltmain to make .lib files, not .a files. | ||
14385 | libext=lib | ||
14386 | # Tell ltmain to make .dll files, not .so files. | ||
14387 | shrext_cmds=".dll" | ||
14388 | # FIXME: Setting linknames here is a bad hack. | ||
14389 | archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
14390 | # The linker will automatically build a .lib file if we build a DLL. | ||
14391 | old_archive_From_new_cmds_F77='true' | ||
14392 | # FIXME: Should let the user specify the lib program. | ||
14393 | old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' | ||
14394 | fix_srcfile_path='`cygpath -w "$srcfile"`' | ||
14395 | enable_shared_with_static_runtimes_F77=yes | ||
14396 | ;; | ||
14397 | |||
14398 | darwin* | rhapsody*) | ||
14399 | if test "$GXX" = yes ; then | ||
14400 | archive_cmds_need_lc_F77=no | ||
14401 | case "$host_os" in | ||
14402 | rhapsody* | darwin1.[012]) | ||
14403 | allow_undefined_flag_F77='-undefined suppress' | ||
14404 | ;; | ||
14405 | *) # Darwin 1.3 on | ||
14406 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then | ||
14407 | allow_undefined_flag_F77='-flat_namespace -undefined suppress' | ||
14408 | else | ||
14409 | case ${MACOSX_DEPLOYMENT_TARGET} in | ||
14410 | 10.[012]) | ||
14411 | allow_undefined_flag_F77='-flat_namespace -undefined suppress' | ||
14412 | ;; | ||
14413 | 10.*) | ||
14414 | allow_undefined_flag_F77='-undefined dynamic_lookup' | ||
14415 | ;; | ||
14416 | esac | ||
14417 | fi | ||
14418 | ;; | ||
14419 | esac | ||
14420 | lt_int_apple_cc_single_mod=no | ||
14421 | output_verbose_link_cmd='echo' | ||
14422 | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then | ||
14423 | lt_int_apple_cc_single_mod=yes | ||
14424 | fi | ||
14425 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
14426 | archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' | ||
14427 | else | ||
14428 | archive_cmds_F77='$CC -r ${wl}-bind_at_load -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' | ||
14429 | fi | ||
14430 | module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' | ||
14431 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's | ||
14432 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
14433 | archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
14434 | else | ||
14435 | archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
14436 | fi | ||
14437 | module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
14438 | hardcode_direct_F77=no | ||
14439 | hardcode_automatic_F77=yes | ||
14440 | hardcode_shlibpath_var_F77=unsupported | ||
14441 | whole_archive_flag_spec_F77='-all_load $convenience' | ||
14442 | link_all_deplibs_F77=yes | ||
14443 | else | ||
14444 | ld_shlibs_F77=no | ||
14445 | fi | ||
14446 | ;; | ||
14447 | |||
14448 | dgux*) | ||
14449 | archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14450 | hardcode_libdir_flag_spec_F77='-L$libdir' | ||
14451 | hardcode_shlibpath_var_F77=no | ||
14452 | ;; | ||
14453 | |||
14454 | freebsd1*) | ||
14455 | ld_shlibs_F77=no | ||
14456 | ;; | ||
14457 | |||
14458 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | ||
14459 | # support. Future versions do this automatically, but an explicit c++rt0.o | ||
14460 | # does not break anything, and helps significantly (at the cost of a little | ||
14461 | # extra space). | ||
14462 | freebsd2.2*) | ||
14463 | archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | ||
14464 | hardcode_libdir_flag_spec_F77='-R$libdir' | ||
14465 | hardcode_direct_F77=yes | ||
14466 | hardcode_shlibpath_var_F77=no | ||
14467 | ;; | ||
14468 | |||
14469 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. | ||
14470 | freebsd2*) | ||
14471 | archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
14472 | hardcode_direct_F77=yes | ||
14473 | hardcode_minus_L_F77=yes | ||
14474 | hardcode_shlibpath_var_F77=no | ||
14475 | ;; | ||
14476 | |||
14477 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
14478 | freebsd* | kfreebsd*-gnu) | ||
14479 | archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | ||
14480 | hardcode_libdir_flag_spec_F77='-R$libdir' | ||
14481 | hardcode_direct_F77=yes | ||
14482 | hardcode_shlibpath_var_F77=no | ||
14483 | ;; | ||
14484 | |||
14485 | hpux9*) | ||
14486 | if test "$GCC" = yes; then | ||
14487 | archive_cmds_F77='$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' | ||
14488 | else | ||
14489 | archive_cmds_F77='$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' | ||
14490 | fi | ||
14491 | hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' | ||
14492 | hardcode_libdir_separator_F77=: | ||
14493 | hardcode_direct_F77=yes | ||
14494 | |||
14495 | # hardcode_minus_L: Not really in the search PATH, | ||
14496 | # but as the default location of the library. | ||
14497 | hardcode_minus_L_F77=yes | ||
14498 | export_dynamic_flag_spec_F77='${wl}-E' | ||
14499 | ;; | ||
14500 | |||
14501 | hpux10* | hpux11*) | ||
14502 | if test "$GCC" = yes -a "$with_gnu_ld" = no; then | ||
14503 | case "$host_cpu" in | ||
14504 | hppa*64*|ia64*) | ||
14505 | archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
14506 | ;; | ||
14507 | *) | ||
14508 | archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
14509 | ;; | ||
14510 | esac | ||
14511 | else | ||
14512 | case "$host_cpu" in | ||
14513 | hppa*64*|ia64*) | ||
14514 | archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14515 | ;; | ||
14516 | *) | ||
14517 | archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
14518 | ;; | ||
14519 | esac | ||
14520 | fi | ||
14521 | if test "$with_gnu_ld" = no; then | ||
14522 | case "$host_cpu" in | ||
14523 | hppa*64*) | ||
14524 | hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' | ||
14525 | hardcode_libdir_flag_spec_ld_F77='+b $libdir' | ||
14526 | hardcode_libdir_separator_F77=: | ||
14527 | hardcode_direct_F77=no | ||
14528 | hardcode_shlibpath_var_F77=no | ||
14529 | ;; | ||
14530 | ia64*) | ||
14531 | hardcode_libdir_flag_spec_F77='-L$libdir' | ||
14532 | hardcode_direct_F77=no | ||
14533 | hardcode_shlibpath_var_F77=no | ||
14534 | |||
14535 | # hardcode_minus_L: Not really in the search PATH, | ||
14536 | # but as the default location of the library. | ||
14537 | hardcode_minus_L_F77=yes | ||
14538 | ;; | ||
14539 | *) | ||
14540 | hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' | ||
14541 | hardcode_libdir_separator_F77=: | ||
14542 | hardcode_direct_F77=yes | ||
14543 | export_dynamic_flag_spec_F77='${wl}-E' | ||
14544 | |||
14545 | # hardcode_minus_L: Not really in the search PATH, | ||
14546 | # but as the default location of the library. | ||
14547 | hardcode_minus_L_F77=yes | ||
14548 | ;; | ||
14549 | esac | ||
14550 | fi | ||
14551 | ;; | ||
14552 | |||
14553 | irix5* | irix6* | nonstopux*) | ||
14554 | if test "$GCC" = yes; then | ||
14555 | archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
14556 | else | ||
14557 | archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
14558 | hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' | ||
14559 | fi | ||
14560 | hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' | ||
14561 | hardcode_libdir_separator_F77=: | ||
14562 | link_all_deplibs_F77=yes | ||
14563 | ;; | ||
14564 | |||
14565 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
14566 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
14567 | archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | ||
14568 | else | ||
14569 | archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | ||
14570 | fi | ||
14571 | hardcode_libdir_flag_spec_F77='-R$libdir' | ||
14572 | hardcode_direct_F77=yes | ||
14573 | hardcode_shlibpath_var_F77=no | ||
14574 | ;; | ||
14575 | |||
14576 | newsos6) | ||
14577 | archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14578 | hardcode_direct_F77=yes | ||
14579 | hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' | ||
14580 | hardcode_libdir_separator_F77=: | ||
14581 | hardcode_shlibpath_var_F77=no | ||
14582 | ;; | ||
14583 | |||
14584 | openbsd*) | ||
14585 | hardcode_direct_F77=yes | ||
14586 | hardcode_shlibpath_var_F77=no | ||
14587 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
14588 | archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
14589 | hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' | ||
14590 | export_dynamic_flag_spec_F77='${wl}-E' | ||
14591 | else | ||
14592 | case $host_os in | ||
14593 | openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) | ||
14594 | archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
14595 | hardcode_libdir_flag_spec_F77='-R$libdir' | ||
14596 | ;; | ||
14597 | *) | ||
14598 | archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
14599 | hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' | ||
14600 | ;; | ||
14601 | esac | ||
14602 | fi | ||
14603 | ;; | ||
14604 | |||
14605 | os2*) | ||
14606 | hardcode_libdir_flag_spec_F77='-L$libdir' | ||
14607 | hardcode_minus_L_F77=yes | ||
14608 | allow_undefined_flag_F77=unsupported | ||
14609 | archive_cmds_F77='$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' | ||
14610 | old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | ||
14611 | ;; | ||
14612 | |||
14613 | osf3*) | ||
14614 | if test "$GCC" = yes; then | ||
14615 | allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' | ||
14616 | archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
14617 | else | ||
14618 | allow_undefined_flag_F77=' -expect_unresolved \*' | ||
14619 | archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
14620 | fi | ||
14621 | hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' | ||
14622 | hardcode_libdir_separator_F77=: | ||
14623 | ;; | ||
14624 | |||
14625 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
14626 | if test "$GCC" = yes; then | ||
14627 | allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' | ||
14628 | archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
14629 | hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' | ||
14630 | else | ||
14631 | allow_undefined_flag_F77=' -expect_unresolved \*' | ||
14632 | archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
14633 | archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ | ||
14634 | $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' | ||
14635 | |||
14636 | # Both c and cxx compiler support -rpath directly | ||
14637 | hardcode_libdir_flag_spec_F77='-rpath $libdir' | ||
14638 | fi | ||
14639 | hardcode_libdir_separator_F77=: | ||
14640 | ;; | ||
14641 | |||
14642 | sco3.2v5*) | ||
14643 | archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14644 | hardcode_shlibpath_var_F77=no | ||
14645 | export_dynamic_flag_spec_F77='${wl}-Bexport' | ||
14646 | runpath_var=LD_RUN_PATH | ||
14647 | hardcode_runpath_var=yes | ||
14648 | ;; | ||
14649 | |||
14650 | solaris*) | ||
14651 | no_undefined_flag_F77=' -z text' | ||
14652 | if test "$GCC" = yes; then | ||
14653 | archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
14654 | archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
14655 | $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' | ||
14656 | else | ||
14657 | archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14658 | archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
14659 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | ||
14660 | fi | ||
14661 | hardcode_libdir_flag_spec_F77='-R$libdir' | ||
14662 | hardcode_shlibpath_var_F77=no | ||
14663 | case $host_os in | ||
14664 | solaris2.[0-5] | solaris2.[0-5].*) ;; | ||
14665 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) | ||
14666 | whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; | ||
14667 | esac | ||
14668 | link_all_deplibs_F77=yes | ||
14669 | ;; | ||
14670 | |||
14671 | sunos4*) | ||
14672 | if test "x$host_vendor" = xsequent; then | ||
14673 | # Use $CC to link under sequent, because it throws in some extra .o | ||
14674 | # files that make .init and .fini sections work. | ||
14675 | archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | ||
14676 | else | ||
14677 | archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | ||
14678 | fi | ||
14679 | hardcode_libdir_flag_spec_F77='-L$libdir' | ||
14680 | hardcode_direct_F77=yes | ||
14681 | hardcode_minus_L_F77=yes | ||
14682 | hardcode_shlibpath_var_F77=no | ||
14683 | ;; | ||
14684 | |||
14685 | sysv4) | ||
14686 | case $host_vendor in | ||
14687 | sni) | ||
14688 | archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14689 | hardcode_direct_F77=yes # is this really true??? | ||
14690 | ;; | ||
14691 | siemens) | ||
14692 | ## LD is ld it makes a PLAMLIB | ||
14693 | ## CC just makes a GrossModule. | ||
14694 | archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' | ||
14695 | reload_cmds_F77='$CC -r -o $output$reload_objs' | ||
14696 | hardcode_direct_F77=no | ||
14697 | ;; | ||
14698 | motorola) | ||
14699 | archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14700 | hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie | ||
14701 | ;; | ||
14702 | esac | ||
14703 | runpath_var='LD_RUN_PATH' | ||
14704 | hardcode_shlibpath_var_F77=no | ||
14705 | ;; | ||
14706 | |||
14707 | sysv4.3*) | ||
14708 | archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14709 | hardcode_shlibpath_var_F77=no | ||
14710 | export_dynamic_flag_spec_F77='-Bexport' | ||
14711 | ;; | ||
14712 | |||
14713 | sysv4*MP*) | ||
14714 | if test -d /usr/nec; then | ||
14715 | archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14716 | hardcode_shlibpath_var_F77=no | ||
14717 | runpath_var=LD_RUN_PATH | ||
14718 | hardcode_runpath_var=yes | ||
14719 | ld_shlibs_F77=yes | ||
14720 | fi | ||
14721 | ;; | ||
14722 | |||
14723 | sysv4.2uw2*) | ||
14724 | archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' | ||
14725 | hardcode_direct_F77=yes | ||
14726 | hardcode_minus_L_F77=no | ||
14727 | hardcode_shlibpath_var_F77=no | ||
14728 | hardcode_runpath_var=yes | ||
14729 | runpath_var=LD_RUN_PATH | ||
14730 | ;; | ||
14731 | |||
14732 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) | ||
14733 | no_undefined_flag_F77='${wl}-z ${wl}text' | ||
14734 | if test "$GCC" = yes; then | ||
14735 | archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
14736 | else | ||
14737 | archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
14738 | fi | ||
14739 | runpath_var='LD_RUN_PATH' | ||
14740 | hardcode_shlibpath_var_F77=no | ||
14741 | ;; | ||
14742 | |||
14743 | sysv5*) | ||
14744 | no_undefined_flag_F77=' -z text' | ||
14745 | # $CC -shared without GNU ld will not create a library from C++ | ||
14746 | # object files and a static libstdc++, better avoid it by now | ||
14747 | archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14748 | archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
14749 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | ||
14750 | hardcode_libdir_flag_spec_F77= | ||
14751 | hardcode_shlibpath_var_F77=no | ||
14752 | runpath_var='LD_RUN_PATH' | ||
14753 | ;; | ||
14754 | |||
14755 | uts4*) | ||
14756 | archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
14757 | hardcode_libdir_flag_spec_F77='-L$libdir' | ||
14758 | hardcode_shlibpath_var_F77=no | ||
14759 | ;; | ||
14760 | |||
14761 | *) | ||
14762 | ld_shlibs_F77=no | ||
14763 | ;; | ||
14764 | esac | ||
14765 | fi | ||
14766 | |||
14767 | echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 | ||
14768 | echo "${ECHO_T}$ld_shlibs_F77" >&6 | ||
14769 | test "$ld_shlibs_F77" = no && can_build_shared=no | ||
14770 | |||
14771 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | ||
14772 | if test "$GCC" = yes; then | ||
14773 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | ||
14774 | fi | ||
14775 | |||
14776 | # | ||
14777 | # Do we need to explicitly link libc? | ||
14778 | # | ||
14779 | case "x$archive_cmds_need_lc_F77" in | ||
14780 | x|xyes) | ||
14781 | # Assume -lc should be added | ||
14782 | archive_cmds_need_lc_F77=yes | ||
14783 | |||
14784 | if test "$enable_shared" = yes && test "$GCC" = yes; then | ||
14785 | case $archive_cmds_F77 in | ||
14786 | *'~'*) | ||
14787 | # FIXME: we may have to deal with multi-command sequences. | ||
14788 | ;; | ||
14789 | '$CC '*) | ||
14790 | # Test whether the compiler implicitly links with -lc since on some | ||
14791 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | ||
14792 | # to ld, don't add -lc before -lgcc. | ||
14793 | echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 | ||
14794 | echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 | ||
14795 | $rm conftest* | ||
14796 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
14797 | |||
14798 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
14799 | (eval $ac_compile) 2>&5 | ||
14800 | ac_status=$? | ||
14801 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
14802 | (exit $ac_status); } 2>conftest.err; then | ||
14803 | soname=conftest | ||
14804 | lib=conftest | ||
14805 | libobjs=conftest.$ac_objext | ||
14806 | deplibs= | ||
14807 | wl=$lt_prog_compiler_wl_F77 | ||
14808 | compiler_flags=-v | ||
14809 | linker_flags=-v | ||
14810 | verstring= | ||
14811 | output_objdir=. | ||
14812 | libname=conftest | ||
14813 | lt_save_allow_undefined_flag=$allow_undefined_flag_F77 | ||
14814 | allow_undefined_flag_F77= | ||
14815 | if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 | ||
14816 | (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 | ||
14817 | ac_status=$? | ||
14818 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
14819 | (exit $ac_status); } | ||
14820 | then | ||
14821 | archive_cmds_need_lc_F77=no | ||
14822 | else | ||
14823 | archive_cmds_need_lc_F77=yes | ||
14824 | fi | ||
14825 | allow_undefined_flag_F77=$lt_save_allow_undefined_flag | ||
14826 | else | ||
14827 | cat conftest.err 1>&5 | ||
14828 | fi | ||
14829 | $rm conftest* | ||
14830 | echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 | ||
14831 | echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 | ||
14832 | ;; | ||
14833 | esac | ||
14834 | fi | ||
14835 | ;; | ||
14836 | esac | ||
14837 | |||
14838 | echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 | ||
14839 | echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 | ||
14840 | library_names_spec= | ||
14841 | libname_spec='lib$name' | ||
14842 | soname_spec= | ||
14843 | shrext_cmds=".so" | ||
14844 | postinstall_cmds= | ||
14845 | postuninstall_cmds= | ||
14846 | finish_cmds= | ||
14847 | finish_eval= | ||
14848 | shlibpath_var= | ||
14849 | shlibpath_overrides_runpath=unknown | ||
14850 | version_type=none | ||
14851 | dynamic_linker="$host_os ld.so" | ||
14852 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | ||
14853 | if test "$GCC" = yes; then | ||
14854 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | ||
14855 | if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then | ||
14856 | # if the path contains ";" then we assume it to be the separator | ||
14857 | # otherwise default to the standard path separator (i.e. ":") - it is | ||
14858 | # assumed that no part of a normal pathname contains ";" but that should | ||
14859 | # okay in the real world where ";" in dirpaths is itself problematic. | ||
14860 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
14861 | else | ||
14862 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
14863 | fi | ||
14864 | else | ||
14865 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | ||
14866 | fi | ||
14867 | need_lib_prefix=unknown | ||
14868 | hardcode_into_libs=no | ||
14869 | |||
14870 | # when you set need_version to no, make sure it does not cause -set_version | ||
14871 | # flags to be left without arguments | ||
14872 | need_version=unknown | ||
14873 | |||
14874 | case $host_os in | ||
14875 | aix3*) | ||
14876 | version_type=linux | ||
14877 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | ||
14878 | shlibpath_var=LIBPATH | ||
14879 | |||
14880 | # AIX 3 has no versioning support, so we append a major version to the name. | ||
14881 | soname_spec='${libname}${release}${shared_ext}$major' | ||
14882 | ;; | ||
14883 | |||
14884 | aix4* | aix5*) | ||
14885 | version_type=linux | ||
14886 | need_lib_prefix=no | ||
14887 | need_version=no | ||
14888 | hardcode_into_libs=yes | ||
14889 | if test "$host_cpu" = ia64; then | ||
14890 | # AIX 5 supports IA64 | ||
14891 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | ||
14892 | shlibpath_var=LD_LIBRARY_PATH | ||
14893 | else | ||
14894 | # With GCC up to 2.95.x, collect2 would create an import file | ||
14895 | # for dependence libraries. The import file would start with | ||
14896 | # the line `#! .'. This would cause the generated library to | ||
14897 | # depend on `.', always an invalid library. This was fixed in | ||
14898 | # development snapshots of GCC prior to 3.0. | ||
14899 | case $host_os in | ||
14900 | aix4 | aix4.[01] | aix4.[01].*) | ||
14901 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | ||
14902 | echo ' yes ' | ||
14903 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | ||
14904 | : | ||
14905 | else | ||
14906 | can_build_shared=no | ||
14907 | fi | ||
14908 | ;; | ||
14909 | esac | ||
14910 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | ||
14911 | # soname into executable. Probably we can add versioning support to | ||
14912 | # collect2, so additional links can be useful in future. | ||
14913 | if test "$aix_use_runtimelinking" = yes; then | ||
14914 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | ||
14915 | # instead of lib<name>.a to let people know that these are not | ||
14916 | # typical AIX shared libraries. | ||
14917 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
14918 | else | ||
14919 | # We preserve .a as extension for shared libraries through AIX4.2 | ||
14920 | # and later when we are not doing run time linking. | ||
14921 | library_names_spec='${libname}${release}.a $libname.a' | ||
14922 | soname_spec='${libname}${release}${shared_ext}$major' | ||
14923 | fi | ||
14924 | shlibpath_var=LIBPATH | ||
14925 | fi | ||
14926 | ;; | ||
14927 | |||
14928 | amigaos*) | ||
14929 | library_names_spec='$libname.ixlibrary $libname.a' | ||
14930 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | ||
14931 | 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' | ||
14932 | ;; | ||
14933 | |||
14934 | beos*) | ||
14935 | library_names_spec='${libname}${shared_ext}' | ||
14936 | dynamic_linker="$host_os ld.so" | ||
14937 | shlibpath_var=LIBRARY_PATH | ||
14938 | ;; | ||
14939 | |||
14940 | bsdi4*) | ||
14941 | version_type=linux | ||
14942 | need_version=no | ||
14943 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
14944 | soname_spec='${libname}${release}${shared_ext}$major' | ||
14945 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | ||
14946 | shlibpath_var=LD_LIBRARY_PATH | ||
14947 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | ||
14948 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | ||
14949 | # the default ld.so.conf also contains /usr/contrib/lib and | ||
14950 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | ||
14951 | # libtool to hard-code these into programs | ||
14952 | ;; | ||
14953 | |||
14954 | cygwin* | mingw* | pw32*) | ||
14955 | version_type=windows | ||
14956 | shrext_cmds=".dll" | ||
14957 | need_version=no | ||
14958 | need_lib_prefix=no | ||
14959 | |||
14960 | case $GCC,$host_os in | ||
14961 | yes,cygwin* | yes,mingw* | yes,pw32*) | ||
14962 | library_names_spec='$libname.dll.a' | ||
14963 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
14964 | postinstall_cmds='base_file=`basename \${file}`~ | ||
14965 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ | ||
14966 | dldir=$destdir/`dirname \$dlpath`~ | ||
14967 | test -d \$dldir || mkdir -p \$dldir~ | ||
14968 | $install_prog $dir/$dlname \$dldir/$dlname' | ||
14969 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
14970 | dlpath=$dir/\$dldll~ | ||
14971 | $rm \$dlpath' | ||
14972 | shlibpath_overrides_runpath=yes | ||
14973 | |||
14974 | case $host_os in | ||
14975 | cygwin*) | ||
14976 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | ||
14977 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
14978 | sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" | ||
14979 | ;; | ||
14980 | mingw*) | ||
14981 | # MinGW DLLs use traditional 'lib' prefix | ||
14982 | soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
14983 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | ||
14984 | if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then | ||
14985 | # It is most probably a Windows format PATH printed by | ||
14986 | # mingw gcc, but we are running on Cygwin. Gcc prints its search | ||
14987 | # path with ; separators, and with drive letters. We can handle the | ||
14988 | # drive letters (cygwin fileutils understands them), so leave them, | ||
14989 | # especially as we might pass files found there to a mingw objdump, | ||
14990 | # which wouldn't understand a cygwinified path. Ahh. | ||
14991 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
14992 | else | ||
14993 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
14994 | fi | ||
14995 | ;; | ||
14996 | pw32*) | ||
14997 | # pw32 DLLs use 'pw' prefix rather than 'lib' | ||
14998 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' | ||
14999 | ;; | ||
15000 | esac | ||
15001 | ;; | ||
15002 | |||
15003 | *) | ||
15004 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
15005 | ;; | ||
15006 | esac | ||
15007 | dynamic_linker='Win32 ld.exe' | ||
15008 | # FIXME: first we should search . and the directory the executable is in | ||
15009 | shlibpath_var=PATH | ||
15010 | ;; | ||
15011 | |||
15012 | darwin* | rhapsody*) | ||
15013 | dynamic_linker="$host_os dyld" | ||
15014 | version_type=darwin | ||
15015 | need_lib_prefix=no | ||
15016 | need_version=no | ||
15017 | library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' | ||
15018 | soname_spec='${libname}${release}${major}$shared_ext' | ||
15019 | shlibpath_overrides_runpath=yes | ||
15020 | shlibpath_var=DYLD_LIBRARY_PATH | ||
15021 | shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' | ||
15022 | # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. | ||
15023 | if test "$GCC" = yes; then | ||
15024 | sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` | ||
15025 | else | ||
15026 | sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' | ||
15027 | fi | ||
15028 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | ||
15029 | ;; | ||
15030 | |||
15031 | dgux*) | ||
15032 | version_type=linux | ||
15033 | need_lib_prefix=no | ||
15034 | need_version=no | ||
15035 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | ||
15036 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15037 | shlibpath_var=LD_LIBRARY_PATH | ||
15038 | ;; | ||
15039 | |||
15040 | freebsd1*) | ||
15041 | dynamic_linker=no | ||
15042 | ;; | ||
15043 | |||
15044 | kfreebsd*-gnu) | ||
15045 | version_type=linux | ||
15046 | need_lib_prefix=no | ||
15047 | need_version=no | ||
15048 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
15049 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15050 | shlibpath_var=LD_LIBRARY_PATH | ||
15051 | shlibpath_overrides_runpath=no | ||
15052 | hardcode_into_libs=yes | ||
15053 | dynamic_linker='GNU ld.so' | ||
15054 | ;; | ||
15055 | |||
15056 | freebsd*) | ||
15057 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` | ||
15058 | version_type=freebsd-$objformat | ||
15059 | case $version_type in | ||
15060 | freebsd-elf*) | ||
15061 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
15062 | need_version=no | ||
15063 | need_lib_prefix=no | ||
15064 | ;; | ||
15065 | freebsd-*) | ||
15066 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | ||
15067 | need_version=yes | ||
15068 | ;; | ||
15069 | esac | ||
15070 | shlibpath_var=LD_LIBRARY_PATH | ||
15071 | case $host_os in | ||
15072 | freebsd2*) | ||
15073 | shlibpath_overrides_runpath=yes | ||
15074 | ;; | ||
15075 | freebsd3.01* | freebsdelf3.01*) | ||
15076 | shlibpath_overrides_runpath=yes | ||
15077 | hardcode_into_libs=yes | ||
15078 | ;; | ||
15079 | *) # from 3.2 on | ||
15080 | shlibpath_overrides_runpath=no | ||
15081 | hardcode_into_libs=yes | ||
15082 | ;; | ||
15083 | esac | ||
15084 | ;; | ||
15085 | |||
15086 | gnu*) | ||
15087 | version_type=linux | ||
15088 | need_lib_prefix=no | ||
15089 | need_version=no | ||
15090 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | ||
15091 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15092 | shlibpath_var=LD_LIBRARY_PATH | ||
15093 | hardcode_into_libs=yes | ||
15094 | ;; | ||
15095 | |||
15096 | hpux9* | hpux10* | hpux11*) | ||
15097 | # Give a soname corresponding to the major version so that dld.sl refuses to | ||
15098 | # link against other versions. | ||
15099 | version_type=sunos | ||
15100 | need_lib_prefix=no | ||
15101 | need_version=no | ||
15102 | case "$host_cpu" in | ||
15103 | ia64*) | ||
15104 | shrext_cmds='.so' | ||
15105 | hardcode_into_libs=yes | ||
15106 | dynamic_linker="$host_os dld.so" | ||
15107 | shlibpath_var=LD_LIBRARY_PATH | ||
15108 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
15109 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15110 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15111 | if test "X$HPUX_IA64_MODE" = X32; then | ||
15112 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | ||
15113 | else | ||
15114 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | ||
15115 | fi | ||
15116 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
15117 | ;; | ||
15118 | hppa*64*) | ||
15119 | shrext_cmds='.sl' | ||
15120 | hardcode_into_libs=yes | ||
15121 | dynamic_linker="$host_os dld.sl" | ||
15122 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | ||
15123 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
15124 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15125 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15126 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | ||
15127 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
15128 | ;; | ||
15129 | *) | ||
15130 | shrext_cmds='.sl' | ||
15131 | dynamic_linker="$host_os dld.sl" | ||
15132 | shlibpath_var=SHLIB_PATH | ||
15133 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | ||
15134 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15135 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15136 | ;; | ||
15137 | esac | ||
15138 | # HP-UX runs *really* slowly unless shared libraries are mode 555. | ||
15139 | postinstall_cmds='chmod 555 $lib' | ||
15140 | ;; | ||
15141 | |||
15142 | irix5* | irix6* | nonstopux*) | ||
15143 | case $host_os in | ||
15144 | nonstopux*) version_type=nonstopux ;; | ||
15145 | *) | ||
15146 | if test "$lt_cv_prog_gnu_ld" = yes; then | ||
15147 | version_type=linux | ||
15148 | else | ||
15149 | version_type=irix | ||
15150 | fi ;; | ||
15151 | esac | ||
15152 | need_lib_prefix=no | ||
15153 | need_version=no | ||
15154 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15155 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
15156 | case $host_os in | ||
15157 | irix5* | nonstopux*) | ||
15158 | libsuff= shlibsuff= | ||
15159 | ;; | ||
15160 | *) | ||
15161 | case $LD in # libtool.m4 will add one of these switches to LD | ||
15162 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | ||
15163 | libsuff= shlibsuff= libmagic=32-bit;; | ||
15164 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | ||
15165 | libsuff=32 shlibsuff=N32 libmagic=N32;; | ||
15166 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | ||
15167 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | ||
15168 | *) libsuff= shlibsuff= libmagic=never-match;; | ||
15169 | esac | ||
15170 | ;; | ||
15171 | esac | ||
15172 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | ||
15173 | shlibpath_overrides_runpath=no | ||
15174 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | ||
15175 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | ||
15176 | hardcode_into_libs=yes | ||
15177 | ;; | ||
15178 | |||
15179 | # No shared lib support for Linux oldld, aout, or coff. | ||
15180 | linux*oldld* | linux*aout* | linux*coff*) | ||
15181 | dynamic_linker=no | ||
15182 | ;; | ||
15183 | |||
15184 | # This must be Linux ELF. | ||
15185 | linux*) | ||
15186 | version_type=linux | ||
15187 | need_lib_prefix=no | ||
15188 | need_version=no | ||
15189 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15190 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15191 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | ||
15192 | shlibpath_var=LD_LIBRARY_PATH | ||
15193 | shlibpath_overrides_runpath=no | ||
15194 | # This implies no fast_install, which is unacceptable. | ||
15195 | # Some rework will be needed to allow for fast_install | ||
15196 | # before this can be enabled. | ||
15197 | hardcode_into_libs=yes | ||
15198 | |||
15199 | # Append ld.so.conf contents to the search path | ||
15200 | if test -f /etc/ld.so.conf; then | ||
15201 | lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` | ||
15202 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" | ||
15203 | fi | ||
15204 | |||
15205 | # We used to test for /lib/ld.so.1 and disable shared libraries on | ||
15206 | # powerpc, because MkLinux only supported shared libraries with the | ||
15207 | # GNU dynamic linker. Since this was broken with cross compilers, | ||
15208 | # most powerpc-linux boxes support dynamic linking these days and | ||
15209 | # people can always --disable-shared, the test was removed, and we | ||
15210 | # assume the GNU/Linux dynamic linker is in use. | ||
15211 | dynamic_linker='GNU/Linux ld.so' | ||
15212 | ;; | ||
15213 | |||
15214 | netbsdelf*-gnu) | ||
15215 | version_type=linux | ||
15216 | need_lib_prefix=no | ||
15217 | need_version=no | ||
15218 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
15219 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15220 | shlibpath_var=LD_LIBRARY_PATH | ||
15221 | shlibpath_overrides_runpath=no | ||
15222 | hardcode_into_libs=yes | ||
15223 | dynamic_linker='NetBSD ld.elf_so' | ||
15224 | ;; | ||
15225 | |||
15226 | knetbsd*-gnu) | ||
15227 | version_type=linux | ||
15228 | need_lib_prefix=no | ||
15229 | need_version=no | ||
15230 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
15231 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15232 | shlibpath_var=LD_LIBRARY_PATH | ||
15233 | shlibpath_overrides_runpath=no | ||
15234 | hardcode_into_libs=yes | ||
15235 | dynamic_linker='GNU ld.so' | ||
15236 | ;; | ||
15237 | |||
15238 | netbsd*) | ||
15239 | version_type=sunos | ||
15240 | need_lib_prefix=no | ||
15241 | need_version=no | ||
15242 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
15243 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
15244 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
15245 | dynamic_linker='NetBSD (a.out) ld.so' | ||
15246 | else | ||
15247 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
15248 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15249 | dynamic_linker='NetBSD ld.elf_so' | ||
15250 | fi | ||
15251 | shlibpath_var=LD_LIBRARY_PATH | ||
15252 | shlibpath_overrides_runpath=yes | ||
15253 | hardcode_into_libs=yes | ||
15254 | ;; | ||
15255 | |||
15256 | newsos6) | ||
15257 | version_type=linux | ||
15258 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15259 | shlibpath_var=LD_LIBRARY_PATH | ||
15260 | shlibpath_overrides_runpath=yes | ||
15261 | ;; | ||
15262 | |||
15263 | nto-qnx*) | ||
15264 | version_type=linux | ||
15265 | need_lib_prefix=no | ||
15266 | need_version=no | ||
15267 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15268 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15269 | shlibpath_var=LD_LIBRARY_PATH | ||
15270 | shlibpath_overrides_runpath=yes | ||
15271 | ;; | ||
15272 | |||
15273 | openbsd*) | ||
15274 | version_type=sunos | ||
15275 | need_lib_prefix=no | ||
15276 | need_version=yes | ||
15277 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
15278 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
15279 | shlibpath_var=LD_LIBRARY_PATH | ||
15280 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
15281 | case $host_os in | ||
15282 | openbsd2.[89] | openbsd2.[89].*) | ||
15283 | shlibpath_overrides_runpath=no | ||
15284 | ;; | ||
15285 | *) | ||
15286 | shlibpath_overrides_runpath=yes | ||
15287 | ;; | ||
15288 | esac | ||
15289 | else | ||
15290 | shlibpath_overrides_runpath=yes | ||
15291 | fi | ||
15292 | ;; | ||
15293 | |||
15294 | os2*) | ||
15295 | libname_spec='$name' | ||
15296 | shrext_cmds=".dll" | ||
15297 | need_lib_prefix=no | ||
15298 | library_names_spec='$libname${shared_ext} $libname.a' | ||
15299 | dynamic_linker='OS/2 ld.exe' | ||
15300 | shlibpath_var=LIBPATH | ||
15301 | ;; | ||
15302 | |||
15303 | osf3* | osf4* | osf5*) | ||
15304 | version_type=osf | ||
15305 | need_lib_prefix=no | ||
15306 | need_version=no | ||
15307 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15308 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15309 | shlibpath_var=LD_LIBRARY_PATH | ||
15310 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | ||
15311 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | ||
15312 | ;; | ||
15313 | |||
15314 | sco3.2v5*) | ||
15315 | version_type=osf | ||
15316 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15317 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15318 | shlibpath_var=LD_LIBRARY_PATH | ||
15319 | ;; | ||
15320 | |||
15321 | solaris*) | ||
15322 | version_type=linux | ||
15323 | need_lib_prefix=no | ||
15324 | need_version=no | ||
15325 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15326 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15327 | shlibpath_var=LD_LIBRARY_PATH | ||
15328 | shlibpath_overrides_runpath=yes | ||
15329 | hardcode_into_libs=yes | ||
15330 | # ldd complains unless libraries are executable | ||
15331 | postinstall_cmds='chmod +x $lib' | ||
15332 | ;; | ||
15333 | |||
15334 | sunos4*) | ||
15335 | version_type=sunos | ||
15336 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
15337 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | ||
15338 | shlibpath_var=LD_LIBRARY_PATH | ||
15339 | shlibpath_overrides_runpath=yes | ||
15340 | if test "$with_gnu_ld" = yes; then | ||
15341 | need_lib_prefix=no | ||
15342 | fi | ||
15343 | need_version=yes | ||
15344 | ;; | ||
15345 | |||
15346 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
15347 | version_type=linux | ||
15348 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15349 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15350 | shlibpath_var=LD_LIBRARY_PATH | ||
15351 | case $host_vendor in | ||
15352 | sni) | ||
15353 | shlibpath_overrides_runpath=no | ||
15354 | need_lib_prefix=no | ||
15355 | export_dynamic_flag_spec='${wl}-Blargedynsym' | ||
15356 | runpath_var=LD_RUN_PATH | ||
15357 | ;; | ||
15358 | siemens) | ||
15359 | need_lib_prefix=no | ||
15360 | ;; | ||
15361 | motorola) | ||
15362 | need_lib_prefix=no | ||
15363 | need_version=no | ||
15364 | shlibpath_overrides_runpath=no | ||
15365 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | ||
15366 | ;; | ||
15367 | esac | ||
15368 | ;; | ||
15369 | |||
15370 | sysv4*MP*) | ||
15371 | if test -d /usr/nec ;then | ||
15372 | version_type=linux | ||
15373 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | ||
15374 | soname_spec='$libname${shared_ext}.$major' | ||
15375 | shlibpath_var=LD_LIBRARY_PATH | ||
15376 | fi | ||
15377 | ;; | ||
15378 | |||
15379 | uts4*) | ||
15380 | version_type=linux | ||
15381 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
15382 | soname_spec='${libname}${release}${shared_ext}$major' | ||
15383 | shlibpath_var=LD_LIBRARY_PATH | ||
15384 | ;; | ||
15385 | |||
15386 | *) | ||
15387 | dynamic_linker=no | ||
15388 | ;; | ||
15389 | esac | ||
15390 | echo "$as_me:$LINENO: result: $dynamic_linker" >&5 | ||
15391 | echo "${ECHO_T}$dynamic_linker" >&6 | ||
15392 | test "$dynamic_linker" = no && can_build_shared=no | ||
15393 | |||
15394 | echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 | ||
15395 | echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 | ||
15396 | hardcode_action_F77= | ||
15397 | if test -n "$hardcode_libdir_flag_spec_F77" || \ | ||
15398 | test -n "$runpath_var F77" || \ | ||
15399 | test "X$hardcode_automatic_F77"="Xyes" ; then | ||
15400 | |||
15401 | # We can hardcode non-existant directories. | ||
15402 | if test "$hardcode_direct_F77" != no && | ||
15403 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | ||
15404 | # have to relink, otherwise we might link with an installed library | ||
15405 | # when we should be linking with a yet-to-be-installed one | ||
15406 | ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && | ||
15407 | test "$hardcode_minus_L_F77" != no; then | ||
15408 | # Linking always hardcodes the temporary library directory. | ||
15409 | hardcode_action_F77=relink | ||
15410 | else | ||
15411 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | ||
15412 | hardcode_action_F77=immediate | ||
15413 | fi | ||
15414 | else | ||
15415 | # We cannot hardcode anything, or else we can only hardcode existing | ||
15416 | # directories. | ||
15417 | hardcode_action_F77=unsupported | ||
15418 | fi | ||
15419 | echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 | ||
15420 | echo "${ECHO_T}$hardcode_action_F77" >&6 | ||
15421 | |||
15422 | if test "$hardcode_action_F77" = relink; then | ||
15423 | # Fast installation is not supported | ||
15424 | enable_fast_install=no | ||
15425 | elif test "$shlibpath_overrides_runpath" = yes || | ||
15426 | test "$enable_shared" = no; then | ||
15427 | # Fast installation is not necessary | ||
15428 | enable_fast_install=needless | ||
15429 | fi | ||
15430 | |||
15431 | striplib= | ||
15432 | old_striplib= | ||
15433 | echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 | ||
15434 | echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 | ||
15435 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then | ||
15436 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | ||
15437 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | ||
15438 | echo "$as_me:$LINENO: result: yes" >&5 | ||
15439 | echo "${ECHO_T}yes" >&6 | ||
15440 | else | ||
15441 | # FIXME - insert some real tests, host_os isn't really good enough | ||
15442 | case $host_os in | ||
15443 | darwin*) | ||
15444 | if test -n "$STRIP" ; then | ||
15445 | striplib="$STRIP -x" | ||
15446 | echo "$as_me:$LINENO: result: yes" >&5 | ||
15447 | echo "${ECHO_T}yes" >&6 | ||
15448 | else | ||
15449 | echo "$as_me:$LINENO: result: no" >&5 | ||
15450 | echo "${ECHO_T}no" >&6 | ||
15451 | fi | ||
15452 | ;; | ||
15453 | *) | ||
15454 | echo "$as_me:$LINENO: result: no" >&5 | ||
15455 | echo "${ECHO_T}no" >&6 | ||
15456 | ;; | ||
15457 | esac | ||
15458 | fi | ||
15459 | |||
15460 | |||
15461 | |||
15462 | # The else clause should only fire when bootstrapping the | ||
15463 | # libtool distribution, otherwise you forgot to ship ltmain.sh | ||
15464 | # with your package, and you will get complaints that there are | ||
15465 | # no rules to generate ltmain.sh. | ||
15466 | if test -f "$ltmain"; then | ||
15467 | # See if we are running on zsh, and set the options which allow our commands through | ||
15468 | # without removal of \ escapes. | ||
15469 | if test -n "${ZSH_VERSION+set}" ; then | ||
15470 | setopt NO_GLOB_SUBST | ||
15471 | fi | ||
15472 | # Now quote all the things that may contain metacharacters while being | ||
15473 | # careful not to overquote the AC_SUBSTed values. We take copies of the | ||
15474 | # variables and quote the copies for generation of the libtool script. | ||
15475 | for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ | ||
15476 | SED SHELL STRIP \ | ||
15477 | libname_spec library_names_spec soname_spec extract_expsyms_cmds \ | ||
15478 | old_striplib striplib file_magic_cmd finish_cmds finish_eval \ | ||
15479 | deplibs_check_method reload_flag reload_cmds need_locks \ | ||
15480 | lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ | ||
15481 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
15482 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | ||
15483 | old_postinstall_cmds old_postuninstall_cmds \ | ||
15484 | compiler_F77 \ | ||
15485 | CC_F77 \ | ||
15486 | LD_F77 \ | ||
15487 | lt_prog_compiler_wl_F77 \ | ||
15488 | lt_prog_compiler_pic_F77 \ | ||
15489 | lt_prog_compiler_static_F77 \ | ||
15490 | lt_prog_compiler_no_builtin_flag_F77 \ | ||
15491 | export_dynamic_flag_spec_F77 \ | ||
15492 | thread_safe_flag_spec_F77 \ | ||
15493 | whole_archive_flag_spec_F77 \ | ||
15494 | enable_shared_with_static_runtimes_F77 \ | ||
15495 | old_archive_cmds_F77 \ | ||
15496 | old_archive_from_new_cmds_F77 \ | ||
15497 | predep_objects_F77 \ | ||
15498 | postdep_objects_F77 \ | ||
15499 | predeps_F77 \ | ||
15500 | postdeps_F77 \ | ||
15501 | compiler_lib_search_path_F77 \ | ||
15502 | archive_cmds_F77 \ | ||
15503 | archive_expsym_cmds_F77 \ | ||
15504 | postinstall_cmds_F77 \ | ||
15505 | postuninstall_cmds_F77 \ | ||
15506 | old_archive_from_expsyms_cmds_F77 \ | ||
15507 | allow_undefined_flag_F77 \ | ||
15508 | no_undefined_flag_F77 \ | ||
15509 | export_symbols_cmds_F77 \ | ||
15510 | hardcode_libdir_flag_spec_F77 \ | ||
15511 | hardcode_libdir_flag_spec_ld_F77 \ | ||
15512 | hardcode_libdir_separator_F77 \ | ||
15513 | hardcode_automatic_F77 \ | ||
15514 | module_cmds_F77 \ | ||
15515 | module_expsym_cmds_F77 \ | ||
15516 | lt_cv_prog_compiler_c_o_F77 \ | ||
15517 | exclude_expsyms_F77 \ | ||
15518 | include_expsyms_F77; do | ||
15519 | |||
15520 | case $var in | ||
15521 | old_archive_cmds_F77 | \ | ||
15522 | old_archive_from_new_cmds_F77 | \ | ||
15523 | archive_cmds_F77 | \ | ||
15524 | archive_expsym_cmds_F77 | \ | ||
15525 | module_cmds_F77 | \ | ||
15526 | module_expsym_cmds_F77 | \ | ||
15527 | old_archive_from_expsyms_cmds_F77 | \ | ||
15528 | export_symbols_cmds_F77 | \ | ||
15529 | extract_expsyms_cmds | reload_cmds | finish_cmds | \ | ||
15530 | postinstall_cmds | postuninstall_cmds | \ | ||
15531 | old_postinstall_cmds | old_postuninstall_cmds | \ | ||
15532 | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | ||
15533 | # Double-quote double-evaled strings. | ||
15534 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" | ||
15535 | ;; | ||
15536 | *) | ||
15537 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" | ||
15538 | ;; | ||
15539 | esac | ||
15540 | done | ||
15541 | |||
15542 | case $lt_echo in | ||
15543 | *'\$0 --fallback-echo"') | ||
15544 | lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` | ||
15545 | ;; | ||
15546 | esac | ||
15547 | |||
15548 | cfgfile="$ofile" | ||
15549 | |||
15550 | cat <<__EOF__ >> "$cfgfile" | ||
15551 | # ### BEGIN LIBTOOL TAG CONFIG: $tagname | ||
15552 | |||
15553 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | ||
15554 | |||
15555 | # Shell to use when invoking shell scripts. | ||
15556 | SHELL=$lt_SHELL | ||
15557 | |||
15558 | # Whether or not to build shared libraries. | ||
15559 | build_libtool_libs=$enable_shared | ||
15560 | |||
15561 | # Whether or not to build static libraries. | ||
15562 | build_old_libs=$enable_static | ||
15563 | |||
15564 | # Whether or not to add -lc for building shared libraries. | ||
15565 | build_libtool_need_lc=$archive_cmds_need_lc_F77 | ||
15566 | |||
15567 | # Whether or not to disallow shared libs when runtime libs are static | ||
15568 | allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 | ||
15569 | |||
15570 | # Whether or not to optimize for fast installation. | ||
15571 | fast_install=$enable_fast_install | ||
15572 | |||
15573 | # The host system. | ||
15574 | host_alias=$host_alias | ||
15575 | host=$host | ||
15576 | |||
15577 | # An echo program that does not interpret backslashes. | ||
15578 | echo=$lt_echo | ||
15579 | |||
15580 | # The archiver. | ||
15581 | AR=$lt_AR | ||
15582 | AR_FLAGS=$lt_AR_FLAGS | ||
15583 | |||
15584 | # A C compiler. | ||
15585 | LTCC=$lt_LTCC | ||
15586 | |||
15587 | # A language-specific compiler. | ||
15588 | CC=$lt_compiler_F77 | ||
15589 | |||
15590 | # Is the compiler the GNU C compiler? | ||
15591 | with_gcc=$GCC_F77 | ||
15592 | |||
15593 | # An ERE matcher. | ||
15594 | EGREP=$lt_EGREP | ||
15595 | |||
15596 | # The linker used to build libraries. | ||
15597 | LD=$lt_LD_F77 | ||
15598 | |||
15599 | # Whether we need hard or soft links. | ||
15600 | LN_S=$lt_LN_S | ||
15601 | |||
15602 | # A BSD-compatible nm program. | ||
15603 | NM=$lt_NM | ||
15604 | |||
15605 | # A symbol stripping program | ||
15606 | STRIP=$lt_STRIP | ||
15607 | |||
15608 | # Used to examine libraries when file_magic_cmd begins "file" | ||
15609 | MAGIC_CMD=$MAGIC_CMD | ||
15610 | |||
15611 | # Used on cygwin: DLL creation program. | ||
15612 | DLLTOOL="$DLLTOOL" | ||
15613 | |||
15614 | # Used on cygwin: object dumper. | ||
15615 | OBJDUMP="$OBJDUMP" | ||
15616 | |||
15617 | # Used on cygwin: assembler. | ||
15618 | AS="$AS" | ||
15619 | |||
15620 | # The name of the directory that contains temporary libtool files. | ||
15621 | objdir=$objdir | ||
15622 | |||
15623 | # How to create reloadable object files. | ||
15624 | reload_flag=$lt_reload_flag | ||
15625 | reload_cmds=$lt_reload_cmds | ||
15626 | |||
15627 | # How to pass a linker flag through the compiler. | ||
15628 | wl=$lt_lt_prog_compiler_wl_F77 | ||
15629 | |||
15630 | # Object file suffix (normally "o"). | ||
15631 | objext="$ac_objext" | ||
15632 | |||
15633 | # Old archive suffix (normally "a"). | ||
15634 | libext="$libext" | ||
15635 | |||
15636 | # Shared library suffix (normally ".so"). | ||
15637 | shrext_cmds='$shrext_cmds' | ||
15638 | |||
15639 | # Executable file suffix (normally ""). | ||
15640 | exeext="$exeext" | ||
15641 | |||
15642 | # Additional compiler flags for building library objects. | ||
15643 | pic_flag=$lt_lt_prog_compiler_pic_F77 | ||
15644 | pic_mode=$pic_mode | ||
15645 | |||
15646 | # What is the maximum length of a command? | ||
15647 | max_cmd_len=$lt_cv_sys_max_cmd_len | ||
15648 | |||
15649 | # Does compiler simultaneously support -c and -o options? | ||
15650 | compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 | ||
15651 | |||
15652 | # Must we lock files when doing compilation ? | ||
15653 | need_locks=$lt_need_locks | ||
15654 | |||
15655 | # Do we need the lib prefix for modules? | ||
15656 | need_lib_prefix=$need_lib_prefix | ||
15657 | |||
15658 | # Do we need a version for libraries? | ||
15659 | need_version=$need_version | ||
15660 | |||
15661 | # Whether dlopen is supported. | ||
15662 | dlopen_support=$enable_dlopen | ||
15663 | |||
15664 | # Whether dlopen of programs is supported. | ||
15665 | dlopen_self=$enable_dlopen_self | ||
15666 | |||
15667 | # Whether dlopen of statically linked programs is supported. | ||
15668 | dlopen_self_static=$enable_dlopen_self_static | ||
15669 | |||
15670 | # Compiler flag to prevent dynamic linking. | ||
15671 | link_static_flag=$lt_lt_prog_compiler_static_F77 | ||
15672 | |||
15673 | # Compiler flag to turn off builtin functions. | ||
15674 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 | ||
15675 | |||
15676 | # Compiler flag to allow reflexive dlopens. | ||
15677 | export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 | ||
15678 | |||
15679 | # Compiler flag to generate shared objects directly from archives. | ||
15680 | whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 | ||
15681 | |||
15682 | # Compiler flag to generate thread-safe objects. | ||
15683 | thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 | ||
15684 | |||
15685 | # Library versioning type. | ||
15686 | version_type=$version_type | ||
15687 | |||
15688 | # Format of library name prefix. | ||
15689 | libname_spec=$lt_libname_spec | ||
15690 | |||
15691 | # List of archive names. First name is the real one, the rest are links. | ||
15692 | # The last name is the one that the linker finds with -lNAME. | ||
15693 | library_names_spec=$lt_library_names_spec | ||
15694 | |||
15695 | # The coded name of the library, if different from the real name. | ||
15696 | soname_spec=$lt_soname_spec | ||
15697 | |||
15698 | # Commands used to build and install an old-style archive. | ||
15699 | RANLIB=$lt_RANLIB | ||
15700 | old_archive_cmds=$lt_old_archive_cmds_F77 | ||
15701 | old_postinstall_cmds=$lt_old_postinstall_cmds | ||
15702 | old_postuninstall_cmds=$lt_old_postuninstall_cmds | ||
15703 | |||
15704 | # Create an old-style archive from a shared archive. | ||
15705 | old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 | ||
15706 | |||
15707 | # Create a temporary old-style archive to link instead of a shared archive. | ||
15708 | old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 | ||
15709 | |||
15710 | # Commands used to build and install a shared archive. | ||
15711 | archive_cmds=$lt_archive_cmds_F77 | ||
15712 | archive_expsym_cmds=$lt_archive_expsym_cmds_F77 | ||
15713 | postinstall_cmds=$lt_postinstall_cmds | ||
15714 | postuninstall_cmds=$lt_postuninstall_cmds | ||
15715 | |||
15716 | # Commands used to build a loadable module (assumed same as above if empty) | ||
15717 | module_cmds=$lt_module_cmds_F77 | ||
15718 | module_expsym_cmds=$lt_module_expsym_cmds_F77 | ||
15719 | |||
15720 | # Commands to strip libraries. | ||
15721 | old_striplib=$lt_old_striplib | ||
15722 | striplib=$lt_striplib | ||
15723 | |||
15724 | # Dependencies to place before the objects being linked to create a | ||
15725 | # shared library. | ||
15726 | predep_objects=$lt_predep_objects_F77 | ||
15727 | |||
15728 | # Dependencies to place after the objects being linked to create a | ||
15729 | # shared library. | ||
15730 | postdep_objects=$lt_postdep_objects_F77 | ||
15731 | |||
15732 | # Dependencies to place before the objects being linked to create a | ||
15733 | # shared library. | ||
15734 | predeps=$lt_predeps_F77 | ||
15735 | |||
15736 | # Dependencies to place after the objects being linked to create a | ||
15737 | # shared library. | ||
15738 | postdeps=$lt_postdeps_F77 | ||
15739 | |||
15740 | # The library search path used internally by the compiler when linking | ||
15741 | # a shared library. | ||
15742 | compiler_lib_search_path=$lt_compiler_lib_search_path_F77 | ||
15743 | |||
15744 | # Method to check whether dependent libraries are shared objects. | ||
15745 | deplibs_check_method=$lt_deplibs_check_method | ||
15746 | |||
15747 | # Command to use when deplibs_check_method == file_magic. | ||
15748 | file_magic_cmd=$lt_file_magic_cmd | ||
15749 | |||
15750 | # Flag that allows shared libraries with undefined symbols to be built. | ||
15751 | allow_undefined_flag=$lt_allow_undefined_flag_F77 | ||
15752 | |||
15753 | # Flag that forces no undefined symbols. | ||
15754 | no_undefined_flag=$lt_no_undefined_flag_F77 | ||
15755 | |||
15756 | # Commands used to finish a libtool library installation in a directory. | ||
15757 | finish_cmds=$lt_finish_cmds | ||
15758 | |||
15759 | # Same as above, but a single script fragment to be evaled but not shown. | ||
15760 | finish_eval=$lt_finish_eval | ||
15761 | |||
15762 | # Take the output of nm and produce a listing of raw symbols and C names. | ||
15763 | global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe | ||
15764 | |||
15765 | # Transform the output of nm in a proper C declaration | ||
15766 | global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl | ||
15767 | |||
15768 | # Transform the output of nm in a C name address pair | ||
15769 | global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address | ||
15770 | |||
15771 | # This is the shared library runtime path variable. | ||
15772 | runpath_var=$runpath_var | ||
15773 | |||
15774 | # This is the shared library path variable. | ||
15775 | shlibpath_var=$shlibpath_var | ||
15776 | |||
15777 | # Is shlibpath searched before the hard-coded library search path? | ||
15778 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath | ||
15779 | |||
15780 | # How to hardcode a shared library path into an executable. | ||
15781 | hardcode_action=$hardcode_action_F77 | ||
15782 | |||
15783 | # Whether we should hardcode library paths into libraries. | ||
15784 | hardcode_into_libs=$hardcode_into_libs | ||
15785 | |||
15786 | # Flag to hardcode \$libdir into a binary during linking. | ||
15787 | # This must work even if \$libdir does not exist. | ||
15788 | hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 | ||
15789 | |||
15790 | # If ld is used when linking, flag to hardcode \$libdir into | ||
15791 | # a binary during linking. This must work even if \$libdir does | ||
15792 | # not exist. | ||
15793 | hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 | ||
15794 | |||
15795 | # Whether we need a single -rpath flag with a separated argument. | ||
15796 | hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 | ||
15797 | |||
15798 | # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the | ||
15799 | # resulting binary. | ||
15800 | hardcode_direct=$hardcode_direct_F77 | ||
15801 | |||
15802 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | ||
15803 | # resulting binary. | ||
15804 | hardcode_minus_L=$hardcode_minus_L_F77 | ||
15805 | |||
15806 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | ||
15807 | # the resulting binary. | ||
15808 | hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 | ||
15809 | |||
15810 | # Set to yes if building a shared library automatically hardcodes DIR into the library | ||
15811 | # and all subsequent libraries and executables linked against it. | ||
15812 | hardcode_automatic=$hardcode_automatic_F77 | ||
15813 | |||
15814 | # Variables whose values should be saved in libtool wrapper scripts and | ||
15815 | # restored at relink time. | ||
15816 | variables_saved_for_relink="$variables_saved_for_relink" | ||
15817 | |||
15818 | # Whether libtool must link a program against all its dependency libraries. | ||
15819 | link_all_deplibs=$link_all_deplibs_F77 | ||
15820 | |||
15821 | # Compile-time system search path for libraries | ||
15822 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec | ||
15823 | |||
15824 | # Run-time system search path for libraries | ||
15825 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec | ||
15826 | |||
15827 | # Fix the shell variable \$srcfile for the compiler. | ||
15828 | fix_srcfile_path="$fix_srcfile_path_F77" | ||
15829 | |||
15830 | # Set to yes if exported symbols are required. | ||
15831 | always_export_symbols=$always_export_symbols_F77 | ||
15832 | |||
15833 | # The commands to list exported symbols. | ||
15834 | export_symbols_cmds=$lt_export_symbols_cmds_F77 | ||
15835 | |||
15836 | # The commands to extract the exported symbol list from a shared archive. | ||
15837 | extract_expsyms_cmds=$lt_extract_expsyms_cmds | ||
15838 | |||
15839 | # Symbols that should not be listed in the preloaded symbols. | ||
15840 | exclude_expsyms=$lt_exclude_expsyms_F77 | ||
15841 | |||
15842 | # Symbols that must always be exported. | ||
15843 | include_expsyms=$lt_include_expsyms_F77 | ||
15844 | |||
15845 | # ### END LIBTOOL TAG CONFIG: $tagname | ||
15846 | |||
15847 | __EOF__ | ||
15848 | |||
15849 | |||
15850 | else | ||
15851 | # If there is no Makefile yet, we rely on a make rule to execute | ||
15852 | # `config.status --recheck' to rerun these tests and create the | ||
15853 | # libtool script then. | ||
15854 | ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` | ||
15855 | if test -f "$ltmain_in"; then | ||
15856 | test -f Makefile && make "$ltmain" | ||
15857 | fi | ||
15858 | fi | ||
15859 | |||
15860 | |||
15861 | ac_ext=c | ||
15862 | ac_cpp='$CPP $CPPFLAGS' | ||
15863 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
15864 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
15865 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
15866 | |||
15867 | CC="$lt_save_CC" | ||
15868 | |||
15869 | else | ||
15870 | tagname="" | ||
15871 | fi | ||
15872 | ;; | ||
15873 | |||
15874 | GCJ) | ||
15875 | if test -n "$GCJ" && test "X$GCJ" != "Xno"; then | ||
15876 | |||
15877 | |||
15878 | |||
15879 | # Source file extension for Java test sources. | ||
15880 | ac_ext=java | ||
15881 | |||
15882 | # Object file extension for compiled Java test sources. | ||
15883 | objext=o | ||
15884 | objext_GCJ=$objext | ||
15885 | |||
15886 | # Code to be used in simple compile tests | ||
15887 | lt_simple_compile_test_code="class foo {}\n" | ||
15888 | |||
15889 | # Code to be used in simple link tests | ||
15890 | lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' | ||
15891 | |||
15892 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
15893 | |||
15894 | # If no C compiler was specified, use CC. | ||
15895 | LTCC=${LTCC-"$CC"} | ||
15896 | |||
15897 | # Allow CC to be a program name with arguments. | ||
15898 | compiler=$CC | ||
15899 | |||
15900 | |||
15901 | # Allow CC to be a program name with arguments. | ||
15902 | lt_save_CC="$CC" | ||
15903 | CC=${GCJ-"gcj"} | ||
15904 | compiler=$CC | ||
15905 | compiler_GCJ=$CC | ||
15906 | |||
15907 | # GCJ did not exist at the time GCC didn't implicitly link libc in. | ||
15908 | archive_cmds_need_lc_GCJ=no | ||
15909 | |||
15910 | |||
15911 | lt_prog_compiler_no_builtin_flag_GCJ= | ||
15912 | |||
15913 | if test "$GCC" = yes; then | ||
15914 | lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' | ||
15915 | |||
15916 | |||
15917 | echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 | ||
15918 | echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 | ||
15919 | if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then | ||
15920 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
15921 | else | ||
15922 | lt_cv_prog_compiler_rtti_exceptions=no | ||
15923 | ac_outfile=conftest.$ac_objext | ||
15924 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
15925 | lt_compiler_flag="-fno-rtti -fno-exceptions" | ||
15926 | # Insert the option either (1) after the last *FLAGS variable, or | ||
15927 | # (2) before a word containing "conftest.", or (3) at the end. | ||
15928 | # Note that $ac_compile itself does not contain backslashes and begins | ||
15929 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
15930 | # The option is referenced via a variable to avoid confusing sed. | ||
15931 | lt_compile=`echo "$ac_compile" | $SED \ | ||
15932 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
15933 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||
15934 | -e 's:$: $lt_compiler_flag:'` | ||
15935 | (eval echo "\"\$as_me:15935: $lt_compile\"" >&5) | ||
15936 | (eval "$lt_compile" 2>conftest.err) | ||
15937 | ac_status=$? | ||
15938 | cat conftest.err >&5 | ||
15939 | echo "$as_me:15939: \$? = $ac_status" >&5 | ||
15940 | if (exit $ac_status) && test -s "$ac_outfile"; then | ||
15941 | # The compiler can only warn and ignore the option if not recognized | ||
15942 | # So say no if there are warnings | ||
15943 | if test ! -s conftest.err; then | ||
15944 | lt_cv_prog_compiler_rtti_exceptions=yes | ||
15945 | fi | ||
15946 | fi | ||
15947 | $rm conftest* | ||
15948 | |||
15949 | fi | ||
15950 | echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 | ||
15951 | echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 | ||
15952 | |||
15953 | if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then | ||
15954 | lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" | ||
15955 | else | ||
15956 | : | ||
15957 | fi | ||
15958 | |||
15959 | fi | ||
15960 | |||
15961 | lt_prog_compiler_wl_GCJ= | ||
15962 | lt_prog_compiler_pic_GCJ= | ||
15963 | lt_prog_compiler_static_GCJ= | ||
15964 | |||
15965 | echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 | ||
15966 | echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 | ||
15967 | |||
15968 | if test "$GCC" = yes; then | ||
15969 | lt_prog_compiler_wl_GCJ='-Wl,' | ||
15970 | lt_prog_compiler_static_GCJ='-static' | ||
15971 | |||
15972 | case $host_os in | ||
15973 | aix*) | ||
15974 | # All AIX code is PIC. | ||
15975 | if test "$host_cpu" = ia64; then | ||
15976 | # AIX 5 now supports IA64 processor | ||
15977 | lt_prog_compiler_static_GCJ='-Bstatic' | ||
15978 | fi | ||
15979 | ;; | ||
15980 | |||
15981 | amigaos*) | ||
15982 | # FIXME: we need at least 68020 code to build shared libraries, but | ||
15983 | # adding the `-m68020' flag to GCC prevents building anything better, | ||
15984 | # like `-m68040'. | ||
15985 | lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' | ||
15986 | ;; | ||
15987 | |||
15988 | beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) | ||
15989 | # PIC is the default for these OSes. | ||
15990 | ;; | ||
15991 | |||
15992 | mingw* | pw32* | os2*) | ||
15993 | # This hack is so that the source file can tell whether it is being | ||
15994 | # built for inclusion in a dll (and should export symbols for example). | ||
15995 | lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' | ||
15996 | ;; | ||
15997 | |||
15998 | darwin* | rhapsody*) | ||
15999 | # PIC is the default on this platform | ||
16000 | # Common symbols not allowed in MH_DYLIB files | ||
16001 | lt_prog_compiler_pic_GCJ='-fno-common' | ||
16002 | ;; | ||
16003 | |||
16004 | msdosdjgpp*) | ||
16005 | # Just because we use GCC doesn't mean we suddenly get shared libraries | ||
16006 | # on systems that don't support them. | ||
16007 | lt_prog_compiler_can_build_shared_GCJ=no | ||
16008 | enable_shared=no | ||
16009 | ;; | ||
16010 | |||
16011 | sysv4*MP*) | ||
16012 | if test -d /usr/nec; then | ||
16013 | lt_prog_compiler_pic_GCJ=-Kconform_pic | ||
16014 | fi | ||
16015 | ;; | ||
16016 | |||
16017 | hpux*) | ||
16018 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
16019 | # not for PA HP-UX. | ||
16020 | case "$host_cpu" in | ||
16021 | hppa*64*|ia64*) | ||
16022 | # +Z the default | ||
16023 | ;; | ||
16024 | *) | ||
16025 | lt_prog_compiler_pic_GCJ='-fPIC' | ||
16026 | ;; | ||
16027 | esac | ||
16028 | ;; | ||
16029 | |||
16030 | *) | ||
16031 | lt_prog_compiler_pic_GCJ='-fPIC' | ||
16032 | ;; | ||
16033 | esac | ||
16034 | else | ||
16035 | # PORTME Check for flag to pass linker flags through the system compiler. | ||
16036 | case $host_os in | ||
16037 | aix*) | ||
16038 | lt_prog_compiler_wl_GCJ='-Wl,' | ||
16039 | if test "$host_cpu" = ia64; then | ||
16040 | # AIX 5 now supports IA64 processor | ||
16041 | lt_prog_compiler_static_GCJ='-Bstatic' | ||
16042 | else | ||
16043 | lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' | ||
16044 | fi | ||
16045 | ;; | ||
16046 | |||
16047 | mingw* | pw32* | os2*) | ||
16048 | # This hack is so that the source file can tell whether it is being | ||
16049 | # built for inclusion in a dll (and should export symbols for example). | ||
16050 | lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' | ||
16051 | ;; | ||
16052 | |||
16053 | hpux9* | hpux10* | hpux11*) | ||
16054 | lt_prog_compiler_wl_GCJ='-Wl,' | ||
16055 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but | ||
16056 | # not for PA HP-UX. | ||
16057 | case "$host_cpu" in | ||
16058 | hppa*64*|ia64*) | ||
16059 | # +Z the default | ||
16060 | ;; | ||
16061 | *) | ||
16062 | lt_prog_compiler_pic_GCJ='+Z' | ||
16063 | ;; | ||
16064 | esac | ||
16065 | # Is there a better lt_prog_compiler_static that works with the bundled CC? | ||
16066 | lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' | ||
16067 | ;; | ||
16068 | |||
16069 | irix5* | irix6* | nonstopux*) | ||
16070 | lt_prog_compiler_wl_GCJ='-Wl,' | ||
16071 | # PIC (with -KPIC) is the default. | ||
16072 | lt_prog_compiler_static_GCJ='-non_shared' | ||
16073 | ;; | ||
16074 | |||
16075 | newsos6) | ||
16076 | lt_prog_compiler_pic_GCJ='-KPIC' | ||
16077 | lt_prog_compiler_static_GCJ='-Bstatic' | ||
16078 | ;; | ||
16079 | |||
16080 | linux*) | ||
16081 | case $CC in | ||
16082 | icc* | ecc*) | ||
16083 | lt_prog_compiler_wl_GCJ='-Wl,' | ||
16084 | lt_prog_compiler_pic_GCJ='-KPIC' | ||
16085 | lt_prog_compiler_static_GCJ='-static' | ||
16086 | ;; | ||
16087 | ccc*) | ||
16088 | lt_prog_compiler_wl_GCJ='-Wl,' | ||
16089 | # All Alpha code is PIC. | ||
16090 | lt_prog_compiler_static_GCJ='-non_shared' | ||
16091 | ;; | ||
16092 | esac | ||
16093 | ;; | ||
16094 | |||
16095 | osf3* | osf4* | osf5*) | ||
16096 | lt_prog_compiler_wl_GCJ='-Wl,' | ||
16097 | # All OSF/1 code is PIC. | ||
16098 | lt_prog_compiler_static_GCJ='-non_shared' | ||
16099 | ;; | ||
16100 | |||
16101 | sco3.2v5*) | ||
16102 | lt_prog_compiler_pic_GCJ='-Kpic' | ||
16103 | lt_prog_compiler_static_GCJ='-dn' | ||
16104 | ;; | ||
16105 | |||
16106 | solaris*) | ||
16107 | lt_prog_compiler_wl_GCJ='-Wl,' | ||
16108 | lt_prog_compiler_pic_GCJ='-KPIC' | ||
16109 | lt_prog_compiler_static_GCJ='-Bstatic' | ||
16110 | ;; | ||
16111 | |||
16112 | sunos4*) | ||
16113 | lt_prog_compiler_wl_GCJ='-Qoption ld ' | ||
16114 | lt_prog_compiler_pic_GCJ='-PIC' | ||
16115 | lt_prog_compiler_static_GCJ='-Bstatic' | ||
16116 | ;; | ||
16117 | |||
16118 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
16119 | lt_prog_compiler_wl_GCJ='-Wl,' | ||
16120 | lt_prog_compiler_pic_GCJ='-KPIC' | ||
16121 | lt_prog_compiler_static_GCJ='-Bstatic' | ||
16122 | ;; | ||
16123 | |||
16124 | sysv4*MP*) | ||
16125 | if test -d /usr/nec ;then | ||
16126 | lt_prog_compiler_pic_GCJ='-Kconform_pic' | ||
16127 | lt_prog_compiler_static_GCJ='-Bstatic' | ||
16128 | fi | ||
16129 | ;; | ||
16130 | |||
16131 | uts4*) | ||
16132 | lt_prog_compiler_pic_GCJ='-pic' | ||
16133 | lt_prog_compiler_static_GCJ='-Bstatic' | ||
16134 | ;; | ||
16135 | |||
16136 | *) | ||
16137 | lt_prog_compiler_can_build_shared_GCJ=no | ||
16138 | ;; | ||
16139 | esac | ||
16140 | fi | ||
16141 | |||
16142 | echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 | ||
16143 | echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 | ||
16144 | |||
16145 | # | ||
16146 | # Check to make sure the PIC flag actually works. | ||
16147 | # | ||
16148 | if test -n "$lt_prog_compiler_pic_GCJ"; then | ||
16149 | |||
16150 | echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 | ||
16151 | echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 | ||
16152 | if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then | ||
16153 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
16154 | else | ||
16155 | lt_prog_compiler_pic_works_GCJ=no | ||
16156 | ac_outfile=conftest.$ac_objext | ||
16157 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
16158 | lt_compiler_flag="$lt_prog_compiler_pic_GCJ" | ||
16159 | # Insert the option either (1) after the last *FLAGS variable, or | ||
16160 | # (2) before a word containing "conftest.", or (3) at the end. | ||
16161 | # Note that $ac_compile itself does not contain backslashes and begins | ||
16162 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
16163 | # The option is referenced via a variable to avoid confusing sed. | ||
16164 | lt_compile=`echo "$ac_compile" | $SED \ | ||
16165 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
16166 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||
16167 | -e 's:$: $lt_compiler_flag:'` | ||
16168 | (eval echo "\"\$as_me:16168: $lt_compile\"" >&5) | ||
16169 | (eval "$lt_compile" 2>conftest.err) | ||
16170 | ac_status=$? | ||
16171 | cat conftest.err >&5 | ||
16172 | echo "$as_me:16172: \$? = $ac_status" >&5 | ||
16173 | if (exit $ac_status) && test -s "$ac_outfile"; then | ||
16174 | # The compiler can only warn and ignore the option if not recognized | ||
16175 | # So say no if there are warnings | ||
16176 | if test ! -s conftest.err; then | ||
16177 | lt_prog_compiler_pic_works_GCJ=yes | ||
16178 | fi | ||
16179 | fi | ||
16180 | $rm conftest* | ||
16181 | |||
16182 | fi | ||
16183 | echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 | ||
16184 | echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 | ||
16185 | |||
16186 | if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then | ||
16187 | case $lt_prog_compiler_pic_GCJ in | ||
16188 | "" | " "*) ;; | ||
16189 | *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; | ||
16190 | esac | ||
16191 | else | ||
16192 | lt_prog_compiler_pic_GCJ= | ||
16193 | lt_prog_compiler_can_build_shared_GCJ=no | ||
16194 | fi | ||
16195 | |||
16196 | fi | ||
16197 | case "$host_os" in | ||
16198 | # For platforms which do not support PIC, -DPIC is meaningless: | ||
16199 | *djgpp*) | ||
16200 | lt_prog_compiler_pic_GCJ= | ||
16201 | ;; | ||
16202 | *) | ||
16203 | lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" | ||
16204 | ;; | ||
16205 | esac | ||
16206 | |||
16207 | echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 | ||
16208 | echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 | ||
16209 | if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then | ||
16210 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
16211 | else | ||
16212 | lt_cv_prog_compiler_c_o_GCJ=no | ||
16213 | $rm -r conftest 2>/dev/null | ||
16214 | mkdir conftest | ||
16215 | cd conftest | ||
16216 | mkdir out | ||
16217 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
16218 | |||
16219 | lt_compiler_flag="-o out/conftest2.$ac_objext" | ||
16220 | # Insert the option either (1) after the last *FLAGS variable, or | ||
16221 | # (2) before a word containing "conftest.", or (3) at the end. | ||
16222 | # Note that $ac_compile itself does not contain backslashes and begins | ||
16223 | # with a dollar sign (not a hyphen), so the echo should work correctly. | ||
16224 | lt_compile=`echo "$ac_compile" | $SED \ | ||
16225 | -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ | ||
16226 | -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||
16227 | -e 's:$: $lt_compiler_flag:'` | ||
16228 | (eval echo "\"\$as_me:16228: $lt_compile\"" >&5) | ||
16229 | (eval "$lt_compile" 2>out/conftest.err) | ||
16230 | ac_status=$? | ||
16231 | cat out/conftest.err >&5 | ||
16232 | echo "$as_me:16232: \$? = $ac_status" >&5 | ||
16233 | if (exit $ac_status) && test -s out/conftest2.$ac_objext | ||
16234 | then | ||
16235 | # The compiler can only warn and ignore the option if not recognized | ||
16236 | # So say no if there are warnings | ||
16237 | if test ! -s out/conftest.err; then | ||
16238 | lt_cv_prog_compiler_c_o_GCJ=yes | ||
16239 | fi | ||
16240 | fi | ||
16241 | chmod u+w . | ||
16242 | $rm conftest* | ||
16243 | # SGI C++ compiler will create directory out/ii_files/ for | ||
16244 | # template instantiation | ||
16245 | test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files | ||
16246 | $rm out/* && rmdir out | ||
16247 | cd .. | ||
16248 | rmdir conftest | ||
16249 | $rm conftest* | ||
16250 | |||
16251 | fi | ||
16252 | echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 | ||
16253 | echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 | ||
16254 | |||
16255 | |||
16256 | hard_links="nottested" | ||
16257 | if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then | ||
16258 | # do not overwrite the value of need_locks provided by the user | ||
16259 | echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 | ||
16260 | echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 | ||
16261 | hard_links=yes | ||
16262 | $rm conftest* | ||
16263 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
16264 | touch conftest.a | ||
16265 | ln conftest.a conftest.b 2>&5 || hard_links=no | ||
16266 | ln conftest.a conftest.b 2>/dev/null && hard_links=no | ||
16267 | echo "$as_me:$LINENO: result: $hard_links" >&5 | ||
16268 | echo "${ECHO_T}$hard_links" >&6 | ||
16269 | if test "$hard_links" = no; then | ||
16270 | { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 | ||
16271 | echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} | ||
16272 | need_locks=warn | ||
16273 | fi | ||
16274 | else | ||
16275 | need_locks=no | ||
16276 | fi | ||
16277 | |||
16278 | echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 | ||
16279 | echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 | ||
16280 | |||
16281 | runpath_var= | ||
16282 | allow_undefined_flag_GCJ= | ||
16283 | enable_shared_with_static_runtimes_GCJ=no | ||
16284 | archive_cmds_GCJ= | ||
16285 | archive_expsym_cmds_GCJ= | ||
16286 | old_archive_From_new_cmds_GCJ= | ||
16287 | old_archive_from_expsyms_cmds_GCJ= | ||
16288 | export_dynamic_flag_spec_GCJ= | ||
16289 | whole_archive_flag_spec_GCJ= | ||
16290 | thread_safe_flag_spec_GCJ= | ||
16291 | hardcode_libdir_flag_spec_GCJ= | ||
16292 | hardcode_libdir_flag_spec_ld_GCJ= | ||
16293 | hardcode_libdir_separator_GCJ= | ||
16294 | hardcode_direct_GCJ=no | ||
16295 | hardcode_minus_L_GCJ=no | ||
16296 | hardcode_shlibpath_var_GCJ=unsupported | ||
16297 | link_all_deplibs_GCJ=unknown | ||
16298 | hardcode_automatic_GCJ=no | ||
16299 | module_cmds_GCJ= | ||
16300 | module_expsym_cmds_GCJ= | ||
16301 | always_export_symbols_GCJ=no | ||
16302 | export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' | ||
16303 | # include_expsyms should be a list of space-separated symbols to be *always* | ||
16304 | # included in the symbol list | ||
16305 | include_expsyms_GCJ= | ||
16306 | # exclude_expsyms can be an extended regexp of symbols to exclude | ||
16307 | # it will be wrapped by ` (' and `)$', so one must not match beginning or | ||
16308 | # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | ||
16309 | # as well as any symbol that contains `d'. | ||
16310 | exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" | ||
16311 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | ||
16312 | # platforms (ab)use it in PIC code, but their linkers get confused if | ||
16313 | # the symbol is explicitly referenced. Since portable code cannot | ||
16314 | # rely on this symbol name, it's probably fine to never include it in | ||
16315 | # preloaded symbol tables. | ||
16316 | extract_expsyms_cmds= | ||
16317 | |||
16318 | case $host_os in | ||
16319 | cygwin* | mingw* | pw32*) | ||
16320 | # FIXME: the MSVC++ port hasn't been tested in a loooong time | ||
16321 | # When not using gcc, we currently assume that we are using | ||
16322 | # Microsoft Visual C++. | ||
16323 | if test "$GCC" != yes; then | ||
16324 | with_gnu_ld=no | ||
16325 | fi | ||
16326 | ;; | ||
16327 | openbsd*) | ||
16328 | with_gnu_ld=no | ||
16329 | ;; | ||
16330 | esac | ||
16331 | |||
16332 | ld_shlibs_GCJ=yes | ||
16333 | if test "$with_gnu_ld" = yes; then | ||
16334 | # If archive_cmds runs LD, not CC, wlarc should be empty | ||
16335 | wlarc='${wl}' | ||
16336 | |||
16337 | # See if GNU ld supports shared libraries. | ||
16338 | case $host_os in | ||
16339 | aix3* | aix4* | aix5*) | ||
16340 | # On AIX/PPC, the GNU linker is very broken | ||
16341 | if test "$host_cpu" != ia64; then | ||
16342 | ld_shlibs_GCJ=no | ||
16343 | cat <<EOF 1>&2 | ||
16344 | |||
16345 | *** Warning: the GNU linker, at least up to release 2.9.1, is reported | ||
16346 | *** to be unable to reliably create shared libraries on AIX. | ||
16347 | *** Therefore, libtool is disabling shared libraries support. If you | ||
16348 | *** really care for shared libraries, you may want to modify your PATH | ||
16349 | *** so that a non-GNU linker is found, and then restart. | ||
16350 | |||
16351 | EOF | ||
16352 | fi | ||
16353 | ;; | ||
16354 | |||
16355 | amigaos*) | ||
16356 | archive_cmds_GCJ='$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)' | ||
16357 | hardcode_libdir_flag_spec_GCJ='-L$libdir' | ||
16358 | hardcode_minus_L_GCJ=yes | ||
16359 | |||
16360 | # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports | ||
16361 | # that the semantics of dynamic libraries on AmigaOS, at least up | ||
16362 | # to version 4, is to share data among multiple programs linked | ||
16363 | # with the same dynamic library. Since this doesn't match the | ||
16364 | # behavior of shared libraries on other platforms, we can't use | ||
16365 | # them. | ||
16366 | ld_shlibs_GCJ=no | ||
16367 | ;; | ||
16368 | |||
16369 | beos*) | ||
16370 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
16371 | allow_undefined_flag_GCJ=unsupported | ||
16372 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | ||
16373 | # support --undefined. This deserves some investigation. FIXME | ||
16374 | archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
16375 | else | ||
16376 | ld_shlibs_GCJ=no | ||
16377 | fi | ||
16378 | ;; | ||
16379 | |||
16380 | cygwin* | mingw* | pw32*) | ||
16381 | # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, | ||
16382 | # as there is no search path for DLLs. | ||
16383 | hardcode_libdir_flag_spec_GCJ='-L$libdir' | ||
16384 | allow_undefined_flag_GCJ=unsupported | ||
16385 | always_export_symbols_GCJ=no | ||
16386 | enable_shared_with_static_runtimes_GCJ=yes | ||
16387 | export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' | ||
16388 | |||
16389 | if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then | ||
16390 | archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
16391 | # If the export-symbols file already is a .def file (1st line | ||
16392 | # is EXPORTS), use it as is; otherwise, prepend... | ||
16393 | archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then | ||
16394 | cp $export_symbols $output_objdir/$soname.def; | ||
16395 | else | ||
16396 | echo EXPORTS > $output_objdir/$soname.def; | ||
16397 | cat $export_symbols >> $output_objdir/$soname.def; | ||
16398 | fi~ | ||
16399 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' | ||
16400 | else | ||
16401 | ld_shlibs=no | ||
16402 | fi | ||
16403 | ;; | ||
16404 | |||
16405 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
16406 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
16407 | archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | ||
16408 | wlarc= | ||
16409 | else | ||
16410 | archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
16411 | archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
16412 | fi | ||
16413 | ;; | ||
16414 | |||
16415 | solaris* | sysv5*) | ||
16416 | if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then | ||
16417 | ld_shlibs_GCJ=no | ||
16418 | cat <<EOF 1>&2 | ||
16419 | |||
16420 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably | ||
16421 | *** create shared libraries on Solaris systems. Therefore, libtool | ||
16422 | *** is disabling shared libraries support. We urge you to upgrade GNU | ||
16423 | *** binutils to release 2.9.1 or newer. Another option is to modify | ||
16424 | *** your PATH or compiler configuration so that the native linker is | ||
16425 | *** used, and then restart. | ||
16426 | |||
16427 | EOF | ||
16428 | elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
16429 | archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
16430 | archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
16431 | else | ||
16432 | ld_shlibs_GCJ=no | ||
16433 | fi | ||
16434 | ;; | ||
16435 | |||
16436 | sunos4*) | ||
16437 | archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
16438 | wlarc= | ||
16439 | hardcode_direct_GCJ=yes | ||
16440 | hardcode_shlibpath_var_GCJ=no | ||
16441 | ;; | ||
16442 | |||
16443 | linux*) | ||
16444 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
16445 | tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
16446 | archive_cmds_GCJ="$tmp_archive_cmds" | ||
16447 | supports_anon_versioning=no | ||
16448 | case `$LD -v 2>/dev/null` in | ||
16449 | *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 | ||
16450 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... | ||
16451 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... | ||
16452 | *\ 2.11.*) ;; # other 2.11 versions | ||
16453 | *) supports_anon_versioning=yes ;; | ||
16454 | esac | ||
16455 | if test $supports_anon_versioning = yes; then | ||
16456 | archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ | ||
16457 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ | ||
16458 | $echo "local: *; };" >> $output_objdir/$libname.ver~ | ||
16459 | $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' | ||
16460 | else | ||
16461 | archive_expsym_cmds_GCJ="$tmp_archive_cmds" | ||
16462 | fi | ||
16463 | link_all_deplibs_GCJ=no | ||
16464 | else | ||
16465 | ld_shlibs_GCJ=no | ||
16466 | fi | ||
16467 | ;; | ||
16468 | |||
16469 | *) | ||
16470 | if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then | ||
16471 | archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | ||
16472 | archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | ||
16473 | else | ||
16474 | ld_shlibs_GCJ=no | ||
16475 | fi | ||
16476 | ;; | ||
16477 | esac | ||
16478 | |||
16479 | if test "$ld_shlibs_GCJ" = yes; then | ||
16480 | runpath_var=LD_RUN_PATH | ||
16481 | hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' | ||
16482 | export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' | ||
16483 | # ancient GNU ld didn't support --whole-archive et. al. | ||
16484 | if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then | ||
16485 | whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | ||
16486 | else | ||
16487 | whole_archive_flag_spec_GCJ= | ||
16488 | fi | ||
16489 | fi | ||
16490 | else | ||
16491 | # PORTME fill in a description of your system's linker (not GNU ld) | ||
16492 | case $host_os in | ||
16493 | aix3*) | ||
16494 | allow_undefined_flag_GCJ=unsupported | ||
16495 | always_export_symbols_GCJ=yes | ||
16496 | archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | ||
16497 | # Note: this linker hardcodes the directories in LIBPATH if there | ||
16498 | # are no directories specified by -L. | ||
16499 | hardcode_minus_L_GCJ=yes | ||
16500 | if test "$GCC" = yes && test -z "$link_static_flag"; then | ||
16501 | # Neither direct hardcoding nor static linking is supported with a | ||
16502 | # broken collect2. | ||
16503 | hardcode_direct_GCJ=unsupported | ||
16504 | fi | ||
16505 | ;; | ||
16506 | |||
16507 | aix4* | aix5*) | ||
16508 | if test "$host_cpu" = ia64; then | ||
16509 | # On IA64, the linker does run time linking by default, so we don't | ||
16510 | # have to do anything special. | ||
16511 | aix_use_runtimelinking=no | ||
16512 | exp_sym_flag='-Bexport' | ||
16513 | no_entry_flag="" | ||
16514 | else | ||
16515 | # If we're using GNU nm, then we don't want the "-C" option. | ||
16516 | # -C means demangle to AIX nm, but means don't demangle with GNU nm | ||
16517 | if $NM -V 2>&1 | grep 'GNU' > /dev/null; then | ||
16518 | export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' | ||
16519 | else | ||
16520 | export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' | ||
16521 | fi | ||
16522 | aix_use_runtimelinking=no | ||
16523 | |||
16524 | # Test if we are trying to use run time linking or normal | ||
16525 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we | ||
16526 | # need to do runtime linking. | ||
16527 | case $host_os in aix4.[23]|aix4.[23].*|aix5*) | ||
16528 | for ld_flag in $LDFLAGS; do | ||
16529 | if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | ||
16530 | aix_use_runtimelinking=yes | ||
16531 | break | ||
16532 | fi | ||
16533 | done | ||
16534 | esac | ||
16535 | |||
16536 | exp_sym_flag='-bexport' | ||
16537 | no_entry_flag='-bnoentry' | ||
16538 | fi | ||
16539 | |||
16540 | # When large executables or shared objects are built, AIX ld can | ||
16541 | # have problems creating the table of contents. If linking a library | ||
16542 | # or program results in "error TOC overflow" add -mminimal-toc to | ||
16543 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | ||
16544 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | ||
16545 | |||
16546 | archive_cmds_GCJ='' | ||
16547 | hardcode_direct_GCJ=yes | ||
16548 | hardcode_libdir_separator_GCJ=':' | ||
16549 | link_all_deplibs_GCJ=yes | ||
16550 | |||
16551 | if test "$GCC" = yes; then | ||
16552 | case $host_os in aix4.012|aix4.012.*) | ||
16553 | # We only want to do this on AIX 4.2 and lower, the check | ||
16554 | # below for broken collect2 doesn't work under 4.3+ | ||
16555 | collect2name=`${CC} -print-prog-name=collect2` | ||
16556 | if test -f "$collect2name" && \ | ||
16557 | strings "$collect2name" | grep resolve_lib_name >/dev/null | ||
16558 | then | ||
16559 | # We have reworked collect2 | ||
16560 | hardcode_direct_GCJ=yes | ||
16561 | else | ||
16562 | # We have old collect2 | ||
16563 | hardcode_direct_GCJ=unsupported | ||
16564 | # It fails to find uninstalled libraries when the uninstalled | ||
16565 | # path is not listed in the libpath. Setting hardcode_minus_L | ||
16566 | # to unsupported forces relinking | ||
16567 | hardcode_minus_L_GCJ=yes | ||
16568 | hardcode_libdir_flag_spec_GCJ='-L$libdir' | ||
16569 | hardcode_libdir_separator_GCJ= | ||
16570 | fi | ||
16571 | esac | ||
16572 | shared_flag='-shared' | ||
16573 | else | ||
16574 | # not using gcc | ||
16575 | if test "$host_cpu" = ia64; then | ||
16576 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release | ||
16577 | # chokes on -Wl,-G. The following line is correct: | ||
16578 | shared_flag='-G' | ||
16579 | else | ||
16580 | if test "$aix_use_runtimelinking" = yes; then | ||
16581 | shared_flag='${wl}-G' | ||
16582 | else | ||
16583 | shared_flag='${wl}-bM:SRE' | ||
16584 | fi | ||
16585 | fi | ||
16586 | fi | ||
16587 | |||
16588 | # It seems that -bexpall does not export symbols beginning with | ||
16589 | # underscore (_), so it is better to generate a list of symbols to export. | ||
16590 | always_export_symbols_GCJ=yes | ||
16591 | if test "$aix_use_runtimelinking" = yes; then | ||
16592 | # Warning - without using the other runtime loading flags (-brtl), | ||
16593 | # -berok will link without error, but may produce a broken library. | ||
16594 | allow_undefined_flag_GCJ='-berok' | ||
16595 | # Determine the default libpath from the value encoded in an empty executable. | ||
16596 | cat >conftest.$ac_ext <<_ACEOF | ||
16597 | /* confdefs.h. */ | ||
16598 | _ACEOF | ||
16599 | cat confdefs.h >>conftest.$ac_ext | ||
16600 | cat >>conftest.$ac_ext <<_ACEOF | ||
16601 | /* end confdefs.h. */ | ||
16602 | |||
16603 | int | ||
16604 | main () | ||
16605 | { | ||
16606 | |||
16607 | ; | ||
16608 | return 0; | ||
16609 | } | ||
16610 | _ACEOF | ||
16611 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
16612 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
16613 | (eval $ac_link) 2>conftest.er1 | ||
16614 | ac_status=$? | ||
16615 | grep -v '^ *+' conftest.er1 >conftest.err | ||
16616 | rm -f conftest.er1 | ||
16617 | cat conftest.err >&5 | ||
16618 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
16619 | (exit $ac_status); } && | ||
16620 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
16621 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
16622 | (eval $ac_try) 2>&5 | ||
16623 | ac_status=$? | ||
16624 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
16625 | (exit $ac_status); }; } && | ||
16626 | { ac_try='test -s conftest$ac_exeext' | ||
16627 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
16628 | (eval $ac_try) 2>&5 | ||
16629 | ac_status=$? | ||
16630 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
16631 | (exit $ac_status); }; }; then | ||
16632 | |||
16633 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
16634 | }'` | ||
16635 | # Check for a 64-bit object if we didn't find anything. | ||
16636 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
16637 | }'`; fi | ||
16638 | else | ||
16639 | echo "$as_me: failed program was:" >&5 | ||
16640 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
16641 | |||
16642 | fi | ||
16643 | rm -f conftest.err conftest.$ac_objext \ | ||
16644 | conftest$ac_exeext conftest.$ac_ext | ||
16645 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
16646 | |||
16647 | hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
16648 | archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" | ||
16649 | else | ||
16650 | if test "$host_cpu" = ia64; then | ||
16651 | hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' | ||
16652 | allow_undefined_flag_GCJ="-z nodefs" | ||
16653 | archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" | ||
16654 | else | ||
16655 | # Determine the default libpath from the value encoded in an empty executable. | ||
16656 | cat >conftest.$ac_ext <<_ACEOF | ||
16657 | /* confdefs.h. */ | ||
16658 | _ACEOF | ||
16659 | cat confdefs.h >>conftest.$ac_ext | ||
16660 | cat >>conftest.$ac_ext <<_ACEOF | ||
16661 | /* end confdefs.h. */ | ||
16662 | |||
16663 | int | ||
16664 | main () | ||
16665 | { | ||
16666 | |||
16667 | ; | ||
16668 | return 0; | ||
16669 | } | ||
16670 | _ACEOF | ||
16671 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
16672 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
16673 | (eval $ac_link) 2>conftest.er1 | ||
16674 | ac_status=$? | ||
16675 | grep -v '^ *+' conftest.er1 >conftest.err | ||
16676 | rm -f conftest.er1 | ||
16677 | cat conftest.err >&5 | ||
16678 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
16679 | (exit $ac_status); } && | ||
16680 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
16681 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
16682 | (eval $ac_try) 2>&5 | ||
16683 | ac_status=$? | ||
16684 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
16685 | (exit $ac_status); }; } && | ||
16686 | { ac_try='test -s conftest$ac_exeext' | ||
16687 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
16688 | (eval $ac_try) 2>&5 | ||
16689 | ac_status=$? | ||
16690 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
16691 | (exit $ac_status); }; }; then | ||
16692 | |||
16693 | aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
16694 | }'` | ||
16695 | # Check for a 64-bit object if we didn't find anything. | ||
16696 | if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } | ||
16697 | }'`; fi | ||
16698 | else | ||
16699 | echo "$as_me: failed program was:" >&5 | ||
16700 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
16701 | |||
16702 | fi | ||
16703 | rm -f conftest.err conftest.$ac_objext \ | ||
16704 | conftest$ac_exeext conftest.$ac_ext | ||
16705 | if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi | ||
16706 | |||
16707 | hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" | ||
16708 | # Warning - without using the other run time loading flags, | ||
16709 | # -berok will link without error, but may produce a broken library. | ||
16710 | no_undefined_flag_GCJ=' ${wl}-bernotok' | ||
16711 | allow_undefined_flag_GCJ=' ${wl}-berok' | ||
16712 | # -bexpall does not export symbols beginning with underscore (_) | ||
16713 | always_export_symbols_GCJ=yes | ||
16714 | # Exported symbols can be pulled into shared objects from archives | ||
16715 | whole_archive_flag_spec_GCJ=' ' | ||
16716 | archive_cmds_need_lc_GCJ=yes | ||
16717 | # This is similar to how AIX traditionally builds it's shared libraries. | ||
16718 | archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' | ||
16719 | fi | ||
16720 | fi | ||
16721 | ;; | ||
16722 | |||
16723 | amigaos*) | ||
16724 | archive_cmds_GCJ='$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)' | ||
16725 | hardcode_libdir_flag_spec_GCJ='-L$libdir' | ||
16726 | hardcode_minus_L_GCJ=yes | ||
16727 | # see comment about different semantics on the GNU ld section | ||
16728 | ld_shlibs_GCJ=no | ||
16729 | ;; | ||
16730 | |||
16731 | bsdi4*) | ||
16732 | export_dynamic_flag_spec_GCJ=-rdynamic | ||
16733 | ;; | ||
16734 | |||
16735 | cygwin* | mingw* | pw32*) | ||
16736 | # When not using gcc, we currently assume that we are using | ||
16737 | # Microsoft Visual C++. | ||
16738 | # hardcode_libdir_flag_spec is actually meaningless, as there is | ||
16739 | # no search path for DLLs. | ||
16740 | hardcode_libdir_flag_spec_GCJ=' ' | ||
16741 | allow_undefined_flag_GCJ=unsupported | ||
16742 | # Tell ltmain to make .lib files, not .a files. | ||
16743 | libext=lib | ||
16744 | # Tell ltmain to make .dll files, not .so files. | ||
16745 | shrext_cmds=".dll" | ||
16746 | # FIXME: Setting linknames here is a bad hack. | ||
16747 | archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' | ||
16748 | # The linker will automatically build a .lib file if we build a DLL. | ||
16749 | old_archive_From_new_cmds_GCJ='true' | ||
16750 | # FIXME: Should let the user specify the lib program. | ||
16751 | old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' | ||
16752 | fix_srcfile_path='`cygpath -w "$srcfile"`' | ||
16753 | enable_shared_with_static_runtimes_GCJ=yes | ||
16754 | ;; | ||
16755 | |||
16756 | darwin* | rhapsody*) | ||
16757 | if test "$GXX" = yes ; then | ||
16758 | archive_cmds_need_lc_GCJ=no | ||
16759 | case "$host_os" in | ||
16760 | rhapsody* | darwin1.[012]) | ||
16761 | allow_undefined_flag_GCJ='-undefined suppress' | ||
16762 | ;; | ||
16763 | *) # Darwin 1.3 on | ||
16764 | if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then | ||
16765 | allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' | ||
16766 | else | ||
16767 | case ${MACOSX_DEPLOYMENT_TARGET} in | ||
16768 | 10.[012]) | ||
16769 | allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' | ||
16770 | ;; | ||
16771 | 10.*) | ||
16772 | allow_undefined_flag_GCJ='-undefined dynamic_lookup' | ||
16773 | ;; | ||
16774 | esac | ||
16775 | fi | ||
16776 | ;; | ||
16777 | esac | ||
16778 | lt_int_apple_cc_single_mod=no | ||
16779 | output_verbose_link_cmd='echo' | ||
16780 | if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then | ||
16781 | lt_int_apple_cc_single_mod=yes | ||
16782 | fi | ||
16783 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
16784 | archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' | ||
16785 | else | ||
16786 | archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -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' | ||
16787 | fi | ||
16788 | module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' | ||
16789 | # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's | ||
16790 | if test "X$lt_int_apple_cc_single_mod" = Xyes ; then | ||
16791 | archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
16792 | else | ||
16793 | archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
16794 | fi | ||
16795 | module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' | ||
16796 | hardcode_direct_GCJ=no | ||
16797 | hardcode_automatic_GCJ=yes | ||
16798 | hardcode_shlibpath_var_GCJ=unsupported | ||
16799 | whole_archive_flag_spec_GCJ='-all_load $convenience' | ||
16800 | link_all_deplibs_GCJ=yes | ||
16801 | else | ||
16802 | ld_shlibs_GCJ=no | ||
16803 | fi | ||
16804 | ;; | ||
16805 | |||
16806 | dgux*) | ||
16807 | archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
16808 | hardcode_libdir_flag_spec_GCJ='-L$libdir' | ||
16809 | hardcode_shlibpath_var_GCJ=no | ||
16810 | ;; | ||
16811 | |||
16812 | freebsd1*) | ||
16813 | ld_shlibs_GCJ=no | ||
16814 | ;; | ||
16815 | |||
16816 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | ||
16817 | # support. Future versions do this automatically, but an explicit c++rt0.o | ||
16818 | # does not break anything, and helps significantly (at the cost of a little | ||
16819 | # extra space). | ||
16820 | freebsd2.2*) | ||
16821 | archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | ||
16822 | hardcode_libdir_flag_spec_GCJ='-R$libdir' | ||
16823 | hardcode_direct_GCJ=yes | ||
16824 | hardcode_shlibpath_var_GCJ=no | ||
16825 | ;; | ||
16826 | |||
16827 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. | ||
16828 | freebsd2*) | ||
16829 | archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
16830 | hardcode_direct_GCJ=yes | ||
16831 | hardcode_minus_L_GCJ=yes | ||
16832 | hardcode_shlibpath_var_GCJ=no | ||
16833 | ;; | ||
16834 | |||
16835 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | ||
16836 | freebsd* | kfreebsd*-gnu) | ||
16837 | archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | ||
16838 | hardcode_libdir_flag_spec_GCJ='-R$libdir' | ||
16839 | hardcode_direct_GCJ=yes | ||
16840 | hardcode_shlibpath_var_GCJ=no | ||
16841 | ;; | ||
16842 | |||
16843 | hpux9*) | ||
16844 | if test "$GCC" = yes; then | ||
16845 | archive_cmds_GCJ='$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' | ||
16846 | else | ||
16847 | archive_cmds_GCJ='$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' | ||
16848 | fi | ||
16849 | hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' | ||
16850 | hardcode_libdir_separator_GCJ=: | ||
16851 | hardcode_direct_GCJ=yes | ||
16852 | |||
16853 | # hardcode_minus_L: Not really in the search PATH, | ||
16854 | # but as the default location of the library. | ||
16855 | hardcode_minus_L_GCJ=yes | ||
16856 | export_dynamic_flag_spec_GCJ='${wl}-E' | ||
16857 | ;; | ||
16858 | |||
16859 | hpux10* | hpux11*) | ||
16860 | if test "$GCC" = yes -a "$with_gnu_ld" = no; then | ||
16861 | case "$host_cpu" in | ||
16862 | hppa*64*|ia64*) | ||
16863 | archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
16864 | ;; | ||
16865 | *) | ||
16866 | archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' | ||
16867 | ;; | ||
16868 | esac | ||
16869 | else | ||
16870 | case "$host_cpu" in | ||
16871 | hppa*64*|ia64*) | ||
16872 | archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
16873 | ;; | ||
16874 | *) | ||
16875 | archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' | ||
16876 | ;; | ||
16877 | esac | ||
16878 | fi | ||
16879 | if test "$with_gnu_ld" = no; then | ||
16880 | case "$host_cpu" in | ||
16881 | hppa*64*) | ||
16882 | hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' | ||
16883 | hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' | ||
16884 | hardcode_libdir_separator_GCJ=: | ||
16885 | hardcode_direct_GCJ=no | ||
16886 | hardcode_shlibpath_var_GCJ=no | ||
16887 | ;; | ||
16888 | ia64*) | ||
16889 | hardcode_libdir_flag_spec_GCJ='-L$libdir' | ||
16890 | hardcode_direct_GCJ=no | ||
16891 | hardcode_shlibpath_var_GCJ=no | ||
16892 | |||
16893 | # hardcode_minus_L: Not really in the search PATH, | ||
16894 | # but as the default location of the library. | ||
16895 | hardcode_minus_L_GCJ=yes | ||
16896 | ;; | ||
16897 | *) | ||
16898 | hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' | ||
16899 | hardcode_libdir_separator_GCJ=: | ||
16900 | hardcode_direct_GCJ=yes | ||
16901 | export_dynamic_flag_spec_GCJ='${wl}-E' | ||
16902 | |||
16903 | # hardcode_minus_L: Not really in the search PATH, | ||
16904 | # but as the default location of the library. | ||
16905 | hardcode_minus_L_GCJ=yes | ||
16906 | ;; | ||
16907 | esac | ||
16908 | fi | ||
16909 | ;; | ||
16910 | |||
16911 | irix5* | irix6* | nonstopux*) | ||
16912 | if test "$GCC" = yes; then | ||
16913 | archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
16914 | else | ||
16915 | archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
16916 | hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' | ||
16917 | fi | ||
16918 | hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' | ||
16919 | hardcode_libdir_separator_GCJ=: | ||
16920 | link_all_deplibs_GCJ=yes | ||
16921 | ;; | ||
16922 | |||
16923 | netbsd* | netbsdelf*-gnu | knetbsd*-gnu) | ||
16924 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
16925 | archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | ||
16926 | else | ||
16927 | archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | ||
16928 | fi | ||
16929 | hardcode_libdir_flag_spec_GCJ='-R$libdir' | ||
16930 | hardcode_direct_GCJ=yes | ||
16931 | hardcode_shlibpath_var_GCJ=no | ||
16932 | ;; | ||
16933 | |||
16934 | newsos6) | ||
16935 | archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
16936 | hardcode_direct_GCJ=yes | ||
16937 | hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' | ||
16938 | hardcode_libdir_separator_GCJ=: | ||
16939 | hardcode_shlibpath_var_GCJ=no | ||
16940 | ;; | ||
16941 | |||
16942 | openbsd*) | ||
16943 | hardcode_direct_GCJ=yes | ||
16944 | hardcode_shlibpath_var_GCJ=no | ||
16945 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
16946 | archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
16947 | hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' | ||
16948 | export_dynamic_flag_spec_GCJ='${wl}-E' | ||
16949 | else | ||
16950 | case $host_os in | ||
16951 | openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) | ||
16952 | archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | ||
16953 | hardcode_libdir_flag_spec_GCJ='-R$libdir' | ||
16954 | ;; | ||
16955 | *) | ||
16956 | archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' | ||
16957 | hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' | ||
16958 | ;; | ||
16959 | esac | ||
16960 | fi | ||
16961 | ;; | ||
16962 | |||
16963 | os2*) | ||
16964 | hardcode_libdir_flag_spec_GCJ='-L$libdir' | ||
16965 | hardcode_minus_L_GCJ=yes | ||
16966 | allow_undefined_flag_GCJ=unsupported | ||
16967 | archive_cmds_GCJ='$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' | ||
16968 | old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | ||
16969 | ;; | ||
16970 | |||
16971 | osf3*) | ||
16972 | if test "$GCC" = yes; then | ||
16973 | allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' | ||
16974 | archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
16975 | else | ||
16976 | allow_undefined_flag_GCJ=' -expect_unresolved \*' | ||
16977 | archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
16978 | fi | ||
16979 | hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' | ||
16980 | hardcode_libdir_separator_GCJ=: | ||
16981 | ;; | ||
16982 | |||
16983 | osf4* | osf5*) # as osf3* with the addition of -msym flag | ||
16984 | if test "$GCC" = yes; then | ||
16985 | allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' | ||
16986 | archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | ||
16987 | hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' | ||
16988 | else | ||
16989 | allow_undefined_flag_GCJ=' -expect_unresolved \*' | ||
16990 | archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | ||
16991 | archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ | ||
16992 | $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' | ||
16993 | |||
16994 | # Both c and cxx compiler support -rpath directly | ||
16995 | hardcode_libdir_flag_spec_GCJ='-rpath $libdir' | ||
16996 | fi | ||
16997 | hardcode_libdir_separator_GCJ=: | ||
16998 | ;; | ||
16999 | |||
17000 | sco3.2v5*) | ||
17001 | archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
17002 | hardcode_shlibpath_var_GCJ=no | ||
17003 | export_dynamic_flag_spec_GCJ='${wl}-Bexport' | ||
17004 | runpath_var=LD_RUN_PATH | ||
17005 | hardcode_runpath_var=yes | ||
17006 | ;; | ||
17007 | |||
17008 | solaris*) | ||
17009 | no_undefined_flag_GCJ=' -z text' | ||
17010 | if test "$GCC" = yes; then | ||
17011 | archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
17012 | archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
17013 | $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' | ||
17014 | else | ||
17015 | archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
17016 | archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
17017 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | ||
17018 | fi | ||
17019 | hardcode_libdir_flag_spec_GCJ='-R$libdir' | ||
17020 | hardcode_shlibpath_var_GCJ=no | ||
17021 | case $host_os in | ||
17022 | solaris2.[0-5] | solaris2.[0-5].*) ;; | ||
17023 | *) # Supported since Solaris 2.6 (maybe 2.5.1?) | ||
17024 | whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; | ||
17025 | esac | ||
17026 | link_all_deplibs_GCJ=yes | ||
17027 | ;; | ||
17028 | |||
17029 | sunos4*) | ||
17030 | if test "x$host_vendor" = xsequent; then | ||
17031 | # Use $CC to link under sequent, because it throws in some extra .o | ||
17032 | # files that make .init and .fini sections work. | ||
17033 | archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | ||
17034 | else | ||
17035 | archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | ||
17036 | fi | ||
17037 | hardcode_libdir_flag_spec_GCJ='-L$libdir' | ||
17038 | hardcode_direct_GCJ=yes | ||
17039 | hardcode_minus_L_GCJ=yes | ||
17040 | hardcode_shlibpath_var_GCJ=no | ||
17041 | ;; | ||
17042 | |||
17043 | sysv4) | ||
17044 | case $host_vendor in | ||
17045 | sni) | ||
17046 | archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
17047 | hardcode_direct_GCJ=yes # is this really true??? | ||
17048 | ;; | ||
17049 | siemens) | ||
17050 | ## LD is ld it makes a PLAMLIB | ||
17051 | ## CC just makes a GrossModule. | ||
17052 | archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' | ||
17053 | reload_cmds_GCJ='$CC -r -o $output$reload_objs' | ||
17054 | hardcode_direct_GCJ=no | ||
17055 | ;; | ||
17056 | motorola) | ||
17057 | archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
17058 | hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie | ||
17059 | ;; | ||
17060 | esac | ||
17061 | runpath_var='LD_RUN_PATH' | ||
17062 | hardcode_shlibpath_var_GCJ=no | ||
17063 | ;; | ||
17064 | |||
17065 | sysv4.3*) | ||
17066 | archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
17067 | hardcode_shlibpath_var_GCJ=no | ||
17068 | export_dynamic_flag_spec_GCJ='-Bexport' | ||
17069 | ;; | ||
17070 | |||
17071 | sysv4*MP*) | ||
17072 | if test -d /usr/nec; then | ||
17073 | archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
17074 | hardcode_shlibpath_var_GCJ=no | ||
17075 | runpath_var=LD_RUN_PATH | ||
17076 | hardcode_runpath_var=yes | ||
17077 | ld_shlibs_GCJ=yes | ||
17078 | fi | ||
17079 | ;; | ||
17080 | |||
17081 | sysv4.2uw2*) | ||
17082 | archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' | ||
17083 | hardcode_direct_GCJ=yes | ||
17084 | hardcode_minus_L_GCJ=no | ||
17085 | hardcode_shlibpath_var_GCJ=no | ||
17086 | hardcode_runpath_var=yes | ||
17087 | runpath_var=LD_RUN_PATH | ||
17088 | ;; | ||
17089 | |||
17090 | sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) | ||
17091 | no_undefined_flag_GCJ='${wl}-z ${wl}text' | ||
17092 | if test "$GCC" = yes; then | ||
17093 | archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
17094 | else | ||
17095 | archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | ||
17096 | fi | ||
17097 | runpath_var='LD_RUN_PATH' | ||
17098 | hardcode_shlibpath_var_GCJ=no | ||
17099 | ;; | ||
17100 | |||
17101 | sysv5*) | ||
17102 | no_undefined_flag_GCJ=' -z text' | ||
17103 | # $CC -shared without GNU ld will not create a library from C++ | ||
17104 | # object files and a static libstdc++, better avoid it by now | ||
17105 | archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
17106 | archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | ||
17107 | $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | ||
17108 | hardcode_libdir_flag_spec_GCJ= | ||
17109 | hardcode_shlibpath_var_GCJ=no | ||
17110 | runpath_var='LD_RUN_PATH' | ||
17111 | ;; | ||
17112 | |||
17113 | uts4*) | ||
17114 | archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | ||
17115 | hardcode_libdir_flag_spec_GCJ='-L$libdir' | ||
17116 | hardcode_shlibpath_var_GCJ=no | ||
17117 | ;; | ||
17118 | |||
17119 | *) | ||
17120 | ld_shlibs_GCJ=no | ||
17121 | ;; | ||
17122 | esac | ||
17123 | fi | ||
17124 | |||
17125 | echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 | ||
17126 | echo "${ECHO_T}$ld_shlibs_GCJ" >&6 | ||
17127 | test "$ld_shlibs_GCJ" = no && can_build_shared=no | ||
17128 | |||
17129 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | ||
17130 | if test "$GCC" = yes; then | ||
17131 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | ||
17132 | fi | ||
17133 | |||
17134 | # | ||
17135 | # Do we need to explicitly link libc? | ||
17136 | # | ||
17137 | case "x$archive_cmds_need_lc_GCJ" in | ||
17138 | x|xyes) | ||
17139 | # Assume -lc should be added | ||
17140 | archive_cmds_need_lc_GCJ=yes | ||
17141 | |||
17142 | if test "$enable_shared" = yes && test "$GCC" = yes; then | ||
17143 | case $archive_cmds_GCJ in | ||
17144 | *'~'*) | ||
17145 | # FIXME: we may have to deal with multi-command sequences. | ||
17146 | ;; | ||
17147 | '$CC '*) | ||
17148 | # Test whether the compiler implicitly links with -lc since on some | ||
17149 | # systems, -lgcc has to come before -lc. If gcc already passes -lc | ||
17150 | # to ld, don't add -lc before -lgcc. | ||
17151 | echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 | ||
17152 | echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 | ||
17153 | $rm conftest* | ||
17154 | printf "$lt_simple_compile_test_code" > conftest.$ac_ext | ||
17155 | |||
17156 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
17157 | (eval $ac_compile) 2>&5 | ||
17158 | ac_status=$? | ||
17159 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
17160 | (exit $ac_status); } 2>conftest.err; then | ||
17161 | soname=conftest | ||
17162 | lib=conftest | ||
17163 | libobjs=conftest.$ac_objext | ||
17164 | deplibs= | ||
17165 | wl=$lt_prog_compiler_wl_GCJ | ||
17166 | compiler_flags=-v | ||
17167 | linker_flags=-v | ||
17168 | verstring= | ||
17169 | output_objdir=. | ||
17170 | libname=conftest | ||
17171 | lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ | ||
17172 | allow_undefined_flag_GCJ= | ||
17173 | if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 | ||
17174 | (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 | ||
17175 | ac_status=$? | ||
17176 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
17177 | (exit $ac_status); } | ||
17178 | then | ||
17179 | archive_cmds_need_lc_GCJ=no | ||
17180 | else | ||
17181 | archive_cmds_need_lc_GCJ=yes | ||
17182 | fi | ||
17183 | allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag | ||
17184 | else | ||
17185 | cat conftest.err 1>&5 | ||
17186 | fi | ||
17187 | $rm conftest* | ||
17188 | echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 | ||
17189 | echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 | ||
17190 | ;; | ||
17191 | esac | ||
17192 | fi | ||
17193 | ;; | ||
17194 | esac | ||
17195 | |||
17196 | echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 | ||
17197 | echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 | ||
17198 | library_names_spec= | ||
17199 | libname_spec='lib$name' | ||
17200 | soname_spec= | ||
17201 | shrext_cmds=".so" | ||
17202 | postinstall_cmds= | ||
17203 | postuninstall_cmds= | ||
17204 | finish_cmds= | ||
17205 | finish_eval= | ||
17206 | shlibpath_var= | ||
17207 | shlibpath_overrides_runpath=unknown | ||
17208 | version_type=none | ||
17209 | dynamic_linker="$host_os ld.so" | ||
17210 | sys_lib_dlsearch_path_spec="/lib /usr/lib" | ||
17211 | if test "$GCC" = yes; then | ||
17212 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | ||
17213 | if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then | ||
17214 | # if the path contains ";" then we assume it to be the separator | ||
17215 | # otherwise default to the standard path separator (i.e. ":") - it is | ||
17216 | # assumed that no part of a normal pathname contains ";" but that should | ||
17217 | # okay in the real world where ";" in dirpaths is itself problematic. | ||
17218 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
17219 | else | ||
17220 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
17221 | fi | ||
17222 | else | ||
17223 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | ||
17224 | fi | ||
17225 | need_lib_prefix=unknown | ||
17226 | hardcode_into_libs=no | ||
17227 | |||
17228 | # when you set need_version to no, make sure it does not cause -set_version | ||
17229 | # flags to be left without arguments | ||
17230 | need_version=unknown | ||
17231 | |||
17232 | case $host_os in | ||
17233 | aix3*) | ||
17234 | version_type=linux | ||
17235 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' | ||
17236 | shlibpath_var=LIBPATH | ||
17237 | |||
17238 | # AIX 3 has no versioning support, so we append a major version to the name. | ||
17239 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17240 | ;; | ||
17241 | |||
17242 | aix4* | aix5*) | ||
17243 | version_type=linux | ||
17244 | need_lib_prefix=no | ||
17245 | need_version=no | ||
17246 | hardcode_into_libs=yes | ||
17247 | if test "$host_cpu" = ia64; then | ||
17248 | # AIX 5 supports IA64 | ||
17249 | library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' | ||
17250 | shlibpath_var=LD_LIBRARY_PATH | ||
17251 | else | ||
17252 | # With GCC up to 2.95.x, collect2 would create an import file | ||
17253 | # for dependence libraries. The import file would start with | ||
17254 | # the line `#! .'. This would cause the generated library to | ||
17255 | # depend on `.', always an invalid library. This was fixed in | ||
17256 | # development snapshots of GCC prior to 3.0. | ||
17257 | case $host_os in | ||
17258 | aix4 | aix4.[01] | aix4.[01].*) | ||
17259 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | ||
17260 | echo ' yes ' | ||
17261 | echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | ||
17262 | : | ||
17263 | else | ||
17264 | can_build_shared=no | ||
17265 | fi | ||
17266 | ;; | ||
17267 | esac | ||
17268 | # AIX (on Power*) has no versioning support, so currently we can not hardcode correct | ||
17269 | # soname into executable. Probably we can add versioning support to | ||
17270 | # collect2, so additional links can be useful in future. | ||
17271 | if test "$aix_use_runtimelinking" = yes; then | ||
17272 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so | ||
17273 | # instead of lib<name>.a to let people know that these are not | ||
17274 | # typical AIX shared libraries. | ||
17275 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17276 | else | ||
17277 | # We preserve .a as extension for shared libraries through AIX4.2 | ||
17278 | # and later when we are not doing run time linking. | ||
17279 | library_names_spec='${libname}${release}.a $libname.a' | ||
17280 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17281 | fi | ||
17282 | shlibpath_var=LIBPATH | ||
17283 | fi | ||
17284 | ;; | ||
17285 | |||
17286 | amigaos*) | ||
17287 | library_names_spec='$libname.ixlibrary $libname.a' | ||
17288 | # Create ${libname}_ixlibrary.a entries in /sys/libs. | ||
17289 | 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' | ||
17290 | ;; | ||
17291 | |||
17292 | beos*) | ||
17293 | library_names_spec='${libname}${shared_ext}' | ||
17294 | dynamic_linker="$host_os ld.so" | ||
17295 | shlibpath_var=LIBRARY_PATH | ||
17296 | ;; | ||
17297 | |||
17298 | bsdi4*) | ||
17299 | version_type=linux | ||
17300 | need_version=no | ||
17301 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17302 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17303 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | ||
17304 | shlibpath_var=LD_LIBRARY_PATH | ||
17305 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | ||
17306 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | ||
17307 | # the default ld.so.conf also contains /usr/contrib/lib and | ||
17308 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | ||
17309 | # libtool to hard-code these into programs | ||
17310 | ;; | ||
17311 | |||
17312 | cygwin* | mingw* | pw32*) | ||
17313 | version_type=windows | ||
17314 | shrext_cmds=".dll" | ||
17315 | need_version=no | ||
17316 | need_lib_prefix=no | ||
17317 | |||
17318 | case $GCC,$host_os in | ||
17319 | yes,cygwin* | yes,mingw* | yes,pw32*) | ||
17320 | library_names_spec='$libname.dll.a' | ||
17321 | # DLL is installed to $(libdir)/../bin by postinstall_cmds | ||
17322 | postinstall_cmds='base_file=`basename \${file}`~ | ||
17323 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ | ||
17324 | dldir=$destdir/`dirname \$dlpath`~ | ||
17325 | test -d \$dldir || mkdir -p \$dldir~ | ||
17326 | $install_prog $dir/$dlname \$dldir/$dlname' | ||
17327 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ | ||
17328 | dlpath=$dir/\$dldll~ | ||
17329 | $rm \$dlpath' | ||
17330 | shlibpath_overrides_runpath=yes | ||
17331 | |||
17332 | case $host_os in | ||
17333 | cygwin*) | ||
17334 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' | ||
17335 | soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
17336 | sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" | ||
17337 | ;; | ||
17338 | mingw*) | ||
17339 | # MinGW DLLs use traditional 'lib' prefix | ||
17340 | soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' | ||
17341 | sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` | ||
17342 | if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then | ||
17343 | # It is most probably a Windows format PATH printed by | ||
17344 | # mingw gcc, but we are running on Cygwin. Gcc prints its search | ||
17345 | # path with ; separators, and with drive letters. We can handle the | ||
17346 | # drive letters (cygwin fileutils understands them), so leave them, | ||
17347 | # especially as we might pass files found there to a mingw objdump, | ||
17348 | # which wouldn't understand a cygwinified path. Ahh. | ||
17349 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` | ||
17350 | else | ||
17351 | sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` | ||
17352 | fi | ||
17353 | ;; | ||
17354 | pw32*) | ||
17355 | # pw32 DLLs use 'pw' prefix rather than 'lib' | ||
17356 | library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' | ||
17357 | ;; | ||
17358 | esac | ||
17359 | ;; | ||
17360 | |||
17361 | *) | ||
17362 | library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' | ||
17363 | ;; | ||
17364 | esac | ||
17365 | dynamic_linker='Win32 ld.exe' | ||
17366 | # FIXME: first we should search . and the directory the executable is in | ||
17367 | shlibpath_var=PATH | ||
17368 | ;; | ||
17369 | |||
17370 | darwin* | rhapsody*) | ||
17371 | dynamic_linker="$host_os dyld" | ||
17372 | version_type=darwin | ||
17373 | need_lib_prefix=no | ||
17374 | need_version=no | ||
17375 | library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' | ||
17376 | soname_spec='${libname}${release}${major}$shared_ext' | ||
17377 | shlibpath_overrides_runpath=yes | ||
17378 | shlibpath_var=DYLD_LIBRARY_PATH | ||
17379 | shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' | ||
17380 | # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. | ||
17381 | if test "$GCC" = yes; then | ||
17382 | sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` | ||
17383 | else | ||
17384 | sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' | ||
17385 | fi | ||
17386 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' | ||
17387 | ;; | ||
17388 | |||
17389 | dgux*) | ||
17390 | version_type=linux | ||
17391 | need_lib_prefix=no | ||
17392 | need_version=no | ||
17393 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' | ||
17394 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17395 | shlibpath_var=LD_LIBRARY_PATH | ||
17396 | ;; | ||
17397 | |||
17398 | freebsd1*) | ||
17399 | dynamic_linker=no | ||
17400 | ;; | ||
17401 | |||
17402 | kfreebsd*-gnu) | ||
17403 | version_type=linux | ||
17404 | need_lib_prefix=no | ||
17405 | need_version=no | ||
17406 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
17407 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17408 | shlibpath_var=LD_LIBRARY_PATH | ||
17409 | shlibpath_overrides_runpath=no | ||
17410 | hardcode_into_libs=yes | ||
17411 | dynamic_linker='GNU ld.so' | ||
17412 | ;; | ||
17413 | |||
17414 | freebsd*) | ||
17415 | objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` | ||
17416 | version_type=freebsd-$objformat | ||
17417 | case $version_type in | ||
17418 | freebsd-elf*) | ||
17419 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
17420 | need_version=no | ||
17421 | need_lib_prefix=no | ||
17422 | ;; | ||
17423 | freebsd-*) | ||
17424 | library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' | ||
17425 | need_version=yes | ||
17426 | ;; | ||
17427 | esac | ||
17428 | shlibpath_var=LD_LIBRARY_PATH | ||
17429 | case $host_os in | ||
17430 | freebsd2*) | ||
17431 | shlibpath_overrides_runpath=yes | ||
17432 | ;; | ||
17433 | freebsd3.01* | freebsdelf3.01*) | ||
17434 | shlibpath_overrides_runpath=yes | ||
17435 | hardcode_into_libs=yes | ||
17436 | ;; | ||
17437 | *) # from 3.2 on | ||
17438 | shlibpath_overrides_runpath=no | ||
17439 | hardcode_into_libs=yes | ||
17440 | ;; | ||
17441 | esac | ||
17442 | ;; | ||
17443 | |||
17444 | gnu*) | ||
17445 | version_type=linux | ||
17446 | need_lib_prefix=no | ||
17447 | need_version=no | ||
17448 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' | ||
17449 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17450 | shlibpath_var=LD_LIBRARY_PATH | ||
17451 | hardcode_into_libs=yes | ||
17452 | ;; | ||
17453 | |||
17454 | hpux9* | hpux10* | hpux11*) | ||
17455 | # Give a soname corresponding to the major version so that dld.sl refuses to | ||
17456 | # link against other versions. | ||
17457 | version_type=sunos | ||
17458 | need_lib_prefix=no | ||
17459 | need_version=no | ||
17460 | case "$host_cpu" in | ||
17461 | ia64*) | ||
17462 | shrext_cmds='.so' | ||
17463 | hardcode_into_libs=yes | ||
17464 | dynamic_linker="$host_os dld.so" | ||
17465 | shlibpath_var=LD_LIBRARY_PATH | ||
17466 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
17467 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17468 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17469 | if test "X$HPUX_IA64_MODE" = X32; then | ||
17470 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" | ||
17471 | else | ||
17472 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" | ||
17473 | fi | ||
17474 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
17475 | ;; | ||
17476 | hppa*64*) | ||
17477 | shrext_cmds='.sl' | ||
17478 | hardcode_into_libs=yes | ||
17479 | dynamic_linker="$host_os dld.sl" | ||
17480 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH | ||
17481 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. | ||
17482 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17483 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17484 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" | ||
17485 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec | ||
17486 | ;; | ||
17487 | *) | ||
17488 | shrext_cmds='.sl' | ||
17489 | dynamic_linker="$host_os dld.sl" | ||
17490 | shlibpath_var=SHLIB_PATH | ||
17491 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | ||
17492 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17493 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17494 | ;; | ||
17495 | esac | ||
17496 | # HP-UX runs *really* slowly unless shared libraries are mode 555. | ||
17497 | postinstall_cmds='chmod 555 $lib' | ||
17498 | ;; | ||
17499 | |||
17500 | irix5* | irix6* | nonstopux*) | ||
17501 | case $host_os in | ||
17502 | nonstopux*) version_type=nonstopux ;; | ||
17503 | *) | ||
17504 | if test "$lt_cv_prog_gnu_ld" = yes; then | ||
17505 | version_type=linux | ||
17506 | else | ||
17507 | version_type=irix | ||
17508 | fi ;; | ||
17509 | esac | ||
17510 | need_lib_prefix=no | ||
17511 | need_version=no | ||
17512 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17513 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' | ||
17514 | case $host_os in | ||
17515 | irix5* | nonstopux*) | ||
17516 | libsuff= shlibsuff= | ||
17517 | ;; | ||
17518 | *) | ||
17519 | case $LD in # libtool.m4 will add one of these switches to LD | ||
17520 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") | ||
17521 | libsuff= shlibsuff= libmagic=32-bit;; | ||
17522 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") | ||
17523 | libsuff=32 shlibsuff=N32 libmagic=N32;; | ||
17524 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") | ||
17525 | libsuff=64 shlibsuff=64 libmagic=64-bit;; | ||
17526 | *) libsuff= shlibsuff= libmagic=never-match;; | ||
17527 | esac | ||
17528 | ;; | ||
17529 | esac | ||
17530 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | ||
17531 | shlibpath_overrides_runpath=no | ||
17532 | sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | ||
17533 | sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | ||
17534 | hardcode_into_libs=yes | ||
17535 | ;; | ||
17536 | |||
17537 | # No shared lib support for Linux oldld, aout, or coff. | ||
17538 | linux*oldld* | linux*aout* | linux*coff*) | ||
17539 | dynamic_linker=no | ||
17540 | ;; | ||
17541 | |||
17542 | # This must be Linux ELF. | ||
17543 | linux*) | ||
17544 | version_type=linux | ||
17545 | need_lib_prefix=no | ||
17546 | need_version=no | ||
17547 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17548 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17549 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | ||
17550 | shlibpath_var=LD_LIBRARY_PATH | ||
17551 | shlibpath_overrides_runpath=no | ||
17552 | # This implies no fast_install, which is unacceptable. | ||
17553 | # Some rework will be needed to allow for fast_install | ||
17554 | # before this can be enabled. | ||
17555 | hardcode_into_libs=yes | ||
17556 | |||
17557 | # Append ld.so.conf contents to the search path | ||
17558 | if test -f /etc/ld.so.conf; then | ||
17559 | lt_ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | tr '\n' ' '` | ||
17560 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" | ||
17561 | fi | ||
17562 | |||
17563 | # We used to test for /lib/ld.so.1 and disable shared libraries on | ||
17564 | # powerpc, because MkLinux only supported shared libraries with the | ||
17565 | # GNU dynamic linker. Since this was broken with cross compilers, | ||
17566 | # most powerpc-linux boxes support dynamic linking these days and | ||
17567 | # people can always --disable-shared, the test was removed, and we | ||
17568 | # assume the GNU/Linux dynamic linker is in use. | ||
17569 | dynamic_linker='GNU/Linux ld.so' | ||
17570 | ;; | ||
17571 | |||
17572 | netbsdelf*-gnu) | ||
17573 | version_type=linux | ||
17574 | need_lib_prefix=no | ||
17575 | need_version=no | ||
17576 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
17577 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17578 | shlibpath_var=LD_LIBRARY_PATH | ||
17579 | shlibpath_overrides_runpath=no | ||
17580 | hardcode_into_libs=yes | ||
17581 | dynamic_linker='NetBSD ld.elf_so' | ||
17582 | ;; | ||
17583 | |||
17584 | knetbsd*-gnu) | ||
17585 | version_type=linux | ||
17586 | need_lib_prefix=no | ||
17587 | need_version=no | ||
17588 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
17589 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17590 | shlibpath_var=LD_LIBRARY_PATH | ||
17591 | shlibpath_overrides_runpath=no | ||
17592 | hardcode_into_libs=yes | ||
17593 | dynamic_linker='GNU ld.so' | ||
17594 | ;; | ||
17595 | |||
17596 | netbsd*) | ||
17597 | version_type=sunos | ||
17598 | need_lib_prefix=no | ||
17599 | need_version=no | ||
17600 | if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | ||
17601 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
17602 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
17603 | dynamic_linker='NetBSD (a.out) ld.so' | ||
17604 | else | ||
17605 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' | ||
17606 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17607 | dynamic_linker='NetBSD ld.elf_so' | ||
17608 | fi | ||
17609 | shlibpath_var=LD_LIBRARY_PATH | ||
17610 | shlibpath_overrides_runpath=yes | ||
17611 | hardcode_into_libs=yes | ||
17612 | ;; | ||
17613 | |||
17614 | newsos6) | ||
17615 | version_type=linux | ||
17616 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17617 | shlibpath_var=LD_LIBRARY_PATH | ||
17618 | shlibpath_overrides_runpath=yes | ||
17619 | ;; | ||
17620 | |||
17621 | nto-qnx*) | ||
17622 | version_type=linux | ||
17623 | need_lib_prefix=no | ||
17624 | need_version=no | ||
17625 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17626 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17627 | shlibpath_var=LD_LIBRARY_PATH | ||
17628 | shlibpath_overrides_runpath=yes | ||
17629 | ;; | ||
17630 | |||
17631 | openbsd*) | ||
17632 | version_type=sunos | ||
17633 | need_lib_prefix=no | ||
17634 | need_version=yes | ||
17635 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
17636 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | ||
17637 | shlibpath_var=LD_LIBRARY_PATH | ||
17638 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | ||
17639 | case $host_os in | ||
17640 | openbsd2.[89] | openbsd2.[89].*) | ||
17641 | shlibpath_overrides_runpath=no | ||
17642 | ;; | ||
17643 | *) | ||
17644 | shlibpath_overrides_runpath=yes | ||
17645 | ;; | ||
17646 | esac | ||
17647 | else | ||
17648 | shlibpath_overrides_runpath=yes | ||
17649 | fi | ||
17650 | ;; | ||
17651 | |||
17652 | os2*) | ||
17653 | libname_spec='$name' | ||
17654 | shrext_cmds=".dll" | ||
17655 | need_lib_prefix=no | ||
17656 | library_names_spec='$libname${shared_ext} $libname.a' | ||
17657 | dynamic_linker='OS/2 ld.exe' | ||
17658 | shlibpath_var=LIBPATH | ||
17659 | ;; | ||
17660 | |||
17661 | osf3* | osf4* | osf5*) | ||
17662 | version_type=osf | ||
17663 | need_lib_prefix=no | ||
17664 | need_version=no | ||
17665 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17666 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17667 | shlibpath_var=LD_LIBRARY_PATH | ||
17668 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | ||
17669 | sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | ||
17670 | ;; | ||
17671 | |||
17672 | sco3.2v5*) | ||
17673 | version_type=osf | ||
17674 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17675 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17676 | shlibpath_var=LD_LIBRARY_PATH | ||
17677 | ;; | ||
17678 | |||
17679 | solaris*) | ||
17680 | version_type=linux | ||
17681 | need_lib_prefix=no | ||
17682 | need_version=no | ||
17683 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17684 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17685 | shlibpath_var=LD_LIBRARY_PATH | ||
17686 | shlibpath_overrides_runpath=yes | ||
17687 | hardcode_into_libs=yes | ||
17688 | # ldd complains unless libraries are executable | ||
17689 | postinstall_cmds='chmod +x $lib' | ||
17690 | ;; | ||
17691 | |||
17692 | sunos4*) | ||
17693 | version_type=sunos | ||
17694 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' | ||
17695 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | ||
17696 | shlibpath_var=LD_LIBRARY_PATH | ||
17697 | shlibpath_overrides_runpath=yes | ||
17698 | if test "$with_gnu_ld" = yes; then | ||
17699 | need_lib_prefix=no | ||
17700 | fi | ||
17701 | need_version=yes | ||
17702 | ;; | ||
17703 | |||
17704 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | ||
17705 | version_type=linux | ||
17706 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17707 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17708 | shlibpath_var=LD_LIBRARY_PATH | ||
17709 | case $host_vendor in | ||
17710 | sni) | ||
17711 | shlibpath_overrides_runpath=no | ||
17712 | need_lib_prefix=no | ||
17713 | export_dynamic_flag_spec='${wl}-Blargedynsym' | ||
17714 | runpath_var=LD_RUN_PATH | ||
17715 | ;; | ||
17716 | siemens) | ||
17717 | need_lib_prefix=no | ||
17718 | ;; | ||
17719 | motorola) | ||
17720 | need_lib_prefix=no | ||
17721 | need_version=no | ||
17722 | shlibpath_overrides_runpath=no | ||
17723 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | ||
17724 | ;; | ||
17725 | esac | ||
17726 | ;; | ||
17727 | |||
17728 | sysv4*MP*) | ||
17729 | if test -d /usr/nec ;then | ||
17730 | version_type=linux | ||
17731 | library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' | ||
17732 | soname_spec='$libname${shared_ext}.$major' | ||
17733 | shlibpath_var=LD_LIBRARY_PATH | ||
17734 | fi | ||
17735 | ;; | ||
17736 | |||
17737 | uts4*) | ||
17738 | version_type=linux | ||
17739 | library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' | ||
17740 | soname_spec='${libname}${release}${shared_ext}$major' | ||
17741 | shlibpath_var=LD_LIBRARY_PATH | ||
17742 | ;; | ||
17743 | |||
17744 | *) | ||
17745 | dynamic_linker=no | ||
17746 | ;; | ||
17747 | esac | ||
17748 | echo "$as_me:$LINENO: result: $dynamic_linker" >&5 | ||
17749 | echo "${ECHO_T}$dynamic_linker" >&6 | ||
17750 | test "$dynamic_linker" = no && can_build_shared=no | ||
17751 | |||
17752 | echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 | ||
17753 | echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 | ||
17754 | hardcode_action_GCJ= | ||
17755 | if test -n "$hardcode_libdir_flag_spec_GCJ" || \ | ||
17756 | test -n "$runpath_var GCJ" || \ | ||
17757 | test "X$hardcode_automatic_GCJ"="Xyes" ; then | ||
17758 | |||
17759 | # We can hardcode non-existant directories. | ||
17760 | if test "$hardcode_direct_GCJ" != no && | ||
17761 | # If the only mechanism to avoid hardcoding is shlibpath_var, we | ||
17762 | # have to relink, otherwise we might link with an installed library | ||
17763 | # when we should be linking with a yet-to-be-installed one | ||
17764 | ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && | ||
17765 | test "$hardcode_minus_L_GCJ" != no; then | ||
17766 | # Linking always hardcodes the temporary library directory. | ||
17767 | hardcode_action_GCJ=relink | ||
17768 | else | ||
17769 | # We can link without hardcoding, and we can hardcode nonexisting dirs. | ||
17770 | hardcode_action_GCJ=immediate | ||
17771 | fi | ||
17772 | else | ||
17773 | # We cannot hardcode anything, or else we can only hardcode existing | ||
17774 | # directories. | ||
17775 | hardcode_action_GCJ=unsupported | ||
17776 | fi | ||
17777 | echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 | ||
17778 | echo "${ECHO_T}$hardcode_action_GCJ" >&6 | ||
17779 | |||
17780 | if test "$hardcode_action_GCJ" = relink; then | ||
17781 | # Fast installation is not supported | ||
17782 | enable_fast_install=no | ||
17783 | elif test "$shlibpath_overrides_runpath" = yes || | ||
17784 | test "$enable_shared" = no; then | ||
17785 | # Fast installation is not necessary | ||
17786 | enable_fast_install=needless | ||
17787 | fi | ||
17788 | |||
17789 | striplib= | ||
17790 | old_striplib= | ||
17791 | echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 | ||
17792 | echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 | ||
17793 | if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then | ||
17794 | test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | ||
17795 | test -z "$striplib" && striplib="$STRIP --strip-unneeded" | ||
17796 | echo "$as_me:$LINENO: result: yes" >&5 | ||
17797 | echo "${ECHO_T}yes" >&6 | ||
17798 | else | ||
17799 | # FIXME - insert some real tests, host_os isn't really good enough | ||
17800 | case $host_os in | ||
17801 | darwin*) | ||
17802 | if test -n "$STRIP" ; then | ||
17803 | striplib="$STRIP -x" | ||
17804 | echo "$as_me:$LINENO: result: yes" >&5 | ||
17805 | echo "${ECHO_T}yes" >&6 | ||
17806 | else | ||
17807 | echo "$as_me:$LINENO: result: no" >&5 | ||
17808 | echo "${ECHO_T}no" >&6 | ||
17809 | fi | ||
17810 | ;; | ||
17811 | *) | ||
17812 | echo "$as_me:$LINENO: result: no" >&5 | ||
17813 | echo "${ECHO_T}no" >&6 | ||
17814 | ;; | ||
17815 | esac | ||
17816 | fi | ||
17817 | |||
17818 | if test "x$enable_dlopen" != xyes; then | ||
17819 | enable_dlopen=unknown | ||
17820 | enable_dlopen_self=unknown | ||
17821 | enable_dlopen_self_static=unknown | ||
17822 | else | ||
17823 | lt_cv_dlopen=no | ||
17824 | lt_cv_dlopen_libs= | ||
17825 | |||
17826 | case $host_os in | ||
17827 | beos*) | ||
17828 | lt_cv_dlopen="load_add_on" | ||
17829 | lt_cv_dlopen_libs= | ||
17830 | lt_cv_dlopen_self=yes | ||
17831 | ;; | ||
17832 | |||
17833 | mingw* | pw32*) | ||
17834 | lt_cv_dlopen="LoadLibrary" | ||
17835 | lt_cv_dlopen_libs= | ||
17836 | ;; | ||
17837 | |||
17838 | cygwin*) | ||
17839 | lt_cv_dlopen="dlopen" | ||
17840 | lt_cv_dlopen_libs= | ||
17841 | ;; | ||
17842 | |||
17843 | darwin*) | ||
17844 | # if libdl is installed we need to link against it | ||
17845 | echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 | ||
17846 | echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 | ||
17847 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then | ||
17848 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
17849 | else | ||
17850 | ac_check_lib_save_LIBS=$LIBS | ||
17851 | LIBS="-ldl $LIBS" | ||
17852 | cat >conftest.$ac_ext <<_ACEOF | ||
17853 | /* confdefs.h. */ | ||
17854 | _ACEOF | ||
17855 | cat confdefs.h >>conftest.$ac_ext | ||
17856 | cat >>conftest.$ac_ext <<_ACEOF | ||
17857 | /* end confdefs.h. */ | ||
17858 | |||
17859 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
17860 | #ifdef __cplusplus | ||
17861 | extern "C" | ||
17862 | #endif | ||
17863 | /* We use char because int might match the return type of a gcc2 | ||
17864 | builtin and then its argument prototype would still apply. */ | ||
17865 | char dlopen (); | ||
17866 | int | ||
17867 | main () | ||
17868 | { | ||
17869 | dlopen (); | ||
17870 | ; | ||
17871 | return 0; | ||
17872 | } | ||
17873 | _ACEOF | ||
17874 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
17875 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
17876 | (eval $ac_link) 2>conftest.er1 | ||
17877 | ac_status=$? | ||
17878 | grep -v '^ *+' conftest.er1 >conftest.err | ||
17879 | rm -f conftest.er1 | ||
17880 | cat conftest.err >&5 | ||
17881 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
17882 | (exit $ac_status); } && | ||
17883 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
17884 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
17885 | (eval $ac_try) 2>&5 | ||
17886 | ac_status=$? | ||
17887 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
17888 | (exit $ac_status); }; } && | ||
17889 | { ac_try='test -s conftest$ac_exeext' | ||
17890 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
17891 | (eval $ac_try) 2>&5 | ||
17892 | ac_status=$? | ||
17893 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
17894 | (exit $ac_status); }; }; then | ||
17895 | ac_cv_lib_dl_dlopen=yes | ||
17896 | else | ||
17897 | echo "$as_me: failed program was:" >&5 | ||
17898 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
17899 | |||
17900 | ac_cv_lib_dl_dlopen=no | ||
17901 | fi | ||
17902 | rm -f conftest.err conftest.$ac_objext \ | ||
17903 | conftest$ac_exeext conftest.$ac_ext | ||
17904 | LIBS=$ac_check_lib_save_LIBS | ||
17905 | fi | ||
17906 | echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 | ||
17907 | echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 | ||
17908 | if test $ac_cv_lib_dl_dlopen = yes; then | ||
17909 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" | ||
17910 | else | ||
17911 | |||
17912 | lt_cv_dlopen="dyld" | ||
17913 | lt_cv_dlopen_libs= | ||
17914 | lt_cv_dlopen_self=yes | ||
17915 | |||
17916 | fi | ||
17917 | |||
17918 | ;; | ||
17919 | |||
17920 | *) | ||
17921 | echo "$as_me:$LINENO: checking for shl_load" >&5 | ||
17922 | echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 | ||
17923 | if test "${ac_cv_func_shl_load+set}" = set; then | ||
17924 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
17925 | else | ||
17926 | cat >conftest.$ac_ext <<_ACEOF | ||
17927 | /* confdefs.h. */ | ||
17928 | _ACEOF | ||
17929 | cat confdefs.h >>conftest.$ac_ext | ||
17930 | cat >>conftest.$ac_ext <<_ACEOF | ||
17931 | /* end confdefs.h. */ | ||
17932 | /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. | ||
17933 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
17934 | #define shl_load innocuous_shl_load | ||
17935 | |||
17936 | /* System header to define __stub macros and hopefully few prototypes, | ||
17937 | which can conflict with char shl_load (); below. | ||
17938 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
17939 | <limits.h> exists even on freestanding compilers. */ | ||
17940 | |||
17941 | #ifdef __STDC__ | ||
17942 | # include <limits.h> | ||
17943 | #else | ||
17944 | # include <assert.h> | ||
17945 | #endif | ||
17946 | |||
17947 | #undef shl_load | ||
17948 | |||
17949 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
17950 | #ifdef __cplusplus | ||
17951 | extern "C" | ||
17952 | { | ||
17953 | #endif | ||
17954 | /* We use char because int might match the return type of a gcc2 | ||
17955 | builtin and then its argument prototype would still apply. */ | ||
17956 | char shl_load (); | ||
17957 | /* The GNU C library defines this for functions which it implements | ||
17958 | to always fail with ENOSYS. Some functions are actually named | ||
17959 | something starting with __ and the normal name is an alias. */ | ||
17960 | #if defined (__stub_shl_load) || defined (__stub___shl_load) | ||
17961 | choke me | ||
17962 | #else | ||
17963 | char (*f) () = shl_load; | ||
17964 | #endif | ||
17965 | #ifdef __cplusplus | ||
17966 | } | ||
17967 | #endif | ||
17968 | |||
17969 | int | ||
17970 | main () | ||
17971 | { | ||
17972 | return f != shl_load; | ||
17973 | ; | ||
17974 | return 0; | ||
17975 | } | ||
17976 | _ACEOF | ||
17977 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
17978 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
17979 | (eval $ac_link) 2>conftest.er1 | ||
17980 | ac_status=$? | ||
17981 | grep -v '^ *+' conftest.er1 >conftest.err | ||
17982 | rm -f conftest.er1 | ||
17983 | cat conftest.err >&5 | ||
17984 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
17985 | (exit $ac_status); } && | ||
17986 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
17987 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
17988 | (eval $ac_try) 2>&5 | ||
17989 | ac_status=$? | ||
17990 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
17991 | (exit $ac_status); }; } && | ||
17992 | { ac_try='test -s conftest$ac_exeext' | ||
17993 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
17994 | (eval $ac_try) 2>&5 | ||
17995 | ac_status=$? | ||
17996 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
17997 | (exit $ac_status); }; }; then | ||
17998 | ac_cv_func_shl_load=yes | ||
17999 | else | ||
18000 | echo "$as_me: failed program was:" >&5 | ||
18001 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
18002 | |||
18003 | ac_cv_func_shl_load=no | ||
18004 | fi | ||
18005 | rm -f conftest.err conftest.$ac_objext \ | ||
18006 | conftest$ac_exeext conftest.$ac_ext | ||
18007 | fi | ||
18008 | echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 | ||
18009 | echo "${ECHO_T}$ac_cv_func_shl_load" >&6 | ||
18010 | if test $ac_cv_func_shl_load = yes; then | ||
18011 | lt_cv_dlopen="shl_load" | ||
18012 | else | ||
18013 | echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 | ||
18014 | echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 | ||
18015 | if test "${ac_cv_lib_dld_shl_load+set}" = set; then | ||
18016 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
18017 | else | ||
18018 | ac_check_lib_save_LIBS=$LIBS | ||
18019 | LIBS="-ldld $LIBS" | ||
18020 | cat >conftest.$ac_ext <<_ACEOF | ||
18021 | /* confdefs.h. */ | ||
18022 | _ACEOF | ||
18023 | cat confdefs.h >>conftest.$ac_ext | ||
18024 | cat >>conftest.$ac_ext <<_ACEOF | ||
18025 | /* end confdefs.h. */ | ||
18026 | |||
18027 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
18028 | #ifdef __cplusplus | ||
18029 | extern "C" | ||
18030 | #endif | ||
18031 | /* We use char because int might match the return type of a gcc2 | ||
18032 | builtin and then its argument prototype would still apply. */ | ||
18033 | char shl_load (); | ||
18034 | int | ||
18035 | main () | ||
18036 | { | ||
18037 | shl_load (); | ||
18038 | ; | ||
18039 | return 0; | ||
18040 | } | ||
18041 | _ACEOF | ||
18042 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
18043 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
18044 | (eval $ac_link) 2>conftest.er1 | ||
18045 | ac_status=$? | ||
18046 | grep -v '^ *+' conftest.er1 >conftest.err | ||
18047 | rm -f conftest.er1 | ||
18048 | cat conftest.err >&5 | ||
18049 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18050 | (exit $ac_status); } && | ||
18051 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
18052 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
18053 | (eval $ac_try) 2>&5 | ||
18054 | ac_status=$? | ||
18055 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18056 | (exit $ac_status); }; } && | ||
18057 | { ac_try='test -s conftest$ac_exeext' | ||
18058 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
18059 | (eval $ac_try) 2>&5 | ||
18060 | ac_status=$? | ||
18061 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18062 | (exit $ac_status); }; }; then | ||
18063 | ac_cv_lib_dld_shl_load=yes | ||
18064 | else | ||
18065 | echo "$as_me: failed program was:" >&5 | ||
18066 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
18067 | |||
18068 | ac_cv_lib_dld_shl_load=no | ||
18069 | fi | ||
18070 | rm -f conftest.err conftest.$ac_objext \ | ||
18071 | conftest$ac_exeext conftest.$ac_ext | ||
18072 | LIBS=$ac_check_lib_save_LIBS | ||
18073 | fi | ||
18074 | echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 | ||
18075 | echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 | ||
18076 | if test $ac_cv_lib_dld_shl_load = yes; then | ||
18077 | lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" | ||
18078 | else | ||
18079 | echo "$as_me:$LINENO: checking for dlopen" >&5 | ||
18080 | echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 | ||
18081 | if test "${ac_cv_func_dlopen+set}" = set; then | ||
18082 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
18083 | else | ||
18084 | cat >conftest.$ac_ext <<_ACEOF | ||
18085 | /* confdefs.h. */ | ||
18086 | _ACEOF | ||
18087 | cat confdefs.h >>conftest.$ac_ext | ||
18088 | cat >>conftest.$ac_ext <<_ACEOF | ||
18089 | /* end confdefs.h. */ | ||
18090 | /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. | ||
18091 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
18092 | #define dlopen innocuous_dlopen | ||
18093 | |||
18094 | /* System header to define __stub macros and hopefully few prototypes, | ||
18095 | which can conflict with char dlopen (); below. | ||
18096 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
18097 | <limits.h> exists even on freestanding compilers. */ | ||
18098 | |||
18099 | #ifdef __STDC__ | ||
18100 | # include <limits.h> | ||
18101 | #else | ||
18102 | # include <assert.h> | ||
18103 | #endif | ||
18104 | |||
18105 | #undef dlopen | ||
18106 | |||
18107 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
18108 | #ifdef __cplusplus | ||
18109 | extern "C" | ||
18110 | { | ||
18111 | #endif | ||
18112 | /* We use char because int might match the return type of a gcc2 | ||
18113 | builtin and then its argument prototype would still apply. */ | ||
18114 | char dlopen (); | ||
18115 | /* The GNU C library defines this for functions which it implements | ||
18116 | to always fail with ENOSYS. Some functions are actually named | ||
18117 | something starting with __ and the normal name is an alias. */ | ||
18118 | #if defined (__stub_dlopen) || defined (__stub___dlopen) | ||
18119 | choke me | ||
18120 | #else | ||
18121 | char (*f) () = dlopen; | ||
18122 | #endif | ||
18123 | #ifdef __cplusplus | ||
18124 | } | ||
18125 | #endif | ||
18126 | |||
18127 | int | ||
18128 | main () | ||
18129 | { | ||
18130 | return f != dlopen; | ||
18131 | ; | ||
18132 | return 0; | ||
18133 | } | ||
18134 | _ACEOF | ||
18135 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
18136 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
18137 | (eval $ac_link) 2>conftest.er1 | ||
18138 | ac_status=$? | ||
18139 | grep -v '^ *+' conftest.er1 >conftest.err | ||
18140 | rm -f conftest.er1 | ||
18141 | cat conftest.err >&5 | ||
18142 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18143 | (exit $ac_status); } && | ||
18144 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
18145 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
18146 | (eval $ac_try) 2>&5 | ||
18147 | ac_status=$? | ||
18148 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18149 | (exit $ac_status); }; } && | ||
18150 | { ac_try='test -s conftest$ac_exeext' | ||
18151 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
18152 | (eval $ac_try) 2>&5 | ||
18153 | ac_status=$? | ||
18154 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18155 | (exit $ac_status); }; }; then | ||
18156 | ac_cv_func_dlopen=yes | ||
18157 | else | ||
18158 | echo "$as_me: failed program was:" >&5 | ||
18159 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
18160 | |||
18161 | ac_cv_func_dlopen=no | ||
18162 | fi | ||
18163 | rm -f conftest.err conftest.$ac_objext \ | ||
18164 | conftest$ac_exeext conftest.$ac_ext | ||
18165 | fi | ||
18166 | echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 | ||
18167 | echo "${ECHO_T}$ac_cv_func_dlopen" >&6 | ||
18168 | if test $ac_cv_func_dlopen = yes; then | ||
18169 | lt_cv_dlopen="dlopen" | ||
18170 | else | ||
18171 | echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 | ||
18172 | echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 | ||
18173 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then | ||
18174 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
18175 | else | ||
18176 | ac_check_lib_save_LIBS=$LIBS | ||
18177 | LIBS="-ldl $LIBS" | ||
18178 | cat >conftest.$ac_ext <<_ACEOF | ||
18179 | /* confdefs.h. */ | ||
18180 | _ACEOF | ||
18181 | cat confdefs.h >>conftest.$ac_ext | ||
18182 | cat >>conftest.$ac_ext <<_ACEOF | ||
18183 | /* end confdefs.h. */ | ||
18184 | |||
18185 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
18186 | #ifdef __cplusplus | ||
18187 | extern "C" | ||
18188 | #endif | ||
18189 | /* We use char because int might match the return type of a gcc2 | ||
18190 | builtin and then its argument prototype would still apply. */ | ||
18191 | char dlopen (); | ||
18192 | int | ||
18193 | main () | ||
18194 | { | ||
18195 | dlopen (); | ||
18196 | ; | ||
18197 | return 0; | ||
18198 | } | ||
18199 | _ACEOF | ||
18200 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
18201 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
18202 | (eval $ac_link) 2>conftest.er1 | ||
18203 | ac_status=$? | ||
18204 | grep -v '^ *+' conftest.er1 >conftest.err | ||
18205 | rm -f conftest.er1 | ||
18206 | cat conftest.err >&5 | ||
18207 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18208 | (exit $ac_status); } && | ||
18209 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
18210 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
18211 | (eval $ac_try) 2>&5 | ||
18212 | ac_status=$? | ||
18213 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18214 | (exit $ac_status); }; } && | ||
18215 | { ac_try='test -s conftest$ac_exeext' | ||
18216 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
18217 | (eval $ac_try) 2>&5 | ||
18218 | ac_status=$? | ||
18219 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18220 | (exit $ac_status); }; }; then | ||
18221 | ac_cv_lib_dl_dlopen=yes | ||
18222 | else | ||
18223 | echo "$as_me: failed program was:" >&5 | ||
18224 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
18225 | |||
18226 | ac_cv_lib_dl_dlopen=no | ||
18227 | fi | ||
18228 | rm -f conftest.err conftest.$ac_objext \ | ||
18229 | conftest$ac_exeext conftest.$ac_ext | ||
18230 | LIBS=$ac_check_lib_save_LIBS | ||
18231 | fi | ||
18232 | echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 | ||
18233 | echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 | ||
18234 | if test $ac_cv_lib_dl_dlopen = yes; then | ||
18235 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" | ||
18236 | else | ||
18237 | echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 | ||
18238 | echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 | ||
18239 | if test "${ac_cv_lib_svld_dlopen+set}" = set; then | ||
18240 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
18241 | else | ||
18242 | ac_check_lib_save_LIBS=$LIBS | ||
18243 | LIBS="-lsvld $LIBS" | ||
18244 | cat >conftest.$ac_ext <<_ACEOF | ||
18245 | /* confdefs.h. */ | ||
18246 | _ACEOF | ||
18247 | cat confdefs.h >>conftest.$ac_ext | ||
18248 | cat >>conftest.$ac_ext <<_ACEOF | ||
18249 | /* end confdefs.h. */ | ||
18250 | |||
18251 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
18252 | #ifdef __cplusplus | ||
18253 | extern "C" | ||
18254 | #endif | ||
18255 | /* We use char because int might match the return type of a gcc2 | ||
18256 | builtin and then its argument prototype would still apply. */ | ||
18257 | char dlopen (); | ||
18258 | int | ||
18259 | main () | ||
18260 | { | ||
18261 | dlopen (); | ||
18262 | ; | ||
18263 | return 0; | ||
18264 | } | ||
18265 | _ACEOF | ||
18266 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
18267 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
18268 | (eval $ac_link) 2>conftest.er1 | ||
18269 | ac_status=$? | ||
18270 | grep -v '^ *+' conftest.er1 >conftest.err | ||
18271 | rm -f conftest.er1 | ||
18272 | cat conftest.err >&5 | ||
18273 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18274 | (exit $ac_status); } && | ||
18275 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
18276 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
18277 | (eval $ac_try) 2>&5 | ||
18278 | ac_status=$? | ||
18279 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18280 | (exit $ac_status); }; } && | ||
18281 | { ac_try='test -s conftest$ac_exeext' | ||
18282 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
18283 | (eval $ac_try) 2>&5 | ||
18284 | ac_status=$? | ||
18285 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18286 | (exit $ac_status); }; }; then | ||
18287 | ac_cv_lib_svld_dlopen=yes | ||
18288 | else | ||
18289 | echo "$as_me: failed program was:" >&5 | ||
18290 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
18291 | |||
18292 | ac_cv_lib_svld_dlopen=no | ||
18293 | fi | ||
18294 | rm -f conftest.err conftest.$ac_objext \ | ||
18295 | conftest$ac_exeext conftest.$ac_ext | ||
18296 | LIBS=$ac_check_lib_save_LIBS | ||
18297 | fi | ||
18298 | echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 | ||
18299 | echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 | ||
18300 | if test $ac_cv_lib_svld_dlopen = yes; then | ||
18301 | lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" | ||
18302 | else | ||
18303 | echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 | ||
18304 | echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 | ||
18305 | if test "${ac_cv_lib_dld_dld_link+set}" = set; then | ||
18306 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
18307 | else | ||
18308 | ac_check_lib_save_LIBS=$LIBS | ||
18309 | LIBS="-ldld $LIBS" | ||
18310 | cat >conftest.$ac_ext <<_ACEOF | ||
18311 | /* confdefs.h. */ | ||
18312 | _ACEOF | ||
18313 | cat confdefs.h >>conftest.$ac_ext | ||
18314 | cat >>conftest.$ac_ext <<_ACEOF | ||
18315 | /* end confdefs.h. */ | ||
18316 | |||
18317 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
18318 | #ifdef __cplusplus | ||
18319 | extern "C" | ||
18320 | #endif | ||
18321 | /* We use char because int might match the return type of a gcc2 | ||
18322 | builtin and then its argument prototype would still apply. */ | ||
18323 | char dld_link (); | ||
18324 | int | ||
18325 | main () | ||
18326 | { | ||
18327 | dld_link (); | ||
18328 | ; | ||
18329 | return 0; | ||
18330 | } | ||
18331 | _ACEOF | ||
18332 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
18333 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
18334 | (eval $ac_link) 2>conftest.er1 | ||
18335 | ac_status=$? | ||
18336 | grep -v '^ *+' conftest.er1 >conftest.err | ||
18337 | rm -f conftest.er1 | ||
18338 | cat conftest.err >&5 | ||
18339 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18340 | (exit $ac_status); } && | ||
18341 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
18342 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
18343 | (eval $ac_try) 2>&5 | ||
18344 | ac_status=$? | ||
18345 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18346 | (exit $ac_status); }; } && | ||
18347 | { ac_try='test -s conftest$ac_exeext' | ||
18348 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
18349 | (eval $ac_try) 2>&5 | ||
18350 | ac_status=$? | ||
18351 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18352 | (exit $ac_status); }; }; then | ||
18353 | ac_cv_lib_dld_dld_link=yes | ||
18354 | else | ||
18355 | echo "$as_me: failed program was:" >&5 | ||
18356 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
18357 | |||
18358 | ac_cv_lib_dld_dld_link=no | ||
18359 | fi | ||
18360 | rm -f conftest.err conftest.$ac_objext \ | ||
18361 | conftest$ac_exeext conftest.$ac_ext | ||
18362 | LIBS=$ac_check_lib_save_LIBS | ||
18363 | fi | ||
18364 | echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 | ||
18365 | echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 | ||
18366 | if test $ac_cv_lib_dld_dld_link = yes; then | ||
18367 | lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" | ||
18368 | fi | ||
18369 | |||
18370 | |||
18371 | fi | ||
18372 | |||
18373 | |||
18374 | fi | ||
18375 | |||
18376 | |||
18377 | fi | ||
18378 | |||
18379 | |||
18380 | fi | ||
18381 | |||
18382 | |||
18383 | fi | ||
18384 | |||
18385 | ;; | ||
18386 | esac | ||
18387 | |||
18388 | if test "x$lt_cv_dlopen" != xno; then | ||
18389 | enable_dlopen=yes | ||
18390 | else | ||
18391 | enable_dlopen=no | ||
18392 | fi | ||
18393 | |||
18394 | case $lt_cv_dlopen in | ||
18395 | dlopen) | ||
18396 | save_CPPFLAGS="$CPPFLAGS" | ||
18397 | test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | ||
18398 | |||
18399 | save_LDFLAGS="$LDFLAGS" | ||
18400 | eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | ||
18401 | |||
18402 | save_LIBS="$LIBS" | ||
18403 | LIBS="$lt_cv_dlopen_libs $LIBS" | ||
18404 | |||
18405 | echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 | ||
18406 | echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 | ||
18407 | if test "${lt_cv_dlopen_self+set}" = set; then | ||
18408 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
18409 | else | ||
18410 | if test "$cross_compiling" = yes; then : | ||
18411 | lt_cv_dlopen_self=cross | ||
18412 | else | ||
18413 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
18414 | lt_status=$lt_dlunknown | ||
18415 | cat > conftest.$ac_ext <<EOF | ||
18416 | #line 18416 "configure" | ||
18417 | #include "confdefs.h" | ||
18418 | |||
18419 | #if HAVE_DLFCN_H | ||
18420 | #include <dlfcn.h> | ||
18421 | #endif | ||
18422 | |||
18423 | #include <stdio.h> | ||
18424 | |||
18425 | #ifdef RTLD_GLOBAL | ||
18426 | # define LT_DLGLOBAL RTLD_GLOBAL | ||
18427 | #else | ||
18428 | # ifdef DL_GLOBAL | ||
18429 | # define LT_DLGLOBAL DL_GLOBAL | ||
18430 | # else | ||
18431 | # define LT_DLGLOBAL 0 | ||
18432 | # endif | ||
18433 | #endif | ||
18434 | |||
18435 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | ||
18436 | find out it does not work in some platform. */ | ||
18437 | #ifndef LT_DLLAZY_OR_NOW | ||
18438 | # ifdef RTLD_LAZY | ||
18439 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | ||
18440 | # else | ||
18441 | # ifdef DL_LAZY | ||
18442 | # define LT_DLLAZY_OR_NOW DL_LAZY | ||
18443 | # else | ||
18444 | # ifdef RTLD_NOW | ||
18445 | # define LT_DLLAZY_OR_NOW RTLD_NOW | ||
18446 | # else | ||
18447 | # ifdef DL_NOW | ||
18448 | # define LT_DLLAZY_OR_NOW DL_NOW | ||
18449 | # else | ||
18450 | # define LT_DLLAZY_OR_NOW 0 | ||
18451 | # endif | ||
18452 | # endif | ||
18453 | # endif | ||
18454 | # endif | ||
18455 | #endif | ||
18456 | |||
18457 | #ifdef __cplusplus | ||
18458 | extern "C" void exit (int); | ||
18459 | #endif | ||
18460 | |||
18461 | void fnord() { int i=42;} | ||
18462 | int main () | ||
18463 | { | ||
18464 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
18465 | int status = $lt_dlunknown; | ||
18466 | |||
18467 | if (self) | ||
18468 | { | ||
18469 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | ||
18470 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | ||
18471 | /* dlclose (self); */ | ||
18472 | } | ||
18473 | |||
18474 | exit (status); | ||
18475 | } | ||
18476 | EOF | ||
18477 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
18478 | (eval $ac_link) 2>&5 | ||
18479 | ac_status=$? | ||
18480 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18481 | (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then | ||
18482 | (./conftest; exit; ) 2>/dev/null | ||
18483 | lt_status=$? | ||
18484 | case x$lt_status in | ||
18485 | x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; | ||
18486 | x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; | ||
18487 | x$lt_unknown|x*) lt_cv_dlopen_self=no ;; | ||
18488 | esac | ||
18489 | else : | ||
18490 | # compilation failed | ||
18491 | lt_cv_dlopen_self=no | ||
18492 | fi | ||
18493 | fi | ||
18494 | rm -fr conftest* | ||
18495 | |||
18496 | |||
18497 | fi | ||
18498 | echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 | ||
18499 | echo "${ECHO_T}$lt_cv_dlopen_self" >&6 | ||
18500 | |||
18501 | if test "x$lt_cv_dlopen_self" = xyes; then | ||
18502 | LDFLAGS="$LDFLAGS $link_static_flag" | ||
18503 | echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 | ||
18504 | echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 | ||
18505 | if test "${lt_cv_dlopen_self_static+set}" = set; then | ||
18506 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
18507 | else | ||
18508 | if test "$cross_compiling" = yes; then : | ||
18509 | lt_cv_dlopen_self_static=cross | ||
18510 | else | ||
18511 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
18512 | lt_status=$lt_dlunknown | ||
18513 | cat > conftest.$ac_ext <<EOF | ||
18514 | #line 18514 "configure" | ||
18515 | #include "confdefs.h" | ||
18516 | |||
18517 | #if HAVE_DLFCN_H | ||
18518 | #include <dlfcn.h> | ||
18519 | #endif | ||
18520 | |||
18521 | #include <stdio.h> | ||
18522 | |||
18523 | #ifdef RTLD_GLOBAL | ||
18524 | # define LT_DLGLOBAL RTLD_GLOBAL | ||
18525 | #else | ||
18526 | # ifdef DL_GLOBAL | ||
18527 | # define LT_DLGLOBAL DL_GLOBAL | ||
18528 | # else | ||
18529 | # define LT_DLGLOBAL 0 | ||
18530 | # endif | ||
18531 | #endif | ||
18532 | |||
18533 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | ||
18534 | find out it does not work in some platform. */ | ||
18535 | #ifndef LT_DLLAZY_OR_NOW | ||
18536 | # ifdef RTLD_LAZY | ||
18537 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | ||
18538 | # else | ||
18539 | # ifdef DL_LAZY | ||
18540 | # define LT_DLLAZY_OR_NOW DL_LAZY | ||
18541 | # else | ||
18542 | # ifdef RTLD_NOW | ||
18543 | # define LT_DLLAZY_OR_NOW RTLD_NOW | ||
18544 | # else | ||
18545 | # ifdef DL_NOW | ||
18546 | # define LT_DLLAZY_OR_NOW DL_NOW | ||
18547 | # else | ||
18548 | # define LT_DLLAZY_OR_NOW 0 | ||
18549 | # endif | ||
18550 | # endif | ||
18551 | # endif | ||
18552 | # endif | ||
18553 | #endif | ||
18554 | |||
18555 | #ifdef __cplusplus | ||
18556 | extern "C" void exit (int); | ||
18557 | #endif | ||
18558 | |||
18559 | void fnord() { int i=42;} | ||
18560 | int main () | ||
18561 | { | ||
18562 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
18563 | int status = $lt_dlunknown; | ||
18564 | |||
18565 | if (self) | ||
18566 | { | ||
18567 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | ||
18568 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | ||
18569 | /* dlclose (self); */ | ||
18570 | } | ||
18571 | |||
18572 | exit (status); | ||
18573 | } | ||
18574 | EOF | ||
18575 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
18576 | (eval $ac_link) 2>&5 | ||
18577 | ac_status=$? | ||
18578 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
18579 | (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then | ||
18580 | (./conftest; exit; ) 2>/dev/null | ||
18581 | lt_status=$? | ||
18582 | case x$lt_status in | ||
18583 | x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; | ||
18584 | x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; | ||
18585 | x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; | ||
18586 | esac | ||
18587 | else : | ||
18588 | # compilation failed | ||
18589 | lt_cv_dlopen_self_static=no | ||
18590 | fi | ||
18591 | fi | ||
18592 | rm -fr conftest* | ||
18593 | |||
18594 | |||
18595 | fi | ||
18596 | echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 | ||
18597 | echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 | ||
18598 | fi | ||
18599 | |||
18600 | CPPFLAGS="$save_CPPFLAGS" | ||
18601 | LDFLAGS="$save_LDFLAGS" | ||
18602 | LIBS="$save_LIBS" | ||
18603 | ;; | ||
18604 | esac | ||
18605 | |||
18606 | case $lt_cv_dlopen_self in | ||
18607 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | ||
18608 | *) enable_dlopen_self=unknown ;; | ||
18609 | esac | ||
18610 | |||
18611 | case $lt_cv_dlopen_self_static in | ||
18612 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | ||
18613 | *) enable_dlopen_self_static=unknown ;; | ||
18614 | esac | ||
18615 | fi | ||
18616 | |||
18617 | |||
18618 | # The else clause should only fire when bootstrapping the | ||
18619 | # libtool distribution, otherwise you forgot to ship ltmain.sh | ||
18620 | # with your package, and you will get complaints that there are | ||
18621 | # no rules to generate ltmain.sh. | ||
18622 | if test -f "$ltmain"; then | ||
18623 | # See if we are running on zsh, and set the options which allow our commands through | ||
18624 | # without removal of \ escapes. | ||
18625 | if test -n "${ZSH_VERSION+set}" ; then | ||
18626 | setopt NO_GLOB_SUBST | ||
18627 | fi | ||
18628 | # Now quote all the things that may contain metacharacters while being | ||
18629 | # careful not to overquote the AC_SUBSTed values. We take copies of the | ||
18630 | # variables and quote the copies for generation of the libtool script. | ||
18631 | for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ | ||
18632 | SED SHELL STRIP \ | ||
18633 | libname_spec library_names_spec soname_spec extract_expsyms_cmds \ | ||
18634 | old_striplib striplib file_magic_cmd finish_cmds finish_eval \ | ||
18635 | deplibs_check_method reload_flag reload_cmds need_locks \ | ||
18636 | lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ | ||
18637 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
18638 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | ||
18639 | old_postinstall_cmds old_postuninstall_cmds \ | ||
18640 | compiler_GCJ \ | ||
18641 | CC_GCJ \ | ||
18642 | LD_GCJ \ | ||
18643 | lt_prog_compiler_wl_GCJ \ | ||
18644 | lt_prog_compiler_pic_GCJ \ | ||
18645 | lt_prog_compiler_static_GCJ \ | ||
18646 | lt_prog_compiler_no_builtin_flag_GCJ \ | ||
18647 | export_dynamic_flag_spec_GCJ \ | ||
18648 | thread_safe_flag_spec_GCJ \ | ||
18649 | whole_archive_flag_spec_GCJ \ | ||
18650 | enable_shared_with_static_runtimes_GCJ \ | ||
18651 | old_archive_cmds_GCJ \ | ||
18652 | old_archive_from_new_cmds_GCJ \ | ||
18653 | predep_objects_GCJ \ | ||
18654 | postdep_objects_GCJ \ | ||
18655 | predeps_GCJ \ | ||
18656 | postdeps_GCJ \ | ||
18657 | compiler_lib_search_path_GCJ \ | ||
18658 | archive_cmds_GCJ \ | ||
18659 | archive_expsym_cmds_GCJ \ | ||
18660 | postinstall_cmds_GCJ \ | ||
18661 | postuninstall_cmds_GCJ \ | ||
18662 | old_archive_from_expsyms_cmds_GCJ \ | ||
18663 | allow_undefined_flag_GCJ \ | ||
18664 | no_undefined_flag_GCJ \ | ||
18665 | export_symbols_cmds_GCJ \ | ||
18666 | hardcode_libdir_flag_spec_GCJ \ | ||
18667 | hardcode_libdir_flag_spec_ld_GCJ \ | ||
18668 | hardcode_libdir_separator_GCJ \ | ||
18669 | hardcode_automatic_GCJ \ | ||
18670 | module_cmds_GCJ \ | ||
18671 | module_expsym_cmds_GCJ \ | ||
18672 | lt_cv_prog_compiler_c_o_GCJ \ | ||
18673 | exclude_expsyms_GCJ \ | ||
18674 | include_expsyms_GCJ; do | ||
18675 | |||
18676 | case $var in | ||
18677 | old_archive_cmds_GCJ | \ | ||
18678 | old_archive_from_new_cmds_GCJ | \ | ||
18679 | archive_cmds_GCJ | \ | ||
18680 | archive_expsym_cmds_GCJ | \ | ||
18681 | module_cmds_GCJ | \ | ||
18682 | module_expsym_cmds_GCJ | \ | ||
18683 | old_archive_from_expsyms_cmds_GCJ | \ | ||
18684 | export_symbols_cmds_GCJ | \ | ||
18685 | extract_expsyms_cmds | reload_cmds | finish_cmds | \ | ||
18686 | postinstall_cmds | postuninstall_cmds | \ | ||
18687 | old_postinstall_cmds | old_postuninstall_cmds | \ | ||
18688 | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | ||
18689 | # Double-quote double-evaled strings. | ||
18690 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" | ||
18691 | ;; | ||
18692 | *) | ||
18693 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" | ||
18694 | ;; | ||
18695 | esac | ||
18696 | done | ||
18697 | |||
18698 | case $lt_echo in | ||
18699 | *'\$0 --fallback-echo"') | ||
18700 | lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` | ||
18701 | ;; | ||
18702 | esac | ||
18703 | |||
18704 | cfgfile="$ofile" | ||
18705 | |||
18706 | cat <<__EOF__ >> "$cfgfile" | ||
18707 | # ### BEGIN LIBTOOL TAG CONFIG: $tagname | ||
18708 | |||
18709 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | ||
18710 | |||
18711 | # Shell to use when invoking shell scripts. | ||
18712 | SHELL=$lt_SHELL | ||
18713 | |||
18714 | # Whether or not to build shared libraries. | ||
18715 | build_libtool_libs=$enable_shared | ||
18716 | |||
18717 | # Whether or not to build static libraries. | ||
18718 | build_old_libs=$enable_static | ||
18719 | |||
18720 | # Whether or not to add -lc for building shared libraries. | ||
18721 | build_libtool_need_lc=$archive_cmds_need_lc_GCJ | ||
18722 | |||
18723 | # Whether or not to disallow shared libs when runtime libs are static | ||
18724 | allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ | ||
18725 | |||
18726 | # Whether or not to optimize for fast installation. | ||
18727 | fast_install=$enable_fast_install | ||
18728 | |||
18729 | # The host system. | ||
18730 | host_alias=$host_alias | ||
18731 | host=$host | ||
18732 | |||
18733 | # An echo program that does not interpret backslashes. | ||
18734 | echo=$lt_echo | ||
18735 | |||
18736 | # The archiver. | ||
18737 | AR=$lt_AR | ||
18738 | AR_FLAGS=$lt_AR_FLAGS | ||
18739 | |||
18740 | # A C compiler. | ||
18741 | LTCC=$lt_LTCC | ||
18742 | |||
18743 | # A language-specific compiler. | ||
18744 | CC=$lt_compiler_GCJ | ||
18745 | |||
18746 | # Is the compiler the GNU C compiler? | ||
18747 | with_gcc=$GCC_GCJ | ||
18748 | |||
18749 | # An ERE matcher. | ||
18750 | EGREP=$lt_EGREP | ||
18751 | |||
18752 | # The linker used to build libraries. | ||
18753 | LD=$lt_LD_GCJ | ||
18754 | |||
18755 | # Whether we need hard or soft links. | ||
18756 | LN_S=$lt_LN_S | ||
18757 | |||
18758 | # A BSD-compatible nm program. | ||
18759 | NM=$lt_NM | ||
18760 | |||
18761 | # A symbol stripping program | ||
18762 | STRIP=$lt_STRIP | ||
18763 | |||
18764 | # Used to examine libraries when file_magic_cmd begins "file" | ||
18765 | MAGIC_CMD=$MAGIC_CMD | ||
18766 | |||
18767 | # Used on cygwin: DLL creation program. | ||
18768 | DLLTOOL="$DLLTOOL" | ||
18769 | |||
18770 | # Used on cygwin: object dumper. | ||
18771 | OBJDUMP="$OBJDUMP" | ||
18772 | |||
18773 | # Used on cygwin: assembler. | ||
18774 | AS="$AS" | ||
18775 | |||
18776 | # The name of the directory that contains temporary libtool files. | ||
18777 | objdir=$objdir | ||
18778 | |||
18779 | # How to create reloadable object files. | ||
18780 | reload_flag=$lt_reload_flag | ||
18781 | reload_cmds=$lt_reload_cmds | ||
18782 | |||
18783 | # How to pass a linker flag through the compiler. | ||
18784 | wl=$lt_lt_prog_compiler_wl_GCJ | ||
18785 | |||
18786 | # Object file suffix (normally "o"). | ||
18787 | objext="$ac_objext" | ||
18788 | |||
18789 | # Old archive suffix (normally "a"). | ||
18790 | libext="$libext" | ||
18791 | |||
18792 | # Shared library suffix (normally ".so"). | ||
18793 | shrext_cmds='$shrext_cmds' | ||
18794 | |||
18795 | # Executable file suffix (normally ""). | ||
18796 | exeext="$exeext" | ||
18797 | |||
18798 | # Additional compiler flags for building library objects. | ||
18799 | pic_flag=$lt_lt_prog_compiler_pic_GCJ | ||
18800 | pic_mode=$pic_mode | ||
18801 | |||
18802 | # What is the maximum length of a command? | ||
18803 | max_cmd_len=$lt_cv_sys_max_cmd_len | ||
18804 | |||
18805 | # Does compiler simultaneously support -c and -o options? | ||
18806 | compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ | ||
18807 | |||
18808 | # Must we lock files when doing compilation ? | ||
18809 | need_locks=$lt_need_locks | ||
18810 | |||
18811 | # Do we need the lib prefix for modules? | ||
18812 | need_lib_prefix=$need_lib_prefix | ||
18813 | |||
18814 | # Do we need a version for libraries? | ||
18815 | need_version=$need_version | ||
18816 | |||
18817 | # Whether dlopen is supported. | ||
18818 | dlopen_support=$enable_dlopen | ||
18819 | |||
18820 | # Whether dlopen of programs is supported. | ||
18821 | dlopen_self=$enable_dlopen_self | ||
18822 | |||
18823 | # Whether dlopen of statically linked programs is supported. | ||
18824 | dlopen_self_static=$enable_dlopen_self_static | ||
18825 | |||
18826 | # Compiler flag to prevent dynamic linking. | ||
18827 | link_static_flag=$lt_lt_prog_compiler_static_GCJ | ||
18828 | |||
18829 | # Compiler flag to turn off builtin functions. | ||
18830 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ | ||
18831 | |||
18832 | # Compiler flag to allow reflexive dlopens. | ||
18833 | export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ | ||
18834 | |||
18835 | # Compiler flag to generate shared objects directly from archives. | ||
18836 | whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ | ||
18837 | |||
18838 | # Compiler flag to generate thread-safe objects. | ||
18839 | thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ | ||
18840 | |||
18841 | # Library versioning type. | ||
18842 | version_type=$version_type | ||
18843 | |||
18844 | # Format of library name prefix. | ||
18845 | libname_spec=$lt_libname_spec | ||
18846 | |||
18847 | # List of archive names. First name is the real one, the rest are links. | ||
18848 | # The last name is the one that the linker finds with -lNAME. | ||
18849 | library_names_spec=$lt_library_names_spec | ||
18850 | |||
18851 | # The coded name of the library, if different from the real name. | ||
18852 | soname_spec=$lt_soname_spec | ||
18853 | |||
18854 | # Commands used to build and install an old-style archive. | ||
18855 | RANLIB=$lt_RANLIB | ||
18856 | old_archive_cmds=$lt_old_archive_cmds_GCJ | ||
18857 | old_postinstall_cmds=$lt_old_postinstall_cmds | ||
18858 | old_postuninstall_cmds=$lt_old_postuninstall_cmds | ||
18859 | |||
18860 | # Create an old-style archive from a shared archive. | ||
18861 | old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ | ||
18862 | |||
18863 | # Create a temporary old-style archive to link instead of a shared archive. | ||
18864 | old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ | ||
18865 | |||
18866 | # Commands used to build and install a shared archive. | ||
18867 | archive_cmds=$lt_archive_cmds_GCJ | ||
18868 | archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ | ||
18869 | postinstall_cmds=$lt_postinstall_cmds | ||
18870 | postuninstall_cmds=$lt_postuninstall_cmds | ||
18871 | |||
18872 | # Commands used to build a loadable module (assumed same as above if empty) | ||
18873 | module_cmds=$lt_module_cmds_GCJ | ||
18874 | module_expsym_cmds=$lt_module_expsym_cmds_GCJ | ||
18875 | |||
18876 | # Commands to strip libraries. | ||
18877 | old_striplib=$lt_old_striplib | ||
18878 | striplib=$lt_striplib | ||
18879 | |||
18880 | # Dependencies to place before the objects being linked to create a | ||
18881 | # shared library. | ||
18882 | predep_objects=$lt_predep_objects_GCJ | ||
18883 | |||
18884 | # Dependencies to place after the objects being linked to create a | ||
18885 | # shared library. | ||
18886 | postdep_objects=$lt_postdep_objects_GCJ | ||
18887 | |||
18888 | # Dependencies to place before the objects being linked to create a | ||
18889 | # shared library. | ||
18890 | predeps=$lt_predeps_GCJ | ||
18891 | |||
18892 | # Dependencies to place after the objects being linked to create a | ||
18893 | # shared library. | ||
18894 | postdeps=$lt_postdeps_GCJ | ||
18895 | |||
18896 | # The library search path used internally by the compiler when linking | ||
18897 | # a shared library. | ||
18898 | compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ | ||
18899 | |||
18900 | # Method to check whether dependent libraries are shared objects. | ||
18901 | deplibs_check_method=$lt_deplibs_check_method | ||
18902 | |||
18903 | # Command to use when deplibs_check_method == file_magic. | ||
18904 | file_magic_cmd=$lt_file_magic_cmd | ||
18905 | |||
18906 | # Flag that allows shared libraries with undefined symbols to be built. | ||
18907 | allow_undefined_flag=$lt_allow_undefined_flag_GCJ | ||
18908 | |||
18909 | # Flag that forces no undefined symbols. | ||
18910 | no_undefined_flag=$lt_no_undefined_flag_GCJ | ||
18911 | |||
18912 | # Commands used to finish a libtool library installation in a directory. | ||
18913 | finish_cmds=$lt_finish_cmds | ||
18914 | |||
18915 | # Same as above, but a single script fragment to be evaled but not shown. | ||
18916 | finish_eval=$lt_finish_eval | ||
18917 | |||
18918 | # Take the output of nm and produce a listing of raw symbols and C names. | ||
18919 | global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe | ||
18920 | |||
18921 | # Transform the output of nm in a proper C declaration | ||
18922 | global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl | ||
18923 | |||
18924 | # Transform the output of nm in a C name address pair | ||
18925 | global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address | ||
18926 | |||
18927 | # This is the shared library runtime path variable. | ||
18928 | runpath_var=$runpath_var | ||
18929 | |||
18930 | # This is the shared library path variable. | ||
18931 | shlibpath_var=$shlibpath_var | ||
18932 | |||
18933 | # Is shlibpath searched before the hard-coded library search path? | ||
18934 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath | ||
18935 | |||
18936 | # How to hardcode a shared library path into an executable. | ||
18937 | hardcode_action=$hardcode_action_GCJ | ||
18938 | |||
18939 | # Whether we should hardcode library paths into libraries. | ||
18940 | hardcode_into_libs=$hardcode_into_libs | ||
18941 | |||
18942 | # Flag to hardcode \$libdir into a binary during linking. | ||
18943 | # This must work even if \$libdir does not exist. | ||
18944 | hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ | ||
18945 | |||
18946 | # If ld is used when linking, flag to hardcode \$libdir into | ||
18947 | # a binary during linking. This must work even if \$libdir does | ||
18948 | # not exist. | ||
18949 | hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ | ||
18950 | |||
18951 | # Whether we need a single -rpath flag with a separated argument. | ||
18952 | hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ | ||
18953 | |||
18954 | # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the | ||
18955 | # resulting binary. | ||
18956 | hardcode_direct=$hardcode_direct_GCJ | ||
18957 | |||
18958 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | ||
18959 | # resulting binary. | ||
18960 | hardcode_minus_L=$hardcode_minus_L_GCJ | ||
18961 | |||
18962 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | ||
18963 | # the resulting binary. | ||
18964 | hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ | ||
18965 | |||
18966 | # Set to yes if building a shared library automatically hardcodes DIR into the library | ||
18967 | # and all subsequent libraries and executables linked against it. | ||
18968 | hardcode_automatic=$hardcode_automatic_GCJ | ||
18969 | |||
18970 | # Variables whose values should be saved in libtool wrapper scripts and | ||
18971 | # restored at relink time. | ||
18972 | variables_saved_for_relink="$variables_saved_for_relink" | ||
18973 | |||
18974 | # Whether libtool must link a program against all its dependency libraries. | ||
18975 | link_all_deplibs=$link_all_deplibs_GCJ | ||
18976 | |||
18977 | # Compile-time system search path for libraries | ||
18978 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec | ||
18979 | |||
18980 | # Run-time system search path for libraries | ||
18981 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec | ||
18982 | |||
18983 | # Fix the shell variable \$srcfile for the compiler. | ||
18984 | fix_srcfile_path="$fix_srcfile_path_GCJ" | ||
18985 | |||
18986 | # Set to yes if exported symbols are required. | ||
18987 | always_export_symbols=$always_export_symbols_GCJ | ||
18988 | |||
18989 | # The commands to list exported symbols. | ||
18990 | export_symbols_cmds=$lt_export_symbols_cmds_GCJ | ||
18991 | |||
18992 | # The commands to extract the exported symbol list from a shared archive. | ||
18993 | extract_expsyms_cmds=$lt_extract_expsyms_cmds | ||
18994 | |||
18995 | # Symbols that should not be listed in the preloaded symbols. | ||
18996 | exclude_expsyms=$lt_exclude_expsyms_GCJ | ||
18997 | |||
18998 | # Symbols that must always be exported. | ||
18999 | include_expsyms=$lt_include_expsyms_GCJ | ||
19000 | |||
19001 | # ### END LIBTOOL TAG CONFIG: $tagname | ||
19002 | |||
19003 | __EOF__ | ||
19004 | |||
19005 | |||
19006 | else | ||
19007 | # If there is no Makefile yet, we rely on a make rule to execute | ||
19008 | # `config.status --recheck' to rerun these tests and create the | ||
19009 | # libtool script then. | ||
19010 | ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` | ||
19011 | if test -f "$ltmain_in"; then | ||
19012 | test -f Makefile && make "$ltmain" | ||
19013 | fi | ||
19014 | fi | ||
19015 | |||
19016 | |||
19017 | ac_ext=c | ||
19018 | ac_cpp='$CPP $CPPFLAGS' | ||
19019 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
19020 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
19021 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
19022 | |||
19023 | CC="$lt_save_CC" | ||
19024 | |||
19025 | else | ||
19026 | tagname="" | ||
19027 | fi | ||
19028 | ;; | ||
19029 | |||
19030 | RC) | ||
19031 | |||
19032 | |||
19033 | |||
19034 | # Source file extension for RC test sources. | ||
19035 | ac_ext=rc | ||
19036 | |||
19037 | # Object file extension for compiled RC test sources. | ||
19038 | objext=o | ||
19039 | objext_RC=$objext | ||
19040 | |||
19041 | # Code to be used in simple compile tests | ||
19042 | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' | ||
19043 | |||
19044 | # Code to be used in simple link tests | ||
19045 | lt_simple_link_test_code="$lt_simple_compile_test_code" | ||
19046 | |||
19047 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. | ||
19048 | |||
19049 | # If no C compiler was specified, use CC. | ||
19050 | LTCC=${LTCC-"$CC"} | ||
19051 | |||
19052 | # Allow CC to be a program name with arguments. | ||
19053 | compiler=$CC | ||
19054 | |||
19055 | |||
19056 | # Allow CC to be a program name with arguments. | ||
19057 | lt_save_CC="$CC" | ||
19058 | CC=${RC-"windres"} | ||
19059 | compiler=$CC | ||
19060 | compiler_RC=$CC | ||
19061 | lt_cv_prog_compiler_c_o_RC=yes | ||
19062 | |||
19063 | # The else clause should only fire when bootstrapping the | ||
19064 | # libtool distribution, otherwise you forgot to ship ltmain.sh | ||
19065 | # with your package, and you will get complaints that there are | ||
19066 | # no rules to generate ltmain.sh. | ||
19067 | if test -f "$ltmain"; then | ||
19068 | # See if we are running on zsh, and set the options which allow our commands through | ||
19069 | # without removal of \ escapes. | ||
19070 | if test -n "${ZSH_VERSION+set}" ; then | ||
19071 | setopt NO_GLOB_SUBST | ||
19072 | fi | ||
19073 | # Now quote all the things that may contain metacharacters while being | ||
19074 | # careful not to overquote the AC_SUBSTed values. We take copies of the | ||
19075 | # variables and quote the copies for generation of the libtool script. | ||
19076 | for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ | ||
19077 | SED SHELL STRIP \ | ||
19078 | libname_spec library_names_spec soname_spec extract_expsyms_cmds \ | ||
19079 | old_striplib striplib file_magic_cmd finish_cmds finish_eval \ | ||
19080 | deplibs_check_method reload_flag reload_cmds need_locks \ | ||
19081 | lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ | ||
19082 | lt_cv_sys_global_symbol_to_c_name_address \ | ||
19083 | sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | ||
19084 | old_postinstall_cmds old_postuninstall_cmds \ | ||
19085 | compiler_RC \ | ||
19086 | CC_RC \ | ||
19087 | LD_RC \ | ||
19088 | lt_prog_compiler_wl_RC \ | ||
19089 | lt_prog_compiler_pic_RC \ | ||
19090 | lt_prog_compiler_static_RC \ | ||
19091 | lt_prog_compiler_no_builtin_flag_RC \ | ||
19092 | export_dynamic_flag_spec_RC \ | ||
19093 | thread_safe_flag_spec_RC \ | ||
19094 | whole_archive_flag_spec_RC \ | ||
19095 | enable_shared_with_static_runtimes_RC \ | ||
19096 | old_archive_cmds_RC \ | ||
19097 | old_archive_from_new_cmds_RC \ | ||
19098 | predep_objects_RC \ | ||
19099 | postdep_objects_RC \ | ||
19100 | predeps_RC \ | ||
19101 | postdeps_RC \ | ||
19102 | compiler_lib_search_path_RC \ | ||
19103 | archive_cmds_RC \ | ||
19104 | archive_expsym_cmds_RC \ | ||
19105 | postinstall_cmds_RC \ | ||
19106 | postuninstall_cmds_RC \ | ||
19107 | old_archive_from_expsyms_cmds_RC \ | ||
19108 | allow_undefined_flag_RC \ | ||
19109 | no_undefined_flag_RC \ | ||
19110 | export_symbols_cmds_RC \ | ||
19111 | hardcode_libdir_flag_spec_RC \ | ||
19112 | hardcode_libdir_flag_spec_ld_RC \ | ||
19113 | hardcode_libdir_separator_RC \ | ||
19114 | hardcode_automatic_RC \ | ||
19115 | module_cmds_RC \ | ||
19116 | module_expsym_cmds_RC \ | ||
19117 | lt_cv_prog_compiler_c_o_RC \ | ||
19118 | exclude_expsyms_RC \ | ||
19119 | include_expsyms_RC; do | ||
19120 | |||
19121 | case $var in | ||
19122 | old_archive_cmds_RC | \ | ||
19123 | old_archive_from_new_cmds_RC | \ | ||
19124 | archive_cmds_RC | \ | ||
19125 | archive_expsym_cmds_RC | \ | ||
19126 | module_cmds_RC | \ | ||
19127 | module_expsym_cmds_RC | \ | ||
19128 | old_archive_from_expsyms_cmds_RC | \ | ||
19129 | export_symbols_cmds_RC | \ | ||
19130 | extract_expsyms_cmds | reload_cmds | finish_cmds | \ | ||
19131 | postinstall_cmds | postuninstall_cmds | \ | ||
19132 | old_postinstall_cmds | old_postuninstall_cmds | \ | ||
19133 | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | ||
19134 | # Double-quote double-evaled strings. | ||
19135 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" | ||
19136 | ;; | ||
19137 | *) | ||
19138 | eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" | ||
19139 | ;; | ||
19140 | esac | ||
19141 | done | ||
19142 | |||
19143 | case $lt_echo in | ||
19144 | *'\$0 --fallback-echo"') | ||
19145 | lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` | ||
19146 | ;; | ||
19147 | esac | ||
19148 | |||
19149 | cfgfile="$ofile" | ||
19150 | |||
19151 | cat <<__EOF__ >> "$cfgfile" | ||
19152 | # ### BEGIN LIBTOOL TAG CONFIG: $tagname | ||
19153 | |||
19154 | # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | ||
19155 | |||
19156 | # Shell to use when invoking shell scripts. | ||
19157 | SHELL=$lt_SHELL | ||
19158 | |||
19159 | # Whether or not to build shared libraries. | ||
19160 | build_libtool_libs=$enable_shared | ||
19161 | |||
19162 | # Whether or not to build static libraries. | ||
19163 | build_old_libs=$enable_static | ||
19164 | |||
19165 | # Whether or not to add -lc for building shared libraries. | ||
19166 | build_libtool_need_lc=$archive_cmds_need_lc_RC | ||
19167 | |||
19168 | # Whether or not to disallow shared libs when runtime libs are static | ||
19169 | allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC | ||
19170 | |||
19171 | # Whether or not to optimize for fast installation. | ||
19172 | fast_install=$enable_fast_install | ||
19173 | |||
19174 | # The host system. | ||
19175 | host_alias=$host_alias | ||
19176 | host=$host | ||
19177 | |||
19178 | # An echo program that does not interpret backslashes. | ||
19179 | echo=$lt_echo | ||
19180 | |||
19181 | # The archiver. | ||
19182 | AR=$lt_AR | ||
19183 | AR_FLAGS=$lt_AR_FLAGS | ||
19184 | |||
19185 | # A C compiler. | ||
19186 | LTCC=$lt_LTCC | ||
19187 | |||
19188 | # A language-specific compiler. | ||
19189 | CC=$lt_compiler_RC | ||
19190 | |||
19191 | # Is the compiler the GNU C compiler? | ||
19192 | with_gcc=$GCC_RC | ||
19193 | |||
19194 | # An ERE matcher. | ||
19195 | EGREP=$lt_EGREP | ||
19196 | |||
19197 | # The linker used to build libraries. | ||
19198 | LD=$lt_LD_RC | ||
19199 | |||
19200 | # Whether we need hard or soft links. | ||
19201 | LN_S=$lt_LN_S | ||
19202 | |||
19203 | # A BSD-compatible nm program. | ||
19204 | NM=$lt_NM | ||
19205 | |||
19206 | # A symbol stripping program | ||
19207 | STRIP=$lt_STRIP | ||
19208 | |||
19209 | # Used to examine libraries when file_magic_cmd begins "file" | ||
19210 | MAGIC_CMD=$MAGIC_CMD | ||
19211 | |||
19212 | # Used on cygwin: DLL creation program. | ||
19213 | DLLTOOL="$DLLTOOL" | ||
19214 | |||
19215 | # Used on cygwin: object dumper. | ||
19216 | OBJDUMP="$OBJDUMP" | ||
19217 | |||
19218 | # Used on cygwin: assembler. | ||
19219 | AS="$AS" | ||
19220 | |||
19221 | # The name of the directory that contains temporary libtool files. | ||
19222 | objdir=$objdir | ||
19223 | |||
19224 | # How to create reloadable object files. | ||
19225 | reload_flag=$lt_reload_flag | ||
19226 | reload_cmds=$lt_reload_cmds | ||
19227 | |||
19228 | # How to pass a linker flag through the compiler. | ||
19229 | wl=$lt_lt_prog_compiler_wl_RC | ||
19230 | |||
19231 | # Object file suffix (normally "o"). | ||
19232 | objext="$ac_objext" | ||
19233 | |||
19234 | # Old archive suffix (normally "a"). | ||
19235 | libext="$libext" | ||
19236 | |||
19237 | # Shared library suffix (normally ".so"). | ||
19238 | shrext_cmds='$shrext_cmds' | ||
19239 | |||
19240 | # Executable file suffix (normally ""). | ||
19241 | exeext="$exeext" | ||
19242 | |||
19243 | # Additional compiler flags for building library objects. | ||
19244 | pic_flag=$lt_lt_prog_compiler_pic_RC | ||
19245 | pic_mode=$pic_mode | ||
19246 | |||
19247 | # What is the maximum length of a command? | ||
19248 | max_cmd_len=$lt_cv_sys_max_cmd_len | ||
19249 | |||
19250 | # Does compiler simultaneously support -c and -o options? | ||
19251 | compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC | ||
19252 | |||
19253 | # Must we lock files when doing compilation ? | ||
19254 | need_locks=$lt_need_locks | ||
19255 | |||
19256 | # Do we need the lib prefix for modules? | ||
19257 | need_lib_prefix=$need_lib_prefix | ||
19258 | |||
19259 | # Do we need a version for libraries? | ||
19260 | need_version=$need_version | ||
19261 | |||
19262 | # Whether dlopen is supported. | ||
19263 | dlopen_support=$enable_dlopen | ||
19264 | |||
19265 | # Whether dlopen of programs is supported. | ||
19266 | dlopen_self=$enable_dlopen_self | ||
19267 | |||
19268 | # Whether dlopen of statically linked programs is supported. | ||
19269 | dlopen_self_static=$enable_dlopen_self_static | ||
19270 | |||
19271 | # Compiler flag to prevent dynamic linking. | ||
19272 | link_static_flag=$lt_lt_prog_compiler_static_RC | ||
19273 | |||
19274 | # Compiler flag to turn off builtin functions. | ||
19275 | no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC | ||
19276 | |||
19277 | # Compiler flag to allow reflexive dlopens. | ||
19278 | export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC | ||
19279 | |||
19280 | # Compiler flag to generate shared objects directly from archives. | ||
19281 | whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC | ||
19282 | |||
19283 | # Compiler flag to generate thread-safe objects. | ||
19284 | thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC | ||
19285 | |||
19286 | # Library versioning type. | ||
19287 | version_type=$version_type | ||
19288 | |||
19289 | # Format of library name prefix. | ||
19290 | libname_spec=$lt_libname_spec | ||
19291 | |||
19292 | # List of archive names. First name is the real one, the rest are links. | ||
19293 | # The last name is the one that the linker finds with -lNAME. | ||
19294 | library_names_spec=$lt_library_names_spec | ||
19295 | |||
19296 | # The coded name of the library, if different from the real name. | ||
19297 | soname_spec=$lt_soname_spec | ||
19298 | |||
19299 | # Commands used to build and install an old-style archive. | ||
19300 | RANLIB=$lt_RANLIB | ||
19301 | old_archive_cmds=$lt_old_archive_cmds_RC | ||
19302 | old_postinstall_cmds=$lt_old_postinstall_cmds | ||
19303 | old_postuninstall_cmds=$lt_old_postuninstall_cmds | ||
19304 | |||
19305 | # Create an old-style archive from a shared archive. | ||
19306 | old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC | ||
19307 | |||
19308 | # Create a temporary old-style archive to link instead of a shared archive. | ||
19309 | old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC | ||
19310 | |||
19311 | # Commands used to build and install a shared archive. | ||
19312 | archive_cmds=$lt_archive_cmds_RC | ||
19313 | archive_expsym_cmds=$lt_archive_expsym_cmds_RC | ||
19314 | postinstall_cmds=$lt_postinstall_cmds | ||
19315 | postuninstall_cmds=$lt_postuninstall_cmds | ||
19316 | |||
19317 | # Commands used to build a loadable module (assumed same as above if empty) | ||
19318 | module_cmds=$lt_module_cmds_RC | ||
19319 | module_expsym_cmds=$lt_module_expsym_cmds_RC | ||
19320 | |||
19321 | # Commands to strip libraries. | ||
19322 | old_striplib=$lt_old_striplib | ||
19323 | striplib=$lt_striplib | ||
19324 | |||
19325 | # Dependencies to place before the objects being linked to create a | ||
19326 | # shared library. | ||
19327 | predep_objects=$lt_predep_objects_RC | ||
19328 | |||
19329 | # Dependencies to place after the objects being linked to create a | ||
19330 | # shared library. | ||
19331 | postdep_objects=$lt_postdep_objects_RC | ||
19332 | |||
19333 | # Dependencies to place before the objects being linked to create a | ||
19334 | # shared library. | ||
19335 | predeps=$lt_predeps_RC | ||
19336 | |||
19337 | # Dependencies to place after the objects being linked to create a | ||
19338 | # shared library. | ||
19339 | postdeps=$lt_postdeps_RC | ||
19340 | |||
19341 | # The library search path used internally by the compiler when linking | ||
19342 | # a shared library. | ||
19343 | compiler_lib_search_path=$lt_compiler_lib_search_path_RC | ||
19344 | |||
19345 | # Method to check whether dependent libraries are shared objects. | ||
19346 | deplibs_check_method=$lt_deplibs_check_method | ||
19347 | |||
19348 | # Command to use when deplibs_check_method == file_magic. | ||
19349 | file_magic_cmd=$lt_file_magic_cmd | ||
19350 | |||
19351 | # Flag that allows shared libraries with undefined symbols to be built. | ||
19352 | allow_undefined_flag=$lt_allow_undefined_flag_RC | ||
19353 | |||
19354 | # Flag that forces no undefined symbols. | ||
19355 | no_undefined_flag=$lt_no_undefined_flag_RC | ||
19356 | |||
19357 | # Commands used to finish a libtool library installation in a directory. | ||
19358 | finish_cmds=$lt_finish_cmds | ||
19359 | |||
19360 | # Same as above, but a single script fragment to be evaled but not shown. | ||
19361 | finish_eval=$lt_finish_eval | ||
19362 | |||
19363 | # Take the output of nm and produce a listing of raw symbols and C names. | ||
19364 | global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe | ||
19365 | |||
19366 | # Transform the output of nm in a proper C declaration | ||
19367 | global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl | ||
19368 | |||
19369 | # Transform the output of nm in a C name address pair | ||
19370 | global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address | ||
19371 | |||
19372 | # This is the shared library runtime path variable. | ||
19373 | runpath_var=$runpath_var | ||
19374 | |||
19375 | # This is the shared library path variable. | ||
19376 | shlibpath_var=$shlibpath_var | ||
19377 | |||
19378 | # Is shlibpath searched before the hard-coded library search path? | ||
19379 | shlibpath_overrides_runpath=$shlibpath_overrides_runpath | ||
19380 | |||
19381 | # How to hardcode a shared library path into an executable. | ||
19382 | hardcode_action=$hardcode_action_RC | ||
19383 | |||
19384 | # Whether we should hardcode library paths into libraries. | ||
19385 | hardcode_into_libs=$hardcode_into_libs | ||
19386 | |||
19387 | # Flag to hardcode \$libdir into a binary during linking. | ||
19388 | # This must work even if \$libdir does not exist. | ||
19389 | hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC | ||
19390 | |||
19391 | # If ld is used when linking, flag to hardcode \$libdir into | ||
19392 | # a binary during linking. This must work even if \$libdir does | ||
19393 | # not exist. | ||
19394 | hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC | ||
19395 | |||
19396 | # Whether we need a single -rpath flag with a separated argument. | ||
19397 | hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC | ||
19398 | |||
19399 | # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the | ||
19400 | # resulting binary. | ||
19401 | hardcode_direct=$hardcode_direct_RC | ||
19402 | |||
19403 | # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | ||
19404 | # resulting binary. | ||
19405 | hardcode_minus_L=$hardcode_minus_L_RC | ||
19406 | |||
19407 | # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | ||
19408 | # the resulting binary. | ||
19409 | hardcode_shlibpath_var=$hardcode_shlibpath_var_RC | ||
19410 | |||
19411 | # Set to yes if building a shared library automatically hardcodes DIR into the library | ||
19412 | # and all subsequent libraries and executables linked against it. | ||
19413 | hardcode_automatic=$hardcode_automatic_RC | ||
19414 | |||
19415 | # Variables whose values should be saved in libtool wrapper scripts and | ||
19416 | # restored at relink time. | ||
19417 | variables_saved_for_relink="$variables_saved_for_relink" | ||
19418 | |||
19419 | # Whether libtool must link a program against all its dependency libraries. | ||
19420 | link_all_deplibs=$link_all_deplibs_RC | ||
19421 | |||
19422 | # Compile-time system search path for libraries | ||
19423 | sys_lib_search_path_spec=$lt_sys_lib_search_path_spec | ||
19424 | |||
19425 | # Run-time system search path for libraries | ||
19426 | sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec | ||
19427 | |||
19428 | # Fix the shell variable \$srcfile for the compiler. | ||
19429 | fix_srcfile_path="$fix_srcfile_path_RC" | ||
19430 | |||
19431 | # Set to yes if exported symbols are required. | ||
19432 | always_export_symbols=$always_export_symbols_RC | ||
19433 | |||
19434 | # The commands to list exported symbols. | ||
19435 | export_symbols_cmds=$lt_export_symbols_cmds_RC | ||
19436 | |||
19437 | # The commands to extract the exported symbol list from a shared archive. | ||
19438 | extract_expsyms_cmds=$lt_extract_expsyms_cmds | ||
19439 | |||
19440 | # Symbols that should not be listed in the preloaded symbols. | ||
19441 | exclude_expsyms=$lt_exclude_expsyms_RC | ||
19442 | |||
19443 | # Symbols that must always be exported. | ||
19444 | include_expsyms=$lt_include_expsyms_RC | ||
19445 | |||
19446 | # ### END LIBTOOL TAG CONFIG: $tagname | ||
19447 | |||
19448 | __EOF__ | ||
19449 | |||
19450 | |||
19451 | else | ||
19452 | # If there is no Makefile yet, we rely on a make rule to execute | ||
19453 | # `config.status --recheck' to rerun these tests and create the | ||
19454 | # libtool script then. | ||
19455 | ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` | ||
19456 | if test -f "$ltmain_in"; then | ||
19457 | test -f Makefile && make "$ltmain" | ||
19458 | fi | ||
19459 | fi | ||
19460 | |||
19461 | |||
19462 | ac_ext=c | ||
19463 | ac_cpp='$CPP $CPPFLAGS' | ||
19464 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
19465 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
19466 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
19467 | |||
19468 | CC="$lt_save_CC" | ||
19469 | |||
19470 | ;; | ||
19471 | |||
19472 | *) | ||
19473 | { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 | ||
19474 | echo "$as_me: error: Unsupported tag name: $tagname" >&2;} | ||
19475 | { (exit 1); exit 1; }; } | ||
19476 | ;; | ||
19477 | esac | ||
19478 | |||
19479 | # Append the new tag name to the list of available tags. | ||
19480 | if test -n "$tagname" ; then | ||
19481 | available_tags="$available_tags $tagname" | ||
19482 | fi | ||
19483 | fi | ||
19484 | done | ||
19485 | IFS="$lt_save_ifs" | ||
19486 | |||
19487 | # Now substitute the updated list of available tags. | ||
19488 | if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then | ||
19489 | mv "${ofile}T" "$ofile" | ||
19490 | chmod +x "$ofile" | ||
19491 | else | ||
19492 | rm -f "${ofile}T" | ||
19493 | { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 | ||
19494 | echo "$as_me: error: unable to update list of available tagged configurations." >&2;} | ||
19495 | { (exit 1); exit 1; }; } | ||
19496 | fi | ||
19497 | fi | ||
19498 | |||
19499 | |||
19500 | |||
19501 | # This can be used to rebuild libtool when needed | ||
19502 | LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" | ||
19503 | |||
19504 | # Always use our own libtool. | ||
19505 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | ||
19506 | |||
19507 | # Prevent multiple expansion | ||
19508 | |||
19509 | |||
19510 | |||
19511 | |||
19512 | |||
19513 | |||
19514 | |||
19515 | |||
19516 | |||
19517 | |||
19518 | |||
19519 | |||
19520 | |||
19521 | |||
19522 | |||
19523 | |||
19524 | |||
19525 | |||
19526 | |||
19527 | |||
19528 | |||
19529 | |||
19530 | |||
19531 | |||
19532 | |||
19533 | |||
19534 | |||
19535 | ac_header_dirent=no | ||
19536 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | ||
19537 | as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` | ||
19538 | echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 | ||
19539 | echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 | ||
19540 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
19541 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
19542 | else | ||
19543 | cat >conftest.$ac_ext <<_ACEOF | ||
19544 | /* confdefs.h. */ | ||
19545 | _ACEOF | ||
19546 | cat confdefs.h >>conftest.$ac_ext | ||
19547 | cat >>conftest.$ac_ext <<_ACEOF | ||
19548 | /* end confdefs.h. */ | ||
19549 | #include <sys/types.h> | ||
19550 | #include <$ac_hdr> | ||
19551 | |||
19552 | int | ||
19553 | main () | ||
19554 | { | ||
19555 | if ((DIR *) 0) | ||
19556 | return 0; | ||
19557 | ; | ||
19558 | return 0; | ||
19559 | } | ||
19560 | _ACEOF | ||
19561 | rm -f conftest.$ac_objext | ||
19562 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
19563 | (eval $ac_compile) 2>conftest.er1 | ||
19564 | ac_status=$? | ||
19565 | grep -v '^ *+' conftest.er1 >conftest.err | ||
19566 | rm -f conftest.er1 | ||
19567 | cat conftest.err >&5 | ||
19568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19569 | (exit $ac_status); } && | ||
19570 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
19571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
19572 | (eval $ac_try) 2>&5 | ||
19573 | ac_status=$? | ||
19574 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19575 | (exit $ac_status); }; } && | ||
19576 | { ac_try='test -s conftest.$ac_objext' | ||
19577 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
19578 | (eval $ac_try) 2>&5 | ||
19579 | ac_status=$? | ||
19580 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19581 | (exit $ac_status); }; }; then | ||
19582 | eval "$as_ac_Header=yes" | ||
19583 | else | ||
19584 | echo "$as_me: failed program was:" >&5 | ||
19585 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
19586 | |||
19587 | eval "$as_ac_Header=no" | ||
19588 | fi | ||
19589 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
19590 | fi | ||
19591 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
19592 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
19593 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | ||
19594 | cat >>confdefs.h <<_ACEOF | ||
19595 | #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 | ||
19596 | _ACEOF | ||
19597 | |||
19598 | ac_header_dirent=$ac_hdr; break | ||
19599 | fi | ||
19600 | |||
19601 | done | ||
19602 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | ||
19603 | if test $ac_header_dirent = dirent.h; then | ||
19604 | echo "$as_me:$LINENO: checking for library containing opendir" >&5 | ||
19605 | echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 | ||
19606 | if test "${ac_cv_search_opendir+set}" = set; then | ||
19607 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
19608 | else | ||
19609 | ac_func_search_save_LIBS=$LIBS | ||
19610 | ac_cv_search_opendir=no | ||
19611 | cat >conftest.$ac_ext <<_ACEOF | ||
19612 | /* confdefs.h. */ | ||
19613 | _ACEOF | ||
19614 | cat confdefs.h >>conftest.$ac_ext | ||
19615 | cat >>conftest.$ac_ext <<_ACEOF | ||
19616 | /* end confdefs.h. */ | ||
19617 | |||
19618 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
19619 | #ifdef __cplusplus | ||
19620 | extern "C" | ||
19621 | #endif | ||
19622 | /* We use char because int might match the return type of a gcc2 | ||
19623 | builtin and then its argument prototype would still apply. */ | ||
19624 | char opendir (); | ||
19625 | int | ||
19626 | main () | ||
19627 | { | ||
19628 | opendir (); | ||
19629 | ; | ||
19630 | return 0; | ||
19631 | } | ||
19632 | _ACEOF | ||
19633 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
19634 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
19635 | (eval $ac_link) 2>conftest.er1 | ||
19636 | ac_status=$? | ||
19637 | grep -v '^ *+' conftest.er1 >conftest.err | ||
19638 | rm -f conftest.er1 | ||
19639 | cat conftest.err >&5 | ||
19640 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19641 | (exit $ac_status); } && | ||
19642 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
19643 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
19644 | (eval $ac_try) 2>&5 | ||
19645 | ac_status=$? | ||
19646 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19647 | (exit $ac_status); }; } && | ||
19648 | { ac_try='test -s conftest$ac_exeext' | ||
19649 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
19650 | (eval $ac_try) 2>&5 | ||
19651 | ac_status=$? | ||
19652 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19653 | (exit $ac_status); }; }; then | ||
19654 | ac_cv_search_opendir="none required" | ||
19655 | else | ||
19656 | echo "$as_me: failed program was:" >&5 | ||
19657 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
19658 | |||
19659 | fi | ||
19660 | rm -f conftest.err conftest.$ac_objext \ | ||
19661 | conftest$ac_exeext conftest.$ac_ext | ||
19662 | if test "$ac_cv_search_opendir" = no; then | ||
19663 | for ac_lib in dir; do | ||
19664 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
19665 | cat >conftest.$ac_ext <<_ACEOF | ||
19666 | /* confdefs.h. */ | ||
19667 | _ACEOF | ||
19668 | cat confdefs.h >>conftest.$ac_ext | ||
19669 | cat >>conftest.$ac_ext <<_ACEOF | ||
19670 | /* end confdefs.h. */ | ||
19671 | |||
19672 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
19673 | #ifdef __cplusplus | ||
19674 | extern "C" | ||
19675 | #endif | ||
19676 | /* We use char because int might match the return type of a gcc2 | ||
19677 | builtin and then its argument prototype would still apply. */ | ||
19678 | char opendir (); | ||
19679 | int | ||
19680 | main () | ||
19681 | { | ||
19682 | opendir (); | ||
19683 | ; | ||
19684 | return 0; | ||
19685 | } | ||
19686 | _ACEOF | ||
19687 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
19688 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
19689 | (eval $ac_link) 2>conftest.er1 | ||
19690 | ac_status=$? | ||
19691 | grep -v '^ *+' conftest.er1 >conftest.err | ||
19692 | rm -f conftest.er1 | ||
19693 | cat conftest.err >&5 | ||
19694 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19695 | (exit $ac_status); } && | ||
19696 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
19697 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
19698 | (eval $ac_try) 2>&5 | ||
19699 | ac_status=$? | ||
19700 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19701 | (exit $ac_status); }; } && | ||
19702 | { ac_try='test -s conftest$ac_exeext' | ||
19703 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
19704 | (eval $ac_try) 2>&5 | ||
19705 | ac_status=$? | ||
19706 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19707 | (exit $ac_status); }; }; then | ||
19708 | ac_cv_search_opendir="-l$ac_lib" | ||
19709 | break | ||
19710 | else | ||
19711 | echo "$as_me: failed program was:" >&5 | ||
19712 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
19713 | |||
19714 | fi | ||
19715 | rm -f conftest.err conftest.$ac_objext \ | ||
19716 | conftest$ac_exeext conftest.$ac_ext | ||
19717 | done | ||
19718 | fi | ||
19719 | LIBS=$ac_func_search_save_LIBS | ||
19720 | fi | ||
19721 | echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 | ||
19722 | echo "${ECHO_T}$ac_cv_search_opendir" >&6 | ||
19723 | if test "$ac_cv_search_opendir" != no; then | ||
19724 | test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" | ||
19725 | |||
19726 | fi | ||
19727 | |||
19728 | else | ||
19729 | echo "$as_me:$LINENO: checking for library containing opendir" >&5 | ||
19730 | echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 | ||
19731 | if test "${ac_cv_search_opendir+set}" = set; then | ||
19732 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
19733 | else | ||
19734 | ac_func_search_save_LIBS=$LIBS | ||
19735 | ac_cv_search_opendir=no | ||
19736 | cat >conftest.$ac_ext <<_ACEOF | ||
19737 | /* confdefs.h. */ | ||
19738 | _ACEOF | ||
19739 | cat confdefs.h >>conftest.$ac_ext | ||
19740 | cat >>conftest.$ac_ext <<_ACEOF | ||
19741 | /* end confdefs.h. */ | ||
19742 | |||
19743 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
19744 | #ifdef __cplusplus | ||
19745 | extern "C" | ||
19746 | #endif | ||
19747 | /* We use char because int might match the return type of a gcc2 | ||
19748 | builtin and then its argument prototype would still apply. */ | ||
19749 | char opendir (); | ||
19750 | int | ||
19751 | main () | ||
19752 | { | ||
19753 | opendir (); | ||
19754 | ; | ||
19755 | return 0; | ||
19756 | } | ||
19757 | _ACEOF | ||
19758 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
19759 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
19760 | (eval $ac_link) 2>conftest.er1 | ||
19761 | ac_status=$? | ||
19762 | grep -v '^ *+' conftest.er1 >conftest.err | ||
19763 | rm -f conftest.er1 | ||
19764 | cat conftest.err >&5 | ||
19765 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19766 | (exit $ac_status); } && | ||
19767 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
19768 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
19769 | (eval $ac_try) 2>&5 | ||
19770 | ac_status=$? | ||
19771 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19772 | (exit $ac_status); }; } && | ||
19773 | { ac_try='test -s conftest$ac_exeext' | ||
19774 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
19775 | (eval $ac_try) 2>&5 | ||
19776 | ac_status=$? | ||
19777 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19778 | (exit $ac_status); }; }; then | ||
19779 | ac_cv_search_opendir="none required" | ||
19780 | else | ||
19781 | echo "$as_me: failed program was:" >&5 | ||
19782 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
19783 | |||
19784 | fi | ||
19785 | rm -f conftest.err conftest.$ac_objext \ | ||
19786 | conftest$ac_exeext conftest.$ac_ext | ||
19787 | if test "$ac_cv_search_opendir" = no; then | ||
19788 | for ac_lib in x; do | ||
19789 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | ||
19790 | cat >conftest.$ac_ext <<_ACEOF | ||
19791 | /* confdefs.h. */ | ||
19792 | _ACEOF | ||
19793 | cat confdefs.h >>conftest.$ac_ext | ||
19794 | cat >>conftest.$ac_ext <<_ACEOF | ||
19795 | /* end confdefs.h. */ | ||
19796 | |||
19797 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
19798 | #ifdef __cplusplus | ||
19799 | extern "C" | ||
19800 | #endif | ||
19801 | /* We use char because int might match the return type of a gcc2 | ||
19802 | builtin and then its argument prototype would still apply. */ | ||
19803 | char opendir (); | ||
19804 | int | ||
19805 | main () | ||
19806 | { | ||
19807 | opendir (); | ||
19808 | ; | ||
19809 | return 0; | ||
19810 | } | ||
19811 | _ACEOF | ||
19812 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
19813 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
19814 | (eval $ac_link) 2>conftest.er1 | ||
19815 | ac_status=$? | ||
19816 | grep -v '^ *+' conftest.er1 >conftest.err | ||
19817 | rm -f conftest.er1 | ||
19818 | cat conftest.err >&5 | ||
19819 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19820 | (exit $ac_status); } && | ||
19821 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
19822 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
19823 | (eval $ac_try) 2>&5 | ||
19824 | ac_status=$? | ||
19825 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19826 | (exit $ac_status); }; } && | ||
19827 | { ac_try='test -s conftest$ac_exeext' | ||
19828 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
19829 | (eval $ac_try) 2>&5 | ||
19830 | ac_status=$? | ||
19831 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
19832 | (exit $ac_status); }; }; then | ||
19833 | ac_cv_search_opendir="-l$ac_lib" | ||
19834 | break | ||
19835 | else | ||
19836 | echo "$as_me: failed program was:" >&5 | ||
19837 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
19838 | |||
19839 | fi | ||
19840 | rm -f conftest.err conftest.$ac_objext \ | ||
19841 | conftest$ac_exeext conftest.$ac_ext | ||
19842 | done | ||
19843 | fi | ||
19844 | LIBS=$ac_func_search_save_LIBS | ||
19845 | fi | ||
19846 | echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 | ||
19847 | echo "${ECHO_T}$ac_cv_search_opendir" >&6 | ||
19848 | if test "$ac_cv_search_opendir" != no; then | ||
19849 | test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" | ||
19850 | |||
19851 | fi | ||
19852 | |||
19853 | fi | ||
19854 | |||
19855 | # Check whether --enable-ltdl-install or --disable-ltdl-install was given. | ||
19856 | if test "${enable_ltdl_install+set}" = set; then | ||
19857 | enableval="$enable_ltdl_install" | ||
19858 | |||
19859 | fi; | ||
19860 | |||
19861 | |||
19862 | |||
19863 | if test x"${enable_ltdl_install-no}" != xno; then | ||
19864 | INSTALL_LTDL_TRUE= | ||
19865 | INSTALL_LTDL_FALSE='#' | ||
19866 | else | ||
19867 | INSTALL_LTDL_TRUE='#' | ||
19868 | INSTALL_LTDL_FALSE= | ||
19869 | fi | ||
19870 | |||
19871 | |||
19872 | |||
19873 | if test x"${enable_ltdl_convenience-no}" != xno; then | ||
19874 | CONVENIENCE_LTDL_TRUE= | ||
19875 | CONVENIENCE_LTDL_FALSE='#' | ||
19876 | else | ||
19877 | CONVENIENCE_LTDL_TRUE='#' | ||
19878 | CONVENIENCE_LTDL_FALSE= | ||
19879 | fi | ||
19880 | |||
19881 | |||
19882 | |||
19883 | echo "$as_me:$LINENO: checking which extension is used for loadable modules" >&5 | ||
19884 | echo $ECHO_N "checking which extension is used for loadable modules... $ECHO_C" >&6 | ||
19885 | if test "${libltdl_cv_shlibext+set}" = set; then | ||
19886 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
19887 | else | ||
19888 | |||
19889 | module=yes | ||
19890 | eval libltdl_cv_shlibext=$shrext_cmds | ||
19891 | |||
19892 | fi | ||
19893 | echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 | ||
19894 | echo "${ECHO_T}$libltdl_cv_shlibext" >&6 | ||
19895 | if test -n "$libltdl_cv_shlibext"; then | ||
19896 | |||
19897 | cat >>confdefs.h <<_ACEOF | ||
19898 | #define LTDL_SHLIB_EXT "$libltdl_cv_shlibext" | ||
19899 | _ACEOF | ||
19900 | |||
19901 | fi | ||
19902 | |||
19903 | |||
19904 | echo "$as_me:$LINENO: checking which variable specifies run-time library path" >&5 | ||
19905 | echo $ECHO_N "checking which variable specifies run-time library path... $ECHO_C" >&6 | ||
19906 | if test "${libltdl_cv_shlibpath_var+set}" = set; then | ||
19907 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
19908 | else | ||
19909 | libltdl_cv_shlibpath_var="$shlibpath_var" | ||
19910 | fi | ||
19911 | echo "$as_me:$LINENO: result: $libltdl_cv_shlibpath_var" >&5 | ||
19912 | echo "${ECHO_T}$libltdl_cv_shlibpath_var" >&6 | ||
19913 | if test -n "$libltdl_cv_shlibpath_var"; then | ||
19914 | |||
19915 | cat >>confdefs.h <<_ACEOF | ||
19916 | #define LTDL_SHLIBPATH_VAR "$libltdl_cv_shlibpath_var" | ||
19917 | _ACEOF | ||
19918 | |||
19919 | fi | ||
19920 | |||
19921 | |||
19922 | echo "$as_me:$LINENO: checking for the default library search path" >&5 | ||
19923 | echo $ECHO_N "checking for the default library search path... $ECHO_C" >&6 | ||
19924 | if test "${libltdl_cv_sys_search_path+set}" = set; then | ||
19925 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
19926 | else | ||
19927 | libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec" | ||
19928 | fi | ||
19929 | echo "$as_me:$LINENO: result: $libltdl_cv_sys_search_path" >&5 | ||
19930 | echo "${ECHO_T}$libltdl_cv_sys_search_path" >&6 | ||
19931 | if test -n "$libltdl_cv_sys_search_path"; then | ||
19932 | sys_search_path= | ||
19933 | for dir in $libltdl_cv_sys_search_path; do | ||
19934 | if test -z "$sys_search_path"; then | ||
19935 | sys_search_path="$dir" | ||
19936 | else | ||
19937 | sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" | ||
19938 | fi | ||
19939 | done | ||
19940 | |||
19941 | cat >>confdefs.h <<_ACEOF | ||
19942 | #define LTDL_SYSSEARCHPATH "$sys_search_path" | ||
19943 | _ACEOF | ||
19944 | |||
19945 | fi | ||
19946 | |||
19947 | echo "$as_me:$LINENO: checking for objdir" >&5 | ||
19948 | echo $ECHO_N "checking for objdir... $ECHO_C" >&6 | ||
19949 | if test "${libltdl_cv_objdir+set}" = set; then | ||
19950 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
19951 | else | ||
19952 | libltdl_cv_objdir="$objdir" | ||
19953 | if test -n "$objdir"; then | ||
19954 | : | ||
19955 | else | ||
19956 | rm -f .libs 2>/dev/null | ||
19957 | mkdir .libs 2>/dev/null | ||
19958 | if test -d .libs; then | ||
19959 | libltdl_cv_objdir=.libs | ||
19960 | else | ||
19961 | # MS-DOS does not allow filenames that begin with a dot. | ||
19962 | libltdl_cv_objdir=_libs | ||
19963 | fi | ||
19964 | rmdir .libs 2>/dev/null | ||
19965 | fi | ||
19966 | |||
19967 | fi | ||
19968 | echo "$as_me:$LINENO: result: $libltdl_cv_objdir" >&5 | ||
19969 | echo "${ECHO_T}$libltdl_cv_objdir" >&6 | ||
19970 | |||
19971 | cat >>confdefs.h <<_ACEOF | ||
19972 | #define LTDL_OBJDIR "$libltdl_cv_objdir/" | ||
19973 | _ACEOF | ||
19974 | |||
19975 | |||
19976 | |||
19977 | echo "$as_me:$LINENO: checking whether libtool supports -dlopen/-dlpreopen" >&5 | ||
19978 | echo $ECHO_N "checking whether libtool supports -dlopen/-dlpreopen... $ECHO_C" >&6 | ||
19979 | if test "${libltdl_cv_preloaded_symbols+set}" = set; then | ||
19980 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
19981 | else | ||
19982 | if test -n "$lt_cv_sys_global_symbol_pipe"; then | ||
19983 | libltdl_cv_preloaded_symbols=yes | ||
19984 | else | ||
19985 | libltdl_cv_preloaded_symbols=no | ||
19986 | fi | ||
19987 | |||
19988 | fi | ||
19989 | echo "$as_me:$LINENO: result: $libltdl_cv_preloaded_symbols" >&5 | ||
19990 | echo "${ECHO_T}$libltdl_cv_preloaded_symbols" >&6 | ||
19991 | if test x"$libltdl_cv_preloaded_symbols" = xyes; then | ||
19992 | |||
19993 | cat >>confdefs.h <<\_ACEOF | ||
19994 | #define HAVE_PRELOADED_SYMBOLS 1 | ||
19995 | _ACEOF | ||
19996 | |||
19997 | fi | ||
19998 | |||
19999 | LIBADD_DL= | ||
20000 | |||
20001 | ac_ext=c | ||
20002 | ac_cpp='$CPP $CPPFLAGS' | ||
20003 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
20004 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
20005 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
20006 | |||
20007 | |||
20008 | echo "$as_me:$LINENO: checking for shl_load" >&5 | ||
20009 | echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 | ||
20010 | if test "${ac_cv_func_shl_load+set}" = set; then | ||
20011 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20012 | else | ||
20013 | cat >conftest.$ac_ext <<_ACEOF | ||
20014 | /* confdefs.h. */ | ||
20015 | _ACEOF | ||
20016 | cat confdefs.h >>conftest.$ac_ext | ||
20017 | cat >>conftest.$ac_ext <<_ACEOF | ||
20018 | /* end confdefs.h. */ | ||
20019 | /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. | ||
20020 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
20021 | #define shl_load innocuous_shl_load | ||
20022 | |||
20023 | /* System header to define __stub macros and hopefully few prototypes, | ||
20024 | which can conflict with char shl_load (); below. | ||
20025 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
20026 | <limits.h> exists even on freestanding compilers. */ | ||
20027 | |||
20028 | #ifdef __STDC__ | ||
20029 | # include <limits.h> | ||
20030 | #else | ||
20031 | # include <assert.h> | ||
20032 | #endif | ||
20033 | |||
20034 | #undef shl_load | ||
20035 | |||
20036 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
20037 | #ifdef __cplusplus | ||
20038 | extern "C" | ||
20039 | { | ||
20040 | #endif | ||
20041 | /* We use char because int might match the return type of a gcc2 | ||
20042 | builtin and then its argument prototype would still apply. */ | ||
20043 | char shl_load (); | ||
20044 | /* The GNU C library defines this for functions which it implements | ||
20045 | to always fail with ENOSYS. Some functions are actually named | ||
20046 | something starting with __ and the normal name is an alias. */ | ||
20047 | #if defined (__stub_shl_load) || defined (__stub___shl_load) | ||
20048 | choke me | ||
20049 | #else | ||
20050 | char (*f) () = shl_load; | ||
20051 | #endif | ||
20052 | #ifdef __cplusplus | ||
20053 | } | ||
20054 | #endif | ||
20055 | |||
20056 | int | ||
20057 | main () | ||
20058 | { | ||
20059 | return f != shl_load; | ||
20060 | ; | ||
20061 | return 0; | ||
20062 | } | ||
20063 | _ACEOF | ||
20064 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
20065 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
20066 | (eval $ac_link) 2>conftest.er1 | ||
20067 | ac_status=$? | ||
20068 | grep -v '^ *+' conftest.er1 >conftest.err | ||
20069 | rm -f conftest.er1 | ||
20070 | cat conftest.err >&5 | ||
20071 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20072 | (exit $ac_status); } && | ||
20073 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
20074 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20075 | (eval $ac_try) 2>&5 | ||
20076 | ac_status=$? | ||
20077 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20078 | (exit $ac_status); }; } && | ||
20079 | { ac_try='test -s conftest$ac_exeext' | ||
20080 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20081 | (eval $ac_try) 2>&5 | ||
20082 | ac_status=$? | ||
20083 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20084 | (exit $ac_status); }; }; then | ||
20085 | ac_cv_func_shl_load=yes | ||
20086 | else | ||
20087 | echo "$as_me: failed program was:" >&5 | ||
20088 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
20089 | |||
20090 | ac_cv_func_shl_load=no | ||
20091 | fi | ||
20092 | rm -f conftest.err conftest.$ac_objext \ | ||
20093 | conftest$ac_exeext conftest.$ac_ext | ||
20094 | fi | ||
20095 | echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 | ||
20096 | echo "${ECHO_T}$ac_cv_func_shl_load" >&6 | ||
20097 | if test $ac_cv_func_shl_load = yes; then | ||
20098 | |||
20099 | cat >>confdefs.h <<\_ACEOF | ||
20100 | #define HAVE_SHL_LOAD 1 | ||
20101 | _ACEOF | ||
20102 | |||
20103 | else | ||
20104 | echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 | ||
20105 | echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 | ||
20106 | if test "${ac_cv_lib_dld_shl_load+set}" = set; then | ||
20107 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20108 | else | ||
20109 | ac_check_lib_save_LIBS=$LIBS | ||
20110 | LIBS="-ldld $LIBS" | ||
20111 | cat >conftest.$ac_ext <<_ACEOF | ||
20112 | /* confdefs.h. */ | ||
20113 | _ACEOF | ||
20114 | cat confdefs.h >>conftest.$ac_ext | ||
20115 | cat >>conftest.$ac_ext <<_ACEOF | ||
20116 | /* end confdefs.h. */ | ||
20117 | |||
20118 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
20119 | #ifdef __cplusplus | ||
20120 | extern "C" | ||
20121 | #endif | ||
20122 | /* We use char because int might match the return type of a gcc2 | ||
20123 | builtin and then its argument prototype would still apply. */ | ||
20124 | char shl_load (); | ||
20125 | int | ||
20126 | main () | ||
20127 | { | ||
20128 | shl_load (); | ||
20129 | ; | ||
20130 | return 0; | ||
20131 | } | ||
20132 | _ACEOF | ||
20133 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
20134 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
20135 | (eval $ac_link) 2>conftest.er1 | ||
20136 | ac_status=$? | ||
20137 | grep -v '^ *+' conftest.er1 >conftest.err | ||
20138 | rm -f conftest.er1 | ||
20139 | cat conftest.err >&5 | ||
20140 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20141 | (exit $ac_status); } && | ||
20142 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
20143 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20144 | (eval $ac_try) 2>&5 | ||
20145 | ac_status=$? | ||
20146 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20147 | (exit $ac_status); }; } && | ||
20148 | { ac_try='test -s conftest$ac_exeext' | ||
20149 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20150 | (eval $ac_try) 2>&5 | ||
20151 | ac_status=$? | ||
20152 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20153 | (exit $ac_status); }; }; then | ||
20154 | ac_cv_lib_dld_shl_load=yes | ||
20155 | else | ||
20156 | echo "$as_me: failed program was:" >&5 | ||
20157 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
20158 | |||
20159 | ac_cv_lib_dld_shl_load=no | ||
20160 | fi | ||
20161 | rm -f conftest.err conftest.$ac_objext \ | ||
20162 | conftest$ac_exeext conftest.$ac_ext | ||
20163 | LIBS=$ac_check_lib_save_LIBS | ||
20164 | fi | ||
20165 | echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 | ||
20166 | echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 | ||
20167 | if test $ac_cv_lib_dld_shl_load = yes; then | ||
20168 | |||
20169 | cat >>confdefs.h <<\_ACEOF | ||
20170 | #define HAVE_SHL_LOAD 1 | ||
20171 | _ACEOF | ||
20172 | |||
20173 | LIBADD_DL="$LIBADD_DL -ldld" | ||
20174 | else | ||
20175 | echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 | ||
20176 | echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 | ||
20177 | if test "${ac_cv_lib_dl_dlopen+set}" = set; then | ||
20178 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20179 | else | ||
20180 | ac_check_lib_save_LIBS=$LIBS | ||
20181 | LIBS="-ldl $LIBS" | ||
20182 | cat >conftest.$ac_ext <<_ACEOF | ||
20183 | /* confdefs.h. */ | ||
20184 | _ACEOF | ||
20185 | cat confdefs.h >>conftest.$ac_ext | ||
20186 | cat >>conftest.$ac_ext <<_ACEOF | ||
20187 | /* end confdefs.h. */ | ||
20188 | |||
20189 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
20190 | #ifdef __cplusplus | ||
20191 | extern "C" | ||
20192 | #endif | ||
20193 | /* We use char because int might match the return type of a gcc2 | ||
20194 | builtin and then its argument prototype would still apply. */ | ||
20195 | char dlopen (); | ||
20196 | int | ||
20197 | main () | ||
20198 | { | ||
20199 | dlopen (); | ||
20200 | ; | ||
20201 | return 0; | ||
20202 | } | ||
20203 | _ACEOF | ||
20204 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
20205 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
20206 | (eval $ac_link) 2>conftest.er1 | ||
20207 | ac_status=$? | ||
20208 | grep -v '^ *+' conftest.er1 >conftest.err | ||
20209 | rm -f conftest.er1 | ||
20210 | cat conftest.err >&5 | ||
20211 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20212 | (exit $ac_status); } && | ||
20213 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
20214 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20215 | (eval $ac_try) 2>&5 | ||
20216 | ac_status=$? | ||
20217 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20218 | (exit $ac_status); }; } && | ||
20219 | { ac_try='test -s conftest$ac_exeext' | ||
20220 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20221 | (eval $ac_try) 2>&5 | ||
20222 | ac_status=$? | ||
20223 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20224 | (exit $ac_status); }; }; then | ||
20225 | ac_cv_lib_dl_dlopen=yes | ||
20226 | else | ||
20227 | echo "$as_me: failed program was:" >&5 | ||
20228 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
20229 | |||
20230 | ac_cv_lib_dl_dlopen=no | ||
20231 | fi | ||
20232 | rm -f conftest.err conftest.$ac_objext \ | ||
20233 | conftest$ac_exeext conftest.$ac_ext | ||
20234 | LIBS=$ac_check_lib_save_LIBS | ||
20235 | fi | ||
20236 | echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 | ||
20237 | echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 | ||
20238 | if test $ac_cv_lib_dl_dlopen = yes; then | ||
20239 | |||
20240 | cat >>confdefs.h <<\_ACEOF | ||
20241 | #define HAVE_LIBDL 1 | ||
20242 | _ACEOF | ||
20243 | |||
20244 | LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes" | ||
20245 | else | ||
20246 | cat >conftest.$ac_ext <<_ACEOF | ||
20247 | /* confdefs.h. */ | ||
20248 | _ACEOF | ||
20249 | cat confdefs.h >>conftest.$ac_ext | ||
20250 | cat >>conftest.$ac_ext <<_ACEOF | ||
20251 | /* end confdefs.h. */ | ||
20252 | #if HAVE_DLFCN_H | ||
20253 | # include <dlfcn.h> | ||
20254 | #endif | ||
20255 | |||
20256 | int | ||
20257 | main () | ||
20258 | { | ||
20259 | dlopen(0, 0); | ||
20260 | ; | ||
20261 | return 0; | ||
20262 | } | ||
20263 | _ACEOF | ||
20264 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
20265 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
20266 | (eval $ac_link) 2>conftest.er1 | ||
20267 | ac_status=$? | ||
20268 | grep -v '^ *+' conftest.er1 >conftest.err | ||
20269 | rm -f conftest.er1 | ||
20270 | cat conftest.err >&5 | ||
20271 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20272 | (exit $ac_status); } && | ||
20273 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
20274 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20275 | (eval $ac_try) 2>&5 | ||
20276 | ac_status=$? | ||
20277 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20278 | (exit $ac_status); }; } && | ||
20279 | { ac_try='test -s conftest$ac_exeext' | ||
20280 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20281 | (eval $ac_try) 2>&5 | ||
20282 | ac_status=$? | ||
20283 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20284 | (exit $ac_status); }; }; then | ||
20285 | |||
20286 | cat >>confdefs.h <<\_ACEOF | ||
20287 | #define HAVE_LIBDL 1 | ||
20288 | _ACEOF | ||
20289 | libltdl_cv_func_dlopen="yes" | ||
20290 | else | ||
20291 | echo "$as_me: failed program was:" >&5 | ||
20292 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
20293 | |||
20294 | echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 | ||
20295 | echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 | ||
20296 | if test "${ac_cv_lib_svld_dlopen+set}" = set; then | ||
20297 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20298 | else | ||
20299 | ac_check_lib_save_LIBS=$LIBS | ||
20300 | LIBS="-lsvld $LIBS" | ||
20301 | cat >conftest.$ac_ext <<_ACEOF | ||
20302 | /* confdefs.h. */ | ||
20303 | _ACEOF | ||
20304 | cat confdefs.h >>conftest.$ac_ext | ||
20305 | cat >>conftest.$ac_ext <<_ACEOF | ||
20306 | /* end confdefs.h. */ | ||
20307 | |||
20308 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
20309 | #ifdef __cplusplus | ||
20310 | extern "C" | ||
20311 | #endif | ||
20312 | /* We use char because int might match the return type of a gcc2 | ||
20313 | builtin and then its argument prototype would still apply. */ | ||
20314 | char dlopen (); | ||
20315 | int | ||
20316 | main () | ||
20317 | { | ||
20318 | dlopen (); | ||
20319 | ; | ||
20320 | return 0; | ||
20321 | } | ||
20322 | _ACEOF | ||
20323 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
20324 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
20325 | (eval $ac_link) 2>conftest.er1 | ||
20326 | ac_status=$? | ||
20327 | grep -v '^ *+' conftest.er1 >conftest.err | ||
20328 | rm -f conftest.er1 | ||
20329 | cat conftest.err >&5 | ||
20330 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20331 | (exit $ac_status); } && | ||
20332 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
20333 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20334 | (eval $ac_try) 2>&5 | ||
20335 | ac_status=$? | ||
20336 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20337 | (exit $ac_status); }; } && | ||
20338 | { ac_try='test -s conftest$ac_exeext' | ||
20339 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20340 | (eval $ac_try) 2>&5 | ||
20341 | ac_status=$? | ||
20342 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20343 | (exit $ac_status); }; }; then | ||
20344 | ac_cv_lib_svld_dlopen=yes | ||
20345 | else | ||
20346 | echo "$as_me: failed program was:" >&5 | ||
20347 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
20348 | |||
20349 | ac_cv_lib_svld_dlopen=no | ||
20350 | fi | ||
20351 | rm -f conftest.err conftest.$ac_objext \ | ||
20352 | conftest$ac_exeext conftest.$ac_ext | ||
20353 | LIBS=$ac_check_lib_save_LIBS | ||
20354 | fi | ||
20355 | echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 | ||
20356 | echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 | ||
20357 | if test $ac_cv_lib_svld_dlopen = yes; then | ||
20358 | |||
20359 | cat >>confdefs.h <<\_ACEOF | ||
20360 | #define HAVE_LIBDL 1 | ||
20361 | _ACEOF | ||
20362 | |||
20363 | LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes" | ||
20364 | else | ||
20365 | echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 | ||
20366 | echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 | ||
20367 | if test "${ac_cv_lib_dld_dld_link+set}" = set; then | ||
20368 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20369 | else | ||
20370 | ac_check_lib_save_LIBS=$LIBS | ||
20371 | LIBS="-ldld $LIBS" | ||
20372 | cat >conftest.$ac_ext <<_ACEOF | ||
20373 | /* confdefs.h. */ | ||
20374 | _ACEOF | ||
20375 | cat confdefs.h >>conftest.$ac_ext | ||
20376 | cat >>conftest.$ac_ext <<_ACEOF | ||
20377 | /* end confdefs.h. */ | ||
20378 | |||
20379 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
20380 | #ifdef __cplusplus | ||
20381 | extern "C" | ||
20382 | #endif | ||
20383 | /* We use char because int might match the return type of a gcc2 | ||
20384 | builtin and then its argument prototype would still apply. */ | ||
20385 | char dld_link (); | ||
20386 | int | ||
20387 | main () | ||
20388 | { | ||
20389 | dld_link (); | ||
20390 | ; | ||
20391 | return 0; | ||
20392 | } | ||
20393 | _ACEOF | ||
20394 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
20395 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
20396 | (eval $ac_link) 2>conftest.er1 | ||
20397 | ac_status=$? | ||
20398 | grep -v '^ *+' conftest.er1 >conftest.err | ||
20399 | rm -f conftest.er1 | ||
20400 | cat conftest.err >&5 | ||
20401 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20402 | (exit $ac_status); } && | ||
20403 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
20404 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20405 | (eval $ac_try) 2>&5 | ||
20406 | ac_status=$? | ||
20407 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20408 | (exit $ac_status); }; } && | ||
20409 | { ac_try='test -s conftest$ac_exeext' | ||
20410 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20411 | (eval $ac_try) 2>&5 | ||
20412 | ac_status=$? | ||
20413 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20414 | (exit $ac_status); }; }; then | ||
20415 | ac_cv_lib_dld_dld_link=yes | ||
20416 | else | ||
20417 | echo "$as_me: failed program was:" >&5 | ||
20418 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
20419 | |||
20420 | ac_cv_lib_dld_dld_link=no | ||
20421 | fi | ||
20422 | rm -f conftest.err conftest.$ac_objext \ | ||
20423 | conftest$ac_exeext conftest.$ac_ext | ||
20424 | LIBS=$ac_check_lib_save_LIBS | ||
20425 | fi | ||
20426 | echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 | ||
20427 | echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 | ||
20428 | if test $ac_cv_lib_dld_dld_link = yes; then | ||
20429 | |||
20430 | cat >>confdefs.h <<\_ACEOF | ||
20431 | #define HAVE_DLD 1 | ||
20432 | _ACEOF | ||
20433 | |||
20434 | LIBADD_DL="$LIBADD_DL -ldld" | ||
20435 | else | ||
20436 | echo "$as_me:$LINENO: checking for _dyld_func_lookup" >&5 | ||
20437 | echo $ECHO_N "checking for _dyld_func_lookup... $ECHO_C" >&6 | ||
20438 | if test "${ac_cv_func__dyld_func_lookup+set}" = set; then | ||
20439 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20440 | else | ||
20441 | cat >conftest.$ac_ext <<_ACEOF | ||
20442 | /* confdefs.h. */ | ||
20443 | _ACEOF | ||
20444 | cat confdefs.h >>conftest.$ac_ext | ||
20445 | cat >>conftest.$ac_ext <<_ACEOF | ||
20446 | /* end confdefs.h. */ | ||
20447 | /* Define _dyld_func_lookup to an innocuous variant, in case <limits.h> declares _dyld_func_lookup. | ||
20448 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
20449 | #define _dyld_func_lookup innocuous__dyld_func_lookup | ||
20450 | |||
20451 | /* System header to define __stub macros and hopefully few prototypes, | ||
20452 | which can conflict with char _dyld_func_lookup (); below. | ||
20453 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
20454 | <limits.h> exists even on freestanding compilers. */ | ||
20455 | |||
20456 | #ifdef __STDC__ | ||
20457 | # include <limits.h> | ||
20458 | #else | ||
20459 | # include <assert.h> | ||
20460 | #endif | ||
20461 | |||
20462 | #undef _dyld_func_lookup | ||
20463 | |||
20464 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
20465 | #ifdef __cplusplus | ||
20466 | extern "C" | ||
20467 | { | ||
20468 | #endif | ||
20469 | /* We use char because int might match the return type of a gcc2 | ||
20470 | builtin and then its argument prototype would still apply. */ | ||
20471 | char _dyld_func_lookup (); | ||
20472 | /* The GNU C library defines this for functions which it implements | ||
20473 | to always fail with ENOSYS. Some functions are actually named | ||
20474 | something starting with __ and the normal name is an alias. */ | ||
20475 | #if defined (__stub__dyld_func_lookup) || defined (__stub____dyld_func_lookup) | ||
20476 | choke me | ||
20477 | #else | ||
20478 | char (*f) () = _dyld_func_lookup; | ||
20479 | #endif | ||
20480 | #ifdef __cplusplus | ||
20481 | } | ||
20482 | #endif | ||
20483 | |||
20484 | int | ||
20485 | main () | ||
20486 | { | ||
20487 | return f != _dyld_func_lookup; | ||
20488 | ; | ||
20489 | return 0; | ||
20490 | } | ||
20491 | _ACEOF | ||
20492 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
20493 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
20494 | (eval $ac_link) 2>conftest.er1 | ||
20495 | ac_status=$? | ||
20496 | grep -v '^ *+' conftest.er1 >conftest.err | ||
20497 | rm -f conftest.er1 | ||
20498 | cat conftest.err >&5 | ||
20499 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20500 | (exit $ac_status); } && | ||
20501 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
20502 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20503 | (eval $ac_try) 2>&5 | ||
20504 | ac_status=$? | ||
20505 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20506 | (exit $ac_status); }; } && | ||
20507 | { ac_try='test -s conftest$ac_exeext' | ||
20508 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20509 | (eval $ac_try) 2>&5 | ||
20510 | ac_status=$? | ||
20511 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20512 | (exit $ac_status); }; }; then | ||
20513 | ac_cv_func__dyld_func_lookup=yes | ||
20514 | else | ||
20515 | echo "$as_me: failed program was:" >&5 | ||
20516 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
20517 | |||
20518 | ac_cv_func__dyld_func_lookup=no | ||
20519 | fi | ||
20520 | rm -f conftest.err conftest.$ac_objext \ | ||
20521 | conftest$ac_exeext conftest.$ac_ext | ||
20522 | fi | ||
20523 | echo "$as_me:$LINENO: result: $ac_cv_func__dyld_func_lookup" >&5 | ||
20524 | echo "${ECHO_T}$ac_cv_func__dyld_func_lookup" >&6 | ||
20525 | if test $ac_cv_func__dyld_func_lookup = yes; then | ||
20526 | |||
20527 | cat >>confdefs.h <<\_ACEOF | ||
20528 | #define HAVE_DYLD 1 | ||
20529 | _ACEOF | ||
20530 | |||
20531 | fi | ||
20532 | |||
20533 | |||
20534 | fi | ||
20535 | |||
20536 | |||
20537 | fi | ||
20538 | |||
20539 | |||
20540 | fi | ||
20541 | rm -f conftest.err conftest.$ac_objext \ | ||
20542 | conftest$ac_exeext conftest.$ac_ext | ||
20543 | |||
20544 | fi | ||
20545 | |||
20546 | |||
20547 | fi | ||
20548 | |||
20549 | |||
20550 | fi | ||
20551 | |||
20552 | |||
20553 | if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes | ||
20554 | then | ||
20555 | lt_save_LIBS="$LIBS" | ||
20556 | LIBS="$LIBS $LIBADD_DL" | ||
20557 | |||
20558 | for ac_func in dlerror | ||
20559 | do | ||
20560 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | ||
20561 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | ||
20562 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | ||
20563 | if eval "test \"\${$as_ac_var+set}\" = set"; then | ||
20564 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20565 | else | ||
20566 | cat >conftest.$ac_ext <<_ACEOF | ||
20567 | /* confdefs.h. */ | ||
20568 | _ACEOF | ||
20569 | cat confdefs.h >>conftest.$ac_ext | ||
20570 | cat >>conftest.$ac_ext <<_ACEOF | ||
20571 | /* end confdefs.h. */ | ||
20572 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | ||
20573 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
20574 | #define $ac_func innocuous_$ac_func | ||
20575 | |||
20576 | /* System header to define __stub macros and hopefully few prototypes, | ||
20577 | which can conflict with char $ac_func (); below. | ||
20578 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
20579 | <limits.h> exists even on freestanding compilers. */ | ||
20580 | |||
20581 | #ifdef __STDC__ | ||
20582 | # include <limits.h> | ||
20583 | #else | ||
20584 | # include <assert.h> | ||
20585 | #endif | ||
20586 | |||
20587 | #undef $ac_func | ||
20588 | |||
20589 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
20590 | #ifdef __cplusplus | ||
20591 | extern "C" | ||
20592 | { | ||
20593 | #endif | ||
20594 | /* We use char because int might match the return type of a gcc2 | ||
20595 | builtin and then its argument prototype would still apply. */ | ||
20596 | char $ac_func (); | ||
20597 | /* The GNU C library defines this for functions which it implements | ||
20598 | to always fail with ENOSYS. Some functions are actually named | ||
20599 | something starting with __ and the normal name is an alias. */ | ||
20600 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | ||
20601 | choke me | ||
20602 | #else | ||
20603 | char (*f) () = $ac_func; | ||
20604 | #endif | ||
20605 | #ifdef __cplusplus | ||
20606 | } | ||
20607 | #endif | ||
20608 | |||
20609 | int | ||
20610 | main () | ||
20611 | { | ||
20612 | return f != $ac_func; | ||
20613 | ; | ||
20614 | return 0; | ||
20615 | } | ||
20616 | _ACEOF | ||
20617 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
20618 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
20619 | (eval $ac_link) 2>conftest.er1 | ||
20620 | ac_status=$? | ||
20621 | grep -v '^ *+' conftest.er1 >conftest.err | ||
20622 | rm -f conftest.er1 | ||
20623 | cat conftest.err >&5 | ||
20624 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20625 | (exit $ac_status); } && | ||
20626 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
20627 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20628 | (eval $ac_try) 2>&5 | ||
20629 | ac_status=$? | ||
20630 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20631 | (exit $ac_status); }; } && | ||
20632 | { ac_try='test -s conftest$ac_exeext' | ||
20633 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20634 | (eval $ac_try) 2>&5 | ||
20635 | ac_status=$? | ||
20636 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20637 | (exit $ac_status); }; }; then | ||
20638 | eval "$as_ac_var=yes" | ||
20639 | else | ||
20640 | echo "$as_me: failed program was:" >&5 | ||
20641 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
20642 | |||
20643 | eval "$as_ac_var=no" | ||
20644 | fi | ||
20645 | rm -f conftest.err conftest.$ac_objext \ | ||
20646 | conftest$ac_exeext conftest.$ac_ext | ||
20647 | fi | ||
20648 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | ||
20649 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | ||
20650 | if test `eval echo '${'$as_ac_var'}'` = yes; then | ||
20651 | cat >>confdefs.h <<_ACEOF | ||
20652 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | ||
20653 | _ACEOF | ||
20654 | |||
20655 | fi | ||
20656 | done | ||
20657 | |||
20658 | LIBS="$lt_save_LIBS" | ||
20659 | fi | ||
20660 | ac_ext=c | ||
20661 | ac_cpp='$CPP $CPPFLAGS' | ||
20662 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
20663 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | ||
20664 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | ||
20665 | |||
20666 | |||
20667 | |||
20668 | echo "$as_me:$LINENO: checking for _ prefix in compiled symbols" >&5 | ||
20669 | echo $ECHO_N "checking for _ prefix in compiled symbols... $ECHO_C" >&6 | ||
20670 | if test "${ac_cv_sys_symbol_underscore+set}" = set; then | ||
20671 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20672 | else | ||
20673 | ac_cv_sys_symbol_underscore=no | ||
20674 | cat > conftest.$ac_ext <<EOF | ||
20675 | void nm_test_func(){} | ||
20676 | int main(){nm_test_func;return 0;} | ||
20677 | EOF | ||
20678 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
20679 | (eval $ac_compile) 2>&5 | ||
20680 | ac_status=$? | ||
20681 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20682 | (exit $ac_status); }; then | ||
20683 | # Now try to grab the symbols. | ||
20684 | ac_nlist=conftest.nm | ||
20685 | if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\"") >&5 | ||
20686 | (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5 | ||
20687 | ac_status=$? | ||
20688 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20689 | (exit $ac_status); } && test -s "$ac_nlist"; then | ||
20690 | # See whether the symbols have a leading underscore. | ||
20691 | if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then | ||
20692 | ac_cv_sys_symbol_underscore=yes | ||
20693 | else | ||
20694 | if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then | ||
20695 | : | ||
20696 | else | ||
20697 | echo "configure: cannot find nm_test_func in $ac_nlist" >&5 | ||
20698 | fi | ||
20699 | fi | ||
20700 | else | ||
20701 | echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5 | ||
20702 | fi | ||
20703 | else | ||
20704 | echo "configure: failed program was:" >&5 | ||
20705 | cat conftest.c >&5 | ||
20706 | fi | ||
20707 | rm -rf conftest* | ||
20708 | |||
20709 | fi | ||
20710 | echo "$as_me:$LINENO: result: $ac_cv_sys_symbol_underscore" >&5 | ||
20711 | echo "${ECHO_T}$ac_cv_sys_symbol_underscore" >&6 | ||
20712 | |||
20713 | |||
20714 | if test x"$ac_cv_sys_symbol_underscore" = xyes; then | ||
20715 | if test x"$libltdl_cv_func_dlopen" = xyes || | ||
20716 | test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then | ||
20717 | echo "$as_me:$LINENO: checking whether we have to add an underscore for dlsym" >&5 | ||
20718 | echo $ECHO_N "checking whether we have to add an underscore for dlsym... $ECHO_C" >&6 | ||
20719 | if test "${libltdl_cv_need_uscore+set}" = set; then | ||
20720 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20721 | else | ||
20722 | libltdl_cv_need_uscore=unknown | ||
20723 | save_LIBS="$LIBS" | ||
20724 | LIBS="$LIBS $LIBADD_DL" | ||
20725 | if test "$cross_compiling" = yes; then : | ||
20726 | libltdl_cv_need_uscore=cross | ||
20727 | else | ||
20728 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||
20729 | lt_status=$lt_dlunknown | ||
20730 | cat > conftest.$ac_ext <<EOF | ||
20731 | #line 20731 "configure" | ||
20732 | #include "confdefs.h" | ||
20733 | |||
20734 | #if HAVE_DLFCN_H | ||
20735 | #include <dlfcn.h> | ||
20736 | #endif | ||
20737 | |||
20738 | #include <stdio.h> | ||
20739 | |||
20740 | #ifdef RTLD_GLOBAL | ||
20741 | # define LT_DLGLOBAL RTLD_GLOBAL | ||
20742 | #else | ||
20743 | # ifdef DL_GLOBAL | ||
20744 | # define LT_DLGLOBAL DL_GLOBAL | ||
20745 | # else | ||
20746 | # define LT_DLGLOBAL 0 | ||
20747 | # endif | ||
20748 | #endif | ||
20749 | |||
20750 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | ||
20751 | find out it does not work in some platform. */ | ||
20752 | #ifndef LT_DLLAZY_OR_NOW | ||
20753 | # ifdef RTLD_LAZY | ||
20754 | # define LT_DLLAZY_OR_NOW RTLD_LAZY | ||
20755 | # else | ||
20756 | # ifdef DL_LAZY | ||
20757 | # define LT_DLLAZY_OR_NOW DL_LAZY | ||
20758 | # else | ||
20759 | # ifdef RTLD_NOW | ||
20760 | # define LT_DLLAZY_OR_NOW RTLD_NOW | ||
20761 | # else | ||
20762 | # ifdef DL_NOW | ||
20763 | # define LT_DLLAZY_OR_NOW DL_NOW | ||
20764 | # else | ||
20765 | # define LT_DLLAZY_OR_NOW 0 | ||
20766 | # endif | ||
20767 | # endif | ||
20768 | # endif | ||
20769 | # endif | ||
20770 | #endif | ||
20771 | |||
20772 | #ifdef __cplusplus | ||
20773 | extern "C" void exit (int); | ||
20774 | #endif | ||
20775 | |||
20776 | void fnord() { int i=42;} | ||
20777 | int main () | ||
20778 | { | ||
20779 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | ||
20780 | int status = $lt_dlunknown; | ||
20781 | |||
20782 | if (self) | ||
20783 | { | ||
20784 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | ||
20785 | else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | ||
20786 | /* dlclose (self); */ | ||
20787 | } | ||
20788 | |||
20789 | exit (status); | ||
20790 | } | ||
20791 | EOF | ||
20792 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
20793 | (eval $ac_link) 2>&5 | ||
20794 | ac_status=$? | ||
20795 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20796 | (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then | ||
20797 | (./conftest; exit; ) 2>/dev/null | ||
20798 | lt_status=$? | ||
20799 | case x$lt_status in | ||
20800 | x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;; | ||
20801 | x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;; | ||
20802 | x$lt_unknown|x*) ;; | ||
20803 | esac | ||
20804 | else : | ||
20805 | # compilation failed | ||
20806 | |||
20807 | fi | ||
20808 | fi | ||
20809 | rm -fr conftest* | ||
20810 | |||
20811 | LIBS="$save_LIBS" | ||
20812 | |||
20813 | fi | ||
20814 | echo "$as_me:$LINENO: result: $libltdl_cv_need_uscore" >&5 | ||
20815 | echo "${ECHO_T}$libltdl_cv_need_uscore" >&6 | ||
20816 | fi | ||
20817 | fi | ||
20818 | |||
20819 | if test x"$libltdl_cv_need_uscore" = xyes; then | ||
20820 | |||
20821 | cat >>confdefs.h <<\_ACEOF | ||
20822 | #define NEED_USCORE 1 | ||
20823 | _ACEOF | ||
20824 | |||
20825 | fi | ||
20826 | |||
20827 | |||
20828 | echo "$as_me:$LINENO: checking whether deplibs are loaded by dlopen" >&5 | ||
20829 | echo $ECHO_N "checking whether deplibs are loaded by dlopen... $ECHO_C" >&6 | ||
20830 | if test "${libltdl_cv_sys_dlopen_deplibs+set}" = set; then | ||
20831 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20832 | else | ||
20833 | # PORTME does your system automatically load deplibs for dlopen? | ||
20834 | # or its logical equivalent (e.g. shl_load for HP-UX < 11) | ||
20835 | # For now, we just catch OSes we know something about -- in the | ||
20836 | # future, we'll try test this programmatically. | ||
20837 | libltdl_cv_sys_dlopen_deplibs=unknown | ||
20838 | case "$host_os" in | ||
20839 | aix3*|aix4.1.*|aix4.2.*) | ||
20840 | # Unknown whether this is true for these versions of AIX, but | ||
20841 | # we want this `case' here to explicitly catch those versions. | ||
20842 | libltdl_cv_sys_dlopen_deplibs=unknown | ||
20843 | ;; | ||
20844 | aix[45]*) | ||
20845 | libltdl_cv_sys_dlopen_deplibs=yes | ||
20846 | ;; | ||
20847 | darwin*) | ||
20848 | # Assuming the user has installed a libdl from somewhere, this is true | ||
20849 | # If you are looking for one http://www.opendarwin.org/projects/dlcompat | ||
20850 | libltdl_cv_sys_dlopen_deplibs=yes | ||
20851 | ;; | ||
20852 | gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) | ||
20853 | # GNU and its variants, using gnu ld.so (Glibc) | ||
20854 | libltdl_cv_sys_dlopen_deplibs=yes | ||
20855 | ;; | ||
20856 | hpux10*|hpux11*) | ||
20857 | libltdl_cv_sys_dlopen_deplibs=yes | ||
20858 | ;; | ||
20859 | irix[12345]*|irix6.[01]*) | ||
20860 | # Catch all versions of IRIX before 6.2, and indicate that we don't | ||
20861 | # know how it worked for any of those versions. | ||
20862 | libltdl_cv_sys_dlopen_deplibs=unknown | ||
20863 | ;; | ||
20864 | irix*) | ||
20865 | # The case above catches anything before 6.2, and it's known that | ||
20866 | # at 6.2 and later dlopen does load deplibs. | ||
20867 | libltdl_cv_sys_dlopen_deplibs=yes | ||
20868 | ;; | ||
20869 | netbsd* | netbsdelf*-gnu) | ||
20870 | libltdl_cv_sys_dlopen_deplibs=yes | ||
20871 | ;; | ||
20872 | openbsd*) | ||
20873 | libltdl_cv_sys_dlopen_deplibs=yes | ||
20874 | ;; | ||
20875 | osf[1234]*) | ||
20876 | # dlopen did load deplibs (at least at 4.x), but until the 5.x series, | ||
20877 | # it did *not* use an RPATH in a shared library to find objects the | ||
20878 | # library depends on, so we explictly say `no'. | ||
20879 | libltdl_cv_sys_dlopen_deplibs=no | ||
20880 | ;; | ||
20881 | osf5.0|osf5.0a|osf5.1) | ||
20882 | # dlopen *does* load deplibs and with the right loader patch applied | ||
20883 | # it even uses RPATH in a shared library to search for shared objects | ||
20884 | # that the library depends on, but there's no easy way to know if that | ||
20885 | # patch is installed. Since this is the case, all we can really | ||
20886 | # say is unknown -- it depends on the patch being installed. If | ||
20887 | # it is, this changes to `yes'. Without it, it would be `no'. | ||
20888 | libltdl_cv_sys_dlopen_deplibs=unknown | ||
20889 | ;; | ||
20890 | osf*) | ||
20891 | # the two cases above should catch all versions of osf <= 5.1. Read | ||
20892 | # the comments above for what we know about them. | ||
20893 | # At > 5.1, deplibs are loaded *and* any RPATH in a shared library | ||
20894 | # is used to find them so we can finally say `yes'. | ||
20895 | libltdl_cv_sys_dlopen_deplibs=yes | ||
20896 | ;; | ||
20897 | solaris*) | ||
20898 | libltdl_cv_sys_dlopen_deplibs=yes | ||
20899 | ;; | ||
20900 | esac | ||
20901 | |||
20902 | fi | ||
20903 | echo "$as_me:$LINENO: result: $libltdl_cv_sys_dlopen_deplibs" >&5 | ||
20904 | echo "${ECHO_T}$libltdl_cv_sys_dlopen_deplibs" >&6 | ||
20905 | if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then | ||
20906 | |||
20907 | cat >>confdefs.h <<\_ACEOF | ||
20908 | #define LTDL_DLOPEN_DEPLIBS 1 | ||
20909 | _ACEOF | ||
20910 | |||
20911 | fi | ||
20912 | |||
20913 | |||
20914 | for ac_header in argz.h | ||
20915 | do | ||
20916 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | ||
20917 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
20918 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
20919 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
20920 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
20921 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
20922 | fi | ||
20923 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
20924 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
20925 | else | ||
20926 | # Is the header compilable? | ||
20927 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | ||
20928 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | ||
20929 | cat >conftest.$ac_ext <<_ACEOF | ||
20930 | /* confdefs.h. */ | ||
20931 | _ACEOF | ||
20932 | cat confdefs.h >>conftest.$ac_ext | ||
20933 | cat >>conftest.$ac_ext <<_ACEOF | ||
20934 | /* end confdefs.h. */ | ||
20935 | $ac_includes_default | ||
20936 | #include <$ac_header> | ||
20937 | _ACEOF | ||
20938 | rm -f conftest.$ac_objext | ||
20939 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
20940 | (eval $ac_compile) 2>conftest.er1 | ||
20941 | ac_status=$? | ||
20942 | grep -v '^ *+' conftest.er1 >conftest.err | ||
20943 | rm -f conftest.er1 | ||
20944 | cat conftest.err >&5 | ||
20945 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20946 | (exit $ac_status); } && | ||
20947 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
20948 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20949 | (eval $ac_try) 2>&5 | ||
20950 | ac_status=$? | ||
20951 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20952 | (exit $ac_status); }; } && | ||
20953 | { ac_try='test -s conftest.$ac_objext' | ||
20954 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
20955 | (eval $ac_try) 2>&5 | ||
20956 | ac_status=$? | ||
20957 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20958 | (exit $ac_status); }; }; then | ||
20959 | ac_header_compiler=yes | ||
20960 | else | ||
20961 | echo "$as_me: failed program was:" >&5 | ||
20962 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
20963 | |||
20964 | ac_header_compiler=no | ||
20965 | fi | ||
20966 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
20967 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | ||
20968 | echo "${ECHO_T}$ac_header_compiler" >&6 | ||
20969 | |||
20970 | # Is the header present? | ||
20971 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | ||
20972 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | ||
20973 | cat >conftest.$ac_ext <<_ACEOF | ||
20974 | /* confdefs.h. */ | ||
20975 | _ACEOF | ||
20976 | cat confdefs.h >>conftest.$ac_ext | ||
20977 | cat >>conftest.$ac_ext <<_ACEOF | ||
20978 | /* end confdefs.h. */ | ||
20979 | #include <$ac_header> | ||
20980 | _ACEOF | ||
20981 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
20982 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
20983 | ac_status=$? | ||
20984 | grep -v '^ *+' conftest.er1 >conftest.err | ||
20985 | rm -f conftest.er1 | ||
20986 | cat conftest.err >&5 | ||
20987 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
20988 | (exit $ac_status); } >/dev/null; then | ||
20989 | if test -s conftest.err; then | ||
20990 | ac_cpp_err=$ac_c_preproc_warn_flag | ||
20991 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | ||
20992 | else | ||
20993 | ac_cpp_err= | ||
20994 | fi | ||
20995 | else | ||
20996 | ac_cpp_err=yes | ||
20997 | fi | ||
20998 | if test -z "$ac_cpp_err"; then | ||
20999 | ac_header_preproc=yes | ||
21000 | else | ||
21001 | echo "$as_me: failed program was:" >&5 | ||
21002 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21003 | |||
21004 | ac_header_preproc=no | ||
21005 | fi | ||
21006 | rm -f conftest.err conftest.$ac_ext | ||
21007 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | ||
21008 | echo "${ECHO_T}$ac_header_preproc" >&6 | ||
21009 | |||
21010 | # So? What about this header? | ||
21011 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | ||
21012 | yes:no: ) | ||
21013 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | ||
21014 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | ||
21015 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | ||
21016 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | ||
21017 | ac_header_preproc=yes | ||
21018 | ;; | ||
21019 | no:yes:* ) | ||
21020 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | ||
21021 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | ||
21022 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | ||
21023 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | ||
21024 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | ||
21025 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | ||
21026 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | ||
21027 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | ||
21028 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | ||
21029 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | ||
21030 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | ||
21031 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | ||
21032 | ( | ||
21033 | cat <<\_ASBOX | ||
21034 | ## ---------------------------------- ## | ||
21035 | ## Report this to bug-libtool@gnu.org ## | ||
21036 | ## ---------------------------------- ## | ||
21037 | _ASBOX | ||
21038 | ) | | ||
21039 | sed "s/^/$as_me: WARNING: /" >&2 | ||
21040 | ;; | ||
21041 | esac | ||
21042 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
21043 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
21044 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
21045 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21046 | else | ||
21047 | eval "$as_ac_Header=\$ac_header_preproc" | ||
21048 | fi | ||
21049 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
21050 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
21051 | |||
21052 | fi | ||
21053 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | ||
21054 | cat >>confdefs.h <<_ACEOF | ||
21055 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | ||
21056 | _ACEOF | ||
21057 | |||
21058 | fi | ||
21059 | |||
21060 | done | ||
21061 | |||
21062 | |||
21063 | echo "$as_me:$LINENO: checking for error_t" >&5 | ||
21064 | echo $ECHO_N "checking for error_t... $ECHO_C" >&6 | ||
21065 | if test "${ac_cv_type_error_t+set}" = set; then | ||
21066 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21067 | else | ||
21068 | cat >conftest.$ac_ext <<_ACEOF | ||
21069 | /* confdefs.h. */ | ||
21070 | _ACEOF | ||
21071 | cat confdefs.h >>conftest.$ac_ext | ||
21072 | cat >>conftest.$ac_ext <<_ACEOF | ||
21073 | /* end confdefs.h. */ | ||
21074 | #if HAVE_ARGZ_H | ||
21075 | # include <argz.h> | ||
21076 | #endif | ||
21077 | |||
21078 | int | ||
21079 | main () | ||
21080 | { | ||
21081 | if ((error_t *) 0) | ||
21082 | return 0; | ||
21083 | if (sizeof (error_t)) | ||
21084 | return 0; | ||
21085 | ; | ||
21086 | return 0; | ||
21087 | } | ||
21088 | _ACEOF | ||
21089 | rm -f conftest.$ac_objext | ||
21090 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
21091 | (eval $ac_compile) 2>conftest.er1 | ||
21092 | ac_status=$? | ||
21093 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21094 | rm -f conftest.er1 | ||
21095 | cat conftest.err >&5 | ||
21096 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21097 | (exit $ac_status); } && | ||
21098 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
21099 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21100 | (eval $ac_try) 2>&5 | ||
21101 | ac_status=$? | ||
21102 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21103 | (exit $ac_status); }; } && | ||
21104 | { ac_try='test -s conftest.$ac_objext' | ||
21105 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21106 | (eval $ac_try) 2>&5 | ||
21107 | ac_status=$? | ||
21108 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21109 | (exit $ac_status); }; }; then | ||
21110 | ac_cv_type_error_t=yes | ||
21111 | else | ||
21112 | echo "$as_me: failed program was:" >&5 | ||
21113 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21114 | |||
21115 | ac_cv_type_error_t=no | ||
21116 | fi | ||
21117 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
21118 | fi | ||
21119 | echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 | ||
21120 | echo "${ECHO_T}$ac_cv_type_error_t" >&6 | ||
21121 | if test $ac_cv_type_error_t = yes; then | ||
21122 | |||
21123 | cat >>confdefs.h <<_ACEOF | ||
21124 | #define HAVE_ERROR_T 1 | ||
21125 | _ACEOF | ||
21126 | |||
21127 | |||
21128 | else | ||
21129 | |||
21130 | cat >>confdefs.h <<\_ACEOF | ||
21131 | #define error_t int | ||
21132 | _ACEOF | ||
21133 | |||
21134 | fi | ||
21135 | |||
21136 | |||
21137 | |||
21138 | |||
21139 | |||
21140 | |||
21141 | |||
21142 | for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify | ||
21143 | do | ||
21144 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | ||
21145 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | ||
21146 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | ||
21147 | if eval "test \"\${$as_ac_var+set}\" = set"; then | ||
21148 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21149 | else | ||
21150 | cat >conftest.$ac_ext <<_ACEOF | ||
21151 | /* confdefs.h. */ | ||
21152 | _ACEOF | ||
21153 | cat confdefs.h >>conftest.$ac_ext | ||
21154 | cat >>conftest.$ac_ext <<_ACEOF | ||
21155 | /* end confdefs.h. */ | ||
21156 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | ||
21157 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
21158 | #define $ac_func innocuous_$ac_func | ||
21159 | |||
21160 | /* System header to define __stub macros and hopefully few prototypes, | ||
21161 | which can conflict with char $ac_func (); below. | ||
21162 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
21163 | <limits.h> exists even on freestanding compilers. */ | ||
21164 | |||
21165 | #ifdef __STDC__ | ||
21166 | # include <limits.h> | ||
21167 | #else | ||
21168 | # include <assert.h> | ||
21169 | #endif | ||
21170 | |||
21171 | #undef $ac_func | ||
21172 | |||
21173 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
21174 | #ifdef __cplusplus | ||
21175 | extern "C" | ||
21176 | { | ||
21177 | #endif | ||
21178 | /* We use char because int might match the return type of a gcc2 | ||
21179 | builtin and then its argument prototype would still apply. */ | ||
21180 | char $ac_func (); | ||
21181 | /* The GNU C library defines this for functions which it implements | ||
21182 | to always fail with ENOSYS. Some functions are actually named | ||
21183 | something starting with __ and the normal name is an alias. */ | ||
21184 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | ||
21185 | choke me | ||
21186 | #else | ||
21187 | char (*f) () = $ac_func; | ||
21188 | #endif | ||
21189 | #ifdef __cplusplus | ||
21190 | } | ||
21191 | #endif | ||
21192 | |||
21193 | int | ||
21194 | main () | ||
21195 | { | ||
21196 | return f != $ac_func; | ||
21197 | ; | ||
21198 | return 0; | ||
21199 | } | ||
21200 | _ACEOF | ||
21201 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
21202 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
21203 | (eval $ac_link) 2>conftest.er1 | ||
21204 | ac_status=$? | ||
21205 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21206 | rm -f conftest.er1 | ||
21207 | cat conftest.err >&5 | ||
21208 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21209 | (exit $ac_status); } && | ||
21210 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
21211 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21212 | (eval $ac_try) 2>&5 | ||
21213 | ac_status=$? | ||
21214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21215 | (exit $ac_status); }; } && | ||
21216 | { ac_try='test -s conftest$ac_exeext' | ||
21217 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21218 | (eval $ac_try) 2>&5 | ||
21219 | ac_status=$? | ||
21220 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21221 | (exit $ac_status); }; }; then | ||
21222 | eval "$as_ac_var=yes" | ||
21223 | else | ||
21224 | echo "$as_me: failed program was:" >&5 | ||
21225 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21226 | |||
21227 | eval "$as_ac_var=no" | ||
21228 | fi | ||
21229 | rm -f conftest.err conftest.$ac_objext \ | ||
21230 | conftest$ac_exeext conftest.$ac_ext | ||
21231 | fi | ||
21232 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | ||
21233 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | ||
21234 | if test `eval echo '${'$as_ac_var'}'` = yes; then | ||
21235 | cat >>confdefs.h <<_ACEOF | ||
21236 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | ||
21237 | _ACEOF | ||
21238 | |||
21239 | fi | ||
21240 | done | ||
21241 | |||
21242 | |||
21243 | |||
21244 | |||
21245 | |||
21246 | |||
21247 | |||
21248 | |||
21249 | |||
21250 | |||
21251 | |||
21252 | |||
21253 | |||
21254 | |||
21255 | |||
21256 | |||
21257 | |||
21258 | |||
21259 | |||
21260 | |||
21261 | |||
21262 | |||
21263 | |||
21264 | |||
21265 | |||
21266 | |||
21267 | |||
21268 | |||
21269 | for ac_header in assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ | ||
21270 | stdio.h unistd.h | ||
21271 | do | ||
21272 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | ||
21273 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
21274 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
21275 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
21276 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
21277 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21278 | fi | ||
21279 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
21280 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
21281 | else | ||
21282 | # Is the header compilable? | ||
21283 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | ||
21284 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | ||
21285 | cat >conftest.$ac_ext <<_ACEOF | ||
21286 | /* confdefs.h. */ | ||
21287 | _ACEOF | ||
21288 | cat confdefs.h >>conftest.$ac_ext | ||
21289 | cat >>conftest.$ac_ext <<_ACEOF | ||
21290 | /* end confdefs.h. */ | ||
21291 | $ac_includes_default | ||
21292 | #include <$ac_header> | ||
21293 | _ACEOF | ||
21294 | rm -f conftest.$ac_objext | ||
21295 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
21296 | (eval $ac_compile) 2>conftest.er1 | ||
21297 | ac_status=$? | ||
21298 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21299 | rm -f conftest.er1 | ||
21300 | cat conftest.err >&5 | ||
21301 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21302 | (exit $ac_status); } && | ||
21303 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
21304 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21305 | (eval $ac_try) 2>&5 | ||
21306 | ac_status=$? | ||
21307 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21308 | (exit $ac_status); }; } && | ||
21309 | { ac_try='test -s conftest.$ac_objext' | ||
21310 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21311 | (eval $ac_try) 2>&5 | ||
21312 | ac_status=$? | ||
21313 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21314 | (exit $ac_status); }; }; then | ||
21315 | ac_header_compiler=yes | ||
21316 | else | ||
21317 | echo "$as_me: failed program was:" >&5 | ||
21318 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21319 | |||
21320 | ac_header_compiler=no | ||
21321 | fi | ||
21322 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
21323 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | ||
21324 | echo "${ECHO_T}$ac_header_compiler" >&6 | ||
21325 | |||
21326 | # Is the header present? | ||
21327 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | ||
21328 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | ||
21329 | cat >conftest.$ac_ext <<_ACEOF | ||
21330 | /* confdefs.h. */ | ||
21331 | _ACEOF | ||
21332 | cat confdefs.h >>conftest.$ac_ext | ||
21333 | cat >>conftest.$ac_ext <<_ACEOF | ||
21334 | /* end confdefs.h. */ | ||
21335 | #include <$ac_header> | ||
21336 | _ACEOF | ||
21337 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
21338 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
21339 | ac_status=$? | ||
21340 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21341 | rm -f conftest.er1 | ||
21342 | cat conftest.err >&5 | ||
21343 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21344 | (exit $ac_status); } >/dev/null; then | ||
21345 | if test -s conftest.err; then | ||
21346 | ac_cpp_err=$ac_c_preproc_warn_flag | ||
21347 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | ||
21348 | else | ||
21349 | ac_cpp_err= | ||
21350 | fi | ||
21351 | else | ||
21352 | ac_cpp_err=yes | ||
21353 | fi | ||
21354 | if test -z "$ac_cpp_err"; then | ||
21355 | ac_header_preproc=yes | ||
21356 | else | ||
21357 | echo "$as_me: failed program was:" >&5 | ||
21358 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21359 | |||
21360 | ac_header_preproc=no | ||
21361 | fi | ||
21362 | rm -f conftest.err conftest.$ac_ext | ||
21363 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | ||
21364 | echo "${ECHO_T}$ac_header_preproc" >&6 | ||
21365 | |||
21366 | # So? What about this header? | ||
21367 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | ||
21368 | yes:no: ) | ||
21369 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | ||
21370 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | ||
21371 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | ||
21372 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | ||
21373 | ac_header_preproc=yes | ||
21374 | ;; | ||
21375 | no:yes:* ) | ||
21376 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | ||
21377 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | ||
21378 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | ||
21379 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | ||
21380 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | ||
21381 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | ||
21382 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | ||
21383 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | ||
21384 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | ||
21385 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | ||
21386 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | ||
21387 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | ||
21388 | ( | ||
21389 | cat <<\_ASBOX | ||
21390 | ## ---------------------------------- ## | ||
21391 | ## Report this to bug-libtool@gnu.org ## | ||
21392 | ## ---------------------------------- ## | ||
21393 | _ASBOX | ||
21394 | ) | | ||
21395 | sed "s/^/$as_me: WARNING: /" >&2 | ||
21396 | ;; | ||
21397 | esac | ||
21398 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
21399 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
21400 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
21401 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21402 | else | ||
21403 | eval "$as_ac_Header=\$ac_header_preproc" | ||
21404 | fi | ||
21405 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
21406 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
21407 | |||
21408 | fi | ||
21409 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | ||
21410 | cat >>confdefs.h <<_ACEOF | ||
21411 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | ||
21412 | _ACEOF | ||
21413 | |||
21414 | fi | ||
21415 | |||
21416 | done | ||
21417 | |||
21418 | |||
21419 | |||
21420 | |||
21421 | |||
21422 | for ac_header in dl.h sys/dl.h dld.h mach-o/dyld.h | ||
21423 | do | ||
21424 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | ||
21425 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
21426 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
21427 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
21428 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
21429 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21430 | fi | ||
21431 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
21432 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
21433 | else | ||
21434 | # Is the header compilable? | ||
21435 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | ||
21436 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | ||
21437 | cat >conftest.$ac_ext <<_ACEOF | ||
21438 | /* confdefs.h. */ | ||
21439 | _ACEOF | ||
21440 | cat confdefs.h >>conftest.$ac_ext | ||
21441 | cat >>conftest.$ac_ext <<_ACEOF | ||
21442 | /* end confdefs.h. */ | ||
21443 | $ac_includes_default | ||
21444 | #include <$ac_header> | ||
21445 | _ACEOF | ||
21446 | rm -f conftest.$ac_objext | ||
21447 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
21448 | (eval $ac_compile) 2>conftest.er1 | ||
21449 | ac_status=$? | ||
21450 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21451 | rm -f conftest.er1 | ||
21452 | cat conftest.err >&5 | ||
21453 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21454 | (exit $ac_status); } && | ||
21455 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
21456 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21457 | (eval $ac_try) 2>&5 | ||
21458 | ac_status=$? | ||
21459 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21460 | (exit $ac_status); }; } && | ||
21461 | { ac_try='test -s conftest.$ac_objext' | ||
21462 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21463 | (eval $ac_try) 2>&5 | ||
21464 | ac_status=$? | ||
21465 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21466 | (exit $ac_status); }; }; then | ||
21467 | ac_header_compiler=yes | ||
21468 | else | ||
21469 | echo "$as_me: failed program was:" >&5 | ||
21470 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21471 | |||
21472 | ac_header_compiler=no | ||
21473 | fi | ||
21474 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
21475 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | ||
21476 | echo "${ECHO_T}$ac_header_compiler" >&6 | ||
21477 | |||
21478 | # Is the header present? | ||
21479 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | ||
21480 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | ||
21481 | cat >conftest.$ac_ext <<_ACEOF | ||
21482 | /* confdefs.h. */ | ||
21483 | _ACEOF | ||
21484 | cat confdefs.h >>conftest.$ac_ext | ||
21485 | cat >>conftest.$ac_ext <<_ACEOF | ||
21486 | /* end confdefs.h. */ | ||
21487 | #include <$ac_header> | ||
21488 | _ACEOF | ||
21489 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
21490 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
21491 | ac_status=$? | ||
21492 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21493 | rm -f conftest.er1 | ||
21494 | cat conftest.err >&5 | ||
21495 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21496 | (exit $ac_status); } >/dev/null; then | ||
21497 | if test -s conftest.err; then | ||
21498 | ac_cpp_err=$ac_c_preproc_warn_flag | ||
21499 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | ||
21500 | else | ||
21501 | ac_cpp_err= | ||
21502 | fi | ||
21503 | else | ||
21504 | ac_cpp_err=yes | ||
21505 | fi | ||
21506 | if test -z "$ac_cpp_err"; then | ||
21507 | ac_header_preproc=yes | ||
21508 | else | ||
21509 | echo "$as_me: failed program was:" >&5 | ||
21510 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21511 | |||
21512 | ac_header_preproc=no | ||
21513 | fi | ||
21514 | rm -f conftest.err conftest.$ac_ext | ||
21515 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | ||
21516 | echo "${ECHO_T}$ac_header_preproc" >&6 | ||
21517 | |||
21518 | # So? What about this header? | ||
21519 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | ||
21520 | yes:no: ) | ||
21521 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | ||
21522 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | ||
21523 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | ||
21524 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | ||
21525 | ac_header_preproc=yes | ||
21526 | ;; | ||
21527 | no:yes:* ) | ||
21528 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | ||
21529 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | ||
21530 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | ||
21531 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | ||
21532 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | ||
21533 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | ||
21534 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | ||
21535 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | ||
21536 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | ||
21537 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | ||
21538 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | ||
21539 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | ||
21540 | ( | ||
21541 | cat <<\_ASBOX | ||
21542 | ## ---------------------------------- ## | ||
21543 | ## Report this to bug-libtool@gnu.org ## | ||
21544 | ## ---------------------------------- ## | ||
21545 | _ASBOX | ||
21546 | ) | | ||
21547 | sed "s/^/$as_me: WARNING: /" >&2 | ||
21548 | ;; | ||
21549 | esac | ||
21550 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
21551 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
21552 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
21553 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21554 | else | ||
21555 | eval "$as_ac_Header=\$ac_header_preproc" | ||
21556 | fi | ||
21557 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
21558 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
21559 | |||
21560 | fi | ||
21561 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | ||
21562 | cat >>confdefs.h <<_ACEOF | ||
21563 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | ||
21564 | _ACEOF | ||
21565 | |||
21566 | fi | ||
21567 | |||
21568 | done | ||
21569 | |||
21570 | |||
21571 | |||
21572 | for ac_header in string.h strings.h | ||
21573 | do | ||
21574 | as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` | ||
21575 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
21576 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
21577 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
21578 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
21579 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21580 | fi | ||
21581 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
21582 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
21583 | else | ||
21584 | # Is the header compilable? | ||
21585 | echo "$as_me:$LINENO: checking $ac_header usability" >&5 | ||
21586 | echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 | ||
21587 | cat >conftest.$ac_ext <<_ACEOF | ||
21588 | /* confdefs.h. */ | ||
21589 | _ACEOF | ||
21590 | cat confdefs.h >>conftest.$ac_ext | ||
21591 | cat >>conftest.$ac_ext <<_ACEOF | ||
21592 | /* end confdefs.h. */ | ||
21593 | $ac_includes_default | ||
21594 | #include <$ac_header> | ||
21595 | _ACEOF | ||
21596 | rm -f conftest.$ac_objext | ||
21597 | if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||
21598 | (eval $ac_compile) 2>conftest.er1 | ||
21599 | ac_status=$? | ||
21600 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21601 | rm -f conftest.er1 | ||
21602 | cat conftest.err >&5 | ||
21603 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21604 | (exit $ac_status); } && | ||
21605 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
21606 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21607 | (eval $ac_try) 2>&5 | ||
21608 | ac_status=$? | ||
21609 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21610 | (exit $ac_status); }; } && | ||
21611 | { ac_try='test -s conftest.$ac_objext' | ||
21612 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21613 | (eval $ac_try) 2>&5 | ||
21614 | ac_status=$? | ||
21615 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21616 | (exit $ac_status); }; }; then | ||
21617 | ac_header_compiler=yes | ||
21618 | else | ||
21619 | echo "$as_me: failed program was:" >&5 | ||
21620 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21621 | |||
21622 | ac_header_compiler=no | ||
21623 | fi | ||
21624 | rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | ||
21625 | echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 | ||
21626 | echo "${ECHO_T}$ac_header_compiler" >&6 | ||
21627 | |||
21628 | # Is the header present? | ||
21629 | echo "$as_me:$LINENO: checking $ac_header presence" >&5 | ||
21630 | echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 | ||
21631 | cat >conftest.$ac_ext <<_ACEOF | ||
21632 | /* confdefs.h. */ | ||
21633 | _ACEOF | ||
21634 | cat confdefs.h >>conftest.$ac_ext | ||
21635 | cat >>conftest.$ac_ext <<_ACEOF | ||
21636 | /* end confdefs.h. */ | ||
21637 | #include <$ac_header> | ||
21638 | _ACEOF | ||
21639 | if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 | ||
21640 | (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 | ||
21641 | ac_status=$? | ||
21642 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21643 | rm -f conftest.er1 | ||
21644 | cat conftest.err >&5 | ||
21645 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21646 | (exit $ac_status); } >/dev/null; then | ||
21647 | if test -s conftest.err; then | ||
21648 | ac_cpp_err=$ac_c_preproc_warn_flag | ||
21649 | ac_cpp_err=$ac_cpp_err$ac_c_werror_flag | ||
21650 | else | ||
21651 | ac_cpp_err= | ||
21652 | fi | ||
21653 | else | ||
21654 | ac_cpp_err=yes | ||
21655 | fi | ||
21656 | if test -z "$ac_cpp_err"; then | ||
21657 | ac_header_preproc=yes | ||
21658 | else | ||
21659 | echo "$as_me: failed program was:" >&5 | ||
21660 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21661 | |||
21662 | ac_header_preproc=no | ||
21663 | fi | ||
21664 | rm -f conftest.err conftest.$ac_ext | ||
21665 | echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 | ||
21666 | echo "${ECHO_T}$ac_header_preproc" >&6 | ||
21667 | |||
21668 | # So? What about this header? | ||
21669 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in | ||
21670 | yes:no: ) | ||
21671 | { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 | ||
21672 | echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} | ||
21673 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 | ||
21674 | echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} | ||
21675 | ac_header_preproc=yes | ||
21676 | ;; | ||
21677 | no:yes:* ) | ||
21678 | { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 | ||
21679 | echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} | ||
21680 | { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 | ||
21681 | echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} | ||
21682 | { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 | ||
21683 | echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} | ||
21684 | { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 | ||
21685 | echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} | ||
21686 | { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 | ||
21687 | echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} | ||
21688 | { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 | ||
21689 | echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} | ||
21690 | ( | ||
21691 | cat <<\_ASBOX | ||
21692 | ## ---------------------------------- ## | ||
21693 | ## Report this to bug-libtool@gnu.org ## | ||
21694 | ## ---------------------------------- ## | ||
21695 | _ASBOX | ||
21696 | ) | | ||
21697 | sed "s/^/$as_me: WARNING: /" >&2 | ||
21698 | ;; | ||
21699 | esac | ||
21700 | echo "$as_me:$LINENO: checking for $ac_header" >&5 | ||
21701 | echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 | ||
21702 | if eval "test \"\${$as_ac_Header+set}\" = set"; then | ||
21703 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21704 | else | ||
21705 | eval "$as_ac_Header=\$ac_header_preproc" | ||
21706 | fi | ||
21707 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 | ||
21708 | echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 | ||
21709 | |||
21710 | fi | ||
21711 | if test `eval echo '${'$as_ac_Header'}'` = yes; then | ||
21712 | cat >>confdefs.h <<_ACEOF | ||
21713 | #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 | ||
21714 | _ACEOF | ||
21715 | break | ||
21716 | fi | ||
21717 | |||
21718 | done | ||
21719 | |||
21720 | |||
21721 | |||
21722 | |||
21723 | for ac_func in strchr index | ||
21724 | do | ||
21725 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | ||
21726 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | ||
21727 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | ||
21728 | if eval "test \"\${$as_ac_var+set}\" = set"; then | ||
21729 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21730 | else | ||
21731 | cat >conftest.$ac_ext <<_ACEOF | ||
21732 | /* confdefs.h. */ | ||
21733 | _ACEOF | ||
21734 | cat confdefs.h >>conftest.$ac_ext | ||
21735 | cat >>conftest.$ac_ext <<_ACEOF | ||
21736 | /* end confdefs.h. */ | ||
21737 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | ||
21738 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
21739 | #define $ac_func innocuous_$ac_func | ||
21740 | |||
21741 | /* System header to define __stub macros and hopefully few prototypes, | ||
21742 | which can conflict with char $ac_func (); below. | ||
21743 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
21744 | <limits.h> exists even on freestanding compilers. */ | ||
21745 | |||
21746 | #ifdef __STDC__ | ||
21747 | # include <limits.h> | ||
21748 | #else | ||
21749 | # include <assert.h> | ||
21750 | #endif | ||
21751 | |||
21752 | #undef $ac_func | ||
21753 | |||
21754 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
21755 | #ifdef __cplusplus | ||
21756 | extern "C" | ||
21757 | { | ||
21758 | #endif | ||
21759 | /* We use char because int might match the return type of a gcc2 | ||
21760 | builtin and then its argument prototype would still apply. */ | ||
21761 | char $ac_func (); | ||
21762 | /* The GNU C library defines this for functions which it implements | ||
21763 | to always fail with ENOSYS. Some functions are actually named | ||
21764 | something starting with __ and the normal name is an alias. */ | ||
21765 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | ||
21766 | choke me | ||
21767 | #else | ||
21768 | char (*f) () = $ac_func; | ||
21769 | #endif | ||
21770 | #ifdef __cplusplus | ||
21771 | } | ||
21772 | #endif | ||
21773 | |||
21774 | int | ||
21775 | main () | ||
21776 | { | ||
21777 | return f != $ac_func; | ||
21778 | ; | ||
21779 | return 0; | ||
21780 | } | ||
21781 | _ACEOF | ||
21782 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
21783 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
21784 | (eval $ac_link) 2>conftest.er1 | ||
21785 | ac_status=$? | ||
21786 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21787 | rm -f conftest.er1 | ||
21788 | cat conftest.err >&5 | ||
21789 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21790 | (exit $ac_status); } && | ||
21791 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
21792 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21793 | (eval $ac_try) 2>&5 | ||
21794 | ac_status=$? | ||
21795 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21796 | (exit $ac_status); }; } && | ||
21797 | { ac_try='test -s conftest$ac_exeext' | ||
21798 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21799 | (eval $ac_try) 2>&5 | ||
21800 | ac_status=$? | ||
21801 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21802 | (exit $ac_status); }; }; then | ||
21803 | eval "$as_ac_var=yes" | ||
21804 | else | ||
21805 | echo "$as_me: failed program was:" >&5 | ||
21806 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21807 | |||
21808 | eval "$as_ac_var=no" | ||
21809 | fi | ||
21810 | rm -f conftest.err conftest.$ac_objext \ | ||
21811 | conftest$ac_exeext conftest.$ac_ext | ||
21812 | fi | ||
21813 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | ||
21814 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | ||
21815 | if test `eval echo '${'$as_ac_var'}'` = yes; then | ||
21816 | cat >>confdefs.h <<_ACEOF | ||
21817 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | ||
21818 | _ACEOF | ||
21819 | break | ||
21820 | fi | ||
21821 | done | ||
21822 | |||
21823 | |||
21824 | |||
21825 | for ac_func in strrchr rindex | ||
21826 | do | ||
21827 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | ||
21828 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | ||
21829 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | ||
21830 | if eval "test \"\${$as_ac_var+set}\" = set"; then | ||
21831 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21832 | else | ||
21833 | cat >conftest.$ac_ext <<_ACEOF | ||
21834 | /* confdefs.h. */ | ||
21835 | _ACEOF | ||
21836 | cat confdefs.h >>conftest.$ac_ext | ||
21837 | cat >>conftest.$ac_ext <<_ACEOF | ||
21838 | /* end confdefs.h. */ | ||
21839 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | ||
21840 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
21841 | #define $ac_func innocuous_$ac_func | ||
21842 | |||
21843 | /* System header to define __stub macros and hopefully few prototypes, | ||
21844 | which can conflict with char $ac_func (); below. | ||
21845 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
21846 | <limits.h> exists even on freestanding compilers. */ | ||
21847 | |||
21848 | #ifdef __STDC__ | ||
21849 | # include <limits.h> | ||
21850 | #else | ||
21851 | # include <assert.h> | ||
21852 | #endif | ||
21853 | |||
21854 | #undef $ac_func | ||
21855 | |||
21856 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
21857 | #ifdef __cplusplus | ||
21858 | extern "C" | ||
21859 | { | ||
21860 | #endif | ||
21861 | /* We use char because int might match the return type of a gcc2 | ||
21862 | builtin and then its argument prototype would still apply. */ | ||
21863 | char $ac_func (); | ||
21864 | /* The GNU C library defines this for functions which it implements | ||
21865 | to always fail with ENOSYS. Some functions are actually named | ||
21866 | something starting with __ and the normal name is an alias. */ | ||
21867 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | ||
21868 | choke me | ||
21869 | #else | ||
21870 | char (*f) () = $ac_func; | ||
21871 | #endif | ||
21872 | #ifdef __cplusplus | ||
21873 | } | ||
21874 | #endif | ||
21875 | |||
21876 | int | ||
21877 | main () | ||
21878 | { | ||
21879 | return f != $ac_func; | ||
21880 | ; | ||
21881 | return 0; | ||
21882 | } | ||
21883 | _ACEOF | ||
21884 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
21885 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
21886 | (eval $ac_link) 2>conftest.er1 | ||
21887 | ac_status=$? | ||
21888 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21889 | rm -f conftest.er1 | ||
21890 | cat conftest.err >&5 | ||
21891 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21892 | (exit $ac_status); } && | ||
21893 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
21894 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21895 | (eval $ac_try) 2>&5 | ||
21896 | ac_status=$? | ||
21897 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21898 | (exit $ac_status); }; } && | ||
21899 | { ac_try='test -s conftest$ac_exeext' | ||
21900 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21901 | (eval $ac_try) 2>&5 | ||
21902 | ac_status=$? | ||
21903 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21904 | (exit $ac_status); }; }; then | ||
21905 | eval "$as_ac_var=yes" | ||
21906 | else | ||
21907 | echo "$as_me: failed program was:" >&5 | ||
21908 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
21909 | |||
21910 | eval "$as_ac_var=no" | ||
21911 | fi | ||
21912 | rm -f conftest.err conftest.$ac_objext \ | ||
21913 | conftest$ac_exeext conftest.$ac_ext | ||
21914 | fi | ||
21915 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | ||
21916 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | ||
21917 | if test `eval echo '${'$as_ac_var'}'` = yes; then | ||
21918 | cat >>confdefs.h <<_ACEOF | ||
21919 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | ||
21920 | _ACEOF | ||
21921 | break | ||
21922 | fi | ||
21923 | done | ||
21924 | |||
21925 | |||
21926 | |||
21927 | for ac_func in memcpy bcopy | ||
21928 | do | ||
21929 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | ||
21930 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | ||
21931 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | ||
21932 | if eval "test \"\${$as_ac_var+set}\" = set"; then | ||
21933 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
21934 | else | ||
21935 | cat >conftest.$ac_ext <<_ACEOF | ||
21936 | /* confdefs.h. */ | ||
21937 | _ACEOF | ||
21938 | cat confdefs.h >>conftest.$ac_ext | ||
21939 | cat >>conftest.$ac_ext <<_ACEOF | ||
21940 | /* end confdefs.h. */ | ||
21941 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | ||
21942 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
21943 | #define $ac_func innocuous_$ac_func | ||
21944 | |||
21945 | /* System header to define __stub macros and hopefully few prototypes, | ||
21946 | which can conflict with char $ac_func (); below. | ||
21947 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
21948 | <limits.h> exists even on freestanding compilers. */ | ||
21949 | |||
21950 | #ifdef __STDC__ | ||
21951 | # include <limits.h> | ||
21952 | #else | ||
21953 | # include <assert.h> | ||
21954 | #endif | ||
21955 | |||
21956 | #undef $ac_func | ||
21957 | |||
21958 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
21959 | #ifdef __cplusplus | ||
21960 | extern "C" | ||
21961 | { | ||
21962 | #endif | ||
21963 | /* We use char because int might match the return type of a gcc2 | ||
21964 | builtin and then its argument prototype would still apply. */ | ||
21965 | char $ac_func (); | ||
21966 | /* The GNU C library defines this for functions which it implements | ||
21967 | to always fail with ENOSYS. Some functions are actually named | ||
21968 | something starting with __ and the normal name is an alias. */ | ||
21969 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | ||
21970 | choke me | ||
21971 | #else | ||
21972 | char (*f) () = $ac_func; | ||
21973 | #endif | ||
21974 | #ifdef __cplusplus | ||
21975 | } | ||
21976 | #endif | ||
21977 | |||
21978 | int | ||
21979 | main () | ||
21980 | { | ||
21981 | return f != $ac_func; | ||
21982 | ; | ||
21983 | return 0; | ||
21984 | } | ||
21985 | _ACEOF | ||
21986 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
21987 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
21988 | (eval $ac_link) 2>conftest.er1 | ||
21989 | ac_status=$? | ||
21990 | grep -v '^ *+' conftest.er1 >conftest.err | ||
21991 | rm -f conftest.er1 | ||
21992 | cat conftest.err >&5 | ||
21993 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
21994 | (exit $ac_status); } && | ||
21995 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
21996 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
21997 | (eval $ac_try) 2>&5 | ||
21998 | ac_status=$? | ||
21999 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
22000 | (exit $ac_status); }; } && | ||
22001 | { ac_try='test -s conftest$ac_exeext' | ||
22002 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
22003 | (eval $ac_try) 2>&5 | ||
22004 | ac_status=$? | ||
22005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
22006 | (exit $ac_status); }; }; then | ||
22007 | eval "$as_ac_var=yes" | ||
22008 | else | ||
22009 | echo "$as_me: failed program was:" >&5 | ||
22010 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
22011 | |||
22012 | eval "$as_ac_var=no" | ||
22013 | fi | ||
22014 | rm -f conftest.err conftest.$ac_objext \ | ||
22015 | conftest$ac_exeext conftest.$ac_ext | ||
22016 | fi | ||
22017 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | ||
22018 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | ||
22019 | if test `eval echo '${'$as_ac_var'}'` = yes; then | ||
22020 | cat >>confdefs.h <<_ACEOF | ||
22021 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | ||
22022 | _ACEOF | ||
22023 | break | ||
22024 | fi | ||
22025 | done | ||
22026 | |||
22027 | |||
22028 | |||
22029 | for ac_func in memmove strcmp | ||
22030 | do | ||
22031 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | ||
22032 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | ||
22033 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | ||
22034 | if eval "test \"\${$as_ac_var+set}\" = set"; then | ||
22035 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
22036 | else | ||
22037 | cat >conftest.$ac_ext <<_ACEOF | ||
22038 | /* confdefs.h. */ | ||
22039 | _ACEOF | ||
22040 | cat confdefs.h >>conftest.$ac_ext | ||
22041 | cat >>conftest.$ac_ext <<_ACEOF | ||
22042 | /* end confdefs.h. */ | ||
22043 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | ||
22044 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
22045 | #define $ac_func innocuous_$ac_func | ||
22046 | |||
22047 | /* System header to define __stub macros and hopefully few prototypes, | ||
22048 | which can conflict with char $ac_func (); below. | ||
22049 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
22050 | <limits.h> exists even on freestanding compilers. */ | ||
22051 | |||
22052 | #ifdef __STDC__ | ||
22053 | # include <limits.h> | ||
22054 | #else | ||
22055 | # include <assert.h> | ||
22056 | #endif | ||
22057 | |||
22058 | #undef $ac_func | ||
22059 | |||
22060 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
22061 | #ifdef __cplusplus | ||
22062 | extern "C" | ||
22063 | { | ||
22064 | #endif | ||
22065 | /* We use char because int might match the return type of a gcc2 | ||
22066 | builtin and then its argument prototype would still apply. */ | ||
22067 | char $ac_func (); | ||
22068 | /* The GNU C library defines this for functions which it implements | ||
22069 | to always fail with ENOSYS. Some functions are actually named | ||
22070 | something starting with __ and the normal name is an alias. */ | ||
22071 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | ||
22072 | choke me | ||
22073 | #else | ||
22074 | char (*f) () = $ac_func; | ||
22075 | #endif | ||
22076 | #ifdef __cplusplus | ||
22077 | } | ||
22078 | #endif | ||
22079 | |||
22080 | int | ||
22081 | main () | ||
22082 | { | ||
22083 | return f != $ac_func; | ||
22084 | ; | ||
22085 | return 0; | ||
22086 | } | ||
22087 | _ACEOF | ||
22088 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
22089 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
22090 | (eval $ac_link) 2>conftest.er1 | ||
22091 | ac_status=$? | ||
22092 | grep -v '^ *+' conftest.er1 >conftest.err | ||
22093 | rm -f conftest.er1 | ||
22094 | cat conftest.err >&5 | ||
22095 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
22096 | (exit $ac_status); } && | ||
22097 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
22098 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
22099 | (eval $ac_try) 2>&5 | ||
22100 | ac_status=$? | ||
22101 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
22102 | (exit $ac_status); }; } && | ||
22103 | { ac_try='test -s conftest$ac_exeext' | ||
22104 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
22105 | (eval $ac_try) 2>&5 | ||
22106 | ac_status=$? | ||
22107 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
22108 | (exit $ac_status); }; }; then | ||
22109 | eval "$as_ac_var=yes" | ||
22110 | else | ||
22111 | echo "$as_me: failed program was:" >&5 | ||
22112 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
22113 | |||
22114 | eval "$as_ac_var=no" | ||
22115 | fi | ||
22116 | rm -f conftest.err conftest.$ac_objext \ | ||
22117 | conftest$ac_exeext conftest.$ac_ext | ||
22118 | fi | ||
22119 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | ||
22120 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | ||
22121 | if test `eval echo '${'$as_ac_var'}'` = yes; then | ||
22122 | cat >>confdefs.h <<_ACEOF | ||
22123 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | ||
22124 | _ACEOF | ||
22125 | |||
22126 | fi | ||
22127 | done | ||
22128 | |||
22129 | |||
22130 | |||
22131 | |||
22132 | for ac_func in closedir opendir readdir | ||
22133 | do | ||
22134 | as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` | ||
22135 | echo "$as_me:$LINENO: checking for $ac_func" >&5 | ||
22136 | echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 | ||
22137 | if eval "test \"\${$as_ac_var+set}\" = set"; then | ||
22138 | echo $ECHO_N "(cached) $ECHO_C" >&6 | ||
22139 | else | ||
22140 | cat >conftest.$ac_ext <<_ACEOF | ||
22141 | /* confdefs.h. */ | ||
22142 | _ACEOF | ||
22143 | cat confdefs.h >>conftest.$ac_ext | ||
22144 | cat >>conftest.$ac_ext <<_ACEOF | ||
22145 | /* end confdefs.h. */ | ||
22146 | /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. | ||
22147 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | ||
22148 | #define $ac_func innocuous_$ac_func | ||
22149 | |||
22150 | /* System header to define __stub macros and hopefully few prototypes, | ||
22151 | which can conflict with char $ac_func (); below. | ||
22152 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since | ||
22153 | <limits.h> exists even on freestanding compilers. */ | ||
22154 | |||
22155 | #ifdef __STDC__ | ||
22156 | # include <limits.h> | ||
22157 | #else | ||
22158 | # include <assert.h> | ||
22159 | #endif | ||
22160 | |||
22161 | #undef $ac_func | ||
22162 | |||
22163 | /* Override any gcc2 internal prototype to avoid an error. */ | ||
22164 | #ifdef __cplusplus | ||
22165 | extern "C" | ||
22166 | { | ||
22167 | #endif | ||
22168 | /* We use char because int might match the return type of a gcc2 | ||
22169 | builtin and then its argument prototype would still apply. */ | ||
22170 | char $ac_func (); | ||
22171 | /* The GNU C library defines this for functions which it implements | ||
22172 | to always fail with ENOSYS. Some functions are actually named | ||
22173 | something starting with __ and the normal name is an alias. */ | ||
22174 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | ||
22175 | choke me | ||
22176 | #else | ||
22177 | char (*f) () = $ac_func; | ||
22178 | #endif | ||
22179 | #ifdef __cplusplus | ||
22180 | } | ||
22181 | #endif | ||
22182 | |||
22183 | int | ||
22184 | main () | ||
22185 | { | ||
22186 | return f != $ac_func; | ||
22187 | ; | ||
22188 | return 0; | ||
22189 | } | ||
22190 | _ACEOF | ||
22191 | rm -f conftest.$ac_objext conftest$ac_exeext | ||
22192 | if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | ||
22193 | (eval $ac_link) 2>conftest.er1 | ||
22194 | ac_status=$? | ||
22195 | grep -v '^ *+' conftest.er1 >conftest.err | ||
22196 | rm -f conftest.er1 | ||
22197 | cat conftest.err >&5 | ||
22198 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
22199 | (exit $ac_status); } && | ||
22200 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' | ||
22201 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
22202 | (eval $ac_try) 2>&5 | ||
22203 | ac_status=$? | ||
22204 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
22205 | (exit $ac_status); }; } && | ||
22206 | { ac_try='test -s conftest$ac_exeext' | ||
22207 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||
22208 | (eval $ac_try) 2>&5 | ||
22209 | ac_status=$? | ||
22210 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||
22211 | (exit $ac_status); }; }; then | ||
22212 | eval "$as_ac_var=yes" | ||
22213 | else | ||
22214 | echo "$as_me: failed program was:" >&5 | ||
22215 | sed 's/^/| /' conftest.$ac_ext >&5 | ||
22216 | |||
22217 | eval "$as_ac_var=no" | ||
22218 | fi | ||
22219 | rm -f conftest.err conftest.$ac_objext \ | ||
22220 | conftest$ac_exeext conftest.$ac_ext | ||
22221 | fi | ||
22222 | echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 | ||
22223 | echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 | ||
22224 | if test `eval echo '${'$as_ac_var'}'` = yes; then | ||
22225 | cat >>confdefs.h <<_ACEOF | ||
22226 | #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 | ||
22227 | _ACEOF | ||
22228 | |||
22229 | fi | ||
22230 | done | ||
22231 | |||
22232 | |||
22233 | |||
22234 | |||
22235 | ## -------- ## | ||
22236 | ## Outputs. ## | ||
22237 | ## -------- ## | ||
22238 | ac_config_files="$ac_config_files Makefile" | ||
22239 | |||
22240 | cat >confcache <<\_ACEOF | ||
22241 | # This file is a shell script that caches the results of configure | ||
22242 | # tests run on this system so they can be shared between configure | ||
22243 | # scripts and configure runs, see configure's option --config-cache. | ||
22244 | # It is not useful on other systems. If it contains results you don't | ||
22245 | # want to keep, you may remove or edit it. | ||
22246 | # | ||
22247 | # config.status only pays attention to the cache file if you give it | ||
22248 | # the --recheck option to rerun configure. | ||
22249 | # | ||
22250 | # `ac_cv_env_foo' variables (set or unset) will be overridden when | ||
22251 | # loading this file, other *unset* `ac_cv_foo' will be assigned the | ||
22252 | # following values. | ||
22253 | |||
22254 | _ACEOF | ||
22255 | |||
22256 | # The following way of writing the cache mishandles newlines in values, | ||
22257 | # but we know of no workaround that is simple, portable, and efficient. | ||
22258 | # So, don't put newlines in cache variables' values. | ||
22259 | # Ultrix sh set writes to stderr and can't be redirected directly, | ||
22260 | # and sets the high bit in the cache file unless we assign to the vars. | ||
22261 | { | ||
22262 | (set) 2>&1 | | ||
22263 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | ||
22264 | *ac_space=\ *) | ||
22265 | # `set' does not quote correctly, so add quotes (double-quote | ||
22266 | # substitution turns \\\\ into \\, and sed turns \\ into \). | ||
22267 | sed -n \ | ||
22268 | "s/'/'\\\\''/g; | ||
22269 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | ||
22270 | ;; | ||
22271 | *) | ||
22272 | # `set' quotes correctly as required by POSIX, so do not add quotes. | ||
22273 | sed -n \ | ||
22274 | "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" | ||
22275 | ;; | ||
22276 | esac; | ||
22277 | } | | ||
22278 | sed ' | ||
22279 | t clear | ||
22280 | : clear | ||
22281 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ | ||
22282 | t end | ||
22283 | /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | ||
22284 | : end' >>confcache | ||
22285 | if diff $cache_file confcache >/dev/null 2>&1; then :; else | ||
22286 | if test -w $cache_file; then | ||
22287 | test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" | ||
22288 | cat confcache >$cache_file | ||
22289 | else | ||
22290 | echo "not updating unwritable cache $cache_file" | ||
22291 | fi | ||
22292 | fi | ||
22293 | rm -f confcache | ||
22294 | |||
22295 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | ||
22296 | # Let make expand exec_prefix. | ||
22297 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | ||
22298 | |||
22299 | # VPATH may cause trouble with some makes, so we remove $(srcdir), | ||
22300 | # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and | ||
22301 | # trailing colons and then remove the whole line if VPATH becomes empty | ||
22302 | # (actually we leave an empty line to preserve line numbers). | ||
22303 | if test "x$srcdir" = x.; then | ||
22304 | ac_vpsub='/^[ ]*VPATH[ ]*=/{ | ||
22305 | s/:*\$(srcdir):*/:/; | ||
22306 | s/:*\${srcdir}:*/:/; | ||
22307 | s/:*@srcdir@:*/:/; | ||
22308 | s/^\([^=]*=[ ]*\):*/\1/; | ||
22309 | s/:*$//; | ||
22310 | s/^[^=]*=[ ]*$//; | ||
22311 | }' | ||
22312 | fi | ||
22313 | |||
22314 | DEFS=-DHAVE_CONFIG_H | ||
22315 | |||
22316 | ac_libobjs= | ||
22317 | ac_ltlibobjs= | ||
22318 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | ||
22319 | # 1. Remove the extension, and $U if already installed. | ||
22320 | ac_i=`echo "$ac_i" | | ||
22321 | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` | ||
22322 | # 2. Add them. | ||
22323 | ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" | ||
22324 | ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' | ||
22325 | done | ||
22326 | LIBOBJS=$ac_libobjs | ||
22327 | |||
22328 | LTLIBOBJS=$ac_ltlibobjs | ||
22329 | |||
22330 | |||
22331 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then | ||
22332 | { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. | ||
22333 | Usually this means the macro was only invoked conditionally." >&5 | ||
22334 | echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. | ||
22335 | Usually this means the macro was only invoked conditionally." >&2;} | ||
22336 | { (exit 1); exit 1; }; } | ||
22337 | fi | ||
22338 | if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then | ||
22339 | { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. | ||
22340 | Usually this means the macro was only invoked conditionally." >&5 | ||
22341 | echo "$as_me: error: conditional \"AMDEP\" was never defined. | ||
22342 | Usually this means the macro was only invoked conditionally." >&2;} | ||
22343 | { (exit 1); exit 1; }; } | ||
22344 | fi | ||
22345 | if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then | ||
22346 | { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. | ||
22347 | Usually this means the macro was only invoked conditionally." >&5 | ||
22348 | echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. | ||
22349 | Usually this means the macro was only invoked conditionally." >&2;} | ||
22350 | { (exit 1); exit 1; }; } | ||
22351 | fi | ||
22352 | if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then | ||
22353 | { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. | ||
22354 | Usually this means the macro was only invoked conditionally." >&5 | ||
22355 | echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. | ||
22356 | Usually this means the macro was only invoked conditionally." >&2;} | ||
22357 | { (exit 1); exit 1; }; } | ||
22358 | fi | ||
22359 | if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then | ||
22360 | { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. | ||
22361 | Usually this means the macro was only invoked conditionally." >&5 | ||
22362 | echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined. | ||
22363 | Usually this means the macro was only invoked conditionally." >&2;} | ||
22364 | { (exit 1); exit 1; }; } | ||
22365 | fi | ||
22366 | if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then | ||
22367 | { { echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined. | ||
22368 | Usually this means the macro was only invoked conditionally." >&5 | ||
22369 | echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined. | ||
22370 | Usually this means the macro was only invoked conditionally." >&2;} | ||
22371 | { (exit 1); exit 1; }; } | ||
22372 | fi | ||
22373 | |||
22374 | : ${CONFIG_STATUS=./config.status} | ||
22375 | ac_clean_files_save=$ac_clean_files | ||
22376 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | ||
22377 | { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 | ||
22378 | echo "$as_me: creating $CONFIG_STATUS" >&6;} | ||
22379 | cat >$CONFIG_STATUS <<_ACEOF | ||
22380 | #! $SHELL | ||
22381 | # Generated by $as_me. | ||
22382 | # Run this file to recreate the current configuration. | ||
22383 | # Compiler output produced by configure, useful for debugging | ||
22384 | # configure, is in config.log if it exists. | ||
22385 | |||
22386 | debug=false | ||
22387 | ac_cs_recheck=false | ||
22388 | ac_cs_silent=false | ||
22389 | SHELL=\${CONFIG_SHELL-$SHELL} | ||
22390 | _ACEOF | ||
22391 | |||
22392 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
22393 | ## --------------------- ## | ||
22394 | ## M4sh Initialization. ## | ||
22395 | ## --------------------- ## | ||
22396 | |||
22397 | # Be Bourne compatible | ||
22398 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then | ||
22399 | emulate sh | ||
22400 | NULLCMD=: | ||
22401 | # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which | ||
22402 | # is contrary to our usage. Disable this feature. | ||
22403 | alias -g '${1+"$@"}'='"$@"' | ||
22404 | elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then | ||
22405 | set -o posix | ||
22406 | fi | ||
22407 | DUALCASE=1; export DUALCASE # for MKS sh | ||
22408 | |||
22409 | # Support unset when possible. | ||
22410 | if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then | ||
22411 | as_unset=unset | ||
22412 | else | ||
22413 | as_unset=false | ||
22414 | fi | ||
22415 | |||
22416 | |||
22417 | # Work around bugs in pre-3.0 UWIN ksh. | ||
22418 | $as_unset ENV MAIL MAILPATH | ||
22419 | PS1='$ ' | ||
22420 | PS2='> ' | ||
22421 | PS4='+ ' | ||
22422 | |||
22423 | # NLS nuisances. | ||
22424 | for as_var in \ | ||
22425 | LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ | ||
22426 | LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ | ||
22427 | LC_TELEPHONE LC_TIME | ||
22428 | do | ||
22429 | if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then | ||
22430 | eval $as_var=C; export $as_var | ||
22431 | else | ||
22432 | $as_unset $as_var | ||
22433 | fi | ||
22434 | done | ||
22435 | |||
22436 | # Required to use basename. | ||
22437 | if expr a : '\(a\)' >/dev/null 2>&1; then | ||
22438 | as_expr=expr | ||
22439 | else | ||
22440 | as_expr=false | ||
22441 | fi | ||
22442 | |||
22443 | if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then | ||
22444 | as_basename=basename | ||
22445 | else | ||
22446 | as_basename=false | ||
22447 | fi | ||
22448 | |||
22449 | |||
22450 | # Name of the executable. | ||
22451 | as_me=`$as_basename "$0" || | ||
22452 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | ||
22453 | X"$0" : 'X\(//\)$' \| \ | ||
22454 | X"$0" : 'X\(/\)$' \| \ | ||
22455 | . : '\(.\)' 2>/dev/null || | ||
22456 | echo X/"$0" | | ||
22457 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } | ||
22458 | /^X\/\(\/\/\)$/{ s//\1/; q; } | ||
22459 | /^X\/\(\/\).*/{ s//\1/; q; } | ||
22460 | s/.*/./; q'` | ||
22461 | |||
22462 | |||
22463 | # PATH needs CR, and LINENO needs CR and PATH. | ||
22464 | # Avoid depending upon Character Ranges. | ||
22465 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | ||
22466 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | ||
22467 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | ||
22468 | as_cr_digits='0123456789' | ||
22469 | as_cr_alnum=$as_cr_Letters$as_cr_digits | ||
22470 | |||
22471 | # The user is always right. | ||
22472 | if test "${PATH_SEPARATOR+set}" != set; then | ||
22473 | echo "#! /bin/sh" >conf$$.sh | ||
22474 | echo "exit 0" >>conf$$.sh | ||
22475 | chmod +x conf$$.sh | ||
22476 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then | ||
22477 | PATH_SEPARATOR=';' | ||
22478 | else | ||
22479 | PATH_SEPARATOR=: | ||
22480 | fi | ||
22481 | rm -f conf$$.sh | ||
22482 | fi | ||
22483 | |||
22484 | |||
22485 | as_lineno_1=$LINENO | ||
22486 | as_lineno_2=$LINENO | ||
22487 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | ||
22488 | test "x$as_lineno_1" != "x$as_lineno_2" && | ||
22489 | test "x$as_lineno_3" = "x$as_lineno_2" || { | ||
22490 | # Find who we are. Look in the path if we contain no path at all | ||
22491 | # relative or not. | ||
22492 | case $0 in | ||
22493 | *[\\/]* ) as_myself=$0 ;; | ||
22494 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
22495 | for as_dir in $PATH | ||
22496 | do | ||
22497 | IFS=$as_save_IFS | ||
22498 | test -z "$as_dir" && as_dir=. | ||
22499 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break | ||
22500 | done | ||
22501 | |||
22502 | ;; | ||
22503 | esac | ||
22504 | # We did not find ourselves, most probably we were run as `sh COMMAND' | ||
22505 | # in which case we are not to be found in the path. | ||
22506 | if test "x$as_myself" = x; then | ||
22507 | as_myself=$0 | ||
22508 | fi | ||
22509 | if test ! -f "$as_myself"; then | ||
22510 | { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 | ||
22511 | echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} | ||
22512 | { (exit 1); exit 1; }; } | ||
22513 | fi | ||
22514 | case $CONFIG_SHELL in | ||
22515 | '') | ||
22516 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
22517 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | ||
22518 | do | ||
22519 | IFS=$as_save_IFS | ||
22520 | test -z "$as_dir" && as_dir=. | ||
22521 | for as_base in sh bash ksh sh5; do | ||
22522 | case $as_dir in | ||
22523 | /*) | ||
22524 | if ("$as_dir/$as_base" -c ' | ||
22525 | as_lineno_1=$LINENO | ||
22526 | as_lineno_2=$LINENO | ||
22527 | as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` | ||
22528 | test "x$as_lineno_1" != "x$as_lineno_2" && | ||
22529 | test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then | ||
22530 | $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } | ||
22531 | $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } | ||
22532 | CONFIG_SHELL=$as_dir/$as_base | ||
22533 | export CONFIG_SHELL | ||
22534 | exec "$CONFIG_SHELL" "$0" ${1+"$@"} | ||
22535 | fi;; | ||
22536 | esac | ||
22537 | done | ||
22538 | done | ||
22539 | ;; | ||
22540 | esac | ||
22541 | |||
22542 | # Create $as_me.lineno as a copy of $as_myself, but with $LINENO | ||
22543 | # uniformly replaced by the line number. The first 'sed' inserts a | ||
22544 | # line-number line before each line; the second 'sed' does the real | ||
22545 | # work. The second script uses 'N' to pair each line-number line | ||
22546 | # with the numbered line, and appends trailing '-' during | ||
22547 | # substitution so that $LINENO is not a special case at line end. | ||
22548 | # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the | ||
22549 | # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) | ||
22550 | sed '=' <$as_myself | | ||
22551 | sed ' | ||
22552 | N | ||
22553 | s,$,-, | ||
22554 | : loop | ||
22555 | s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, | ||
22556 | t loop | ||
22557 | s,-$,, | ||
22558 | s,^['$as_cr_digits']*\n,, | ||
22559 | ' >$as_me.lineno && | ||
22560 | chmod +x $as_me.lineno || | ||
22561 | { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 | ||
22562 | echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} | ||
22563 | { (exit 1); exit 1; }; } | ||
22564 | |||
22565 | # Don't try to exec as it changes $[0], causing all sort of problems | ||
22566 | # (the dirname of $[0] is not the place where we might find the | ||
22567 | # original and so on. Autoconf is especially sensible to this). | ||
22568 | . ./$as_me.lineno | ||
22569 | # Exit status is that of the last command. | ||
22570 | exit | ||
22571 | } | ||
22572 | |||
22573 | |||
22574 | case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in | ||
22575 | *c*,-n*) ECHO_N= ECHO_C=' | ||
22576 | ' ECHO_T=' ' ;; | ||
22577 | *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; | ||
22578 | *) ECHO_N= ECHO_C='\c' ECHO_T= ;; | ||
22579 | esac | ||
22580 | |||
22581 | if expr a : '\(a\)' >/dev/null 2>&1; then | ||
22582 | as_expr=expr | ||
22583 | else | ||
22584 | as_expr=false | ||
22585 | fi | ||
22586 | |||
22587 | rm -f conf$$ conf$$.exe conf$$.file | ||
22588 | echo >conf$$.file | ||
22589 | if ln -s conf$$.file conf$$ 2>/dev/null; then | ||
22590 | # We could just check for DJGPP; but this test a) works b) is more generic | ||
22591 | # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). | ||
22592 | if test -f conf$$.exe; then | ||
22593 | # Don't use ln at all; we don't have any links | ||
22594 | as_ln_s='cp -p' | ||
22595 | else | ||
22596 | as_ln_s='ln -s' | ||
22597 | fi | ||
22598 | elif ln conf$$.file conf$$ 2>/dev/null; then | ||
22599 | as_ln_s=ln | ||
22600 | else | ||
22601 | as_ln_s='cp -p' | ||
22602 | fi | ||
22603 | rm -f conf$$ conf$$.exe conf$$.file | ||
22604 | |||
22605 | if mkdir -p . 2>/dev/null; then | ||
22606 | as_mkdir_p=: | ||
22607 | else | ||
22608 | test -d ./-p && rmdir ./-p | ||
22609 | as_mkdir_p=false | ||
22610 | fi | ||
22611 | |||
22612 | as_executable_p="test -f" | ||
22613 | |||
22614 | # Sed expression to map a string onto a valid CPP name. | ||
22615 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" | ||
22616 | |||
22617 | # Sed expression to map a string onto a valid variable name. | ||
22618 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" | ||
22619 | |||
22620 | |||
22621 | # IFS | ||
22622 | # We need space, tab and new line, in precisely that order. | ||
22623 | as_nl=' | ||
22624 | ' | ||
22625 | IFS=" $as_nl" | ||
22626 | |||
22627 | # CDPATH. | ||
22628 | $as_unset CDPATH | ||
22629 | |||
22630 | exec 6>&1 | ||
22631 | |||
22632 | # Open the log real soon, to keep \$[0] and so on meaningful, and to | ||
22633 | # report actual input values of CONFIG_FILES etc. instead of their | ||
22634 | # values after options handling. Logging --version etc. is OK. | ||
22635 | exec 5>>config.log | ||
22636 | { | ||
22637 | echo | ||
22638 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | ||
22639 | ## Running $as_me. ## | ||
22640 | _ASBOX | ||
22641 | } >&5 | ||
22642 | cat >&5 <<_CSEOF | ||
22643 | |||
22644 | This file was extended by libltdl $as_me 1.2, which was | ||
22645 | generated by GNU Autoconf 2.59. Invocation command line was | ||
22646 | |||
22647 | CONFIG_FILES = $CONFIG_FILES | ||
22648 | CONFIG_HEADERS = $CONFIG_HEADERS | ||
22649 | CONFIG_LINKS = $CONFIG_LINKS | ||
22650 | CONFIG_COMMANDS = $CONFIG_COMMANDS | ||
22651 | $ $0 $@ | ||
22652 | |||
22653 | _CSEOF | ||
22654 | echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 | ||
22655 | echo >&5 | ||
22656 | _ACEOF | ||
22657 | |||
22658 | # Files that config.status was made for. | ||
22659 | if test -n "$ac_config_files"; then | ||
22660 | echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS | ||
22661 | fi | ||
22662 | |||
22663 | if test -n "$ac_config_headers"; then | ||
22664 | echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS | ||
22665 | fi | ||
22666 | |||
22667 | if test -n "$ac_config_links"; then | ||
22668 | echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS | ||
22669 | fi | ||
22670 | |||
22671 | if test -n "$ac_config_commands"; then | ||
22672 | echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS | ||
22673 | fi | ||
22674 | |||
22675 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
22676 | |||
22677 | ac_cs_usage="\ | ||
22678 | \`$as_me' instantiates files from templates according to the | ||
22679 | current configuration. | ||
22680 | |||
22681 | Usage: $0 [OPTIONS] [FILE]... | ||
22682 | |||
22683 | -h, --help print this help, then exit | ||
22684 | -V, --version print version number, then exit | ||
22685 | -q, --quiet do not print progress messages | ||
22686 | -d, --debug don't remove temporary files | ||
22687 | --recheck update $as_me by reconfiguring in the same conditions | ||
22688 | --file=FILE[:TEMPLATE] | ||
22689 | instantiate the configuration file FILE | ||
22690 | --header=FILE[:TEMPLATE] | ||
22691 | instantiate the configuration header FILE | ||
22692 | |||
22693 | Configuration files: | ||
22694 | $config_files | ||
22695 | |||
22696 | Configuration headers: | ||
22697 | $config_headers | ||
22698 | |||
22699 | Configuration commands: | ||
22700 | $config_commands | ||
22701 | |||
22702 | Report bugs to <bug-autoconf@gnu.org>." | ||
22703 | _ACEOF | ||
22704 | |||
22705 | cat >>$CONFIG_STATUS <<_ACEOF | ||
22706 | ac_cs_version="\\ | ||
22707 | libltdl config.status 1.2 | ||
22708 | configured by $0, generated by GNU Autoconf 2.59, | ||
22709 | with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" | ||
22710 | |||
22711 | Copyright (C) 2003 Free Software Foundation, Inc. | ||
22712 | This config.status script is free software; the Free Software Foundation | ||
22713 | gives unlimited permission to copy, distribute and modify it." | ||
22714 | srcdir=$srcdir | ||
22715 | INSTALL="$INSTALL" | ||
22716 | _ACEOF | ||
22717 | |||
22718 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
22719 | # If no file are specified by the user, then we need to provide default | ||
22720 | # value. By we need to know if files were specified by the user. | ||
22721 | ac_need_defaults=: | ||
22722 | while test $# != 0 | ||
22723 | do | ||
22724 | case $1 in | ||
22725 | --*=*) | ||
22726 | ac_option=`expr "x$1" : 'x\([^=]*\)='` | ||
22727 | ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` | ||
22728 | ac_shift=: | ||
22729 | ;; | ||
22730 | -*) | ||
22731 | ac_option=$1 | ||
22732 | ac_optarg=$2 | ||
22733 | ac_shift=shift | ||
22734 | ;; | ||
22735 | *) # This is not an option, so the user has probably given explicit | ||
22736 | # arguments. | ||
22737 | ac_option=$1 | ||
22738 | ac_need_defaults=false;; | ||
22739 | esac | ||
22740 | |||
22741 | case $ac_option in | ||
22742 | # Handling of the options. | ||
22743 | _ACEOF | ||
22744 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
22745 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | ||
22746 | ac_cs_recheck=: ;; | ||
22747 | --version | --vers* | -V ) | ||
22748 | echo "$ac_cs_version"; exit 0 ;; | ||
22749 | --he | --h) | ||
22750 | # Conflict between --help and --header | ||
22751 | { { echo "$as_me:$LINENO: error: ambiguous option: $1 | ||
22752 | Try \`$0 --help' for more information." >&5 | ||
22753 | echo "$as_me: error: ambiguous option: $1 | ||
22754 | Try \`$0 --help' for more information." >&2;} | ||
22755 | { (exit 1); exit 1; }; };; | ||
22756 | --help | --hel | -h ) | ||
22757 | echo "$ac_cs_usage"; exit 0 ;; | ||
22758 | --debug | --d* | -d ) | ||
22759 | debug=: ;; | ||
22760 | --file | --fil | --fi | --f ) | ||
22761 | $ac_shift | ||
22762 | CONFIG_FILES="$CONFIG_FILES $ac_optarg" | ||
22763 | ac_need_defaults=false;; | ||
22764 | --header | --heade | --head | --hea ) | ||
22765 | $ac_shift | ||
22766 | CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" | ||
22767 | ac_need_defaults=false;; | ||
22768 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | ||
22769 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | ||
22770 | ac_cs_silent=: ;; | ||
22771 | |||
22772 | # This is an error. | ||
22773 | -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 | ||
22774 | Try \`$0 --help' for more information." >&5 | ||
22775 | echo "$as_me: error: unrecognized option: $1 | ||
22776 | Try \`$0 --help' for more information." >&2;} | ||
22777 | { (exit 1); exit 1; }; } ;; | ||
22778 | |||
22779 | *) ac_config_targets="$ac_config_targets $1" ;; | ||
22780 | |||
22781 | esac | ||
22782 | shift | ||
22783 | done | ||
22784 | |||
22785 | ac_configure_extra_args= | ||
22786 | |||
22787 | if $ac_cs_silent; then | ||
22788 | exec 6>/dev/null | ||
22789 | ac_configure_extra_args="$ac_configure_extra_args --silent" | ||
22790 | fi | ||
22791 | |||
22792 | _ACEOF | ||
22793 | cat >>$CONFIG_STATUS <<_ACEOF | ||
22794 | if \$ac_cs_recheck; then | ||
22795 | echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 | ||
22796 | exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | ||
22797 | fi | ||
22798 | |||
22799 | _ACEOF | ||
22800 | |||
22801 | cat >>$CONFIG_STATUS <<_ACEOF | ||
22802 | # | ||
22803 | # INIT-COMMANDS section. | ||
22804 | # | ||
22805 | |||
22806 | AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" | ||
22807 | |||
22808 | _ACEOF | ||
22809 | |||
22810 | |||
22811 | |||
22812 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
22813 | for ac_config_target in $ac_config_targets | ||
22814 | do | ||
22815 | case "$ac_config_target" in | ||
22816 | # Handling of arguments. | ||
22817 | "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; | ||
22818 | "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; | ||
22819 | "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config-h.in" ;; | ||
22820 | *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 | ||
22821 | echo "$as_me: error: invalid argument: $ac_config_target" >&2;} | ||
22822 | { (exit 1); exit 1; }; };; | ||
22823 | esac | ||
22824 | done | ||
22825 | |||
22826 | # If the user did not use the arguments to specify the items to instantiate, | ||
22827 | # then the envvar interface is used. Set only those that are not. | ||
22828 | # We use the long form for the default assignment because of an extremely | ||
22829 | # bizarre bug on SunOS 4.1.3. | ||
22830 | if $ac_need_defaults; then | ||
22831 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files | ||
22832 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers | ||
22833 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands | ||
22834 | fi | ||
22835 | |||
22836 | # Have a temporary directory for convenience. Make it in the build tree | ||
22837 | # simply because there is no reason to put it here, and in addition, | ||
22838 | # creating and moving files from /tmp can sometimes cause problems. | ||
22839 | # Create a temporary directory, and hook for its removal unless debugging. | ||
22840 | $debug || | ||
22841 | { | ||
22842 | trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 | ||
22843 | trap '{ (exit 1); exit 1; }' 1 2 13 15 | ||
22844 | } | ||
22845 | |||
22846 | # Create a (secure) tmp directory for tmp files. | ||
22847 | |||
22848 | { | ||
22849 | tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && | ||
22850 | test -n "$tmp" && test -d "$tmp" | ||
22851 | } || | ||
22852 | { | ||
22853 | tmp=./confstat$$-$RANDOM | ||
22854 | (umask 077 && mkdir $tmp) | ||
22855 | } || | ||
22856 | { | ||
22857 | echo "$me: cannot create a temporary directory in ." >&2 | ||
22858 | { (exit 1); exit 1; } | ||
22859 | } | ||
22860 | |||
22861 | _ACEOF | ||
22862 | |||
22863 | cat >>$CONFIG_STATUS <<_ACEOF | ||
22864 | |||
22865 | # | ||
22866 | # CONFIG_FILES section. | ||
22867 | # | ||
22868 | |||
22869 | # No need to generate the scripts if there are no CONFIG_FILES. | ||
22870 | # This happens for instance when ./config.status config.h | ||
22871 | if test -n "\$CONFIG_FILES"; then | ||
22872 | # Protect against being on the right side of a sed subst in config.status. | ||
22873 | sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; | ||
22874 | s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF | ||
22875 | s,@SHELL@,$SHELL,;t t | ||
22876 | s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t | ||
22877 | s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t | ||
22878 | s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t | ||
22879 | s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t | ||
22880 | s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t | ||
22881 | s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t | ||
22882 | s,@exec_prefix@,$exec_prefix,;t t | ||
22883 | s,@prefix@,$prefix,;t t | ||
22884 | s,@program_transform_name@,$program_transform_name,;t t | ||
22885 | s,@bindir@,$bindir,;t t | ||
22886 | s,@sbindir@,$sbindir,;t t | ||
22887 | s,@libexecdir@,$libexecdir,;t t | ||
22888 | s,@datadir@,$datadir,;t t | ||
22889 | s,@sysconfdir@,$sysconfdir,;t t | ||
22890 | s,@sharedstatedir@,$sharedstatedir,;t t | ||
22891 | s,@localstatedir@,$localstatedir,;t t | ||
22892 | s,@libdir@,$libdir,;t t | ||
22893 | s,@includedir@,$includedir,;t t | ||
22894 | s,@oldincludedir@,$oldincludedir,;t t | ||
22895 | s,@infodir@,$infodir,;t t | ||
22896 | s,@mandir@,$mandir,;t t | ||
22897 | s,@build_alias@,$build_alias,;t t | ||
22898 | s,@host_alias@,$host_alias,;t t | ||
22899 | s,@target_alias@,$target_alias,;t t | ||
22900 | s,@DEFS@,$DEFS,;t t | ||
22901 | s,@ECHO_C@,$ECHO_C,;t t | ||
22902 | s,@ECHO_N@,$ECHO_N,;t t | ||
22903 | s,@ECHO_T@,$ECHO_T,;t t | ||
22904 | s,@LIBS@,$LIBS,;t t | ||
22905 | s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t | ||
22906 | s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t | ||
22907 | s,@INSTALL_DATA@,$INSTALL_DATA,;t t | ||
22908 | s,@CYGPATH_W@,$CYGPATH_W,;t t | ||
22909 | s,@PACKAGE@,$PACKAGE,;t t | ||
22910 | s,@VERSION@,$VERSION,;t t | ||
22911 | s,@ACLOCAL@,$ACLOCAL,;t t | ||
22912 | s,@AUTOCONF@,$AUTOCONF,;t t | ||
22913 | s,@AUTOMAKE@,$AUTOMAKE,;t t | ||
22914 | s,@AUTOHEADER@,$AUTOHEADER,;t t | ||
22915 | s,@MAKEINFO@,$MAKEINFO,;t t | ||
22916 | s,@install_sh@,$install_sh,;t t | ||
22917 | s,@STRIP@,$STRIP,;t t | ||
22918 | s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t | ||
22919 | s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t | ||
22920 | s,@mkdir_p@,$mkdir_p,;t t | ||
22921 | s,@AWK@,$AWK,;t t | ||
22922 | s,@SET_MAKE@,$SET_MAKE,;t t | ||
22923 | s,@am__leading_dot@,$am__leading_dot,;t t | ||
22924 | s,@AMTAR@,$AMTAR,;t t | ||
22925 | s,@am__tar@,$am__tar,;t t | ||
22926 | s,@am__untar@,$am__untar,;t t | ||
22927 | s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t | ||
22928 | s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t | ||
22929 | s,@MAINT@,$MAINT,;t t | ||
22930 | s,@CC@,$CC,;t t | ||
22931 | s,@CFLAGS@,$CFLAGS,;t t | ||
22932 | s,@LDFLAGS@,$LDFLAGS,;t t | ||
22933 | s,@CPPFLAGS@,$CPPFLAGS,;t t | ||
22934 | s,@ac_ct_CC@,$ac_ct_CC,;t t | ||
22935 | s,@EXEEXT@,$EXEEXT,;t t | ||
22936 | s,@OBJEXT@,$OBJEXT,;t t | ||
22937 | s,@DEPDIR@,$DEPDIR,;t t | ||
22938 | s,@am__include@,$am__include,;t t | ||
22939 | s,@am__quote@,$am__quote,;t t | ||
22940 | s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t | ||
22941 | s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t | ||
22942 | s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t | ||
22943 | s,@CCDEPMODE@,$CCDEPMODE,;t t | ||
22944 | s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t | ||
22945 | s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t | ||
22946 | s,@build@,$build,;t t | ||
22947 | s,@build_cpu@,$build_cpu,;t t | ||
22948 | s,@build_vendor@,$build_vendor,;t t | ||
22949 | s,@build_os@,$build_os,;t t | ||
22950 | s,@host@,$host,;t t | ||
22951 | s,@host_cpu@,$host_cpu,;t t | ||
22952 | s,@host_vendor@,$host_vendor,;t t | ||
22953 | s,@host_os@,$host_os,;t t | ||
22954 | s,@EGREP@,$EGREP,;t t | ||
22955 | s,@LN_S@,$LN_S,;t t | ||
22956 | s,@ECHO@,$ECHO,;t t | ||
22957 | s,@AR@,$AR,;t t | ||
22958 | s,@ac_ct_AR@,$ac_ct_AR,;t t | ||
22959 | s,@RANLIB@,$RANLIB,;t t | ||
22960 | s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t | ||
22961 | s,@DLLTOOL@,$DLLTOOL,;t t | ||
22962 | s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t | ||
22963 | s,@AS@,$AS,;t t | ||
22964 | s,@ac_ct_AS@,$ac_ct_AS,;t t | ||
22965 | s,@OBJDUMP@,$OBJDUMP,;t t | ||
22966 | s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t | ||
22967 | s,@CPP@,$CPP,;t t | ||
22968 | s,@CXX@,$CXX,;t t | ||
22969 | s,@CXXFLAGS@,$CXXFLAGS,;t t | ||
22970 | s,@ac_ct_CXX@,$ac_ct_CXX,;t t | ||
22971 | s,@CXXDEPMODE@,$CXXDEPMODE,;t t | ||
22972 | s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t | ||
22973 | s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t | ||
22974 | s,@CXXCPP@,$CXXCPP,;t t | ||
22975 | s,@F77@,$F77,;t t | ||
22976 | s,@FFLAGS@,$FFLAGS,;t t | ||
22977 | s,@ac_ct_F77@,$ac_ct_F77,;t t | ||
22978 | s,@LIBTOOL@,$LIBTOOL,;t t | ||
22979 | s,@LIBTOOL_DEPS@,$LIBTOOL_DEPS,;t t | ||
22980 | s,@INSTALL_LTDL_TRUE@,$INSTALL_LTDL_TRUE,;t t | ||
22981 | s,@INSTALL_LTDL_FALSE@,$INSTALL_LTDL_FALSE,;t t | ||
22982 | s,@CONVENIENCE_LTDL_TRUE@,$CONVENIENCE_LTDL_TRUE,;t t | ||
22983 | s,@CONVENIENCE_LTDL_FALSE@,$CONVENIENCE_LTDL_FALSE,;t t | ||
22984 | s,@LIBADD_DL@,$LIBADD_DL,;t t | ||
22985 | s,@LIBOBJS@,$LIBOBJS,;t t | ||
22986 | s,@LTLIBOBJS@,$LTLIBOBJS,;t t | ||
22987 | CEOF | ||
22988 | |||
22989 | _ACEOF | ||
22990 | |||
22991 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
22992 | # Split the substitutions into bite-sized pieces for seds with | ||
22993 | # small command number limits, like on Digital OSF/1 and HP-UX. | ||
22994 | ac_max_sed_lines=48 | ||
22995 | ac_sed_frag=1 # Number of current file. | ||
22996 | ac_beg=1 # First line for current file. | ||
22997 | ac_end=$ac_max_sed_lines # Line after last line for current file. | ||
22998 | ac_more_lines=: | ||
22999 | ac_sed_cmds= | ||
23000 | while $ac_more_lines; do | ||
23001 | if test $ac_beg -gt 1; then | ||
23002 | sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | ||
23003 | else | ||
23004 | sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag | ||
23005 | fi | ||
23006 | if test ! -s $tmp/subs.frag; then | ||
23007 | ac_more_lines=false | ||
23008 | else | ||
23009 | # The purpose of the label and of the branching condition is to | ||
23010 | # speed up the sed processing (if there are no `@' at all, there | ||
23011 | # is no need to browse any of the substitutions). | ||
23012 | # These are the two extra sed commands mentioned above. | ||
23013 | (echo ':t | ||
23014 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed | ||
23015 | if test -z "$ac_sed_cmds"; then | ||
23016 | ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" | ||
23017 | else | ||
23018 | ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" | ||
23019 | fi | ||
23020 | ac_sed_frag=`expr $ac_sed_frag + 1` | ||
23021 | ac_beg=$ac_end | ||
23022 | ac_end=`expr $ac_end + $ac_max_sed_lines` | ||
23023 | fi | ||
23024 | done | ||
23025 | if test -z "$ac_sed_cmds"; then | ||
23026 | ac_sed_cmds=cat | ||
23027 | fi | ||
23028 | fi # test -n "$CONFIG_FILES" | ||
23029 | |||
23030 | _ACEOF | ||
23031 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
23032 | for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue | ||
23033 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | ||
23034 | case $ac_file in | ||
23035 | - | *:- | *:-:* ) # input from stdin | ||
23036 | cat >$tmp/stdin | ||
23037 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | ||
23038 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | ||
23039 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | ||
23040 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | ||
23041 | * ) ac_file_in=$ac_file.in ;; | ||
23042 | esac | ||
23043 | |||
23044 | # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. | ||
23045 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | ||
23046 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
23047 | X"$ac_file" : 'X\(//\)[^/]' \| \ | ||
23048 | X"$ac_file" : 'X\(//\)$' \| \ | ||
23049 | X"$ac_file" : 'X\(/\)' \| \ | ||
23050 | . : '\(.\)' 2>/dev/null || | ||
23051 | echo X"$ac_file" | | ||
23052 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
23053 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
23054 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
23055 | /^X\(\/\).*/{ s//\1/; q; } | ||
23056 | s/.*/./; q'` | ||
23057 | { if $as_mkdir_p; then | ||
23058 | mkdir -p "$ac_dir" | ||
23059 | else | ||
23060 | as_dir="$ac_dir" | ||
23061 | as_dirs= | ||
23062 | while test ! -d "$as_dir"; do | ||
23063 | as_dirs="$as_dir $as_dirs" | ||
23064 | as_dir=`(dirname "$as_dir") 2>/dev/null || | ||
23065 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
23066 | X"$as_dir" : 'X\(//\)[^/]' \| \ | ||
23067 | X"$as_dir" : 'X\(//\)$' \| \ | ||
23068 | X"$as_dir" : 'X\(/\)' \| \ | ||
23069 | . : '\(.\)' 2>/dev/null || | ||
23070 | echo X"$as_dir" | | ||
23071 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
23072 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
23073 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
23074 | /^X\(\/\).*/{ s//\1/; q; } | ||
23075 | s/.*/./; q'` | ||
23076 | done | ||
23077 | test ! -n "$as_dirs" || mkdir $as_dirs | ||
23078 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | ||
23079 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | ||
23080 | { (exit 1); exit 1; }; }; } | ||
23081 | |||
23082 | ac_builddir=. | ||
23083 | |||
23084 | if test "$ac_dir" != .; then | ||
23085 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | ||
23086 | # A "../" for each directory in $ac_dir_suffix. | ||
23087 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | ||
23088 | else | ||
23089 | ac_dir_suffix= ac_top_builddir= | ||
23090 | fi | ||
23091 | |||
23092 | case $srcdir in | ||
23093 | .) # No --srcdir option. We are building in place. | ||
23094 | ac_srcdir=. | ||
23095 | if test -z "$ac_top_builddir"; then | ||
23096 | ac_top_srcdir=. | ||
23097 | else | ||
23098 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | ||
23099 | fi ;; | ||
23100 | [\\/]* | ?:[\\/]* ) # Absolute path. | ||
23101 | ac_srcdir=$srcdir$ac_dir_suffix; | ||
23102 | ac_top_srcdir=$srcdir ;; | ||
23103 | *) # Relative path. | ||
23104 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | ||
23105 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | ||
23106 | esac | ||
23107 | |||
23108 | # Do not use `cd foo && pwd` to compute absolute paths, because | ||
23109 | # the directories may not exist. | ||
23110 | case `pwd` in | ||
23111 | .) ac_abs_builddir="$ac_dir";; | ||
23112 | *) | ||
23113 | case "$ac_dir" in | ||
23114 | .) ac_abs_builddir=`pwd`;; | ||
23115 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | ||
23116 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | ||
23117 | esac;; | ||
23118 | esac | ||
23119 | case $ac_abs_builddir in | ||
23120 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | ||
23121 | *) | ||
23122 | case ${ac_top_builddir}. in | ||
23123 | .) ac_abs_top_builddir=$ac_abs_builddir;; | ||
23124 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | ||
23125 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | ||
23126 | esac;; | ||
23127 | esac | ||
23128 | case $ac_abs_builddir in | ||
23129 | .) ac_abs_srcdir=$ac_srcdir;; | ||
23130 | *) | ||
23131 | case $ac_srcdir in | ||
23132 | .) ac_abs_srcdir=$ac_abs_builddir;; | ||
23133 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | ||
23134 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | ||
23135 | esac;; | ||
23136 | esac | ||
23137 | case $ac_abs_builddir in | ||
23138 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | ||
23139 | *) | ||
23140 | case $ac_top_srcdir in | ||
23141 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | ||
23142 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | ||
23143 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | ||
23144 | esac;; | ||
23145 | esac | ||
23146 | |||
23147 | |||
23148 | case $INSTALL in | ||
23149 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | ||
23150 | *) ac_INSTALL=$ac_top_builddir$INSTALL ;; | ||
23151 | esac | ||
23152 | |||
23153 | # Let's still pretend it is `configure' which instantiates (i.e., don't | ||
23154 | # use $as_me), people would be surprised to read: | ||
23155 | # /* config.h. Generated by config.status. */ | ||
23156 | if test x"$ac_file" = x-; then | ||
23157 | configure_input= | ||
23158 | else | ||
23159 | configure_input="$ac_file. " | ||
23160 | fi | ||
23161 | configure_input=$configure_input"Generated from `echo $ac_file_in | | ||
23162 | sed 's,.*/,,'` by configure." | ||
23163 | |||
23164 | # First look for the input files in the build tree, otherwise in the | ||
23165 | # src tree. | ||
23166 | ac_file_inputs=`IFS=: | ||
23167 | for f in $ac_file_in; do | ||
23168 | case $f in | ||
23169 | -) echo $tmp/stdin ;; | ||
23170 | [\\/$]*) | ||
23171 | # Absolute (can't be DOS-style, as IFS=:) | ||
23172 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | ||
23173 | echo "$as_me: error: cannot find input file: $f" >&2;} | ||
23174 | { (exit 1); exit 1; }; } | ||
23175 | echo "$f";; | ||
23176 | *) # Relative | ||
23177 | if test -f "$f"; then | ||
23178 | # Build tree | ||
23179 | echo "$f" | ||
23180 | elif test -f "$srcdir/$f"; then | ||
23181 | # Source tree | ||
23182 | echo "$srcdir/$f" | ||
23183 | else | ||
23184 | # /dev/null tree | ||
23185 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | ||
23186 | echo "$as_me: error: cannot find input file: $f" >&2;} | ||
23187 | { (exit 1); exit 1; }; } | ||
23188 | fi;; | ||
23189 | esac | ||
23190 | done` || { (exit 1); exit 1; } | ||
23191 | |||
23192 | if test x"$ac_file" != x-; then | ||
23193 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | ||
23194 | echo "$as_me: creating $ac_file" >&6;} | ||
23195 | rm -f "$ac_file" | ||
23196 | fi | ||
23197 | _ACEOF | ||
23198 | cat >>$CONFIG_STATUS <<_ACEOF | ||
23199 | sed "$ac_vpsub | ||
23200 | $extrasub | ||
23201 | _ACEOF | ||
23202 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
23203 | :t | ||
23204 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | ||
23205 | s,@configure_input@,$configure_input,;t t | ||
23206 | s,@srcdir@,$ac_srcdir,;t t | ||
23207 | s,@abs_srcdir@,$ac_abs_srcdir,;t t | ||
23208 | s,@top_srcdir@,$ac_top_srcdir,;t t | ||
23209 | s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t | ||
23210 | s,@builddir@,$ac_builddir,;t t | ||
23211 | s,@abs_builddir@,$ac_abs_builddir,;t t | ||
23212 | s,@top_builddir@,$ac_top_builddir,;t t | ||
23213 | s,@abs_top_builddir@,$ac_abs_top_builddir,;t t | ||
23214 | s,@INSTALL@,$ac_INSTALL,;t t | ||
23215 | " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out | ||
23216 | rm -f $tmp/stdin | ||
23217 | if test x"$ac_file" != x-; then | ||
23218 | mv $tmp/out $ac_file | ||
23219 | else | ||
23220 | cat $tmp/out | ||
23221 | rm -f $tmp/out | ||
23222 | fi | ||
23223 | |||
23224 | done | ||
23225 | _ACEOF | ||
23226 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
23227 | |||
23228 | # | ||
23229 | # CONFIG_HEADER section. | ||
23230 | # | ||
23231 | |||
23232 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | ||
23233 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | ||
23234 | # | ||
23235 | # ac_d sets the value in "#define NAME VALUE" lines. | ||
23236 | ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' | ||
23237 | ac_dB='[ ].*$,\1#\2' | ||
23238 | ac_dC=' ' | ||
23239 | ac_dD=',;t' | ||
23240 | # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | ||
23241 | ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | ||
23242 | ac_uB='$,\1#\2define\3' | ||
23243 | ac_uC=' ' | ||
23244 | ac_uD=',;t' | ||
23245 | |||
23246 | for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue | ||
23247 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | ||
23248 | case $ac_file in | ||
23249 | - | *:- | *:-:* ) # input from stdin | ||
23250 | cat >$tmp/stdin | ||
23251 | ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | ||
23252 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | ||
23253 | *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` | ||
23254 | ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; | ||
23255 | * ) ac_file_in=$ac_file.in ;; | ||
23256 | esac | ||
23257 | |||
23258 | test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 | ||
23259 | echo "$as_me: creating $ac_file" >&6;} | ||
23260 | |||
23261 | # First look for the input files in the build tree, otherwise in the | ||
23262 | # src tree. | ||
23263 | ac_file_inputs=`IFS=: | ||
23264 | for f in $ac_file_in; do | ||
23265 | case $f in | ||
23266 | -) echo $tmp/stdin ;; | ||
23267 | [\\/$]*) | ||
23268 | # Absolute (can't be DOS-style, as IFS=:) | ||
23269 | test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | ||
23270 | echo "$as_me: error: cannot find input file: $f" >&2;} | ||
23271 | { (exit 1); exit 1; }; } | ||
23272 | # Do quote $f, to prevent DOS paths from being IFS'd. | ||
23273 | echo "$f";; | ||
23274 | *) # Relative | ||
23275 | if test -f "$f"; then | ||
23276 | # Build tree | ||
23277 | echo "$f" | ||
23278 | elif test -f "$srcdir/$f"; then | ||
23279 | # Source tree | ||
23280 | echo "$srcdir/$f" | ||
23281 | else | ||
23282 | # /dev/null tree | ||
23283 | { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 | ||
23284 | echo "$as_me: error: cannot find input file: $f" >&2;} | ||
23285 | { (exit 1); exit 1; }; } | ||
23286 | fi;; | ||
23287 | esac | ||
23288 | done` || { (exit 1); exit 1; } | ||
23289 | # Remove the trailing spaces. | ||
23290 | sed 's/[ ]*$//' $ac_file_inputs >$tmp/in | ||
23291 | |||
23292 | _ACEOF | ||
23293 | |||
23294 | # Transform confdefs.h into two sed scripts, `conftest.defines' and | ||
23295 | # `conftest.undefs', that substitutes the proper values into | ||
23296 | # config.h.in to produce config.h. The first handles `#define' | ||
23297 | # templates, and the second `#undef' templates. | ||
23298 | # And first: Protect against being on the right side of a sed subst in | ||
23299 | # config.status. Protect against being in an unquoted here document | ||
23300 | # in config.status. | ||
23301 | rm -f conftest.defines conftest.undefs | ||
23302 | # Using a here document instead of a string reduces the quoting nightmare. | ||
23303 | # Putting comments in sed scripts is not portable. | ||
23304 | # | ||
23305 | # `end' is used to avoid that the second main sed command (meant for | ||
23306 | # 0-ary CPP macros) applies to n-ary macro definitions. | ||
23307 | # See the Autoconf documentation for `clear'. | ||
23308 | cat >confdef2sed.sed <<\_ACEOF | ||
23309 | s/[\\&,]/\\&/g | ||
23310 | s,[\\$`],\\&,g | ||
23311 | t clear | ||
23312 | : clear | ||
23313 | s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp | ||
23314 | t end | ||
23315 | s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp | ||
23316 | : end | ||
23317 | _ACEOF | ||
23318 | # If some macros were called several times there might be several times | ||
23319 | # the same #defines, which is useless. Nevertheless, we may not want to | ||
23320 | # sort them, since we want the *last* AC-DEFINE to be honored. | ||
23321 | uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines | ||
23322 | sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs | ||
23323 | rm -f confdef2sed.sed | ||
23324 | |||
23325 | # This sed command replaces #undef with comments. This is necessary, for | ||
23326 | # example, in the case of _POSIX_SOURCE, which is predefined and required | ||
23327 | # on some systems where configure will not decide to define it. | ||
23328 | cat >>conftest.undefs <<\_ACEOF | ||
23329 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, | ||
23330 | _ACEOF | ||
23331 | |||
23332 | # Break up conftest.defines because some shells have a limit on the size | ||
23333 | # of here documents, and old seds have small limits too (100 cmds). | ||
23334 | echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS | ||
23335 | echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS | ||
23336 | echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS | ||
23337 | echo ' :' >>$CONFIG_STATUS | ||
23338 | rm -f conftest.tail | ||
23339 | while grep . conftest.defines >/dev/null | ||
23340 | do | ||
23341 | # Write a limited-size here document to $tmp/defines.sed. | ||
23342 | echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS | ||
23343 | # Speed up: don't consider the non `#define' lines. | ||
23344 | echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS | ||
23345 | # Work around the forget-to-reset-the-flag bug. | ||
23346 | echo 't clr' >>$CONFIG_STATUS | ||
23347 | echo ': clr' >>$CONFIG_STATUS | ||
23348 | sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS | ||
23349 | echo 'CEOF | ||
23350 | sed -f $tmp/defines.sed $tmp/in >$tmp/out | ||
23351 | rm -f $tmp/in | ||
23352 | mv $tmp/out $tmp/in | ||
23353 | ' >>$CONFIG_STATUS | ||
23354 | sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail | ||
23355 | rm -f conftest.defines | ||
23356 | mv conftest.tail conftest.defines | ||
23357 | done | ||
23358 | rm -f conftest.defines | ||
23359 | echo ' fi # grep' >>$CONFIG_STATUS | ||
23360 | echo >>$CONFIG_STATUS | ||
23361 | |||
23362 | # Break up conftest.undefs because some shells have a limit on the size | ||
23363 | # of here documents, and old seds have small limits too (100 cmds). | ||
23364 | echo ' # Handle all the #undef templates' >>$CONFIG_STATUS | ||
23365 | rm -f conftest.tail | ||
23366 | while grep . conftest.undefs >/dev/null | ||
23367 | do | ||
23368 | # Write a limited-size here document to $tmp/undefs.sed. | ||
23369 | echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS | ||
23370 | # Speed up: don't consider the non `#undef' | ||
23371 | echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS | ||
23372 | # Work around the forget-to-reset-the-flag bug. | ||
23373 | echo 't clr' >>$CONFIG_STATUS | ||
23374 | echo ': clr' >>$CONFIG_STATUS | ||
23375 | sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS | ||
23376 | echo 'CEOF | ||
23377 | sed -f $tmp/undefs.sed $tmp/in >$tmp/out | ||
23378 | rm -f $tmp/in | ||
23379 | mv $tmp/out $tmp/in | ||
23380 | ' >>$CONFIG_STATUS | ||
23381 | sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail | ||
23382 | rm -f conftest.undefs | ||
23383 | mv conftest.tail conftest.undefs | ||
23384 | done | ||
23385 | rm -f conftest.undefs | ||
23386 | |||
23387 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
23388 | # Let's still pretend it is `configure' which instantiates (i.e., don't | ||
23389 | # use $as_me), people would be surprised to read: | ||
23390 | # /* config.h. Generated by config.status. */ | ||
23391 | if test x"$ac_file" = x-; then | ||
23392 | echo "/* Generated by configure. */" >$tmp/config.h | ||
23393 | else | ||
23394 | echo "/* $ac_file. Generated by configure. */" >$tmp/config.h | ||
23395 | fi | ||
23396 | cat $tmp/in >>$tmp/config.h | ||
23397 | rm -f $tmp/in | ||
23398 | if test x"$ac_file" != x-; then | ||
23399 | if diff $ac_file $tmp/config.h >/dev/null 2>&1; then | ||
23400 | { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 | ||
23401 | echo "$as_me: $ac_file is unchanged" >&6;} | ||
23402 | else | ||
23403 | ac_dir=`(dirname "$ac_file") 2>/dev/null || | ||
23404 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
23405 | X"$ac_file" : 'X\(//\)[^/]' \| \ | ||
23406 | X"$ac_file" : 'X\(//\)$' \| \ | ||
23407 | X"$ac_file" : 'X\(/\)' \| \ | ||
23408 | . : '\(.\)' 2>/dev/null || | ||
23409 | echo X"$ac_file" | | ||
23410 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
23411 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
23412 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
23413 | /^X\(\/\).*/{ s//\1/; q; } | ||
23414 | s/.*/./; q'` | ||
23415 | { if $as_mkdir_p; then | ||
23416 | mkdir -p "$ac_dir" | ||
23417 | else | ||
23418 | as_dir="$ac_dir" | ||
23419 | as_dirs= | ||
23420 | while test ! -d "$as_dir"; do | ||
23421 | as_dirs="$as_dir $as_dirs" | ||
23422 | as_dir=`(dirname "$as_dir") 2>/dev/null || | ||
23423 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
23424 | X"$as_dir" : 'X\(//\)[^/]' \| \ | ||
23425 | X"$as_dir" : 'X\(//\)$' \| \ | ||
23426 | X"$as_dir" : 'X\(/\)' \| \ | ||
23427 | . : '\(.\)' 2>/dev/null || | ||
23428 | echo X"$as_dir" | | ||
23429 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
23430 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
23431 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
23432 | /^X\(\/\).*/{ s//\1/; q; } | ||
23433 | s/.*/./; q'` | ||
23434 | done | ||
23435 | test ! -n "$as_dirs" || mkdir $as_dirs | ||
23436 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | ||
23437 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | ||
23438 | { (exit 1); exit 1; }; }; } | ||
23439 | |||
23440 | rm -f $ac_file | ||
23441 | mv $tmp/config.h $ac_file | ||
23442 | fi | ||
23443 | else | ||
23444 | cat $tmp/config.h | ||
23445 | rm -f $tmp/config.h | ||
23446 | fi | ||
23447 | # Compute $ac_file's index in $config_headers. | ||
23448 | _am_stamp_count=1 | ||
23449 | for _am_header in $config_headers :; do | ||
23450 | case $_am_header in | ||
23451 | $ac_file | $ac_file:* ) | ||
23452 | break ;; | ||
23453 | * ) | ||
23454 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; | ||
23455 | esac | ||
23456 | done | ||
23457 | echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || | ||
23458 | $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
23459 | X$ac_file : 'X\(//\)[^/]' \| \ | ||
23460 | X$ac_file : 'X\(//\)$' \| \ | ||
23461 | X$ac_file : 'X\(/\)' \| \ | ||
23462 | . : '\(.\)' 2>/dev/null || | ||
23463 | echo X$ac_file | | ||
23464 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
23465 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
23466 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
23467 | /^X\(\/\).*/{ s//\1/; q; } | ||
23468 | s/.*/./; q'`/stamp-h$_am_stamp_count | ||
23469 | done | ||
23470 | _ACEOF | ||
23471 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
23472 | |||
23473 | # | ||
23474 | # CONFIG_COMMANDS section. | ||
23475 | # | ||
23476 | for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue | ||
23477 | ac_dest=`echo "$ac_file" | sed 's,:.*,,'` | ||
23478 | ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` | ||
23479 | ac_dir=`(dirname "$ac_dest") 2>/dev/null || | ||
23480 | $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
23481 | X"$ac_dest" : 'X\(//\)[^/]' \| \ | ||
23482 | X"$ac_dest" : 'X\(//\)$' \| \ | ||
23483 | X"$ac_dest" : 'X\(/\)' \| \ | ||
23484 | . : '\(.\)' 2>/dev/null || | ||
23485 | echo X"$ac_dest" | | ||
23486 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
23487 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
23488 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
23489 | /^X\(\/\).*/{ s//\1/; q; } | ||
23490 | s/.*/./; q'` | ||
23491 | { if $as_mkdir_p; then | ||
23492 | mkdir -p "$ac_dir" | ||
23493 | else | ||
23494 | as_dir="$ac_dir" | ||
23495 | as_dirs= | ||
23496 | while test ! -d "$as_dir"; do | ||
23497 | as_dirs="$as_dir $as_dirs" | ||
23498 | as_dir=`(dirname "$as_dir") 2>/dev/null || | ||
23499 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
23500 | X"$as_dir" : 'X\(//\)[^/]' \| \ | ||
23501 | X"$as_dir" : 'X\(//\)$' \| \ | ||
23502 | X"$as_dir" : 'X\(/\)' \| \ | ||
23503 | . : '\(.\)' 2>/dev/null || | ||
23504 | echo X"$as_dir" | | ||
23505 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
23506 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
23507 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
23508 | /^X\(\/\).*/{ s//\1/; q; } | ||
23509 | s/.*/./; q'` | ||
23510 | done | ||
23511 | test ! -n "$as_dirs" || mkdir $as_dirs | ||
23512 | fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 | ||
23513 | echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} | ||
23514 | { (exit 1); exit 1; }; }; } | ||
23515 | |||
23516 | ac_builddir=. | ||
23517 | |||
23518 | if test "$ac_dir" != .; then | ||
23519 | ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` | ||
23520 | # A "../" for each directory in $ac_dir_suffix. | ||
23521 | ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` | ||
23522 | else | ||
23523 | ac_dir_suffix= ac_top_builddir= | ||
23524 | fi | ||
23525 | |||
23526 | case $srcdir in | ||
23527 | .) # No --srcdir option. We are building in place. | ||
23528 | ac_srcdir=. | ||
23529 | if test -z "$ac_top_builddir"; then | ||
23530 | ac_top_srcdir=. | ||
23531 | else | ||
23532 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` | ||
23533 | fi ;; | ||
23534 | [\\/]* | ?:[\\/]* ) # Absolute path. | ||
23535 | ac_srcdir=$srcdir$ac_dir_suffix; | ||
23536 | ac_top_srcdir=$srcdir ;; | ||
23537 | *) # Relative path. | ||
23538 | ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix | ||
23539 | ac_top_srcdir=$ac_top_builddir$srcdir ;; | ||
23540 | esac | ||
23541 | |||
23542 | # Do not use `cd foo && pwd` to compute absolute paths, because | ||
23543 | # the directories may not exist. | ||
23544 | case `pwd` in | ||
23545 | .) ac_abs_builddir="$ac_dir";; | ||
23546 | *) | ||
23547 | case "$ac_dir" in | ||
23548 | .) ac_abs_builddir=`pwd`;; | ||
23549 | [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; | ||
23550 | *) ac_abs_builddir=`pwd`/"$ac_dir";; | ||
23551 | esac;; | ||
23552 | esac | ||
23553 | case $ac_abs_builddir in | ||
23554 | .) ac_abs_top_builddir=${ac_top_builddir}.;; | ||
23555 | *) | ||
23556 | case ${ac_top_builddir}. in | ||
23557 | .) ac_abs_top_builddir=$ac_abs_builddir;; | ||
23558 | [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; | ||
23559 | *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; | ||
23560 | esac;; | ||
23561 | esac | ||
23562 | case $ac_abs_builddir in | ||
23563 | .) ac_abs_srcdir=$ac_srcdir;; | ||
23564 | *) | ||
23565 | case $ac_srcdir in | ||
23566 | .) ac_abs_srcdir=$ac_abs_builddir;; | ||
23567 | [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; | ||
23568 | *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; | ||
23569 | esac;; | ||
23570 | esac | ||
23571 | case $ac_abs_builddir in | ||
23572 | .) ac_abs_top_srcdir=$ac_top_srcdir;; | ||
23573 | *) | ||
23574 | case $ac_top_srcdir in | ||
23575 | .) ac_abs_top_srcdir=$ac_abs_builddir;; | ||
23576 | [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; | ||
23577 | *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; | ||
23578 | esac;; | ||
23579 | esac | ||
23580 | |||
23581 | |||
23582 | { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 | ||
23583 | echo "$as_me: executing $ac_dest commands" >&6;} | ||
23584 | case $ac_dest in | ||
23585 | depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do | ||
23586 | # Strip MF so we end up with the name of the file. | ||
23587 | mf=`echo "$mf" | sed -e 's/:.*$//'` | ||
23588 | # Check whether this is an Automake generated Makefile or not. | ||
23589 | # We used to match only the files named `Makefile.in', but | ||
23590 | # some people rename them; so instead we look at the file content. | ||
23591 | # Grep'ing the first line is not enough: some people post-process | ||
23592 | # each Makefile.in and add a new line on top of each file to say so. | ||
23593 | # So let's grep whole file. | ||
23594 | if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then | ||
23595 | dirpart=`(dirname "$mf") 2>/dev/null || | ||
23596 | $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
23597 | X"$mf" : 'X\(//\)[^/]' \| \ | ||
23598 | X"$mf" : 'X\(//\)$' \| \ | ||
23599 | X"$mf" : 'X\(/\)' \| \ | ||
23600 | . : '\(.\)' 2>/dev/null || | ||
23601 | echo X"$mf" | | ||
23602 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
23603 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
23604 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
23605 | /^X\(\/\).*/{ s//\1/; q; } | ||
23606 | s/.*/./; q'` | ||
23607 | else | ||
23608 | continue | ||
23609 | fi | ||
23610 | # Extract the definition of DEPDIR, am__include, and am__quote | ||
23611 | # from the Makefile without running `make'. | ||
23612 | DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` | ||
23613 | test -z "$DEPDIR" && continue | ||
23614 | am__include=`sed -n 's/^am__include = //p' < "$mf"` | ||
23615 | test -z "am__include" && continue | ||
23616 | am__quote=`sed -n 's/^am__quote = //p' < "$mf"` | ||
23617 | # When using ansi2knr, U may be empty or an underscore; expand it | ||
23618 | U=`sed -n 's/^U = //p' < "$mf"` | ||
23619 | # Find all dependency output files, they are included files with | ||
23620 | # $(DEPDIR) in their names. We invoke sed twice because it is the | ||
23621 | # simplest approach to changing $(DEPDIR) to its actual value in the | ||
23622 | # expansion. | ||
23623 | for file in `sed -n " | ||
23624 | s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ | ||
23625 | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do | ||
23626 | # Make sure the directory exists. | ||
23627 | test -f "$dirpart/$file" && continue | ||
23628 | fdir=`(dirname "$file") 2>/dev/null || | ||
23629 | $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
23630 | X"$file" : 'X\(//\)[^/]' \| \ | ||
23631 | X"$file" : 'X\(//\)$' \| \ | ||
23632 | X"$file" : 'X\(/\)' \| \ | ||
23633 | . : '\(.\)' 2>/dev/null || | ||
23634 | echo X"$file" | | ||
23635 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
23636 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
23637 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
23638 | /^X\(\/\).*/{ s//\1/; q; } | ||
23639 | s/.*/./; q'` | ||
23640 | { if $as_mkdir_p; then | ||
23641 | mkdir -p $dirpart/$fdir | ||
23642 | else | ||
23643 | as_dir=$dirpart/$fdir | ||
23644 | as_dirs= | ||
23645 | while test ! -d "$as_dir"; do | ||
23646 | as_dirs="$as_dir $as_dirs" | ||
23647 | as_dir=`(dirname "$as_dir") 2>/dev/null || | ||
23648 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | ||
23649 | X"$as_dir" : 'X\(//\)[^/]' \| \ | ||
23650 | X"$as_dir" : 'X\(//\)$' \| \ | ||
23651 | X"$as_dir" : 'X\(/\)' \| \ | ||
23652 | . : '\(.\)' 2>/dev/null || | ||
23653 | echo X"$as_dir" | | ||
23654 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | ||
23655 | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | ||
23656 | /^X\(\/\/\)$/{ s//\1/; q; } | ||
23657 | /^X\(\/\).*/{ s//\1/; q; } | ||
23658 | s/.*/./; q'` | ||
23659 | done | ||
23660 | test ! -n "$as_dirs" || mkdir $as_dirs | ||
23661 | fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 | ||
23662 | echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} | ||
23663 | { (exit 1); exit 1; }; }; } | ||
23664 | |||
23665 | # echo "creating $dirpart/$file" | ||
23666 | echo '# dummy' > "$dirpart/$file" | ||
23667 | done | ||
23668 | done | ||
23669 | ;; | ||
23670 | esac | ||
23671 | done | ||
23672 | _ACEOF | ||
23673 | |||
23674 | cat >>$CONFIG_STATUS <<\_ACEOF | ||
23675 | |||
23676 | { (exit 0); exit 0; } | ||
23677 | _ACEOF | ||
23678 | chmod +x $CONFIG_STATUS | ||
23679 | ac_clean_files=$ac_clean_files_save | ||
23680 | |||
23681 | |||
23682 | # configure is writing to config.log, and then calls config.status. | ||
23683 | # config.status does its own redirection, appending to config.log. | ||
23684 | # Unfortunately, on DOS this fails, as config.log is still kept open | ||
23685 | # by configure, so config.status won't be able to write to it; its | ||
23686 | # output is simply discarded. So we exec the FD to /dev/null, | ||
23687 | # effectively closing config.log, so it can be properly (re)opened and | ||
23688 | # appended to by config.status. When coming back to configure, we | ||
23689 | # need to make the FD available again. | ||
23690 | if test "$no_create" != yes; then | ||
23691 | ac_cs_success=: | ||
23692 | ac_config_status_args= | ||
23693 | test "$silent" = yes && | ||
23694 | ac_config_status_args="$ac_config_status_args --quiet" | ||
23695 | exec 5>/dev/null | ||
23696 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | ||
23697 | exec 5>>config.log | ||
23698 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | ||
23699 | # would make configure fail if this is the last instruction. | ||
23700 | $ac_cs_success || { (exit 1); exit 1; } | ||
23701 | fi | ||
23702 | |||
diff --git a/libltdl/configure.ac b/libltdl/configure.ac new file mode 100644 index 00000000..56c9f237 --- /dev/null +++ b/libltdl/configure.ac | |||
@@ -0,0 +1,80 @@ | |||
1 | ## Process this file with autoconf to create configure. -*- autoconf -*- | ||
2 | # Copyright 2001 Free Software Foundation, Inc. | ||
3 | # | ||
4 | # This program is free software; you can redistribute it and/or modify | ||
5 | # it under the terms of the GNU General Public License as published by | ||
6 | # the Free Software Foundation; either version 2 of the License, or | ||
7 | # (at your option) any later version. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | # GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License | ||
15 | # along with this program; if not, write to the Free Software | ||
16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
17 | # 02111-1307 USA | ||
18 | |||
19 | |||
20 | ## FIXME: Is this really new enough? ## | ||
21 | AC_PREREQ(2.50) | ||
22 | |||
23 | |||
24 | ## ------------------------ ## | ||
25 | ## Autoconf initialisation. ## | ||
26 | ## ------------------------ ## | ||
27 | AC_INIT([libltdl], [1.2], [bug-libtool@gnu.org]) | ||
28 | AC_CONFIG_SRCDIR([ltdl.c]) | ||
29 | |||
30 | |||
31 | ## ------------------------------- ## | ||
32 | ## Libltdl specific configuration. ## | ||
33 | ## ------------------------------- ## | ||
34 | |||
35 | AC_CONFIG_AUX_DIR([.]) | ||
36 | |||
37 | if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then | ||
38 | if test -f ${srcdir}/ltmain.sh; then | ||
39 | # if libltdl is libtoolized, it is assumed to be stand-alone and | ||
40 | # installed unless the command line overrides it (tested above) | ||
41 | enable_ltdl_install=yes | ||
42 | else | ||
43 | AC_MSG_WARN([*** The top-level configure must select either]) | ||
44 | AC_MSG_WARN([*** [A""C_LIBLTDL_INSTALLABLE] or [A""C_LIBLTDL_CONVENIENCE].]) | ||
45 | AC_MSG_ERROR([*** Maybe you want to --enable-ltdl-install?]) | ||
46 | fi | ||
47 | fi | ||
48 | |||
49 | |||
50 | ## ------------------------ ## | ||
51 | ## Automake Initialisation. ## | ||
52 | ## ------------------------ ## | ||
53 | AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, -) | ||
54 | AM_CONFIG_HEADER([config.h:config-h.in]) | ||
55 | AM_MAINTAINER_MODE | ||
56 | |||
57 | |||
58 | ## ------------------ ## | ||
59 | ## C compiler checks. ## | ||
60 | ## ------------------ ## | ||
61 | AC_PROG_CC | ||
62 | AC_C_CONST | ||
63 | AC_C_INLINE | ||
64 | |||
65 | |||
66 | ## ----------------------- ## | ||
67 | ## Libtool initialisation. ## | ||
68 | ## ----------------------- ## | ||
69 | AC_LIBTOOL_WIN32_DLL | ||
70 | AC_PROG_LIBTOOL | ||
71 | AC_SUBST([LIBTOOL_DEPS]) | ||
72 | |||
73 | AC_LIB_LTDL | ||
74 | |||
75 | |||
76 | ## -------- ## | ||
77 | ## Outputs. ## | ||
78 | ## -------- ## | ||
79 | AC_CONFIG_FILES([Makefile]) | ||
80 | AC_OUTPUT | ||
diff --git a/libltdl/install-sh b/libltdl/install-sh new file mode 100755 index 00000000..e4160c99 --- /dev/null +++ b/libltdl/install-sh | |||
@@ -0,0 +1,325 @@ | |||
1 | #!/bin/sh | ||
2 | # install - install a program, script, or datafile | ||
3 | |||
4 | scriptversion=2004-04-01.17 | ||
5 | |||
6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was | ||
7 | # later released in X11R6 (xc/config/util/install.sh) with the | ||
8 | # following copyright and license. | ||
9 | # | ||
10 | # Copyright (C) 1994 X Consortium | ||
11 | # | ||
12 | # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
13 | # of this software and associated documentation files (the "Software"), to | ||
14 | # deal in the Software without restriction, including without limitation the | ||
15 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
16 | # sell copies of the Software, and to permit persons to whom the Software is | ||
17 | # furnished to do so, subject to the following conditions: | ||
18 | # | ||
19 | # The above copyright notice and this permission notice shall be included in | ||
20 | # all copies or substantial portions of the Software. | ||
21 | # | ||
22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
25 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | ||
26 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- | ||
27 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
28 | # | ||
29 | # Except as contained in this notice, the name of the X Consortium shall not | ||
30 | # be used in advertising or otherwise to promote the sale, use or other deal- | ||
31 | # ings in this Software without prior written authorization from the X Consor- | ||
32 | # tium. | ||
33 | # | ||
34 | # | ||
35 | # FSF changes to this file are in the public domain. | ||
36 | # | ||
37 | # Calling this script install-sh is preferred over install.sh, to prevent | ||
38 | # `make' implicit rules from creating a file called install from it | ||
39 | # when there is no Makefile. | ||
40 | # | ||
41 | # This script is compatible with the BSD install script, but was written | ||
42 | # from scratch. It can only install one file at a time, a restriction | ||
43 | # shared with many OS's install programs. | ||
44 | |||
45 | # set DOITPROG to echo to test this script | ||
46 | |||
47 | # Don't use :- since 4.3BSD and earlier shells don't like it. | ||
48 | doit="${DOITPROG-}" | ||
49 | |||
50 | # put in absolute paths if you don't have them in your path; or use env. vars. | ||
51 | |||
52 | mvprog="${MVPROG-mv}" | ||
53 | cpprog="${CPPROG-cp}" | ||
54 | chmodprog="${CHMODPROG-chmod}" | ||
55 | chownprog="${CHOWNPROG-chown}" | ||
56 | chgrpprog="${CHGRPPROG-chgrp}" | ||
57 | stripprog="${STRIPPROG-strip}" | ||
58 | rmprog="${RMPROG-rm}" | ||
59 | mkdirprog="${MKDIRPROG-mkdir}" | ||
60 | |||
61 | transformbasename= | ||
62 | transform_arg= | ||
63 | instcmd="$mvprog" | ||
64 | chmodcmd="$chmodprog 0755" | ||
65 | chowncmd= | ||
66 | chgrpcmd= | ||
67 | stripcmd= | ||
68 | rmcmd="$rmprog -f" | ||
69 | mvcmd="$mvprog" | ||
70 | src= | ||
71 | dst= | ||
72 | dir_arg= | ||
73 | |||
74 | usage="Usage: $0 [OPTION]... SRCFILE DSTFILE | ||
75 | or: $0 [OPTION]... SRCFILES... DIRECTORY | ||
76 | or: $0 -d DIRECTORIES... | ||
77 | |||
78 | In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. | ||
79 | In the second, create the directory path DIR. | ||
80 | |||
81 | Options: | ||
82 | -b=TRANSFORMBASENAME | ||
83 | -c copy source (using $cpprog) instead of moving (using $mvprog). | ||
84 | -d create directories instead of installing files. | ||
85 | -g GROUP $chgrp installed files to GROUP. | ||
86 | -m MODE $chmod installed files to MODE. | ||
87 | -o USER $chown installed files to USER. | ||
88 | -s strip installed files (using $stripprog). | ||
89 | -t=TRANSFORM | ||
90 | --help display this help and exit. | ||
91 | --version display version info and exit. | ||
92 | |||
93 | Environment variables override the default commands: | ||
94 | CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG | ||
95 | " | ||
96 | |||
97 | while test -n "$1"; do | ||
98 | case $1 in | ||
99 | -b=*) transformbasename=`echo $1 | sed 's/-b=//'` | ||
100 | shift | ||
101 | continue;; | ||
102 | |||
103 | -c) instcmd=$cpprog | ||
104 | shift | ||
105 | continue;; | ||
106 | |||
107 | -d) dir_arg=true | ||
108 | shift | ||
109 | continue;; | ||
110 | |||
111 | -g) chgrpcmd="$chgrpprog $2" | ||
112 | shift | ||
113 | shift | ||
114 | continue;; | ||
115 | |||
116 | --help) echo "$usage"; exit 0;; | ||
117 | |||
118 | -m) chmodcmd="$chmodprog $2" | ||
119 | shift | ||
120 | shift | ||
121 | continue;; | ||
122 | |||
123 | -o) chowncmd="$chownprog $2" | ||
124 | shift | ||
125 | shift | ||
126 | continue;; | ||
127 | |||
128 | -s) stripcmd=$stripprog | ||
129 | shift | ||
130 | continue;; | ||
131 | |||
132 | -t=*) transformarg=`echo $1 | sed 's/-t=//'` | ||
133 | shift | ||
134 | continue;; | ||
135 | |||
136 | --version) echo "$0 $scriptversion"; exit 0;; | ||
137 | |||
138 | *) # When -d is used, all remaining arguments are directories to create. | ||
139 | test -n "$dir_arg" && break | ||
140 | # Otherwise, the last argument is the destination. Remove it from $@. | ||
141 | for arg | ||
142 | do | ||
143 | if test -n "$dstarg"; then | ||
144 | # $@ is not empty: it contains at least $arg. | ||
145 | set fnord "$@" "$dstarg" | ||
146 | shift # fnord | ||
147 | fi | ||
148 | shift # arg | ||
149 | dstarg=$arg | ||
150 | done | ||
151 | break;; | ||
152 | esac | ||
153 | done | ||
154 | |||
155 | if test -z "$1"; then | ||
156 | if test -z "$dir_arg"; then | ||
157 | echo "$0: no input file specified." >&2 | ||
158 | exit 1 | ||
159 | fi | ||
160 | # It's OK to call `install-sh -d' without argument. | ||
161 | # This can happen when creating conditional directories. | ||
162 | exit 0 | ||
163 | fi | ||
164 | |||
165 | for src | ||
166 | do | ||
167 | # Protect names starting with `-'. | ||
168 | case $src in | ||
169 | -*) src=./$src ;; | ||
170 | esac | ||
171 | |||
172 | if test -n "$dir_arg"; then | ||
173 | dst=$src | ||
174 | src= | ||
175 | |||
176 | if test -d "$dst"; then | ||
177 | instcmd=: | ||
178 | chmodcmd= | ||
179 | else | ||
180 | instcmd=$mkdirprog | ||
181 | fi | ||
182 | else | ||
183 | # Waiting for this to be detected by the "$instcmd $src $dsttmp" command | ||
184 | # might cause directories to be created, which would be especially bad | ||
185 | # if $src (and thus $dsttmp) contains '*'. | ||
186 | if test ! -f "$src" && test ! -d "$src"; then | ||
187 | echo "$0: $src does not exist." >&2 | ||
188 | exit 1 | ||
189 | fi | ||
190 | |||
191 | if test -z "$dstarg"; then | ||
192 | echo "$0: no destination specified." >&2 | ||
193 | exit 1 | ||
194 | fi | ||
195 | |||
196 | dst=$dstarg | ||
197 | # Protect names starting with `-'. | ||
198 | case $dst in | ||
199 | -*) dst=./$dst ;; | ||
200 | esac | ||
201 | |||
202 | # If destination is a directory, append the input filename; won't work | ||
203 | # if double slashes aren't ignored. | ||
204 | if test -d "$dst"; then | ||
205 | dst=$dst/`basename "$src"` | ||
206 | fi | ||
207 | fi | ||
208 | |||
209 | # This sed command emulates the dirname command. | ||
210 | dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` | ||
211 | |||
212 | # Make sure that the destination directory exists. | ||
213 | |||
214 | # Skip lots of stat calls in the usual case. | ||
215 | if test ! -d "$dstdir"; then | ||
216 | defaultIFS=' | ||
217 | ' | ||
218 | IFS="${IFS-$defaultIFS}" | ||
219 | |||
220 | oIFS=$IFS | ||
221 | # Some sh's can't handle IFS=/ for some reason. | ||
222 | IFS='%' | ||
223 | set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` | ||
224 | IFS=$oIFS | ||
225 | |||
226 | pathcomp= | ||
227 | |||
228 | while test $# -ne 0 ; do | ||
229 | pathcomp=$pathcomp$1 | ||
230 | shift | ||
231 | if test ! -d "$pathcomp"; then | ||
232 | $mkdirprog "$pathcomp" || lasterr=$? | ||
233 | # mkdir can fail with a `File exist' error in case several | ||
234 | # install-sh are creating the directory concurrently. This | ||
235 | # is OK. | ||
236 | test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } | ||
237 | fi | ||
238 | pathcomp=$pathcomp/ | ||
239 | done | ||
240 | fi | ||
241 | |||
242 | if test -n "$dir_arg"; then | ||
243 | $doit $instcmd "$dst" \ | ||
244 | && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ | ||
245 | && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ | ||
246 | && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ | ||
247 | && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } | ||
248 | |||
249 | else | ||
250 | # If we're going to rename the final executable, determine the name now. | ||
251 | if test -z "$transformarg"; then | ||
252 | dstfile=`basename "$dst"` | ||
253 | else | ||
254 | dstfile=`basename "$dst" $transformbasename \ | ||
255 | | sed $transformarg`$transformbasename | ||
256 | fi | ||
257 | |||
258 | # don't allow the sed command to completely eliminate the filename. | ||
259 | test -z "$dstfile" && dstfile=`basename "$dst"` | ||
260 | |||
261 | # Make a couple of temp file names in the proper directory. | ||
262 | dsttmp=$dstdir/_inst.$$_ | ||
263 | rmtmp=$dstdir/_rm.$$_ | ||
264 | |||
265 | # Trap to clean up those temp files at exit. | ||
266 | trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 | ||
267 | trap '(exit $?); exit' 1 2 13 15 | ||
268 | |||
269 | # Move or copy the file name to the temp name | ||
270 | $doit $instcmd "$src" "$dsttmp" && | ||
271 | |||
272 | # and set any options; do chmod last to preserve setuid bits. | ||
273 | # | ||
274 | # If any of these fail, we abort the whole thing. If we want to | ||
275 | # ignore errors from any of these, just make sure not to ignore | ||
276 | # errors from the above "$doit $instcmd $src $dsttmp" command. | ||
277 | # | ||
278 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ | ||
279 | && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ | ||
280 | && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ | ||
281 | && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && | ||
282 | |||
283 | # Now rename the file to the real destination. | ||
284 | { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ | ||
285 | || { | ||
286 | # The rename failed, perhaps because mv can't rename something else | ||
287 | # to itself, or perhaps because mv is so ancient that it does not | ||
288 | # support -f. | ||
289 | |||
290 | # Now remove or move aside any old file at destination location. | ||
291 | # We try this two ways since rm can't unlink itself on some | ||
292 | # systems and the destination file might be busy for other | ||
293 | # reasons. In this case, the final cleanup might fail but the new | ||
294 | # file should still install successfully. | ||
295 | { | ||
296 | if test -f "$dstdir/$dstfile"; then | ||
297 | $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ | ||
298 | || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ | ||
299 | || { | ||
300 | echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 | ||
301 | (exit 1); exit | ||
302 | } | ||
303 | else | ||
304 | : | ||
305 | fi | ||
306 | } && | ||
307 | |||
308 | # Now rename the file to the real destination. | ||
309 | $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" | ||
310 | } | ||
311 | } | ||
312 | fi || { (exit 1); exit; } | ||
313 | done | ||
314 | |||
315 | # The final little trick to "correctly" pass the exit status to the exit trap. | ||
316 | { | ||
317 | (exit 0); exit | ||
318 | } | ||
319 | |||
320 | # Local variables: | ||
321 | # eval: (add-hook 'write-file-hooks 'time-stamp) | ||
322 | # time-stamp-start: "scriptversion=" | ||
323 | # time-stamp-format: "%:y-%02m-%02d.%02H" | ||
324 | # time-stamp-end: "$" | ||
325 | # End: | ||
diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c new file mode 100644 index 00000000..60feb043 --- /dev/null +++ b/libltdl/ltdl.c | |||
@@ -0,0 +1,4478 @@ | |||
1 | /* ltdl.c -- system independent dlopen wrapper | ||
2 | Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. | ||
3 | Originally by Thomas Tanner <tanner@ffii.org> | ||
4 | This file is part of GNU Libtool. | ||
5 | |||
6 | This library is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU Lesser General Public | ||
8 | License as published by the Free Software Foundation; either | ||
9 | version 2 of the License, or (at your option) any later version. | ||
10 | |||
11 | As a special exception to the GNU Lesser General Public License, | ||
12 | if you distribute this file as part of a program or library that | ||
13 | is built using GNU libtool, you may include it under the same | ||
14 | distribution terms that you use for the rest of that program. | ||
15 | |||
16 | This library is distributed in the hope that it will be useful, | ||
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
19 | Lesser General Public License for more details. | ||
20 | |||
21 | You should have received a copy of the GNU Lesser General Public | ||
22 | License along with this library; if not, write to the Free Software | ||
23 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
24 | 02111-1307 USA | ||
25 | |||
26 | */ | ||
27 | |||
28 | #if HAVE_CONFIG_H | ||
29 | # include <config.h> | ||
30 | #endif | ||
31 | |||
32 | #if HAVE_UNISTD_H | ||
33 | # include <unistd.h> | ||
34 | #endif | ||
35 | |||
36 | #if HAVE_STDIO_H | ||
37 | # include <stdio.h> | ||
38 | #endif | ||
39 | |||
40 | /* Include the header defining malloc. On K&R C compilers, | ||
41 | that's <malloc.h>, on ANSI C and ISO C compilers, that's <stdlib.h>. */ | ||
42 | #if HAVE_STDLIB_H | ||
43 | # include <stdlib.h> | ||
44 | #else | ||
45 | # if HAVE_MALLOC_H | ||
46 | # include <malloc.h> | ||
47 | # endif | ||
48 | #endif | ||
49 | |||
50 | #if HAVE_STRING_H | ||
51 | # include <string.h> | ||
52 | #else | ||
53 | # if HAVE_STRINGS_H | ||
54 | # include <strings.h> | ||
55 | # endif | ||
56 | #endif | ||
57 | |||
58 | #if HAVE_CTYPE_H | ||
59 | # include <ctype.h> | ||
60 | #endif | ||
61 | |||
62 | #if HAVE_MEMORY_H | ||
63 | # include <memory.h> | ||
64 | #endif | ||
65 | |||
66 | #if HAVE_ERRNO_H | ||
67 | # include <errno.h> | ||
68 | #endif | ||
69 | |||
70 | |||
71 | #ifndef __WINDOWS__ | ||
72 | # ifdef __WIN32__ | ||
73 | # define __WINDOWS__ | ||
74 | # endif | ||
75 | #endif | ||
76 | |||
77 | |||
78 | #undef LT_USE_POSIX_DIRENT | ||
79 | #ifdef HAVE_CLOSEDIR | ||
80 | # ifdef HAVE_OPENDIR | ||
81 | # ifdef HAVE_READDIR | ||
82 | # ifdef HAVE_DIRENT_H | ||
83 | # define LT_USE_POSIX_DIRENT | ||
84 | # endif /* HAVE_DIRENT_H */ | ||
85 | # endif /* HAVE_READDIR */ | ||
86 | # endif /* HAVE_OPENDIR */ | ||
87 | #endif /* HAVE_CLOSEDIR */ | ||
88 | |||
89 | |||
90 | #undef LT_USE_WINDOWS_DIRENT_EMULATION | ||
91 | #ifndef LT_USE_POSIX_DIRENT | ||
92 | # ifdef __WINDOWS__ | ||
93 | # define LT_USE_WINDOWS_DIRENT_EMULATION | ||
94 | # endif /* __WINDOWS__ */ | ||
95 | #endif /* LT_USE_POSIX_DIRENT */ | ||
96 | |||
97 | |||
98 | #ifdef LT_USE_POSIX_DIRENT | ||
99 | # include <dirent.h> | ||
100 | # define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) | ||
101 | #else | ||
102 | # ifdef LT_USE_WINDOWS_DIRENT_EMULATION | ||
103 | # define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) | ||
104 | # else | ||
105 | # define dirent direct | ||
106 | # define LT_D_NAMLEN(dirent) ((dirent)->d_namlen) | ||
107 | # if HAVE_SYS_NDIR_H | ||
108 | # include <sys/ndir.h> | ||
109 | # endif | ||
110 | # if HAVE_SYS_DIR_H | ||
111 | # include <sys/dir.h> | ||
112 | # endif | ||
113 | # if HAVE_NDIR_H | ||
114 | # include <ndir.h> | ||
115 | # endif | ||
116 | # endif | ||
117 | #endif | ||
118 | |||
119 | #if HAVE_ARGZ_H | ||
120 | # include <argz.h> | ||
121 | #endif | ||
122 | |||
123 | #if HAVE_ASSERT_H | ||
124 | # include <assert.h> | ||
125 | #else | ||
126 | # define assert(arg) ((void) 0) | ||
127 | #endif | ||
128 | |||
129 | #include "ltdl.h" | ||
130 | |||
131 | #if WITH_DMALLOC | ||
132 | # include <dmalloc.h> | ||
133 | #endif | ||
134 | |||
135 | |||
136 | |||
137 | |||
138 | /* --- WINDOWS SUPPORT --- */ | ||
139 | |||
140 | |||
141 | #ifdef DLL_EXPORT | ||
142 | # define LT_GLOBAL_DATA __declspec(dllexport) | ||
143 | #else | ||
144 | # define LT_GLOBAL_DATA | ||
145 | #endif | ||
146 | |||
147 | /* fopen() mode flags for reading a text file */ | ||
148 | #undef LT_READTEXT_MODE | ||
149 | #ifdef __WINDOWS__ | ||
150 | # define LT_READTEXT_MODE "rt" | ||
151 | #else | ||
152 | # define LT_READTEXT_MODE "r" | ||
153 | #endif | ||
154 | |||
155 | #ifdef LT_USE_WINDOWS_DIRENT_EMULATION | ||
156 | |||
157 | #include <windows.h> | ||
158 | |||
159 | #define dirent lt_dirent | ||
160 | #define DIR lt_DIR | ||
161 | |||
162 | struct dirent | ||
163 | { | ||
164 | char d_name[2048]; | ||
165 | int d_namlen; | ||
166 | }; | ||
167 | |||
168 | typedef struct _DIR | ||
169 | { | ||
170 | HANDLE hSearch; | ||
171 | WIN32_FIND_DATA Win32FindData; | ||
172 | BOOL firsttime; | ||
173 | struct dirent file_info; | ||
174 | } DIR; | ||
175 | |||
176 | #endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ | ||
177 | |||
178 | |||
179 | /* --- MANIFEST CONSTANTS --- */ | ||
180 | |||
181 | |||
182 | /* Standard libltdl search path environment variable name */ | ||
183 | #undef LTDL_SEARCHPATH_VAR | ||
184 | #define LTDL_SEARCHPATH_VAR "LTDL_LIBRARY_PATH" | ||
185 | |||
186 | /* Standard libtool archive file extension. */ | ||
187 | #undef LTDL_ARCHIVE_EXT | ||
188 | #define LTDL_ARCHIVE_EXT ".la" | ||
189 | |||
190 | /* max. filename length */ | ||
191 | #ifndef LT_FILENAME_MAX | ||
192 | # define LT_FILENAME_MAX 1024 | ||
193 | #endif | ||
194 | |||
195 | /* This is the maximum symbol size that won't require malloc/free */ | ||
196 | #undef LT_SYMBOL_LENGTH | ||
197 | #define LT_SYMBOL_LENGTH 128 | ||
198 | |||
199 | /* This accounts for the _LTX_ separator */ | ||
200 | #undef LT_SYMBOL_OVERHEAD | ||
201 | #define LT_SYMBOL_OVERHEAD 5 | ||
202 | |||
203 | |||
204 | |||
205 | |||
206 | /* --- MEMORY HANDLING --- */ | ||
207 | |||
208 | |||
209 | /* These are the functions used internally. In addition to making | ||
210 | use of the associated function pointers above, they also perform | ||
211 | error handling. */ | ||
212 | static char *lt_estrdup LT_PARAMS((const char *str)); | ||
213 | static lt_ptr lt_emalloc LT_PARAMS((size_t size)); | ||
214 | static lt_ptr lt_erealloc LT_PARAMS((lt_ptr addr, size_t size)); | ||
215 | |||
216 | /* static lt_ptr rpl_realloc LT_PARAMS((lt_ptr ptr, size_t size)); */ | ||
217 | #define rpl_realloc realloc | ||
218 | |||
219 | /* These are the pointers that can be changed by the caller: */ | ||
220 | LT_GLOBAL_DATA lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)) | ||
221 | = (lt_ptr (*) LT_PARAMS((size_t))) malloc; | ||
222 | LT_GLOBAL_DATA lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)) | ||
223 | = (lt_ptr (*) LT_PARAMS((lt_ptr, size_t))) rpl_realloc; | ||
224 | LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)) | ||
225 | = (void (*) LT_PARAMS((lt_ptr))) free; | ||
226 | |||
227 | /* The following macros reduce the amount of typing needed to cast | ||
228 | assigned memory. */ | ||
229 | #if WITH_DMALLOC | ||
230 | |||
231 | #define LT_DLMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) | ||
232 | #define LT_DLREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) | ||
233 | #define LT_DLFREE(p) \ | ||
234 | LT_STMT_START { if (p) (p) = (xfree (p), (lt_ptr) 0); } LT_STMT_END | ||
235 | |||
236 | #define LT_EMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) | ||
237 | #define LT_EREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) | ||
238 | |||
239 | #else | ||
240 | |||
241 | #define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp))) | ||
242 | #define LT_DLREALLOC(tp, p, n) ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp))) | ||
243 | #define LT_DLFREE(p) \ | ||
244 | LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END | ||
245 | |||
246 | #define LT_EMALLOC(tp, n) ((tp *) lt_emalloc ((n) * sizeof(tp))) | ||
247 | #define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) | ||
248 | |||
249 | #endif | ||
250 | |||
251 | #define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \ | ||
252 | if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; } \ | ||
253 | } LT_STMT_END | ||
254 | |||
255 | |||
256 | /* --- REPLACEMENT FUNCTIONS --- */ | ||
257 | |||
258 | |||
259 | #undef strdup | ||
260 | #define strdup rpl_strdup | ||
261 | |||
262 | static char *strdup LT_PARAMS((const char *str)); | ||
263 | |||
264 | static char * | ||
265 | strdup(str) | ||
266 | const char *str; | ||
267 | { | ||
268 | char *tmp = 0; | ||
269 | |||
270 | if (str) | ||
271 | { | ||
272 | tmp = LT_DLMALLOC (char, 1+ strlen (str)); | ||
273 | if (tmp) | ||
274 | { | ||
275 | strcpy(tmp, str); | ||
276 | } | ||
277 | } | ||
278 | |||
279 | return tmp; | ||
280 | } | ||
281 | |||
282 | |||
283 | #if ! HAVE_STRCMP | ||
284 | |||
285 | #undef strcmp | ||
286 | #define strcmp rpl_strcmp | ||
287 | |||
288 | static int strcmp LT_PARAMS((const char *str1, const char *str2)); | ||
289 | |||
290 | static int | ||
291 | strcmp (str1, str2) | ||
292 | const char *str1; | ||
293 | const char *str2; | ||
294 | { | ||
295 | if (str1 == str2) | ||
296 | return 0; | ||
297 | if (str1 == 0) | ||
298 | return -1; | ||
299 | if (str2 == 0) | ||
300 | return 1; | ||
301 | |||
302 | for (;*str1 && *str2; ++str1, ++str2) | ||
303 | { | ||
304 | if (*str1 != *str2) | ||
305 | break; | ||
306 | } | ||
307 | |||
308 | return (int)(*str1 - *str2); | ||
309 | } | ||
310 | #endif | ||
311 | |||
312 | |||
313 | #if ! HAVE_STRCHR | ||
314 | |||
315 | # if HAVE_INDEX | ||
316 | # define strchr index | ||
317 | # else | ||
318 | # define strchr rpl_strchr | ||
319 | |||
320 | static const char *strchr LT_PARAMS((const char *str, int ch)); | ||
321 | |||
322 | static const char* | ||
323 | strchr(str, ch) | ||
324 | const char *str; | ||
325 | int ch; | ||
326 | { | ||
327 | const char *p; | ||
328 | |||
329 | for (p = str; *p != (char)ch && *p != LT_EOS_CHAR; ++p) | ||
330 | /*NOWORK*/; | ||
331 | |||
332 | return (*p == (char)ch) ? p : 0; | ||
333 | } | ||
334 | |||
335 | # endif | ||
336 | #endif /* !HAVE_STRCHR */ | ||
337 | |||
338 | |||
339 | #if ! HAVE_STRRCHR | ||
340 | |||
341 | # if HAVE_RINDEX | ||
342 | # define strrchr rindex | ||
343 | # else | ||
344 | # define strrchr rpl_strrchr | ||
345 | |||
346 | static const char *strrchr LT_PARAMS((const char *str, int ch)); | ||
347 | |||
348 | static const char* | ||
349 | strrchr(str, ch) | ||
350 | const char *str; | ||
351 | int ch; | ||
352 | { | ||
353 | const char *p, *q = 0; | ||
354 | |||
355 | for (p = str; *p != LT_EOS_CHAR; ++p) | ||
356 | { | ||
357 | if (*p == (char) ch) | ||
358 | { | ||
359 | q = p; | ||
360 | } | ||
361 | } | ||
362 | |||
363 | return q; | ||
364 | } | ||
365 | |||
366 | # endif | ||
367 | #endif | ||
368 | |||
369 | /* NOTE: Neither bcopy nor the memcpy implementation below can | ||
370 | reliably handle copying in overlapping areas of memory. Use | ||
371 | memmove (for which there is a fallback implmentation below) | ||
372 | if you need that behaviour. */ | ||
373 | #if ! HAVE_MEMCPY | ||
374 | |||
375 | # if HAVE_BCOPY | ||
376 | # define memcpy(dest, src, size) bcopy (src, dest, size) | ||
377 | # else | ||
378 | # define memcpy rpl_memcpy | ||
379 | |||
380 | static lt_ptr memcpy LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); | ||
381 | |||
382 | static lt_ptr | ||
383 | memcpy (dest, src, size) | ||
384 | lt_ptr dest; | ||
385 | const lt_ptr src; | ||
386 | size_t size; | ||
387 | { | ||
388 | size_t i = 0; | ||
389 | |||
390 | for (i = 0; i < size; ++i) | ||
391 | { | ||
392 | dest[i] = src[i]; | ||
393 | } | ||
394 | |||
395 | return dest; | ||
396 | } | ||
397 | |||
398 | # endif /* !HAVE_BCOPY */ | ||
399 | #endif /* !HAVE_MEMCPY */ | ||
400 | |||
401 | #if ! HAVE_MEMMOVE | ||
402 | # define memmove rpl_memmove | ||
403 | |||
404 | static lt_ptr memmove LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); | ||
405 | |||
406 | static lt_ptr | ||
407 | memmove (dest, src, size) | ||
408 | lt_ptr dest; | ||
409 | const lt_ptr src; | ||
410 | size_t size; | ||
411 | { | ||
412 | size_t i; | ||
413 | |||
414 | if (dest < src) | ||
415 | for (i = 0; i < size; ++i) | ||
416 | { | ||
417 | dest[i] = src[i]; | ||
418 | } | ||
419 | else if (dest > src) | ||
420 | for (i = size -1; i >= 0; --i) | ||
421 | { | ||
422 | dest[i] = src[i]; | ||
423 | } | ||
424 | |||
425 | return dest; | ||
426 | } | ||
427 | |||
428 | #endif /* !HAVE_MEMMOVE */ | ||
429 | |||
430 | #ifdef LT_USE_WINDOWS_DIRENT_EMULATION | ||
431 | |||
432 | static void closedir LT_PARAMS((DIR *entry)); | ||
433 | |||
434 | static void | ||
435 | closedir(entry) | ||
436 | DIR *entry; | ||
437 | { | ||
438 | assert(entry != (DIR *) NULL); | ||
439 | FindClose(entry->hSearch); | ||
440 | lt_dlfree((lt_ptr)entry); | ||
441 | } | ||
442 | |||
443 | |||
444 | static DIR * opendir LT_PARAMS((const char *path)); | ||
445 | |||
446 | static DIR* | ||
447 | opendir (path) | ||
448 | const char *path; | ||
449 | { | ||
450 | char file_specification[LT_FILENAME_MAX]; | ||
451 | DIR *entry; | ||
452 | |||
453 | assert(path != (char *) NULL); | ||
454 | (void) strncpy(file_specification,path,LT_FILENAME_MAX-1); | ||
455 | (void) strcat(file_specification,"\\"); | ||
456 | entry = LT_DLMALLOC (DIR,sizeof(DIR)); | ||
457 | if (entry != (DIR *) 0) | ||
458 | { | ||
459 | entry->firsttime = TRUE; | ||
460 | entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); | ||
461 | } | ||
462 | if (entry->hSearch == INVALID_HANDLE_VALUE) | ||
463 | { | ||
464 | (void) strcat(file_specification,"\\*.*"); | ||
465 | entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); | ||
466 | if (entry->hSearch == INVALID_HANDLE_VALUE) | ||
467 | { | ||
468 | LT_DLFREE (entry); | ||
469 | return (DIR *) 0; | ||
470 | } | ||
471 | } | ||
472 | return(entry); | ||
473 | } | ||
474 | |||
475 | |||
476 | static struct dirent *readdir LT_PARAMS((DIR *entry)); | ||
477 | |||
478 | static struct dirent *readdir(entry) | ||
479 | DIR *entry; | ||
480 | { | ||
481 | int | ||
482 | status; | ||
483 | |||
484 | if (entry == (DIR *) 0) | ||
485 | return((struct dirent *) 0); | ||
486 | if (!entry->firsttime) | ||
487 | { | ||
488 | status = FindNextFile(entry->hSearch,&entry->Win32FindData); | ||
489 | if (status == 0) | ||
490 | return((struct dirent *) 0); | ||
491 | } | ||
492 | entry->firsttime = FALSE; | ||
493 | (void) strncpy(entry->file_info.d_name,entry->Win32FindData.cFileName, | ||
494 | LT_FILENAME_MAX-1); | ||
495 | entry->file_info.d_namlen = strlen(entry->file_info.d_name); | ||
496 | return(&entry->file_info); | ||
497 | } | ||
498 | |||
499 | #endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ | ||
500 | |||
501 | /* According to Alexandre Oliva <oliva@lsd.ic.unicamp.br>, | ||
502 | ``realloc is not entirely portable'' | ||
503 | In any case we want to use the allocator supplied by the user without | ||
504 | burdening them with an lt_dlrealloc function pointer to maintain. | ||
505 | Instead implement our own version (with known boundary conditions) | ||
506 | using lt_dlmalloc and lt_dlfree. */ | ||
507 | |||
508 | /* #undef realloc | ||
509 | #define realloc rpl_realloc | ||
510 | */ | ||
511 | #if 0 | ||
512 | /* You can't (re)define realloc unless you also (re)define malloc. | ||
513 | Right now, this code uses the size of the *destination* to decide | ||
514 | how much to copy. That's not right, but you can't know the size | ||
515 | of the source unless you know enough about, or wrote malloc. So | ||
516 | this code is disabled... */ | ||
517 | |||
518 | static lt_ptr | ||
519 | realloc (ptr, size) | ||
520 | lt_ptr ptr; | ||
521 | size_t size; | ||
522 | { | ||
523 | if (size == 0) | ||
524 | { | ||
525 | /* For zero or less bytes, free the original memory */ | ||
526 | if (ptr != 0) | ||
527 | { | ||
528 | lt_dlfree (ptr); | ||
529 | } | ||
530 | |||
531 | return (lt_ptr) 0; | ||
532 | } | ||
533 | else if (ptr == 0) | ||
534 | { | ||
535 | /* Allow reallocation of a NULL pointer. */ | ||
536 | return lt_dlmalloc (size); | ||
537 | } | ||
538 | else | ||
539 | { | ||
540 | /* Allocate a new block, copy and free the old block. */ | ||
541 | lt_ptr mem = lt_dlmalloc (size); | ||
542 | |||
543 | if (mem) | ||
544 | { | ||
545 | memcpy (mem, ptr, size); | ||
546 | lt_dlfree (ptr); | ||
547 | } | ||
548 | |||
549 | /* Note that the contents of PTR are not damaged if there is | ||
550 | insufficient memory to realloc. */ | ||
551 | return mem; | ||
552 | } | ||
553 | } | ||
554 | #endif | ||
555 | |||
556 | |||
557 | #if ! HAVE_ARGZ_APPEND | ||
558 | # define argz_append rpl_argz_append | ||
559 | |||
560 | static error_t argz_append LT_PARAMS((char **pargz, size_t *pargz_len, | ||
561 | const char *buf, size_t buf_len)); | ||
562 | |||
563 | static error_t | ||
564 | argz_append (pargz, pargz_len, buf, buf_len) | ||
565 | char **pargz; | ||
566 | size_t *pargz_len; | ||
567 | const char *buf; | ||
568 | size_t buf_len; | ||
569 | { | ||
570 | size_t argz_len; | ||
571 | char *argz; | ||
572 | |||
573 | assert (pargz); | ||
574 | assert (pargz_len); | ||
575 | assert ((*pargz && *pargz_len) || (!*pargz && !*pargz_len)); | ||
576 | |||
577 | /* If nothing needs to be appended, no more work is required. */ | ||
578 | if (buf_len == 0) | ||
579 | return 0; | ||
580 | |||
581 | /* Ensure there is enough room to append BUF_LEN. */ | ||
582 | argz_len = *pargz_len + buf_len; | ||
583 | argz = LT_DLREALLOC (char, *pargz, argz_len); | ||
584 | if (!argz) | ||
585 | return ENOMEM; | ||
586 | |||
587 | /* Copy characters from BUF after terminating '\0' in ARGZ. */ | ||
588 | memcpy (argz + *pargz_len, buf, buf_len); | ||
589 | |||
590 | /* Assign new values. */ | ||
591 | *pargz = argz; | ||
592 | *pargz_len = argz_len; | ||
593 | |||
594 | return 0; | ||
595 | } | ||
596 | #endif /* !HAVE_ARGZ_APPEND */ | ||
597 | |||
598 | |||
599 | #if ! HAVE_ARGZ_CREATE_SEP | ||
600 | # define argz_create_sep rpl_argz_create_sep | ||
601 | |||
602 | static error_t argz_create_sep LT_PARAMS((const char *str, int delim, | ||
603 | char **pargz, size_t *pargz_len)); | ||
604 | |||
605 | static error_t | ||
606 | argz_create_sep (str, delim, pargz, pargz_len) | ||
607 | const char *str; | ||
608 | int delim; | ||
609 | char **pargz; | ||
610 | size_t *pargz_len; | ||
611 | { | ||
612 | size_t argz_len; | ||
613 | char *argz = 0; | ||
614 | |||
615 | assert (str); | ||
616 | assert (pargz); | ||
617 | assert (pargz_len); | ||
618 | |||
619 | /* Make a copy of STR, but replacing each occurence of | ||
620 | DELIM with '\0'. */ | ||
621 | argz_len = 1+ LT_STRLEN (str); | ||
622 | if (argz_len) | ||
623 | { | ||
624 | const char *p; | ||
625 | char *q; | ||
626 | |||
627 | argz = LT_DLMALLOC (char, argz_len); | ||
628 | if (!argz) | ||
629 | return ENOMEM; | ||
630 | |||
631 | for (p = str, q = argz; *p != LT_EOS_CHAR; ++p) | ||
632 | { | ||
633 | if (*p == delim) | ||
634 | { | ||
635 | /* Ignore leading delimiters, and fold consecutive | ||
636 | delimiters in STR into a single '\0' in ARGZ. */ | ||
637 | if ((q > argz) && (q[-1] != LT_EOS_CHAR)) | ||
638 | *q++ = LT_EOS_CHAR; | ||
639 | else | ||
640 | --argz_len; | ||
641 | } | ||
642 | else | ||
643 | *q++ = *p; | ||
644 | } | ||
645 | /* Copy terminating LT_EOS_CHAR. */ | ||
646 | *q = *p; | ||
647 | } | ||
648 | |||
649 | /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory. */ | ||
650 | if (!argz_len) | ||
651 | LT_DLFREE (argz); | ||
652 | |||
653 | /* Assign new values. */ | ||
654 | *pargz = argz; | ||
655 | *pargz_len = argz_len; | ||
656 | |||
657 | return 0; | ||
658 | } | ||
659 | #endif /* !HAVE_ARGZ_CREATE_SEP */ | ||
660 | |||
661 | |||
662 | #if ! HAVE_ARGZ_INSERT | ||
663 | # define argz_insert rpl_argz_insert | ||
664 | |||
665 | static error_t argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, | ||
666 | char *before, const char *entry)); | ||
667 | |||
668 | static error_t | ||
669 | argz_insert (pargz, pargz_len, before, entry) | ||
670 | char **pargz; | ||
671 | size_t *pargz_len; | ||
672 | char *before; | ||
673 | const char *entry; | ||
674 | { | ||
675 | assert (pargz); | ||
676 | assert (pargz_len); | ||
677 | assert (entry && *entry); | ||
678 | |||
679 | /* No BEFORE address indicates ENTRY should be inserted after the | ||
680 | current last element. */ | ||
681 | if (!before) | ||
682 | return argz_append (pargz, pargz_len, entry, 1+ LT_STRLEN (entry)); | ||
683 | |||
684 | /* This probably indicates a programmer error, but to preserve | ||
685 | semantics, scan back to the start of an entry if BEFORE points | ||
686 | into the middle of it. */ | ||
687 | while ((before > *pargz) && (before[-1] != LT_EOS_CHAR)) | ||
688 | --before; | ||
689 | |||
690 | { | ||
691 | size_t entry_len = 1+ LT_STRLEN (entry); | ||
692 | size_t argz_len = *pargz_len + entry_len; | ||
693 | size_t offset = before - *pargz; | ||
694 | char *argz = LT_DLREALLOC (char, *pargz, argz_len); | ||
695 | |||
696 | if (!argz) | ||
697 | return ENOMEM; | ||
698 | |||
699 | /* Make BEFORE point to the equivalent offset in ARGZ that it | ||
700 | used to have in *PARGZ incase realloc() moved the block. */ | ||
701 | before = argz + offset; | ||
702 | |||
703 | /* Move the ARGZ entries starting at BEFORE up into the new | ||
704 | space at the end -- making room to copy ENTRY into the | ||
705 | resulting gap. */ | ||
706 | memmove (before + entry_len, before, *pargz_len - offset); | ||
707 | memcpy (before, entry, entry_len); | ||
708 | |||
709 | /* Assign new values. */ | ||
710 | *pargz = argz; | ||
711 | *pargz_len = argz_len; | ||
712 | } | ||
713 | |||
714 | return 0; | ||
715 | } | ||
716 | #endif /* !HAVE_ARGZ_INSERT */ | ||
717 | |||
718 | |||
719 | #if ! HAVE_ARGZ_NEXT | ||
720 | # define argz_next rpl_argz_next | ||
721 | |||
722 | static char *argz_next LT_PARAMS((char *argz, size_t argz_len, | ||
723 | const char *entry)); | ||
724 | |||
725 | static char * | ||
726 | argz_next (argz, argz_len, entry) | ||
727 | char *argz; | ||
728 | size_t argz_len; | ||
729 | const char *entry; | ||
730 | { | ||
731 | assert ((argz && argz_len) || (!argz && !argz_len)); | ||
732 | |||
733 | if (entry) | ||
734 | { | ||
735 | /* Either ARGZ/ARGZ_LEN is empty, or ENTRY points into an address | ||
736 | within the ARGZ vector. */ | ||
737 | assert ((!argz && !argz_len) | ||
738 | || ((argz <= entry) && (entry < (argz + argz_len)))); | ||
739 | |||
740 | /* Move to the char immediately after the terminating | ||
741 | '\0' of ENTRY. */ | ||
742 | entry = 1+ strchr (entry, LT_EOS_CHAR); | ||
743 | |||
744 | /* Return either the new ENTRY, or else NULL if ARGZ is | ||
745 | exhausted. */ | ||
746 | return (entry >= argz + argz_len) ? 0 : (char *) entry; | ||
747 | } | ||
748 | else | ||
749 | { | ||
750 | /* This should probably be flagged as a programmer error, | ||
751 | since starting an argz_next loop with the iterator set | ||
752 | to ARGZ is safer. To preserve semantics, handle the NULL | ||
753 | case by returning the start of ARGZ (if any). */ | ||
754 | if (argz_len > 0) | ||
755 | return argz; | ||
756 | else | ||
757 | return 0; | ||
758 | } | ||
759 | } | ||
760 | #endif /* !HAVE_ARGZ_NEXT */ | ||
761 | |||
762 | |||
763 | |||
764 | #if ! HAVE_ARGZ_STRINGIFY | ||
765 | # define argz_stringify rpl_argz_stringify | ||
766 | |||
767 | static void argz_stringify LT_PARAMS((char *argz, size_t argz_len, | ||
768 | int sep)); | ||
769 | |||
770 | static void | ||
771 | argz_stringify (argz, argz_len, sep) | ||
772 | char *argz; | ||
773 | size_t argz_len; | ||
774 | int sep; | ||
775 | { | ||
776 | assert ((argz && argz_len) || (!argz && !argz_len)); | ||
777 | |||
778 | if (sep) | ||
779 | { | ||
780 | --argz_len; /* don't stringify the terminating EOS */ | ||
781 | while (--argz_len > 0) | ||
782 | { | ||
783 | if (argz[argz_len] == LT_EOS_CHAR) | ||
784 | argz[argz_len] = sep; | ||
785 | } | ||
786 | } | ||
787 | } | ||
788 | #endif /* !HAVE_ARGZ_STRINGIFY */ | ||
789 | |||
790 | |||
791 | |||
792 | |||
793 | /* --- TYPE DEFINITIONS -- */ | ||
794 | |||
795 | |||
796 | /* This type is used for the array of caller data sets in each handler. */ | ||
797 | typedef struct { | ||
798 | lt_dlcaller_id key; | ||
799 | lt_ptr data; | ||
800 | } lt_caller_data; | ||
801 | |||
802 | |||
803 | |||
804 | |||
805 | /* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */ | ||
806 | |||
807 | |||
808 | /* Extract the diagnostic strings from the error table macro in the same | ||
809 | order as the enumerated indices in ltdl.h. */ | ||
810 | |||
811 | static const char *lt_dlerror_strings[] = | ||
812 | { | ||
813 | #define LT_ERROR(name, diagnostic) (diagnostic), | ||
814 | lt_dlerror_table | ||
815 | #undef LT_ERROR | ||
816 | |||
817 | 0 | ||
818 | }; | ||
819 | |||
820 | /* This structure is used for the list of registered loaders. */ | ||
821 | struct lt_dlloader { | ||
822 | struct lt_dlloader *next; | ||
823 | const char *loader_name; /* identifying name for each loader */ | ||
824 | const char *sym_prefix; /* prefix for symbols */ | ||
825 | lt_module_open *module_open; | ||
826 | lt_module_close *module_close; | ||
827 | lt_find_sym *find_sym; | ||
828 | lt_dlloader_exit *dlloader_exit; | ||
829 | lt_user_data dlloader_data; | ||
830 | }; | ||
831 | |||
832 | struct lt_dlhandle_struct { | ||
833 | struct lt_dlhandle_struct *next; | ||
834 | lt_dlloader *loader; /* dlopening interface */ | ||
835 | lt_dlinfo info; | ||
836 | int depcount; /* number of dependencies */ | ||
837 | lt_dlhandle *deplibs; /* dependencies */ | ||
838 | lt_module module; /* system module handle */ | ||
839 | lt_ptr system; /* system specific data */ | ||
840 | lt_caller_data *caller_data; /* per caller associated data */ | ||
841 | int flags; /* various boolean stats */ | ||
842 | }; | ||
843 | |||
844 | /* Various boolean flags can be stored in the flags field of an | ||
845 | lt_dlhandle_struct... */ | ||
846 | #define LT_DLGET_FLAG(handle, flag) (((handle)->flags & (flag)) == (flag)) | ||
847 | #define LT_DLSET_FLAG(handle, flag) ((handle)->flags |= (flag)) | ||
848 | |||
849 | #define LT_DLRESIDENT_FLAG (0x01 << 0) | ||
850 | /* ...add more flags here... */ | ||
851 | |||
852 | #define LT_DLIS_RESIDENT(handle) LT_DLGET_FLAG(handle, LT_DLRESIDENT_FLAG) | ||
853 | |||
854 | |||
855 | #define LT_DLSTRERROR(name) lt_dlerror_strings[LT_CONC(LT_ERROR_,name)] | ||
856 | |||
857 | static const char objdir[] = LTDL_OBJDIR; | ||
858 | static const char archive_ext[] = LTDL_ARCHIVE_EXT; | ||
859 | #ifdef LTDL_SHLIB_EXT | ||
860 | static const char shlib_ext[] = LTDL_SHLIB_EXT; | ||
861 | #endif | ||
862 | #ifdef LTDL_SYSSEARCHPATH | ||
863 | static const char sys_search_path[] = LTDL_SYSSEARCHPATH; | ||
864 | #endif | ||
865 | |||
866 | |||
867 | |||
868 | |||
869 | /* --- MUTEX LOCKING --- */ | ||
870 | |||
871 | |||
872 | /* Macros to make it easier to run the lock functions only if they have | ||
873 | been registered. The reason for the complicated lock macro is to | ||
874 | ensure that the stored error message from the last error is not | ||
875 | accidentally erased if the current function doesn't generate an | ||
876 | error of its own. */ | ||
877 | #define LT_DLMUTEX_LOCK() LT_STMT_START { \ | ||
878 | if (lt_dlmutex_lock_func) (*lt_dlmutex_lock_func)(); \ | ||
879 | } LT_STMT_END | ||
880 | #define LT_DLMUTEX_UNLOCK() LT_STMT_START { \ | ||
881 | if (lt_dlmutex_unlock_func) (*lt_dlmutex_unlock_func)();\ | ||
882 | } LT_STMT_END | ||
883 | #define LT_DLMUTEX_SETERROR(errormsg) LT_STMT_START { \ | ||
884 | if (lt_dlmutex_seterror_func) \ | ||
885 | (*lt_dlmutex_seterror_func) (errormsg); \ | ||
886 | else lt_dllast_error = (errormsg); } LT_STMT_END | ||
887 | #define LT_DLMUTEX_GETERROR(errormsg) LT_STMT_START { \ | ||
888 | if (lt_dlmutex_seterror_func) \ | ||
889 | (errormsg) = (*lt_dlmutex_geterror_func) (); \ | ||
890 | else (errormsg) = lt_dllast_error; } LT_STMT_END | ||
891 | |||
892 | /* The mutex functions stored here are global, and are necessarily the | ||
893 | same for all threads that wish to share access to libltdl. */ | ||
894 | static lt_dlmutex_lock *lt_dlmutex_lock_func = 0; | ||
895 | static lt_dlmutex_unlock *lt_dlmutex_unlock_func = 0; | ||
896 | static lt_dlmutex_seterror *lt_dlmutex_seterror_func = 0; | ||
897 | static lt_dlmutex_geterror *lt_dlmutex_geterror_func = 0; | ||
898 | static const char *lt_dllast_error = 0; | ||
899 | |||
900 | |||
901 | /* Either set or reset the mutex functions. Either all the arguments must | ||
902 | be valid functions, or else all can be NULL to turn off locking entirely. | ||
903 | The registered functions should be manipulating a static global lock | ||
904 | from the lock() and unlock() callbacks, which needs to be reentrant. */ | ||
905 | int | ||
906 | lt_dlmutex_register (lock, unlock, seterror, geterror) | ||
907 | lt_dlmutex_lock *lock; | ||
908 | lt_dlmutex_unlock *unlock; | ||
909 | lt_dlmutex_seterror *seterror; | ||
910 | lt_dlmutex_geterror *geterror; | ||
911 | { | ||
912 | lt_dlmutex_unlock *old_unlock = unlock; | ||
913 | int errors = 0; | ||
914 | |||
915 | /* Lock using the old lock() callback, if any. */ | ||
916 | LT_DLMUTEX_LOCK (); | ||
917 | |||
918 | if ((lock && unlock && seterror && geterror) | ||
919 | || !(lock || unlock || seterror || geterror)) | ||
920 | { | ||
921 | lt_dlmutex_lock_func = lock; | ||
922 | lt_dlmutex_unlock_func = unlock; | ||
923 | lt_dlmutex_geterror_func = geterror; | ||
924 | } | ||
925 | else | ||
926 | { | ||
927 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_MUTEX_ARGS)); | ||
928 | ++errors; | ||
929 | } | ||
930 | |||
931 | /* Use the old unlock() callback we saved earlier, if any. Otherwise | ||
932 | record any errors using internal storage. */ | ||
933 | if (old_unlock) | ||
934 | (*old_unlock) (); | ||
935 | |||
936 | /* Return the number of errors encountered during the execution of | ||
937 | this function. */ | ||
938 | return errors; | ||
939 | } | ||
940 | |||
941 | |||
942 | |||
943 | |||
944 | /* --- ERROR HANDLING --- */ | ||
945 | |||
946 | |||
947 | static const char **user_error_strings = 0; | ||
948 | static int errorcount = LT_ERROR_MAX; | ||
949 | |||
950 | int | ||
951 | lt_dladderror (diagnostic) | ||
952 | const char *diagnostic; | ||
953 | { | ||
954 | int errindex = 0; | ||
955 | int result = -1; | ||
956 | const char **temp = (const char **) 0; | ||
957 | |||
958 | assert (diagnostic); | ||
959 | |||
960 | LT_DLMUTEX_LOCK (); | ||
961 | |||
962 | errindex = errorcount - LT_ERROR_MAX; | ||
963 | temp = LT_EREALLOC (const char *, user_error_strings, 1 + errindex); | ||
964 | if (temp) | ||
965 | { | ||
966 | user_error_strings = temp; | ||
967 | user_error_strings[errindex] = diagnostic; | ||
968 | result = errorcount++; | ||
969 | } | ||
970 | |||
971 | LT_DLMUTEX_UNLOCK (); | ||
972 | |||
973 | return result; | ||
974 | } | ||
975 | |||
976 | int | ||
977 | lt_dlseterror (errindex) | ||
978 | int errindex; | ||
979 | { | ||
980 | int errors = 0; | ||
981 | |||
982 | LT_DLMUTEX_LOCK (); | ||
983 | |||
984 | if (errindex >= errorcount || errindex < 0) | ||
985 | { | ||
986 | /* Ack! Error setting the error message! */ | ||
987 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_ERRORCODE)); | ||
988 | ++errors; | ||
989 | } | ||
990 | else if (errindex < LT_ERROR_MAX) | ||
991 | { | ||
992 | /* No error setting the error message! */ | ||
993 | LT_DLMUTEX_SETERROR (lt_dlerror_strings[errindex]); | ||
994 | } | ||
995 | else | ||
996 | { | ||
997 | /* No error setting the error message! */ | ||
998 | LT_DLMUTEX_SETERROR (user_error_strings[errindex - LT_ERROR_MAX]); | ||
999 | } | ||
1000 | |||
1001 | LT_DLMUTEX_UNLOCK (); | ||
1002 | |||
1003 | return errors; | ||
1004 | } | ||
1005 | |||
1006 | static lt_ptr | ||
1007 | lt_emalloc (size) | ||
1008 | size_t size; | ||
1009 | { | ||
1010 | lt_ptr mem = lt_dlmalloc (size); | ||
1011 | if (size && !mem) | ||
1012 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); | ||
1013 | return mem; | ||
1014 | } | ||
1015 | |||
1016 | static lt_ptr | ||
1017 | lt_erealloc (addr, size) | ||
1018 | lt_ptr addr; | ||
1019 | size_t size; | ||
1020 | { | ||
1021 | lt_ptr mem = lt_dlrealloc (addr, size); | ||
1022 | if (size && !mem) | ||
1023 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); | ||
1024 | return mem; | ||
1025 | } | ||
1026 | |||
1027 | static char * | ||
1028 | lt_estrdup (str) | ||
1029 | const char *str; | ||
1030 | { | ||
1031 | char *copy = strdup (str); | ||
1032 | if (LT_STRLEN (str) && !copy) | ||
1033 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); | ||
1034 | return copy; | ||
1035 | } | ||
1036 | |||
1037 | |||
1038 | |||
1039 | |||
1040 | /* --- DLOPEN() INTERFACE LOADER --- */ | ||
1041 | |||
1042 | |||
1043 | #if HAVE_LIBDL | ||
1044 | |||
1045 | /* dynamic linking with dlopen/dlsym */ | ||
1046 | |||
1047 | #if HAVE_DLFCN_H | ||
1048 | # include <dlfcn.h> | ||
1049 | #endif | ||
1050 | |||
1051 | #if HAVE_SYS_DL_H | ||
1052 | # include <sys/dl.h> | ||
1053 | #endif | ||
1054 | |||
1055 | /* We may have to define LT_LAZY_OR_NOW in the command line if we | ||
1056 | find out it does not work in some platform. */ | ||
1057 | #ifndef LT_LAZY_OR_NOW | ||
1058 | # ifdef RTLD_LAZY | ||
1059 | # define LT_LAZY_OR_NOW RTLD_LAZY | ||
1060 | # else | ||
1061 | # ifdef DL_LAZY | ||
1062 | # define LT_LAZY_OR_NOW DL_LAZY | ||
1063 | # endif | ||
1064 | # endif /* !RTLD_LAZY */ | ||
1065 | #endif | ||
1066 | #ifndef LT_LAZY_OR_NOW | ||
1067 | # ifdef RTLD_NOW | ||
1068 | # define LT_LAZY_OR_NOW RTLD_NOW | ||
1069 | # else | ||
1070 | # ifdef DL_NOW | ||
1071 | # define LT_LAZY_OR_NOW DL_NOW | ||
1072 | # endif | ||
1073 | # endif /* !RTLD_NOW */ | ||
1074 | #endif | ||
1075 | #ifndef LT_LAZY_OR_NOW | ||
1076 | # define LT_LAZY_OR_NOW 0 | ||
1077 | #endif /* !LT_LAZY_OR_NOW */ | ||
1078 | |||
1079 | #if HAVE_DLERROR | ||
1080 | # define DLERROR(arg) dlerror () | ||
1081 | #else | ||
1082 | # define DLERROR(arg) LT_DLSTRERROR (arg) | ||
1083 | #endif | ||
1084 | |||
1085 | static lt_module | ||
1086 | sys_dl_open (loader_data, filename) | ||
1087 | lt_user_data loader_data; | ||
1088 | const char *filename; | ||
1089 | { | ||
1090 | lt_module module = dlopen (filename, LT_LAZY_OR_NOW); | ||
1091 | |||
1092 | if (!module) | ||
1093 | { | ||
1094 | LT_DLMUTEX_SETERROR (DLERROR (CANNOT_OPEN)); | ||
1095 | } | ||
1096 | |||
1097 | return module; | ||
1098 | } | ||
1099 | |||
1100 | static int | ||
1101 | sys_dl_close (loader_data, module) | ||
1102 | lt_user_data loader_data; | ||
1103 | lt_module module; | ||
1104 | { | ||
1105 | int errors = 0; | ||
1106 | |||
1107 | if (dlclose (module) != 0) | ||
1108 | { | ||
1109 | LT_DLMUTEX_SETERROR (DLERROR (CANNOT_CLOSE)); | ||
1110 | ++errors; | ||
1111 | } | ||
1112 | |||
1113 | return errors; | ||
1114 | } | ||
1115 | |||
1116 | static lt_ptr | ||
1117 | sys_dl_sym (loader_data, module, symbol) | ||
1118 | lt_user_data loader_data; | ||
1119 | lt_module module; | ||
1120 | const char *symbol; | ||
1121 | { | ||
1122 | lt_ptr address = dlsym (module, symbol); | ||
1123 | |||
1124 | if (!address) | ||
1125 | { | ||
1126 | LT_DLMUTEX_SETERROR (DLERROR (SYMBOL_NOT_FOUND)); | ||
1127 | } | ||
1128 | |||
1129 | return address; | ||
1130 | } | ||
1131 | |||
1132 | static struct lt_user_dlloader sys_dl = | ||
1133 | { | ||
1134 | # ifdef NEED_USCORE | ||
1135 | "_", | ||
1136 | # else | ||
1137 | 0, | ||
1138 | # endif | ||
1139 | sys_dl_open, sys_dl_close, sys_dl_sym, 0, 0 }; | ||
1140 | |||
1141 | |||
1142 | #endif /* HAVE_LIBDL */ | ||
1143 | |||
1144 | |||
1145 | |||
1146 | /* --- SHL_LOAD() INTERFACE LOADER --- */ | ||
1147 | |||
1148 | #if HAVE_SHL_LOAD | ||
1149 | |||
1150 | /* dynamic linking with shl_load (HP-UX) (comments from gmodule) */ | ||
1151 | |||
1152 | #ifdef HAVE_DL_H | ||
1153 | # include <dl.h> | ||
1154 | #endif | ||
1155 | |||
1156 | /* some flags are missing on some systems, so we provide | ||
1157 | * harmless defaults. | ||
1158 | * | ||
1159 | * Mandatory: | ||
1160 | * BIND_IMMEDIATE - Resolve symbol references when the library is loaded. | ||
1161 | * BIND_DEFERRED - Delay code symbol resolution until actual reference. | ||
1162 | * | ||
1163 | * Optionally: | ||
1164 | * BIND_FIRST - Place the library at the head of the symbol search | ||
1165 | * order. | ||
1166 | * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all | ||
1167 | * unsatisfied symbols as fatal. This flag allows | ||
1168 | * binding of unsatisfied code symbols to be deferred | ||
1169 | * until use. | ||
1170 | * [Perl: For certain libraries, like DCE, deferred | ||
1171 | * binding often causes run time problems. Adding | ||
1172 | * BIND_NONFATAL to BIND_IMMEDIATE still allows | ||
1173 | * unresolved references in situations like this.] | ||
1174 | * BIND_NOSTART - Do not call the initializer for the shared library | ||
1175 | * when the library is loaded, nor on a future call to | ||
1176 | * shl_unload(). | ||
1177 | * BIND_VERBOSE - Print verbose messages concerning possible | ||
1178 | * unsatisfied symbols. | ||
1179 | * | ||
1180 | * hp9000s700/hp9000s800: | ||
1181 | * BIND_RESTRICTED - Restrict symbols visible by the library to those | ||
1182 | * present at library load time. | ||
1183 | * DYNAMIC_PATH - Allow the loader to dynamically search for the | ||
1184 | * library specified by the path argument. | ||
1185 | */ | ||
1186 | |||
1187 | #ifndef DYNAMIC_PATH | ||
1188 | # define DYNAMIC_PATH 0 | ||
1189 | #endif | ||
1190 | #ifndef BIND_RESTRICTED | ||
1191 | # define BIND_RESTRICTED 0 | ||
1192 | #endif | ||
1193 | |||
1194 | #define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) | ||
1195 | |||
1196 | static lt_module | ||
1197 | sys_shl_open (loader_data, filename) | ||
1198 | lt_user_data loader_data; | ||
1199 | const char *filename; | ||
1200 | { | ||
1201 | static shl_t self = (shl_t) 0; | ||
1202 | lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L); | ||
1203 | |||
1204 | /* Since searching for a symbol against a NULL module handle will also | ||
1205 | look in everything else that was already loaded and exported with | ||
1206 | the -E compiler flag, we always cache a handle saved before any | ||
1207 | modules are loaded. */ | ||
1208 | if (!self) | ||
1209 | { | ||
1210 | lt_ptr address; | ||
1211 | shl_findsym (&self, "main", TYPE_UNDEFINED, &address); | ||
1212 | } | ||
1213 | |||
1214 | if (!filename) | ||
1215 | { | ||
1216 | module = self; | ||
1217 | } | ||
1218 | else | ||
1219 | { | ||
1220 | module = shl_load (filename, LT_BIND_FLAGS, 0L); | ||
1221 | |||
1222 | if (!module) | ||
1223 | { | ||
1224 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); | ||
1225 | } | ||
1226 | } | ||
1227 | |||
1228 | return module; | ||
1229 | } | ||
1230 | |||
1231 | static int | ||
1232 | sys_shl_close (loader_data, module) | ||
1233 | lt_user_data loader_data; | ||
1234 | lt_module module; | ||
1235 | { | ||
1236 | int errors = 0; | ||
1237 | |||
1238 | if (module && (shl_unload ((shl_t) (module)) != 0)) | ||
1239 | { | ||
1240 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); | ||
1241 | ++errors; | ||
1242 | } | ||
1243 | |||
1244 | return errors; | ||
1245 | } | ||
1246 | |||
1247 | static lt_ptr | ||
1248 | sys_shl_sym (loader_data, module, symbol) | ||
1249 | lt_user_data loader_data; | ||
1250 | lt_module module; | ||
1251 | const char *symbol; | ||
1252 | { | ||
1253 | lt_ptr address = 0; | ||
1254 | |||
1255 | /* sys_shl_open should never return a NULL module handle */ | ||
1256 | if (module == (lt_module) 0) | ||
1257 | { | ||
1258 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); | ||
1259 | } | ||
1260 | else if (!shl_findsym((shl_t*) &module, symbol, TYPE_UNDEFINED, &address)) | ||
1261 | { | ||
1262 | if (!address) | ||
1263 | { | ||
1264 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); | ||
1265 | } | ||
1266 | } | ||
1267 | |||
1268 | return address; | ||
1269 | } | ||
1270 | |||
1271 | static struct lt_user_dlloader sys_shl = { | ||
1272 | 0, sys_shl_open, sys_shl_close, sys_shl_sym, 0, 0 | ||
1273 | }; | ||
1274 | |||
1275 | #endif /* HAVE_SHL_LOAD */ | ||
1276 | |||
1277 | |||
1278 | |||
1279 | |||
1280 | /* --- LOADLIBRARY() INTERFACE LOADER --- */ | ||
1281 | |||
1282 | #ifdef __WINDOWS__ | ||
1283 | |||
1284 | /* dynamic linking for Win32 */ | ||
1285 | |||
1286 | #include <windows.h> | ||
1287 | |||
1288 | /* Forward declaration; required to implement handle search below. */ | ||
1289 | static lt_dlhandle handles; | ||
1290 | |||
1291 | static lt_module | ||
1292 | sys_wll_open (loader_data, filename) | ||
1293 | lt_user_data loader_data; | ||
1294 | const char *filename; | ||
1295 | { | ||
1296 | lt_dlhandle cur; | ||
1297 | lt_module module = 0; | ||
1298 | const char *errormsg = 0; | ||
1299 | char *searchname = 0; | ||
1300 | char *ext; | ||
1301 | char self_name_buf[MAX_PATH]; | ||
1302 | |||
1303 | if (!filename) | ||
1304 | { | ||
1305 | /* Get the name of main module */ | ||
1306 | *self_name_buf = 0; | ||
1307 | GetModuleFileName (NULL, self_name_buf, sizeof (self_name_buf)); | ||
1308 | filename = ext = self_name_buf; | ||
1309 | } | ||
1310 | else | ||
1311 | { | ||
1312 | ext = strrchr (filename, '.'); | ||
1313 | } | ||
1314 | |||
1315 | if (ext) | ||
1316 | { | ||
1317 | /* FILENAME already has an extension. */ | ||
1318 | searchname = lt_estrdup (filename); | ||
1319 | } | ||
1320 | else | ||
1321 | { | ||
1322 | /* Append a `.' to stop Windows from adding an | ||
1323 | implicit `.dll' extension. */ | ||
1324 | searchname = LT_EMALLOC (char, 2+ LT_STRLEN (filename)); | ||
1325 | if (searchname) | ||
1326 | sprintf (searchname, "%s.", filename); | ||
1327 | } | ||
1328 | if (!searchname) | ||
1329 | return 0; | ||
1330 | |||
1331 | #if __CYGWIN__ | ||
1332 | { | ||
1333 | char wpath[MAX_PATH]; | ||
1334 | cygwin_conv_to_full_win32_path(searchname, wpath); | ||
1335 | module = LoadLibrary(wpath); | ||
1336 | } | ||
1337 | #else | ||
1338 | module = LoadLibrary (searchname); | ||
1339 | #endif | ||
1340 | LT_DLFREE (searchname); | ||
1341 | |||
1342 | /* libltdl expects this function to fail if it is unable | ||
1343 | to physically load the library. Sadly, LoadLibrary | ||
1344 | will search the loaded libraries for a match and return | ||
1345 | one of them if the path search load fails. | ||
1346 | |||
1347 | We check whether LoadLibrary is returning a handle to | ||
1348 | an already loaded module, and simulate failure if we | ||
1349 | find one. */ | ||
1350 | LT_DLMUTEX_LOCK (); | ||
1351 | cur = handles; | ||
1352 | while (cur) | ||
1353 | { | ||
1354 | if (!cur->module) | ||
1355 | { | ||
1356 | cur = 0; | ||
1357 | break; | ||
1358 | } | ||
1359 | |||
1360 | if (cur->module == module) | ||
1361 | { | ||
1362 | break; | ||
1363 | } | ||
1364 | |||
1365 | cur = cur->next; | ||
1366 | } | ||
1367 | LT_DLMUTEX_UNLOCK (); | ||
1368 | |||
1369 | if (cur || !module) | ||
1370 | { | ||
1371 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); | ||
1372 | module = 0; | ||
1373 | } | ||
1374 | |||
1375 | return module; | ||
1376 | } | ||
1377 | |||
1378 | static int | ||
1379 | sys_wll_close (loader_data, module) | ||
1380 | lt_user_data loader_data; | ||
1381 | lt_module module; | ||
1382 | { | ||
1383 | int errors = 0; | ||
1384 | |||
1385 | if (FreeLibrary(module) == 0) | ||
1386 | { | ||
1387 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); | ||
1388 | ++errors; | ||
1389 | } | ||
1390 | |||
1391 | return errors; | ||
1392 | } | ||
1393 | |||
1394 | static lt_ptr | ||
1395 | sys_wll_sym (loader_data, module, symbol) | ||
1396 | lt_user_data loader_data; | ||
1397 | lt_module module; | ||
1398 | const char *symbol; | ||
1399 | { | ||
1400 | lt_ptr address = GetProcAddress (module, symbol); | ||
1401 | |||
1402 | if (!address) | ||
1403 | { | ||
1404 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); | ||
1405 | } | ||
1406 | |||
1407 | return address; | ||
1408 | } | ||
1409 | |||
1410 | static struct lt_user_dlloader sys_wll = { | ||
1411 | 0, sys_wll_open, sys_wll_close, sys_wll_sym, 0, 0 | ||
1412 | }; | ||
1413 | |||
1414 | #endif /* __WINDOWS__ */ | ||
1415 | |||
1416 | |||
1417 | |||
1418 | |||
1419 | /* --- LOAD_ADD_ON() INTERFACE LOADER --- */ | ||
1420 | |||
1421 | |||
1422 | #ifdef __BEOS__ | ||
1423 | |||
1424 | /* dynamic linking for BeOS */ | ||
1425 | |||
1426 | #include <kernel/image.h> | ||
1427 | |||
1428 | static lt_module | ||
1429 | sys_bedl_open (loader_data, filename) | ||
1430 | lt_user_data loader_data; | ||
1431 | const char *filename; | ||
1432 | { | ||
1433 | image_id image = 0; | ||
1434 | |||
1435 | if (filename) | ||
1436 | { | ||
1437 | image = load_add_on (filename); | ||
1438 | } | ||
1439 | else | ||
1440 | { | ||
1441 | image_info info; | ||
1442 | int32 cookie = 0; | ||
1443 | if (get_next_image_info (0, &cookie, &info) == B_OK) | ||
1444 | image = load_add_on (info.name); | ||
1445 | } | ||
1446 | |||
1447 | if (image <= 0) | ||
1448 | { | ||
1449 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); | ||
1450 | image = 0; | ||
1451 | } | ||
1452 | |||
1453 | return (lt_module) image; | ||
1454 | } | ||
1455 | |||
1456 | static int | ||
1457 | sys_bedl_close (loader_data, module) | ||
1458 | lt_user_data loader_data; | ||
1459 | lt_module module; | ||
1460 | { | ||
1461 | int errors = 0; | ||
1462 | |||
1463 | if (unload_add_on ((image_id) module) != B_OK) | ||
1464 | { | ||
1465 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); | ||
1466 | ++errors; | ||
1467 | } | ||
1468 | |||
1469 | return errors; | ||
1470 | } | ||
1471 | |||
1472 | static lt_ptr | ||
1473 | sys_bedl_sym (loader_data, module, symbol) | ||
1474 | lt_user_data loader_data; | ||
1475 | lt_module module; | ||
1476 | const char *symbol; | ||
1477 | { | ||
1478 | lt_ptr address = 0; | ||
1479 | image_id image = (image_id) module; | ||
1480 | |||
1481 | if (get_image_symbol (image, symbol, B_SYMBOL_TYPE_ANY, address) != B_OK) | ||
1482 | { | ||
1483 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); | ||
1484 | address = 0; | ||
1485 | } | ||
1486 | |||
1487 | return address; | ||
1488 | } | ||
1489 | |||
1490 | static struct lt_user_dlloader sys_bedl = { | ||
1491 | 0, sys_bedl_open, sys_bedl_close, sys_bedl_sym, 0, 0 | ||
1492 | }; | ||
1493 | |||
1494 | #endif /* __BEOS__ */ | ||
1495 | |||
1496 | |||
1497 | |||
1498 | |||
1499 | /* --- DLD_LINK() INTERFACE LOADER --- */ | ||
1500 | |||
1501 | |||
1502 | #if HAVE_DLD | ||
1503 | |||
1504 | /* dynamic linking with dld */ | ||
1505 | |||
1506 | #if HAVE_DLD_H | ||
1507 | #include <dld.h> | ||
1508 | #endif | ||
1509 | |||
1510 | static lt_module | ||
1511 | sys_dld_open (loader_data, filename) | ||
1512 | lt_user_data loader_data; | ||
1513 | const char *filename; | ||
1514 | { | ||
1515 | lt_module module = strdup (filename); | ||
1516 | |||
1517 | if (dld_link (filename) != 0) | ||
1518 | { | ||
1519 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); | ||
1520 | LT_DLFREE (module); | ||
1521 | module = 0; | ||
1522 | } | ||
1523 | |||
1524 | return module; | ||
1525 | } | ||
1526 | |||
1527 | static int | ||
1528 | sys_dld_close (loader_data, module) | ||
1529 | lt_user_data loader_data; | ||
1530 | lt_module module; | ||
1531 | { | ||
1532 | int errors = 0; | ||
1533 | |||
1534 | if (dld_unlink_by_file ((char*)(module), 1) != 0) | ||
1535 | { | ||
1536 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); | ||
1537 | ++errors; | ||
1538 | } | ||
1539 | else | ||
1540 | { | ||
1541 | LT_DLFREE (module); | ||
1542 | } | ||
1543 | |||
1544 | return errors; | ||
1545 | } | ||
1546 | |||
1547 | static lt_ptr | ||
1548 | sys_dld_sym (loader_data, module, symbol) | ||
1549 | lt_user_data loader_data; | ||
1550 | lt_module module; | ||
1551 | const char *symbol; | ||
1552 | { | ||
1553 | lt_ptr address = dld_get_func (symbol); | ||
1554 | |||
1555 | if (!address) | ||
1556 | { | ||
1557 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); | ||
1558 | } | ||
1559 | |||
1560 | return address; | ||
1561 | } | ||
1562 | |||
1563 | static struct lt_user_dlloader sys_dld = { | ||
1564 | 0, sys_dld_open, sys_dld_close, sys_dld_sym, 0, 0 | ||
1565 | }; | ||
1566 | |||
1567 | #endif /* HAVE_DLD */ | ||
1568 | |||
1569 | /* --- DYLD() MACOSX/DARWIN INTERFACE LOADER --- */ | ||
1570 | #if HAVE_DYLD | ||
1571 | |||
1572 | |||
1573 | #if HAVE_MACH_O_DYLD_H | ||
1574 | #if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__) | ||
1575 | /* Is this correct? Does it still function properly? */ | ||
1576 | #define __private_extern__ extern | ||
1577 | #endif | ||
1578 | # include <mach-o/dyld.h> | ||
1579 | #endif | ||
1580 | #include <mach-o/getsect.h> | ||
1581 | |||
1582 | /* We have to put some stuff here that isn't in older dyld.h files */ | ||
1583 | #ifndef ENUM_DYLD_BOOL | ||
1584 | # define ENUM_DYLD_BOOL | ||
1585 | # undef FALSE | ||
1586 | # undef TRUE | ||
1587 | enum DYLD_BOOL { | ||
1588 | FALSE, | ||
1589 | TRUE | ||
1590 | }; | ||
1591 | #endif | ||
1592 | #ifndef LC_REQ_DYLD | ||
1593 | # define LC_REQ_DYLD 0x80000000 | ||
1594 | #endif | ||
1595 | #ifndef LC_LOAD_WEAK_DYLIB | ||
1596 | # define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD) | ||
1597 | #endif | ||
1598 | static const struct mach_header * (*ltdl_NSAddImage)(const char *image_name, unsigned long options) = 0; | ||
1599 | static NSSymbol (*ltdl_NSLookupSymbolInImage)(const struct mach_header *image,const char *symbolName, unsigned long options) = 0; | ||
1600 | static enum DYLD_BOOL (*ltdl_NSIsSymbolNameDefinedInImage)(const struct mach_header *image, const char *symbolName) = 0; | ||
1601 | static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0; | ||
1602 | |||
1603 | #ifndef NSADDIMAGE_OPTION_NONE | ||
1604 | #define NSADDIMAGE_OPTION_NONE 0x0 | ||
1605 | #endif | ||
1606 | #ifndef NSADDIMAGE_OPTION_RETURN_ON_ERROR | ||
1607 | #define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 | ||
1608 | #endif | ||
1609 | #ifndef NSADDIMAGE_OPTION_WITH_SEARCHING | ||
1610 | #define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 | ||
1611 | #endif | ||
1612 | #ifndef NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED | ||
1613 | #define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 | ||
1614 | #endif | ||
1615 | #ifndef NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME | ||
1616 | #define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8 | ||
1617 | #endif | ||
1618 | #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | ||
1619 | #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 | ||
1620 | #endif | ||
1621 | #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW | ||
1622 | #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 | ||
1623 | #endif | ||
1624 | #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY | ||
1625 | #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2 | ||
1626 | #endif | ||
1627 | #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR | ||
1628 | #define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4 | ||
1629 | #endif | ||
1630 | |||
1631 | |||
1632 | static const char * | ||
1633 | lt_int_dyld_error(othererror) | ||
1634 | char* othererror; | ||
1635 | { | ||
1636 | /* return the dyld error string, or the passed in error string if none */ | ||
1637 | NSLinkEditErrors ler; | ||
1638 | int lerno; | ||
1639 | const char *errstr; | ||
1640 | const char *file; | ||
1641 | NSLinkEditError(&ler,&lerno,&file,&errstr); | ||
1642 | if (!errstr || !strlen(errstr)) errstr = othererror; | ||
1643 | return errstr; | ||
1644 | } | ||
1645 | |||
1646 | static const struct mach_header * | ||
1647 | lt_int_dyld_get_mach_header_from_nsmodule(module) | ||
1648 | NSModule module; | ||
1649 | { | ||
1650 | /* There should probably be an apple dyld api for this */ | ||
1651 | int i=_dyld_image_count(); | ||
1652 | int j; | ||
1653 | const char *modname=NSNameOfModule(module); | ||
1654 | const struct mach_header *mh=NULL; | ||
1655 | if (!modname) return NULL; | ||
1656 | for (j = 0; j < i; j++) | ||
1657 | { | ||
1658 | if (!strcmp(_dyld_get_image_name(j),modname)) | ||
1659 | { | ||
1660 | mh=_dyld_get_image_header(j); | ||
1661 | break; | ||
1662 | } | ||
1663 | } | ||
1664 | return mh; | ||
1665 | } | ||
1666 | |||
1667 | static const char* lt_int_dyld_lib_install_name(mh) | ||
1668 | const struct mach_header *mh; | ||
1669 | { | ||
1670 | /* NSAddImage is also used to get the loaded image, but it only works if the lib | ||
1671 | is installed, for uninstalled libs we need to check the install_names against | ||
1672 | each other. Note that this is still broken if DYLD_IMAGE_SUFFIX is set and a | ||
1673 | different lib was loaded as a result | ||
1674 | */ | ||
1675 | int j; | ||
1676 | struct load_command *lc; | ||
1677 | unsigned long offset = sizeof(struct mach_header); | ||
1678 | const char* retStr=NULL; | ||
1679 | for (j = 0; j < mh->ncmds; j++) | ||
1680 | { | ||
1681 | lc = (struct load_command*)(((unsigned long)mh) + offset); | ||
1682 | if (LC_ID_DYLIB == lc->cmd) | ||
1683 | { | ||
1684 | retStr=(char*)(((struct dylib_command*)lc)->dylib.name.offset + | ||
1685 | (unsigned long)lc); | ||
1686 | } | ||
1687 | offset += lc->cmdsize; | ||
1688 | } | ||
1689 | return retStr; | ||
1690 | } | ||
1691 | |||
1692 | static const struct mach_header * | ||
1693 | lt_int_dyld_match_loaded_lib_by_install_name(const char *name) | ||
1694 | { | ||
1695 | int i=_dyld_image_count(); | ||
1696 | int j; | ||
1697 | const struct mach_header *mh=NULL; | ||
1698 | const char *id=NULL; | ||
1699 | for (j = 0; j < i; j++) | ||
1700 | { | ||
1701 | id=lt_int_dyld_lib_install_name(_dyld_get_image_header(j)); | ||
1702 | if ((id) && (!strcmp(id,name))) | ||
1703 | { | ||
1704 | mh=_dyld_get_image_header(j); | ||
1705 | break; | ||
1706 | } | ||
1707 | } | ||
1708 | return mh; | ||
1709 | } | ||
1710 | |||
1711 | static NSSymbol | ||
1712 | lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh) | ||
1713 | const char *symbol; | ||
1714 | const struct mach_header *mh; | ||
1715 | { | ||
1716 | /* Safe to assume our mh is good */ | ||
1717 | int j; | ||
1718 | struct load_command *lc; | ||
1719 | unsigned long offset = sizeof(struct mach_header); | ||
1720 | NSSymbol retSym = 0; | ||
1721 | const struct mach_header *mh1; | ||
1722 | if ((ltdl_NSLookupSymbolInImage) && NSIsSymbolNameDefined(symbol) ) | ||
1723 | { | ||
1724 | for (j = 0; j < mh->ncmds; j++) | ||
1725 | { | ||
1726 | lc = (struct load_command*)(((unsigned long)mh) + offset); | ||
1727 | if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd)) | ||
1728 | { | ||
1729 | mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct dylib_command*)lc)->dylib.name.offset + | ||
1730 | (unsigned long)lc)); | ||
1731 | if (!mh1) | ||
1732 | { | ||
1733 | /* Maybe NSAddImage can find it */ | ||
1734 | mh1=ltdl_NSAddImage((char*)(((struct dylib_command*)lc)->dylib.name.offset + | ||
1735 | (unsigned long)lc), | ||
1736 | NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED + | ||
1737 | NSADDIMAGE_OPTION_WITH_SEARCHING + | ||
1738 | NSADDIMAGE_OPTION_RETURN_ON_ERROR ); | ||
1739 | } | ||
1740 | if (mh1) | ||
1741 | { | ||
1742 | retSym = ltdl_NSLookupSymbolInImage(mh1, | ||
1743 | symbol, | ||
1744 | NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW | ||
1745 | | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR | ||
1746 | ); | ||
1747 | if (retSym) break; | ||
1748 | } | ||
1749 | } | ||
1750 | offset += lc->cmdsize; | ||
1751 | } | ||
1752 | } | ||
1753 | return retSym; | ||
1754 | } | ||
1755 | |||
1756 | static int | ||
1757 | sys_dyld_init() | ||
1758 | { | ||
1759 | int retCode = 0; | ||
1760 | int err = 0; | ||
1761 | if (!_dyld_present()) { | ||
1762 | retCode=1; | ||
1763 | } | ||
1764 | else { | ||
1765 | err = _dyld_func_lookup("__dyld_NSAddImage",(unsigned long*)<dl_NSAddImage); | ||
1766 | err = _dyld_func_lookup("__dyld_NSLookupSymbolInImage",(unsigned long*)<dl_NSLookupSymbolInImage); | ||
1767 | err = _dyld_func_lookup("__dyld_NSIsSymbolNameDefinedInImage",(unsigned long*)<dl_NSIsSymbolNameDefinedInImage); | ||
1768 | err = _dyld_func_lookup("__dyld_NSMakePrivateModulePublic",(unsigned long*)<dl_NSMakePrivateModulePublic); | ||
1769 | } | ||
1770 | return retCode; | ||
1771 | } | ||
1772 | |||
1773 | static lt_module | ||
1774 | sys_dyld_open (loader_data, filename) | ||
1775 | lt_user_data loader_data; | ||
1776 | const char *filename; | ||
1777 | { | ||
1778 | lt_module module = 0; | ||
1779 | NSObjectFileImage ofi = 0; | ||
1780 | NSObjectFileImageReturnCode ofirc; | ||
1781 | |||
1782 | if (!filename) | ||
1783 | return (lt_module)-1; | ||
1784 | ofirc = NSCreateObjectFileImageFromFile(filename, &ofi); | ||
1785 | switch (ofirc) | ||
1786 | { | ||
1787 | case NSObjectFileImageSuccess: | ||
1788 | module = NSLinkModule(ofi, filename, | ||
1789 | NSLINKMODULE_OPTION_RETURN_ON_ERROR | ||
1790 | | NSLINKMODULE_OPTION_PRIVATE | ||
1791 | | NSLINKMODULE_OPTION_BINDNOW); | ||
1792 | NSDestroyObjectFileImage(ofi); | ||
1793 | if (module) | ||
1794 | ltdl_NSMakePrivateModulePublic(module); | ||
1795 | break; | ||
1796 | case NSObjectFileImageInappropriateFile: | ||
1797 | if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) | ||
1798 | { | ||
1799 | module = (lt_module)ltdl_NSAddImage(filename, NSADDIMAGE_OPTION_RETURN_ON_ERROR); | ||
1800 | break; | ||
1801 | } | ||
1802 | default: | ||
1803 | LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); | ||
1804 | return 0; | ||
1805 | } | ||
1806 | if (!module) LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); | ||
1807 | return module; | ||
1808 | } | ||
1809 | |||
1810 | static int | ||
1811 | sys_dyld_close (loader_data, module) | ||
1812 | lt_user_data loader_data; | ||
1813 | lt_module module; | ||
1814 | { | ||
1815 | int retCode = 0; | ||
1816 | int flags = 0; | ||
1817 | if (module == (lt_module)-1) return 0; | ||
1818 | #ifdef __BIG_ENDIAN__ | ||
1819 | if (((struct mach_header *)module)->magic == MH_MAGIC) | ||
1820 | #else | ||
1821 | if (((struct mach_header *)module)->magic == MH_CIGAM) | ||
1822 | #endif | ||
1823 | { | ||
1824 | LT_DLMUTEX_SETERROR("Can not close a dylib"); | ||
1825 | retCode = 1; | ||
1826 | } | ||
1827 | else | ||
1828 | { | ||
1829 | #if 1 | ||
1830 | /* Currently, if a module contains c++ static destructors and it is unloaded, we | ||
1831 | get a segfault in atexit(), due to compiler and dynamic loader differences of | ||
1832 | opinion, this works around that. | ||
1833 | */ | ||
1834 | if ((const struct section *)NULL != | ||
1835 | getsectbynamefromheader(lt_int_dyld_get_mach_header_from_nsmodule(module), | ||
1836 | "__DATA","__mod_term_func")) | ||
1837 | { | ||
1838 | flags += NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED; | ||
1839 | } | ||
1840 | #endif | ||
1841 | #ifdef __ppc__ | ||
1842 | flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES; | ||
1843 | #endif | ||
1844 | if (!NSUnLinkModule(module,flags)) | ||
1845 | { | ||
1846 | retCode=1; | ||
1847 | LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_CLOSE))); | ||
1848 | } | ||
1849 | } | ||
1850 | |||
1851 | return retCode; | ||
1852 | } | ||
1853 | |||
1854 | static lt_ptr | ||
1855 | sys_dyld_sym (loader_data, module, symbol) | ||
1856 | lt_user_data loader_data; | ||
1857 | lt_module module; | ||
1858 | const char *symbol; | ||
1859 | { | ||
1860 | lt_ptr address = 0; | ||
1861 | NSSymbol *nssym = 0; | ||
1862 | void *unused; | ||
1863 | const struct mach_header *mh=NULL; | ||
1864 | char saveError[256] = "Symbol not found"; | ||
1865 | if (module == (lt_module)-1) | ||
1866 | { | ||
1867 | _dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused); | ||
1868 | return address; | ||
1869 | } | ||
1870 | #ifdef __BIG_ENDIAN__ | ||
1871 | if (((struct mach_header *)module)->magic == MH_MAGIC) | ||
1872 | #else | ||
1873 | if (((struct mach_header *)module)->magic == MH_CIGAM) | ||
1874 | #endif | ||
1875 | { | ||
1876 | if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) | ||
1877 | { | ||
1878 | mh=module; | ||
1879 | if (ltdl_NSIsSymbolNameDefinedInImage((struct mach_header*)module,symbol)) | ||
1880 | { | ||
1881 | nssym = ltdl_NSLookupSymbolInImage((struct mach_header*)module, | ||
1882 | symbol, | ||
1883 | NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW | ||
1884 | | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR | ||
1885 | ); | ||
1886 | } | ||
1887 | } | ||
1888 | |||
1889 | } | ||
1890 | else { | ||
1891 | nssym = NSLookupSymbolInModule(module, symbol); | ||
1892 | } | ||
1893 | if (!nssym) | ||
1894 | { | ||
1895 | strncpy(saveError, lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)), 255); | ||
1896 | saveError[255] = 0; | ||
1897 | if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module); | ||
1898 | nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh); | ||
1899 | } | ||
1900 | if (!nssym) | ||
1901 | { | ||
1902 | LT_DLMUTEX_SETERROR (saveError); | ||
1903 | return NULL; | ||
1904 | } | ||
1905 | return NSAddressOfSymbol(nssym); | ||
1906 | } | ||
1907 | |||
1908 | static struct lt_user_dlloader sys_dyld = | ||
1909 | { "_", sys_dyld_open, sys_dyld_close, sys_dyld_sym, 0, 0 }; | ||
1910 | |||
1911 | |||
1912 | #endif /* HAVE_DYLD */ | ||
1913 | |||
1914 | |||
1915 | /* --- DLPREOPEN() INTERFACE LOADER --- */ | ||
1916 | |||
1917 | |||
1918 | /* emulate dynamic linking using preloaded_symbols */ | ||
1919 | |||
1920 | typedef struct lt_dlsymlists_t | ||
1921 | { | ||
1922 | struct lt_dlsymlists_t *next; | ||
1923 | const lt_dlsymlist *syms; | ||
1924 | } lt_dlsymlists_t; | ||
1925 | |||
1926 | static const lt_dlsymlist *default_preloaded_symbols = 0; | ||
1927 | static lt_dlsymlists_t *preloaded_symbols = 0; | ||
1928 | |||
1929 | static int | ||
1930 | presym_init (loader_data) | ||
1931 | lt_user_data loader_data; | ||
1932 | { | ||
1933 | int errors = 0; | ||
1934 | |||
1935 | LT_DLMUTEX_LOCK (); | ||
1936 | |||
1937 | preloaded_symbols = 0; | ||
1938 | if (default_preloaded_symbols) | ||
1939 | { | ||
1940 | errors = lt_dlpreload (default_preloaded_symbols); | ||
1941 | } | ||
1942 | |||
1943 | LT_DLMUTEX_UNLOCK (); | ||
1944 | |||
1945 | return errors; | ||
1946 | } | ||
1947 | |||
1948 | static int | ||
1949 | presym_free_symlists () | ||
1950 | { | ||
1951 | lt_dlsymlists_t *lists; | ||
1952 | |||
1953 | LT_DLMUTEX_LOCK (); | ||
1954 | |||
1955 | lists = preloaded_symbols; | ||
1956 | while (lists) | ||
1957 | { | ||
1958 | lt_dlsymlists_t *tmp = lists; | ||
1959 | |||
1960 | lists = lists->next; | ||
1961 | LT_DLFREE (tmp); | ||
1962 | } | ||
1963 | preloaded_symbols = 0; | ||
1964 | |||
1965 | LT_DLMUTEX_UNLOCK (); | ||
1966 | |||
1967 | return 0; | ||
1968 | } | ||
1969 | |||
1970 | static int | ||
1971 | presym_exit (loader_data) | ||
1972 | lt_user_data loader_data; | ||
1973 | { | ||
1974 | presym_free_symlists (); | ||
1975 | return 0; | ||
1976 | } | ||
1977 | |||
1978 | static int | ||
1979 | presym_add_symlist (preloaded) | ||
1980 | const lt_dlsymlist *preloaded; | ||
1981 | { | ||
1982 | lt_dlsymlists_t *tmp; | ||
1983 | lt_dlsymlists_t *lists; | ||
1984 | int errors = 0; | ||
1985 | |||
1986 | LT_DLMUTEX_LOCK (); | ||
1987 | |||
1988 | lists = preloaded_symbols; | ||
1989 | while (lists) | ||
1990 | { | ||
1991 | if (lists->syms == preloaded) | ||
1992 | { | ||
1993 | goto done; | ||
1994 | } | ||
1995 | lists = lists->next; | ||
1996 | } | ||
1997 | |||
1998 | tmp = LT_EMALLOC (lt_dlsymlists_t, 1); | ||
1999 | if (tmp) | ||
2000 | { | ||
2001 | memset (tmp, 0, sizeof(lt_dlsymlists_t)); | ||
2002 | tmp->syms = preloaded; | ||
2003 | tmp->next = preloaded_symbols; | ||
2004 | preloaded_symbols = tmp; | ||
2005 | } | ||
2006 | else | ||
2007 | { | ||
2008 | ++errors; | ||
2009 | } | ||
2010 | |||
2011 | done: | ||
2012 | LT_DLMUTEX_UNLOCK (); | ||
2013 | return errors; | ||
2014 | } | ||
2015 | |||
2016 | static lt_module | ||
2017 | presym_open (loader_data, filename) | ||
2018 | lt_user_data loader_data; | ||
2019 | const char *filename; | ||
2020 | { | ||
2021 | lt_dlsymlists_t *lists; | ||
2022 | lt_module module = (lt_module) 0; | ||
2023 | |||
2024 | LT_DLMUTEX_LOCK (); | ||
2025 | lists = preloaded_symbols; | ||
2026 | |||
2027 | if (!lists) | ||
2028 | { | ||
2029 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_SYMBOLS)); | ||
2030 | goto done; | ||
2031 | } | ||
2032 | |||
2033 | /* Can't use NULL as the reflective symbol header, as NULL is | ||
2034 | used to mark the end of the entire symbol list. Self-dlpreopened | ||
2035 | symbols follow this magic number, chosen to be an unlikely | ||
2036 | clash with a real module name. */ | ||
2037 | if (!filename) | ||
2038 | { | ||
2039 | filename = "@PROGRAM@"; | ||
2040 | } | ||
2041 | |||
2042 | while (lists) | ||
2043 | { | ||
2044 | const lt_dlsymlist *syms = lists->syms; | ||
2045 | |||
2046 | while (syms->name) | ||
2047 | { | ||
2048 | if (!syms->address && strcmp(syms->name, filename) == 0) | ||
2049 | { | ||
2050 | module = (lt_module) syms; | ||
2051 | goto done; | ||
2052 | } | ||
2053 | ++syms; | ||
2054 | } | ||
2055 | |||
2056 | lists = lists->next; | ||
2057 | } | ||
2058 | |||
2059 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); | ||
2060 | |||
2061 | done: | ||
2062 | LT_DLMUTEX_UNLOCK (); | ||
2063 | return module; | ||
2064 | } | ||
2065 | |||
2066 | static int | ||
2067 | presym_close (loader_data, module) | ||
2068 | lt_user_data loader_data; | ||
2069 | lt_module module; | ||
2070 | { | ||
2071 | /* Just to silence gcc -Wall */ | ||
2072 | module = 0; | ||
2073 | return 0; | ||
2074 | } | ||
2075 | |||
2076 | static lt_ptr | ||
2077 | presym_sym (loader_data, module, symbol) | ||
2078 | lt_user_data loader_data; | ||
2079 | lt_module module; | ||
2080 | const char *symbol; | ||
2081 | { | ||
2082 | lt_dlsymlist *syms = (lt_dlsymlist*) module; | ||
2083 | |||
2084 | ++syms; | ||
2085 | while (syms->address) | ||
2086 | { | ||
2087 | if (strcmp(syms->name, symbol) == 0) | ||
2088 | { | ||
2089 | return syms->address; | ||
2090 | } | ||
2091 | |||
2092 | ++syms; | ||
2093 | } | ||
2094 | |||
2095 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); | ||
2096 | |||
2097 | return 0; | ||
2098 | } | ||
2099 | |||
2100 | static struct lt_user_dlloader presym = { | ||
2101 | 0, presym_open, presym_close, presym_sym, presym_exit, 0 | ||
2102 | }; | ||
2103 | |||
2104 | |||
2105 | |||
2106 | |||
2107 | |||
2108 | /* --- DYNAMIC MODULE LOADING --- */ | ||
2109 | |||
2110 | |||
2111 | /* The type of a function used at each iteration of foreach_dirinpath(). */ | ||
2112 | typedef int foreach_callback_func LT_PARAMS((char *filename, lt_ptr data1, | ||
2113 | lt_ptr data2)); | ||
2114 | |||
2115 | static int foreach_dirinpath LT_PARAMS((const char *search_path, | ||
2116 | const char *base_name, | ||
2117 | foreach_callback_func *func, | ||
2118 | lt_ptr data1, lt_ptr data2)); | ||
2119 | |||
2120 | static int find_file_callback LT_PARAMS((char *filename, lt_ptr data, | ||
2121 | lt_ptr ignored)); | ||
2122 | static int find_handle_callback LT_PARAMS((char *filename, lt_ptr data, | ||
2123 | lt_ptr ignored)); | ||
2124 | static int foreachfile_callback LT_PARAMS((char *filename, lt_ptr data1, | ||
2125 | lt_ptr data2)); | ||
2126 | |||
2127 | |||
2128 | static int canonicalize_path LT_PARAMS((const char *path, | ||
2129 | char **pcanonical)); | ||
2130 | static int argzize_path LT_PARAMS((const char *path, | ||
2131 | char **pargz, | ||
2132 | size_t *pargz_len)); | ||
2133 | static FILE *find_file LT_PARAMS((const char *search_path, | ||
2134 | const char *base_name, | ||
2135 | char **pdir)); | ||
2136 | static lt_dlhandle *find_handle LT_PARAMS((const char *search_path, | ||
2137 | const char *base_name, | ||
2138 | lt_dlhandle *handle)); | ||
2139 | static int find_module LT_PARAMS((lt_dlhandle *handle, | ||
2140 | const char *dir, | ||
2141 | const char *libdir, | ||
2142 | const char *dlname, | ||
2143 | const char *old_name, | ||
2144 | int installed)); | ||
2145 | static int free_vars LT_PARAMS((char *dlname, char *oldname, | ||
2146 | char *libdir, char *deplibs)); | ||
2147 | static int load_deplibs LT_PARAMS((lt_dlhandle handle, | ||
2148 | char *deplibs)); | ||
2149 | static int trim LT_PARAMS((char **dest, | ||
2150 | const char *str)); | ||
2151 | static int try_dlopen LT_PARAMS((lt_dlhandle *handle, | ||
2152 | const char *filename)); | ||
2153 | static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, | ||
2154 | const char *filename)); | ||
2155 | static int unload_deplibs LT_PARAMS((lt_dlhandle handle)); | ||
2156 | static int lt_argz_insert LT_PARAMS((char **pargz, | ||
2157 | size_t *pargz_len, | ||
2158 | char *before, | ||
2159 | const char *entry)); | ||
2160 | static int lt_argz_insertinorder LT_PARAMS((char **pargz, | ||
2161 | size_t *pargz_len, | ||
2162 | const char *entry)); | ||
2163 | static int lt_argz_insertdir LT_PARAMS((char **pargz, | ||
2164 | size_t *pargz_len, | ||
2165 | const char *dirnam, | ||
2166 | struct dirent *dp)); | ||
2167 | static int lt_dlpath_insertdir LT_PARAMS((char **ppath, | ||
2168 | char *before, | ||
2169 | const char *dir)); | ||
2170 | static int list_files_by_dir LT_PARAMS((const char *dirnam, | ||
2171 | char **pargz, | ||
2172 | size_t *pargz_len)); | ||
2173 | static int file_not_found LT_PARAMS((void)); | ||
2174 | |||
2175 | static char *user_search_path= 0; | ||
2176 | static lt_dlloader *loaders = 0; | ||
2177 | static lt_dlhandle handles = 0; | ||
2178 | static int initialized = 0; | ||
2179 | |||
2180 | /* Initialize libltdl. */ | ||
2181 | int | ||
2182 | lt_dlinit () | ||
2183 | { | ||
2184 | int errors = 0; | ||
2185 | |||
2186 | LT_DLMUTEX_LOCK (); | ||
2187 | |||
2188 | /* Initialize only at first call. */ | ||
2189 | if (++initialized == 1) | ||
2190 | { | ||
2191 | handles = 0; | ||
2192 | user_search_path = 0; /* empty search path */ | ||
2193 | |||
2194 | #if HAVE_LIBDL | ||
2195 | errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen"); | ||
2196 | #endif | ||
2197 | #if HAVE_SHL_LOAD | ||
2198 | errors += lt_dlloader_add (lt_dlloader_next (0), &sys_shl, "dlopen"); | ||
2199 | #endif | ||
2200 | #ifdef __WINDOWS__ | ||
2201 | errors += lt_dlloader_add (lt_dlloader_next (0), &sys_wll, "dlopen"); | ||
2202 | #endif | ||
2203 | #ifdef __BEOS__ | ||
2204 | errors += lt_dlloader_add (lt_dlloader_next (0), &sys_bedl, "dlopen"); | ||
2205 | #endif | ||
2206 | #if HAVE_DLD | ||
2207 | errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dld, "dld"); | ||
2208 | #endif | ||
2209 | #if HAVE_DYLD | ||
2210 | errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dyld, "dyld"); | ||
2211 | errors += sys_dyld_init(); | ||
2212 | #endif | ||
2213 | errors += lt_dlloader_add (lt_dlloader_next (0), &presym, "dlpreload"); | ||
2214 | |||
2215 | if (presym_init (presym.dlloader_data)) | ||
2216 | { | ||
2217 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INIT_LOADER)); | ||
2218 | ++errors; | ||
2219 | } | ||
2220 | else if (errors != 0) | ||
2221 | { | ||
2222 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (DLOPEN_NOT_SUPPORTED)); | ||
2223 | ++errors; | ||
2224 | } | ||
2225 | } | ||
2226 | |||
2227 | LT_DLMUTEX_UNLOCK (); | ||
2228 | |||
2229 | return errors; | ||
2230 | } | ||
2231 | |||
2232 | int | ||
2233 | lt_dlpreload (preloaded) | ||
2234 | const lt_dlsymlist *preloaded; | ||
2235 | { | ||
2236 | int errors = 0; | ||
2237 | |||
2238 | if (preloaded) | ||
2239 | { | ||
2240 | errors = presym_add_symlist (preloaded); | ||
2241 | } | ||
2242 | else | ||
2243 | { | ||
2244 | presym_free_symlists(); | ||
2245 | |||
2246 | LT_DLMUTEX_LOCK (); | ||
2247 | if (default_preloaded_symbols) | ||
2248 | { | ||
2249 | errors = lt_dlpreload (default_preloaded_symbols); | ||
2250 | } | ||
2251 | LT_DLMUTEX_UNLOCK (); | ||
2252 | } | ||
2253 | |||
2254 | return errors; | ||
2255 | } | ||
2256 | |||
2257 | int | ||
2258 | lt_dlpreload_default (preloaded) | ||
2259 | const lt_dlsymlist *preloaded; | ||
2260 | { | ||
2261 | LT_DLMUTEX_LOCK (); | ||
2262 | default_preloaded_symbols = preloaded; | ||
2263 | LT_DLMUTEX_UNLOCK (); | ||
2264 | return 0; | ||
2265 | } | ||
2266 | |||
2267 | int | ||
2268 | lt_dlexit () | ||
2269 | { | ||
2270 | /* shut down libltdl */ | ||
2271 | lt_dlloader *loader; | ||
2272 | int errors = 0; | ||
2273 | |||
2274 | LT_DLMUTEX_LOCK (); | ||
2275 | loader = loaders; | ||
2276 | |||
2277 | if (!initialized) | ||
2278 | { | ||
2279 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SHUTDOWN)); | ||
2280 | ++errors; | ||
2281 | goto done; | ||
2282 | } | ||
2283 | |||
2284 | /* shut down only at last call. */ | ||
2285 | if (--initialized == 0) | ||
2286 | { | ||
2287 | int level; | ||
2288 | |||
2289 | while (handles && LT_DLIS_RESIDENT (handles)) | ||
2290 | { | ||
2291 | handles = handles->next; | ||
2292 | } | ||
2293 | |||
2294 | /* close all modules */ | ||
2295 | for (level = 1; handles; ++level) | ||
2296 | { | ||
2297 | lt_dlhandle cur = handles; | ||
2298 | int saw_nonresident = 0; | ||
2299 | |||
2300 | while (cur) | ||
2301 | { | ||
2302 | lt_dlhandle tmp = cur; | ||
2303 | cur = cur->next; | ||
2304 | if (!LT_DLIS_RESIDENT (tmp)) | ||
2305 | saw_nonresident = 1; | ||
2306 | if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level) | ||
2307 | { | ||
2308 | if (lt_dlclose (tmp)) | ||
2309 | { | ||
2310 | ++errors; | ||
2311 | } | ||
2312 | } | ||
2313 | } | ||
2314 | /* done if only resident modules are left */ | ||
2315 | if (!saw_nonresident) | ||
2316 | break; | ||
2317 | } | ||
2318 | |||
2319 | /* close all loaders */ | ||
2320 | while (loader) | ||
2321 | { | ||
2322 | lt_dlloader *next = loader->next; | ||
2323 | lt_user_data data = loader->dlloader_data; | ||
2324 | if (loader->dlloader_exit && loader->dlloader_exit (data)) | ||
2325 | { | ||
2326 | ++errors; | ||
2327 | } | ||
2328 | |||
2329 | LT_DLMEM_REASSIGN (loader, next); | ||
2330 | } | ||
2331 | loaders = 0; | ||
2332 | } | ||
2333 | |||
2334 | done: | ||
2335 | LT_DLMUTEX_UNLOCK (); | ||
2336 | return errors; | ||
2337 | } | ||
2338 | |||
2339 | static int | ||
2340 | tryall_dlopen (handle, filename) | ||
2341 | lt_dlhandle *handle; | ||
2342 | const char *filename; | ||
2343 | { | ||
2344 | lt_dlhandle cur; | ||
2345 | lt_dlloader *loader; | ||
2346 | const char *saved_error; | ||
2347 | int errors = 0; | ||
2348 | |||
2349 | LT_DLMUTEX_GETERROR (saved_error); | ||
2350 | LT_DLMUTEX_LOCK (); | ||
2351 | |||
2352 | cur = handles; | ||
2353 | loader = loaders; | ||
2354 | |||
2355 | /* check whether the module was already opened */ | ||
2356 | while (cur) | ||
2357 | { | ||
2358 | /* try to dlopen the program itself? */ | ||
2359 | if (!cur->info.filename && !filename) | ||
2360 | { | ||
2361 | break; | ||
2362 | } | ||
2363 | |||
2364 | if (cur->info.filename && filename | ||
2365 | && strcmp (cur->info.filename, filename) == 0) | ||
2366 | { | ||
2367 | break; | ||
2368 | } | ||
2369 | |||
2370 | cur = cur->next; | ||
2371 | } | ||
2372 | |||
2373 | if (cur) | ||
2374 | { | ||
2375 | ++cur->info.ref_count; | ||
2376 | *handle = cur; | ||
2377 | goto done; | ||
2378 | } | ||
2379 | |||
2380 | cur = *handle; | ||
2381 | if (filename) | ||
2382 | { | ||
2383 | /* Comment out the check of file permissions using access. | ||
2384 | This call seems to always return -1 with error EACCES. | ||
2385 | */ | ||
2386 | /* We need to catch missing file errors early so that | ||
2387 | file_not_found() can detect what happened. | ||
2388 | if (access (filename, R_OK) != 0) | ||
2389 | { | ||
2390 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); | ||
2391 | ++errors; | ||
2392 | goto done; | ||
2393 | } */ | ||
2394 | |||
2395 | cur->info.filename = lt_estrdup (filename); | ||
2396 | if (!cur->info.filename) | ||
2397 | { | ||
2398 | ++errors; | ||
2399 | goto done; | ||
2400 | } | ||
2401 | } | ||
2402 | else | ||
2403 | { | ||
2404 | cur->info.filename = 0; | ||
2405 | } | ||
2406 | |||
2407 | while (loader) | ||
2408 | { | ||
2409 | lt_user_data data = loader->dlloader_data; | ||
2410 | |||
2411 | cur->module = loader->module_open (data, filename); | ||
2412 | |||
2413 | if (cur->module != 0) | ||
2414 | { | ||
2415 | break; | ||
2416 | } | ||
2417 | loader = loader->next; | ||
2418 | } | ||
2419 | |||
2420 | if (!loader) | ||
2421 | { | ||
2422 | LT_DLFREE (cur->info.filename); | ||
2423 | ++errors; | ||
2424 | goto done; | ||
2425 | } | ||
2426 | |||
2427 | cur->loader = loader; | ||
2428 | LT_DLMUTEX_SETERROR (saved_error); | ||
2429 | |||
2430 | done: | ||
2431 | LT_DLMUTEX_UNLOCK (); | ||
2432 | |||
2433 | return errors; | ||
2434 | } | ||
2435 | |||
2436 | static int | ||
2437 | tryall_dlopen_module (handle, prefix, dirname, dlname) | ||
2438 | lt_dlhandle *handle; | ||
2439 | const char *prefix; | ||
2440 | const char *dirname; | ||
2441 | const char *dlname; | ||
2442 | { | ||
2443 | int error = 0; | ||
2444 | char *filename = 0; | ||
2445 | size_t filename_len = 0; | ||
2446 | size_t dirname_len = LT_STRLEN (dirname); | ||
2447 | |||
2448 | assert (handle); | ||
2449 | assert (dirname); | ||
2450 | assert (dlname); | ||
2451 | #ifdef LT_DIRSEP_CHAR | ||
2452 | /* Only canonicalized names (i.e. with DIRSEP chars already converted) | ||
2453 | should make it into this function: */ | ||
2454 | assert (strchr (dirname, LT_DIRSEP_CHAR) == 0); | ||
2455 | #endif | ||
2456 | |||
2457 | if (dirname_len > 0) | ||
2458 | if (dirname[dirname_len -1] == '/') | ||
2459 | --dirname_len; | ||
2460 | filename_len = dirname_len + 1 + LT_STRLEN (dlname); | ||
2461 | |||
2462 | /* Allocate memory, and combine DIRNAME and MODULENAME into it. | ||
2463 | The PREFIX (if any) is handled below. */ | ||
2464 | filename = LT_EMALLOC (char, dirname_len + 1 + filename_len + 1); | ||
2465 | if (!filename) | ||
2466 | return 1; | ||
2467 | |||
2468 | sprintf (filename, "%.*s/%s", (int) dirname_len, dirname, dlname); | ||
2469 | |||
2470 | /* Now that we have combined DIRNAME and MODULENAME, if there is | ||
2471 | also a PREFIX to contend with, simply recurse with the arguments | ||
2472 | shuffled. Otherwise, attempt to open FILENAME as a module. */ | ||
2473 | if (prefix) | ||
2474 | { | ||
2475 | error += tryall_dlopen_module (handle, | ||
2476 | (const char *) 0, prefix, filename); | ||
2477 | } | ||
2478 | else if (tryall_dlopen (handle, filename) != 0) | ||
2479 | { | ||
2480 | ++error; | ||
2481 | } | ||
2482 | |||
2483 | LT_DLFREE (filename); | ||
2484 | return error; | ||
2485 | } | ||
2486 | |||
2487 | static int | ||
2488 | find_module (handle, dir, libdir, dlname, old_name, installed) | ||
2489 | lt_dlhandle *handle; | ||
2490 | const char *dir; | ||
2491 | const char *libdir; | ||
2492 | const char *dlname; | ||
2493 | const char *old_name; | ||
2494 | int installed; | ||
2495 | { | ||
2496 | /* Try to open the old library first; if it was dlpreopened, | ||
2497 | we want the preopened version of it, even if a dlopenable | ||
2498 | module is available. */ | ||
2499 | if (old_name && tryall_dlopen (handle, old_name) == 0) | ||
2500 | { | ||
2501 | return 0; | ||
2502 | } | ||
2503 | |||
2504 | /* Try to open the dynamic library. */ | ||
2505 | if (dlname) | ||
2506 | { | ||
2507 | /* try to open the installed module */ | ||
2508 | if (installed && libdir) | ||
2509 | { | ||
2510 | if (tryall_dlopen_module (handle, | ||
2511 | (const char *) 0, libdir, dlname) == 0) | ||
2512 | return 0; | ||
2513 | } | ||
2514 | |||
2515 | /* try to open the not-installed module */ | ||
2516 | if (!installed) | ||
2517 | { | ||
2518 | if (tryall_dlopen_module (handle, dir, objdir, dlname) == 0) | ||
2519 | return 0; | ||
2520 | } | ||
2521 | |||
2522 | /* maybe it was moved to another directory */ | ||
2523 | { | ||
2524 | if (tryall_dlopen_module (handle, | ||
2525 | (const char *) 0, dir, dlname) == 0) | ||
2526 | return 0; | ||
2527 | } | ||
2528 | } | ||
2529 | |||
2530 | return 1; | ||
2531 | } | ||
2532 | |||
2533 | |||
2534 | static int | ||
2535 | canonicalize_path (path, pcanonical) | ||
2536 | const char *path; | ||
2537 | char **pcanonical; | ||
2538 | { | ||
2539 | char *canonical = 0; | ||
2540 | |||
2541 | assert (path && *path); | ||
2542 | assert (pcanonical); | ||
2543 | |||
2544 | canonical = LT_EMALLOC (char, 1+ LT_STRLEN (path)); | ||
2545 | if (!canonical) | ||
2546 | return 1; | ||
2547 | |||
2548 | { | ||
2549 | size_t dest = 0; | ||
2550 | size_t src; | ||
2551 | for (src = 0; path[src] != LT_EOS_CHAR; ++src) | ||
2552 | { | ||
2553 | /* Path separators are not copied to the beginning or end of | ||
2554 | the destination, or if another separator would follow | ||
2555 | immediately. */ | ||
2556 | if (path[src] == LT_PATHSEP_CHAR) | ||
2557 | { | ||
2558 | if ((dest == 0) | ||
2559 | || (path[1+ src] == LT_PATHSEP_CHAR) | ||
2560 | || (path[1+ src] == LT_EOS_CHAR)) | ||
2561 | continue; | ||
2562 | } | ||
2563 | |||
2564 | /* Anything other than a directory separator is copied verbatim. */ | ||
2565 | if ((path[src] != '/') | ||
2566 | #ifdef LT_DIRSEP_CHAR | ||
2567 | && (path[src] != LT_DIRSEP_CHAR) | ||
2568 | #endif | ||
2569 | ) | ||
2570 | { | ||
2571 | canonical[dest++] = path[src]; | ||
2572 | } | ||
2573 | /* Directory separators are converted and copied only if they are | ||
2574 | not at the end of a path -- i.e. before a path separator or | ||
2575 | NULL terminator. */ | ||
2576 | else if ((path[1+ src] != LT_PATHSEP_CHAR) | ||
2577 | && (path[1+ src] != LT_EOS_CHAR) | ||
2578 | #ifdef LT_DIRSEP_CHAR | ||
2579 | && (path[1+ src] != LT_DIRSEP_CHAR) | ||
2580 | #endif | ||
2581 | && (path[1+ src] != '/')) | ||
2582 | { | ||
2583 | canonical[dest++] = '/'; | ||
2584 | } | ||
2585 | } | ||
2586 | |||
2587 | /* Add an end-of-string marker at the end. */ | ||
2588 | canonical[dest] = LT_EOS_CHAR; | ||
2589 | } | ||
2590 | |||
2591 | /* Assign new value. */ | ||
2592 | *pcanonical = canonical; | ||
2593 | |||
2594 | return 0; | ||
2595 | } | ||
2596 | |||
2597 | static int | ||
2598 | argzize_path (path, pargz, pargz_len) | ||
2599 | const char *path; | ||
2600 | char **pargz; | ||
2601 | size_t *pargz_len; | ||
2602 | { | ||
2603 | error_t error; | ||
2604 | |||
2605 | assert (path); | ||
2606 | assert (pargz); | ||
2607 | assert (pargz_len); | ||
2608 | |||
2609 | if ((error = argz_create_sep (path, LT_PATHSEP_CHAR, pargz, pargz_len))) | ||
2610 | { | ||
2611 | switch (error) | ||
2612 | { | ||
2613 | case ENOMEM: | ||
2614 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); | ||
2615 | break; | ||
2616 | default: | ||
2617 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); | ||
2618 | break; | ||
2619 | } | ||
2620 | |||
2621 | return 1; | ||
2622 | } | ||
2623 | |||
2624 | return 0; | ||
2625 | } | ||
2626 | |||
2627 | /* Repeatedly call FUNC with each LT_PATHSEP_CHAR delimited element | ||
2628 | of SEARCH_PATH and references to DATA1 and DATA2, until FUNC returns | ||
2629 | non-zero or all elements are exhausted. If BASE_NAME is non-NULL, | ||
2630 | it is appended to each SEARCH_PATH element before FUNC is called. */ | ||
2631 | static int | ||
2632 | foreach_dirinpath (search_path, base_name, func, data1, data2) | ||
2633 | const char *search_path; | ||
2634 | const char *base_name; | ||
2635 | foreach_callback_func *func; | ||
2636 | lt_ptr data1; | ||
2637 | lt_ptr data2; | ||
2638 | { | ||
2639 | int result = 0; | ||
2640 | int filenamesize = 0; | ||
2641 | size_t lenbase = LT_STRLEN (base_name); | ||
2642 | size_t argz_len = 0; | ||
2643 | char *argz = 0; | ||
2644 | char *filename = 0; | ||
2645 | char *canonical = 0; | ||
2646 | |||
2647 | LT_DLMUTEX_LOCK (); | ||
2648 | |||
2649 | if (!search_path || !*search_path) | ||
2650 | { | ||
2651 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); | ||
2652 | goto cleanup; | ||
2653 | } | ||
2654 | |||
2655 | if (canonicalize_path (search_path, &canonical) != 0) | ||
2656 | goto cleanup; | ||
2657 | |||
2658 | if (argzize_path (canonical, &argz, &argz_len) != 0) | ||
2659 | goto cleanup; | ||
2660 | |||
2661 | { | ||
2662 | char *dir_name = 0; | ||
2663 | while ((dir_name = argz_next (argz, argz_len, dir_name))) | ||
2664 | { | ||
2665 | size_t lendir = LT_STRLEN (dir_name); | ||
2666 | |||
2667 | if (lendir +1 +lenbase >= filenamesize) | ||
2668 | { | ||
2669 | LT_DLFREE (filename); | ||
2670 | filenamesize = lendir +1 +lenbase +1; /* "/d" + '/' + "f" + '\0' */ | ||
2671 | filename = LT_EMALLOC (char, filenamesize); | ||
2672 | if (!filename) | ||
2673 | goto cleanup; | ||
2674 | } | ||
2675 | |||
2676 | assert (filenamesize > lendir); | ||
2677 | strcpy (filename, dir_name); | ||
2678 | |||
2679 | if (base_name && *base_name) | ||
2680 | { | ||
2681 | if (filename[lendir -1] != '/') | ||
2682 | filename[lendir++] = '/'; | ||
2683 | strcpy (filename +lendir, base_name); | ||
2684 | } | ||
2685 | |||
2686 | if ((result = (*func) (filename, data1, data2))) | ||
2687 | { | ||
2688 | break; | ||
2689 | } | ||
2690 | } | ||
2691 | } | ||
2692 | |||
2693 | cleanup: | ||
2694 | LT_DLFREE (argz); | ||
2695 | LT_DLFREE (canonical); | ||
2696 | LT_DLFREE (filename); | ||
2697 | |||
2698 | LT_DLMUTEX_UNLOCK (); | ||
2699 | |||
2700 | return result; | ||
2701 | } | ||
2702 | |||
2703 | /* If FILEPATH can be opened, store the name of the directory component | ||
2704 | in DATA1, and the opened FILE* structure address in DATA2. Otherwise | ||
2705 | DATA1 is unchanged, but DATA2 is set to a pointer to NULL. */ | ||
2706 | static int | ||
2707 | find_file_callback (filename, data1, data2) | ||
2708 | char *filename; | ||
2709 | lt_ptr data1; | ||
2710 | lt_ptr data2; | ||
2711 | { | ||
2712 | char **pdir = (char **) data1; | ||
2713 | FILE **pfile = (FILE **) data2; | ||
2714 | int is_done = 0; | ||
2715 | |||
2716 | assert (filename && *filename); | ||
2717 | assert (pdir); | ||
2718 | assert (pfile); | ||
2719 | |||
2720 | if ((*pfile = fopen (filename, LT_READTEXT_MODE))) | ||
2721 | { | ||
2722 | char *dirend = strrchr (filename, '/'); | ||
2723 | |||
2724 | if (dirend > filename) | ||
2725 | *dirend = LT_EOS_CHAR; | ||
2726 | |||
2727 | LT_DLFREE (*pdir); | ||
2728 | *pdir = lt_estrdup (filename); | ||
2729 | is_done = (*pdir == 0) ? -1 : 1; | ||
2730 | } | ||
2731 | |||
2732 | return is_done; | ||
2733 | } | ||
2734 | |||
2735 | static FILE * | ||
2736 | find_file (search_path, base_name, pdir) | ||
2737 | const char *search_path; | ||
2738 | const char *base_name; | ||
2739 | char **pdir; | ||
2740 | { | ||
2741 | FILE *file = 0; | ||
2742 | |||
2743 | foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file); | ||
2744 | |||
2745 | return file; | ||
2746 | } | ||
2747 | |||
2748 | static int | ||
2749 | find_handle_callback (filename, data, ignored) | ||
2750 | char *filename; | ||
2751 | lt_ptr data; | ||
2752 | lt_ptr ignored; | ||
2753 | { | ||
2754 | lt_dlhandle *handle = (lt_dlhandle *) data; | ||
2755 | int notfound = access (filename, R_OK); | ||
2756 | |||
2757 | /* Bail out if file cannot be read... */ | ||
2758 | if (notfound) | ||
2759 | return 0; | ||
2760 | |||
2761 | /* Try to dlopen the file, but do not continue searching in any | ||
2762 | case. */ | ||
2763 | if (tryall_dlopen (handle, filename) != 0) | ||
2764 | *handle = 0; | ||
2765 | |||
2766 | return 1; | ||
2767 | } | ||
2768 | |||
2769 | /* If HANDLE was found return it, otherwise return 0. If HANDLE was | ||
2770 | found but could not be opened, *HANDLE will be set to 0. */ | ||
2771 | static lt_dlhandle * | ||
2772 | find_handle (search_path, base_name, handle) | ||
2773 | const char *search_path; | ||
2774 | const char *base_name; | ||
2775 | lt_dlhandle *handle; | ||
2776 | { | ||
2777 | if (!search_path) | ||
2778 | return 0; | ||
2779 | |||
2780 | if (!foreach_dirinpath (search_path, base_name, find_handle_callback, | ||
2781 | handle, 0)) | ||
2782 | return 0; | ||
2783 | |||
2784 | return handle; | ||
2785 | } | ||
2786 | |||
2787 | static int | ||
2788 | load_deplibs (handle, deplibs) | ||
2789 | lt_dlhandle handle; | ||
2790 | char *deplibs; | ||
2791 | { | ||
2792 | #if LTDL_DLOPEN_DEPLIBS | ||
2793 | char *p, *save_search_path = 0; | ||
2794 | int depcount = 0; | ||
2795 | int i; | ||
2796 | char **names = 0; | ||
2797 | #endif | ||
2798 | int errors = 0; | ||
2799 | |||
2800 | handle->depcount = 0; | ||
2801 | |||
2802 | #if LTDL_DLOPEN_DEPLIBS | ||
2803 | if (!deplibs) | ||
2804 | { | ||
2805 | return errors; | ||
2806 | } | ||
2807 | ++errors; | ||
2808 | |||
2809 | LT_DLMUTEX_LOCK (); | ||
2810 | if (user_search_path) | ||
2811 | { | ||
2812 | save_search_path = lt_estrdup (user_search_path); | ||
2813 | if (!save_search_path) | ||
2814 | goto cleanup; | ||
2815 | } | ||
2816 | |||
2817 | /* extract search paths and count deplibs */ | ||
2818 | p = deplibs; | ||
2819 | while (*p) | ||
2820 | { | ||
2821 | if (!isspace ((int) *p)) | ||
2822 | { | ||
2823 | char *end = p+1; | ||
2824 | while (*end && !isspace((int) *end)) | ||
2825 | { | ||
2826 | ++end; | ||
2827 | } | ||
2828 | |||
2829 | if (strncmp(p, "-L", 2) == 0 || strncmp(p, "-R", 2) == 0) | ||
2830 | { | ||
2831 | char save = *end; | ||
2832 | *end = 0; /* set a temporary string terminator */ | ||
2833 | if (lt_dladdsearchdir(p+2)) | ||
2834 | { | ||
2835 | goto cleanup; | ||
2836 | } | ||
2837 | *end = save; | ||
2838 | } | ||
2839 | else | ||
2840 | { | ||
2841 | ++depcount; | ||
2842 | } | ||
2843 | |||
2844 | p = end; | ||
2845 | } | ||
2846 | else | ||
2847 | { | ||
2848 | ++p; | ||
2849 | } | ||
2850 | } | ||
2851 | |||
2852 | /* restore the old search path */ | ||
2853 | LT_DLFREE (user_search_path); | ||
2854 | user_search_path = save_search_path; | ||
2855 | |||
2856 | LT_DLMUTEX_UNLOCK (); | ||
2857 | |||
2858 | if (!depcount) | ||
2859 | { | ||
2860 | errors = 0; | ||
2861 | goto cleanup; | ||
2862 | } | ||
2863 | |||
2864 | names = LT_EMALLOC (char *, depcount * sizeof (char*)); | ||
2865 | if (!names) | ||
2866 | goto cleanup; | ||
2867 | |||
2868 | /* now only extract the actual deplibs */ | ||
2869 | depcount = 0; | ||
2870 | p = deplibs; | ||
2871 | while (*p) | ||
2872 | { | ||
2873 | if (isspace ((int) *p)) | ||
2874 | { | ||
2875 | ++p; | ||
2876 | } | ||
2877 | else | ||
2878 | { | ||
2879 | char *end = p+1; | ||
2880 | while (*end && !isspace ((int) *end)) | ||
2881 | { | ||
2882 | ++end; | ||
2883 | } | ||
2884 | |||
2885 | if (strncmp(p, "-L", 2) != 0 && strncmp(p, "-R", 2) != 0) | ||
2886 | { | ||
2887 | char *name; | ||
2888 | char save = *end; | ||
2889 | *end = 0; /* set a temporary string terminator */ | ||
2890 | if (strncmp(p, "-l", 2) == 0) | ||
2891 | { | ||
2892 | size_t name_len = 3+ /* "lib" */ LT_STRLEN (p + 2); | ||
2893 | name = LT_EMALLOC (char, 1+ name_len); | ||
2894 | if (name) | ||
2895 | sprintf (name, "lib%s", p+2); | ||
2896 | } | ||
2897 | else | ||
2898 | name = lt_estrdup(p); | ||
2899 | |||
2900 | if (!name) | ||
2901 | goto cleanup_names; | ||
2902 | |||
2903 | names[depcount++] = name; | ||
2904 | *end = save; | ||
2905 | } | ||
2906 | p = end; | ||
2907 | } | ||
2908 | } | ||
2909 | |||
2910 | /* load the deplibs (in reverse order) | ||
2911 | At this stage, don't worry if the deplibs do not load correctly, | ||
2912 | they may already be statically linked into the loading application | ||
2913 | for instance. There will be a more enlightening error message | ||
2914 | later on if the loaded module cannot resolve all of its symbols. */ | ||
2915 | if (depcount) | ||
2916 | { | ||
2917 | int j = 0; | ||
2918 | |||
2919 | handle->deplibs = (lt_dlhandle*) LT_EMALLOC (lt_dlhandle *, depcount); | ||
2920 | if (!handle->deplibs) | ||
2921 | goto cleanup; | ||
2922 | |||
2923 | for (i = 0; i < depcount; ++i) | ||
2924 | { | ||
2925 | handle->deplibs[j] = lt_dlopenext(names[depcount-1-i]); | ||
2926 | if (handle->deplibs[j]) | ||
2927 | { | ||
2928 | ++j; | ||
2929 | } | ||
2930 | } | ||
2931 | |||
2932 | handle->depcount = j; /* Number of successfully loaded deplibs */ | ||
2933 | errors = 0; | ||
2934 | } | ||
2935 | |||
2936 | cleanup_names: | ||
2937 | for (i = 0; i < depcount; ++i) | ||
2938 | { | ||
2939 | LT_DLFREE (names[i]); | ||
2940 | } | ||
2941 | |||
2942 | cleanup: | ||
2943 | LT_DLFREE (names); | ||
2944 | #endif | ||
2945 | |||
2946 | return errors; | ||
2947 | } | ||
2948 | |||
2949 | static int | ||
2950 | unload_deplibs (handle) | ||
2951 | lt_dlhandle handle; | ||
2952 | { | ||
2953 | int i; | ||
2954 | int errors = 0; | ||
2955 | |||
2956 | if (handle->depcount) | ||
2957 | { | ||
2958 | for (i = 0; i < handle->depcount; ++i) | ||
2959 | { | ||
2960 | if (!LT_DLIS_RESIDENT (handle->deplibs[i])) | ||
2961 | { | ||
2962 | errors += lt_dlclose (handle->deplibs[i]); | ||
2963 | } | ||
2964 | } | ||
2965 | } | ||
2966 | |||
2967 | return errors; | ||
2968 | } | ||
2969 | |||
2970 | static int | ||
2971 | trim (dest, str) | ||
2972 | char **dest; | ||
2973 | const char *str; | ||
2974 | { | ||
2975 | /* remove the leading and trailing "'" from str | ||
2976 | and store the result in dest */ | ||
2977 | const char *end = strrchr (str, '\''); | ||
2978 | size_t len = LT_STRLEN (str); | ||
2979 | char *tmp; | ||
2980 | |||
2981 | LT_DLFREE (*dest); | ||
2982 | |||
2983 | if (len > 3 && str[0] == '\'') | ||
2984 | { | ||
2985 | tmp = LT_EMALLOC (char, end - str); | ||
2986 | if (!tmp) | ||
2987 | return 1; | ||
2988 | |||
2989 | strncpy(tmp, &str[1], (end - str) - 1); | ||
2990 | tmp[len-3] = LT_EOS_CHAR; | ||
2991 | *dest = tmp; | ||
2992 | } | ||
2993 | else | ||
2994 | { | ||
2995 | *dest = 0; | ||
2996 | } | ||
2997 | |||
2998 | return 0; | ||
2999 | } | ||
3000 | |||
3001 | static int | ||
3002 | free_vars (dlname, oldname, libdir, deplibs) | ||
3003 | char *dlname; | ||
3004 | char *oldname; | ||
3005 | char *libdir; | ||
3006 | char *deplibs; | ||
3007 | { | ||
3008 | LT_DLFREE (dlname); | ||
3009 | LT_DLFREE (oldname); | ||
3010 | LT_DLFREE (libdir); | ||
3011 | LT_DLFREE (deplibs); | ||
3012 | |||
3013 | return 0; | ||
3014 | } | ||
3015 | |||
3016 | static int | ||
3017 | try_dlopen (phandle, filename) | ||
3018 | lt_dlhandle *phandle; | ||
3019 | const char *filename; | ||
3020 | { | ||
3021 | const char * ext = 0; | ||
3022 | const char * saved_error = 0; | ||
3023 | char * canonical = 0; | ||
3024 | char * base_name = 0; | ||
3025 | char * dir = 0; | ||
3026 | char * name = 0; | ||
3027 | int errors = 0; | ||
3028 | lt_dlhandle newhandle; | ||
3029 | |||
3030 | assert (phandle); | ||
3031 | assert (*phandle == 0); | ||
3032 | |||
3033 | LT_DLMUTEX_GETERROR (saved_error); | ||
3034 | |||
3035 | /* dlopen self? */ | ||
3036 | if (!filename) | ||
3037 | { | ||
3038 | *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); | ||
3039 | if (*phandle == 0) | ||
3040 | return 1; | ||
3041 | |||
3042 | memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); | ||
3043 | newhandle = *phandle; | ||
3044 | |||
3045 | /* lt_dlclose()ing yourself is very bad! Disallow it. */ | ||
3046 | LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG); | ||
3047 | |||
3048 | if (tryall_dlopen (&newhandle, 0) != 0) | ||
3049 | { | ||
3050 | LT_DLFREE (*phandle); | ||
3051 | return 1; | ||
3052 | } | ||
3053 | |||
3054 | goto register_handle; | ||
3055 | } | ||
3056 | |||
3057 | assert (filename && *filename); | ||
3058 | |||
3059 | /* Doing this immediately allows internal functions to safely | ||
3060 | assume only canonicalized paths are passed. */ | ||
3061 | if (canonicalize_path (filename, &canonical) != 0) | ||
3062 | { | ||
3063 | ++errors; | ||
3064 | goto cleanup; | ||
3065 | } | ||
3066 | |||
3067 | /* If the canonical module name is a path (relative or absolute) | ||
3068 | then split it into a directory part and a name part. */ | ||
3069 | base_name = strrchr (canonical, '/'); | ||
3070 | if (base_name) | ||
3071 | { | ||
3072 | size_t dirlen = (1+ base_name) - canonical; | ||
3073 | |||
3074 | dir = LT_EMALLOC (char, 1+ dirlen); | ||
3075 | if (!dir) | ||
3076 | { | ||
3077 | ++errors; | ||
3078 | goto cleanup; | ||
3079 | } | ||
3080 | |||
3081 | strncpy (dir, canonical, dirlen); | ||
3082 | dir[dirlen] = LT_EOS_CHAR; | ||
3083 | |||
3084 | ++base_name; | ||
3085 | } | ||
3086 | else | ||
3087 | base_name = canonical; | ||
3088 | |||
3089 | assert (base_name && *base_name); | ||
3090 | |||
3091 | /* Check whether we are opening a libtool module (.la extension). */ | ||
3092 | ext = strrchr (base_name, '.'); | ||
3093 | if (ext && strcmp (ext, archive_ext) == 0) | ||
3094 | { | ||
3095 | /* this seems to be a libtool module */ | ||
3096 | FILE * file = 0; | ||
3097 | char * dlname = 0; | ||
3098 | char * old_name = 0; | ||
3099 | char * libdir = 0; | ||
3100 | char * deplibs = 0; | ||
3101 | char * line = 0; | ||
3102 | size_t line_len; | ||
3103 | |||
3104 | /* if we can't find the installed flag, it is probably an | ||
3105 | installed libtool archive, produced with an old version | ||
3106 | of libtool */ | ||
3107 | int installed = 1; | ||
3108 | |||
3109 | /* extract the module name from the file name */ | ||
3110 | name = LT_EMALLOC (char, ext - base_name + 1); | ||
3111 | if (!name) | ||
3112 | { | ||
3113 | ++errors; | ||
3114 | goto cleanup; | ||
3115 | } | ||
3116 | |||
3117 | /* canonicalize the module name */ | ||
3118 | { | ||
3119 | size_t i; | ||
3120 | for (i = 0; i < ext - base_name; ++i) | ||
3121 | { | ||
3122 | if (isalnum ((int)(base_name[i]))) | ||
3123 | { | ||
3124 | name[i] = base_name[i]; | ||
3125 | } | ||
3126 | else | ||
3127 | { | ||
3128 | name[i] = '_'; | ||
3129 | } | ||
3130 | } | ||
3131 | name[ext - base_name] = LT_EOS_CHAR; | ||
3132 | } | ||
3133 | |||
3134 | /* Now try to open the .la file. If there is no directory name | ||
3135 | component, try to find it first in user_search_path and then other | ||
3136 | prescribed paths. Otherwise (or in any case if the module was not | ||
3137 | yet found) try opening just the module name as passed. */ | ||
3138 | if (!dir) | ||
3139 | { | ||
3140 | const char *search_path; | ||
3141 | |||
3142 | LT_DLMUTEX_LOCK (); | ||
3143 | search_path = user_search_path; | ||
3144 | if (search_path) | ||
3145 | file = find_file (user_search_path, base_name, &dir); | ||
3146 | LT_DLMUTEX_UNLOCK (); | ||
3147 | |||
3148 | if (!file) | ||
3149 | { | ||
3150 | search_path = getenv (LTDL_SEARCHPATH_VAR); | ||
3151 | if (search_path) | ||
3152 | file = find_file (search_path, base_name, &dir); | ||
3153 | } | ||
3154 | |||
3155 | #ifdef LTDL_SHLIBPATH_VAR | ||
3156 | if (!file) | ||
3157 | { | ||
3158 | search_path = getenv (LTDL_SHLIBPATH_VAR); | ||
3159 | if (search_path) | ||
3160 | file = find_file (search_path, base_name, &dir); | ||
3161 | } | ||
3162 | #endif | ||
3163 | #ifdef LTDL_SYSSEARCHPATH | ||
3164 | if (!file && sys_search_path) | ||
3165 | { | ||
3166 | file = find_file (sys_search_path, base_name, &dir); | ||
3167 | } | ||
3168 | #endif | ||
3169 | } | ||
3170 | if (!file) | ||
3171 | { | ||
3172 | file = fopen (filename, LT_READTEXT_MODE); | ||
3173 | } | ||
3174 | |||
3175 | /* If we didn't find the file by now, it really isn't there. Set | ||
3176 | the status flag, and bail out. */ | ||
3177 | if (!file) | ||
3178 | { | ||
3179 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); | ||
3180 | ++errors; | ||
3181 | goto cleanup; | ||
3182 | } | ||
3183 | |||
3184 | line_len = LT_FILENAME_MAX; | ||
3185 | line = LT_EMALLOC (char, line_len); | ||
3186 | if (!line) | ||
3187 | { | ||
3188 | fclose (file); | ||
3189 | ++errors; | ||
3190 | goto cleanup; | ||
3191 | } | ||
3192 | |||
3193 | /* read the .la file */ | ||
3194 | while (!feof (file)) | ||
3195 | { | ||
3196 | if (!fgets (line, (int) line_len, file)) | ||
3197 | { | ||
3198 | break; | ||
3199 | } | ||
3200 | |||
3201 | /* Handle the case where we occasionally need to read a line | ||
3202 | that is longer than the initial buffer size. */ | ||
3203 | while ((line[LT_STRLEN(line) -1] != '\n') && (!feof (file))) | ||
3204 | { | ||
3205 | line = LT_DLREALLOC (char, line, line_len *2); | ||
3206 | if (!fgets (&line[line_len -1], (int) line_len +1, file)) | ||
3207 | { | ||
3208 | break; | ||
3209 | } | ||
3210 | line_len *= 2; | ||
3211 | } | ||
3212 | |||
3213 | if (line[0] == '\n' || line[0] == '#') | ||
3214 | { | ||
3215 | continue; | ||
3216 | } | ||
3217 | |||
3218 | #undef STR_DLNAME | ||
3219 | #define STR_DLNAME "dlname=" | ||
3220 | if (strncmp (line, STR_DLNAME, sizeof (STR_DLNAME) - 1) == 0) | ||
3221 | { | ||
3222 | errors += trim (&dlname, &line[sizeof (STR_DLNAME) - 1]); | ||
3223 | } | ||
3224 | |||
3225 | #undef STR_OLD_LIBRARY | ||
3226 | #define STR_OLD_LIBRARY "old_library=" | ||
3227 | else if (strncmp (line, STR_OLD_LIBRARY, | ||
3228 | sizeof (STR_OLD_LIBRARY) - 1) == 0) | ||
3229 | { | ||
3230 | errors += trim (&old_name, &line[sizeof (STR_OLD_LIBRARY) - 1]); | ||
3231 | } | ||
3232 | #undef STR_LIBDIR | ||
3233 | #define STR_LIBDIR "libdir=" | ||
3234 | else if (strncmp (line, STR_LIBDIR, sizeof (STR_LIBDIR) - 1) == 0) | ||
3235 | { | ||
3236 | errors += trim (&libdir, &line[sizeof(STR_LIBDIR) - 1]); | ||
3237 | } | ||
3238 | |||
3239 | #undef STR_DL_DEPLIBS | ||
3240 | #define STR_DL_DEPLIBS "dependency_libs=" | ||
3241 | else if (strncmp (line, STR_DL_DEPLIBS, | ||
3242 | sizeof (STR_DL_DEPLIBS) - 1) == 0) | ||
3243 | { | ||
3244 | errors += trim (&deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]); | ||
3245 | } | ||
3246 | else if (strcmp (line, "installed=yes\n") == 0) | ||
3247 | { | ||
3248 | installed = 1; | ||
3249 | } | ||
3250 | else if (strcmp (line, "installed=no\n") == 0) | ||
3251 | { | ||
3252 | installed = 0; | ||
3253 | } | ||
3254 | |||
3255 | #undef STR_LIBRARY_NAMES | ||
3256 | #define STR_LIBRARY_NAMES "library_names=" | ||
3257 | else if (! dlname && strncmp (line, STR_LIBRARY_NAMES, | ||
3258 | sizeof (STR_LIBRARY_NAMES) - 1) == 0) | ||
3259 | { | ||
3260 | char *last_libname; | ||
3261 | errors += trim (&dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]); | ||
3262 | if (!errors | ||
3263 | && dlname | ||
3264 | && (last_libname = strrchr (dlname, ' ')) != 0) | ||
3265 | { | ||
3266 | last_libname = lt_estrdup (last_libname + 1); | ||
3267 | if (!last_libname) | ||
3268 | { | ||
3269 | ++errors; | ||
3270 | goto cleanup; | ||
3271 | } | ||
3272 | LT_DLMEM_REASSIGN (dlname, last_libname); | ||
3273 | } | ||
3274 | } | ||
3275 | |||
3276 | if (errors) | ||
3277 | break; | ||
3278 | } | ||
3279 | |||
3280 | fclose (file); | ||
3281 | LT_DLFREE (line); | ||
3282 | |||
3283 | /* allocate the handle */ | ||
3284 | *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); | ||
3285 | if (*phandle == 0) | ||
3286 | ++errors; | ||
3287 | |||
3288 | if (errors) | ||
3289 | { | ||
3290 | free_vars (dlname, old_name, libdir, deplibs); | ||
3291 | LT_DLFREE (*phandle); | ||
3292 | goto cleanup; | ||
3293 | } | ||
3294 | |||
3295 | assert (*phandle); | ||
3296 | |||
3297 | memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); | ||
3298 | if (load_deplibs (*phandle, deplibs) == 0) | ||
3299 | { | ||
3300 | newhandle = *phandle; | ||
3301 | /* find_module may replace newhandle */ | ||
3302 | if (find_module (&newhandle, dir, libdir, dlname, old_name, installed)) | ||
3303 | { | ||
3304 | unload_deplibs (*phandle); | ||
3305 | ++errors; | ||
3306 | } | ||
3307 | } | ||
3308 | else | ||
3309 | { | ||
3310 | ++errors; | ||
3311 | } | ||
3312 | |||
3313 | free_vars (dlname, old_name, libdir, deplibs); | ||
3314 | if (errors) | ||
3315 | { | ||
3316 | LT_DLFREE (*phandle); | ||
3317 | goto cleanup; | ||
3318 | } | ||
3319 | |||
3320 | if (*phandle != newhandle) | ||
3321 | { | ||
3322 | unload_deplibs (*phandle); | ||
3323 | } | ||
3324 | } | ||
3325 | else | ||
3326 | { | ||
3327 | /* not a libtool module */ | ||
3328 | *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); | ||
3329 | if (*phandle == 0) | ||
3330 | { | ||
3331 | ++errors; | ||
3332 | goto cleanup; | ||
3333 | } | ||
3334 | |||
3335 | memset (*phandle, 0, sizeof (struct lt_dlhandle_struct)); | ||
3336 | newhandle = *phandle; | ||
3337 | |||
3338 | /* If the module has no directory name component, try to find it | ||
3339 | first in user_search_path and then other prescribed paths. | ||
3340 | Otherwise (or in any case if the module was not yet found) try | ||
3341 | opening just the module name as passed. */ | ||
3342 | if ((dir || (!find_handle (user_search_path, base_name, &newhandle) | ||
3343 | && !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name, | ||
3344 | &newhandle) | ||
3345 | #ifdef LTDL_SHLIBPATH_VAR | ||
3346 | && !find_handle (getenv (LTDL_SHLIBPATH_VAR), base_name, | ||
3347 | &newhandle) | ||
3348 | #endif | ||
3349 | #ifdef LTDL_SYSSEARCHPATH | ||
3350 | && !find_handle (sys_search_path, base_name, &newhandle) | ||
3351 | #endif | ||
3352 | ))) | ||
3353 | { | ||
3354 | if (tryall_dlopen (&newhandle, filename) != 0) | ||
3355 | { | ||
3356 | newhandle = NULL; | ||
3357 | } | ||
3358 | } | ||
3359 | |||
3360 | if (!newhandle) | ||
3361 | { | ||
3362 | LT_DLFREE (*phandle); | ||
3363 | ++errors; | ||
3364 | goto cleanup; | ||
3365 | } | ||
3366 | } | ||
3367 | |||
3368 | register_handle: | ||
3369 | LT_DLMEM_REASSIGN (*phandle, newhandle); | ||
3370 | |||
3371 | if ((*phandle)->info.ref_count == 0) | ||
3372 | { | ||
3373 | (*phandle)->info.ref_count = 1; | ||
3374 | LT_DLMEM_REASSIGN ((*phandle)->info.name, name); | ||
3375 | |||
3376 | LT_DLMUTEX_LOCK (); | ||
3377 | (*phandle)->next = handles; | ||
3378 | handles = *phandle; | ||
3379 | LT_DLMUTEX_UNLOCK (); | ||
3380 | } | ||
3381 | |||
3382 | LT_DLMUTEX_SETERROR (saved_error); | ||
3383 | |||
3384 | cleanup: | ||
3385 | LT_DLFREE (dir); | ||
3386 | LT_DLFREE (name); | ||
3387 | LT_DLFREE (canonical); | ||
3388 | |||
3389 | return errors; | ||
3390 | } | ||
3391 | |||
3392 | lt_dlhandle | ||
3393 | lt_dlopen (filename) | ||
3394 | const char *filename; | ||
3395 | { | ||
3396 | lt_dlhandle handle = 0; | ||
3397 | |||
3398 | /* Just incase we missed a code path in try_dlopen() that reports | ||
3399 | an error, but forgets to reset handle... */ | ||
3400 | if (try_dlopen (&handle, filename) != 0) | ||
3401 | return 0; | ||
3402 | |||
3403 | return handle; | ||
3404 | } | ||
3405 | |||
3406 | /* If the last error messge store was `FILE_NOT_FOUND', then return | ||
3407 | non-zero. */ | ||
3408 | static int | ||
3409 | file_not_found () | ||
3410 | { | ||
3411 | const char *error = 0; | ||
3412 | |||
3413 | LT_DLMUTEX_GETERROR (error); | ||
3414 | if (error == LT_DLSTRERROR (FILE_NOT_FOUND)) | ||
3415 | return 1; | ||
3416 | |||
3417 | return 0; | ||
3418 | } | ||
3419 | |||
3420 | /* If FILENAME has an ARCHIVE_EXT or SHLIB_EXT extension, try to | ||
3421 | open the FILENAME as passed. Otherwise try appending ARCHIVE_EXT, | ||
3422 | and if a file is still not found try again with SHLIB_EXT appended | ||
3423 | instead. */ | ||
3424 | lt_dlhandle | ||
3425 | lt_dlopenext (filename) | ||
3426 | const char *filename; | ||
3427 | { | ||
3428 | lt_dlhandle handle = 0; | ||
3429 | char * tmp = 0; | ||
3430 | char * ext = 0; | ||
3431 | size_t len; | ||
3432 | int errors = 0; | ||
3433 | |||
3434 | if (!filename) | ||
3435 | { | ||
3436 | return lt_dlopen (filename); | ||
3437 | } | ||
3438 | |||
3439 | assert (filename); | ||
3440 | |||
3441 | len = LT_STRLEN (filename); | ||
3442 | ext = strrchr (filename, '.'); | ||
3443 | |||
3444 | /* If FILENAME already bears a suitable extension, there is no need | ||
3445 | to try appending additional extensions. */ | ||
3446 | if (ext && ((strcmp (ext, archive_ext) == 0) | ||
3447 | #ifdef LTDL_SHLIB_EXT | ||
3448 | || (strcmp (ext, shlib_ext) == 0) | ||
3449 | #endif | ||
3450 | )) | ||
3451 | { | ||
3452 | return lt_dlopen (filename); | ||
3453 | } | ||
3454 | |||
3455 | /* First try appending ARCHIVE_EXT. */ | ||
3456 | tmp = LT_EMALLOC (char, len + LT_STRLEN (archive_ext) + 1); | ||
3457 | if (!tmp) | ||
3458 | return 0; | ||
3459 | |||
3460 | strcpy (tmp, filename); | ||
3461 | strcat (tmp, archive_ext); | ||
3462 | errors = try_dlopen (&handle, tmp); | ||
3463 | |||
3464 | /* If we found FILENAME, stop searching -- whether we were able to | ||
3465 | load the file as a module or not. If the file exists but loading | ||
3466 | failed, it is better to return an error message here than to | ||
3467 | report FILE_NOT_FOUND when the alternatives (foo.so etc) are not | ||
3468 | in the module search path. */ | ||
3469 | if (handle || ((errors > 0) && !file_not_found ())) | ||
3470 | { | ||
3471 | LT_DLFREE (tmp); | ||
3472 | return handle; | ||
3473 | } | ||
3474 | |||
3475 | #ifdef LTDL_SHLIB_EXT | ||
3476 | /* Try appending SHLIB_EXT. */ | ||
3477 | if (LT_STRLEN (shlib_ext) > LT_STRLEN (archive_ext)) | ||
3478 | { | ||
3479 | LT_DLFREE (tmp); | ||
3480 | tmp = LT_EMALLOC (char, len + LT_STRLEN (shlib_ext) + 1); | ||
3481 | if (!tmp) | ||
3482 | return 0; | ||
3483 | |||
3484 | strcpy (tmp, filename); | ||
3485 | } | ||
3486 | else | ||
3487 | { | ||
3488 | tmp[len] = LT_EOS_CHAR; | ||
3489 | } | ||
3490 | |||
3491 | strcat(tmp, shlib_ext); | ||
3492 | errors = try_dlopen (&handle, tmp); | ||
3493 | |||
3494 | /* As before, if the file was found but loading failed, return now | ||
3495 | with the current error message. */ | ||
3496 | if (handle || ((errors > 0) && !file_not_found ())) | ||
3497 | { | ||
3498 | LT_DLFREE (tmp); | ||
3499 | return handle; | ||
3500 | } | ||
3501 | #endif | ||
3502 | |||
3503 | /* Still here? Then we really did fail to locate any of the file | ||
3504 | names we tried. */ | ||
3505 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); | ||
3506 | LT_DLFREE (tmp); | ||
3507 | return 0; | ||
3508 | } | ||
3509 | |||
3510 | |||
3511 | static int | ||
3512 | lt_argz_insert (pargz, pargz_len, before, entry) | ||
3513 | char **pargz; | ||
3514 | size_t *pargz_len; | ||
3515 | char *before; | ||
3516 | const char *entry; | ||
3517 | { | ||
3518 | error_t error; | ||
3519 | |||
3520 | if ((error = argz_insert (pargz, pargz_len, before, entry))) | ||
3521 | { | ||
3522 | switch (error) | ||
3523 | { | ||
3524 | case ENOMEM: | ||
3525 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); | ||
3526 | break; | ||
3527 | default: | ||
3528 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); | ||
3529 | break; | ||
3530 | } | ||
3531 | return 1; | ||
3532 | } | ||
3533 | |||
3534 | return 0; | ||
3535 | } | ||
3536 | |||
3537 | static int | ||
3538 | lt_argz_insertinorder (pargz, pargz_len, entry) | ||
3539 | char **pargz; | ||
3540 | size_t *pargz_len; | ||
3541 | const char *entry; | ||
3542 | { | ||
3543 | char *before = 0; | ||
3544 | |||
3545 | assert (pargz); | ||
3546 | assert (pargz_len); | ||
3547 | assert (entry && *entry); | ||
3548 | |||
3549 | if (*pargz) | ||
3550 | while ((before = argz_next (*pargz, *pargz_len, before))) | ||
3551 | { | ||
3552 | int cmp = strcmp (entry, before); | ||
3553 | |||
3554 | if (cmp < 0) break; | ||
3555 | if (cmp == 0) return 0; /* No duplicates! */ | ||
3556 | } | ||
3557 | |||
3558 | return lt_argz_insert (pargz, pargz_len, before, entry); | ||
3559 | } | ||
3560 | |||
3561 | static int | ||
3562 | lt_argz_insertdir (pargz, pargz_len, dirnam, dp) | ||
3563 | char **pargz; | ||
3564 | size_t *pargz_len; | ||
3565 | const char *dirnam; | ||
3566 | struct dirent *dp; | ||
3567 | { | ||
3568 | char *buf = 0; | ||
3569 | size_t buf_len = 0; | ||
3570 | char *end = 0; | ||
3571 | size_t end_offset = 0; | ||
3572 | size_t dir_len = 0; | ||
3573 | int errors = 0; | ||
3574 | |||
3575 | assert (pargz); | ||
3576 | assert (pargz_len); | ||
3577 | assert (dp); | ||
3578 | |||
3579 | dir_len = LT_STRLEN (dirnam); | ||
3580 | end = dp->d_name + LT_D_NAMLEN(dp); | ||
3581 | |||
3582 | /* Ignore version numbers. */ | ||
3583 | { | ||
3584 | char *p; | ||
3585 | for (p = end; p -1 > dp->d_name; --p) | ||
3586 | if (strchr (".0123456789", p[-1]) == 0) | ||
3587 | break; | ||
3588 | |||
3589 | if (*p == '.') | ||
3590 | end = p; | ||
3591 | } | ||
3592 | |||
3593 | /* Ignore filename extension. */ | ||
3594 | { | ||
3595 | char *p; | ||
3596 | for (p = end -1; p > dp->d_name; --p) | ||
3597 | if (*p == '.') | ||
3598 | { | ||
3599 | end = p; | ||
3600 | break; | ||
3601 | } | ||
3602 | } | ||
3603 | |||
3604 | /* Prepend the directory name. */ | ||
3605 | end_offset = end - dp->d_name; | ||
3606 | buf_len = dir_len + 1+ end_offset; | ||
3607 | buf = LT_EMALLOC (char, 1+ buf_len); | ||
3608 | if (!buf) | ||
3609 | return ++errors; | ||
3610 | |||
3611 | assert (buf); | ||
3612 | |||
3613 | strcpy (buf, dirnam); | ||
3614 | strcat (buf, "/"); | ||
3615 | strncat (buf, dp->d_name, end_offset); | ||
3616 | buf[buf_len] = LT_EOS_CHAR; | ||
3617 | |||
3618 | /* Try to insert (in order) into ARGZ/ARGZ_LEN. */ | ||
3619 | if (lt_argz_insertinorder (pargz, pargz_len, buf) != 0) | ||
3620 | ++errors; | ||
3621 | |||
3622 | LT_DLFREE (buf); | ||
3623 | |||
3624 | return errors; | ||
3625 | } | ||
3626 | |||
3627 | static int | ||
3628 | list_files_by_dir (dirnam, pargz, pargz_len) | ||
3629 | const char *dirnam; | ||
3630 | char **pargz; | ||
3631 | size_t *pargz_len; | ||
3632 | { | ||
3633 | DIR *dirp = 0; | ||
3634 | int errors = 0; | ||
3635 | |||
3636 | assert (dirnam && *dirnam); | ||
3637 | assert (pargz); | ||
3638 | assert (pargz_len); | ||
3639 | assert (dirnam[LT_STRLEN(dirnam) -1] != '/'); | ||
3640 | |||
3641 | dirp = opendir (dirnam); | ||
3642 | if (dirp) | ||
3643 | { | ||
3644 | struct dirent *dp = 0; | ||
3645 | |||
3646 | while ((dp = readdir (dirp))) | ||
3647 | if (dp->d_name[0] != '.') | ||
3648 | if (lt_argz_insertdir (pargz, pargz_len, dirnam, dp)) | ||
3649 | { | ||
3650 | ++errors; | ||
3651 | break; | ||
3652 | } | ||
3653 | |||
3654 | closedir (dirp); | ||
3655 | } | ||
3656 | else | ||
3657 | ++errors; | ||
3658 | |||
3659 | return errors; | ||
3660 | } | ||
3661 | |||
3662 | |||
3663 | /* If there are any files in DIRNAME, call the function passed in | ||
3664 | DATA1 (with the name of each file and DATA2 as arguments). */ | ||
3665 | static int | ||
3666 | foreachfile_callback (dirname, data1, data2) | ||
3667 | char *dirname; | ||
3668 | lt_ptr data1; | ||
3669 | lt_ptr data2; | ||
3670 | { | ||
3671 | int (*func) LT_PARAMS((const char *filename, lt_ptr data)) | ||
3672 | = (int (*) LT_PARAMS((const char *filename, lt_ptr data))) data1; | ||
3673 | |||
3674 | int is_done = 0; | ||
3675 | char *argz = 0; | ||
3676 | size_t argz_len = 0; | ||
3677 | |||
3678 | if (list_files_by_dir (dirname, &argz, &argz_len) != 0) | ||
3679 | goto cleanup; | ||
3680 | if (!argz) | ||
3681 | goto cleanup; | ||
3682 | |||
3683 | { | ||
3684 | char *filename = 0; | ||
3685 | while ((filename = argz_next (argz, argz_len, filename))) | ||
3686 | if ((is_done = (*func) (filename, data2))) | ||
3687 | break; | ||
3688 | } | ||
3689 | |||
3690 | cleanup: | ||
3691 | LT_DLFREE (argz); | ||
3692 | |||
3693 | return is_done; | ||
3694 | } | ||
3695 | |||
3696 | |||
3697 | /* Call FUNC for each unique extensionless file in SEARCH_PATH, along | ||
3698 | with DATA. The filenames passed to FUNC would be suitable for | ||
3699 | passing to lt_dlopenext. The extensions are stripped so that | ||
3700 | individual modules do not generate several entries (e.g. libfoo.la, | ||
3701 | libfoo.so, libfoo.so.1, libfoo.so.1.0.0). If SEARCH_PATH is NULL, | ||
3702 | then the same directories that lt_dlopen would search are examined. */ | ||
3703 | int | ||
3704 | lt_dlforeachfile (search_path, func, data) | ||
3705 | const char *search_path; | ||
3706 | int (*func) LT_PARAMS ((const char *filename, lt_ptr data)); | ||
3707 | lt_ptr data; | ||
3708 | { | ||
3709 | int is_done = 0; | ||
3710 | |||
3711 | if (search_path) | ||
3712 | { | ||
3713 | /* If a specific path was passed, search only the directories | ||
3714 | listed in it. */ | ||
3715 | is_done = foreach_dirinpath (search_path, 0, | ||
3716 | foreachfile_callback, func, data); | ||
3717 | } | ||
3718 | else | ||
3719 | { | ||
3720 | /* Otherwise search the default paths. */ | ||
3721 | is_done = foreach_dirinpath (user_search_path, 0, | ||
3722 | foreachfile_callback, func, data); | ||
3723 | if (!is_done) | ||
3724 | { | ||
3725 | is_done = foreach_dirinpath (getenv("LTDL_LIBRARY_PATH"), 0, | ||
3726 | foreachfile_callback, func, data); | ||
3727 | } | ||
3728 | |||
3729 | #ifdef LTDL_SHLIBPATH_VAR | ||
3730 | if (!is_done) | ||
3731 | { | ||
3732 | is_done = foreach_dirinpath (getenv(LTDL_SHLIBPATH_VAR), 0, | ||
3733 | foreachfile_callback, func, data); | ||
3734 | } | ||
3735 | #endif | ||
3736 | #ifdef LTDL_SYSSEARCHPATH | ||
3737 | if (!is_done) | ||
3738 | { | ||
3739 | is_done = foreach_dirinpath (getenv(LTDL_SYSSEARCHPATH), 0, | ||
3740 | foreachfile_callback, func, data); | ||
3741 | } | ||
3742 | #endif | ||
3743 | } | ||
3744 | |||
3745 | return is_done; | ||
3746 | } | ||
3747 | |||
3748 | int | ||
3749 | lt_dlclose (handle) | ||
3750 | lt_dlhandle handle; | ||
3751 | { | ||
3752 | lt_dlhandle cur, last; | ||
3753 | int errors = 0; | ||
3754 | |||
3755 | LT_DLMUTEX_LOCK (); | ||
3756 | |||
3757 | /* check whether the handle is valid */ | ||
3758 | last = cur = handles; | ||
3759 | while (cur && handle != cur) | ||
3760 | { | ||
3761 | last = cur; | ||
3762 | cur = cur->next; | ||
3763 | } | ||
3764 | |||
3765 | if (!cur) | ||
3766 | { | ||
3767 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); | ||
3768 | ++errors; | ||
3769 | goto done; | ||
3770 | } | ||
3771 | |||
3772 | handle->info.ref_count--; | ||
3773 | |||
3774 | /* Note that even with resident modules, we must track the ref_count | ||
3775 | correctly incase the user decides to reset the residency flag | ||
3776 | later (even though the API makes no provision for that at the | ||
3777 | moment). */ | ||
3778 | if (handle->info.ref_count <= 0 && !LT_DLIS_RESIDENT (handle)) | ||
3779 | { | ||
3780 | lt_user_data data = handle->loader->dlloader_data; | ||
3781 | |||
3782 | if (handle != handles) | ||
3783 | { | ||
3784 | last->next = handle->next; | ||
3785 | } | ||
3786 | else | ||
3787 | { | ||
3788 | handles = handle->next; | ||
3789 | } | ||
3790 | |||
3791 | errors += handle->loader->module_close (data, handle->module); | ||
3792 | errors += unload_deplibs(handle); | ||
3793 | |||
3794 | /* It is up to the callers to free the data itself. */ | ||
3795 | LT_DLFREE (handle->caller_data); | ||
3796 | |||
3797 | LT_DLFREE (handle->info.filename); | ||
3798 | LT_DLFREE (handle->info.name); | ||
3799 | LT_DLFREE (handle); | ||
3800 | |||
3801 | goto done; | ||
3802 | } | ||
3803 | |||
3804 | if (LT_DLIS_RESIDENT (handle)) | ||
3805 | { | ||
3806 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CLOSE_RESIDENT_MODULE)); | ||
3807 | ++errors; | ||
3808 | } | ||
3809 | |||
3810 | done: | ||
3811 | LT_DLMUTEX_UNLOCK (); | ||
3812 | |||
3813 | return errors; | ||
3814 | } | ||
3815 | |||
3816 | lt_ptr | ||
3817 | lt_dlsym (handle, symbol) | ||
3818 | lt_dlhandle handle; | ||
3819 | const char *symbol; | ||
3820 | { | ||
3821 | size_t lensym; | ||
3822 | char lsym[LT_SYMBOL_LENGTH]; | ||
3823 | char *sym; | ||
3824 | lt_ptr address; | ||
3825 | lt_user_data data; | ||
3826 | |||
3827 | if (!handle) | ||
3828 | { | ||
3829 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); | ||
3830 | return 0; | ||
3831 | } | ||
3832 | |||
3833 | if (!symbol) | ||
3834 | { | ||
3835 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); | ||
3836 | return 0; | ||
3837 | } | ||
3838 | |||
3839 | lensym = LT_STRLEN (symbol) + LT_STRLEN (handle->loader->sym_prefix) | ||
3840 | + LT_STRLEN (handle->info.name); | ||
3841 | |||
3842 | if (lensym + LT_SYMBOL_OVERHEAD < LT_SYMBOL_LENGTH) | ||
3843 | { | ||
3844 | sym = lsym; | ||
3845 | } | ||
3846 | else | ||
3847 | { | ||
3848 | sym = LT_EMALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1); | ||
3849 | if (!sym) | ||
3850 | { | ||
3851 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (BUFFER_OVERFLOW)); | ||
3852 | return 0; | ||
3853 | } | ||
3854 | } | ||
3855 | |||
3856 | data = handle->loader->dlloader_data; | ||
3857 | if (handle->info.name) | ||
3858 | { | ||
3859 | const char *saved_error; | ||
3860 | |||
3861 | LT_DLMUTEX_GETERROR (saved_error); | ||
3862 | |||
3863 | /* this is a libtool module */ | ||
3864 | if (handle->loader->sym_prefix) | ||
3865 | { | ||
3866 | strcpy(sym, handle->loader->sym_prefix); | ||
3867 | strcat(sym, handle->info.name); | ||
3868 | } | ||
3869 | else | ||
3870 | { | ||
3871 | strcpy(sym, handle->info.name); | ||
3872 | } | ||
3873 | |||
3874 | strcat(sym, "_LTX_"); | ||
3875 | strcat(sym, symbol); | ||
3876 | |||
3877 | /* try "modulename_LTX_symbol" */ | ||
3878 | address = handle->loader->find_sym (data, handle->module, sym); | ||
3879 | if (address) | ||
3880 | { | ||
3881 | if (sym != lsym) | ||
3882 | { | ||
3883 | LT_DLFREE (sym); | ||
3884 | } | ||
3885 | return address; | ||
3886 | } | ||
3887 | LT_DLMUTEX_SETERROR (saved_error); | ||
3888 | } | ||
3889 | |||
3890 | /* otherwise try "symbol" */ | ||
3891 | if (handle->loader->sym_prefix) | ||
3892 | { | ||
3893 | strcpy(sym, handle->loader->sym_prefix); | ||
3894 | strcat(sym, symbol); | ||
3895 | } | ||
3896 | else | ||
3897 | { | ||
3898 | strcpy(sym, symbol); | ||
3899 | } | ||
3900 | |||
3901 | address = handle->loader->find_sym (data, handle->module, sym); | ||
3902 | if (sym != lsym) | ||
3903 | { | ||
3904 | LT_DLFREE (sym); | ||
3905 | } | ||
3906 | |||
3907 | return address; | ||
3908 | } | ||
3909 | |||
3910 | const char * | ||
3911 | lt_dlerror () | ||
3912 | { | ||
3913 | const char *error; | ||
3914 | |||
3915 | LT_DLMUTEX_GETERROR (error); | ||
3916 | LT_DLMUTEX_SETERROR (0); | ||
3917 | |||
3918 | return error ? error : NULL; | ||
3919 | } | ||
3920 | |||
3921 | static int | ||
3922 | lt_dlpath_insertdir (ppath, before, dir) | ||
3923 | char **ppath; | ||
3924 | char *before; | ||
3925 | const char *dir; | ||
3926 | { | ||
3927 | int errors = 0; | ||
3928 | char *canonical = 0; | ||
3929 | char *argz = 0; | ||
3930 | size_t argz_len = 0; | ||
3931 | |||
3932 | assert (ppath); | ||
3933 | assert (dir && *dir); | ||
3934 | |||
3935 | if (canonicalize_path (dir, &canonical) != 0) | ||
3936 | { | ||
3937 | ++errors; | ||
3938 | goto cleanup; | ||
3939 | } | ||
3940 | |||
3941 | assert (canonical && *canonical); | ||
3942 | |||
3943 | /* If *PPATH is empty, set it to DIR. */ | ||
3944 | if (*ppath == 0) | ||
3945 | { | ||
3946 | assert (!before); /* BEFORE cannot be set without PPATH. */ | ||
3947 | assert (dir); /* Without DIR, don't call this function! */ | ||
3948 | |||
3949 | *ppath = lt_estrdup (dir); | ||
3950 | if (*ppath == 0) | ||
3951 | ++errors; | ||
3952 | |||
3953 | return errors; | ||
3954 | } | ||
3955 | |||
3956 | assert (ppath && *ppath); | ||
3957 | |||
3958 | if (argzize_path (*ppath, &argz, &argz_len) != 0) | ||
3959 | { | ||
3960 | ++errors; | ||
3961 | goto cleanup; | ||
3962 | } | ||
3963 | |||
3964 | /* Convert BEFORE into an equivalent offset into ARGZ. This only works | ||
3965 | if *PPATH is already canonicalized, and hence does not change length | ||
3966 | with respect to ARGZ. We canonicalize each entry as it is added to | ||
3967 | the search path, and don't call this function with (uncanonicalized) | ||
3968 | user paths, so this is a fair assumption. */ | ||
3969 | if (before) | ||
3970 | { | ||
3971 | assert (*ppath <= before); | ||
3972 | assert (before - *ppath <= strlen (*ppath)); | ||
3973 | |||
3974 | before = before - *ppath + argz; | ||
3975 | } | ||
3976 | |||
3977 | if (lt_argz_insert (&argz, &argz_len, before, dir) != 0) | ||
3978 | { | ||
3979 | ++errors; | ||
3980 | goto cleanup; | ||
3981 | } | ||
3982 | |||
3983 | argz_stringify (argz, argz_len, LT_PATHSEP_CHAR); | ||
3984 | LT_DLMEM_REASSIGN (*ppath, argz); | ||
3985 | |||
3986 | cleanup: | ||
3987 | LT_DLFREE (canonical); | ||
3988 | LT_DLFREE (argz); | ||
3989 | |||
3990 | return errors; | ||
3991 | } | ||
3992 | |||
3993 | int | ||
3994 | lt_dladdsearchdir (search_dir) | ||
3995 | const char *search_dir; | ||
3996 | { | ||
3997 | int errors = 0; | ||
3998 | |||
3999 | if (search_dir && *search_dir) | ||
4000 | { | ||
4001 | LT_DLMUTEX_LOCK (); | ||
4002 | if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0) | ||
4003 | ++errors; | ||
4004 | LT_DLMUTEX_UNLOCK (); | ||
4005 | } | ||
4006 | |||
4007 | return errors; | ||
4008 | } | ||
4009 | |||
4010 | int | ||
4011 | lt_dlinsertsearchdir (before, search_dir) | ||
4012 | const char *before; | ||
4013 | const char *search_dir; | ||
4014 | { | ||
4015 | int errors = 0; | ||
4016 | |||
4017 | if (before) | ||
4018 | { | ||
4019 | LT_DLMUTEX_LOCK (); | ||
4020 | if ((before < user_search_path) | ||
4021 | || (before >= user_search_path + LT_STRLEN (user_search_path))) | ||
4022 | { | ||
4023 | LT_DLMUTEX_UNLOCK (); | ||
4024 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_POSITION)); | ||
4025 | return 1; | ||
4026 | } | ||
4027 | LT_DLMUTEX_UNLOCK (); | ||
4028 | } | ||
4029 | |||
4030 | if (search_dir && *search_dir) | ||
4031 | { | ||
4032 | LT_DLMUTEX_LOCK (); | ||
4033 | if (lt_dlpath_insertdir (&user_search_path, | ||
4034 | (char *) before, search_dir) != 0) | ||
4035 | { | ||
4036 | ++errors; | ||
4037 | } | ||
4038 | LT_DLMUTEX_UNLOCK (); | ||
4039 | } | ||
4040 | |||
4041 | return errors; | ||
4042 | } | ||
4043 | |||
4044 | int | ||
4045 | lt_dlsetsearchpath (search_path) | ||
4046 | const char *search_path; | ||
4047 | { | ||
4048 | int errors = 0; | ||
4049 | |||
4050 | LT_DLMUTEX_LOCK (); | ||
4051 | LT_DLFREE (user_search_path); | ||
4052 | LT_DLMUTEX_UNLOCK (); | ||
4053 | |||
4054 | if (!search_path || !LT_STRLEN (search_path)) | ||
4055 | { | ||
4056 | return errors; | ||
4057 | } | ||
4058 | |||
4059 | LT_DLMUTEX_LOCK (); | ||
4060 | if (canonicalize_path (search_path, &user_search_path) != 0) | ||
4061 | ++errors; | ||
4062 | LT_DLMUTEX_UNLOCK (); | ||
4063 | |||
4064 | return errors; | ||
4065 | } | ||
4066 | |||
4067 | const char * | ||
4068 | lt_dlgetsearchpath () | ||
4069 | { | ||
4070 | const char *saved_path; | ||
4071 | |||
4072 | LT_DLMUTEX_LOCK (); | ||
4073 | saved_path = user_search_path; | ||
4074 | LT_DLMUTEX_UNLOCK (); | ||
4075 | |||
4076 | return saved_path; | ||
4077 | } | ||
4078 | |||
4079 | int | ||
4080 | lt_dlmakeresident (handle) | ||
4081 | lt_dlhandle handle; | ||
4082 | { | ||
4083 | int errors = 0; | ||
4084 | |||
4085 | if (!handle) | ||
4086 | { | ||
4087 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); | ||
4088 | ++errors; | ||
4089 | } | ||
4090 | else | ||
4091 | { | ||
4092 | LT_DLSET_FLAG (handle, LT_DLRESIDENT_FLAG); | ||
4093 | } | ||
4094 | |||
4095 | return errors; | ||
4096 | } | ||
4097 | |||
4098 | int | ||
4099 | lt_dlisresident (handle) | ||
4100 | lt_dlhandle handle; | ||
4101 | { | ||
4102 | if (!handle) | ||
4103 | { | ||
4104 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); | ||
4105 | return -1; | ||
4106 | } | ||
4107 | |||
4108 | return LT_DLIS_RESIDENT (handle); | ||
4109 | } | ||
4110 | |||
4111 | |||
4112 | |||
4113 | |||
4114 | /* --- MODULE INFORMATION --- */ | ||
4115 | |||
4116 | const lt_dlinfo * | ||
4117 | lt_dlgetinfo (handle) | ||
4118 | lt_dlhandle handle; | ||
4119 | { | ||
4120 | if (!handle) | ||
4121 | { | ||
4122 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); | ||
4123 | return 0; | ||
4124 | } | ||
4125 | |||
4126 | return &(handle->info); | ||
4127 | } | ||
4128 | |||
4129 | lt_dlhandle | ||
4130 | lt_dlhandle_next (place) | ||
4131 | lt_dlhandle place; | ||
4132 | { | ||
4133 | return place ? place->next : handles; | ||
4134 | } | ||
4135 | |||
4136 | int | ||
4137 | lt_dlforeach (func, data) | ||
4138 | int (*func) LT_PARAMS((lt_dlhandle handle, lt_ptr data)); | ||
4139 | lt_ptr data; | ||
4140 | { | ||
4141 | int errors = 0; | ||
4142 | lt_dlhandle cur; | ||
4143 | |||
4144 | LT_DLMUTEX_LOCK (); | ||
4145 | |||
4146 | cur = handles; | ||
4147 | while (cur) | ||
4148 | { | ||
4149 | lt_dlhandle tmp = cur; | ||
4150 | |||
4151 | cur = cur->next; | ||
4152 | if ((*func) (tmp, data)) | ||
4153 | { | ||
4154 | ++errors; | ||
4155 | break; | ||
4156 | } | ||
4157 | } | ||
4158 | |||
4159 | LT_DLMUTEX_UNLOCK (); | ||
4160 | |||
4161 | return errors; | ||
4162 | } | ||
4163 | |||
4164 | lt_dlcaller_id | ||
4165 | lt_dlcaller_register () | ||
4166 | { | ||
4167 | static lt_dlcaller_id last_caller_id = 0; | ||
4168 | int result; | ||
4169 | |||
4170 | LT_DLMUTEX_LOCK (); | ||
4171 | result = ++last_caller_id; | ||
4172 | LT_DLMUTEX_UNLOCK (); | ||
4173 | |||
4174 | return result; | ||
4175 | } | ||
4176 | |||
4177 | lt_ptr | ||
4178 | lt_dlcaller_set_data (key, handle, data) | ||
4179 | lt_dlcaller_id key; | ||
4180 | lt_dlhandle handle; | ||
4181 | lt_ptr data; | ||
4182 | { | ||
4183 | int n_elements = 0; | ||
4184 | lt_ptr stale = (lt_ptr) 0; | ||
4185 | int i; | ||
4186 | |||
4187 | /* This needs to be locked so that the caller data can be updated | ||
4188 | simultaneously by different threads. */ | ||
4189 | LT_DLMUTEX_LOCK (); | ||
4190 | |||
4191 | if (handle->caller_data) | ||
4192 | while (handle->caller_data[n_elements].key) | ||
4193 | ++n_elements; | ||
4194 | |||
4195 | for (i = 0; i < n_elements; ++i) | ||
4196 | { | ||
4197 | if (handle->caller_data[i].key == key) | ||
4198 | { | ||
4199 | stale = handle->caller_data[i].data; | ||
4200 | break; | ||
4201 | } | ||
4202 | } | ||
4203 | |||
4204 | /* Ensure that there is enough room in this handle's caller_data | ||
4205 | array to accept a new element (and an empty end marker). */ | ||
4206 | if (i == n_elements) | ||
4207 | { | ||
4208 | lt_caller_data *temp | ||
4209 | = LT_DLREALLOC (lt_caller_data, handle->caller_data, 2+ n_elements); | ||
4210 | |||
4211 | if (!temp) | ||
4212 | { | ||
4213 | stale = 0; | ||
4214 | goto done; | ||
4215 | } | ||
4216 | |||
4217 | handle->caller_data = temp; | ||
4218 | |||
4219 | /* We only need this if we needed to allocate a new caller_data. */ | ||
4220 | handle->caller_data[i].key = key; | ||
4221 | handle->caller_data[1+ i].key = 0; | ||
4222 | } | ||
4223 | |||
4224 | handle->caller_data[i].data = data; | ||
4225 | |||
4226 | done: | ||
4227 | LT_DLMUTEX_UNLOCK (); | ||
4228 | |||
4229 | return stale; | ||
4230 | } | ||
4231 | |||
4232 | lt_ptr | ||
4233 | lt_dlcaller_get_data (key, handle) | ||
4234 | lt_dlcaller_id key; | ||
4235 | lt_dlhandle handle; | ||
4236 | { | ||
4237 | lt_ptr result = (lt_ptr) 0; | ||
4238 | |||
4239 | /* This needs to be locked so that the caller data isn't updated by | ||
4240 | another thread part way through this function. */ | ||
4241 | LT_DLMUTEX_LOCK (); | ||
4242 | |||
4243 | /* Locate the index of the element with a matching KEY. */ | ||
4244 | { | ||
4245 | int i; | ||
4246 | for (i = 0; handle->caller_data[i].key; ++i) | ||
4247 | { | ||
4248 | if (handle->caller_data[i].key == key) | ||
4249 | { | ||
4250 | result = handle->caller_data[i].data; | ||
4251 | break; | ||
4252 | } | ||
4253 | } | ||
4254 | } | ||
4255 | |||
4256 | LT_DLMUTEX_UNLOCK (); | ||
4257 | |||
4258 | return result; | ||
4259 | } | ||
4260 | |||
4261 | |||
4262 | |||
4263 | /* --- USER MODULE LOADER API --- */ | ||
4264 | |||
4265 | |||
4266 | int | ||
4267 | lt_dlloader_add (place, dlloader, loader_name) | ||
4268 | lt_dlloader *place; | ||
4269 | const struct lt_user_dlloader *dlloader; | ||
4270 | const char *loader_name; | ||
4271 | { | ||
4272 | int errors = 0; | ||
4273 | lt_dlloader *node = 0, *ptr = 0; | ||
4274 | |||
4275 | if ((dlloader == 0) /* diagnose null parameters */ | ||
4276 | || (dlloader->module_open == 0) | ||
4277 | || (dlloader->module_close == 0) | ||
4278 | || (dlloader->find_sym == 0)) | ||
4279 | { | ||
4280 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); | ||
4281 | return 1; | ||
4282 | } | ||
4283 | |||
4284 | /* Create a new dlloader node with copies of the user callbacks. */ | ||
4285 | node = LT_EMALLOC (lt_dlloader, 1); | ||
4286 | if (!node) | ||
4287 | return 1; | ||
4288 | |||
4289 | node->next = 0; | ||
4290 | node->loader_name = loader_name; | ||
4291 | node->sym_prefix = dlloader->sym_prefix; | ||
4292 | node->dlloader_exit = dlloader->dlloader_exit; | ||
4293 | node->module_open = dlloader->module_open; | ||
4294 | node->module_close = dlloader->module_close; | ||
4295 | node->find_sym = dlloader->find_sym; | ||
4296 | node->dlloader_data = dlloader->dlloader_data; | ||
4297 | |||
4298 | LT_DLMUTEX_LOCK (); | ||
4299 | if (!loaders) | ||
4300 | { | ||
4301 | /* If there are no loaders, NODE becomes the list! */ | ||
4302 | loaders = node; | ||
4303 | } | ||
4304 | else if (!place) | ||
4305 | { | ||
4306 | /* If PLACE is not set, add NODE to the end of the | ||
4307 | LOADERS list. */ | ||
4308 | for (ptr = loaders; ptr->next; ptr = ptr->next) | ||
4309 | { | ||
4310 | /*NOWORK*/; | ||
4311 | } | ||
4312 | |||
4313 | ptr->next = node; | ||
4314 | } | ||
4315 | else if (loaders == place) | ||
4316 | { | ||
4317 | /* If PLACE is the first loader, NODE goes first. */ | ||
4318 | node->next = place; | ||
4319 | loaders = node; | ||
4320 | } | ||
4321 | else | ||
4322 | { | ||
4323 | /* Find the node immediately preceding PLACE. */ | ||
4324 | for (ptr = loaders; ptr->next != place; ptr = ptr->next) | ||
4325 | { | ||
4326 | /*NOWORK*/; | ||
4327 | } | ||
4328 | |||
4329 | if (ptr->next != place) | ||
4330 | { | ||
4331 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); | ||
4332 | ++errors; | ||
4333 | } | ||
4334 | else | ||
4335 | { | ||
4336 | /* Insert NODE between PTR and PLACE. */ | ||
4337 | node->next = place; | ||
4338 | ptr->next = node; | ||
4339 | } | ||
4340 | } | ||
4341 | |||
4342 | LT_DLMUTEX_UNLOCK (); | ||
4343 | |||
4344 | return errors; | ||
4345 | } | ||
4346 | |||
4347 | int | ||
4348 | lt_dlloader_remove (loader_name) | ||
4349 | const char *loader_name; | ||
4350 | { | ||
4351 | lt_dlloader *place = lt_dlloader_find (loader_name); | ||
4352 | lt_dlhandle handle; | ||
4353 | int errors = 0; | ||
4354 | |||
4355 | if (!place) | ||
4356 | { | ||
4357 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); | ||
4358 | return 1; | ||
4359 | } | ||
4360 | |||
4361 | LT_DLMUTEX_LOCK (); | ||
4362 | |||
4363 | /* Fail if there are any open modules which use this loader. */ | ||
4364 | for (handle = handles; handle; handle = handle->next) | ||
4365 | { | ||
4366 | if (handle->loader == place) | ||
4367 | { | ||
4368 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (REMOVE_LOADER)); | ||
4369 | ++errors; | ||
4370 | goto done; | ||
4371 | } | ||
4372 | } | ||
4373 | |||
4374 | if (place == loaders) | ||
4375 | { | ||
4376 | /* PLACE is the first loader in the list. */ | ||
4377 | loaders = loaders->next; | ||
4378 | } | ||
4379 | else | ||
4380 | { | ||
4381 | /* Find the loader before the one being removed. */ | ||
4382 | lt_dlloader *prev; | ||
4383 | for (prev = loaders; prev->next; prev = prev->next) | ||
4384 | { | ||
4385 | if (!strcmp (prev->next->loader_name, loader_name)) | ||
4386 | { | ||
4387 | break; | ||
4388 | } | ||
4389 | } | ||
4390 | |||
4391 | place = prev->next; | ||
4392 | prev->next = prev->next->next; | ||
4393 | } | ||
4394 | |||
4395 | if (place->dlloader_exit) | ||
4396 | { | ||
4397 | errors = place->dlloader_exit (place->dlloader_data); | ||
4398 | } | ||
4399 | |||
4400 | LT_DLFREE (place); | ||
4401 | |||
4402 | done: | ||
4403 | LT_DLMUTEX_UNLOCK (); | ||
4404 | |||
4405 | return errors; | ||
4406 | } | ||
4407 | |||
4408 | lt_dlloader * | ||
4409 | lt_dlloader_next (place) | ||
4410 | lt_dlloader *place; | ||
4411 | { | ||
4412 | lt_dlloader *next; | ||
4413 | |||
4414 | LT_DLMUTEX_LOCK (); | ||
4415 | next = place ? place->next : loaders; | ||
4416 | LT_DLMUTEX_UNLOCK (); | ||
4417 | |||
4418 | return next; | ||
4419 | } | ||
4420 | |||
4421 | const char * | ||
4422 | lt_dlloader_name (place) | ||
4423 | lt_dlloader *place; | ||
4424 | { | ||
4425 | const char *name = 0; | ||
4426 | |||
4427 | if (place) | ||
4428 | { | ||
4429 | LT_DLMUTEX_LOCK (); | ||
4430 | name = place ? place->loader_name : 0; | ||
4431 | LT_DLMUTEX_UNLOCK (); | ||
4432 | } | ||
4433 | else | ||
4434 | { | ||
4435 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); | ||
4436 | } | ||
4437 | |||
4438 | return name; | ||
4439 | } | ||
4440 | |||
4441 | lt_user_data * | ||
4442 | lt_dlloader_data (place) | ||
4443 | lt_dlloader *place; | ||
4444 | { | ||
4445 | lt_user_data *data = 0; | ||
4446 | |||
4447 | if (place) | ||
4448 | { | ||
4449 | LT_DLMUTEX_LOCK (); | ||
4450 | data = place ? &(place->dlloader_data) : 0; | ||
4451 | LT_DLMUTEX_UNLOCK (); | ||
4452 | } | ||
4453 | else | ||
4454 | { | ||
4455 | LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); | ||
4456 | } | ||
4457 | |||
4458 | return data; | ||
4459 | } | ||
4460 | |||
4461 | lt_dlloader * | ||
4462 | lt_dlloader_find (loader_name) | ||
4463 | const char *loader_name; | ||
4464 | { | ||
4465 | lt_dlloader *place = 0; | ||
4466 | |||
4467 | LT_DLMUTEX_LOCK (); | ||
4468 | for (place = loaders; place; place = place->next) | ||
4469 | { | ||
4470 | if (strcmp (place->loader_name, loader_name) == 0) | ||
4471 | { | ||
4472 | break; | ||
4473 | } | ||
4474 | } | ||
4475 | LT_DLMUTEX_UNLOCK (); | ||
4476 | |||
4477 | return place; | ||
4478 | } | ||
diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h new file mode 100644 index 00000000..995d4038 --- /dev/null +++ b/libltdl/ltdl.h | |||
@@ -0,0 +1,366 @@ | |||
1 | /* ltdl.h -- generic dlopen functions | ||
2 | Copyright (C) 1998-2000 Free Software Foundation, Inc. | ||
3 | Originally by Thomas Tanner <tanner@ffii.org> | ||
4 | This file is part of GNU Libtool. | ||
5 | |||
6 | This library is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU Lesser General Public | ||
8 | License as published by the Free Software Foundation; either | ||
9 | version 2 of the License, or (at your option) any later version. | ||
10 | |||
11 | As a special exception to the GNU Lesser General Public License, | ||
12 | if you distribute this file as part of a program or library that | ||
13 | is built using GNU libtool, you may include it under the same | ||
14 | distribution terms that you use for the rest of that program. | ||
15 | |||
16 | This library is distributed in the hope that it will be useful, | ||
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
19 | Lesser General Public License for more details. | ||
20 | |||
21 | You should have received a copy of the GNU Lesser General Public | ||
22 | License along with this library; if not, write to the Free | ||
23 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
24 | 02111-1307 USA | ||
25 | */ | ||
26 | |||
27 | /* Only include this header file once. */ | ||
28 | #ifndef LTDL_H | ||
29 | #define LTDL_H 1 | ||
30 | |||
31 | #include <sys/types.h> /* for size_t declaration */ | ||
32 | |||
33 | |||
34 | /* --- MACROS FOR PORTABILITY --- */ | ||
35 | |||
36 | |||
37 | /* Saves on those hard to debug '\0' typos.... */ | ||
38 | #define LT_EOS_CHAR '\0' | ||
39 | |||
40 | /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, | ||
41 | so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at | ||
42 | the end of C declarations. */ | ||
43 | #ifdef __cplusplus | ||
44 | # define LT_BEGIN_C_DECLS extern "C" { | ||
45 | # define LT_END_C_DECLS } | ||
46 | #else | ||
47 | # define LT_BEGIN_C_DECLS /* empty */ | ||
48 | # define LT_END_C_DECLS /* empty */ | ||
49 | #endif | ||
50 | |||
51 | LT_BEGIN_C_DECLS | ||
52 | |||
53 | |||
54 | /* LT_PARAMS is a macro used to wrap function prototypes, so that compilers | ||
55 | that don't understand ANSI C prototypes still work, and ANSI C | ||
56 | compilers can issue warnings about type mismatches. */ | ||
57 | #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) | ||
58 | # define LT_PARAMS(protos) protos | ||
59 | # define lt_ptr void* | ||
60 | #else | ||
61 | # define LT_PARAMS(protos) () | ||
62 | # define lt_ptr char* | ||
63 | #endif | ||
64 | |||
65 | /* LT_STMT_START/END are used to create macros which expand to a | ||
66 | a single compound statement in a portable way. */ | ||
67 | #if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) | ||
68 | # define LT_STMT_START (void)( | ||
69 | # define LT_STMT_END ) | ||
70 | #else | ||
71 | # if (defined (sun) || defined (__sun__)) | ||
72 | # define LT_STMT_START if (1) | ||
73 | # define LT_STMT_END else (void)0 | ||
74 | # else | ||
75 | # define LT_STMT_START do | ||
76 | # define LT_STMT_END while (0) | ||
77 | # endif | ||
78 | #endif | ||
79 | |||
80 | /* LT_CONC creates a new concatenated symbol for the compiler | ||
81 | in a portable way. */ | ||
82 | #if defined(__STDC__) || defined(__cplusplus) || defined(_MSC_VER) | ||
83 | # define LT_CONC(s,t) s##t | ||
84 | #else | ||
85 | # define LT_CONC(s,t) s/**/t | ||
86 | #endif | ||
87 | |||
88 | /* LT_STRLEN can be used safely on NULL pointers. */ | ||
89 | #define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0) | ||
90 | |||
91 | |||
92 | |||
93 | /* --- WINDOWS SUPPORT --- */ | ||
94 | |||
95 | |||
96 | /* Canonicalise Windows and Cygwin recognition macros. */ | ||
97 | #ifdef __CYGWIN32__ | ||
98 | # ifndef __CYGWIN__ | ||
99 | # define __CYGWIN__ __CYGWIN32__ | ||
100 | # endif | ||
101 | #endif | ||
102 | #if defined(_WIN32) || defined(WIN32) | ||
103 | # ifndef __WINDOWS__ | ||
104 | # ifdef _WIN32 | ||
105 | # define __WINDOWS__ _WIN32 | ||
106 | # else | ||
107 | # ifdef WIN32 | ||
108 | # define __WINDOWS__ WIN32 | ||
109 | # endif | ||
110 | # endif | ||
111 | # endif | ||
112 | #endif | ||
113 | |||
114 | |||
115 | #ifdef __WINDOWS__ | ||
116 | # ifndef __CYGWIN__ | ||
117 | /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory | ||
118 | separator when it is set. */ | ||
119 | # define LT_DIRSEP_CHAR '\\' | ||
120 | # define LT_PATHSEP_CHAR ';' | ||
121 | # endif | ||
122 | #endif | ||
123 | #ifndef LT_PATHSEP_CHAR | ||
124 | # define LT_PATHSEP_CHAR ':' | ||
125 | #endif | ||
126 | |||
127 | /* DLL building support on win32 hosts; mostly to workaround their | ||
128 | ridiculous implementation of data symbol exporting. */ | ||
129 | #ifndef LT_SCOPE | ||
130 | # ifdef __WINDOWS__ | ||
131 | # ifdef DLL_EXPORT /* defined by libtool (if required) */ | ||
132 | # define LT_SCOPE __declspec(dllexport) | ||
133 | # endif | ||
134 | # ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */ | ||
135 | # define LT_SCOPE extern __declspec(dllimport) | ||
136 | # endif | ||
137 | # endif | ||
138 | # ifndef LT_SCOPE /* static linking or !__WINDOWS__ */ | ||
139 | # define LT_SCOPE extern | ||
140 | # endif | ||
141 | #endif | ||
142 | |||
143 | |||
144 | #if defined(_MSC_VER) /* Visual Studio */ | ||
145 | # define R_OK 4 | ||
146 | #endif | ||
147 | |||
148 | |||
149 | |||
150 | /* --- DYNAMIC MODULE LOADING API --- */ | ||
151 | |||
152 | |||
153 | typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */ | ||
154 | |||
155 | /* Initialisation and finalisation functions for libltdl. */ | ||
156 | LT_SCOPE int lt_dlinit LT_PARAMS((void)); | ||
157 | LT_SCOPE int lt_dlexit LT_PARAMS((void)); | ||
158 | |||
159 | /* Module search path manipulation. */ | ||
160 | LT_SCOPE int lt_dladdsearchdir LT_PARAMS((const char *search_dir)); | ||
161 | LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS((const char *before, | ||
162 | const char *search_dir)); | ||
163 | LT_SCOPE int lt_dlsetsearchpath LT_PARAMS((const char *search_path)); | ||
164 | LT_SCOPE const char *lt_dlgetsearchpath LT_PARAMS((void)); | ||
165 | LT_SCOPE int lt_dlforeachfile LT_PARAMS(( | ||
166 | const char *search_path, | ||
167 | int (*func) (const char *filename, lt_ptr data), | ||
168 | lt_ptr data)); | ||
169 | |||
170 | /* Portable libltdl versions of the system dlopen() API. */ | ||
171 | LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS((const char *filename)); | ||
172 | LT_SCOPE lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename)); | ||
173 | LT_SCOPE lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle, | ||
174 | const char *name)); | ||
175 | LT_SCOPE const char *lt_dlerror LT_PARAMS((void)); | ||
176 | LT_SCOPE int lt_dlclose LT_PARAMS((lt_dlhandle handle)); | ||
177 | |||
178 | /* Module residency management. */ | ||
179 | LT_SCOPE int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle)); | ||
180 | LT_SCOPE int lt_dlisresident LT_PARAMS((lt_dlhandle handle)); | ||
181 | |||
182 | |||
183 | |||
184 | |||
185 | /* --- MUTEX LOCKING --- */ | ||
186 | |||
187 | |||
188 | typedef void lt_dlmutex_lock LT_PARAMS((void)); | ||
189 | typedef void lt_dlmutex_unlock LT_PARAMS((void)); | ||
190 | typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg)); | ||
191 | typedef const char *lt_dlmutex_geterror LT_PARAMS((void)); | ||
192 | |||
193 | LT_SCOPE int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock, | ||
194 | lt_dlmutex_unlock *unlock, | ||
195 | lt_dlmutex_seterror *seterror, | ||
196 | lt_dlmutex_geterror *geterror)); | ||
197 | |||
198 | |||
199 | |||
200 | |||
201 | /* --- MEMORY HANDLING --- */ | ||
202 | |||
203 | |||
204 | /* By default, the realloc function pointer is set to our internal | ||
205 | realloc implementation which iself uses lt_dlmalloc and lt_dlfree. | ||
206 | libltdl relies on a featureful realloc, but if you are sure yours | ||
207 | has the right semantics then you can assign it directly. Generally, | ||
208 | it is safe to assign just a malloc() and a free() function. */ | ||
209 | LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)); | ||
210 | LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)); | ||
211 | LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)); | ||
212 | |||
213 | |||
214 | |||
215 | |||
216 | /* --- PRELOADED MODULE SUPPORT --- */ | ||
217 | |||
218 | |||
219 | /* A preopened symbol. Arrays of this type comprise the exported | ||
220 | symbols for a dlpreopened module. */ | ||
221 | typedef struct { | ||
222 | const char *name; | ||
223 | lt_ptr address; | ||
224 | } lt_dlsymlist; | ||
225 | |||
226 | LT_SCOPE int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded)); | ||
227 | LT_SCOPE int lt_dlpreload_default | ||
228 | LT_PARAMS((const lt_dlsymlist *preloaded)); | ||
229 | |||
230 | #define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \ | ||
231 | extern const lt_dlsymlist lt_preloaded_symbols[]; \ | ||
232 | lt_dlpreload_default(lt_preloaded_symbols); \ | ||
233 | }LT_STMT_END | ||
234 | |||
235 | |||
236 | |||
237 | |||
238 | /* --- MODULE INFORMATION --- */ | ||
239 | |||
240 | |||
241 | /* Read only information pertaining to a loaded module. */ | ||
242 | typedef struct { | ||
243 | char *filename; /* file name */ | ||
244 | char *name; /* module name */ | ||
245 | int ref_count; /* number of times lt_dlopened minus | ||
246 | number of times lt_dlclosed. */ | ||
247 | } lt_dlinfo; | ||
248 | |||
249 | LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); | ||
250 | LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)); | ||
251 | LT_SCOPE int lt_dlforeach LT_PARAMS(( | ||
252 | int (*func) (lt_dlhandle handle, lt_ptr data), | ||
253 | lt_ptr data)); | ||
254 | |||
255 | /* Associating user data with loaded modules. */ | ||
256 | typedef unsigned lt_dlcaller_id; | ||
257 | |||
258 | LT_SCOPE lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void)); | ||
259 | LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key, | ||
260 | lt_dlhandle handle, | ||
261 | lt_ptr data)); | ||
262 | LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key, | ||
263 | lt_dlhandle handle)); | ||
264 | |||
265 | |||
266 | |||
267 | /* --- USER MODULE LOADER API --- */ | ||
268 | |||
269 | |||
270 | typedef struct lt_dlloader lt_dlloader; | ||
271 | typedef lt_ptr lt_user_data; | ||
272 | typedef lt_ptr lt_module; | ||
273 | |||
274 | /* Function pointer types for creating user defined module loaders. */ | ||
275 | typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data, | ||
276 | const char *filename)); | ||
277 | typedef int lt_module_close LT_PARAMS((lt_user_data loader_data, | ||
278 | lt_module handle)); | ||
279 | typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data, | ||
280 | lt_module handle, | ||
281 | const char *symbol)); | ||
282 | typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data)); | ||
283 | |||
284 | struct lt_user_dlloader { | ||
285 | const char *sym_prefix; | ||
286 | lt_module_open *module_open; | ||
287 | lt_module_close *module_close; | ||
288 | lt_find_sym *find_sym; | ||
289 | lt_dlloader_exit *dlloader_exit; | ||
290 | lt_user_data dlloader_data; | ||
291 | }; | ||
292 | |||
293 | LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place)); | ||
294 | LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS(( | ||
295 | const char *loader_name)); | ||
296 | LT_SCOPE const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place)); | ||
297 | LT_SCOPE lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place)); | ||
298 | LT_SCOPE int lt_dlloader_add LT_PARAMS((lt_dlloader *place, | ||
299 | const struct lt_user_dlloader *dlloader, | ||
300 | const char *loader_name)); | ||
301 | LT_SCOPE int lt_dlloader_remove LT_PARAMS(( | ||
302 | const char *loader_name)); | ||
303 | |||
304 | |||
305 | |||
306 | /* --- ERROR MESSAGE HANDLING --- */ | ||
307 | |||
308 | |||
309 | /* Defining error strings alongside their symbolic names in a macro in | ||
310 | this way allows us to expand the macro in different contexts with | ||
311 | confidence that the enumeration of symbolic names will map correctly | ||
312 | onto the table of error strings. */ | ||
313 | #define lt_dlerror_table \ | ||
314 | LT_ERROR(UNKNOWN, "unknown error") \ | ||
315 | LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \ | ||
316 | LT_ERROR(INVALID_LOADER, "invalid loader") \ | ||
317 | LT_ERROR(INIT_LOADER, "loader initialization failed") \ | ||
318 | LT_ERROR(REMOVE_LOADER, "loader removal failed") \ | ||
319 | LT_ERROR(FILE_NOT_FOUND, "file not found") \ | ||
320 | LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \ | ||
321 | LT_ERROR(NO_SYMBOLS, "no symbols defined") \ | ||
322 | LT_ERROR(CANNOT_OPEN, "can't open the module") \ | ||
323 | LT_ERROR(CANNOT_CLOSE, "can't close the module") \ | ||
324 | LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \ | ||
325 | LT_ERROR(NO_MEMORY, "not enough memory") \ | ||
326 | LT_ERROR(INVALID_HANDLE, "invalid module handle") \ | ||
327 | LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \ | ||
328 | LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \ | ||
329 | LT_ERROR(SHUTDOWN, "library already shutdown") \ | ||
330 | LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \ | ||
331 | LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \ | ||
332 | LT_ERROR(INVALID_POSITION, "invalid search path insert position") | ||
333 | |||
334 | /* Enumerate the symbolic error names. */ | ||
335 | enum { | ||
336 | #define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name), | ||
337 | lt_dlerror_table | ||
338 | #undef LT_ERROR | ||
339 | |||
340 | LT_ERROR_MAX | ||
341 | }; | ||
342 | |||
343 | /* These functions are only useful from inside custom module loaders. */ | ||
344 | LT_SCOPE int lt_dladderror LT_PARAMS((const char *diagnostic)); | ||
345 | LT_SCOPE int lt_dlseterror LT_PARAMS((int errorcode)); | ||
346 | |||
347 | |||
348 | |||
349 | |||
350 | /* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */ | ||
351 | |||
352 | |||
353 | #ifdef LT_NON_POSIX_NAMESPACE | ||
354 | # define lt_ptr_t lt_ptr | ||
355 | # define lt_module_t lt_module | ||
356 | # define lt_module_open_t lt_module_open | ||
357 | # define lt_module_close_t lt_module_close | ||
358 | # define lt_find_sym_t lt_find_sym | ||
359 | # define lt_dlloader_exit_t lt_dlloader_exit | ||
360 | # define lt_dlloader_t lt_dlloader | ||
361 | # define lt_dlloader_data_t lt_user_data | ||
362 | #endif | ||
363 | |||
364 | LT_END_C_DECLS | ||
365 | |||
366 | #endif /* !LTDL_H */ | ||
diff --git a/libltdl/ltmain.sh b/libltdl/ltmain.sh new file mode 100644 index 00000000..1a224ac2 --- /dev/null +++ b/libltdl/ltmain.sh | |||
@@ -0,0 +1,6426 @@ | |||
1 | # ltmain.sh - Provide generalized library-building support services. | ||
2 | # NOTE: Changing this file will not affect anything until you rerun configure. | ||
3 | # | ||
4 | # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 | ||
5 | # Free Software Foundation, Inc. | ||
6 | # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | ||
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 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, write to the Free Software | ||
20 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
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 | basename="s,^.*/,,g" | ||
28 | |||
29 | # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh | ||
30 | # is ksh but when the shell is invoked as "sh" and the current value of | ||
31 | # the _XPG environment variable is not equal to 1 (one), the special | ||
32 | # positional parameter $0, within a function call, is the name of the | ||
33 | # function. | ||
34 | progpath="$0" | ||
35 | |||
36 | # The name of this program: | ||
37 | progname=`echo "$progpath" | $SED $basename` | ||
38 | modename="$progname" | ||
39 | |||
40 | # Global variables: | ||
41 | EXIT_SUCCESS=0 | ||
42 | EXIT_FAILURE=1 | ||
43 | |||
44 | PROGRAM=ltmain.sh | ||
45 | PACKAGE=libtool | ||
46 | VERSION=1.5.6 | ||
47 | TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 224 $" | ||
48 | |||
49 | |||
50 | # Check that we have a working $echo. | ||
51 | if test "X$1" = X--no-reexec; then | ||
52 | # Discard the --no-reexec flag, and continue. | ||
53 | shift | ||
54 | elif test "X$1" = X--fallback-echo; then | ||
55 | # Avoid inline document here, it may be left over | ||
56 | : | ||
57 | elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then | ||
58 | # Yippee, $echo works! | ||
59 | : | ||
60 | else | ||
61 | # Restart under the correct shell, and then maybe $echo will work. | ||
62 | exec $SHELL "$progpath" --no-reexec ${1+"$@"} | ||
63 | fi | ||
64 | |||
65 | if test "X$1" = X--fallback-echo; then | ||
66 | # used as fallback echo | ||
67 | shift | ||
68 | cat <<EOF | ||
69 | $* | ||
70 | EOF | ||
71 | exit $EXIT_SUCCESS | ||
72 | fi | ||
73 | |||
74 | default_mode= | ||
75 | help="Try \`$progname --help' for more information." | ||
76 | magic="%%%MAGIC variable%%%" | ||
77 | mkdir="mkdir" | ||
78 | mv="mv -f" | ||
79 | rm="rm -f" | ||
80 | |||
81 | # Sed substitution that helps us do robust quoting. It backslashifies | ||
82 | # metacharacters that are still active within double-quoted strings. | ||
83 | Xsed="${SED}"' -e 1s/^X//' | ||
84 | sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g' | ||
85 | # test EBCDIC or ASCII | ||
86 | case `echo A|tr A '\301'` in | ||
87 | A) # EBCDIC based system | ||
88 | SP2NL="tr '\100' '\n'" | ||
89 | NL2SP="tr '\r\n' '\100\100'" | ||
90 | ;; | ||
91 | *) # Assume ASCII based system | ||
92 | SP2NL="tr '\040' '\012'" | ||
93 | NL2SP="tr '\015\012' '\040\040'" | ||
94 | ;; | ||
95 | esac | ||
96 | |||
97 | # NLS nuisances. | ||
98 | # Only set LANG and LC_ALL to C if already set. | ||
99 | # These must not be set unconditionally because not all systems understand | ||
100 | # e.g. LANG=C (notably SCO). | ||
101 | # We save the old values to restore during execute mode. | ||
102 | if test "${LC_ALL+set}" = set; then | ||
103 | save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL | ||
104 | fi | ||
105 | if test "${LANG+set}" = set; then | ||
106 | save_LANG="$LANG"; LANG=C; export LANG | ||
107 | fi | ||
108 | |||
109 | # Make sure IFS has a sensible default | ||
110 | : ${IFS=" | ||
111 | "} | ||
112 | |||
113 | if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then | ||
114 | $echo "$modename: not configured to build any kind of library" 1>&2 | ||
115 | $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 | ||
116 | exit $EXIT_FAILURE | ||
117 | fi | ||
118 | |||
119 | # Global variables. | ||
120 | mode=$default_mode | ||
121 | nonopt= | ||
122 | prev= | ||
123 | prevopt= | ||
124 | run= | ||
125 | show="$echo" | ||
126 | show_help= | ||
127 | execute_dlfiles= | ||
128 | lo2o="s/\\.lo\$/.${objext}/" | ||
129 | o2lo="s/\\.${objext}\$/.lo/" | ||
130 | |||
131 | ##################################### | ||
132 | # Shell function definitions: | ||
133 | # This seems to be the best place for them | ||
134 | |||
135 | # func_win32_libid arg | ||
136 | # return the library type of file 'arg' | ||
137 | # | ||
138 | # Need a lot of goo to handle *both* DLLs and import libs | ||
139 | # Has to be a shell function in order to 'eat' the argument | ||
140 | # that is supplied when $file_magic_command is called. | ||
141 | func_win32_libid () { | ||
142 | win32_libid_type="unknown" | ||
143 | win32_fileres=`file -L $1 2>/dev/null` | ||
144 | case $win32_fileres in | ||
145 | *ar\ archive\ import\ library*) # definitely import | ||
146 | win32_libid_type="x86 archive import" | ||
147 | ;; | ||
148 | *ar\ archive*) # could be an import, or static | ||
149 | if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ | ||
150 | $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then | ||
151 | win32_nmres=`eval $NM -f posix -A $1 | \ | ||
152 | sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'` | ||
153 | if test "X$win32_nmres" = "Ximport" ; then | ||
154 | win32_libid_type="x86 archive import" | ||
155 | else | ||
156 | win32_libid_type="x86 archive static" | ||
157 | fi | ||
158 | fi | ||
159 | ;; | ||
160 | *DLL*) | ||
161 | win32_libid_type="x86 DLL" | ||
162 | ;; | ||
163 | *executable*) # but shell scripts are "executable" too... | ||
164 | case $win32_fileres in | ||
165 | *MS\ Windows\ PE\ Intel*) | ||
166 | win32_libid_type="x86 DLL" | ||
167 | ;; | ||
168 | esac | ||
169 | ;; | ||
170 | esac | ||
171 | $echo $win32_libid_type | ||
172 | } | ||
173 | |||
174 | |||
175 | # func_infer_tag arg | ||
176 | # Infer tagged configuration to use if any are available and | ||
177 | # if one wasn't chosen via the "--tag" command line option. | ||
178 | # Only attempt this if the compiler in the base compile | ||
179 | # command doesn't match the default compiler. | ||
180 | # arg is usually of the form 'gcc ...' | ||
181 | func_infer_tag () { | ||
182 | if test -n "$available_tags" && test -z "$tagname"; then | ||
183 | CC_quoted= | ||
184 | for arg in $CC; do | ||
185 | case $arg in | ||
186 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
187 | arg="\"$arg\"" | ||
188 | ;; | ||
189 | esac | ||
190 | CC_quoted="$CC_quoted $arg" | ||
191 | done | ||
192 | case $@ in | ||
193 | # Blanks in the command may have been stripped by the calling shell, | ||
194 | # but not from the CC environment variable when configure was run. | ||
195 | " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; | ||
196 | # Blanks at the start of $base_compile will cause this to fail | ||
197 | # if we don't check for them as well. | ||
198 | *) | ||
199 | for z in $available_tags; do | ||
200 | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then | ||
201 | # Evaluate the configuration. | ||
202 | eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" | ||
203 | CC_quoted= | ||
204 | for arg in $CC; do | ||
205 | # Double-quote args containing other shell metacharacters. | ||
206 | case $arg in | ||
207 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
208 | arg="\"$arg\"" | ||
209 | ;; | ||
210 | esac | ||
211 | CC_quoted="$CC_quoted $arg" | ||
212 | done | ||
213 | case "$@ " in | ||
214 | " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) | ||
215 | # The compiler in the base compile command matches | ||
216 | # the one in the tagged configuration. | ||
217 | # Assume this is the tagged configuration we want. | ||
218 | tagname=$z | ||
219 | break | ||
220 | ;; | ||
221 | esac | ||
222 | fi | ||
223 | done | ||
224 | # If $tagname still isn't set, then no tagged configuration | ||
225 | # was found and let the user know that the "--tag" command | ||
226 | # line option must be used. | ||
227 | if test -z "$tagname"; then | ||
228 | $echo "$modename: unable to infer tagged configuration" | ||
229 | $echo "$modename: specify a tag with \`--tag'" 1>&2 | ||
230 | exit $EXIT_FAILURE | ||
231 | # else | ||
232 | # $echo "$modename: using $tagname tagged configuration" | ||
233 | fi | ||
234 | ;; | ||
235 | esac | ||
236 | fi | ||
237 | } | ||
238 | # End of Shell function definitions | ||
239 | ##################################### | ||
240 | |||
241 | # Darwin sucks | ||
242 | eval std_shrext=\"$shrext_cmds\" | ||
243 | |||
244 | # Parse our command line options once, thoroughly. | ||
245 | while test "$#" -gt 0 | ||
246 | do | ||
247 | arg="$1" | ||
248 | shift | ||
249 | |||
250 | case $arg in | ||
251 | -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; | ||
252 | *) optarg= ;; | ||
253 | esac | ||
254 | |||
255 | # If the previous option needs an argument, assign it. | ||
256 | if test -n "$prev"; then | ||
257 | case $prev in | ||
258 | execute_dlfiles) | ||
259 | execute_dlfiles="$execute_dlfiles $arg" | ||
260 | ;; | ||
261 | tag) | ||
262 | tagname="$arg" | ||
263 | preserve_args="${preserve_args}=$arg" | ||
264 | |||
265 | # Check whether tagname contains only valid characters | ||
266 | case $tagname in | ||
267 | *[!-_A-Za-z0-9,/]*) | ||
268 | $echo "$progname: invalid tag name: $tagname" 1>&2 | ||
269 | exit $EXIT_FAILURE | ||
270 | ;; | ||
271 | esac | ||
272 | |||
273 | case $tagname in | ||
274 | CC) | ||
275 | # Don't test for the "default" C tag, as we know, it's there, but | ||
276 | # not specially marked. | ||
277 | ;; | ||
278 | *) | ||
279 | if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then | ||
280 | taglist="$taglist $tagname" | ||
281 | # Evaluate the configuration. | ||
282 | eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" | ||
283 | else | ||
284 | $echo "$progname: ignoring unknown tag $tagname" 1>&2 | ||
285 | fi | ||
286 | ;; | ||
287 | esac | ||
288 | ;; | ||
289 | *) | ||
290 | eval "$prev=\$arg" | ||
291 | ;; | ||
292 | esac | ||
293 | |||
294 | prev= | ||
295 | prevopt= | ||
296 | continue | ||
297 | fi | ||
298 | |||
299 | # Have we seen a non-optional argument yet? | ||
300 | case $arg in | ||
301 | --help) | ||
302 | show_help=yes | ||
303 | ;; | ||
304 | |||
305 | --version) | ||
306 | $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" | ||
307 | $echo | ||
308 | $echo "Copyright (C) 2003 Free Software Foundation, Inc." | ||
309 | $echo "This is free software; see the source for copying conditions. There is NO" | ||
310 | $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." | ||
311 | exit $EXIT_SUCCESS | ||
312 | ;; | ||
313 | |||
314 | --config) | ||
315 | ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath | ||
316 | # Now print the configurations for the tags. | ||
317 | for tagname in $taglist; do | ||
318 | ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" | ||
319 | done | ||
320 | exit $EXIT_SUCCESS | ||
321 | ;; | ||
322 | |||
323 | --debug) | ||
324 | $echo "$progname: enabling shell trace mode" | ||
325 | set -x | ||
326 | preserve_args="$preserve_args $arg" | ||
327 | ;; | ||
328 | |||
329 | --dry-run | -n) | ||
330 | run=: | ||
331 | ;; | ||
332 | |||
333 | --features) | ||
334 | $echo "host: $host" | ||
335 | if test "$build_libtool_libs" = yes; then | ||
336 | $echo "enable shared libraries" | ||
337 | else | ||
338 | $echo "disable shared libraries" | ||
339 | fi | ||
340 | if test "$build_old_libs" = yes; then | ||
341 | $echo "enable static libraries" | ||
342 | else | ||
343 | $echo "disable static libraries" | ||
344 | fi | ||
345 | exit $EXIT_SUCCESS | ||
346 | ;; | ||
347 | |||
348 | --finish) mode="finish" ;; | ||
349 | |||
350 | --mode) prevopt="--mode" prev=mode ;; | ||
351 | --mode=*) mode="$optarg" ;; | ||
352 | |||
353 | --preserve-dup-deps) duplicate_deps="yes" ;; | ||
354 | |||
355 | --quiet | --silent) | ||
356 | show=: | ||
357 | preserve_args="$preserve_args $arg" | ||
358 | ;; | ||
359 | |||
360 | --tag) prevopt="--tag" prev=tag ;; | ||
361 | --tag=*) | ||
362 | set tag "$optarg" ${1+"$@"} | ||
363 | shift | ||
364 | prev=tag | ||
365 | preserve_args="$preserve_args --tag" | ||
366 | ;; | ||
367 | |||
368 | -dlopen) | ||
369 | prevopt="-dlopen" | ||
370 | prev=execute_dlfiles | ||
371 | ;; | ||
372 | |||
373 | -*) | ||
374 | $echo "$modename: unrecognized option \`$arg'" 1>&2 | ||
375 | $echo "$help" 1>&2 | ||
376 | exit $EXIT_FAILURE | ||
377 | ;; | ||
378 | |||
379 | *) | ||
380 | nonopt="$arg" | ||
381 | break | ||
382 | ;; | ||
383 | esac | ||
384 | done | ||
385 | |||
386 | if test -n "$prevopt"; then | ||
387 | $echo "$modename: option \`$prevopt' requires an argument" 1>&2 | ||
388 | $echo "$help" 1>&2 | ||
389 | exit $EXIT_FAILURE | ||
390 | fi | ||
391 | |||
392 | # If this variable is set in any of the actions, the command in it | ||
393 | # will be execed at the end. This prevents here-documents from being | ||
394 | # left over by shells. | ||
395 | exec_cmd= | ||
396 | |||
397 | if test -z "$show_help"; then | ||
398 | |||
399 | # Infer the operation mode. | ||
400 | if test -z "$mode"; then | ||
401 | $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 | ||
402 | $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2 | ||
403 | case $nonopt in | ||
404 | *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) | ||
405 | mode=link | ||
406 | for arg | ||
407 | do | ||
408 | case $arg in | ||
409 | -c) | ||
410 | mode=compile | ||
411 | break | ||
412 | ;; | ||
413 | esac | ||
414 | done | ||
415 | ;; | ||
416 | *db | *dbx | *strace | *truss) | ||
417 | mode=execute | ||
418 | ;; | ||
419 | *install*|cp|mv) | ||
420 | mode=install | ||
421 | ;; | ||
422 | *rm) | ||
423 | mode=uninstall | ||
424 | ;; | ||
425 | *) | ||
426 | # If we have no mode, but dlfiles were specified, then do execute mode. | ||
427 | test -n "$execute_dlfiles" && mode=execute | ||
428 | |||
429 | # Just use the default operation mode. | ||
430 | if test -z "$mode"; then | ||
431 | if test -n "$nonopt"; then | ||
432 | $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 | ||
433 | else | ||
434 | $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 | ||
435 | fi | ||
436 | fi | ||
437 | ;; | ||
438 | esac | ||
439 | fi | ||
440 | |||
441 | # Only execute mode is allowed to have -dlopen flags. | ||
442 | if test -n "$execute_dlfiles" && test "$mode" != execute; then | ||
443 | $echo "$modename: unrecognized option \`-dlopen'" 1>&2 | ||
444 | $echo "$help" 1>&2 | ||
445 | exit $EXIT_FAILURE | ||
446 | fi | ||
447 | |||
448 | # Change the help message to a mode-specific one. | ||
449 | generic_help="$help" | ||
450 | help="Try \`$modename --help --mode=$mode' for more information." | ||
451 | |||
452 | # These modes are in order of execution frequency so that they run quickly. | ||
453 | case $mode in | ||
454 | # libtool compile mode | ||
455 | compile) | ||
456 | modename="$modename: compile" | ||
457 | # Get the compilation command and the source file. | ||
458 | base_compile= | ||
459 | srcfile="$nonopt" # always keep a non-empty value in "srcfile" | ||
460 | suppress_opt=yes | ||
461 | suppress_output= | ||
462 | arg_mode=normal | ||
463 | libobj= | ||
464 | later= | ||
465 | |||
466 | for arg | ||
467 | do | ||
468 | case "$arg_mode" in | ||
469 | arg ) | ||
470 | # do not "continue". Instead, add this to base_compile | ||
471 | lastarg="$arg" | ||
472 | arg_mode=normal | ||
473 | ;; | ||
474 | |||
475 | target ) | ||
476 | libobj="$arg" | ||
477 | arg_mode=normal | ||
478 | continue | ||
479 | ;; | ||
480 | |||
481 | normal ) | ||
482 | # Accept any command-line options. | ||
483 | case $arg in | ||
484 | -o) | ||
485 | if test -n "$libobj" ; then | ||
486 | $echo "$modename: you cannot specify \`-o' more than once" 1>&2 | ||
487 | exit $EXIT_FAILURE | ||
488 | fi | ||
489 | arg_mode=target | ||
490 | continue | ||
491 | ;; | ||
492 | |||
493 | -static | -prefer-pic | -prefer-non-pic) | ||
494 | later="$later $arg" | ||
495 | continue | ||
496 | ;; | ||
497 | |||
498 | -no-suppress) | ||
499 | suppress_opt=no | ||
500 | continue | ||
501 | ;; | ||
502 | |||
503 | -Xcompiler) | ||
504 | arg_mode=arg # the next one goes into the "base_compile" arg list | ||
505 | continue # The current "srcfile" will either be retained or | ||
506 | ;; # replaced later. I would guess that would be a bug. | ||
507 | |||
508 | -Wc,*) | ||
509 | args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` | ||
510 | lastarg= | ||
511 | save_ifs="$IFS"; IFS=',' | ||
512 | for arg in $args; do | ||
513 | IFS="$save_ifs" | ||
514 | |||
515 | # Double-quote args containing other shell metacharacters. | ||
516 | # Many Bourne shells cannot handle close brackets correctly | ||
517 | # in scan sets, so we specify it separately. | ||
518 | case $arg in | ||
519 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
520 | arg="\"$arg\"" | ||
521 | ;; | ||
522 | esac | ||
523 | lastarg="$lastarg $arg" | ||
524 | done | ||
525 | IFS="$save_ifs" | ||
526 | lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` | ||
527 | |||
528 | # Add the arguments to base_compile. | ||
529 | base_compile="$base_compile $lastarg" | ||
530 | continue | ||
531 | ;; | ||
532 | |||
533 | * ) | ||
534 | # Accept the current argument as the source file. | ||
535 | # The previous "srcfile" becomes the current argument. | ||
536 | # | ||
537 | lastarg="$srcfile" | ||
538 | srcfile="$arg" | ||
539 | ;; | ||
540 | esac # case $arg | ||
541 | ;; | ||
542 | esac # case $arg_mode | ||
543 | |||
544 | # Aesthetically quote the previous argument. | ||
545 | lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` | ||
546 | |||
547 | case $lastarg in | ||
548 | # Double-quote args containing other shell metacharacters. | ||
549 | # Many Bourne shells cannot handle close brackets correctly | ||
550 | # in scan sets, so we specify it separately. | ||
551 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
552 | lastarg="\"$lastarg\"" | ||
553 | ;; | ||
554 | esac | ||
555 | |||
556 | base_compile="$base_compile $lastarg" | ||
557 | done # for arg | ||
558 | |||
559 | case $arg_mode in | ||
560 | arg) | ||
561 | $echo "$modename: you must specify an argument for -Xcompile" | ||
562 | exit $EXIT_FAILURE | ||
563 | ;; | ||
564 | target) | ||
565 | $echo "$modename: you must specify a target with \`-o'" 1>&2 | ||
566 | exit $EXIT_FAILURE | ||
567 | ;; | ||
568 | *) | ||
569 | # Get the name of the library object. | ||
570 | [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` | ||
571 | ;; | ||
572 | esac | ||
573 | |||
574 | # Recognize several different file suffixes. | ||
575 | # If the user specifies -o file.o, it is replaced with file.lo | ||
576 | xform='[cCFSifmso]' | ||
577 | case $libobj in | ||
578 | *.ada) xform=ada ;; | ||
579 | *.adb) xform=adb ;; | ||
580 | *.ads) xform=ads ;; | ||
581 | *.asm) xform=asm ;; | ||
582 | *.c++) xform=c++ ;; | ||
583 | *.cc) xform=cc ;; | ||
584 | *.ii) xform=ii ;; | ||
585 | *.class) xform=class ;; | ||
586 | *.cpp) xform=cpp ;; | ||
587 | *.cxx) xform=cxx ;; | ||
588 | *.f90) xform=f90 ;; | ||
589 | *.for) xform=for ;; | ||
590 | *.java) xform=java ;; | ||
591 | esac | ||
592 | |||
593 | libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` | ||
594 | |||
595 | case $libobj in | ||
596 | *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; | ||
597 | *) | ||
598 | $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 | ||
599 | exit $EXIT_FAILURE | ||
600 | ;; | ||
601 | esac | ||
602 | |||
603 | func_infer_tag $base_compile | ||
604 | |||
605 | for arg in $later; do | ||
606 | case $arg in | ||
607 | -static) | ||
608 | build_old_libs=yes | ||
609 | continue | ||
610 | ;; | ||
611 | |||
612 | -prefer-pic) | ||
613 | pic_mode=yes | ||
614 | continue | ||
615 | ;; | ||
616 | |||
617 | -prefer-non-pic) | ||
618 | pic_mode=no | ||
619 | continue | ||
620 | ;; | ||
621 | esac | ||
622 | done | ||
623 | |||
624 | objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` | ||
625 | xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` | ||
626 | if test "X$xdir" = "X$obj"; then | ||
627 | xdir= | ||
628 | else | ||
629 | xdir=$xdir/ | ||
630 | fi | ||
631 | lobj=${xdir}$objdir/$objname | ||
632 | |||
633 | if test -z "$base_compile"; then | ||
634 | $echo "$modename: you must specify a compilation command" 1>&2 | ||
635 | $echo "$help" 1>&2 | ||
636 | exit $EXIT_FAILURE | ||
637 | fi | ||
638 | |||
639 | # Delete any leftover library objects. | ||
640 | if test "$build_old_libs" = yes; then | ||
641 | removelist="$obj $lobj $libobj ${libobj}T" | ||
642 | else | ||
643 | removelist="$lobj $libobj ${libobj}T" | ||
644 | fi | ||
645 | |||
646 | $run $rm $removelist | ||
647 | trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 | ||
648 | |||
649 | # On Cygwin there's no "real" PIC flag so we must build both object types | ||
650 | case $host_os in | ||
651 | cygwin* | mingw* | pw32* | os2*) | ||
652 | pic_mode=default | ||
653 | ;; | ||
654 | esac | ||
655 | if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then | ||
656 | # non-PIC code in shared libraries is not supported | ||
657 | pic_mode=default | ||
658 | fi | ||
659 | |||
660 | # Calculate the filename of the output object if compiler does | ||
661 | # not support -o with -c | ||
662 | if test "$compiler_c_o" = no; then | ||
663 | output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} | ||
664 | lockfile="$output_obj.lock" | ||
665 | removelist="$removelist $output_obj $lockfile" | ||
666 | trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 | ||
667 | else | ||
668 | output_obj= | ||
669 | need_locks=no | ||
670 | lockfile= | ||
671 | fi | ||
672 | |||
673 | # Lock this critical section if it is needed | ||
674 | # We use this script file to make the link, it avoids creating a new file | ||
675 | if test "$need_locks" = yes; then | ||
676 | until $run ln "$progpath" "$lockfile" 2>/dev/null; do | ||
677 | $show "Waiting for $lockfile to be removed" | ||
678 | sleep 2 | ||
679 | done | ||
680 | elif test "$need_locks" = warn; then | ||
681 | if test -f "$lockfile"; then | ||
682 | $echo "\ | ||
683 | *** ERROR, $lockfile exists and contains: | ||
684 | `cat $lockfile 2>/dev/null` | ||
685 | |||
686 | This indicates that another process is trying to use the same | ||
687 | temporary object file, and libtool could not work around it because | ||
688 | your compiler does not support \`-c' and \`-o' together. If you | ||
689 | repeat this compilation, it may succeed, by chance, but you had better | ||
690 | avoid parallel builds (make -j) in this platform, or get a better | ||
691 | compiler." | ||
692 | |||
693 | $run $rm $removelist | ||
694 | exit $EXIT_FAILURE | ||
695 | fi | ||
696 | $echo $srcfile > "$lockfile" | ||
697 | fi | ||
698 | |||
699 | if test -n "$fix_srcfile_path"; then | ||
700 | eval srcfile=\"$fix_srcfile_path\" | ||
701 | fi | ||
702 | |||
703 | $run $rm "$libobj" "${libobj}T" | ||
704 | |||
705 | # Create a libtool object file (analogous to a ".la" file), | ||
706 | # but don't create it if we're doing a dry run. | ||
707 | test -z "$run" && cat > ${libobj}T <<EOF | ||
708 | # $libobj - a libtool object file | ||
709 | # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP | ||
710 | # | ||
711 | # Please DO NOT delete this file! | ||
712 | # It is necessary for linking the library. | ||
713 | |||
714 | # Name of the PIC object. | ||
715 | EOF | ||
716 | |||
717 | # Only build a PIC object if we are building libtool libraries. | ||
718 | if test "$build_libtool_libs" = yes; then | ||
719 | # Without this assignment, base_compile gets emptied. | ||
720 | fbsd_hideous_sh_bug=$base_compile | ||
721 | |||
722 | if test "$pic_mode" != no; then | ||
723 | command="$base_compile $srcfile $pic_flag" | ||
724 | else | ||
725 | # Don't build PIC code | ||
726 | command="$base_compile $srcfile" | ||
727 | fi | ||
728 | |||
729 | if test ! -d "${xdir}$objdir"; then | ||
730 | $show "$mkdir ${xdir}$objdir" | ||
731 | $run $mkdir ${xdir}$objdir | ||
732 | status=$? | ||
733 | if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then | ||
734 | exit $status | ||
735 | fi | ||
736 | fi | ||
737 | |||
738 | if test -z "$output_obj"; then | ||
739 | # Place PIC objects in $objdir | ||
740 | command="$command -o $lobj" | ||
741 | fi | ||
742 | |||
743 | $run $rm "$lobj" "$output_obj" | ||
744 | |||
745 | $show "$command" | ||
746 | if $run eval "$command"; then : | ||
747 | else | ||
748 | test -n "$output_obj" && $run $rm $removelist | ||
749 | exit $EXIT_FAILURE | ||
750 | fi | ||
751 | |||
752 | if test "$need_locks" = warn && | ||
753 | test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then | ||
754 | $echo "\ | ||
755 | *** ERROR, $lockfile contains: | ||
756 | `cat $lockfile 2>/dev/null` | ||
757 | |||
758 | but it should contain: | ||
759 | $srcfile | ||
760 | |||
761 | This indicates that another process is trying to use the same | ||
762 | temporary object file, and libtool could not work around it because | ||
763 | your compiler does not support \`-c' and \`-o' together. If you | ||
764 | repeat this compilation, it may succeed, by chance, but you had better | ||
765 | avoid parallel builds (make -j) in this platform, or get a better | ||
766 | compiler." | ||
767 | |||
768 | $run $rm $removelist | ||
769 | exit $EXIT_FAILURE | ||
770 | fi | ||
771 | |||
772 | # Just move the object if needed, then go on to compile the next one | ||
773 | if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then | ||
774 | $show "$mv $output_obj $lobj" | ||
775 | if $run $mv $output_obj $lobj; then : | ||
776 | else | ||
777 | error=$? | ||
778 | $run $rm $removelist | ||
779 | exit $error | ||
780 | fi | ||
781 | fi | ||
782 | |||
783 | # Append the name of the PIC object to the libtool object file. | ||
784 | test -z "$run" && cat >> ${libobj}T <<EOF | ||
785 | pic_object='$objdir/$objname' | ||
786 | |||
787 | EOF | ||
788 | |||
789 | # Allow error messages only from the first compilation. | ||
790 | if test "$suppress_opt" = yes; then | ||
791 | suppress_output=' >/dev/null 2>&1' | ||
792 | fi | ||
793 | else | ||
794 | # No PIC object so indicate it doesn't exist in the libtool | ||
795 | # object file. | ||
796 | test -z "$run" && cat >> ${libobj}T <<EOF | ||
797 | pic_object=none | ||
798 | |||
799 | EOF | ||
800 | fi | ||
801 | |||
802 | # Only build a position-dependent object if we build old libraries. | ||
803 | if test "$build_old_libs" = yes; then | ||
804 | if test "$pic_mode" != yes; then | ||
805 | # Don't build PIC code | ||
806 | command="$base_compile $srcfile" | ||
807 | else | ||
808 | command="$base_compile $srcfile $pic_flag" | ||
809 | fi | ||
810 | if test "$compiler_c_o" = yes; then | ||
811 | command="$command -o $obj" | ||
812 | fi | ||
813 | |||
814 | # Suppress compiler output if we already did a PIC compilation. | ||
815 | command="$command$suppress_output" | ||
816 | $run $rm "$obj" "$output_obj" | ||
817 | $show "$command" | ||
818 | if $run eval "$command"; then : | ||
819 | else | ||
820 | $run $rm $removelist | ||
821 | exit $EXIT_FAILURE | ||
822 | fi | ||
823 | |||
824 | if test "$need_locks" = warn && | ||
825 | test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then | ||
826 | $echo "\ | ||
827 | *** ERROR, $lockfile contains: | ||
828 | `cat $lockfile 2>/dev/null` | ||
829 | |||
830 | but it should contain: | ||
831 | $srcfile | ||
832 | |||
833 | This indicates that another process is trying to use the same | ||
834 | temporary object file, and libtool could not work around it because | ||
835 | your compiler does not support \`-c' and \`-o' together. If you | ||
836 | repeat this compilation, it may succeed, by chance, but you had better | ||
837 | avoid parallel builds (make -j) in this platform, or get a better | ||
838 | compiler." | ||
839 | |||
840 | $run $rm $removelist | ||
841 | exit $EXIT_FAILURE | ||
842 | fi | ||
843 | |||
844 | # Just move the object if needed | ||
845 | if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then | ||
846 | $show "$mv $output_obj $obj" | ||
847 | if $run $mv $output_obj $obj; then : | ||
848 | else | ||
849 | error=$? | ||
850 | $run $rm $removelist | ||
851 | exit $error | ||
852 | fi | ||
853 | fi | ||
854 | |||
855 | # Append the name of the non-PIC object the libtool object file. | ||
856 | # Only append if the libtool object file exists. | ||
857 | test -z "$run" && cat >> ${libobj}T <<EOF | ||
858 | # Name of the non-PIC object. | ||
859 | non_pic_object='$objname' | ||
860 | |||
861 | EOF | ||
862 | else | ||
863 | # Append the name of the non-PIC object the libtool object file. | ||
864 | # Only append if the libtool object file exists. | ||
865 | test -z "$run" && cat >> ${libobj}T <<EOF | ||
866 | # Name of the non-PIC object. | ||
867 | non_pic_object=none | ||
868 | |||
869 | EOF | ||
870 | fi | ||
871 | |||
872 | $run $mv "${libobj}T" "${libobj}" | ||
873 | |||
874 | # Unlock the critical section if it was locked | ||
875 | if test "$need_locks" != no; then | ||
876 | $run $rm "$lockfile" | ||
877 | fi | ||
878 | |||
879 | exit $EXIT_SUCCESS | ||
880 | ;; | ||
881 | |||
882 | # libtool link mode | ||
883 | link | relink) | ||
884 | modename="$modename: link" | ||
885 | case $host in | ||
886 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) | ||
887 | # It is impossible to link a dll without this setting, and | ||
888 | # we shouldn't force the makefile maintainer to figure out | ||
889 | # which system we are compiling for in order to pass an extra | ||
890 | # flag for every libtool invocation. | ||
891 | # allow_undefined=no | ||
892 | |||
893 | # FIXME: Unfortunately, there are problems with the above when trying | ||
894 | # to make a dll which has undefined symbols, in which case not | ||
895 | # even a static library is built. For now, we need to specify | ||
896 | # -no-undefined on the libtool link line when we can be certain | ||
897 | # that all symbols are satisfied, otherwise we get a static library. | ||
898 | allow_undefined=yes | ||
899 | ;; | ||
900 | *) | ||
901 | allow_undefined=yes | ||
902 | ;; | ||
903 | esac | ||
904 | libtool_args="$nonopt" | ||
905 | base_compile="$nonopt $@" | ||
906 | compile_command="$nonopt" | ||
907 | finalize_command="$nonopt" | ||
908 | |||
909 | compile_rpath= | ||
910 | finalize_rpath= | ||
911 | compile_shlibpath= | ||
912 | finalize_shlibpath= | ||
913 | convenience= | ||
914 | old_convenience= | ||
915 | deplibs= | ||
916 | old_deplibs= | ||
917 | compiler_flags= | ||
918 | linker_flags= | ||
919 | dllsearchpath= | ||
920 | lib_search_path=`pwd` | ||
921 | inst_prefix_dir= | ||
922 | |||
923 | avoid_version=no | ||
924 | dlfiles= | ||
925 | dlprefiles= | ||
926 | dlself=no | ||
927 | export_dynamic=no | ||
928 | export_symbols= | ||
929 | export_symbols_regex= | ||
930 | generated= | ||
931 | libobjs= | ||
932 | ltlibs= | ||
933 | module=no | ||
934 | no_install=no | ||
935 | objs= | ||
936 | non_pic_objects= | ||
937 | precious_files_regex= | ||
938 | prefer_static_libs=no | ||
939 | preload=no | ||
940 | prev= | ||
941 | prevarg= | ||
942 | release= | ||
943 | rpath= | ||
944 | xrpath= | ||
945 | perm_rpath= | ||
946 | temp_rpath= | ||
947 | thread_safe=no | ||
948 | vinfo= | ||
949 | vinfo_number=no | ||
950 | |||
951 | func_infer_tag $base_compile | ||
952 | |||
953 | # We need to know -static, to get the right output filenames. | ||
954 | for arg | ||
955 | do | ||
956 | case $arg in | ||
957 | -all-static | -static) | ||
958 | if test "X$arg" = "X-all-static"; then | ||
959 | if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then | ||
960 | $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2 | ||
961 | fi | ||
962 | if test -n "$link_static_flag"; then | ||
963 | dlopen_self=$dlopen_self_static | ||
964 | fi | ||
965 | else | ||
966 | if test -z "$pic_flag" && test -n "$link_static_flag"; then | ||
967 | dlopen_self=$dlopen_self_static | ||
968 | fi | ||
969 | fi | ||
970 | build_libtool_libs=no | ||
971 | build_old_libs=yes | ||
972 | prefer_static_libs=yes | ||
973 | break | ||
974 | ;; | ||
975 | esac | ||
976 | done | ||
977 | |||
978 | # See if our shared archives depend on static archives. | ||
979 | test -n "$old_archive_from_new_cmds" && build_old_libs=yes | ||
980 | |||
981 | # Go through the arguments, transforming them on the way. | ||
982 | while test "$#" -gt 0; do | ||
983 | arg="$1" | ||
984 | shift | ||
985 | case $arg in | ||
986 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
987 | qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test | ||
988 | ;; | ||
989 | *) qarg=$arg ;; | ||
990 | esac | ||
991 | libtool_args="$libtool_args $qarg" | ||
992 | |||
993 | # If the previous option needs an argument, assign it. | ||
994 | if test -n "$prev"; then | ||
995 | case $prev in | ||
996 | output) | ||
997 | compile_command="$compile_command @OUTPUT@" | ||
998 | finalize_command="$finalize_command @OUTPUT@" | ||
999 | ;; | ||
1000 | esac | ||
1001 | |||
1002 | case $prev in | ||
1003 | dlfiles|dlprefiles) | ||
1004 | if test "$preload" = no; then | ||
1005 | # Add the symbol object into the linking commands. | ||
1006 | compile_command="$compile_command @SYMFILE@" | ||
1007 | finalize_command="$finalize_command @SYMFILE@" | ||
1008 | preload=yes | ||
1009 | fi | ||
1010 | case $arg in | ||
1011 | *.la | *.lo) ;; # We handle these cases below. | ||
1012 | force) | ||
1013 | if test "$dlself" = no; then | ||
1014 | dlself=needless | ||
1015 | export_dynamic=yes | ||
1016 | fi | ||
1017 | prev= | ||
1018 | continue | ||
1019 | ;; | ||
1020 | self) | ||
1021 | if test "$prev" = dlprefiles; then | ||
1022 | dlself=yes | ||
1023 | elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then | ||
1024 | dlself=yes | ||
1025 | else | ||
1026 | dlself=needless | ||
1027 | export_dynamic=yes | ||
1028 | fi | ||
1029 | prev= | ||
1030 | continue | ||
1031 | ;; | ||
1032 | *) | ||
1033 | if test "$prev" = dlfiles; then | ||
1034 | dlfiles="$dlfiles $arg" | ||
1035 | else | ||
1036 | dlprefiles="$dlprefiles $arg" | ||
1037 | fi | ||
1038 | prev= | ||
1039 | continue | ||
1040 | ;; | ||
1041 | esac | ||
1042 | ;; | ||
1043 | expsyms) | ||
1044 | export_symbols="$arg" | ||
1045 | if test ! -f "$arg"; then | ||
1046 | $echo "$modename: symbol file \`$arg' does not exist" | ||
1047 | exit $EXIT_FAILURE | ||
1048 | fi | ||
1049 | prev= | ||
1050 | continue | ||
1051 | ;; | ||
1052 | expsyms_regex) | ||
1053 | export_symbols_regex="$arg" | ||
1054 | prev= | ||
1055 | continue | ||
1056 | ;; | ||
1057 | inst_prefix) | ||
1058 | inst_prefix_dir="$arg" | ||
1059 | prev= | ||
1060 | continue | ||
1061 | ;; | ||
1062 | precious_regex) | ||
1063 | precious_files_regex="$arg" | ||
1064 | prev= | ||
1065 | continue | ||
1066 | ;; | ||
1067 | release) | ||
1068 | release="-$arg" | ||
1069 | prev= | ||
1070 | continue | ||
1071 | ;; | ||
1072 | objectlist) | ||
1073 | if test -f "$arg"; then | ||
1074 | save_arg=$arg | ||
1075 | moreargs= | ||
1076 | for fil in `cat $save_arg` | ||
1077 | do | ||
1078 | # moreargs="$moreargs $fil" | ||
1079 | arg=$fil | ||
1080 | # A libtool-controlled object. | ||
1081 | |||
1082 | # Check to see that this really is a libtool object. | ||
1083 | if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
1084 | pic_object= | ||
1085 | non_pic_object= | ||
1086 | |||
1087 | # Read the .lo file | ||
1088 | # If there is no directory component, then add one. | ||
1089 | case $arg in | ||
1090 | */* | *\\*) . $arg ;; | ||
1091 | *) . ./$arg ;; | ||
1092 | esac | ||
1093 | |||
1094 | if test -z "$pic_object" || \ | ||
1095 | test -z "$non_pic_object" || | ||
1096 | test "$pic_object" = none && \ | ||
1097 | test "$non_pic_object" = none; then | ||
1098 | $echo "$modename: cannot find name of object for \`$arg'" 1>&2 | ||
1099 | exit $EXIT_FAILURE | ||
1100 | fi | ||
1101 | |||
1102 | # Extract subdirectory from the argument. | ||
1103 | xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` | ||
1104 | if test "X$xdir" = "X$arg"; then | ||
1105 | xdir= | ||
1106 | else | ||
1107 | xdir="$xdir/" | ||
1108 | fi | ||
1109 | |||
1110 | if test "$pic_object" != none; then | ||
1111 | # Prepend the subdirectory the object is found in. | ||
1112 | pic_object="$xdir$pic_object" | ||
1113 | |||
1114 | if test "$prev" = dlfiles; then | ||
1115 | if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then | ||
1116 | dlfiles="$dlfiles $pic_object" | ||
1117 | prev= | ||
1118 | continue | ||
1119 | else | ||
1120 | # If libtool objects are unsupported, then we need to preload. | ||
1121 | prev=dlprefiles | ||
1122 | fi | ||
1123 | fi | ||
1124 | |||
1125 | # CHECK ME: I think I busted this. -Ossama | ||
1126 | if test "$prev" = dlprefiles; then | ||
1127 | # Preload the old-style object. | ||
1128 | dlprefiles="$dlprefiles $pic_object" | ||
1129 | prev= | ||
1130 | fi | ||
1131 | |||
1132 | # A PIC object. | ||
1133 | libobjs="$libobjs $pic_object" | ||
1134 | arg="$pic_object" | ||
1135 | fi | ||
1136 | |||
1137 | # Non-PIC object. | ||
1138 | if test "$non_pic_object" != none; then | ||
1139 | # Prepend the subdirectory the object is found in. | ||
1140 | non_pic_object="$xdir$non_pic_object" | ||
1141 | |||
1142 | # A standard non-PIC object | ||
1143 | non_pic_objects="$non_pic_objects $non_pic_object" | ||
1144 | if test -z "$pic_object" || test "$pic_object" = none ; then | ||
1145 | arg="$non_pic_object" | ||
1146 | fi | ||
1147 | fi | ||
1148 | else | ||
1149 | # Only an error if not doing a dry-run. | ||
1150 | if test -z "$run"; then | ||
1151 | $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 | ||
1152 | exit $EXIT_FAILURE | ||
1153 | else | ||
1154 | # Dry-run case. | ||
1155 | |||
1156 | # Extract subdirectory from the argument. | ||
1157 | xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` | ||
1158 | if test "X$xdir" = "X$arg"; then | ||
1159 | xdir= | ||
1160 | else | ||
1161 | xdir="$xdir/" | ||
1162 | fi | ||
1163 | |||
1164 | pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` | ||
1165 | non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` | ||
1166 | libobjs="$libobjs $pic_object" | ||
1167 | non_pic_objects="$non_pic_objects $non_pic_object" | ||
1168 | fi | ||
1169 | fi | ||
1170 | done | ||
1171 | else | ||
1172 | $echo "$modename: link input file \`$save_arg' does not exist" | ||
1173 | exit $EXIT_FAILURE | ||
1174 | fi | ||
1175 | arg=$save_arg | ||
1176 | prev= | ||
1177 | continue | ||
1178 | ;; | ||
1179 | rpath | xrpath) | ||
1180 | # We need an absolute path. | ||
1181 | case $arg in | ||
1182 | [\\/]* | [A-Za-z]:[\\/]*) ;; | ||
1183 | *) | ||
1184 | $echo "$modename: only absolute run-paths are allowed" 1>&2 | ||
1185 | exit $EXIT_FAILURE | ||
1186 | ;; | ||
1187 | esac | ||
1188 | if test "$prev" = rpath; then | ||
1189 | case "$rpath " in | ||
1190 | *" $arg "*) ;; | ||
1191 | *) rpath="$rpath $arg" ;; | ||
1192 | esac | ||
1193 | else | ||
1194 | case "$xrpath " in | ||
1195 | *" $arg "*) ;; | ||
1196 | *) xrpath="$xrpath $arg" ;; | ||
1197 | esac | ||
1198 | fi | ||
1199 | prev= | ||
1200 | continue | ||
1201 | ;; | ||
1202 | xcompiler) | ||
1203 | compiler_flags="$compiler_flags $qarg" | ||
1204 | prev= | ||
1205 | compile_command="$compile_command $qarg" | ||
1206 | finalize_command="$finalize_command $qarg" | ||
1207 | continue | ||
1208 | ;; | ||
1209 | xlinker) | ||
1210 | linker_flags="$linker_flags $qarg" | ||
1211 | compiler_flags="$compiler_flags $wl$qarg" | ||
1212 | prev= | ||
1213 | compile_command="$compile_command $wl$qarg" | ||
1214 | finalize_command="$finalize_command $wl$qarg" | ||
1215 | continue | ||
1216 | ;; | ||
1217 | xcclinker) | ||
1218 | linker_flags="$linker_flags $qarg" | ||
1219 | compiler_flags="$compiler_flags $qarg" | ||
1220 | prev= | ||
1221 | compile_command="$compile_command $qarg" | ||
1222 | finalize_command="$finalize_command $qarg" | ||
1223 | continue | ||
1224 | ;; | ||
1225 | shrext) | ||
1226 | shrext_cmds="$arg" | ||
1227 | prev= | ||
1228 | continue | ||
1229 | ;; | ||
1230 | *) | ||
1231 | eval "$prev=\"\$arg\"" | ||
1232 | prev= | ||
1233 | continue | ||
1234 | ;; | ||
1235 | esac | ||
1236 | fi # test -n "$prev" | ||
1237 | |||
1238 | prevarg="$arg" | ||
1239 | |||
1240 | case $arg in | ||
1241 | -all-static) | ||
1242 | if test -n "$link_static_flag"; then | ||
1243 | compile_command="$compile_command $link_static_flag" | ||
1244 | finalize_command="$finalize_command $link_static_flag" | ||
1245 | fi | ||
1246 | continue | ||
1247 | ;; | ||
1248 | |||
1249 | -allow-undefined) | ||
1250 | # FIXME: remove this flag sometime in the future. | ||
1251 | $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 | ||
1252 | continue | ||
1253 | ;; | ||
1254 | |||
1255 | -avoid-version) | ||
1256 | avoid_version=yes | ||
1257 | continue | ||
1258 | ;; | ||
1259 | |||
1260 | -dlopen) | ||
1261 | prev=dlfiles | ||
1262 | continue | ||
1263 | ;; | ||
1264 | |||
1265 | -dlpreopen) | ||
1266 | prev=dlprefiles | ||
1267 | continue | ||
1268 | ;; | ||
1269 | |||
1270 | -export-dynamic) | ||
1271 | export_dynamic=yes | ||
1272 | continue | ||
1273 | ;; | ||
1274 | |||
1275 | -export-symbols | -export-symbols-regex) | ||
1276 | if test -n "$export_symbols" || test -n "$export_symbols_regex"; then | ||
1277 | $echo "$modename: more than one -exported-symbols argument is not allowed" | ||
1278 | exit $EXIT_FAILURE | ||
1279 | fi | ||
1280 | if test "X$arg" = "X-export-symbols"; then | ||
1281 | prev=expsyms | ||
1282 | else | ||
1283 | prev=expsyms_regex | ||
1284 | fi | ||
1285 | continue | ||
1286 | ;; | ||
1287 | |||
1288 | -inst-prefix-dir) | ||
1289 | prev=inst_prefix | ||
1290 | continue | ||
1291 | ;; | ||
1292 | |||
1293 | # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* | ||
1294 | # so, if we see these flags be careful not to treat them like -L | ||
1295 | -L[A-Z][A-Z]*:*) | ||
1296 | case $with_gcc/$host in | ||
1297 | no/*-*-irix* | /*-*-irix*) | ||
1298 | compile_command="$compile_command $arg" | ||
1299 | finalize_command="$finalize_command $arg" | ||
1300 | ;; | ||
1301 | esac | ||
1302 | continue | ||
1303 | ;; | ||
1304 | |||
1305 | -L*) | ||
1306 | dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` | ||
1307 | # We need an absolute path. | ||
1308 | case $dir in | ||
1309 | [\\/]* | [A-Za-z]:[\\/]*) ;; | ||
1310 | *) | ||
1311 | absdir=`cd "$dir" && pwd` | ||
1312 | if test -z "$absdir"; then | ||
1313 | $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 | ||
1314 | exit $EXIT_FAILURE | ||
1315 | fi | ||
1316 | dir="$absdir" | ||
1317 | ;; | ||
1318 | esac | ||
1319 | case "$deplibs " in | ||
1320 | *" -L$dir "*) ;; | ||
1321 | *) | ||
1322 | deplibs="$deplibs -L$dir" | ||
1323 | lib_search_path="$lib_search_path $dir" | ||
1324 | ;; | ||
1325 | esac | ||
1326 | case $host in | ||
1327 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) | ||
1328 | case :$dllsearchpath: in | ||
1329 | *":$dir:"*) ;; | ||
1330 | *) dllsearchpath="$dllsearchpath:$dir";; | ||
1331 | esac | ||
1332 | ;; | ||
1333 | esac | ||
1334 | continue | ||
1335 | ;; | ||
1336 | |||
1337 | -l*) | ||
1338 | if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then | ||
1339 | case $host in | ||
1340 | *-*-cygwin* | *-*-pw32* | *-*-beos*) | ||
1341 | # These systems don't actually have a C or math library (as such) | ||
1342 | continue | ||
1343 | ;; | ||
1344 | *-*-mingw* | *-*-os2*) | ||
1345 | # These systems don't actually have a C library (as such) | ||
1346 | test "X$arg" = "X-lc" && continue | ||
1347 | ;; | ||
1348 | *-*-openbsd* | *-*-freebsd*) | ||
1349 | # Do not include libc due to us having libc/libc_r. | ||
1350 | test "X$arg" = "X-lc" && continue | ||
1351 | ;; | ||
1352 | *-*-rhapsody* | *-*-darwin1.[012]) | ||
1353 | # Rhapsody C and math libraries are in the System framework | ||
1354 | deplibs="$deplibs -framework System" | ||
1355 | continue | ||
1356 | esac | ||
1357 | elif test "X$arg" = "X-lc_r"; then | ||
1358 | case $host in | ||
1359 | *-*-openbsd* | *-*-freebsd*) | ||
1360 | # Do not include libc_r directly, use -pthread flag. | ||
1361 | continue | ||
1362 | ;; | ||
1363 | esac | ||
1364 | fi | ||
1365 | deplibs="$deplibs $arg" | ||
1366 | continue | ||
1367 | ;; | ||
1368 | |||
1369 | -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) | ||
1370 | deplibs="$deplibs $arg" | ||
1371 | continue | ||
1372 | ;; | ||
1373 | |||
1374 | -module) | ||
1375 | module=yes | ||
1376 | continue | ||
1377 | ;; | ||
1378 | |||
1379 | # gcc -m* arguments should be passed to the linker via $compiler_flags | ||
1380 | # in order to pass architecture information to the linker | ||
1381 | # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo | ||
1382 | # but this is not reliable with gcc because gcc may use -mfoo to | ||
1383 | # select a different linker, different libraries, etc, while | ||
1384 | # -Wl,-mfoo simply passes -mfoo to the linker. | ||
1385 | -m*) | ||
1386 | # Unknown arguments in both finalize_command and compile_command need | ||
1387 | # to be aesthetically quoted because they are evaled later. | ||
1388 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | ||
1389 | case $arg in | ||
1390 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
1391 | arg="\"$arg\"" | ||
1392 | ;; | ||
1393 | esac | ||
1394 | compile_command="$compile_command $arg" | ||
1395 | finalize_command="$finalize_command $arg" | ||
1396 | if test "$with_gcc" = "yes" ; then | ||
1397 | compiler_flags="$compiler_flags $arg" | ||
1398 | fi | ||
1399 | continue | ||
1400 | ;; | ||
1401 | |||
1402 | -shrext) | ||
1403 | prev=shrext | ||
1404 | continue | ||
1405 | ;; | ||
1406 | |||
1407 | -no-fast-install) | ||
1408 | fast_install=no | ||
1409 | continue | ||
1410 | ;; | ||
1411 | |||
1412 | -no-install) | ||
1413 | case $host in | ||
1414 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) | ||
1415 | # The PATH hackery in wrapper scripts is required on Windows | ||
1416 | # in order for the loader to find any dlls it needs. | ||
1417 | $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 | ||
1418 | $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 | ||
1419 | fast_install=no | ||
1420 | ;; | ||
1421 | *) no_install=yes ;; | ||
1422 | esac | ||
1423 | continue | ||
1424 | ;; | ||
1425 | |||
1426 | -no-undefined) | ||
1427 | allow_undefined=no | ||
1428 | continue | ||
1429 | ;; | ||
1430 | |||
1431 | -objectlist) | ||
1432 | prev=objectlist | ||
1433 | continue | ||
1434 | ;; | ||
1435 | |||
1436 | -o) prev=output ;; | ||
1437 | |||
1438 | -precious-files-regex) | ||
1439 | prev=precious_regex | ||
1440 | continue | ||
1441 | ;; | ||
1442 | |||
1443 | -release) | ||
1444 | prev=release | ||
1445 | continue | ||
1446 | ;; | ||
1447 | |||
1448 | -rpath) | ||
1449 | prev=rpath | ||
1450 | continue | ||
1451 | ;; | ||
1452 | |||
1453 | -R) | ||
1454 | prev=xrpath | ||
1455 | continue | ||
1456 | ;; | ||
1457 | |||
1458 | -R*) | ||
1459 | dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` | ||
1460 | # We need an absolute path. | ||
1461 | case $dir in | ||
1462 | [\\/]* | [A-Za-z]:[\\/]*) ;; | ||
1463 | *) | ||
1464 | $echo "$modename: only absolute run-paths are allowed" 1>&2 | ||
1465 | exit $EXIT_FAILURE | ||
1466 | ;; | ||
1467 | esac | ||
1468 | case "$xrpath " in | ||
1469 | *" $dir "*) ;; | ||
1470 | *) xrpath="$xrpath $dir" ;; | ||
1471 | esac | ||
1472 | continue | ||
1473 | ;; | ||
1474 | |||
1475 | -static) | ||
1476 | # The effects of -static are defined in a previous loop. | ||
1477 | # We used to do the same as -all-static on platforms that | ||
1478 | # didn't have a PIC flag, but the assumption that the effects | ||
1479 | # would be equivalent was wrong. It would break on at least | ||
1480 | # Digital Unix and AIX. | ||
1481 | continue | ||
1482 | ;; | ||
1483 | |||
1484 | -thread-safe) | ||
1485 | thread_safe=yes | ||
1486 | continue | ||
1487 | ;; | ||
1488 | |||
1489 | -version-info) | ||
1490 | prev=vinfo | ||
1491 | continue | ||
1492 | ;; | ||
1493 | -version-number) | ||
1494 | prev=vinfo | ||
1495 | vinfo_number=yes | ||
1496 | continue | ||
1497 | ;; | ||
1498 | |||
1499 | -Wc,*) | ||
1500 | args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` | ||
1501 | arg= | ||
1502 | save_ifs="$IFS"; IFS=',' | ||
1503 | for flag in $args; do | ||
1504 | IFS="$save_ifs" | ||
1505 | case $flag in | ||
1506 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
1507 | flag="\"$flag\"" | ||
1508 | ;; | ||
1509 | esac | ||
1510 | arg="$arg $wl$flag" | ||
1511 | compiler_flags="$compiler_flags $flag" | ||
1512 | done | ||
1513 | IFS="$save_ifs" | ||
1514 | arg=`$echo "X$arg" | $Xsed -e "s/^ //"` | ||
1515 | ;; | ||
1516 | |||
1517 | -Wl,*) | ||
1518 | args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` | ||
1519 | arg= | ||
1520 | save_ifs="$IFS"; IFS=',' | ||
1521 | for flag in $args; do | ||
1522 | IFS="$save_ifs" | ||
1523 | case $flag in | ||
1524 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
1525 | flag="\"$flag\"" | ||
1526 | ;; | ||
1527 | esac | ||
1528 | arg="$arg $wl$flag" | ||
1529 | compiler_flags="$compiler_flags $wl$flag" | ||
1530 | linker_flags="$linker_flags $flag" | ||
1531 | done | ||
1532 | IFS="$save_ifs" | ||
1533 | arg=`$echo "X$arg" | $Xsed -e "s/^ //"` | ||
1534 | ;; | ||
1535 | |||
1536 | -Xcompiler) | ||
1537 | prev=xcompiler | ||
1538 | continue | ||
1539 | ;; | ||
1540 | |||
1541 | -Xlinker) | ||
1542 | prev=xlinker | ||
1543 | continue | ||
1544 | ;; | ||
1545 | |||
1546 | -XCClinker) | ||
1547 | prev=xcclinker | ||
1548 | continue | ||
1549 | ;; | ||
1550 | |||
1551 | # Some other compiler flag. | ||
1552 | -* | +*) | ||
1553 | # Unknown arguments in both finalize_command and compile_command need | ||
1554 | # to be aesthetically quoted because they are evaled later. | ||
1555 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | ||
1556 | case $arg in | ||
1557 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
1558 | arg="\"$arg\"" | ||
1559 | ;; | ||
1560 | esac | ||
1561 | ;; | ||
1562 | |||
1563 | *.$objext) | ||
1564 | # A standard object. | ||
1565 | objs="$objs $arg" | ||
1566 | ;; | ||
1567 | |||
1568 | *.lo) | ||
1569 | # A libtool-controlled object. | ||
1570 | |||
1571 | # Check to see that this really is a libtool object. | ||
1572 | if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
1573 | pic_object= | ||
1574 | non_pic_object= | ||
1575 | |||
1576 | # Read the .lo file | ||
1577 | # If there is no directory component, then add one. | ||
1578 | case $arg in | ||
1579 | */* | *\\*) . $arg ;; | ||
1580 | *) . ./$arg ;; | ||
1581 | esac | ||
1582 | |||
1583 | if test -z "$pic_object" || \ | ||
1584 | test -z "$non_pic_object" || | ||
1585 | test "$pic_object" = none && \ | ||
1586 | test "$non_pic_object" = none; then | ||
1587 | $echo "$modename: cannot find name of object for \`$arg'" 1>&2 | ||
1588 | exit $EXIT_FAILURE | ||
1589 | fi | ||
1590 | |||
1591 | # Extract subdirectory from the argument. | ||
1592 | xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` | ||
1593 | if test "X$xdir" = "X$arg"; then | ||
1594 | xdir= | ||
1595 | else | ||
1596 | xdir="$xdir/" | ||
1597 | fi | ||
1598 | |||
1599 | if test "$pic_object" != none; then | ||
1600 | # Prepend the subdirectory the object is found in. | ||
1601 | pic_object="$xdir$pic_object" | ||
1602 | |||
1603 | if test "$prev" = dlfiles; then | ||
1604 | if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then | ||
1605 | dlfiles="$dlfiles $pic_object" | ||
1606 | prev= | ||
1607 | continue | ||
1608 | else | ||
1609 | # If libtool objects are unsupported, then we need to preload. | ||
1610 | prev=dlprefiles | ||
1611 | fi | ||
1612 | fi | ||
1613 | |||
1614 | # CHECK ME: I think I busted this. -Ossama | ||
1615 | if test "$prev" = dlprefiles; then | ||
1616 | # Preload the old-style object. | ||
1617 | dlprefiles="$dlprefiles $pic_object" | ||
1618 | prev= | ||
1619 | fi | ||
1620 | |||
1621 | # A PIC object. | ||
1622 | libobjs="$libobjs $pic_object" | ||
1623 | arg="$pic_object" | ||
1624 | fi | ||
1625 | |||
1626 | # Non-PIC object. | ||
1627 | if test "$non_pic_object" != none; then | ||
1628 | # Prepend the subdirectory the object is found in. | ||
1629 | non_pic_object="$xdir$non_pic_object" | ||
1630 | |||
1631 | # A standard non-PIC object | ||
1632 | non_pic_objects="$non_pic_objects $non_pic_object" | ||
1633 | if test -z "$pic_object" || test "$pic_object" = none ; then | ||
1634 | arg="$non_pic_object" | ||
1635 | fi | ||
1636 | fi | ||
1637 | else | ||
1638 | # Only an error if not doing a dry-run. | ||
1639 | if test -z "$run"; then | ||
1640 | $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 | ||
1641 | exit $EXIT_FAILURE | ||
1642 | else | ||
1643 | # Dry-run case. | ||
1644 | |||
1645 | # Extract subdirectory from the argument. | ||
1646 | xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` | ||
1647 | if test "X$xdir" = "X$arg"; then | ||
1648 | xdir= | ||
1649 | else | ||
1650 | xdir="$xdir/" | ||
1651 | fi | ||
1652 | |||
1653 | pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` | ||
1654 | non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` | ||
1655 | libobjs="$libobjs $pic_object" | ||
1656 | non_pic_objects="$non_pic_objects $non_pic_object" | ||
1657 | fi | ||
1658 | fi | ||
1659 | ;; | ||
1660 | |||
1661 | *.$libext) | ||
1662 | # An archive. | ||
1663 | deplibs="$deplibs $arg" | ||
1664 | old_deplibs="$old_deplibs $arg" | ||
1665 | continue | ||
1666 | ;; | ||
1667 | |||
1668 | *.la) | ||
1669 | # A libtool-controlled library. | ||
1670 | |||
1671 | if test "$prev" = dlfiles; then | ||
1672 | # This library was specified with -dlopen. | ||
1673 | dlfiles="$dlfiles $arg" | ||
1674 | prev= | ||
1675 | elif test "$prev" = dlprefiles; then | ||
1676 | # The library was specified with -dlpreopen. | ||
1677 | dlprefiles="$dlprefiles $arg" | ||
1678 | prev= | ||
1679 | else | ||
1680 | deplibs="$deplibs $arg" | ||
1681 | fi | ||
1682 | continue | ||
1683 | ;; | ||
1684 | |||
1685 | # Some other compiler argument. | ||
1686 | *) | ||
1687 | # Unknown arguments in both finalize_command and compile_command need | ||
1688 | # to be aesthetically quoted because they are evaled later. | ||
1689 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | ||
1690 | case $arg in | ||
1691 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") | ||
1692 | arg="\"$arg\"" | ||
1693 | ;; | ||
1694 | esac | ||
1695 | ;; | ||
1696 | esac # arg | ||
1697 | |||
1698 | # Now actually substitute the argument into the commands. | ||
1699 | if test -n "$arg"; then | ||
1700 | compile_command="$compile_command $arg" | ||
1701 | finalize_command="$finalize_command $arg" | ||
1702 | fi | ||
1703 | done # argument parsing loop | ||
1704 | |||
1705 | if test -n "$prev"; then | ||
1706 | $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 | ||
1707 | $echo "$help" 1>&2 | ||
1708 | exit $EXIT_FAILURE | ||
1709 | fi | ||
1710 | |||
1711 | if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then | ||
1712 | eval arg=\"$export_dynamic_flag_spec\" | ||
1713 | compile_command="$compile_command $arg" | ||
1714 | finalize_command="$finalize_command $arg" | ||
1715 | fi | ||
1716 | |||
1717 | oldlibs= | ||
1718 | # calculate the name of the file, without its directory | ||
1719 | outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` | ||
1720 | libobjs_save="$libobjs" | ||
1721 | |||
1722 | if test -n "$shlibpath_var"; then | ||
1723 | # get the directories listed in $shlibpath_var | ||
1724 | eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` | ||
1725 | else | ||
1726 | shlib_search_path= | ||
1727 | fi | ||
1728 | eval sys_lib_search_path=\"$sys_lib_search_path_spec\" | ||
1729 | eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" | ||
1730 | |||
1731 | output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` | ||
1732 | if test "X$output_objdir" = "X$output"; then | ||
1733 | output_objdir="$objdir" | ||
1734 | else | ||
1735 | output_objdir="$output_objdir/$objdir" | ||
1736 | fi | ||
1737 | # Create the object directory. | ||
1738 | if test ! -d "$output_objdir"; then | ||
1739 | $show "$mkdir $output_objdir" | ||
1740 | $run $mkdir $output_objdir | ||
1741 | status=$? | ||
1742 | if test "$status" -ne 0 && test ! -d "$output_objdir"; then | ||
1743 | exit $status | ||
1744 | fi | ||
1745 | fi | ||
1746 | |||
1747 | # Determine the type of output | ||
1748 | case $output in | ||
1749 | "") | ||
1750 | $echo "$modename: you must specify an output file" 1>&2 | ||
1751 | $echo "$help" 1>&2 | ||
1752 | exit $EXIT_FAILURE | ||
1753 | ;; | ||
1754 | *.$libext) linkmode=oldlib ;; | ||
1755 | *.lo | *.$objext) linkmode=obj ;; | ||
1756 | *.la) linkmode=lib ;; | ||
1757 | *) linkmode=prog ;; # Anything else should be a program. | ||
1758 | esac | ||
1759 | |||
1760 | case $host in | ||
1761 | *cygwin* | *mingw* | *pw32*) | ||
1762 | # don't eliminate duplications in $postdeps and $predeps | ||
1763 | duplicate_compiler_generated_deps=yes | ||
1764 | ;; | ||
1765 | *) | ||
1766 | duplicate_compiler_generated_deps=$duplicate_deps | ||
1767 | ;; | ||
1768 | esac | ||
1769 | specialdeplibs= | ||
1770 | |||
1771 | libs= | ||
1772 | # Find all interdependent deplibs by searching for libraries | ||
1773 | # that are linked more than once (e.g. -la -lb -la) | ||
1774 | for deplib in $deplibs; do | ||
1775 | if test "X$duplicate_deps" = "Xyes" ; then | ||
1776 | case "$libs " in | ||
1777 | *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; | ||
1778 | esac | ||
1779 | fi | ||
1780 | libs="$libs $deplib" | ||
1781 | done | ||
1782 | |||
1783 | if test "$linkmode" = lib; then | ||
1784 | libs="$predeps $libs $compiler_lib_search_path $postdeps" | ||
1785 | |||
1786 | # Compute libraries that are listed more than once in $predeps | ||
1787 | # $postdeps and mark them as special (i.e., whose duplicates are | ||
1788 | # not to be eliminated). | ||
1789 | pre_post_deps= | ||
1790 | if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then | ||
1791 | for pre_post_dep in $predeps $postdeps; do | ||
1792 | case "$pre_post_deps " in | ||
1793 | *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; | ||
1794 | esac | ||
1795 | pre_post_deps="$pre_post_deps $pre_post_dep" | ||
1796 | done | ||
1797 | fi | ||
1798 | pre_post_deps= | ||
1799 | fi | ||
1800 | |||
1801 | deplibs= | ||
1802 | newdependency_libs= | ||
1803 | newlib_search_path= | ||
1804 | need_relink=no # whether we're linking any uninstalled libtool libraries | ||
1805 | notinst_deplibs= # not-installed libtool libraries | ||
1806 | notinst_path= # paths that contain not-installed libtool libraries | ||
1807 | case $linkmode in | ||
1808 | lib) | ||
1809 | passes="conv link" | ||
1810 | for file in $dlfiles $dlprefiles; do | ||
1811 | case $file in | ||
1812 | *.la) ;; | ||
1813 | *) | ||
1814 | $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 | ||
1815 | exit $EXIT_FAILURE | ||
1816 | ;; | ||
1817 | esac | ||
1818 | done | ||
1819 | ;; | ||
1820 | prog) | ||
1821 | compile_deplibs= | ||
1822 | finalize_deplibs= | ||
1823 | alldeplibs=no | ||
1824 | newdlfiles= | ||
1825 | newdlprefiles= | ||
1826 | passes="conv scan dlopen dlpreopen link" | ||
1827 | ;; | ||
1828 | *) passes="conv" | ||
1829 | ;; | ||
1830 | esac | ||
1831 | for pass in $passes; do | ||
1832 | if test "$linkmode,$pass" = "lib,link" || | ||
1833 | test "$linkmode,$pass" = "prog,scan"; then | ||
1834 | libs="$deplibs" | ||
1835 | deplibs= | ||
1836 | fi | ||
1837 | if test "$linkmode" = prog; then | ||
1838 | case $pass in | ||
1839 | dlopen) libs="$dlfiles" ;; | ||
1840 | dlpreopen) libs="$dlprefiles" ;; | ||
1841 | link) | ||
1842 | libs="$deplibs %DEPLIBS%" | ||
1843 | test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" | ||
1844 | ;; | ||
1845 | esac | ||
1846 | fi | ||
1847 | if test "$pass" = dlopen; then | ||
1848 | # Collect dlpreopened libraries | ||
1849 | save_deplibs="$deplibs" | ||
1850 | deplibs= | ||
1851 | fi | ||
1852 | for deplib in $libs; do | ||
1853 | lib= | ||
1854 | found=no | ||
1855 | case $deplib in | ||
1856 | -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) | ||
1857 | if test "$linkmode,$pass" = "prog,link"; then | ||
1858 | compile_deplibs="$deplib $compile_deplibs" | ||
1859 | finalize_deplibs="$deplib $finalize_deplibs" | ||
1860 | else | ||
1861 | deplibs="$deplib $deplibs" | ||
1862 | fi | ||
1863 | continue | ||
1864 | ;; | ||
1865 | -l*) | ||
1866 | if test "$linkmode" != lib && test "$linkmode" != prog; then | ||
1867 | $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 | ||
1868 | continue | ||
1869 | fi | ||
1870 | name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` | ||
1871 | for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do | ||
1872 | for search_ext in .la $std_shrext .so .a; do | ||
1873 | # Search the libtool library | ||
1874 | lib="$searchdir/lib${name}${search_ext}" | ||
1875 | if test -f "$lib"; then | ||
1876 | if test "$search_ext" = ".la"; then | ||
1877 | found=yes | ||
1878 | else | ||
1879 | found=no | ||
1880 | fi | ||
1881 | break 2 | ||
1882 | fi | ||
1883 | done | ||
1884 | done | ||
1885 | if test "$found" != yes; then | ||
1886 | # deplib doesn't seem to be a libtool library | ||
1887 | if test "$linkmode,$pass" = "prog,link"; then | ||
1888 | compile_deplibs="$deplib $compile_deplibs" | ||
1889 | finalize_deplibs="$deplib $finalize_deplibs" | ||
1890 | else | ||
1891 | deplibs="$deplib $deplibs" | ||
1892 | test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" | ||
1893 | fi | ||
1894 | continue | ||
1895 | else # deplib is a libtool library | ||
1896 | # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, | ||
1897 | # We need to do some special things here, and not later. | ||
1898 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | ||
1899 | case " $predeps $postdeps " in | ||
1900 | *" $deplib "*) | ||
1901 | if (${SED} -e '2q' $lib | | ||
1902 | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
1903 | library_names= | ||
1904 | old_library= | ||
1905 | case $lib in | ||
1906 | */* | *\\*) . $lib ;; | ||
1907 | *) . ./$lib ;; | ||
1908 | esac | ||
1909 | for l in $old_library $library_names; do | ||
1910 | ll="$l" | ||
1911 | done | ||
1912 | if test "X$ll" = "X$old_library" ; then # only static version available | ||
1913 | found=no | ||
1914 | ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` | ||
1915 | test "X$ladir" = "X$lib" && ladir="." | ||
1916 | lib=$ladir/$old_library | ||
1917 | if test "$linkmode,$pass" = "prog,link"; then | ||
1918 | compile_deplibs="$deplib $compile_deplibs" | ||
1919 | finalize_deplibs="$deplib $finalize_deplibs" | ||
1920 | else | ||
1921 | deplibs="$deplib $deplibs" | ||
1922 | test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" | ||
1923 | fi | ||
1924 | continue | ||
1925 | fi | ||
1926 | fi | ||
1927 | ;; | ||
1928 | *) ;; | ||
1929 | esac | ||
1930 | fi | ||
1931 | fi | ||
1932 | ;; # -l | ||
1933 | -L*) | ||
1934 | case $linkmode in | ||
1935 | lib) | ||
1936 | deplibs="$deplib $deplibs" | ||
1937 | test "$pass" = conv && continue | ||
1938 | newdependency_libs="$deplib $newdependency_libs" | ||
1939 | newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` | ||
1940 | ;; | ||
1941 | prog) | ||
1942 | if test "$pass" = conv; then | ||
1943 | deplibs="$deplib $deplibs" | ||
1944 | continue | ||
1945 | fi | ||
1946 | if test "$pass" = scan; then | ||
1947 | deplibs="$deplib $deplibs" | ||
1948 | else | ||
1949 | compile_deplibs="$deplib $compile_deplibs" | ||
1950 | finalize_deplibs="$deplib $finalize_deplibs" | ||
1951 | fi | ||
1952 | newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` | ||
1953 | ;; | ||
1954 | *) | ||
1955 | $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 | ||
1956 | ;; | ||
1957 | esac # linkmode | ||
1958 | continue | ||
1959 | ;; # -L | ||
1960 | -R*) | ||
1961 | if test "$pass" = link; then | ||
1962 | dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` | ||
1963 | # Make sure the xrpath contains only unique directories. | ||
1964 | case "$xrpath " in | ||
1965 | *" $dir "*) ;; | ||
1966 | *) xrpath="$xrpath $dir" ;; | ||
1967 | esac | ||
1968 | fi | ||
1969 | deplibs="$deplib $deplibs" | ||
1970 | continue | ||
1971 | ;; | ||
1972 | *.la) lib="$deplib" ;; | ||
1973 | *.$libext) | ||
1974 | if test "$pass" = conv; then | ||
1975 | deplibs="$deplib $deplibs" | ||
1976 | continue | ||
1977 | fi | ||
1978 | case $linkmode in | ||
1979 | lib) | ||
1980 | if test "$deplibs_check_method" != pass_all; then | ||
1981 | $echo | ||
1982 | $echo "*** Warning: Trying to link with static lib archive $deplib." | ||
1983 | $echo "*** I have the capability to make that library automatically link in when" | ||
1984 | $echo "*** you link to this library. But I can only do this if you have a" | ||
1985 | $echo "*** shared version of the library, which you do not appear to have" | ||
1986 | $echo "*** because the file extensions .$libext of this argument makes me believe" | ||
1987 | $echo "*** that it is just a static archive that I should not used here." | ||
1988 | else | ||
1989 | $echo | ||
1990 | $echo "*** Warning: Linking the shared library $output against the" | ||
1991 | $echo "*** static library $deplib is not portable!" | ||
1992 | deplibs="$deplib $deplibs" | ||
1993 | fi | ||
1994 | continue | ||
1995 | ;; | ||
1996 | prog) | ||
1997 | if test "$pass" != link; then | ||
1998 | deplibs="$deplib $deplibs" | ||
1999 | else | ||
2000 | compile_deplibs="$deplib $compile_deplibs" | ||
2001 | finalize_deplibs="$deplib $finalize_deplibs" | ||
2002 | fi | ||
2003 | continue | ||
2004 | ;; | ||
2005 | esac # linkmode | ||
2006 | ;; # *.$libext | ||
2007 | *.lo | *.$objext) | ||
2008 | if test "$pass" = conv; then | ||
2009 | deplibs="$deplib $deplibs" | ||
2010 | elif test "$linkmode" = prog; then | ||
2011 | if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then | ||
2012 | # If there is no dlopen support or we're linking statically, | ||
2013 | # we need to preload. | ||
2014 | newdlprefiles="$newdlprefiles $deplib" | ||
2015 | compile_deplibs="$deplib $compile_deplibs" | ||
2016 | finalize_deplibs="$deplib $finalize_deplibs" | ||
2017 | else | ||
2018 | newdlfiles="$newdlfiles $deplib" | ||
2019 | fi | ||
2020 | fi | ||
2021 | continue | ||
2022 | ;; | ||
2023 | %DEPLIBS%) | ||
2024 | alldeplibs=yes | ||
2025 | continue | ||
2026 | ;; | ||
2027 | esac # case $deplib | ||
2028 | if test "$found" = yes || test -f "$lib"; then : | ||
2029 | else | ||
2030 | $echo "$modename: cannot find the library \`$lib'" 1>&2 | ||
2031 | exit $EXIT_FAILURE | ||
2032 | fi | ||
2033 | |||
2034 | # Check to see that this really is a libtool archive. | ||
2035 | if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | ||
2036 | else | ||
2037 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | ||
2038 | exit $EXIT_FAILURE | ||
2039 | fi | ||
2040 | |||
2041 | ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` | ||
2042 | test "X$ladir" = "X$lib" && ladir="." | ||
2043 | |||
2044 | dlname= | ||
2045 | dlopen= | ||
2046 | dlpreopen= | ||
2047 | libdir= | ||
2048 | library_names= | ||
2049 | old_library= | ||
2050 | # If the library was installed with an old release of libtool, | ||
2051 | # it will not redefine variables installed, or shouldnotlink | ||
2052 | installed=yes | ||
2053 | shouldnotlink=no | ||
2054 | |||
2055 | # Read the .la file | ||
2056 | case $lib in | ||
2057 | */* | *\\*) . $lib ;; | ||
2058 | *) . ./$lib ;; | ||
2059 | esac | ||
2060 | |||
2061 | if test "$linkmode,$pass" = "lib,link" || | ||
2062 | test "$linkmode,$pass" = "prog,scan" || | ||
2063 | { test "$linkmode" != prog && test "$linkmode" != lib; }; then | ||
2064 | test -n "$dlopen" && dlfiles="$dlfiles $dlopen" | ||
2065 | test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" | ||
2066 | fi | ||
2067 | |||
2068 | if test "$pass" = conv; then | ||
2069 | # Only check for convenience libraries | ||
2070 | deplibs="$lib $deplibs" | ||
2071 | if test -z "$libdir"; then | ||
2072 | if test -z "$old_library"; then | ||
2073 | $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 | ||
2074 | exit $EXIT_FAILURE | ||
2075 | fi | ||
2076 | # It is a libtool convenience library, so add in its objects. | ||
2077 | convenience="$convenience $ladir/$objdir/$old_library" | ||
2078 | old_convenience="$old_convenience $ladir/$objdir/$old_library" | ||
2079 | tmp_libs= | ||
2080 | for deplib in $dependency_libs; do | ||
2081 | deplibs="$deplib $deplibs" | ||
2082 | if test "X$duplicate_deps" = "Xyes" ; then | ||
2083 | case "$tmp_libs " in | ||
2084 | *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; | ||
2085 | esac | ||
2086 | fi | ||
2087 | tmp_libs="$tmp_libs $deplib" | ||
2088 | done | ||
2089 | elif test "$linkmode" != prog && test "$linkmode" != lib; then | ||
2090 | $echo "$modename: \`$lib' is not a convenience library" 1>&2 | ||
2091 | exit $EXIT_FAILURE | ||
2092 | fi | ||
2093 | continue | ||
2094 | fi # $pass = conv | ||
2095 | |||
2096 | |||
2097 | # Get the name of the library we link against. | ||
2098 | linklib= | ||
2099 | for l in $old_library $library_names; do | ||
2100 | linklib="$l" | ||
2101 | done | ||
2102 | if test -z "$linklib"; then | ||
2103 | $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 | ||
2104 | exit $EXIT_FAILURE | ||
2105 | fi | ||
2106 | |||
2107 | # This library was specified with -dlopen. | ||
2108 | if test "$pass" = dlopen; then | ||
2109 | if test -z "$libdir"; then | ||
2110 | $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 | ||
2111 | exit $EXIT_FAILURE | ||
2112 | fi | ||
2113 | if test -z "$dlname" || | ||
2114 | test "$dlopen_support" != yes || | ||
2115 | test "$build_libtool_libs" = no; then | ||
2116 | # If there is no dlname, no dlopen support or we're linking | ||
2117 | # statically, we need to preload. We also need to preload any | ||
2118 | # dependent libraries so libltdl's deplib preloader doesn't | ||
2119 | # bomb out in the load deplibs phase. | ||
2120 | dlprefiles="$dlprefiles $lib $dependency_libs" | ||
2121 | else | ||
2122 | newdlfiles="$newdlfiles $lib" | ||
2123 | fi | ||
2124 | continue | ||
2125 | fi # $pass = dlopen | ||
2126 | |||
2127 | # We need an absolute path. | ||
2128 | case $ladir in | ||
2129 | [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; | ||
2130 | *) | ||
2131 | abs_ladir=`cd "$ladir" && pwd` | ||
2132 | if test -z "$abs_ladir"; then | ||
2133 | $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 | ||
2134 | $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 | ||
2135 | abs_ladir="$ladir" | ||
2136 | fi | ||
2137 | ;; | ||
2138 | esac | ||
2139 | laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` | ||
2140 | |||
2141 | # Find the relevant object directory and library name. | ||
2142 | if test "X$installed" = Xyes; then | ||
2143 | if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then | ||
2144 | $echo "$modename: warning: library \`$lib' was moved." 1>&2 | ||
2145 | dir="$ladir" | ||
2146 | absdir="$abs_ladir" | ||
2147 | libdir="$abs_ladir" | ||
2148 | else | ||
2149 | dir="$libdir" | ||
2150 | absdir="$libdir" | ||
2151 | fi | ||
2152 | else | ||
2153 | dir="$ladir/$objdir" | ||
2154 | absdir="$abs_ladir/$objdir" | ||
2155 | # Remove this search path later | ||
2156 | notinst_path="$notinst_path $abs_ladir" | ||
2157 | fi # $installed = yes | ||
2158 | name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` | ||
2159 | |||
2160 | # This library was specified with -dlpreopen. | ||
2161 | if test "$pass" = dlpreopen; then | ||
2162 | if test -z "$libdir"; then | ||
2163 | $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 | ||
2164 | exit $EXIT_FAILURE | ||
2165 | fi | ||
2166 | # Prefer using a static library (so that no silly _DYNAMIC symbols | ||
2167 | # are required to link). | ||
2168 | if test -n "$old_library"; then | ||
2169 | newdlprefiles="$newdlprefiles $dir/$old_library" | ||
2170 | # Otherwise, use the dlname, so that lt_dlopen finds it. | ||
2171 | elif test -n "$dlname"; then | ||
2172 | newdlprefiles="$newdlprefiles $dir/$dlname" | ||
2173 | else | ||
2174 | newdlprefiles="$newdlprefiles $dir/$linklib" | ||
2175 | fi | ||
2176 | fi # $pass = dlpreopen | ||
2177 | |||
2178 | if test -z "$libdir"; then | ||
2179 | # Link the convenience library | ||
2180 | if test "$linkmode" = lib; then | ||
2181 | deplibs="$dir/$old_library $deplibs" | ||
2182 | elif test "$linkmode,$pass" = "prog,link"; then | ||
2183 | compile_deplibs="$dir/$old_library $compile_deplibs" | ||
2184 | finalize_deplibs="$dir/$old_library $finalize_deplibs" | ||
2185 | else | ||
2186 | deplibs="$lib $deplibs" # used for prog,scan pass | ||
2187 | fi | ||
2188 | continue | ||
2189 | fi | ||
2190 | |||
2191 | |||
2192 | if test "$linkmode" = prog && test "$pass" != link; then | ||
2193 | newlib_search_path="$newlib_search_path $ladir" | ||
2194 | deplibs="$lib $deplibs" | ||
2195 | |||
2196 | linkalldeplibs=no | ||
2197 | if test "$link_all_deplibs" != no || test -z "$library_names" || | ||
2198 | test "$build_libtool_libs" = no; then | ||
2199 | linkalldeplibs=yes | ||
2200 | fi | ||
2201 | |||
2202 | tmp_libs= | ||
2203 | for deplib in $dependency_libs; do | ||
2204 | case $deplib in | ||
2205 | -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test | ||
2206 | esac | ||
2207 | # Need to link against all dependency_libs? | ||
2208 | if test "$linkalldeplibs" = yes; then | ||
2209 | deplibs="$deplib $deplibs" | ||
2210 | else | ||
2211 | # Need to hardcode shared library paths | ||
2212 | # or/and link against static libraries | ||
2213 | newdependency_libs="$deplib $newdependency_libs" | ||
2214 | fi | ||
2215 | if test "X$duplicate_deps" = "Xyes" ; then | ||
2216 | case "$tmp_libs " in | ||
2217 | *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; | ||
2218 | esac | ||
2219 | fi | ||
2220 | tmp_libs="$tmp_libs $deplib" | ||
2221 | done # for deplib | ||
2222 | continue | ||
2223 | fi # $linkmode = prog... | ||
2224 | |||
2225 | if test "$linkmode,$pass" = "prog,link"; then | ||
2226 | if test -n "$library_names" && | ||
2227 | { test "$prefer_static_libs" = no || test -z "$old_library"; }; then | ||
2228 | # We need to hardcode the library path | ||
2229 | if test -n "$shlibpath_var"; then | ||
2230 | # Make sure the rpath contains only unique directories. | ||
2231 | case "$temp_rpath " in | ||
2232 | *" $dir "*) ;; | ||
2233 | *" $absdir "*) ;; | ||
2234 | *) temp_rpath="$temp_rpath $dir" ;; | ||
2235 | esac | ||
2236 | fi | ||
2237 | |||
2238 | # Hardcode the library path. | ||
2239 | # Skip directories that are in the system default run-time | ||
2240 | # search path. | ||
2241 | case " $sys_lib_dlsearch_path " in | ||
2242 | *" $absdir "*) ;; | ||
2243 | *) | ||
2244 | case "$compile_rpath " in | ||
2245 | *" $absdir "*) ;; | ||
2246 | *) compile_rpath="$compile_rpath $absdir" | ||
2247 | esac | ||
2248 | ;; | ||
2249 | esac | ||
2250 | case " $sys_lib_dlsearch_path " in | ||
2251 | *" $libdir "*) ;; | ||
2252 | *) | ||
2253 | case "$finalize_rpath " in | ||
2254 | *" $libdir "*) ;; | ||
2255 | *) finalize_rpath="$finalize_rpath $libdir" | ||
2256 | esac | ||
2257 | ;; | ||
2258 | esac | ||
2259 | fi # $linkmode,$pass = prog,link... | ||
2260 | |||
2261 | if test "$alldeplibs" = yes && | ||
2262 | { test "$deplibs_check_method" = pass_all || | ||
2263 | { test "$build_libtool_libs" = yes && | ||
2264 | test -n "$library_names"; }; }; then | ||
2265 | # We only need to search for static libraries | ||
2266 | continue | ||
2267 | fi | ||
2268 | fi | ||
2269 | |||
2270 | link_static=no # Whether the deplib will be linked statically | ||
2271 | if test -n "$library_names" && | ||
2272 | { test "$prefer_static_libs" = no || test -z "$old_library"; }; then | ||
2273 | if test "$installed" = no; then | ||
2274 | notinst_deplibs="$notinst_deplibs $lib" | ||
2275 | need_relink=yes | ||
2276 | fi | ||
2277 | # This is a shared library | ||
2278 | |||
2279 | # Warn about portability, can't link against -module's on | ||
2280 | # some systems (darwin) | ||
2281 | if test "$shouldnotlink" = yes && test "$pass" = link ; then | ||
2282 | $echo | ||
2283 | if test "$linkmode" = prog; then | ||
2284 | $echo "*** Warning: Linking the executable $output against the loadable module" | ||
2285 | else | ||
2286 | $echo "*** Warning: Linking the shared library $output against the loadable module" | ||
2287 | fi | ||
2288 | $echo "*** $linklib is not portable!" | ||
2289 | fi | ||
2290 | if test "$linkmode" = lib && | ||
2291 | test "$hardcode_into_libs" = yes; then | ||
2292 | # Hardcode the library path. | ||
2293 | # Skip directories that are in the system default run-time | ||
2294 | # search path. | ||
2295 | case " $sys_lib_dlsearch_path " in | ||
2296 | *" $absdir "*) ;; | ||
2297 | *) | ||
2298 | case "$compile_rpath " in | ||
2299 | *" $absdir "*) ;; | ||
2300 | *) compile_rpath="$compile_rpath $absdir" | ||
2301 | esac | ||
2302 | ;; | ||
2303 | esac | ||
2304 | case " $sys_lib_dlsearch_path " in | ||
2305 | *" $libdir "*) ;; | ||
2306 | *) | ||
2307 | case "$finalize_rpath " in | ||
2308 | *" $libdir "*) ;; | ||
2309 | *) finalize_rpath="$finalize_rpath $libdir" | ||
2310 | esac | ||
2311 | ;; | ||
2312 | esac | ||
2313 | fi | ||
2314 | |||
2315 | if test -n "$old_archive_from_expsyms_cmds"; then | ||
2316 | # figure out the soname | ||
2317 | set dummy $library_names | ||
2318 | realname="$2" | ||
2319 | shift; shift | ||
2320 | libname=`eval \\$echo \"$libname_spec\"` | ||
2321 | # use dlname if we got it. it's perfectly good, no? | ||
2322 | if test -n "$dlname"; then | ||
2323 | soname="$dlname" | ||
2324 | elif test -n "$soname_spec"; then | ||
2325 | # bleh windows | ||
2326 | case $host in | ||
2327 | *cygwin* | mingw*) | ||
2328 | major=`expr $current - $age` | ||
2329 | versuffix="-$major" | ||
2330 | ;; | ||
2331 | esac | ||
2332 | eval soname=\"$soname_spec\" | ||
2333 | else | ||
2334 | soname="$realname" | ||
2335 | fi | ||
2336 | |||
2337 | # Make a new name for the extract_expsyms_cmds to use | ||
2338 | soroot="$soname" | ||
2339 | soname=`$echo $soroot | ${SED} -e 's/^.*\///'` | ||
2340 | newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" | ||
2341 | |||
2342 | # If the library has no export list, then create one now | ||
2343 | if test -f "$output_objdir/$soname-def"; then : | ||
2344 | else | ||
2345 | $show "extracting exported symbol list from \`$soname'" | ||
2346 | save_ifs="$IFS"; IFS='~' | ||
2347 | cmds=$extract_expsyms_cmds | ||
2348 | for cmd in $cmds; do | ||
2349 | IFS="$save_ifs" | ||
2350 | eval cmd=\"$cmd\" | ||
2351 | $show "$cmd" | ||
2352 | $run eval "$cmd" || exit $? | ||
2353 | done | ||
2354 | IFS="$save_ifs" | ||
2355 | fi | ||
2356 | |||
2357 | # Create $newlib | ||
2358 | if test -f "$output_objdir/$newlib"; then :; else | ||
2359 | $show "generating import library for \`$soname'" | ||
2360 | save_ifs="$IFS"; IFS='~' | ||
2361 | cmds=$old_archive_from_expsyms_cmds | ||
2362 | for cmd in $cmds; do | ||
2363 | IFS="$save_ifs" | ||
2364 | eval cmd=\"$cmd\" | ||
2365 | $show "$cmd" | ||
2366 | $run eval "$cmd" || exit $? | ||
2367 | done | ||
2368 | IFS="$save_ifs" | ||
2369 | fi | ||
2370 | # make sure the library variables are pointing to the new library | ||
2371 | dir=$output_objdir | ||
2372 | linklib=$newlib | ||
2373 | fi # test -n "$old_archive_from_expsyms_cmds" | ||
2374 | |||
2375 | if test "$linkmode" = prog || test "$mode" != relink; then | ||
2376 | add_shlibpath= | ||
2377 | add_dir= | ||
2378 | add= | ||
2379 | lib_linked=yes | ||
2380 | case $hardcode_action in | ||
2381 | immediate | unsupported) | ||
2382 | if test "$hardcode_direct" = no; then | ||
2383 | add="$dir/$linklib" | ||
2384 | case $host in | ||
2385 | *-*-sco3.2v5* ) add_dir="-L$dir" ;; | ||
2386 | *-*-darwin* ) | ||
2387 | # if the lib is a module then we can not link against | ||
2388 | # it, someone is ignoring the new warnings I added | ||
2389 | if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then | ||
2390 | $echo "** Warning, lib $linklib is a module, not a shared library" | ||
2391 | if test -z "$old_library" ; then | ||
2392 | $echo | ||
2393 | $echo "** And there doesn't seem to be a static archive available" | ||
2394 | $echo "** The link will probably fail, sorry" | ||
2395 | else | ||
2396 | add="$dir/$old_library" | ||
2397 | fi | ||
2398 | fi | ||
2399 | esac | ||
2400 | elif test "$hardcode_minus_L" = no; then | ||
2401 | case $host in | ||
2402 | *-*-sunos*) add_shlibpath="$dir" ;; | ||
2403 | esac | ||
2404 | add_dir="-L$dir" | ||
2405 | add="-l$name" | ||
2406 | elif test "$hardcode_shlibpath_var" = no; then | ||
2407 | add_shlibpath="$dir" | ||
2408 | add="-l$name" | ||
2409 | else | ||
2410 | lib_linked=no | ||
2411 | fi | ||
2412 | ;; | ||
2413 | relink) | ||
2414 | if test "$hardcode_direct" = yes; then | ||
2415 | add="$dir/$linklib" | ||
2416 | elif test "$hardcode_minus_L" = yes; then | ||
2417 | add_dir="-L$dir" | ||
2418 | # Try looking first in the location we're being installed to. | ||
2419 | if test -n "$inst_prefix_dir"; then | ||
2420 | case "$libdir" in | ||
2421 | [\\/]*) | ||
2422 | add_dir="$add_dir -L$inst_prefix_dir$libdir" | ||
2423 | ;; | ||
2424 | esac | ||
2425 | fi | ||
2426 | add="-l$name" | ||
2427 | elif test "$hardcode_shlibpath_var" = yes; then | ||
2428 | add_shlibpath="$dir" | ||
2429 | add="-l$name" | ||
2430 | else | ||
2431 | lib_linked=no | ||
2432 | fi | ||
2433 | ;; | ||
2434 | *) lib_linked=no ;; | ||
2435 | esac | ||
2436 | |||
2437 | if test "$lib_linked" != yes; then | ||
2438 | $echo "$modename: configuration error: unsupported hardcode properties" | ||
2439 | exit $EXIT_FAILURE | ||
2440 | fi | ||
2441 | |||
2442 | if test -n "$add_shlibpath"; then | ||
2443 | case :$compile_shlibpath: in | ||
2444 | *":$add_shlibpath:"*) ;; | ||
2445 | *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; | ||
2446 | esac | ||
2447 | fi | ||
2448 | if test "$linkmode" = prog; then | ||
2449 | test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" | ||
2450 | test -n "$add" && compile_deplibs="$add $compile_deplibs" | ||
2451 | else | ||
2452 | test -n "$add_dir" && deplibs="$add_dir $deplibs" | ||
2453 | test -n "$add" && deplibs="$add $deplibs" | ||
2454 | if test "$hardcode_direct" != yes && \ | ||
2455 | test "$hardcode_minus_L" != yes && \ | ||
2456 | test "$hardcode_shlibpath_var" = yes; then | ||
2457 | case :$finalize_shlibpath: in | ||
2458 | *":$libdir:"*) ;; | ||
2459 | *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; | ||
2460 | esac | ||
2461 | fi | ||
2462 | fi | ||
2463 | fi | ||
2464 | |||
2465 | if test "$linkmode" = prog || test "$mode" = relink; then | ||
2466 | add_shlibpath= | ||
2467 | add_dir= | ||
2468 | add= | ||
2469 | # Finalize command for both is simple: just hardcode it. | ||
2470 | if test "$hardcode_direct" = yes; then | ||
2471 | add="$libdir/$linklib" | ||
2472 | elif test "$hardcode_minus_L" = yes; then | ||
2473 | add_dir="-L$libdir" | ||
2474 | add="-l$name" | ||
2475 | elif test "$hardcode_shlibpath_var" = yes; then | ||
2476 | case :$finalize_shlibpath: in | ||
2477 | *":$libdir:"*) ;; | ||
2478 | *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; | ||
2479 | esac | ||
2480 | add="-l$name" | ||
2481 | elif test "$hardcode_automatic" = yes; then | ||
2482 | if test -n "$inst_prefix_dir" && | ||
2483 | test -f "$inst_prefix_dir$libdir/$linklib" ; then | ||
2484 | add="$inst_prefix_dir$libdir/$linklib" | ||
2485 | else | ||
2486 | add="$libdir/$linklib" | ||
2487 | fi | ||
2488 | else | ||
2489 | # We cannot seem to hardcode it, guess we'll fake it. | ||
2490 | add_dir="-L$libdir" | ||
2491 | # Try looking first in the location we're being installed to. | ||
2492 | if test -n "$inst_prefix_dir"; then | ||
2493 | case "$libdir" in | ||
2494 | [\\/]*) | ||
2495 | add_dir="$add_dir -L$inst_prefix_dir$libdir" | ||
2496 | ;; | ||
2497 | esac | ||
2498 | fi | ||
2499 | add="-l$name" | ||
2500 | fi | ||
2501 | |||
2502 | if test "$linkmode" = prog; then | ||
2503 | test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" | ||
2504 | test -n "$add" && finalize_deplibs="$add $finalize_deplibs" | ||
2505 | else | ||
2506 | test -n "$add_dir" && deplibs="$add_dir $deplibs" | ||
2507 | test -n "$add" && deplibs="$add $deplibs" | ||
2508 | fi | ||
2509 | fi | ||
2510 | elif test "$linkmode" = prog; then | ||
2511 | # Here we assume that one of hardcode_direct or hardcode_minus_L | ||
2512 | # is not unsupported. This is valid on all known static and | ||
2513 | # shared platforms. | ||
2514 | if test "$hardcode_direct" != unsupported; then | ||
2515 | test -n "$old_library" && linklib="$old_library" | ||
2516 | compile_deplibs="$dir/$linklib $compile_deplibs" | ||
2517 | finalize_deplibs="$dir/$linklib $finalize_deplibs" | ||
2518 | else | ||
2519 | compile_deplibs="-l$name -L$dir $compile_deplibs" | ||
2520 | finalize_deplibs="-l$name -L$dir $finalize_deplibs" | ||
2521 | fi | ||
2522 | elif test "$build_libtool_libs" = yes; then | ||
2523 | # Not a shared library | ||
2524 | if test "$deplibs_check_method" != pass_all; then | ||
2525 | # We're trying link a shared library against a static one | ||
2526 | # but the system doesn't support it. | ||
2527 | |||
2528 | # Just print a warning and add the library to dependency_libs so | ||
2529 | # that the program can be linked against the static library. | ||
2530 | $echo | ||
2531 | $echo "*** Warning: This system can not link to static lib archive $lib." | ||
2532 | $echo "*** I have the capability to make that library automatically link in when" | ||
2533 | $echo "*** you link to this library. But I can only do this if you have a" | ||
2534 | $echo "*** shared version of the library, which you do not appear to have." | ||
2535 | if test "$module" = yes; then | ||
2536 | $echo "*** But as you try to build a module library, libtool will still create " | ||
2537 | $echo "*** a static module, that should work as long as the dlopening application" | ||
2538 | $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." | ||
2539 | if test -z "$global_symbol_pipe"; then | ||
2540 | $echo | ||
2541 | $echo "*** However, this would only work if libtool was able to extract symbol" | ||
2542 | $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" | ||
2543 | $echo "*** not find such a program. So, this module is probably useless." | ||
2544 | $echo "*** \`nm' from GNU binutils and a full rebuild may help." | ||
2545 | fi | ||
2546 | if test "$build_old_libs" = no; then | ||
2547 | build_libtool_libs=module | ||
2548 | build_old_libs=yes | ||
2549 | else | ||
2550 | build_libtool_libs=no | ||
2551 | fi | ||
2552 | fi | ||
2553 | else | ||
2554 | convenience="$convenience $dir/$old_library" | ||
2555 | old_convenience="$old_convenience $dir/$old_library" | ||
2556 | deplibs="$dir/$old_library $deplibs" | ||
2557 | link_static=yes | ||
2558 | fi | ||
2559 | fi # link shared/static library? | ||
2560 | |||
2561 | if test "$linkmode" = lib; then | ||
2562 | if test -n "$dependency_libs" && | ||
2563 | { test "$hardcode_into_libs" != yes || | ||
2564 | test "$build_old_libs" = yes || | ||
2565 | test "$link_static" = yes; }; then | ||
2566 | # Extract -R from dependency_libs | ||
2567 | temp_deplibs= | ||
2568 | for libdir in $dependency_libs; do | ||
2569 | case $libdir in | ||
2570 | -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` | ||
2571 | case " $xrpath " in | ||
2572 | *" $temp_xrpath "*) ;; | ||
2573 | *) xrpath="$xrpath $temp_xrpath";; | ||
2574 | esac;; | ||
2575 | *) temp_deplibs="$temp_deplibs $libdir";; | ||
2576 | esac | ||
2577 | done | ||
2578 | dependency_libs="$temp_deplibs" | ||
2579 | fi | ||
2580 | |||
2581 | newlib_search_path="$newlib_search_path $absdir" | ||
2582 | # Link against this library | ||
2583 | test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" | ||
2584 | # ... and its dependency_libs | ||
2585 | tmp_libs= | ||
2586 | for deplib in $dependency_libs; do | ||
2587 | newdependency_libs="$deplib $newdependency_libs" | ||
2588 | if test "X$duplicate_deps" = "Xyes" ; then | ||
2589 | case "$tmp_libs " in | ||
2590 | *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; | ||
2591 | esac | ||
2592 | fi | ||
2593 | tmp_libs="$tmp_libs $deplib" | ||
2594 | done | ||
2595 | |||
2596 | if test "$link_all_deplibs" != no; then | ||
2597 | # Add the search paths of all dependency libraries | ||
2598 | for deplib in $dependency_libs; do | ||
2599 | case $deplib in | ||
2600 | -L*) path="$deplib" ;; | ||
2601 | *.la) | ||
2602 | dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` | ||
2603 | test "X$dir" = "X$deplib" && dir="." | ||
2604 | # We need an absolute path. | ||
2605 | case $dir in | ||
2606 | [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; | ||
2607 | *) | ||
2608 | absdir=`cd "$dir" && pwd` | ||
2609 | if test -z "$absdir"; then | ||
2610 | $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 | ||
2611 | absdir="$dir" | ||
2612 | fi | ||
2613 | ;; | ||
2614 | esac | ||
2615 | if grep "^installed=no" $deplib > /dev/null; then | ||
2616 | path="$absdir/$objdir" | ||
2617 | else | ||
2618 | eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` | ||
2619 | if test -z "$libdir"; then | ||
2620 | $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 | ||
2621 | exit $EXIT_FAILURE | ||
2622 | fi | ||
2623 | if test "$absdir" != "$libdir"; then | ||
2624 | $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 | ||
2625 | fi | ||
2626 | path="$absdir" | ||
2627 | fi | ||
2628 | depdepl= | ||
2629 | case $host in | ||
2630 | *-*-darwin*) | ||
2631 | # we do not want to link against static libs, | ||
2632 | # but need to link against shared | ||
2633 | eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` | ||
2634 | if test -n "$deplibrary_names" ; then | ||
2635 | for tmp in $deplibrary_names ; do | ||
2636 | depdepl=$tmp | ||
2637 | done | ||
2638 | if test -f "$path/$depdepl" ; then | ||
2639 | depdepl="$path/$depdepl" | ||
2640 | fi | ||
2641 | # do not add paths which are already there | ||
2642 | case " $newlib_search_path " in | ||
2643 | *" $path "*) ;; | ||
2644 | *) newlib_search_path="$newlib_search_path $path";; | ||
2645 | esac | ||
2646 | fi | ||
2647 | path="" | ||
2648 | ;; | ||
2649 | *) | ||
2650 | path="-L$path" | ||
2651 | ;; | ||
2652 | esac | ||
2653 | ;; | ||
2654 | -l*) | ||
2655 | case $host in | ||
2656 | *-*-darwin*) | ||
2657 | # Again, we only want to link against shared libraries | ||
2658 | eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` | ||
2659 | for tmp in $newlib_search_path ; do | ||
2660 | if test -f "$tmp/lib$tmp_libs.dylib" ; then | ||
2661 | eval depdepl="$tmp/lib$tmp_libs.dylib" | ||
2662 | break | ||
2663 | fi | ||
2664 | done | ||
2665 | path="" | ||
2666 | ;; | ||
2667 | *) continue ;; | ||
2668 | esac | ||
2669 | ;; | ||
2670 | *) continue ;; | ||
2671 | esac | ||
2672 | case " $deplibs " in | ||
2673 | *" $depdepl "*) ;; | ||
2674 | *) deplibs="$depdepl $deplibs" ;; | ||
2675 | esac | ||
2676 | case " $deplibs " in | ||
2677 | *" $path "*) ;; | ||
2678 | *) deplibs="$deplibs $path" ;; | ||
2679 | esac | ||
2680 | done | ||
2681 | fi # link_all_deplibs != no | ||
2682 | fi # linkmode = lib | ||
2683 | done # for deplib in $libs | ||
2684 | dependency_libs="$newdependency_libs" | ||
2685 | if test "$pass" = dlpreopen; then | ||
2686 | # Link the dlpreopened libraries before other libraries | ||
2687 | for deplib in $save_deplibs; do | ||
2688 | deplibs="$deplib $deplibs" | ||
2689 | done | ||
2690 | fi | ||
2691 | if test "$pass" != dlopen; then | ||
2692 | if test "$pass" != conv; then | ||
2693 | # Make sure lib_search_path contains only unique directories. | ||
2694 | lib_search_path= | ||
2695 | for dir in $newlib_search_path; do | ||
2696 | case "$lib_search_path " in | ||
2697 | *" $dir "*) ;; | ||
2698 | *) lib_search_path="$lib_search_path $dir" ;; | ||
2699 | esac | ||
2700 | done | ||
2701 | newlib_search_path= | ||
2702 | fi | ||
2703 | |||
2704 | if test "$linkmode,$pass" != "prog,link"; then | ||
2705 | vars="deplibs" | ||
2706 | else | ||
2707 | vars="compile_deplibs finalize_deplibs" | ||
2708 | fi | ||
2709 | for var in $vars dependency_libs; do | ||
2710 | # Add libraries to $var in reverse order | ||
2711 | eval tmp_libs=\"\$$var\" | ||
2712 | new_libs= | ||
2713 | for deplib in $tmp_libs; do | ||
2714 | # FIXME: Pedantically, this is the right thing to do, so | ||
2715 | # that some nasty dependency loop isn't accidentally | ||
2716 | # broken: | ||
2717 | #new_libs="$deplib $new_libs" | ||
2718 | # Pragmatically, this seems to cause very few problems in | ||
2719 | # practice: | ||
2720 | case $deplib in | ||
2721 | -L*) new_libs="$deplib $new_libs" ;; | ||
2722 | -R*) ;; | ||
2723 | *) | ||
2724 | # And here is the reason: when a library appears more | ||
2725 | # than once as an explicit dependence of a library, or | ||
2726 | # is implicitly linked in more than once by the | ||
2727 | # compiler, it is considered special, and multiple | ||
2728 | # occurrences thereof are not removed. Compare this | ||
2729 | # with having the same library being listed as a | ||
2730 | # dependency of multiple other libraries: in this case, | ||
2731 | # we know (pedantically, we assume) the library does not | ||
2732 | # need to be listed more than once, so we keep only the | ||
2733 | # last copy. This is not always right, but it is rare | ||
2734 | # enough that we require users that really mean to play | ||
2735 | # such unportable linking tricks to link the library | ||
2736 | # using -Wl,-lname, so that libtool does not consider it | ||
2737 | # for duplicate removal. | ||
2738 | case " $specialdeplibs " in | ||
2739 | *" $deplib "*) new_libs="$deplib $new_libs" ;; | ||
2740 | *) | ||
2741 | case " $new_libs " in | ||
2742 | *" $deplib "*) ;; | ||
2743 | *) new_libs="$deplib $new_libs" ;; | ||
2744 | esac | ||
2745 | ;; | ||
2746 | esac | ||
2747 | ;; | ||
2748 | esac | ||
2749 | done | ||
2750 | tmp_libs= | ||
2751 | for deplib in $new_libs; do | ||
2752 | case $deplib in | ||
2753 | -L*) | ||
2754 | case " $tmp_libs " in | ||
2755 | *" $deplib "*) ;; | ||
2756 | *) tmp_libs="$tmp_libs $deplib" ;; | ||
2757 | esac | ||
2758 | ;; | ||
2759 | *) tmp_libs="$tmp_libs $deplib" ;; | ||
2760 | esac | ||
2761 | done | ||
2762 | eval $var=\"$tmp_libs\" | ||
2763 | done # for var | ||
2764 | fi | ||
2765 | # Last step: remove runtime libs from dependency_libs | ||
2766 | # (they stay in deplibs) | ||
2767 | tmp_libs= | ||
2768 | for i in $dependency_libs ; do | ||
2769 | case " $predeps $postdeps $compiler_lib_search_path " in | ||
2770 | *" $i "*) | ||
2771 | i="" | ||
2772 | ;; | ||
2773 | esac | ||
2774 | if test -n "$i" ; then | ||
2775 | tmp_libs="$tmp_libs $i" | ||
2776 | fi | ||
2777 | done | ||
2778 | dependency_libs=$tmp_libs | ||
2779 | done # for pass | ||
2780 | if test "$linkmode" = prog; then | ||
2781 | dlfiles="$newdlfiles" | ||
2782 | dlprefiles="$newdlprefiles" | ||
2783 | fi | ||
2784 | |||
2785 | case $linkmode in | ||
2786 | oldlib) | ||
2787 | if test -n "$deplibs"; then | ||
2788 | $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 | ||
2789 | fi | ||
2790 | |||
2791 | if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | ||
2792 | $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 | ||
2793 | fi | ||
2794 | |||
2795 | if test -n "$rpath"; then | ||
2796 | $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 | ||
2797 | fi | ||
2798 | |||
2799 | if test -n "$xrpath"; then | ||
2800 | $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 | ||
2801 | fi | ||
2802 | |||
2803 | if test -n "$vinfo"; then | ||
2804 | $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 | ||
2805 | fi | ||
2806 | |||
2807 | if test -n "$release"; then | ||
2808 | $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 | ||
2809 | fi | ||
2810 | |||
2811 | if test -n "$export_symbols" || test -n "$export_symbols_regex"; then | ||
2812 | $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 | ||
2813 | fi | ||
2814 | |||
2815 | # Now set the variables for building old libraries. | ||
2816 | build_libtool_libs=no | ||
2817 | oldlibs="$output" | ||
2818 | objs="$objs$old_deplibs" | ||
2819 | ;; | ||
2820 | |||
2821 | lib) | ||
2822 | # Make sure we only generate libraries of the form `libNAME.la'. | ||
2823 | case $outputname in | ||
2824 | lib*) | ||
2825 | name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` | ||
2826 | eval shared_ext=\"$shrext_cmds\" | ||
2827 | eval libname=\"$libname_spec\" | ||
2828 | ;; | ||
2829 | *) | ||
2830 | if test "$module" = no; then | ||
2831 | $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 | ||
2832 | $echo "$help" 1>&2 | ||
2833 | exit $EXIT_FAILURE | ||
2834 | fi | ||
2835 | if test "$need_lib_prefix" != no; then | ||
2836 | # Add the "lib" prefix for modules if required | ||
2837 | name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` | ||
2838 | eval shared_ext=\"$shrext_cmds\" | ||
2839 | eval libname=\"$libname_spec\" | ||
2840 | else | ||
2841 | libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` | ||
2842 | fi | ||
2843 | ;; | ||
2844 | esac | ||
2845 | |||
2846 | if test -n "$objs"; then | ||
2847 | if test "$deplibs_check_method" != pass_all; then | ||
2848 | $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 | ||
2849 | exit $EXIT_FAILURE | ||
2850 | else | ||
2851 | $echo | ||
2852 | $echo "*** Warning: Linking the shared library $output against the non-libtool" | ||
2853 | $echo "*** objects $objs is not portable!" | ||
2854 | libobjs="$libobjs $objs" | ||
2855 | fi | ||
2856 | fi | ||
2857 | |||
2858 | if test "$dlself" != no; then | ||
2859 | $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 | ||
2860 | fi | ||
2861 | |||
2862 | set dummy $rpath | ||
2863 | if test "$#" -gt 2; then | ||
2864 | $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 | ||
2865 | fi | ||
2866 | install_libdir="$2" | ||
2867 | |||
2868 | oldlibs= | ||
2869 | if test -z "$rpath"; then | ||
2870 | if test "$build_libtool_libs" = yes; then | ||
2871 | # Building a libtool convenience library. | ||
2872 | # Some compilers have problems with a `.al' extension so | ||
2873 | # convenience libraries should have the same extension an | ||
2874 | # archive normally would. | ||
2875 | oldlibs="$output_objdir/$libname.$libext $oldlibs" | ||
2876 | build_libtool_libs=convenience | ||
2877 | build_old_libs=yes | ||
2878 | fi | ||
2879 | |||
2880 | if test -n "$vinfo"; then | ||
2881 | $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 | ||
2882 | fi | ||
2883 | |||
2884 | if test -n "$release"; then | ||
2885 | $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 | ||
2886 | fi | ||
2887 | else | ||
2888 | |||
2889 | # Parse the version information argument. | ||
2890 | save_ifs="$IFS"; IFS=':' | ||
2891 | set dummy $vinfo 0 0 0 | ||
2892 | IFS="$save_ifs" | ||
2893 | |||
2894 | if test -n "$8"; then | ||
2895 | $echo "$modename: too many parameters to \`-version-info'" 1>&2 | ||
2896 | $echo "$help" 1>&2 | ||
2897 | exit $EXIT_FAILURE | ||
2898 | fi | ||
2899 | |||
2900 | # convert absolute version numbers to libtool ages | ||
2901 | # this retains compatibility with .la files and attempts | ||
2902 | # to make the code below a bit more comprehensible | ||
2903 | |||
2904 | case $vinfo_number in | ||
2905 | yes) | ||
2906 | number_major="$2" | ||
2907 | number_minor="$3" | ||
2908 | number_revision="$4" | ||
2909 | # | ||
2910 | # There are really only two kinds -- those that | ||
2911 | # use the current revision as the major version | ||
2912 | # and those that subtract age and use age as | ||
2913 | # a minor version. But, then there is irix | ||
2914 | # which has an extra 1 added just for fun | ||
2915 | # | ||
2916 | case $version_type in | ||
2917 | darwin|linux|osf|windows) | ||
2918 | current=`expr $number_major + $number_minor` | ||
2919 | age="$number_minor" | ||
2920 | revision="$number_revision" | ||
2921 | ;; | ||
2922 | freebsd-aout|freebsd-elf|sunos) | ||
2923 | current="$number_major" | ||
2924 | revision="$number_minor" | ||
2925 | age="0" | ||
2926 | ;; | ||
2927 | irix|nonstopux) | ||
2928 | current=`expr $number_major + $number_minor - 1` | ||
2929 | age="$number_minor" | ||
2930 | revision="$number_minor" | ||
2931 | ;; | ||
2932 | *) | ||
2933 | $echo "$modename: unknown library version type \`$version_type'" 1>&2 | ||
2934 | $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 | ||
2935 | exit $EXIT_FAILURE | ||
2936 | ;; | ||
2937 | esac | ||
2938 | ;; | ||
2939 | no) | ||
2940 | current="$2" | ||
2941 | revision="$3" | ||
2942 | age="$4" | ||
2943 | ;; | ||
2944 | esac | ||
2945 | |||
2946 | # Check that each of the things are valid numbers. | ||
2947 | case $current in | ||
2948 | 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]) ;; | ||
2949 | *) | ||
2950 | $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2 | ||
2951 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
2952 | exit $EXIT_FAILURE | ||
2953 | ;; | ||
2954 | esac | ||
2955 | |||
2956 | case $revision in | ||
2957 | 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]) ;; | ||
2958 | *) | ||
2959 | $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2 | ||
2960 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
2961 | exit $EXIT_FAILURE | ||
2962 | ;; | ||
2963 | esac | ||
2964 | |||
2965 | case $age in | ||
2966 | 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]) ;; | ||
2967 | *) | ||
2968 | $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2 | ||
2969 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
2970 | exit $EXIT_FAILURE | ||
2971 | ;; | ||
2972 | esac | ||
2973 | |||
2974 | if test "$age" -gt "$current"; then | ||
2975 | $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 | ||
2976 | $echo "$modename: \`$vinfo' is not valid version information" 1>&2 | ||
2977 | exit $EXIT_FAILURE | ||
2978 | fi | ||
2979 | |||
2980 | # Calculate the version variables. | ||
2981 | major= | ||
2982 | versuffix= | ||
2983 | verstring= | ||
2984 | case $version_type in | ||
2985 | none) ;; | ||
2986 | |||
2987 | darwin) | ||
2988 | # Like Linux, but with the current version available in | ||
2989 | # verstring for coding it into the library header | ||
2990 | major=.`expr $current - $age` | ||
2991 | versuffix="$major.$age.$revision" | ||
2992 | # Darwin ld doesn't like 0 for these options... | ||
2993 | minor_current=`expr $current + 1` | ||
2994 | verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" | ||
2995 | ;; | ||
2996 | |||
2997 | freebsd-aout) | ||
2998 | major=".$current" | ||
2999 | versuffix=".$current.$revision"; | ||
3000 | ;; | ||
3001 | |||
3002 | freebsd-elf) | ||
3003 | major=".$current" | ||
3004 | versuffix=".$current"; | ||
3005 | ;; | ||
3006 | |||
3007 | irix | nonstopux) | ||
3008 | major=`expr $current - $age + 1` | ||
3009 | |||
3010 | case $version_type in | ||
3011 | nonstopux) verstring_prefix=nonstopux ;; | ||
3012 | *) verstring_prefix=sgi ;; | ||
3013 | esac | ||
3014 | verstring="$verstring_prefix$major.$revision" | ||
3015 | |||
3016 | # Add in all the interfaces that we are compatible with. | ||
3017 | loop=$revision | ||
3018 | while test "$loop" -ne 0; do | ||
3019 | iface=`expr $revision - $loop` | ||
3020 | loop=`expr $loop - 1` | ||
3021 | verstring="$verstring_prefix$major.$iface:$verstring" | ||
3022 | done | ||
3023 | |||
3024 | # Before this point, $major must not contain `.'. | ||
3025 | major=.$major | ||
3026 | versuffix="$major.$revision" | ||
3027 | ;; | ||
3028 | |||
3029 | linux) | ||
3030 | major=.`expr $current - $age` | ||
3031 | versuffix="$major.$age.$revision" | ||
3032 | ;; | ||
3033 | |||
3034 | osf) | ||
3035 | major=.`expr $current - $age` | ||
3036 | versuffix=".$current.$age.$revision" | ||
3037 | verstring="$current.$age.$revision" | ||
3038 | |||
3039 | # Add in all the interfaces that we are compatible with. | ||
3040 | loop=$age | ||
3041 | while test "$loop" -ne 0; do | ||
3042 | iface=`expr $current - $loop` | ||
3043 | loop=`expr $loop - 1` | ||
3044 | verstring="$verstring:${iface}.0" | ||
3045 | done | ||
3046 | |||
3047 | # Make executables depend on our current version. | ||
3048 | verstring="$verstring:${current}.0" | ||
3049 | ;; | ||
3050 | |||
3051 | sunos) | ||
3052 | major=".$current" | ||
3053 | versuffix=".$current.$revision" | ||
3054 | ;; | ||
3055 | |||
3056 | windows) | ||
3057 | # Use '-' rather than '.', since we only want one | ||
3058 | # extension on DOS 8.3 filesystems. | ||
3059 | major=`expr $current - $age` | ||
3060 | versuffix="-$major" | ||
3061 | ;; | ||
3062 | |||
3063 | *) | ||
3064 | $echo "$modename: unknown library version type \`$version_type'" 1>&2 | ||
3065 | $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 | ||
3066 | exit $EXIT_FAILURE | ||
3067 | ;; | ||
3068 | esac | ||
3069 | |||
3070 | # Clear the version info if we defaulted, and they specified a release. | ||
3071 | if test -z "$vinfo" && test -n "$release"; then | ||
3072 | major= | ||
3073 | case $version_type in | ||
3074 | darwin) | ||
3075 | # we can't check for "0.0" in archive_cmds due to quoting | ||
3076 | # problems, so we reset it completely | ||
3077 | verstring= | ||
3078 | ;; | ||
3079 | *) | ||
3080 | verstring="0.0" | ||
3081 | ;; | ||
3082 | esac | ||
3083 | if test "$need_version" = no; then | ||
3084 | versuffix= | ||
3085 | else | ||
3086 | versuffix=".0.0" | ||
3087 | fi | ||
3088 | fi | ||
3089 | |||
3090 | # Remove version info from name if versioning should be avoided | ||
3091 | if test "$avoid_version" = yes && test "$need_version" = no; then | ||
3092 | major= | ||
3093 | versuffix= | ||
3094 | verstring="" | ||
3095 | fi | ||
3096 | |||
3097 | # Check to see if the archive will have undefined symbols. | ||
3098 | if test "$allow_undefined" = yes; then | ||
3099 | if test "$allow_undefined_flag" = unsupported; then | ||
3100 | $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 | ||
3101 | build_libtool_libs=no | ||
3102 | build_old_libs=yes | ||
3103 | fi | ||
3104 | else | ||
3105 | # Don't allow undefined symbols. | ||
3106 | allow_undefined_flag="$no_undefined_flag" | ||
3107 | fi | ||
3108 | fi | ||
3109 | |||
3110 | if test "$mode" != relink; then | ||
3111 | # Remove our outputs, but don't remove object files since they | ||
3112 | # may have been created when compiling PIC objects. | ||
3113 | removelist= | ||
3114 | tempremovelist=`$echo "$output_objdir/*"` | ||
3115 | for p in $tempremovelist; do | ||
3116 | case $p in | ||
3117 | *.$objext) | ||
3118 | ;; | ||
3119 | $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) | ||
3120 | if test "X$precious_files_regex" != "X"; then | ||
3121 | if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 | ||
3122 | then | ||
3123 | continue | ||
3124 | fi | ||
3125 | fi | ||
3126 | removelist="$removelist $p" | ||
3127 | ;; | ||
3128 | *) ;; | ||
3129 | esac | ||
3130 | done | ||
3131 | if test -n "$removelist"; then | ||
3132 | $show "${rm}r $removelist" | ||
3133 | $run ${rm}r $removelist | ||
3134 | fi | ||
3135 | fi | ||
3136 | |||
3137 | # Now set the variables for building old libraries. | ||
3138 | if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then | ||
3139 | oldlibs="$oldlibs $output_objdir/$libname.$libext" | ||
3140 | |||
3141 | # Transform .lo files to .o files. | ||
3142 | oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` | ||
3143 | fi | ||
3144 | |||
3145 | # Eliminate all temporary directories. | ||
3146 | for path in $notinst_path; do | ||
3147 | lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'` | ||
3148 | deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'` | ||
3149 | dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'` | ||
3150 | done | ||
3151 | |||
3152 | if test -n "$xrpath"; then | ||
3153 | # If the user specified any rpath flags, then add them. | ||
3154 | temp_xrpath= | ||
3155 | for libdir in $xrpath; do | ||
3156 | temp_xrpath="$temp_xrpath -R$libdir" | ||
3157 | case "$finalize_rpath " in | ||
3158 | *" $libdir "*) ;; | ||
3159 | *) finalize_rpath="$finalize_rpath $libdir" ;; | ||
3160 | esac | ||
3161 | done | ||
3162 | if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then | ||
3163 | dependency_libs="$temp_xrpath $dependency_libs" | ||
3164 | fi | ||
3165 | fi | ||
3166 | |||
3167 | # Make sure dlfiles contains only unique files that won't be dlpreopened | ||
3168 | old_dlfiles="$dlfiles" | ||
3169 | dlfiles= | ||
3170 | for lib in $old_dlfiles; do | ||
3171 | case " $dlprefiles $dlfiles " in | ||
3172 | *" $lib "*) ;; | ||
3173 | *) dlfiles="$dlfiles $lib" ;; | ||
3174 | esac | ||
3175 | done | ||
3176 | |||
3177 | # Make sure dlprefiles contains only unique files | ||
3178 | old_dlprefiles="$dlprefiles" | ||
3179 | dlprefiles= | ||
3180 | for lib in $old_dlprefiles; do | ||
3181 | case "$dlprefiles " in | ||
3182 | *" $lib "*) ;; | ||
3183 | *) dlprefiles="$dlprefiles $lib" ;; | ||
3184 | esac | ||
3185 | done | ||
3186 | |||
3187 | if test "$build_libtool_libs" = yes; then | ||
3188 | if test -n "$rpath"; then | ||
3189 | case $host in | ||
3190 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) | ||
3191 | # these systems don't actually have a c library (as such)! | ||
3192 | ;; | ||
3193 | *-*-rhapsody* | *-*-darwin1.[012]) | ||
3194 | # Rhapsody C library is in the System framework | ||
3195 | deplibs="$deplibs -framework System" | ||
3196 | ;; | ||
3197 | *-*-netbsd*) | ||
3198 | # Don't link with libc until the a.out ld.so is fixed. | ||
3199 | ;; | ||
3200 | *-*-openbsd* | *-*-freebsd*) | ||
3201 | # Do not include libc due to us having libc/libc_r. | ||
3202 | test "X$arg" = "X-lc" && continue | ||
3203 | ;; | ||
3204 | *) | ||
3205 | # Add libc to deplibs on all other systems if necessary. | ||
3206 | if test "$build_libtool_need_lc" = "yes"; then | ||
3207 | deplibs="$deplibs -lc" | ||
3208 | fi | ||
3209 | ;; | ||
3210 | esac | ||
3211 | fi | ||
3212 | |||
3213 | # Transform deplibs into only deplibs that can be linked in shared. | ||
3214 | name_save=$name | ||
3215 | libname_save=$libname | ||
3216 | release_save=$release | ||
3217 | versuffix_save=$versuffix | ||
3218 | major_save=$major | ||
3219 | # I'm not sure if I'm treating the release correctly. I think | ||
3220 | # release should show up in the -l (ie -lgmp5) so we don't want to | ||
3221 | # add it in twice. Is that correct? | ||
3222 | release="" | ||
3223 | versuffix="" | ||
3224 | major="" | ||
3225 | newdeplibs= | ||
3226 | droppeddeps=no | ||
3227 | case $deplibs_check_method in | ||
3228 | pass_all) | ||
3229 | # Don't check for shared/static. Everything works. | ||
3230 | # This might be a little naive. We might want to check | ||
3231 | # whether the library exists or not. But this is on | ||
3232 | # osf3 & osf4 and I'm not really sure... Just | ||
3233 | # implementing what was already the behavior. | ||
3234 | newdeplibs=$deplibs | ||
3235 | ;; | ||
3236 | test_compile) | ||
3237 | # This code stresses the "libraries are programs" paradigm to its | ||
3238 | # limits. Maybe even breaks it. We compile a program, linking it | ||
3239 | # against the deplibs as a proxy for the library. Then we can check | ||
3240 | # whether they linked in statically or dynamically with ldd. | ||
3241 | $rm conftest.c | ||
3242 | cat > conftest.c <<EOF | ||
3243 | int main() { return 0; } | ||
3244 | EOF | ||
3245 | $rm conftest | ||
3246 | $LTCC -o conftest conftest.c $deplibs | ||
3247 | if test "$?" -eq 0 ; then | ||
3248 | ldd_output=`ldd conftest` | ||
3249 | for i in $deplibs; do | ||
3250 | name="`expr $i : '-l\(.*\)'`" | ||
3251 | # If $name is empty we are operating on a -L argument. | ||
3252 | if test "$name" != "" && test "$name" -ne "0"; then | ||
3253 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | ||
3254 | case " $predeps $postdeps " in | ||
3255 | *" $i "*) | ||
3256 | newdeplibs="$newdeplibs $i" | ||
3257 | i="" | ||
3258 | ;; | ||
3259 | esac | ||
3260 | fi | ||
3261 | if test -n "$i" ; then | ||
3262 | libname=`eval \\$echo \"$libname_spec\"` | ||
3263 | deplib_matches=`eval \\$echo \"$library_names_spec\"` | ||
3264 | set dummy $deplib_matches | ||
3265 | deplib_match=$2 | ||
3266 | if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then | ||
3267 | newdeplibs="$newdeplibs $i" | ||
3268 | else | ||
3269 | droppeddeps=yes | ||
3270 | $echo | ||
3271 | $echo "*** Warning: dynamic linker does not accept needed library $i." | ||
3272 | $echo "*** I have the capability to make that library automatically link in when" | ||
3273 | $echo "*** you link to this library. But I can only do this if you have a" | ||
3274 | $echo "*** shared version of the library, which I believe you do not have" | ||
3275 | $echo "*** because a test_compile did reveal that the linker did not use it for" | ||
3276 | $echo "*** its dynamic dependency list that programs get resolved with at runtime." | ||
3277 | fi | ||
3278 | fi | ||
3279 | else | ||
3280 | newdeplibs="$newdeplibs $i" | ||
3281 | fi | ||
3282 | done | ||
3283 | else | ||
3284 | # Error occurred in the first compile. Let's try to salvage | ||
3285 | # the situation: Compile a separate program for each library. | ||
3286 | for i in $deplibs; do | ||
3287 | name="`expr $i : '-l\(.*\)'`" | ||
3288 | # If $name is empty we are operating on a -L argument. | ||
3289 | if test "$name" != "" && test "$name" != "0"; then | ||
3290 | $rm conftest | ||
3291 | $LTCC -o conftest conftest.c $i | ||
3292 | # Did it work? | ||
3293 | if test "$?" -eq 0 ; then | ||
3294 | ldd_output=`ldd conftest` | ||
3295 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | ||
3296 | case " $predeps $postdeps " in | ||
3297 | *" $i "*) | ||
3298 | newdeplibs="$newdeplibs $i" | ||
3299 | i="" | ||
3300 | ;; | ||
3301 | esac | ||
3302 | fi | ||
3303 | if test -n "$i" ; then | ||
3304 | libname=`eval \\$echo \"$libname_spec\"` | ||
3305 | deplib_matches=`eval \\$echo \"$library_names_spec\"` | ||
3306 | set dummy $deplib_matches | ||
3307 | deplib_match=$2 | ||
3308 | if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then | ||
3309 | newdeplibs="$newdeplibs $i" | ||
3310 | else | ||
3311 | droppeddeps=yes | ||
3312 | $echo | ||
3313 | $echo "*** Warning: dynamic linker does not accept needed library $i." | ||
3314 | $echo "*** I have the capability to make that library automatically link in when" | ||
3315 | $echo "*** you link to this library. But I can only do this if you have a" | ||
3316 | $echo "*** shared version of the library, which you do not appear to have" | ||
3317 | $echo "*** because a test_compile did reveal that the linker did not use this one" | ||
3318 | $echo "*** as a dynamic dependency that programs can get resolved with at runtime." | ||
3319 | fi | ||
3320 | fi | ||
3321 | else | ||
3322 | droppeddeps=yes | ||
3323 | $echo | ||
3324 | $echo "*** Warning! Library $i is needed by this library but I was not able to" | ||
3325 | $echo "*** make it link in! You will probably need to install it or some" | ||
3326 | $echo "*** library that it depends on before this library will be fully" | ||
3327 | $echo "*** functional. Installing it before continuing would be even better." | ||
3328 | fi | ||
3329 | else | ||
3330 | newdeplibs="$newdeplibs $i" | ||
3331 | fi | ||
3332 | done | ||
3333 | fi | ||
3334 | ;; | ||
3335 | file_magic*) | ||
3336 | set dummy $deplibs_check_method | ||
3337 | file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` | ||
3338 | for a_deplib in $deplibs; do | ||
3339 | name="`expr $a_deplib : '-l\(.*\)'`" | ||
3340 | # If $name is empty we are operating on a -L argument. | ||
3341 | if test "$name" != "" && test "$name" != "0"; then | ||
3342 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | ||
3343 | case " $predeps $postdeps " in | ||
3344 | *" $a_deplib "*) | ||
3345 | newdeplibs="$newdeplibs $a_deplib" | ||
3346 | a_deplib="" | ||
3347 | ;; | ||
3348 | esac | ||
3349 | fi | ||
3350 | if test -n "$a_deplib" ; then | ||
3351 | libname=`eval \\$echo \"$libname_spec\"` | ||
3352 | for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do | ||
3353 | potential_libs=`ls $i/$libname[.-]* 2>/dev/null` | ||
3354 | for potent_lib in $potential_libs; do | ||
3355 | # Follow soft links. | ||
3356 | if ls -lLd "$potent_lib" 2>/dev/null \ | ||
3357 | | grep " -> " >/dev/null; then | ||
3358 | continue | ||
3359 | fi | ||
3360 | # The statement above tries to avoid entering an | ||
3361 | # endless loop below, in case of cyclic links. | ||
3362 | # We might still enter an endless loop, since a link | ||
3363 | # loop can be closed while we follow links, | ||
3364 | # but so what? | ||
3365 | potlib="$potent_lib" | ||
3366 | while test -h "$potlib" 2>/dev/null; do | ||
3367 | potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` | ||
3368 | case $potliblink in | ||
3369 | [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; | ||
3370 | *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; | ||
3371 | esac | ||
3372 | done | ||
3373 | if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ||
3374 | | ${SED} 10q \ | ||
3375 | | $EGREP "$file_magic_regex" > /dev/null; then | ||
3376 | newdeplibs="$newdeplibs $a_deplib" | ||
3377 | a_deplib="" | ||
3378 | break 2 | ||
3379 | fi | ||
3380 | done | ||
3381 | done | ||
3382 | fi | ||
3383 | if test -n "$a_deplib" ; then | ||
3384 | droppeddeps=yes | ||
3385 | $echo | ||
3386 | $echo "*** Warning: linker path does not have real file for library $a_deplib." | ||
3387 | $echo "*** I have the capability to make that library automatically link in when" | ||
3388 | $echo "*** you link to this library. But I can only do this if you have a" | ||
3389 | $echo "*** shared version of the library, which you do not appear to have" | ||
3390 | $echo "*** because I did check the linker path looking for a file starting" | ||
3391 | if test -z "$potlib" ; then | ||
3392 | $echo "*** with $libname but no candidates were found. (...for file magic test)" | ||
3393 | else | ||
3394 | $echo "*** with $libname and none of the candidates passed a file format test" | ||
3395 | $echo "*** using a file magic. Last file checked: $potlib" | ||
3396 | fi | ||
3397 | fi | ||
3398 | else | ||
3399 | # Add a -L argument. | ||
3400 | newdeplibs="$newdeplibs $a_deplib" | ||
3401 | fi | ||
3402 | done # Gone through all deplibs. | ||
3403 | ;; | ||
3404 | match_pattern*) | ||
3405 | set dummy $deplibs_check_method | ||
3406 | match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` | ||
3407 | for a_deplib in $deplibs; do | ||
3408 | name="`expr $a_deplib : '-l\(.*\)'`" | ||
3409 | # If $name is empty we are operating on a -L argument. | ||
3410 | if test -n "$name" && test "$name" != "0"; then | ||
3411 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | ||
3412 | case " $predeps $postdeps " in | ||
3413 | *" $a_deplib "*) | ||
3414 | newdeplibs="$newdeplibs $a_deplib" | ||
3415 | a_deplib="" | ||
3416 | ;; | ||
3417 | esac | ||
3418 | fi | ||
3419 | if test -n "$a_deplib" ; then | ||
3420 | libname=`eval \\$echo \"$libname_spec\"` | ||
3421 | for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do | ||
3422 | potential_libs=`ls $i/$libname[.-]* 2>/dev/null` | ||
3423 | for potent_lib in $potential_libs; do | ||
3424 | potlib="$potent_lib" # see symlink-check above in file_magic test | ||
3425 | if eval $echo \"$potent_lib\" 2>/dev/null \ | ||
3426 | | ${SED} 10q \ | ||
3427 | | $EGREP "$match_pattern_regex" > /dev/null; then | ||
3428 | newdeplibs="$newdeplibs $a_deplib" | ||
3429 | a_deplib="" | ||
3430 | break 2 | ||
3431 | fi | ||
3432 | done | ||
3433 | done | ||
3434 | fi | ||
3435 | if test -n "$a_deplib" ; then | ||
3436 | droppeddeps=yes | ||
3437 | $echo | ||
3438 | $echo "*** Warning: linker path does not have real file for library $a_deplib." | ||
3439 | $echo "*** I have the capability to make that library automatically link in when" | ||
3440 | $echo "*** you link to this library. But I can only do this if you have a" | ||
3441 | $echo "*** shared version of the library, which you do not appear to have" | ||
3442 | $echo "*** because I did check the linker path looking for a file starting" | ||
3443 | if test -z "$potlib" ; then | ||
3444 | $echo "*** with $libname but no candidates were found. (...for regex pattern test)" | ||
3445 | else | ||
3446 | $echo "*** with $libname and none of the candidates passed a file format test" | ||
3447 | $echo "*** using a regex pattern. Last file checked: $potlib" | ||
3448 | fi | ||
3449 | fi | ||
3450 | else | ||
3451 | # Add a -L argument. | ||
3452 | newdeplibs="$newdeplibs $a_deplib" | ||
3453 | fi | ||
3454 | done # Gone through all deplibs. | ||
3455 | ;; | ||
3456 | none | unknown | *) | ||
3457 | newdeplibs="" | ||
3458 | tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ | ||
3459 | -e 's/ -[LR][^ ]*//g'` | ||
3460 | if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then | ||
3461 | for i in $predeps $postdeps ; do | ||
3462 | # can't use Xsed below, because $i might contain '/' | ||
3463 | tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` | ||
3464 | done | ||
3465 | fi | ||
3466 | if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | ||
3467 | | grep . >/dev/null; then | ||
3468 | $echo | ||
3469 | if test "X$deplibs_check_method" = "Xnone"; then | ||
3470 | $echo "*** Warning: inter-library dependencies are not supported in this platform." | ||
3471 | else | ||
3472 | $echo "*** Warning: inter-library dependencies are not known to be supported." | ||
3473 | fi | ||
3474 | $echo "*** All declared inter-library dependencies are being dropped." | ||
3475 | droppeddeps=yes | ||
3476 | fi | ||
3477 | ;; | ||
3478 | esac | ||
3479 | versuffix=$versuffix_save | ||
3480 | major=$major_save | ||
3481 | release=$release_save | ||
3482 | libname=$libname_save | ||
3483 | name=$name_save | ||
3484 | |||
3485 | case $host in | ||
3486 | *-*-rhapsody* | *-*-darwin1.[012]) | ||
3487 | # On Rhapsody replace the C library is the System framework | ||
3488 | newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` | ||
3489 | ;; | ||
3490 | esac | ||
3491 | |||
3492 | if test "$droppeddeps" = yes; then | ||
3493 | if test "$module" = yes; then | ||
3494 | $echo | ||
3495 | $echo "*** Warning: libtool could not satisfy all declared inter-library" | ||
3496 | $echo "*** dependencies of module $libname. Therefore, libtool will create" | ||
3497 | $echo "*** a static module, that should work as long as the dlopening" | ||
3498 | $echo "*** application is linked with the -dlopen flag." | ||
3499 | if test -z "$global_symbol_pipe"; then | ||
3500 | $echo | ||
3501 | $echo "*** However, this would only work if libtool was able to extract symbol" | ||
3502 | $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" | ||
3503 | $echo "*** not find such a program. So, this module is probably useless." | ||
3504 | $echo "*** \`nm' from GNU binutils and a full rebuild may help." | ||
3505 | fi | ||
3506 | if test "$build_old_libs" = no; then | ||
3507 | oldlibs="$output_objdir/$libname.$libext" | ||
3508 | build_libtool_libs=module | ||
3509 | build_old_libs=yes | ||
3510 | else | ||
3511 | build_libtool_libs=no | ||
3512 | fi | ||
3513 | else | ||
3514 | $echo "*** The inter-library dependencies that have been dropped here will be" | ||
3515 | $echo "*** automatically added whenever a program is linked with this library" | ||
3516 | $echo "*** or is declared to -dlopen it." | ||
3517 | |||
3518 | if test "$allow_undefined" = no; then | ||
3519 | $echo | ||
3520 | $echo "*** Since this library must not contain undefined symbols," | ||
3521 | $echo "*** because either the platform does not support them or" | ||
3522 | $echo "*** it was explicitly requested with -no-undefined," | ||
3523 | $echo "*** libtool will only create a static version of it." | ||
3524 | if test "$build_old_libs" = no; then | ||
3525 | oldlibs="$output_objdir/$libname.$libext" | ||
3526 | build_libtool_libs=module | ||
3527 | build_old_libs=yes | ||
3528 | else | ||
3529 | build_libtool_libs=no | ||
3530 | fi | ||
3531 | fi | ||
3532 | fi | ||
3533 | fi | ||
3534 | # Done checking deplibs! | ||
3535 | deplibs=$newdeplibs | ||
3536 | fi | ||
3537 | |||
3538 | # All the library-specific variables (install_libdir is set above). | ||
3539 | library_names= | ||
3540 | old_library= | ||
3541 | dlname= | ||
3542 | |||
3543 | # Test again, we may have decided not to build it any more | ||
3544 | if test "$build_libtool_libs" = yes; then | ||
3545 | if test "$hardcode_into_libs" = yes; then | ||
3546 | # Hardcode the library paths | ||
3547 | hardcode_libdirs= | ||
3548 | dep_rpath= | ||
3549 | rpath="$finalize_rpath" | ||
3550 | test "$mode" != relink && rpath="$compile_rpath$rpath" | ||
3551 | for libdir in $rpath; do | ||
3552 | if test -n "$hardcode_libdir_flag_spec"; then | ||
3553 | if test -n "$hardcode_libdir_separator"; then | ||
3554 | if test -z "$hardcode_libdirs"; then | ||
3555 | hardcode_libdirs="$libdir" | ||
3556 | else | ||
3557 | # Just accumulate the unique libdirs. | ||
3558 | case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in | ||
3559 | *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) | ||
3560 | ;; | ||
3561 | *) | ||
3562 | hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" | ||
3563 | ;; | ||
3564 | esac | ||
3565 | fi | ||
3566 | else | ||
3567 | eval flag=\"$hardcode_libdir_flag_spec\" | ||
3568 | dep_rpath="$dep_rpath $flag" | ||
3569 | fi | ||
3570 | elif test -n "$runpath_var"; then | ||
3571 | case "$perm_rpath " in | ||
3572 | *" $libdir "*) ;; | ||
3573 | *) perm_rpath="$perm_rpath $libdir" ;; | ||
3574 | esac | ||
3575 | fi | ||
3576 | done | ||
3577 | # Substitute the hardcoded libdirs into the rpath. | ||
3578 | if test -n "$hardcode_libdir_separator" && | ||
3579 | test -n "$hardcode_libdirs"; then | ||
3580 | libdir="$hardcode_libdirs" | ||
3581 | if test -n "$hardcode_libdir_flag_spec_ld"; then | ||
3582 | eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" | ||
3583 | else | ||
3584 | eval dep_rpath=\"$hardcode_libdir_flag_spec\" | ||
3585 | fi | ||
3586 | fi | ||
3587 | if test -n "$runpath_var" && test -n "$perm_rpath"; then | ||
3588 | # We should set the runpath_var. | ||
3589 | rpath= | ||
3590 | for dir in $perm_rpath; do | ||
3591 | rpath="$rpath$dir:" | ||
3592 | done | ||
3593 | eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" | ||
3594 | fi | ||
3595 | test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" | ||
3596 | fi | ||
3597 | |||
3598 | shlibpath="$finalize_shlibpath" | ||
3599 | test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" | ||
3600 | if test -n "$shlibpath"; then | ||
3601 | eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" | ||
3602 | fi | ||
3603 | |||
3604 | # Get the real and link names of the library. | ||
3605 | eval shared_ext=\"$shrext_cmds\" | ||
3606 | eval library_names=\"$library_names_spec\" | ||
3607 | set dummy $library_names | ||
3608 | realname="$2" | ||
3609 | shift; shift | ||
3610 | |||
3611 | if test -n "$soname_spec"; then | ||
3612 | eval soname=\"$soname_spec\" | ||
3613 | else | ||
3614 | soname="$realname" | ||
3615 | fi | ||
3616 | if test -z "$dlname"; then | ||
3617 | dlname=$soname | ||
3618 | fi | ||
3619 | |||
3620 | lib="$output_objdir/$realname" | ||
3621 | for link | ||
3622 | do | ||
3623 | linknames="$linknames $link" | ||
3624 | done | ||
3625 | |||
3626 | # Use standard objects if they are pic | ||
3627 | test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | ||
3628 | |||
3629 | # Prepare the list of exported symbols | ||
3630 | if test -z "$export_symbols"; then | ||
3631 | if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then | ||
3632 | $show "generating symbol list for \`$libname.la'" | ||
3633 | export_symbols="$output_objdir/$libname.exp" | ||
3634 | $run $rm $export_symbols | ||
3635 | cmds=$export_symbols_cmds | ||
3636 | save_ifs="$IFS"; IFS='~' | ||
3637 | for cmd in $cmds; do | ||
3638 | IFS="$save_ifs" | ||
3639 | eval cmd=\"$cmd\" | ||
3640 | if len=`expr "X$cmd" : ".*"` && | ||
3641 | test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then | ||
3642 | $show "$cmd" | ||
3643 | $run eval "$cmd" || exit $? | ||
3644 | skipped_export=false | ||
3645 | else | ||
3646 | # The command line is too long to execute in one step. | ||
3647 | $show "using reloadable object file for export list..." | ||
3648 | skipped_export=: | ||
3649 | fi | ||
3650 | done | ||
3651 | IFS="$save_ifs" | ||
3652 | if test -n "$export_symbols_regex"; then | ||
3653 | $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" | ||
3654 | $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' | ||
3655 | $show "$mv \"${export_symbols}T\" \"$export_symbols\"" | ||
3656 | $run eval '$mv "${export_symbols}T" "$export_symbols"' | ||
3657 | fi | ||
3658 | fi | ||
3659 | fi | ||
3660 | |||
3661 | if test -n "$export_symbols" && test -n "$include_expsyms"; then | ||
3662 | $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' | ||
3663 | fi | ||
3664 | |||
3665 | tmp_deplibs= | ||
3666 | for test_deplib in $deplibs; do | ||
3667 | case " $convenience " in | ||
3668 | *" $test_deplib "*) ;; | ||
3669 | *) | ||
3670 | tmp_deplibs="$tmp_deplibs $test_deplib" | ||
3671 | ;; | ||
3672 | esac | ||
3673 | done | ||
3674 | deplibs="$tmp_deplibs" | ||
3675 | |||
3676 | if test -n "$convenience"; then | ||
3677 | if test -n "$whole_archive_flag_spec"; then | ||
3678 | save_libobjs=$libobjs | ||
3679 | eval libobjs=\"\$libobjs $whole_archive_flag_spec\" | ||
3680 | else | ||
3681 | gentop="$output_objdir/${outputname}x" | ||
3682 | $show "${rm}r $gentop" | ||
3683 | $run ${rm}r "$gentop" | ||
3684 | $show "$mkdir $gentop" | ||
3685 | $run $mkdir "$gentop" | ||
3686 | status=$? | ||
3687 | if test "$status" -ne 0 && test ! -d "$gentop"; then | ||
3688 | exit $status | ||
3689 | fi | ||
3690 | generated="$generated $gentop" | ||
3691 | |||
3692 | for xlib in $convenience; do | ||
3693 | # Extract the objects. | ||
3694 | case $xlib in | ||
3695 | [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; | ||
3696 | *) xabs=`pwd`"/$xlib" ;; | ||
3697 | esac | ||
3698 | xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` | ||
3699 | xdir="$gentop/$xlib" | ||
3700 | |||
3701 | $show "${rm}r $xdir" | ||
3702 | $run ${rm}r "$xdir" | ||
3703 | $show "$mkdir $xdir" | ||
3704 | $run $mkdir "$xdir" | ||
3705 | status=$? | ||
3706 | if test "$status" -ne 0 && test ! -d "$xdir"; then | ||
3707 | exit $status | ||
3708 | fi | ||
3709 | # We will extract separately just the conflicting names and we will no | ||
3710 | # longer touch any unique names. It is faster to leave these extract | ||
3711 | # automatically by $AR in one run. | ||
3712 | $show "(cd $xdir && $AR x $xabs)" | ||
3713 | $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? | ||
3714 | if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then | ||
3715 | : | ||
3716 | else | ||
3717 | $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 | ||
3718 | $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 | ||
3719 | $AR t "$xabs" | sort | uniq -cd | while read -r count name | ||
3720 | do | ||
3721 | i=1 | ||
3722 | while test "$i" -le "$count" | ||
3723 | do | ||
3724 | # Put our $i before any first dot (extension) | ||
3725 | # Never overwrite any file | ||
3726 | name_to="$name" | ||
3727 | while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" | ||
3728 | do | ||
3729 | name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` | ||
3730 | done | ||
3731 | $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" | ||
3732 | $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? | ||
3733 | i=`expr $i + 1` | ||
3734 | done | ||
3735 | done | ||
3736 | fi | ||
3737 | |||
3738 | libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` | ||
3739 | done | ||
3740 | fi | ||
3741 | fi | ||
3742 | |||
3743 | if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then | ||
3744 | eval flag=\"$thread_safe_flag_spec\" | ||
3745 | linker_flags="$linker_flags $flag" | ||
3746 | fi | ||
3747 | |||
3748 | # Make a backup of the uninstalled library when relinking | ||
3749 | if test "$mode" = relink; then | ||
3750 | $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? | ||
3751 | fi | ||
3752 | |||
3753 | # Do each of the archive commands. | ||
3754 | if test "$module" = yes && test -n "$module_cmds" ; then | ||
3755 | if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then | ||
3756 | eval test_cmds=\"$module_expsym_cmds\" | ||
3757 | cmds=$module_expsym_cmds | ||
3758 | else | ||
3759 | eval test_cmds=\"$module_cmds\" | ||
3760 | cmds=$module_cmds | ||
3761 | fi | ||
3762 | else | ||
3763 | if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then | ||
3764 | eval test_cmds=\"$archive_expsym_cmds\" | ||
3765 | cmds=$archive_expsym_cmds | ||
3766 | else | ||
3767 | eval test_cmds=\"$archive_cmds\" | ||
3768 | cmds=$archive_cmds | ||
3769 | fi | ||
3770 | fi | ||
3771 | |||
3772 | if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` && | ||
3773 | test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then | ||
3774 | : | ||
3775 | else | ||
3776 | # The command line is too long to link in one step, link piecewise. | ||
3777 | $echo "creating reloadable object files..." | ||
3778 | |||
3779 | # Save the value of $output and $libobjs because we want to | ||
3780 | # use them later. If we have whole_archive_flag_spec, we | ||
3781 | # want to use save_libobjs as it was before | ||
3782 | # whole_archive_flag_spec was expanded, because we can't | ||
3783 | # assume the linker understands whole_archive_flag_spec. | ||
3784 | # This may have to be revisited, in case too many | ||
3785 | # convenience libraries get linked in and end up exceeding | ||
3786 | # the spec. | ||
3787 | if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then | ||
3788 | save_libobjs=$libobjs | ||
3789 | fi | ||
3790 | save_output=$output | ||
3791 | |||
3792 | # Clear the reloadable object creation command queue and | ||
3793 | # initialize k to one. | ||
3794 | test_cmds= | ||
3795 | concat_cmds= | ||
3796 | objlist= | ||
3797 | delfiles= | ||
3798 | last_robj= | ||
3799 | k=1 | ||
3800 | output=$output_objdir/$save_output-${k}.$objext | ||
3801 | # Loop over the list of objects to be linked. | ||
3802 | for obj in $save_libobjs | ||
3803 | do | ||
3804 | eval test_cmds=\"$reload_cmds $objlist $last_robj\" | ||
3805 | if test "X$objlist" = X || | ||
3806 | { len=`expr "X$test_cmds" : ".*"` && | ||
3807 | test "$len" -le "$max_cmd_len"; }; then | ||
3808 | objlist="$objlist $obj" | ||
3809 | else | ||
3810 | # The command $test_cmds is almost too long, add a | ||
3811 | # command to the queue. | ||
3812 | if test "$k" -eq 1 ; then | ||
3813 | # The first file doesn't have a previous command to add. | ||
3814 | eval concat_cmds=\"$reload_cmds $objlist $last_robj\" | ||
3815 | else | ||
3816 | # All subsequent reloadable object files will link in | ||
3817 | # the last one created. | ||
3818 | eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" | ||
3819 | fi | ||
3820 | last_robj=$output_objdir/$save_output-${k}.$objext | ||
3821 | k=`expr $k + 1` | ||
3822 | output=$output_objdir/$save_output-${k}.$objext | ||
3823 | objlist=$obj | ||
3824 | len=1 | ||
3825 | fi | ||
3826 | done | ||
3827 | # Handle the remaining objects by creating one last | ||
3828 | # reloadable object file. All subsequent reloadable object | ||
3829 | # files will link in the last one created. | ||
3830 | test -z "$concat_cmds" || concat_cmds=$concat_cmds~ | ||
3831 | eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" | ||
3832 | |||
3833 | if ${skipped_export-false}; then | ||
3834 | $show "generating symbol list for \`$libname.la'" | ||
3835 | export_symbols="$output_objdir/$libname.exp" | ||
3836 | $run $rm $export_symbols | ||
3837 | libobjs=$output | ||
3838 | # Append the command to create the export file. | ||
3839 | eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" | ||
3840 | fi | ||
3841 | |||
3842 | # Set up a command to remove the reloadale object files | ||
3843 | # after they are used. | ||
3844 | i=0 | ||
3845 | while test "$i" -lt "$k" | ||
3846 | do | ||
3847 | i=`expr $i + 1` | ||
3848 | delfiles="$delfiles $output_objdir/$save_output-${i}.$objext" | ||
3849 | done | ||
3850 | |||
3851 | $echo "creating a temporary reloadable object file: $output" | ||
3852 | |||
3853 | # Loop through the commands generated above and execute them. | ||
3854 | save_ifs="$IFS"; IFS='~' | ||
3855 | for cmd in $concat_cmds; do | ||
3856 | IFS="$save_ifs" | ||
3857 | $show "$cmd" | ||
3858 | $run eval "$cmd" || exit $? | ||
3859 | done | ||
3860 | IFS="$save_ifs" | ||
3861 | |||
3862 | libobjs=$output | ||
3863 | # Restore the value of output. | ||
3864 | output=$save_output | ||
3865 | |||
3866 | if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then | ||
3867 | eval libobjs=\"\$libobjs $whole_archive_flag_spec\" | ||
3868 | fi | ||
3869 | # Expand the library linking commands again to reset the | ||
3870 | # value of $libobjs for piecewise linking. | ||
3871 | |||
3872 | # Do each of the archive commands. | ||
3873 | if test "$module" = yes && test -n "$module_cmds" ; then | ||
3874 | if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then | ||
3875 | cmds=$module_expsym_cmds | ||
3876 | else | ||
3877 | cmds=$module_cmds | ||
3878 | fi | ||
3879 | else | ||
3880 | if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then | ||
3881 | cmds=$archive_expsym_cmds | ||
3882 | else | ||
3883 | cmds=$archive_cmds | ||
3884 | fi | ||
3885 | fi | ||
3886 | |||
3887 | # Append the command to remove the reloadable object files | ||
3888 | # to the just-reset $cmds. | ||
3889 | eval cmds=\"\$cmds~\$rm $delfiles\" | ||
3890 | fi | ||
3891 | save_ifs="$IFS"; IFS='~' | ||
3892 | for cmd in $cmds; do | ||
3893 | IFS="$save_ifs" | ||
3894 | eval cmd=\"$cmd\" | ||
3895 | $show "$cmd" | ||
3896 | $run eval "$cmd" || exit $? | ||
3897 | done | ||
3898 | IFS="$save_ifs" | ||
3899 | |||
3900 | # Restore the uninstalled library and exit | ||
3901 | if test "$mode" = relink; then | ||
3902 | $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? | ||
3903 | exit $EXIT_SUCCESS | ||
3904 | fi | ||
3905 | |||
3906 | # Create links to the real library. | ||
3907 | for linkname in $linknames; do | ||
3908 | if test "$realname" != "$linkname"; then | ||
3909 | $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" | ||
3910 | $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? | ||
3911 | fi | ||
3912 | done | ||
3913 | |||
3914 | # If -module or -export-dynamic was specified, set the dlname. | ||
3915 | if test "$module" = yes || test "$export_dynamic" = yes; then | ||
3916 | # On all known operating systems, these are identical. | ||
3917 | dlname="$soname" | ||
3918 | fi | ||
3919 | fi | ||
3920 | ;; | ||
3921 | |||
3922 | obj) | ||
3923 | if test -n "$deplibs"; then | ||
3924 | $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 | ||
3925 | fi | ||
3926 | |||
3927 | if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | ||
3928 | $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 | ||
3929 | fi | ||
3930 | |||
3931 | if test -n "$rpath"; then | ||
3932 | $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 | ||
3933 | fi | ||
3934 | |||
3935 | if test -n "$xrpath"; then | ||
3936 | $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 | ||
3937 | fi | ||
3938 | |||
3939 | if test -n "$vinfo"; then | ||
3940 | $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 | ||
3941 | fi | ||
3942 | |||
3943 | if test -n "$release"; then | ||
3944 | $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 | ||
3945 | fi | ||
3946 | |||
3947 | case $output in | ||
3948 | *.lo) | ||
3949 | if test -n "$objs$old_deplibs"; then | ||
3950 | $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 | ||
3951 | exit $EXIT_FAILURE | ||
3952 | fi | ||
3953 | libobj="$output" | ||
3954 | obj=`$echo "X$output" | $Xsed -e "$lo2o"` | ||
3955 | ;; | ||
3956 | *) | ||
3957 | libobj= | ||
3958 | obj="$output" | ||
3959 | ;; | ||
3960 | esac | ||
3961 | |||
3962 | # Delete the old objects. | ||
3963 | $run $rm $obj $libobj | ||
3964 | |||
3965 | # Objects from convenience libraries. This assumes | ||
3966 | # single-version convenience libraries. Whenever we create | ||
3967 | # different ones for PIC/non-PIC, this we'll have to duplicate | ||
3968 | # the extraction. | ||
3969 | reload_conv_objs= | ||
3970 | gentop= | ||
3971 | # reload_cmds runs $LD directly, so let us get rid of | ||
3972 | # -Wl from whole_archive_flag_spec | ||
3973 | wl= | ||
3974 | |||
3975 | if test -n "$convenience"; then | ||
3976 | if test -n "$whole_archive_flag_spec"; then | ||
3977 | eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" | ||
3978 | else | ||
3979 | gentop="$output_objdir/${obj}x" | ||
3980 | $show "${rm}r $gentop" | ||
3981 | $run ${rm}r "$gentop" | ||
3982 | $show "$mkdir $gentop" | ||
3983 | $run $mkdir "$gentop" | ||
3984 | status=$? | ||
3985 | if test "$status" -ne 0 && test ! -d "$gentop"; then | ||
3986 | exit $status | ||
3987 | fi | ||
3988 | generated="$generated $gentop" | ||
3989 | |||
3990 | for xlib in $convenience; do | ||
3991 | # Extract the objects. | ||
3992 | case $xlib in | ||
3993 | [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; | ||
3994 | *) xabs=`pwd`"/$xlib" ;; | ||
3995 | esac | ||
3996 | xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` | ||
3997 | xdir="$gentop/$xlib" | ||
3998 | |||
3999 | $show "${rm}r $xdir" | ||
4000 | $run ${rm}r "$xdir" | ||
4001 | $show "$mkdir $xdir" | ||
4002 | $run $mkdir "$xdir" | ||
4003 | status=$? | ||
4004 | if test "$status" -ne 0 && test ! -d "$xdir"; then | ||
4005 | exit $status | ||
4006 | fi | ||
4007 | # We will extract separately just the conflicting names and we will no | ||
4008 | # longer touch any unique names. It is faster to leave these extract | ||
4009 | # automatically by $AR in one run. | ||
4010 | $show "(cd $xdir && $AR x $xabs)" | ||
4011 | $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? | ||
4012 | if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then | ||
4013 | : | ||
4014 | else | ||
4015 | $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 | ||
4016 | $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 | ||
4017 | $AR t "$xabs" | sort | uniq -cd | while read -r count name | ||
4018 | do | ||
4019 | i=1 | ||
4020 | while test "$i" -le "$count" | ||
4021 | do | ||
4022 | # Put our $i before any first dot (extension) | ||
4023 | # Never overwrite any file | ||
4024 | name_to="$name" | ||
4025 | while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" | ||
4026 | do | ||
4027 | name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` | ||
4028 | done | ||
4029 | $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" | ||
4030 | $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? | ||
4031 | i=`expr $i + 1` | ||
4032 | done | ||
4033 | done | ||
4034 | fi | ||
4035 | |||
4036 | reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` | ||
4037 | done | ||
4038 | fi | ||
4039 | fi | ||
4040 | |||
4041 | # Create the old-style object. | ||
4042 | 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 | ||
4043 | |||
4044 | output="$obj" | ||
4045 | cmds=$reload_cmds | ||
4046 | save_ifs="$IFS"; IFS='~' | ||
4047 | for cmd in $cmds; do | ||
4048 | IFS="$save_ifs" | ||
4049 | eval cmd=\"$cmd\" | ||
4050 | $show "$cmd" | ||
4051 | $run eval "$cmd" || exit $? | ||
4052 | done | ||
4053 | IFS="$save_ifs" | ||
4054 | |||
4055 | # Exit if we aren't doing a library object file. | ||
4056 | if test -z "$libobj"; then | ||
4057 | if test -n "$gentop"; then | ||
4058 | $show "${rm}r $gentop" | ||
4059 | $run ${rm}r $gentop | ||
4060 | fi | ||
4061 | |||
4062 | exit $EXIT_SUCCESS | ||
4063 | fi | ||
4064 | |||
4065 | if test "$build_libtool_libs" != yes; then | ||
4066 | if test -n "$gentop"; then | ||
4067 | $show "${rm}r $gentop" | ||
4068 | $run ${rm}r $gentop | ||
4069 | fi | ||
4070 | |||
4071 | # Create an invalid libtool object if no PIC, so that we don't | ||
4072 | # accidentally link it into a program. | ||
4073 | # $show "echo timestamp > $libobj" | ||
4074 | # $run eval "echo timestamp > $libobj" || exit $? | ||
4075 | exit $EXIT_SUCCESS | ||
4076 | fi | ||
4077 | |||
4078 | if test -n "$pic_flag" || test "$pic_mode" != default; then | ||
4079 | # Only do commands if we really have different PIC objects. | ||
4080 | reload_objs="$libobjs $reload_conv_objs" | ||
4081 | output="$libobj" | ||
4082 | cmds=$reload_cmds | ||
4083 | save_ifs="$IFS"; IFS='~' | ||
4084 | for cmd in $cmds; do | ||
4085 | IFS="$save_ifs" | ||
4086 | eval cmd=\"$cmd\" | ||
4087 | $show "$cmd" | ||
4088 | $run eval "$cmd" || exit $? | ||
4089 | done | ||
4090 | IFS="$save_ifs" | ||
4091 | fi | ||
4092 | |||
4093 | if test -n "$gentop"; then | ||
4094 | $show "${rm}r $gentop" | ||
4095 | $run ${rm}r $gentop | ||
4096 | fi | ||
4097 | |||
4098 | exit $EXIT_SUCCESS | ||
4099 | ;; | ||
4100 | |||
4101 | prog) | ||
4102 | case $host in | ||
4103 | *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; | ||
4104 | esac | ||
4105 | if test -n "$vinfo"; then | ||
4106 | $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 | ||
4107 | fi | ||
4108 | |||
4109 | if test -n "$release"; then | ||
4110 | $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 | ||
4111 | fi | ||
4112 | |||
4113 | if test "$preload" = yes; then | ||
4114 | if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && | ||
4115 | test "$dlopen_self_static" = unknown; then | ||
4116 | $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." | ||
4117 | fi | ||
4118 | fi | ||
4119 | |||
4120 | case $host in | ||
4121 | *-*-rhapsody* | *-*-darwin1.[012]) | ||
4122 | # On Rhapsody replace the C library is the System framework | ||
4123 | compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` | ||
4124 | finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` | ||
4125 | ;; | ||
4126 | esac | ||
4127 | |||
4128 | case $host in | ||
4129 | *darwin*) | ||
4130 | # Don't allow lazy linking, it breaks C++ global constructors | ||
4131 | if test "$tagname" = CXX ; then | ||
4132 | compile_command="$compile_command ${wl}-bind_at_load" | ||
4133 | finalize_command="$finalize_command ${wl}-bind_at_load" | ||
4134 | fi | ||
4135 | ;; | ||
4136 | esac | ||
4137 | |||
4138 | compile_command="$compile_command $compile_deplibs" | ||
4139 | finalize_command="$finalize_command $finalize_deplibs" | ||
4140 | |||
4141 | if test -n "$rpath$xrpath"; then | ||
4142 | # If the user specified any rpath flags, then add them. | ||
4143 | for libdir in $rpath $xrpath; do | ||
4144 | # This is the magic to use -rpath. | ||
4145 | case "$finalize_rpath " in | ||
4146 | *" $libdir "*) ;; | ||
4147 | *) finalize_rpath="$finalize_rpath $libdir" ;; | ||
4148 | esac | ||
4149 | done | ||
4150 | fi | ||
4151 | |||
4152 | # Now hardcode the library paths | ||
4153 | rpath= | ||
4154 | hardcode_libdirs= | ||
4155 | for libdir in $compile_rpath $finalize_rpath; do | ||
4156 | if test -n "$hardcode_libdir_flag_spec"; then | ||
4157 | if test -n "$hardcode_libdir_separator"; then | ||
4158 | if test -z "$hardcode_libdirs"; then | ||
4159 | hardcode_libdirs="$libdir" | ||
4160 | else | ||
4161 | # Just accumulate the unique libdirs. | ||
4162 | case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in | ||
4163 | *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) | ||
4164 | ;; | ||
4165 | *) | ||
4166 | hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" | ||
4167 | ;; | ||
4168 | esac | ||
4169 | fi | ||
4170 | else | ||
4171 | eval flag=\"$hardcode_libdir_flag_spec\" | ||
4172 | rpath="$rpath $flag" | ||
4173 | fi | ||
4174 | elif test -n "$runpath_var"; then | ||
4175 | case "$perm_rpath " in | ||
4176 | *" $libdir "*) ;; | ||
4177 | *) perm_rpath="$perm_rpath $libdir" ;; | ||
4178 | esac | ||
4179 | fi | ||
4180 | case $host in | ||
4181 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) | ||
4182 | case :$dllsearchpath: in | ||
4183 | *":$libdir:"*) ;; | ||
4184 | *) dllsearchpath="$dllsearchpath:$libdir";; | ||
4185 | esac | ||
4186 | ;; | ||
4187 | esac | ||
4188 | done | ||
4189 | # Substitute the hardcoded libdirs into the rpath. | ||
4190 | if test -n "$hardcode_libdir_separator" && | ||
4191 | test -n "$hardcode_libdirs"; then | ||
4192 | libdir="$hardcode_libdirs" | ||
4193 | eval rpath=\" $hardcode_libdir_flag_spec\" | ||
4194 | fi | ||
4195 | compile_rpath="$rpath" | ||
4196 | |||
4197 | rpath= | ||
4198 | hardcode_libdirs= | ||
4199 | for libdir in $finalize_rpath; do | ||
4200 | if test -n "$hardcode_libdir_flag_spec"; then | ||
4201 | if test -n "$hardcode_libdir_separator"; then | ||
4202 | if test -z "$hardcode_libdirs"; then | ||
4203 | hardcode_libdirs="$libdir" | ||
4204 | else | ||
4205 | # Just accumulate the unique libdirs. | ||
4206 | case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in | ||
4207 | *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) | ||
4208 | ;; | ||
4209 | *) | ||
4210 | hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" | ||
4211 | ;; | ||
4212 | esac | ||
4213 | fi | ||
4214 | else | ||
4215 | eval flag=\"$hardcode_libdir_flag_spec\" | ||
4216 | rpath="$rpath $flag" | ||
4217 | fi | ||
4218 | elif test -n "$runpath_var"; then | ||
4219 | case "$finalize_perm_rpath " in | ||
4220 | *" $libdir "*) ;; | ||
4221 | *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; | ||
4222 | esac | ||
4223 | fi | ||
4224 | done | ||
4225 | # Substitute the hardcoded libdirs into the rpath. | ||
4226 | if test -n "$hardcode_libdir_separator" && | ||
4227 | test -n "$hardcode_libdirs"; then | ||
4228 | libdir="$hardcode_libdirs" | ||
4229 | eval rpath=\" $hardcode_libdir_flag_spec\" | ||
4230 | fi | ||
4231 | finalize_rpath="$rpath" | ||
4232 | |||
4233 | if test -n "$libobjs" && test "$build_old_libs" = yes; then | ||
4234 | # Transform all the library objects into standard objects. | ||
4235 | compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | ||
4236 | finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | ||
4237 | fi | ||
4238 | |||
4239 | dlsyms= | ||
4240 | if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then | ||
4241 | if test -n "$NM" && test -n "$global_symbol_pipe"; then | ||
4242 | dlsyms="${outputname}S.c" | ||
4243 | else | ||
4244 | $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 | ||
4245 | fi | ||
4246 | fi | ||
4247 | |||
4248 | if test -n "$dlsyms"; then | ||
4249 | case $dlsyms in | ||
4250 | "") ;; | ||
4251 | *.c) | ||
4252 | # Discover the nlist of each of the dlfiles. | ||
4253 | nlist="$output_objdir/${outputname}.nm" | ||
4254 | |||
4255 | $show "$rm $nlist ${nlist}S ${nlist}T" | ||
4256 | $run $rm "$nlist" "${nlist}S" "${nlist}T" | ||
4257 | |||
4258 | # Parse the name list into a source file. | ||
4259 | $show "creating $output_objdir/$dlsyms" | ||
4260 | |||
4261 | test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ | ||
4262 | /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ | ||
4263 | /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ | ||
4264 | |||
4265 | #ifdef __cplusplus | ||
4266 | extern \"C\" { | ||
4267 | #endif | ||
4268 | |||
4269 | /* Prevent the only kind of declaration conflicts we can make. */ | ||
4270 | #define lt_preloaded_symbols some_other_symbol | ||
4271 | |||
4272 | /* External symbol declarations for the compiler. */\ | ||
4273 | " | ||
4274 | |||
4275 | if test "$dlself" = yes; then | ||
4276 | $show "generating symbol list for \`$output'" | ||
4277 | |||
4278 | test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" | ||
4279 | |||
4280 | # Add our own program objects to the symbol list. | ||
4281 | progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` | ||
4282 | for arg in $progfiles; do | ||
4283 | $show "extracting global C symbols from \`$arg'" | ||
4284 | $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" | ||
4285 | done | ||
4286 | |||
4287 | if test -n "$exclude_expsyms"; then | ||
4288 | $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' | ||
4289 | $run eval '$mv "$nlist"T "$nlist"' | ||
4290 | fi | ||
4291 | |||
4292 | if test -n "$export_symbols_regex"; then | ||
4293 | $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' | ||
4294 | $run eval '$mv "$nlist"T "$nlist"' | ||
4295 | fi | ||
4296 | |||
4297 | # Prepare the list of exported symbols | ||
4298 | if test -z "$export_symbols"; then | ||
4299 | export_symbols="$output_objdir/$output.exp" | ||
4300 | $run $rm $export_symbols | ||
4301 | $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' | ||
4302 | else | ||
4303 | $run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"' | ||
4304 | $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T' | ||
4305 | $run eval 'mv "$nlist"T "$nlist"' | ||
4306 | fi | ||
4307 | fi | ||
4308 | |||
4309 | for arg in $dlprefiles; do | ||
4310 | $show "extracting global C symbols from \`$arg'" | ||
4311 | name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` | ||
4312 | $run eval '$echo ": $name " >> "$nlist"' | ||
4313 | $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" | ||
4314 | done | ||
4315 | |||
4316 | if test -z "$run"; then | ||
4317 | # Make sure we have at least an empty file. | ||
4318 | test -f "$nlist" || : > "$nlist" | ||
4319 | |||
4320 | if test -n "$exclude_expsyms"; then | ||
4321 | $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T | ||
4322 | $mv "$nlist"T "$nlist" | ||
4323 | fi | ||
4324 | |||
4325 | # Try sorting and uniquifying the output. | ||
4326 | if grep -v "^: " < "$nlist" | | ||
4327 | if sort -k 3 </dev/null >/dev/null 2>&1; then | ||
4328 | sort -k 3 | ||
4329 | else | ||
4330 | sort +2 | ||
4331 | fi | | ||
4332 | uniq > "$nlist"S; then | ||
4333 | : | ||
4334 | else | ||
4335 | grep -v "^: " < "$nlist" > "$nlist"S | ||
4336 | fi | ||
4337 | |||
4338 | if test -f "$nlist"S; then | ||
4339 | eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' | ||
4340 | else | ||
4341 | $echo '/* NONE */' >> "$output_objdir/$dlsyms" | ||
4342 | fi | ||
4343 | |||
4344 | $echo >> "$output_objdir/$dlsyms" "\ | ||
4345 | |||
4346 | #undef lt_preloaded_symbols | ||
4347 | |||
4348 | #if defined (__STDC__) && __STDC__ | ||
4349 | # define lt_ptr void * | ||
4350 | #else | ||
4351 | # define lt_ptr char * | ||
4352 | # define const | ||
4353 | #endif | ||
4354 | |||
4355 | /* The mapping between symbol names and symbols. */ | ||
4356 | const struct { | ||
4357 | const char *name; | ||
4358 | lt_ptr address; | ||
4359 | } | ||
4360 | lt_preloaded_symbols[] = | ||
4361 | {\ | ||
4362 | " | ||
4363 | |||
4364 | eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" | ||
4365 | |||
4366 | $echo >> "$output_objdir/$dlsyms" "\ | ||
4367 | {0, (lt_ptr) 0} | ||
4368 | }; | ||
4369 | |||
4370 | /* This works around a problem in FreeBSD linker */ | ||
4371 | #ifdef FREEBSD_WORKAROUND | ||
4372 | static const void *lt_preloaded_setup() { | ||
4373 | return lt_preloaded_symbols; | ||
4374 | } | ||
4375 | #endif | ||
4376 | |||
4377 | #ifdef __cplusplus | ||
4378 | } | ||
4379 | #endif\ | ||
4380 | " | ||
4381 | fi | ||
4382 | |||
4383 | pic_flag_for_symtable= | ||
4384 | case $host in | ||
4385 | # compiling the symbol table file with pic_flag works around | ||
4386 | # a FreeBSD bug that causes programs to crash when -lm is | ||
4387 | # linked before any other PIC object. But we must not use | ||
4388 | # pic_flag when linking with -static. The problem exists in | ||
4389 | # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. | ||
4390 | *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) | ||
4391 | case "$compile_command " in | ||
4392 | *" -static "*) ;; | ||
4393 | *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; | ||
4394 | esac;; | ||
4395 | *-*-hpux*) | ||
4396 | case "$compile_command " in | ||
4397 | *" -static "*) ;; | ||
4398 | *) pic_flag_for_symtable=" $pic_flag";; | ||
4399 | esac | ||
4400 | esac | ||
4401 | |||
4402 | # Now compile the dynamic symbol file. | ||
4403 | $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" | ||
4404 | $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? | ||
4405 | |||
4406 | # Clean up the generated files. | ||
4407 | $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" | ||
4408 | $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" | ||
4409 | |||
4410 | # Transform the symbol file into the correct name. | ||
4411 | compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` | ||
4412 | finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` | ||
4413 | ;; | ||
4414 | *) | ||
4415 | $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 | ||
4416 | exit $EXIT_FAILURE | ||
4417 | ;; | ||
4418 | esac | ||
4419 | else | ||
4420 | # We keep going just in case the user didn't refer to | ||
4421 | # lt_preloaded_symbols. The linker will fail if global_symbol_pipe | ||
4422 | # really was required. | ||
4423 | |||
4424 | # Nullify the symbol file. | ||
4425 | compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` | ||
4426 | finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` | ||
4427 | fi | ||
4428 | |||
4429 | if test "$need_relink" = no || test "$build_libtool_libs" != yes; then | ||
4430 | # Replace the output file specification. | ||
4431 | compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` | ||
4432 | link_command="$compile_command$compile_rpath" | ||
4433 | |||
4434 | # We have no uninstalled library dependencies, so finalize right now. | ||
4435 | $show "$link_command" | ||
4436 | $run eval "$link_command" | ||
4437 | status=$? | ||
4438 | |||
4439 | # Delete the generated files. | ||
4440 | if test -n "$dlsyms"; then | ||
4441 | $show "$rm $output_objdir/${outputname}S.${objext}" | ||
4442 | $run $rm "$output_objdir/${outputname}S.${objext}" | ||
4443 | fi | ||
4444 | |||
4445 | exit $status | ||
4446 | fi | ||
4447 | |||
4448 | if test -n "$shlibpath_var"; then | ||
4449 | # We should set the shlibpath_var | ||
4450 | rpath= | ||
4451 | for dir in $temp_rpath; do | ||
4452 | case $dir in | ||
4453 | [\\/]* | [A-Za-z]:[\\/]*) | ||
4454 | # Absolute path. | ||
4455 | rpath="$rpath$dir:" | ||
4456 | ;; | ||
4457 | *) | ||
4458 | # Relative path: add a thisdir entry. | ||
4459 | rpath="$rpath\$thisdir/$dir:" | ||
4460 | ;; | ||
4461 | esac | ||
4462 | done | ||
4463 | temp_rpath="$rpath" | ||
4464 | fi | ||
4465 | |||
4466 | if test -n "$compile_shlibpath$finalize_shlibpath"; then | ||
4467 | compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" | ||
4468 | fi | ||
4469 | if test -n "$finalize_shlibpath"; then | ||
4470 | finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" | ||
4471 | fi | ||
4472 | |||
4473 | compile_var= | ||
4474 | finalize_var= | ||
4475 | if test -n "$runpath_var"; then | ||
4476 | if test -n "$perm_rpath"; then | ||
4477 | # We should set the runpath_var. | ||
4478 | rpath= | ||
4479 | for dir in $perm_rpath; do | ||
4480 | rpath="$rpath$dir:" | ||
4481 | done | ||
4482 | compile_var="$runpath_var=\"$rpath\$$runpath_var\" " | ||
4483 | fi | ||
4484 | if test -n "$finalize_perm_rpath"; then | ||
4485 | # We should set the runpath_var. | ||
4486 | rpath= | ||
4487 | for dir in $finalize_perm_rpath; do | ||
4488 | rpath="$rpath$dir:" | ||
4489 | done | ||
4490 | finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " | ||
4491 | fi | ||
4492 | fi | ||
4493 | |||
4494 | if test "$no_install" = yes; then | ||
4495 | # We don't need to create a wrapper script. | ||
4496 | link_command="$compile_var$compile_command$compile_rpath" | ||
4497 | # Replace the output file specification. | ||
4498 | link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` | ||
4499 | # Delete the old output file. | ||
4500 | $run $rm $output | ||
4501 | # Link the executable and exit | ||
4502 | $show "$link_command" | ||
4503 | $run eval "$link_command" || exit $? | ||
4504 | exit $EXIT_SUCCESS | ||
4505 | fi | ||
4506 | |||
4507 | if test "$hardcode_action" = relink; then | ||
4508 | # Fast installation is not supported | ||
4509 | link_command="$compile_var$compile_command$compile_rpath" | ||
4510 | relink_command="$finalize_var$finalize_command$finalize_rpath" | ||
4511 | |||
4512 | $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 | ||
4513 | $echo "$modename: \`$output' will be relinked during installation" 1>&2 | ||
4514 | else | ||
4515 | if test "$fast_install" != no; then | ||
4516 | link_command="$finalize_var$compile_command$finalize_rpath" | ||
4517 | if test "$fast_install" = yes; then | ||
4518 | relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` | ||
4519 | else | ||
4520 | # fast_install is set to needless | ||
4521 | relink_command= | ||
4522 | fi | ||
4523 | else | ||
4524 | link_command="$compile_var$compile_command$compile_rpath" | ||
4525 | relink_command="$finalize_var$finalize_command$finalize_rpath" | ||
4526 | fi | ||
4527 | fi | ||
4528 | |||
4529 | # Replace the output file specification. | ||
4530 | link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` | ||
4531 | |||
4532 | # Delete the old output files. | ||
4533 | $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname | ||
4534 | |||
4535 | $show "$link_command" | ||
4536 | $run eval "$link_command" || exit $? | ||
4537 | |||
4538 | # Now create the wrapper script. | ||
4539 | $show "creating $output" | ||
4540 | |||
4541 | # Quote the relink command for shipping. | ||
4542 | if test -n "$relink_command"; then | ||
4543 | # Preserve any variables that may affect compiler behavior | ||
4544 | for var in $variables_saved_for_relink; do | ||
4545 | if eval test -z \"\${$var+set}\"; then | ||
4546 | relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" | ||
4547 | elif eval var_value=\$$var; test -z "$var_value"; then | ||
4548 | relink_command="$var=; export $var; $relink_command" | ||
4549 | else | ||
4550 | var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` | ||
4551 | relink_command="$var=\"$var_value\"; export $var; $relink_command" | ||
4552 | fi | ||
4553 | done | ||
4554 | relink_command="(cd `pwd`; $relink_command)" | ||
4555 | relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` | ||
4556 | fi | ||
4557 | |||
4558 | # Quote $echo for shipping. | ||
4559 | if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then | ||
4560 | case $progpath in | ||
4561 | [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; | ||
4562 | *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; | ||
4563 | esac | ||
4564 | qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` | ||
4565 | else | ||
4566 | qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` | ||
4567 | fi | ||
4568 | |||
4569 | # Only actually do things if our run command is non-null. | ||
4570 | if test -z "$run"; then | ||
4571 | # win32 will think the script is a binary if it has | ||
4572 | # a .exe suffix, so we strip it off here. | ||
4573 | case $output in | ||
4574 | *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; | ||
4575 | esac | ||
4576 | # test for cygwin because mv fails w/o .exe extensions | ||
4577 | case $host in | ||
4578 | *cygwin*) | ||
4579 | exeext=.exe | ||
4580 | outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; | ||
4581 | *) exeext= ;; | ||
4582 | esac | ||
4583 | case $host in | ||
4584 | *cygwin* | *mingw* ) | ||
4585 | cwrappersource=`$echo ${objdir}/lt-${output}.c` | ||
4586 | cwrapper=`$echo ${output}.exe` | ||
4587 | $rm $cwrappersource $cwrapper | ||
4588 | trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 | ||
4589 | |||
4590 | cat > $cwrappersource <<EOF | ||
4591 | |||
4592 | /* $cwrappersource - temporary wrapper executable for $objdir/$outputname | ||
4593 | Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP | ||
4594 | |||
4595 | The $output program cannot be directly executed until all the libtool | ||
4596 | libraries that it depends on are installed. | ||
4597 | |||
4598 | This wrapper executable should never be moved out of the build directory. | ||
4599 | If it is, it will not operate correctly. | ||
4600 | |||
4601 | Currently, it simply execs the wrapper *script* "/bin/sh $output", | ||
4602 | but could eventually absorb all of the scripts functionality and | ||
4603 | exec $objdir/$outputname directly. | ||
4604 | */ | ||
4605 | EOF | ||
4606 | cat >> $cwrappersource<<"EOF" | ||
4607 | #include <stdio.h> | ||
4608 | #include <stdlib.h> | ||
4609 | #include <unistd.h> | ||
4610 | #include <malloc.h> | ||
4611 | #include <stdarg.h> | ||
4612 | #include <assert.h> | ||
4613 | |||
4614 | #if defined(PATH_MAX) | ||
4615 | # define LT_PATHMAX PATH_MAX | ||
4616 | #elif defined(MAXPATHLEN) | ||
4617 | # define LT_PATHMAX MAXPATHLEN | ||
4618 | #else | ||
4619 | # define LT_PATHMAX 1024 | ||
4620 | #endif | ||
4621 | |||
4622 | #ifndef DIR_SEPARATOR | ||
4623 | #define DIR_SEPARATOR '/' | ||
4624 | #endif | ||
4625 | |||
4626 | #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ | ||
4627 | defined (__OS2__) | ||
4628 | #define HAVE_DOS_BASED_FILE_SYSTEM | ||
4629 | #ifndef DIR_SEPARATOR_2 | ||
4630 | #define DIR_SEPARATOR_2 '\\' | ||
4631 | #endif | ||
4632 | #endif | ||
4633 | |||
4634 | #ifndef DIR_SEPARATOR_2 | ||
4635 | # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) | ||
4636 | #else /* DIR_SEPARATOR_2 */ | ||
4637 | # define IS_DIR_SEPARATOR(ch) \ | ||
4638 | (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) | ||
4639 | #endif /* DIR_SEPARATOR_2 */ | ||
4640 | |||
4641 | #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) | ||
4642 | #define XFREE(stale) do { \ | ||
4643 | if (stale) { free ((void *) stale); stale = 0; } \ | ||
4644 | } while (0) | ||
4645 | |||
4646 | const char *program_name = NULL; | ||
4647 | |||
4648 | void * xmalloc (size_t num); | ||
4649 | char * xstrdup (const char *string); | ||
4650 | char * basename (const char *name); | ||
4651 | char * fnqualify(const char *path); | ||
4652 | char * strendzap(char *str, const char *pat); | ||
4653 | void lt_fatal (const char *message, ...); | ||
4654 | |||
4655 | int | ||
4656 | main (int argc, char *argv[]) | ||
4657 | { | ||
4658 | char **newargz; | ||
4659 | int i; | ||
4660 | |||
4661 | program_name = (char *) xstrdup ((char *) basename (argv[0])); | ||
4662 | newargz = XMALLOC(char *, argc+2); | ||
4663 | EOF | ||
4664 | |||
4665 | cat >> $cwrappersource <<EOF | ||
4666 | newargz[0] = "$SHELL"; | ||
4667 | EOF | ||
4668 | |||
4669 | cat >> $cwrappersource <<"EOF" | ||
4670 | newargz[1] = fnqualify(argv[0]); | ||
4671 | /* we know the script has the same name, without the .exe */ | ||
4672 | /* so make sure newargz[1] doesn't end in .exe */ | ||
4673 | strendzap(newargz[1],".exe"); | ||
4674 | for (i = 1; i < argc; i++) | ||
4675 | newargz[i+1] = xstrdup(argv[i]); | ||
4676 | newargz[argc+1] = NULL; | ||
4677 | EOF | ||
4678 | |||
4679 | cat >> $cwrappersource <<EOF | ||
4680 | execv("$SHELL",newargz); | ||
4681 | EOF | ||
4682 | |||
4683 | cat >> $cwrappersource <<"EOF" | ||
4684 | } | ||
4685 | |||
4686 | void * | ||
4687 | xmalloc (size_t num) | ||
4688 | { | ||
4689 | void * p = (void *) malloc (num); | ||
4690 | if (!p) | ||
4691 | lt_fatal ("Memory exhausted"); | ||
4692 | |||
4693 | return p; | ||
4694 | } | ||
4695 | |||
4696 | char * | ||
4697 | xstrdup (const char *string) | ||
4698 | { | ||
4699 | return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL | ||
4700 | ; | ||
4701 | } | ||
4702 | |||
4703 | char * | ||
4704 | basename (const char *name) | ||
4705 | { | ||
4706 | const char *base; | ||
4707 | |||
4708 | #if defined (HAVE_DOS_BASED_FILE_SYSTEM) | ||
4709 | /* Skip over the disk name in MSDOS pathnames. */ | ||
4710 | if (isalpha (name[0]) && name[1] == ':') | ||
4711 | name += 2; | ||
4712 | #endif | ||
4713 | |||
4714 | for (base = name; *name; name++) | ||
4715 | if (IS_DIR_SEPARATOR (*name)) | ||
4716 | base = name + 1; | ||
4717 | return (char *) base; | ||
4718 | } | ||
4719 | |||
4720 | char * | ||
4721 | fnqualify(const char *path) | ||
4722 | { | ||
4723 | size_t size; | ||
4724 | char *p; | ||
4725 | char tmp[LT_PATHMAX + 1]; | ||
4726 | |||
4727 | assert(path != NULL); | ||
4728 | |||
4729 | /* Is it qualified already? */ | ||
4730 | #if defined (HAVE_DOS_BASED_FILE_SYSTEM) | ||
4731 | if (isalpha (path[0]) && path[1] == ':') | ||
4732 | return xstrdup (path); | ||
4733 | #endif | ||
4734 | if (IS_DIR_SEPARATOR (path[0])) | ||
4735 | return xstrdup (path); | ||
4736 | |||
4737 | /* prepend the current directory */ | ||
4738 | /* doesn't handle '~' */ | ||
4739 | if (getcwd (tmp, LT_PATHMAX) == NULL) | ||
4740 | lt_fatal ("getcwd failed"); | ||
4741 | size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */ | ||
4742 | p = XMALLOC(char, size); | ||
4743 | sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path); | ||
4744 | return p; | ||
4745 | } | ||
4746 | |||
4747 | char * | ||
4748 | strendzap(char *str, const char *pat) | ||
4749 | { | ||
4750 | size_t len, patlen; | ||
4751 | |||
4752 | assert(str != NULL); | ||
4753 | assert(pat != NULL); | ||
4754 | |||
4755 | len = strlen(str); | ||
4756 | patlen = strlen(pat); | ||
4757 | |||
4758 | if (patlen <= len) | ||
4759 | { | ||
4760 | str += len - patlen; | ||
4761 | if (strcmp(str, pat) == 0) | ||
4762 | *str = '\0'; | ||
4763 | } | ||
4764 | return str; | ||
4765 | } | ||
4766 | |||
4767 | static void | ||
4768 | lt_error_core (int exit_status, const char * mode, | ||
4769 | const char * message, va_list ap) | ||
4770 | { | ||
4771 | fprintf (stderr, "%s: %s: ", program_name, mode); | ||
4772 | vfprintf (stderr, message, ap); | ||
4773 | fprintf (stderr, ".\n"); | ||
4774 | |||
4775 | if (exit_status >= 0) | ||
4776 | exit (exit_status); | ||
4777 | } | ||
4778 | |||
4779 | void | ||
4780 | lt_fatal (const char *message, ...) | ||
4781 | { | ||
4782 | va_list ap; | ||
4783 | va_start (ap, message); | ||
4784 | lt_error_core (EXIT_FAILURE, "FATAL", message, ap); | ||
4785 | va_end (ap); | ||
4786 | } | ||
4787 | EOF | ||
4788 | # we should really use a build-platform specific compiler | ||
4789 | # here, but OTOH, the wrappers (shell script and this C one) | ||
4790 | # are only useful if you want to execute the "real" binary. | ||
4791 | # Since the "real" binary is built for $host, then this | ||
4792 | # wrapper might as well be built for $host, too. | ||
4793 | $run $LTCC -s -o $cwrapper $cwrappersource | ||
4794 | ;; | ||
4795 | esac | ||
4796 | $rm $output | ||
4797 | trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 | ||
4798 | |||
4799 | $echo > $output "\ | ||
4800 | #! $SHELL | ||
4801 | |||
4802 | # $output - temporary wrapper script for $objdir/$outputname | ||
4803 | # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP | ||
4804 | # | ||
4805 | # The $output program cannot be directly executed until all the libtool | ||
4806 | # libraries that it depends on are installed. | ||
4807 | # | ||
4808 | # This wrapper script should never be moved out of the build directory. | ||
4809 | # If it is, it will not operate correctly. | ||
4810 | |||
4811 | # Sed substitution that helps us do robust quoting. It backslashifies | ||
4812 | # metacharacters that are still active within double-quoted strings. | ||
4813 | Xsed='${SED} -e 1s/^X//' | ||
4814 | sed_quote_subst='$sed_quote_subst' | ||
4815 | |||
4816 | # The HP-UX ksh and POSIX shell print the target directory to stdout | ||
4817 | # if CDPATH is set. | ||
4818 | if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi | ||
4819 | |||
4820 | relink_command=\"$relink_command\" | ||
4821 | |||
4822 | # This environment variable determines our operation mode. | ||
4823 | if test \"\$libtool_install_magic\" = \"$magic\"; then | ||
4824 | # install mode needs the following variable: | ||
4825 | notinst_deplibs='$notinst_deplibs' | ||
4826 | else | ||
4827 | # When we are sourced in execute mode, \$file and \$echo are already set. | ||
4828 | if test \"\$libtool_execute_magic\" != \"$magic\"; then | ||
4829 | echo=\"$qecho\" | ||
4830 | file=\"\$0\" | ||
4831 | # Make sure echo works. | ||
4832 | if test \"X\$1\" = X--no-reexec; then | ||
4833 | # Discard the --no-reexec flag, and continue. | ||
4834 | shift | ||
4835 | elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then | ||
4836 | # Yippee, \$echo works! | ||
4837 | : | ||
4838 | else | ||
4839 | # Restart under the correct shell, and then maybe \$echo will work. | ||
4840 | exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} | ||
4841 | fi | ||
4842 | fi\ | ||
4843 | " | ||
4844 | $echo >> $output "\ | ||
4845 | |||
4846 | # Find the directory that this script lives in. | ||
4847 | thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` | ||
4848 | test \"x\$thisdir\" = \"x\$file\" && thisdir=. | ||
4849 | |||
4850 | # Follow symbolic links until we get to the real thisdir. | ||
4851 | file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` | ||
4852 | while test -n \"\$file\"; do | ||
4853 | destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` | ||
4854 | |||
4855 | # If there was a directory component, then change thisdir. | ||
4856 | if test \"x\$destdir\" != \"x\$file\"; then | ||
4857 | case \"\$destdir\" in | ||
4858 | [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; | ||
4859 | *) thisdir=\"\$thisdir/\$destdir\" ;; | ||
4860 | esac | ||
4861 | fi | ||
4862 | |||
4863 | file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` | ||
4864 | file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` | ||
4865 | done | ||
4866 | |||
4867 | # Try to get the absolute directory name. | ||
4868 | absdir=\`cd \"\$thisdir\" && pwd\` | ||
4869 | test -n \"\$absdir\" && thisdir=\"\$absdir\" | ||
4870 | " | ||
4871 | |||
4872 | if test "$fast_install" = yes; then | ||
4873 | $echo >> $output "\ | ||
4874 | program=lt-'$outputname'$exeext | ||
4875 | progdir=\"\$thisdir/$objdir\" | ||
4876 | |||
4877 | if test ! -f \"\$progdir/\$program\" || \\ | ||
4878 | { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ | ||
4879 | test \"X\$file\" != \"X\$progdir/\$program\"; }; then | ||
4880 | |||
4881 | file=\"\$\$-\$program\" | ||
4882 | |||
4883 | if test ! -d \"\$progdir\"; then | ||
4884 | $mkdir \"\$progdir\" | ||
4885 | else | ||
4886 | $rm \"\$progdir/\$file\" | ||
4887 | fi" | ||
4888 | |||
4889 | $echo >> $output "\ | ||
4890 | |||
4891 | # relink executable if necessary | ||
4892 | if test -n \"\$relink_command\"; then | ||
4893 | if relink_command_output=\`eval \$relink_command 2>&1\`; then : | ||
4894 | else | ||
4895 | $echo \"\$relink_command_output\" >&2 | ||
4896 | $rm \"\$progdir/\$file\" | ||
4897 | exit $EXIT_FAILURE | ||
4898 | fi | ||
4899 | fi | ||
4900 | |||
4901 | $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || | ||
4902 | { $rm \"\$progdir/\$program\"; | ||
4903 | $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } | ||
4904 | $rm \"\$progdir/\$file\" | ||
4905 | fi" | ||
4906 | else | ||
4907 | $echo >> $output "\ | ||
4908 | program='$outputname' | ||
4909 | progdir=\"\$thisdir/$objdir\" | ||
4910 | " | ||
4911 | fi | ||
4912 | |||
4913 | $echo >> $output "\ | ||
4914 | |||
4915 | if test -f \"\$progdir/\$program\"; then" | ||
4916 | |||
4917 | # Export our shlibpath_var if we have one. | ||
4918 | if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then | ||
4919 | $echo >> $output "\ | ||
4920 | # Add our own library path to $shlibpath_var | ||
4921 | $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" | ||
4922 | |||
4923 | # Some systems cannot cope with colon-terminated $shlibpath_var | ||
4924 | # The second colon is a workaround for a bug in BeOS R4 sed | ||
4925 | $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` | ||
4926 | |||
4927 | export $shlibpath_var | ||
4928 | " | ||
4929 | fi | ||
4930 | |||
4931 | # fixup the dll searchpath if we need to. | ||
4932 | if test -n "$dllsearchpath"; then | ||
4933 | $echo >> $output "\ | ||
4934 | # Add the dll search path components to the executable PATH | ||
4935 | PATH=$dllsearchpath:\$PATH | ||
4936 | " | ||
4937 | fi | ||
4938 | |||
4939 | $echo >> $output "\ | ||
4940 | if test \"\$libtool_execute_magic\" != \"$magic\"; then | ||
4941 | # Run the actual program with our arguments. | ||
4942 | " | ||
4943 | case $host in | ||
4944 | # Backslashes separate directories on plain windows | ||
4945 | *-*-mingw | *-*-os2*) | ||
4946 | $echo >> $output "\ | ||
4947 | exec \$progdir\\\\\$program \${1+\"\$@\"} | ||
4948 | " | ||
4949 | ;; | ||
4950 | |||
4951 | *) | ||
4952 | $echo >> $output "\ | ||
4953 | exec \$progdir/\$program \${1+\"\$@\"} | ||
4954 | " | ||
4955 | ;; | ||
4956 | esac | ||
4957 | $echo >> $output "\ | ||
4958 | \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" | ||
4959 | exit $EXIT_FAILURE | ||
4960 | fi | ||
4961 | else | ||
4962 | # The program doesn't exist. | ||
4963 | \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2 | ||
4964 | \$echo \"This script is just a wrapper for \$program.\" 1>&2 | ||
4965 | $echo \"See the $PACKAGE documentation for more information.\" 1>&2 | ||
4966 | exit $EXIT_FAILURE | ||
4967 | fi | ||
4968 | fi\ | ||
4969 | " | ||
4970 | chmod +x $output | ||
4971 | fi | ||
4972 | exit $EXIT_SUCCESS | ||
4973 | ;; | ||
4974 | esac | ||
4975 | |||
4976 | # See if we need to build an old-fashioned archive. | ||
4977 | for oldlib in $oldlibs; do | ||
4978 | |||
4979 | if test "$build_libtool_libs" = convenience; then | ||
4980 | oldobjs="$libobjs_save" | ||
4981 | addlibs="$convenience" | ||
4982 | build_libtool_libs=no | ||
4983 | else | ||
4984 | if test "$build_libtool_libs" = module; then | ||
4985 | oldobjs="$libobjs_save" | ||
4986 | build_libtool_libs=no | ||
4987 | else | ||
4988 | oldobjs="$old_deplibs $non_pic_objects" | ||
4989 | fi | ||
4990 | addlibs="$old_convenience" | ||
4991 | fi | ||
4992 | |||
4993 | if test -n "$addlibs"; then | ||
4994 | gentop="$output_objdir/${outputname}x" | ||
4995 | $show "${rm}r $gentop" | ||
4996 | $run ${rm}r "$gentop" | ||
4997 | $show "$mkdir $gentop" | ||
4998 | $run $mkdir "$gentop" | ||
4999 | status=$? | ||
5000 | if test "$status" -ne 0 && test ! -d "$gentop"; then | ||
5001 | exit $status | ||
5002 | fi | ||
5003 | generated="$generated $gentop" | ||
5004 | |||
5005 | # Add in members from convenience archives. | ||
5006 | for xlib in $addlibs; do | ||
5007 | # Extract the objects. | ||
5008 | case $xlib in | ||
5009 | [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;; | ||
5010 | *) xabs=`pwd`"/$xlib" ;; | ||
5011 | esac | ||
5012 | xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'` | ||
5013 | xdir="$gentop/$xlib" | ||
5014 | |||
5015 | $show "${rm}r $xdir" | ||
5016 | $run ${rm}r "$xdir" | ||
5017 | $show "$mkdir $xdir" | ||
5018 | $run $mkdir "$xdir" | ||
5019 | status=$? | ||
5020 | if test "$status" -ne 0 && test ! -d "$xdir"; then | ||
5021 | exit $status | ||
5022 | fi | ||
5023 | # We will extract separately just the conflicting names and we will no | ||
5024 | # longer touch any unique names. It is faster to leave these extract | ||
5025 | # automatically by $AR in one run. | ||
5026 | $show "(cd $xdir && $AR x $xabs)" | ||
5027 | $run eval "(cd \$xdir && $AR x \$xabs)" || exit $? | ||
5028 | if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then | ||
5029 | : | ||
5030 | else | ||
5031 | $echo "$modename: warning: object name conflicts; renaming object files" 1>&2 | ||
5032 | $echo "$modename: warning: to ensure that they will not overwrite" 1>&2 | ||
5033 | $AR t "$xabs" | sort | uniq -cd | while read -r count name | ||
5034 | do | ||
5035 | i=1 | ||
5036 | while test "$i" -le "$count" | ||
5037 | do | ||
5038 | # Put our $i before any first dot (extension) | ||
5039 | # Never overwrite any file | ||
5040 | name_to="$name" | ||
5041 | while test "X$name_to" = "X$name" || test -f "$xdir/$name_to" | ||
5042 | do | ||
5043 | name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"` | ||
5044 | done | ||
5045 | $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')" | ||
5046 | $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $? | ||
5047 | i=`expr $i + 1` | ||
5048 | done | ||
5049 | done | ||
5050 | fi | ||
5051 | |||
5052 | oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP` | ||
5053 | done | ||
5054 | fi | ||
5055 | |||
5056 | # Do each command in the archive commands. | ||
5057 | if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then | ||
5058 | cmds=$old_archive_from_new_cmds | ||
5059 | else | ||
5060 | eval cmds=\"$old_archive_cmds\" | ||
5061 | |||
5062 | if len=`expr "X$cmds" : ".*"` && | ||
5063 | test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then | ||
5064 | cmds=$old_archive_cmds | ||
5065 | else | ||
5066 | # the command line is too long to link in one step, link in parts | ||
5067 | $echo "using piecewise archive linking..." | ||
5068 | save_RANLIB=$RANLIB | ||
5069 | RANLIB=: | ||
5070 | objlist= | ||
5071 | concat_cmds= | ||
5072 | save_oldobjs=$oldobjs | ||
5073 | # GNU ar 2.10+ was changed to match POSIX; thus no paths are | ||
5074 | # encoded into archives. This makes 'ar r' malfunction in | ||
5075 | # this piecewise linking case whenever conflicting object | ||
5076 | # names appear in distinct ar calls; check, warn and compensate. | ||
5077 | if (for obj in $save_oldobjs | ||
5078 | do | ||
5079 | $echo "X$obj" | $Xsed -e 's%^.*/%%' | ||
5080 | done | sort | sort -uc >/dev/null 2>&1); then | ||
5081 | : | ||
5082 | else | ||
5083 | $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 | ||
5084 | $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 | ||
5085 | AR_FLAGS=cq | ||
5086 | fi | ||
5087 | # Is there a better way of finding the last object in the list? | ||
5088 | for obj in $save_oldobjs | ||
5089 | do | ||
5090 | last_oldobj=$obj | ||
5091 | done | ||
5092 | for obj in $save_oldobjs | ||
5093 | do | ||
5094 | oldobjs="$objlist $obj" | ||
5095 | objlist="$objlist $obj" | ||
5096 | eval test_cmds=\"$old_archive_cmds\" | ||
5097 | if len=`expr "X$test_cmds" : ".*"` && | ||
5098 | test "$len" -le "$max_cmd_len"; then | ||
5099 | : | ||
5100 | else | ||
5101 | # the above command should be used before it gets too long | ||
5102 | oldobjs=$objlist | ||
5103 | if test "$obj" = "$last_oldobj" ; then | ||
5104 | RANLIB=$save_RANLIB | ||
5105 | fi | ||
5106 | test -z "$concat_cmds" || concat_cmds=$concat_cmds~ | ||
5107 | eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" | ||
5108 | objlist= | ||
5109 | fi | ||
5110 | done | ||
5111 | RANLIB=$save_RANLIB | ||
5112 | oldobjs=$objlist | ||
5113 | if test "X$oldobjs" = "X" ; then | ||
5114 | eval cmds=\"\$concat_cmds\" | ||
5115 | else | ||
5116 | eval cmds=\"\$concat_cmds~\$old_archive_cmds\" | ||
5117 | fi | ||
5118 | fi | ||
5119 | fi | ||
5120 | save_ifs="$IFS"; IFS='~' | ||
5121 | for cmd in $cmds; do | ||
5122 | eval cmd=\"$cmd\" | ||
5123 | IFS="$save_ifs" | ||
5124 | $show "$cmd" | ||
5125 | $run eval "$cmd" || exit $? | ||
5126 | done | ||
5127 | IFS="$save_ifs" | ||
5128 | done | ||
5129 | |||
5130 | if test -n "$generated"; then | ||
5131 | $show "${rm}r$generated" | ||
5132 | $run ${rm}r$generated | ||
5133 | fi | ||
5134 | |||
5135 | # Now create the libtool archive. | ||
5136 | case $output in | ||
5137 | *.la) | ||
5138 | old_library= | ||
5139 | test "$build_old_libs" = yes && old_library="$libname.$libext" | ||
5140 | $show "creating $output" | ||
5141 | |||
5142 | # Preserve any variables that may affect compiler behavior | ||
5143 | for var in $variables_saved_for_relink; do | ||
5144 | if eval test -z \"\${$var+set}\"; then | ||
5145 | relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" | ||
5146 | elif eval var_value=\$$var; test -z "$var_value"; then | ||
5147 | relink_command="$var=; export $var; $relink_command" | ||
5148 | else | ||
5149 | var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` | ||
5150 | relink_command="$var=\"$var_value\"; export $var; $relink_command" | ||
5151 | fi | ||
5152 | done | ||
5153 | # Quote the link command for shipping. | ||
5154 | relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" | ||
5155 | relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` | ||
5156 | if test "$hardcode_automatic" = yes ; then | ||
5157 | relink_command= | ||
5158 | fi | ||
5159 | |||
5160 | |||
5161 | # Only create the output if not a dry run. | ||
5162 | if test -z "$run"; then | ||
5163 | for installed in no yes; do | ||
5164 | if test "$installed" = yes; then | ||
5165 | if test -z "$install_libdir"; then | ||
5166 | break | ||
5167 | fi | ||
5168 | output="$output_objdir/$outputname"i | ||
5169 | # Replace all uninstalled libtool libraries with the installed ones | ||
5170 | newdependency_libs= | ||
5171 | for deplib in $dependency_libs; do | ||
5172 | case $deplib in | ||
5173 | *.la) | ||
5174 | name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` | ||
5175 | eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` | ||
5176 | if test -z "$libdir"; then | ||
5177 | $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 | ||
5178 | exit $EXIT_FAILURE | ||
5179 | fi | ||
5180 | newdependency_libs="$newdependency_libs $libdir/$name" | ||
5181 | ;; | ||
5182 | *) newdependency_libs="$newdependency_libs $deplib" ;; | ||
5183 | esac | ||
5184 | done | ||
5185 | dependency_libs="$newdependency_libs" | ||
5186 | newdlfiles= | ||
5187 | for lib in $dlfiles; do | ||
5188 | name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` | ||
5189 | eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` | ||
5190 | if test -z "$libdir"; then | ||
5191 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | ||
5192 | exit $EXIT_FAILURE | ||
5193 | fi | ||
5194 | newdlfiles="$newdlfiles $libdir/$name" | ||
5195 | done | ||
5196 | dlfiles="$newdlfiles" | ||
5197 | newdlprefiles= | ||
5198 | for lib in $dlprefiles; do | ||
5199 | name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` | ||
5200 | eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` | ||
5201 | if test -z "$libdir"; then | ||
5202 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | ||
5203 | exit $EXIT_FAILURE | ||
5204 | fi | ||
5205 | newdlprefiles="$newdlprefiles $libdir/$name" | ||
5206 | done | ||
5207 | dlprefiles="$newdlprefiles" | ||
5208 | else | ||
5209 | newdlfiles= | ||
5210 | for lib in $dlfiles; do | ||
5211 | case $lib in | ||
5212 | [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; | ||
5213 | *) abs=`pwd`"/$lib" ;; | ||
5214 | esac | ||
5215 | newdlfiles="$newdlfiles $abs" | ||
5216 | done | ||
5217 | dlfiles="$newdlfiles" | ||
5218 | newdlprefiles= | ||
5219 | for lib in $dlprefiles; do | ||
5220 | case $lib in | ||
5221 | [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; | ||
5222 | *) abs=`pwd`"/$lib" ;; | ||
5223 | esac | ||
5224 | newdlprefiles="$newdlprefiles $abs" | ||
5225 | done | ||
5226 | dlprefiles="$newdlprefiles" | ||
5227 | fi | ||
5228 | $rm $output | ||
5229 | # place dlname in correct position for cygwin | ||
5230 | tdlname=$dlname | ||
5231 | case $host,$output,$installed,$module,$dlname in | ||
5232 | *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; | ||
5233 | esac | ||
5234 | $echo > $output "\ | ||
5235 | # $outputname - a libtool library file | ||
5236 | # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP | ||
5237 | # | ||
5238 | # Please DO NOT delete this file! | ||
5239 | # It is necessary for linking the library. | ||
5240 | |||
5241 | # The name that we can dlopen(3). | ||
5242 | dlname='$tdlname' | ||
5243 | |||
5244 | # Names of this library. | ||
5245 | library_names='$library_names' | ||
5246 | |||
5247 | # The name of the static archive. | ||
5248 | old_library='$old_library' | ||
5249 | |||
5250 | # Libraries that this one depends upon. | ||
5251 | dependency_libs='$dependency_libs' | ||
5252 | |||
5253 | # Version information for $libname. | ||
5254 | current=$current | ||
5255 | age=$age | ||
5256 | revision=$revision | ||
5257 | |||
5258 | # Is this an already installed library? | ||
5259 | installed=$installed | ||
5260 | |||
5261 | # Should we warn about portability when linking against -modules? | ||
5262 | shouldnotlink=$module | ||
5263 | |||
5264 | # Files to dlopen/dlpreopen | ||
5265 | dlopen='$dlfiles' | ||
5266 | dlpreopen='$dlprefiles' | ||
5267 | |||
5268 | # Directory that this library needs to be installed in: | ||
5269 | libdir='$install_libdir'" | ||
5270 | if test "$installed" = no && test "$need_relink" = yes; then | ||
5271 | $echo >> $output "\ | ||
5272 | relink_command=\"$relink_command\"" | ||
5273 | fi | ||
5274 | done | ||
5275 | fi | ||
5276 | |||
5277 | # Do a symbolic link so that the libtool archive can be found in | ||
5278 | # LD_LIBRARY_PATH before the program is installed. | ||
5279 | $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" | ||
5280 | $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? | ||
5281 | ;; | ||
5282 | esac | ||
5283 | exit $EXIT_SUCCESS | ||
5284 | ;; | ||
5285 | |||
5286 | # libtool install mode | ||
5287 | install) | ||
5288 | modename="$modename: install" | ||
5289 | |||
5290 | # There may be an optional sh(1) argument at the beginning of | ||
5291 | # install_prog (especially on Windows NT). | ||
5292 | if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || | ||
5293 | # Allow the use of GNU shtool's install command. | ||
5294 | $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then | ||
5295 | # Aesthetically quote it. | ||
5296 | arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` | ||
5297 | case $arg in | ||
5298 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) | ||
5299 | arg="\"$arg\"" | ||
5300 | ;; | ||
5301 | esac | ||
5302 | install_prog="$arg " | ||
5303 | arg="$1" | ||
5304 | shift | ||
5305 | else | ||
5306 | install_prog= | ||
5307 | arg="$nonopt" | ||
5308 | fi | ||
5309 | |||
5310 | # The real first argument should be the name of the installation program. | ||
5311 | # Aesthetically quote it. | ||
5312 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | ||
5313 | case $arg in | ||
5314 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) | ||
5315 | arg="\"$arg\"" | ||
5316 | ;; | ||
5317 | esac | ||
5318 | install_prog="$install_prog$arg" | ||
5319 | |||
5320 | # We need to accept at least all the BSD install flags. | ||
5321 | dest= | ||
5322 | files= | ||
5323 | opts= | ||
5324 | prev= | ||
5325 | install_type= | ||
5326 | isdir=no | ||
5327 | stripme= | ||
5328 | for arg | ||
5329 | do | ||
5330 | if test -n "$dest"; then | ||
5331 | files="$files $dest" | ||
5332 | dest="$arg" | ||
5333 | continue | ||
5334 | fi | ||
5335 | |||
5336 | case $arg in | ||
5337 | -d) isdir=yes ;; | ||
5338 | -f) prev="-f" ;; | ||
5339 | -g) prev="-g" ;; | ||
5340 | -m) prev="-m" ;; | ||
5341 | -o) prev="-o" ;; | ||
5342 | -s) | ||
5343 | stripme=" -s" | ||
5344 | continue | ||
5345 | ;; | ||
5346 | -*) ;; | ||
5347 | |||
5348 | *) | ||
5349 | # If the previous option needed an argument, then skip it. | ||
5350 | if test -n "$prev"; then | ||
5351 | prev= | ||
5352 | else | ||
5353 | dest="$arg" | ||
5354 | continue | ||
5355 | fi | ||
5356 | ;; | ||
5357 | esac | ||
5358 | |||
5359 | # Aesthetically quote the argument. | ||
5360 | arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` | ||
5361 | case $arg in | ||
5362 | *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*) | ||
5363 | arg="\"$arg\"" | ||
5364 | ;; | ||
5365 | esac | ||
5366 | install_prog="$install_prog $arg" | ||
5367 | done | ||
5368 | |||
5369 | if test -z "$install_prog"; then | ||
5370 | $echo "$modename: you must specify an install program" 1>&2 | ||
5371 | $echo "$help" 1>&2 | ||
5372 | exit $EXIT_FAILURE | ||
5373 | fi | ||
5374 | |||
5375 | if test -n "$prev"; then | ||
5376 | $echo "$modename: the \`$prev' option requires an argument" 1>&2 | ||
5377 | $echo "$help" 1>&2 | ||
5378 | exit $EXIT_FAILURE | ||
5379 | fi | ||
5380 | |||
5381 | if test -z "$files"; then | ||
5382 | if test -z "$dest"; then | ||
5383 | $echo "$modename: no file or destination specified" 1>&2 | ||
5384 | else | ||
5385 | $echo "$modename: you must specify a destination" 1>&2 | ||
5386 | fi | ||
5387 | $echo "$help" 1>&2 | ||
5388 | exit $EXIT_FAILURE | ||
5389 | fi | ||
5390 | |||
5391 | # Strip any trailing slash from the destination. | ||
5392 | dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` | ||
5393 | |||
5394 | # Check to see that the destination is a directory. | ||
5395 | test -d "$dest" && isdir=yes | ||
5396 | if test "$isdir" = yes; then | ||
5397 | destdir="$dest" | ||
5398 | destname= | ||
5399 | else | ||
5400 | destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` | ||
5401 | test "X$destdir" = "X$dest" && destdir=. | ||
5402 | destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` | ||
5403 | |||
5404 | # Not a directory, so check to see that there is only one file specified. | ||
5405 | set dummy $files | ||
5406 | if test "$#" -gt 2; then | ||
5407 | $echo "$modename: \`$dest' is not a directory" 1>&2 | ||
5408 | $echo "$help" 1>&2 | ||
5409 | exit $EXIT_FAILURE | ||
5410 | fi | ||
5411 | fi | ||
5412 | case $destdir in | ||
5413 | [\\/]* | [A-Za-z]:[\\/]*) ;; | ||
5414 | *) | ||
5415 | for file in $files; do | ||
5416 | case $file in | ||
5417 | *.lo) ;; | ||
5418 | *) | ||
5419 | $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 | ||
5420 | $echo "$help" 1>&2 | ||
5421 | exit $EXIT_FAILURE | ||
5422 | ;; | ||
5423 | esac | ||
5424 | done | ||
5425 | ;; | ||
5426 | esac | ||
5427 | |||
5428 | # This variable tells wrapper scripts just to set variables rather | ||
5429 | # than running their programs. | ||
5430 | libtool_install_magic="$magic" | ||
5431 | |||
5432 | staticlibs= | ||
5433 | future_libdirs= | ||
5434 | current_libdirs= | ||
5435 | for file in $files; do | ||
5436 | |||
5437 | # Do each installation. | ||
5438 | case $file in | ||
5439 | *.$libext) | ||
5440 | # Do the static libraries later. | ||
5441 | staticlibs="$staticlibs $file" | ||
5442 | ;; | ||
5443 | |||
5444 | *.la) | ||
5445 | # Check to see that this really is a libtool archive. | ||
5446 | if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | ||
5447 | else | ||
5448 | $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 | ||
5449 | $echo "$help" 1>&2 | ||
5450 | exit $EXIT_FAILURE | ||
5451 | fi | ||
5452 | |||
5453 | library_names= | ||
5454 | old_library= | ||
5455 | relink_command= | ||
5456 | # If there is no directory component, then add one. | ||
5457 | case $file in | ||
5458 | */* | *\\*) . $file ;; | ||
5459 | *) . ./$file ;; | ||
5460 | esac | ||
5461 | |||
5462 | # Add the libdir to current_libdirs if it is the destination. | ||
5463 | if test "X$destdir" = "X$libdir"; then | ||
5464 | case "$current_libdirs " in | ||
5465 | *" $libdir "*) ;; | ||
5466 | *) current_libdirs="$current_libdirs $libdir" ;; | ||
5467 | esac | ||
5468 | else | ||
5469 | # Note the libdir as a future libdir. | ||
5470 | case "$future_libdirs " in | ||
5471 | *" $libdir "*) ;; | ||
5472 | *) future_libdirs="$future_libdirs $libdir" ;; | ||
5473 | esac | ||
5474 | fi | ||
5475 | |||
5476 | dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ | ||
5477 | test "X$dir" = "X$file/" && dir= | ||
5478 | dir="$dir$objdir" | ||
5479 | |||
5480 | if test -n "$relink_command"; then | ||
5481 | # Determine the prefix the user has applied to our future dir. | ||
5482 | inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` | ||
5483 | |||
5484 | # Don't allow the user to place us outside of our expected | ||
5485 | # location b/c this prevents finding dependent libraries that | ||
5486 | # are installed to the same prefix. | ||
5487 | # At present, this check doesn't affect windows .dll's that | ||
5488 | # are installed into $libdir/../bin (currently, that works fine) | ||
5489 | # but it's something to keep an eye on. | ||
5490 | if test "$inst_prefix_dir" = "$destdir"; then | ||
5491 | $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 | ||
5492 | exit $EXIT_FAILURE | ||
5493 | fi | ||
5494 | |||
5495 | if test -n "$inst_prefix_dir"; then | ||
5496 | # Stick the inst_prefix_dir data into the link command. | ||
5497 | relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` | ||
5498 | else | ||
5499 | relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` | ||
5500 | fi | ||
5501 | |||
5502 | $echo "$modename: warning: relinking \`$file'" 1>&2 | ||
5503 | $show "$relink_command" | ||
5504 | if $run eval "$relink_command"; then : | ||
5505 | else | ||
5506 | $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 | ||
5507 | exit $EXIT_FAILURE | ||
5508 | fi | ||
5509 | fi | ||
5510 | |||
5511 | # See the names of the shared library. | ||
5512 | set dummy $library_names | ||
5513 | if test -n "$2"; then | ||
5514 | realname="$2" | ||
5515 | shift | ||
5516 | shift | ||
5517 | |||
5518 | srcname="$realname" | ||
5519 | test -n "$relink_command" && srcname="$realname"T | ||
5520 | |||
5521 | # Install the shared library and build the symlinks. | ||
5522 | $show "$install_prog $dir/$srcname $destdir/$realname" | ||
5523 | $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? | ||
5524 | if test -n "$stripme" && test -n "$striplib"; then | ||
5525 | $show "$striplib $destdir/$realname" | ||
5526 | $run eval "$striplib $destdir/$realname" || exit $? | ||
5527 | fi | ||
5528 | |||
5529 | if test "$#" -gt 0; then | ||
5530 | # Delete the old symlinks, and create new ones. | ||
5531 | for linkname | ||
5532 | do | ||
5533 | if test "$linkname" != "$realname"; then | ||
5534 | $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" | ||
5535 | $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)" | ||
5536 | fi | ||
5537 | done | ||
5538 | fi | ||
5539 | |||
5540 | # Do each command in the postinstall commands. | ||
5541 | lib="$destdir/$realname" | ||
5542 | cmds=$postinstall_cmds | ||
5543 | save_ifs="$IFS"; IFS='~' | ||
5544 | for cmd in $cmds; do | ||
5545 | IFS="$save_ifs" | ||
5546 | eval cmd=\"$cmd\" | ||
5547 | $show "$cmd" | ||
5548 | $run eval "$cmd" || exit $? | ||
5549 | done | ||
5550 | IFS="$save_ifs" | ||
5551 | fi | ||
5552 | |||
5553 | # Install the pseudo-library for information purposes. | ||
5554 | name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | ||
5555 | instname="$dir/$name"i | ||
5556 | $show "$install_prog $instname $destdir/$name" | ||
5557 | $run eval "$install_prog $instname $destdir/$name" || exit $? | ||
5558 | |||
5559 | # Maybe install the static library, too. | ||
5560 | test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" | ||
5561 | ;; | ||
5562 | |||
5563 | *.lo) | ||
5564 | # Install (i.e. copy) a libtool object. | ||
5565 | |||
5566 | # Figure out destination file name, if it wasn't already specified. | ||
5567 | if test -n "$destname"; then | ||
5568 | destfile="$destdir/$destname" | ||
5569 | else | ||
5570 | destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | ||
5571 | destfile="$destdir/$destfile" | ||
5572 | fi | ||
5573 | |||
5574 | # Deduce the name of the destination old-style object file. | ||
5575 | case $destfile in | ||
5576 | *.lo) | ||
5577 | staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` | ||
5578 | ;; | ||
5579 | *.$objext) | ||
5580 | staticdest="$destfile" | ||
5581 | destfile= | ||
5582 | ;; | ||
5583 | *) | ||
5584 | $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 | ||
5585 | $echo "$help" 1>&2 | ||
5586 | exit $EXIT_FAILURE | ||
5587 | ;; | ||
5588 | esac | ||
5589 | |||
5590 | # Install the libtool object if requested. | ||
5591 | if test -n "$destfile"; then | ||
5592 | $show "$install_prog $file $destfile" | ||
5593 | $run eval "$install_prog $file $destfile" || exit $? | ||
5594 | fi | ||
5595 | |||
5596 | # Install the old object if enabled. | ||
5597 | if test "$build_old_libs" = yes; then | ||
5598 | # Deduce the name of the old-style object file. | ||
5599 | staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` | ||
5600 | |||
5601 | $show "$install_prog $staticobj $staticdest" | ||
5602 | $run eval "$install_prog \$staticobj \$staticdest" || exit $? | ||
5603 | fi | ||
5604 | exit $EXIT_SUCCESS | ||
5605 | ;; | ||
5606 | |||
5607 | *) | ||
5608 | # Figure out destination file name, if it wasn't already specified. | ||
5609 | if test -n "$destname"; then | ||
5610 | destfile="$destdir/$destname" | ||
5611 | else | ||
5612 | destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | ||
5613 | destfile="$destdir/$destfile" | ||
5614 | fi | ||
5615 | |||
5616 | # If the file is missing, and there is a .exe on the end, strip it | ||
5617 | # because it is most likely a libtool script we actually want to | ||
5618 | # install | ||
5619 | stripped_ext="" | ||
5620 | case $file in | ||
5621 | *.exe) | ||
5622 | if test ! -f "$file"; then | ||
5623 | file=`$echo $file|${SED} 's,.exe$,,'` | ||
5624 | stripped_ext=".exe" | ||
5625 | fi | ||
5626 | ;; | ||
5627 | esac | ||
5628 | |||
5629 | # Do a test to see if this is really a libtool program. | ||
5630 | case $host in | ||
5631 | *cygwin*|*mingw*) | ||
5632 | wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` | ||
5633 | ;; | ||
5634 | *) | ||
5635 | wrapper=$file | ||
5636 | ;; | ||
5637 | esac | ||
5638 | if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then | ||
5639 | notinst_deplibs= | ||
5640 | relink_command= | ||
5641 | |||
5642 | # To insure that "foo" is sourced, and not "foo.exe", | ||
5643 | # finese the cygwin/MSYS system by explicitly sourcing "foo." | ||
5644 | # which disallows the automatic-append-.exe behavior. | ||
5645 | case $build in | ||
5646 | *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; | ||
5647 | *) wrapperdot=${wrapper} ;; | ||
5648 | esac | ||
5649 | # If there is no directory component, then add one. | ||
5650 | case $file in | ||
5651 | */* | *\\*) . ${wrapperdot} ;; | ||
5652 | *) . ./${wrapperdot} ;; | ||
5653 | esac | ||
5654 | |||
5655 | # Check the variables that should have been set. | ||
5656 | if test -z "$notinst_deplibs"; then | ||
5657 | $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 | ||
5658 | exit $EXIT_FAILURE | ||
5659 | fi | ||
5660 | |||
5661 | finalize=yes | ||
5662 | for lib in $notinst_deplibs; do | ||
5663 | # Check to see that each library is installed. | ||
5664 | libdir= | ||
5665 | if test -f "$lib"; then | ||
5666 | # If there is no directory component, then add one. | ||
5667 | case $lib in | ||
5668 | */* | *\\*) . $lib ;; | ||
5669 | *) . ./$lib ;; | ||
5670 | esac | ||
5671 | fi | ||
5672 | libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test | ||
5673 | if test -n "$libdir" && test ! -f "$libfile"; then | ||
5674 | $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 | ||
5675 | finalize=no | ||
5676 | fi | ||
5677 | done | ||
5678 | |||
5679 | relink_command= | ||
5680 | # To insure that "foo" is sourced, and not "foo.exe", | ||
5681 | # finese the cygwin/MSYS system by explicitly sourcing "foo." | ||
5682 | # which disallows the automatic-append-.exe behavior. | ||
5683 | case $build in | ||
5684 | *cygwin* | *mingw*) wrapperdot=${wrapper}. ;; | ||
5685 | *) wrapperdot=${wrapper} ;; | ||
5686 | esac | ||
5687 | # If there is no directory component, then add one. | ||
5688 | case $file in | ||
5689 | */* | *\\*) . ${wrapperdot} ;; | ||
5690 | *) . ./${wrapperdot} ;; | ||
5691 | esac | ||
5692 | |||
5693 | outputname= | ||
5694 | if test "$fast_install" = no && test -n "$relink_command"; then | ||
5695 | if test "$finalize" = yes && test -z "$run"; then | ||
5696 | tmpdir="/tmp" | ||
5697 | test -n "$TMPDIR" && tmpdir="$TMPDIR" | ||
5698 | tmpdir="$tmpdir/libtool-$$" | ||
5699 | save_umask=`umask` | ||
5700 | umask 0077 | ||
5701 | if $mkdir "$tmpdir"; then | ||
5702 | umask $save_umask | ||
5703 | else | ||
5704 | umask $save_umask | ||
5705 | $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2 | ||
5706 | continue | ||
5707 | fi | ||
5708 | file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` | ||
5709 | outputname="$tmpdir/$file" | ||
5710 | # Replace the output file specification. | ||
5711 | relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` | ||
5712 | |||
5713 | $show "$relink_command" | ||
5714 | if $run eval "$relink_command"; then : | ||
5715 | else | ||
5716 | $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 | ||
5717 | ${rm}r "$tmpdir" | ||
5718 | continue | ||
5719 | fi | ||
5720 | file="$outputname" | ||
5721 | else | ||
5722 | $echo "$modename: warning: cannot relink \`$file'" 1>&2 | ||
5723 | fi | ||
5724 | else | ||
5725 | # Install the binary that we compiled earlier. | ||
5726 | file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` | ||
5727 | fi | ||
5728 | fi | ||
5729 | |||
5730 | # remove .exe since cygwin /usr/bin/install will append another | ||
5731 | # one anyways | ||
5732 | case $install_prog,$host in | ||
5733 | */usr/bin/install*,*cygwin*) | ||
5734 | case $file:$destfile in | ||
5735 | *.exe:*.exe) | ||
5736 | # this is ok | ||
5737 | ;; | ||
5738 | *.exe:*) | ||
5739 | destfile=$destfile.exe | ||
5740 | ;; | ||
5741 | *:*.exe) | ||
5742 | destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` | ||
5743 | ;; | ||
5744 | esac | ||
5745 | ;; | ||
5746 | esac | ||
5747 | $show "$install_prog$stripme $file $destfile" | ||
5748 | $run eval "$install_prog\$stripme \$file \$destfile" || exit $? | ||
5749 | test -n "$outputname" && ${rm}r "$tmpdir" | ||
5750 | ;; | ||
5751 | esac | ||
5752 | done | ||
5753 | |||
5754 | for file in $staticlibs; do | ||
5755 | name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | ||
5756 | |||
5757 | # Set up the ranlib parameters. | ||
5758 | oldlib="$destdir/$name" | ||
5759 | |||
5760 | $show "$install_prog $file $oldlib" | ||
5761 | $run eval "$install_prog \$file \$oldlib" || exit $? | ||
5762 | |||
5763 | if test -n "$stripme" && test -n "$old_striplib"; then | ||
5764 | $show "$old_striplib $oldlib" | ||
5765 | $run eval "$old_striplib $oldlib" || exit $? | ||
5766 | fi | ||
5767 | |||
5768 | # Do each command in the postinstall commands. | ||
5769 | cmds=$old_postinstall_cmds | ||
5770 | save_ifs="$IFS"; IFS='~' | ||
5771 | for cmd in $cmds; do | ||
5772 | IFS="$save_ifs" | ||
5773 | eval cmd=\"$cmd\" | ||
5774 | $show "$cmd" | ||
5775 | $run eval "$cmd" || exit $? | ||
5776 | done | ||
5777 | IFS="$save_ifs" | ||
5778 | done | ||
5779 | |||
5780 | if test -n "$future_libdirs"; then | ||
5781 | $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 | ||
5782 | fi | ||
5783 | |||
5784 | if test -n "$current_libdirs"; then | ||
5785 | # Maybe just do a dry run. | ||
5786 | test -n "$run" && current_libdirs=" -n$current_libdirs" | ||
5787 | exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' | ||
5788 | else | ||
5789 | exit $EXIT_SUCCESS | ||
5790 | fi | ||
5791 | ;; | ||
5792 | |||
5793 | # libtool finish mode | ||
5794 | finish) | ||
5795 | modename="$modename: finish" | ||
5796 | libdirs="$nonopt" | ||
5797 | admincmds= | ||
5798 | |||
5799 | if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then | ||
5800 | for dir | ||
5801 | do | ||
5802 | libdirs="$libdirs $dir" | ||
5803 | done | ||
5804 | |||
5805 | for libdir in $libdirs; do | ||
5806 | if test -n "$finish_cmds"; then | ||
5807 | # Do each command in the finish commands. | ||
5808 | cmds=$finish_cmds | ||
5809 | save_ifs="$IFS"; IFS='~' | ||
5810 | for cmd in $cmds; do | ||
5811 | IFS="$save_ifs" | ||
5812 | eval cmd=\"$cmd\" | ||
5813 | $show "$cmd" | ||
5814 | $run eval "$cmd" || admincmds="$admincmds | ||
5815 | $cmd" | ||
5816 | done | ||
5817 | IFS="$save_ifs" | ||
5818 | fi | ||
5819 | if test -n "$finish_eval"; then | ||
5820 | # Do the single finish_eval. | ||
5821 | eval cmds=\"$finish_eval\" | ||
5822 | $run eval "$cmds" || admincmds="$admincmds | ||
5823 | $cmds" | ||
5824 | fi | ||
5825 | done | ||
5826 | fi | ||
5827 | |||
5828 | # Exit here if they wanted silent mode. | ||
5829 | test "$show" = : && exit $EXIT_SUCCESS | ||
5830 | |||
5831 | $echo "----------------------------------------------------------------------" | ||
5832 | $echo "Libraries have been installed in:" | ||
5833 | for libdir in $libdirs; do | ||
5834 | $echo " $libdir" | ||
5835 | done | ||
5836 | $echo | ||
5837 | $echo "If you ever happen to want to link against installed libraries" | ||
5838 | $echo "in a given directory, LIBDIR, you must either use libtool, and" | ||
5839 | $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" | ||
5840 | $echo "flag during linking and do at least one of the following:" | ||
5841 | if test -n "$shlibpath_var"; then | ||
5842 | $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" | ||
5843 | $echo " during execution" | ||
5844 | fi | ||
5845 | if test -n "$runpath_var"; then | ||
5846 | $echo " - add LIBDIR to the \`$runpath_var' environment variable" | ||
5847 | $echo " during linking" | ||
5848 | fi | ||
5849 | if test -n "$hardcode_libdir_flag_spec"; then | ||
5850 | libdir=LIBDIR | ||
5851 | eval flag=\"$hardcode_libdir_flag_spec\" | ||
5852 | |||
5853 | $echo " - use the \`$flag' linker flag" | ||
5854 | fi | ||
5855 | if test -n "$admincmds"; then | ||
5856 | $echo " - have your system administrator run these commands:$admincmds" | ||
5857 | fi | ||
5858 | if test -f /etc/ld.so.conf; then | ||
5859 | $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" | ||
5860 | fi | ||
5861 | $echo | ||
5862 | $echo "See any operating system documentation about shared libraries for" | ||
5863 | $echo "more information, such as the ld(1) and ld.so(8) manual pages." | ||
5864 | $echo "----------------------------------------------------------------------" | ||
5865 | exit $EXIT_SUCCESS | ||
5866 | ;; | ||
5867 | |||
5868 | # libtool execute mode | ||
5869 | execute) | ||
5870 | modename="$modename: execute" | ||
5871 | |||
5872 | # The first argument is the command name. | ||
5873 | cmd="$nonopt" | ||
5874 | if test -z "$cmd"; then | ||
5875 | $echo "$modename: you must specify a COMMAND" 1>&2 | ||
5876 | $echo "$help" | ||
5877 | exit $EXIT_FAILURE | ||
5878 | fi | ||
5879 | |||
5880 | # Handle -dlopen flags immediately. | ||
5881 | for file in $execute_dlfiles; do | ||
5882 | if test ! -f "$file"; then | ||
5883 | $echo "$modename: \`$file' is not a file" 1>&2 | ||
5884 | $echo "$help" 1>&2 | ||
5885 | exit $EXIT_FAILURE | ||
5886 | fi | ||
5887 | |||
5888 | dir= | ||
5889 | case $file in | ||
5890 | *.la) | ||
5891 | # Check to see that this really is a libtool archive. | ||
5892 | if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : | ||
5893 | else | ||
5894 | $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 | ||
5895 | $echo "$help" 1>&2 | ||
5896 | exit $EXIT_FAILURE | ||
5897 | fi | ||
5898 | |||
5899 | # Read the libtool library. | ||
5900 | dlname= | ||
5901 | library_names= | ||
5902 | |||
5903 | # If there is no directory component, then add one. | ||
5904 | case $file in | ||
5905 | */* | *\\*) . $file ;; | ||
5906 | *) . ./$file ;; | ||
5907 | esac | ||
5908 | |||
5909 | # Skip this library if it cannot be dlopened. | ||
5910 | if test -z "$dlname"; then | ||
5911 | # Warn if it was a shared library. | ||
5912 | test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" | ||
5913 | continue | ||
5914 | fi | ||
5915 | |||
5916 | dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` | ||
5917 | test "X$dir" = "X$file" && dir=. | ||
5918 | |||
5919 | if test -f "$dir/$objdir/$dlname"; then | ||
5920 | dir="$dir/$objdir" | ||
5921 | else | ||
5922 | $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 | ||
5923 | exit $EXIT_FAILURE | ||
5924 | fi | ||
5925 | ;; | ||
5926 | |||
5927 | *.lo) | ||
5928 | # Just add the directory containing the .lo file. | ||
5929 | dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` | ||
5930 | test "X$dir" = "X$file" && dir=. | ||
5931 | ;; | ||
5932 | |||
5933 | *) | ||
5934 | $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 | ||
5935 | continue | ||
5936 | ;; | ||
5937 | esac | ||
5938 | |||
5939 | # Get the absolute pathname. | ||
5940 | absdir=`cd "$dir" && pwd` | ||
5941 | test -n "$absdir" && dir="$absdir" | ||
5942 | |||
5943 | # Now add the directory to shlibpath_var. | ||
5944 | if eval "test -z \"\$$shlibpath_var\""; then | ||
5945 | eval "$shlibpath_var=\"\$dir\"" | ||
5946 | else | ||
5947 | eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" | ||
5948 | fi | ||
5949 | done | ||
5950 | |||
5951 | # This variable tells wrapper scripts just to set shlibpath_var | ||
5952 | # rather than running their programs. | ||
5953 | libtool_execute_magic="$magic" | ||
5954 | |||
5955 | # Check if any of the arguments is a wrapper script. | ||
5956 | args= | ||
5957 | for file | ||
5958 | do | ||
5959 | case $file in | ||
5960 | -*) ;; | ||
5961 | *) | ||
5962 | # Do a test to see if this is really a libtool program. | ||
5963 | if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
5964 | # If there is no directory component, then add one. | ||
5965 | case $file in | ||
5966 | */* | *\\*) . $file ;; | ||
5967 | *) . ./$file ;; | ||
5968 | esac | ||
5969 | |||
5970 | # Transform arg to wrapped name. | ||
5971 | file="$progdir/$program" | ||
5972 | fi | ||
5973 | ;; | ||
5974 | esac | ||
5975 | # Quote arguments (to preserve shell metacharacters). | ||
5976 | file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` | ||
5977 | args="$args \"$file\"" | ||
5978 | done | ||
5979 | |||
5980 | if test -z "$run"; then | ||
5981 | if test -n "$shlibpath_var"; then | ||
5982 | # Export the shlibpath_var. | ||
5983 | eval "export $shlibpath_var" | ||
5984 | fi | ||
5985 | |||
5986 | # Restore saved environment variables | ||
5987 | if test "${save_LC_ALL+set}" = set; then | ||
5988 | LC_ALL="$save_LC_ALL"; export LC_ALL | ||
5989 | fi | ||
5990 | if test "${save_LANG+set}" = set; then | ||
5991 | LANG="$save_LANG"; export LANG | ||
5992 | fi | ||
5993 | |||
5994 | # Now prepare to actually exec the command. | ||
5995 | exec_cmd="\$cmd$args" | ||
5996 | else | ||
5997 | # Display what would be done. | ||
5998 | if test -n "$shlibpath_var"; then | ||
5999 | eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" | ||
6000 | $echo "export $shlibpath_var" | ||
6001 | fi | ||
6002 | $echo "$cmd$args" | ||
6003 | exit $EXIT_SUCCESS | ||
6004 | fi | ||
6005 | ;; | ||
6006 | |||
6007 | # libtool clean and uninstall mode | ||
6008 | clean | uninstall) | ||
6009 | modename="$modename: $mode" | ||
6010 | rm="$nonopt" | ||
6011 | files= | ||
6012 | rmforce= | ||
6013 | exit_status=0 | ||
6014 | |||
6015 | # This variable tells wrapper scripts just to set variables rather | ||
6016 | # than running their programs. | ||
6017 | libtool_install_magic="$magic" | ||
6018 | |||
6019 | for arg | ||
6020 | do | ||
6021 | case $arg in | ||
6022 | -f) rm="$rm $arg"; rmforce=yes ;; | ||
6023 | -*) rm="$rm $arg" ;; | ||
6024 | *) files="$files $arg" ;; | ||
6025 | esac | ||
6026 | done | ||
6027 | |||
6028 | if test -z "$rm"; then | ||
6029 | $echo "$modename: you must specify an RM program" 1>&2 | ||
6030 | $echo "$help" 1>&2 | ||
6031 | exit $EXIT_FAILURE | ||
6032 | fi | ||
6033 | |||
6034 | rmdirs= | ||
6035 | |||
6036 | origobjdir="$objdir" | ||
6037 | for file in $files; do | ||
6038 | dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` | ||
6039 | if test "X$dir" = "X$file"; then | ||
6040 | dir=. | ||
6041 | objdir="$origobjdir" | ||
6042 | else | ||
6043 | objdir="$dir/$origobjdir" | ||
6044 | fi | ||
6045 | name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` | ||
6046 | test "$mode" = uninstall && objdir="$dir" | ||
6047 | |||
6048 | # Remember objdir for removal later, being careful to avoid duplicates | ||
6049 | if test "$mode" = clean; then | ||
6050 | case " $rmdirs " in | ||
6051 | *" $objdir "*) ;; | ||
6052 | *) rmdirs="$rmdirs $objdir" ;; | ||
6053 | esac | ||
6054 | fi | ||
6055 | |||
6056 | # Don't error if the file doesn't exist and rm -f was used. | ||
6057 | if (test -L "$file") >/dev/null 2>&1 \ | ||
6058 | || (test -h "$file") >/dev/null 2>&1 \ | ||
6059 | || test -f "$file"; then | ||
6060 | : | ||
6061 | elif test -d "$file"; then | ||
6062 | exit_status=1 | ||
6063 | continue | ||
6064 | elif test "$rmforce" = yes; then | ||
6065 | continue | ||
6066 | fi | ||
6067 | |||
6068 | rmfiles="$file" | ||
6069 | |||
6070 | case $name in | ||
6071 | *.la) | ||
6072 | # Possibly a libtool archive, so verify it. | ||
6073 | if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
6074 | . $dir/$name | ||
6075 | |||
6076 | # Delete the libtool libraries and symlinks. | ||
6077 | for n in $library_names; do | ||
6078 | rmfiles="$rmfiles $objdir/$n" | ||
6079 | done | ||
6080 | test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" | ||
6081 | test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" | ||
6082 | |||
6083 | if test "$mode" = uninstall; then | ||
6084 | if test -n "$library_names"; then | ||
6085 | # Do each command in the postuninstall commands. | ||
6086 | cmds=$postuninstall_cmds | ||
6087 | save_ifs="$IFS"; IFS='~' | ||
6088 | for cmd in $cmds; do | ||
6089 | IFS="$save_ifs" | ||
6090 | eval cmd=\"$cmd\" | ||
6091 | $show "$cmd" | ||
6092 | $run eval "$cmd" | ||
6093 | if test "$?" -ne 0 && test "$rmforce" != yes; then | ||
6094 | exit_status=1 | ||
6095 | fi | ||
6096 | done | ||
6097 | IFS="$save_ifs" | ||
6098 | fi | ||
6099 | |||
6100 | if test -n "$old_library"; then | ||
6101 | # Do each command in the old_postuninstall commands. | ||
6102 | cmds=$old_postuninstall_cmds | ||
6103 | save_ifs="$IFS"; IFS='~' | ||
6104 | for cmd in $cmds; do | ||
6105 | IFS="$save_ifs" | ||
6106 | eval cmd=\"$cmd\" | ||
6107 | $show "$cmd" | ||
6108 | $run eval "$cmd" | ||
6109 | if test "$?" -ne 0 && test "$rmforce" != yes; then | ||
6110 | exit_status=1 | ||
6111 | fi | ||
6112 | done | ||
6113 | IFS="$save_ifs" | ||
6114 | fi | ||
6115 | # FIXME: should reinstall the best remaining shared library. | ||
6116 | fi | ||
6117 | fi | ||
6118 | ;; | ||
6119 | |||
6120 | *.lo) | ||
6121 | # Possibly a libtool object, so verify it. | ||
6122 | if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
6123 | |||
6124 | # Read the .lo file | ||
6125 | . $dir/$name | ||
6126 | |||
6127 | # Add PIC object to the list of files to remove. | ||
6128 | if test -n "$pic_object" \ | ||
6129 | && test "$pic_object" != none; then | ||
6130 | rmfiles="$rmfiles $dir/$pic_object" | ||
6131 | fi | ||
6132 | |||
6133 | # Add non-PIC object to the list of files to remove. | ||
6134 | if test -n "$non_pic_object" \ | ||
6135 | && test "$non_pic_object" != none; then | ||
6136 | rmfiles="$rmfiles $dir/$non_pic_object" | ||
6137 | fi | ||
6138 | fi | ||
6139 | ;; | ||
6140 | |||
6141 | *) | ||
6142 | if test "$mode" = clean ; then | ||
6143 | noexename=$name | ||
6144 | case $file in | ||
6145 | *.exe) | ||
6146 | file=`$echo $file|${SED} 's,.exe$,,'` | ||
6147 | noexename=`$echo $name|${SED} 's,.exe$,,'` | ||
6148 | # $file with .exe has already been added to rmfiles, | ||
6149 | # add $file without .exe | ||
6150 | rmfiles="$rmfiles $file" | ||
6151 | ;; | ||
6152 | esac | ||
6153 | # Do a test to see if this is a libtool program. | ||
6154 | if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then | ||
6155 | relink_command= | ||
6156 | . $dir/$noexename | ||
6157 | |||
6158 | # note $name still contains .exe if it was in $file originally | ||
6159 | # as does the version of $file that was added into $rmfiles | ||
6160 | rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" | ||
6161 | if test "$fast_install" = yes && test -n "$relink_command"; then | ||
6162 | rmfiles="$rmfiles $objdir/lt-$name" | ||
6163 | fi | ||
6164 | if test "X$noexename" != "X$name" ; then | ||
6165 | rmfiles="$rmfiles $objdir/lt-${noexename}.c" | ||
6166 | fi | ||
6167 | fi | ||
6168 | fi | ||
6169 | ;; | ||
6170 | esac | ||
6171 | $show "$rm $rmfiles" | ||
6172 | $run $rm $rmfiles || exit_status=1 | ||
6173 | done | ||
6174 | objdir="$origobjdir" | ||
6175 | |||
6176 | # Try to remove the ${objdir}s in the directories where we deleted files | ||
6177 | for dir in $rmdirs; do | ||
6178 | if test -d "$dir"; then | ||
6179 | $show "rmdir $dir" | ||
6180 | $run rmdir $dir >/dev/null 2>&1 | ||
6181 | fi | ||
6182 | done | ||
6183 | |||
6184 | exit $exit_status | ||
6185 | ;; | ||
6186 | |||
6187 | "") | ||
6188 | $echo "$modename: you must specify a MODE" 1>&2 | ||
6189 | $echo "$generic_help" 1>&2 | ||
6190 | exit $EXIT_FAILURE | ||
6191 | ;; | ||
6192 | esac | ||
6193 | |||
6194 | if test -z "$exec_cmd"; then | ||
6195 | $echo "$modename: invalid operation mode \`$mode'" 1>&2 | ||
6196 | $echo "$generic_help" 1>&2 | ||
6197 | exit $EXIT_FAILURE | ||
6198 | fi | ||
6199 | fi # test -z "$show_help" | ||
6200 | |||
6201 | if test -n "$exec_cmd"; then | ||
6202 | eval exec $exec_cmd | ||
6203 | exit $EXIT_FAILURE | ||
6204 | fi | ||
6205 | |||
6206 | # We need to display help for each of the modes. | ||
6207 | case $mode in | ||
6208 | "") $echo \ | ||
6209 | "Usage: $modename [OPTION]... [MODE-ARG]... | ||
6210 | |||
6211 | Provide generalized library-building support services. | ||
6212 | |||
6213 | --config show all configuration variables | ||
6214 | --debug enable verbose shell tracing | ||
6215 | -n, --dry-run display commands without modifying any files | ||
6216 | --features display basic configuration information and exit | ||
6217 | --finish same as \`--mode=finish' | ||
6218 | --help display this help message and exit | ||
6219 | --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] | ||
6220 | --quiet same as \`--silent' | ||
6221 | --silent don't print informational messages | ||
6222 | --tag=TAG use configuration variables from tag TAG | ||
6223 | --version print version information | ||
6224 | |||
6225 | MODE must be one of the following: | ||
6226 | |||
6227 | clean remove files from the build directory | ||
6228 | compile compile a source file into a libtool object | ||
6229 | execute automatically set library path, then run a program | ||
6230 | finish complete the installation of libtool libraries | ||
6231 | install install libraries or executables | ||
6232 | link create a library or an executable | ||
6233 | uninstall remove libraries from an installed directory | ||
6234 | |||
6235 | MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for | ||
6236 | a more detailed description of MODE. | ||
6237 | |||
6238 | Report bugs to <bug-libtool@gnu.org>." | ||
6239 | exit $EXIT_SUCCESS | ||
6240 | ;; | ||
6241 | |||
6242 | clean) | ||
6243 | $echo \ | ||
6244 | "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... | ||
6245 | |||
6246 | Remove files from the build directory. | ||
6247 | |||
6248 | RM is the name of the program to use to delete files associated with each FILE | ||
6249 | (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed | ||
6250 | to RM. | ||
6251 | |||
6252 | If FILE is a libtool library, object or program, all the files associated | ||
6253 | with it are deleted. Otherwise, only FILE itself is deleted using RM." | ||
6254 | ;; | ||
6255 | |||
6256 | compile) | ||
6257 | $echo \ | ||
6258 | "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE | ||
6259 | |||
6260 | Compile a source file into a libtool library object. | ||
6261 | |||
6262 | This mode accepts the following additional options: | ||
6263 | |||
6264 | -o OUTPUT-FILE set the output file name to OUTPUT-FILE | ||
6265 | -prefer-pic try to building PIC objects only | ||
6266 | -prefer-non-pic try to building non-PIC objects only | ||
6267 | -static always build a \`.o' file suitable for static linking | ||
6268 | |||
6269 | COMPILE-COMMAND is a command to be used in creating a \`standard' object file | ||
6270 | from the given SOURCEFILE. | ||
6271 | |||
6272 | The output file name is determined by removing the directory component from | ||
6273 | SOURCEFILE, then substituting the C source code suffix \`.c' with the | ||
6274 | library object suffix, \`.lo'." | ||
6275 | ;; | ||
6276 | |||
6277 | execute) | ||
6278 | $echo \ | ||
6279 | "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... | ||
6280 | |||
6281 | Automatically set library path, then run a program. | ||
6282 | |||
6283 | This mode accepts the following additional options: | ||
6284 | |||
6285 | -dlopen FILE add the directory containing FILE to the library path | ||
6286 | |||
6287 | This mode sets the library path environment variable according to \`-dlopen' | ||
6288 | flags. | ||
6289 | |||
6290 | If any of the ARGS are libtool executable wrappers, then they are translated | ||
6291 | into their corresponding uninstalled binary, and any of their required library | ||
6292 | directories are added to the library path. | ||
6293 | |||
6294 | Then, COMMAND is executed, with ARGS as arguments." | ||
6295 | ;; | ||
6296 | |||
6297 | finish) | ||
6298 | $echo \ | ||
6299 | "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... | ||
6300 | |||
6301 | Complete the installation of libtool libraries. | ||
6302 | |||
6303 | Each LIBDIR is a directory that contains libtool libraries. | ||
6304 | |||
6305 | The commands that this mode executes may require superuser privileges. Use | ||
6306 | the \`--dry-run' option if you just want to see what would be executed." | ||
6307 | ;; | ||
6308 | |||
6309 | install) | ||
6310 | $echo \ | ||
6311 | "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... | ||
6312 | |||
6313 | Install executables or libraries. | ||
6314 | |||
6315 | INSTALL-COMMAND is the installation command. The first component should be | ||
6316 | either the \`install' or \`cp' program. | ||
6317 | |||
6318 | The rest of the components are interpreted as arguments to that command (only | ||
6319 | BSD-compatible install options are recognized)." | ||
6320 | ;; | ||
6321 | |||
6322 | link) | ||
6323 | $echo \ | ||
6324 | "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... | ||
6325 | |||
6326 | Link object files or libraries together to form another library, or to | ||
6327 | create an executable program. | ||
6328 | |||
6329 | LINK-COMMAND is a command using the C compiler that you would use to create | ||
6330 | a program from several object files. | ||
6331 | |||
6332 | The following components of LINK-COMMAND are treated specially: | ||
6333 | |||
6334 | -all-static do not do any dynamic linking at all | ||
6335 | -avoid-version do not add a version suffix if possible | ||
6336 | -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime | ||
6337 | -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols | ||
6338 | -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) | ||
6339 | -export-symbols SYMFILE | ||
6340 | try to export only the symbols listed in SYMFILE | ||
6341 | -export-symbols-regex REGEX | ||
6342 | try to export only the symbols matching REGEX | ||
6343 | -LLIBDIR search LIBDIR for required installed libraries | ||
6344 | -lNAME OUTPUT-FILE requires the installed library libNAME | ||
6345 | -module build a library that can dlopened | ||
6346 | -no-fast-install disable the fast-install mode | ||
6347 | -no-install link a not-installable executable | ||
6348 | -no-undefined declare that a library does not refer to external symbols | ||
6349 | -o OUTPUT-FILE create OUTPUT-FILE from the specified objects | ||
6350 | -objectlist FILE Use a list of object files found in FILE to specify objects | ||
6351 | -precious-files-regex REGEX | ||
6352 | don't remove output files matching REGEX | ||
6353 | -release RELEASE specify package release information | ||
6354 | -rpath LIBDIR the created library will eventually be installed in LIBDIR | ||
6355 | -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries | ||
6356 | -static do not do any dynamic linking of libtool libraries | ||
6357 | -version-info CURRENT[:REVISION[:AGE]] | ||
6358 | specify library version info [each variable defaults to 0] | ||
6359 | |||
6360 | All other options (arguments beginning with \`-') are ignored. | ||
6361 | |||
6362 | Every other argument is treated as a filename. Files ending in \`.la' are | ||
6363 | treated as uninstalled libtool libraries, other files are standard or library | ||
6364 | object files. | ||
6365 | |||
6366 | If the OUTPUT-FILE ends in \`.la', then a libtool library is created, | ||
6367 | only library objects (\`.lo' files) may be specified, and \`-rpath' is | ||
6368 | required, except when creating a convenience library. | ||
6369 | |||
6370 | If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created | ||
6371 | using \`ar' and \`ranlib', or on Windows using \`lib'. | ||
6372 | |||
6373 | If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file | ||
6374 | is created, otherwise an executable program is created." | ||
6375 | ;; | ||
6376 | |||
6377 | uninstall) | ||
6378 | $echo \ | ||
6379 | "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... | ||
6380 | |||
6381 | Remove libraries from an installation directory. | ||
6382 | |||
6383 | RM is the name of the program to use to delete files associated with each FILE | ||
6384 | (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed | ||
6385 | to RM. | ||
6386 | |||
6387 | If FILE is a libtool library, all the files associated with it are deleted. | ||
6388 | Otherwise, only FILE itself is deleted using RM." | ||
6389 | ;; | ||
6390 | |||
6391 | *) | ||
6392 | $echo "$modename: invalid operation mode \`$mode'" 1>&2 | ||
6393 | $echo "$help" 1>&2 | ||
6394 | exit $EXIT_FAILURE | ||
6395 | ;; | ||
6396 | esac | ||
6397 | |||
6398 | $echo | ||
6399 | $echo "Try \`$modename --help' for more information about other modes." | ||
6400 | |||
6401 | exit $EXIT_SUCCESS | ||
6402 | |||
6403 | # The TAGs below are defined such that we never get into a situation | ||
6404 | # in which we disable both kinds of libraries. Given conflicting | ||
6405 | # choices, we go for a static library, that is the most portable, | ||
6406 | # since we can't tell whether shared libraries were disabled because | ||
6407 | # the user asked for that or because the platform doesn't support | ||
6408 | # them. This is particularly important on AIX, because we don't | ||
6409 | # support having both static and shared libraries enabled at the same | ||
6410 | # time on that platform, so we default to a shared-only configuration. | ||
6411 | # If a disable-shared tag is given, we'll fallback to a static-only | ||
6412 | # configuration. But we'll never go from static-only to shared-only. | ||
6413 | |||
6414 | # ### BEGIN LIBTOOL TAG CONFIG: disable-shared | ||
6415 | build_libtool_libs=no | ||
6416 | build_old_libs=yes | ||
6417 | # ### END LIBTOOL TAG CONFIG: disable-shared | ||
6418 | |||
6419 | # ### BEGIN LIBTOOL TAG CONFIG: disable-static | ||
6420 | build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` | ||
6421 | # ### END LIBTOOL TAG CONFIG: disable-static | ||
6422 | |||
6423 | # Local Variables: | ||
6424 | # mode:shell-script | ||
6425 | # sh-indentation:2 | ||
6426 | # End: | ||
diff --git a/libltdl/missing b/libltdl/missing new file mode 100755 index 00000000..e7ef83a1 --- /dev/null +++ b/libltdl/missing | |||
@@ -0,0 +1,360 @@ | |||
1 | #! /bin/sh | ||
2 | # Common stub for a few missing GNU programs while installing. | ||
3 | |||
4 | scriptversion=2003-09-02.23 | ||
5 | |||
6 | # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 | ||
7 | # Free Software Foundation, Inc. | ||
8 | # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. | ||
9 | |||
10 | # This program is free software; you can redistribute it and/or modify | ||
11 | # it under the terms of the GNU General Public License as published by | ||
12 | # the Free Software Foundation; either version 2, or (at your option) | ||
13 | # any later version. | ||
14 | |||
15 | # This program is distributed in the hope that it will be useful, | ||
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | # GNU General Public License for more details. | ||
19 | |||
20 | # You should have received a copy of the GNU General Public License | ||
21 | # along with this program; if not, write to the Free Software | ||
22 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | ||
23 | # 02111-1307, USA. | ||
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 | if test $# -eq 0; then | ||
31 | echo 1>&2 "Try \`$0 --help' for more information" | ||
32 | exit 1 | ||
33 | fi | ||
34 | |||
35 | run=: | ||
36 | |||
37 | # In the cases where this matters, `missing' is being run in the | ||
38 | # srcdir already. | ||
39 | if test -f configure.ac; then | ||
40 | configure_ac=configure.ac | ||
41 | else | ||
42 | configure_ac=configure.in | ||
43 | fi | ||
44 | |||
45 | msg="missing on your system" | ||
46 | |||
47 | case "$1" in | ||
48 | --run) | ||
49 | # Try to run requested program, and just exit if it succeeds. | ||
50 | run= | ||
51 | shift | ||
52 | "$@" && exit 0 | ||
53 | # Exit code 63 means version mismatch. This often happens | ||
54 | # when the user try to use an ancient version of a tool on | ||
55 | # a file that requires a minimum version. In this case we | ||
56 | # we should proceed has if the program had been absent, or | ||
57 | # if --run hadn't been passed. | ||
58 | if test $? = 63; then | ||
59 | run=: | ||
60 | msg="probably too old" | ||
61 | fi | ||
62 | ;; | ||
63 | esac | ||
64 | |||
65 | # If it does not exist, or fails to run (possibly an outdated version), | ||
66 | # try to emulate it. | ||
67 | case "$1" in | ||
68 | |||
69 | -h|--h|--he|--hel|--help) | ||
70 | echo "\ | ||
71 | $0 [OPTION]... PROGRAM [ARGUMENT]... | ||
72 | |||
73 | Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an | ||
74 | error status if there is no known handling for PROGRAM. | ||
75 | |||
76 | Options: | ||
77 | -h, --help display this help and exit | ||
78 | -v, --version output version information and exit | ||
79 | --run try to run the given command, and emulate it if it fails | ||
80 | |||
81 | Supported PROGRAM values: | ||
82 | aclocal touch file \`aclocal.m4' | ||
83 | autoconf touch file \`configure' | ||
84 | autoheader touch file \`config.h.in' | ||
85 | automake touch all \`Makefile.in' files | ||
86 | bison create \`y.tab.[ch]', if possible, from existing .[ch] | ||
87 | flex create \`lex.yy.c', if possible, from existing .c | ||
88 | help2man touch the output file | ||
89 | lex create \`lex.yy.c', if possible, from existing .c | ||
90 | makeinfo touch the output file | ||
91 | tar try tar, gnutar, gtar, then tar without non-portable flags | ||
92 | yacc create \`y.tab.[ch]', if possible, from existing .[ch] | ||
93 | |||
94 | Send bug reports to <bug-automake@gnu.org>." | ||
95 | ;; | ||
96 | |||
97 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) | ||
98 | echo "missing $scriptversion (GNU Automake)" | ||
99 | ;; | ||
100 | |||
101 | -*) | ||
102 | echo 1>&2 "$0: Unknown \`$1' option" | ||
103 | echo 1>&2 "Try \`$0 --help' for more information" | ||
104 | exit 1 | ||
105 | ;; | ||
106 | |||
107 | aclocal*) | ||
108 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
109 | # We have it, but it failed. | ||
110 | exit 1 | ||
111 | fi | ||
112 | |||
113 | echo 1>&2 "\ | ||
114 | WARNING: \`$1' is $msg. You should only need it if | ||
115 | you modified \`acinclude.m4' or \`${configure_ac}'. You might want | ||
116 | to install the \`Automake' and \`Perl' packages. Grab them from | ||
117 | any GNU archive site." | ||
118 | touch aclocal.m4 | ||
119 | ;; | ||
120 | |||
121 | autoconf) | ||
122 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
123 | # We have it, but it failed. | ||
124 | exit 1 | ||
125 | fi | ||
126 | |||
127 | echo 1>&2 "\ | ||
128 | WARNING: \`$1' is $msg. You should only need it if | ||
129 | you modified \`${configure_ac}'. You might want to install the | ||
130 | \`Autoconf' and \`GNU m4' packages. Grab them from any GNU | ||
131 | archive site." | ||
132 | touch configure | ||
133 | ;; | ||
134 | |||
135 | autoheader) | ||
136 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
137 | # We have it, but it failed. | ||
138 | exit 1 | ||
139 | fi | ||
140 | |||
141 | echo 1>&2 "\ | ||
142 | WARNING: \`$1' is $msg. You should only need it if | ||
143 | you modified \`acconfig.h' or \`${configure_ac}'. You might want | ||
144 | to install the \`Autoconf' and \`GNU m4' packages. Grab them | ||
145 | from any GNU archive site." | ||
146 | files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` | ||
147 | test -z "$files" && files="config.h" | ||
148 | touch_files= | ||
149 | for f in $files; do | ||
150 | case "$f" in | ||
151 | *:*) touch_files="$touch_files "`echo "$f" | | ||
152 | sed -e 's/^[^:]*://' -e 's/:.*//'`;; | ||
153 | *) touch_files="$touch_files $f.in";; | ||
154 | esac | ||
155 | done | ||
156 | touch $touch_files | ||
157 | ;; | ||
158 | |||
159 | automake*) | ||
160 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
161 | # We have it, but it failed. | ||
162 | exit 1 | ||
163 | fi | ||
164 | |||
165 | echo 1>&2 "\ | ||
166 | WARNING: \`$1' is $msg. You should only need it if | ||
167 | you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. | ||
168 | You might want to install the \`Automake' and \`Perl' packages. | ||
169 | Grab them from any GNU archive site." | ||
170 | find . -type f -name Makefile.am -print | | ||
171 | sed 's/\.am$/.in/' | | ||
172 | while read f; do touch "$f"; done | ||
173 | ;; | ||
174 | |||
175 | autom4te) | ||
176 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
177 | # We have it, but it failed. | ||
178 | exit 1 | ||
179 | fi | ||
180 | |||
181 | echo 1>&2 "\ | ||
182 | WARNING: \`$1' is needed, but is $msg. | ||
183 | You might have modified some files without having the | ||
184 | proper tools for further handling them. | ||
185 | You can get \`$1' as part of \`Autoconf' from any GNU | ||
186 | archive site." | ||
187 | |||
188 | file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` | ||
189 | test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` | ||
190 | if test -f "$file"; then | ||
191 | touch $file | ||
192 | else | ||
193 | test -z "$file" || exec >$file | ||
194 | echo "#! /bin/sh" | ||
195 | echo "# Created by GNU Automake missing as a replacement of" | ||
196 | echo "# $ $@" | ||
197 | echo "exit 0" | ||
198 | chmod +x $file | ||
199 | exit 1 | ||
200 | fi | ||
201 | ;; | ||
202 | |||
203 | bison|yacc) | ||
204 | echo 1>&2 "\ | ||
205 | WARNING: \`$1' $msg. You should only need it if | ||
206 | you modified a \`.y' file. You may need the \`Bison' package | ||
207 | in order for those modifications to take effect. You can get | ||
208 | \`Bison' from any GNU archive site." | ||
209 | rm -f y.tab.c y.tab.h | ||
210 | if [ $# -ne 1 ]; then | ||
211 | eval LASTARG="\${$#}" | ||
212 | case "$LASTARG" in | ||
213 | *.y) | ||
214 | SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` | ||
215 | if [ -f "$SRCFILE" ]; then | ||
216 | cp "$SRCFILE" y.tab.c | ||
217 | fi | ||
218 | SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` | ||
219 | if [ -f "$SRCFILE" ]; then | ||
220 | cp "$SRCFILE" y.tab.h | ||
221 | fi | ||
222 | ;; | ||
223 | esac | ||
224 | fi | ||
225 | if [ ! -f y.tab.h ]; then | ||
226 | echo >y.tab.h | ||
227 | fi | ||
228 | if [ ! -f y.tab.c ]; then | ||
229 | echo 'main() { return 0; }' >y.tab.c | ||
230 | fi | ||
231 | ;; | ||
232 | |||
233 | lex|flex) | ||
234 | echo 1>&2 "\ | ||
235 | WARNING: \`$1' is $msg. You should only need it if | ||
236 | you modified a \`.l' file. You may need the \`Flex' package | ||
237 | in order for those modifications to take effect. You can get | ||
238 | \`Flex' from any GNU archive site." | ||
239 | rm -f lex.yy.c | ||
240 | if [ $# -ne 1 ]; then | ||
241 | eval LASTARG="\${$#}" | ||
242 | case "$LASTARG" in | ||
243 | *.l) | ||
244 | SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` | ||
245 | if [ -f "$SRCFILE" ]; then | ||
246 | cp "$SRCFILE" lex.yy.c | ||
247 | fi | ||
248 | ;; | ||
249 | esac | ||
250 | fi | ||
251 | if [ ! -f lex.yy.c ]; then | ||
252 | echo 'main() { return 0; }' >lex.yy.c | ||
253 | fi | ||
254 | ;; | ||
255 | |||
256 | help2man) | ||
257 | if test -z "$run" && ($1 --version) > /dev/null 2>&1; then | ||
258 | # We have it, but it failed. | ||
259 | exit 1 | ||
260 | fi | ||
261 | |||
262 | echo 1>&2 "\ | ||
263 | WARNING: \`$1' is $msg. You should only need it if | ||
264 | you modified a dependency of a manual page. You may need the | ||
265 | \`Help2man' package in order for those modifications to take | ||
266 | effect. You can get \`Help2man' from any GNU archive site." | ||
267 | |||
268 | file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` | ||
269 | if test -z "$file"; then | ||
270 | file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` | ||
271 | fi | ||
272 | if [ -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 1 | ||
278 | fi | ||
279 | ;; | ||
280 | |||
281 | makeinfo) | ||
282 | if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then | ||
283 | # We have makeinfo, but it failed. | ||
284 | exit 1 | ||
285 | fi | ||
286 | |||
287 | echo 1>&2 "\ | ||
288 | WARNING: \`$1' is $msg. You should only need it if | ||
289 | you modified a \`.texi' or \`.texinfo' file, or any other file | ||
290 | indirectly affecting the aspect of the manual. The spurious | ||
291 | call might also be the consequence of using a buggy \`make' (AIX, | ||
292 | DU, IRIX). You might want to install the \`Texinfo' package or | ||
293 | the \`GNU make' package. Grab either from any GNU archive site." | ||
294 | file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` | ||
295 | if test -z "$file"; then | ||
296 | file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` | ||
297 | file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` | ||
298 | fi | ||
299 | touch $file | ||
300 | ;; | ||
301 | |||
302 | tar) | ||
303 | shift | ||
304 | if test -n "$run"; then | ||
305 | echo 1>&2 "ERROR: \`tar' requires --run" | ||
306 | exit 1 | ||
307 | fi | ||
308 | |||
309 | # We have already tried tar in the generic part. | ||
310 | # Look for gnutar/gtar before invocation to avoid ugly error | ||
311 | # messages. | ||
312 | if (gnutar --version > /dev/null 2>&1); then | ||
313 | gnutar "$@" && exit 0 | ||
314 | fi | ||
315 | if (gtar --version > /dev/null 2>&1); then | ||
316 | gtar "$@" && exit 0 | ||
317 | fi | ||
318 | firstarg="$1" | ||
319 | if shift; then | ||
320 | case "$firstarg" in | ||
321 | *o*) | ||
322 | firstarg=`echo "$firstarg" | sed s/o//` | ||
323 | tar "$firstarg" "$@" && exit 0 | ||
324 | ;; | ||
325 | esac | ||
326 | case "$firstarg" in | ||
327 | *h*) | ||
328 | firstarg=`echo "$firstarg" | sed s/h//` | ||
329 | tar "$firstarg" "$@" && exit 0 | ||
330 | ;; | ||
331 | esac | ||
332 | fi | ||
333 | |||
334 | echo 1>&2 "\ | ||
335 | WARNING: I can't seem to be able to run \`tar' with the given arguments. | ||
336 | You may want to install GNU tar or Free paxutils, or check the | ||
337 | command line arguments." | ||
338 | exit 1 | ||
339 | ;; | ||
340 | |||
341 | *) | ||
342 | echo 1>&2 "\ | ||
343 | WARNING: \`$1' is needed, and is $msg. | ||
344 | You might have modified some files without having the | ||
345 | proper tools for further handling them. Check the \`README' file, | ||
346 | it often tells you about the needed prerequisites for installing | ||
347 | this package. You may also peek at any GNU archive site, in case | ||
348 | some other package would contain this missing \`$1' program." | ||
349 | exit 1 | ||
350 | ;; | ||
351 | esac | ||
352 | |||
353 | exit 0 | ||
354 | |||
355 | # Local variables: | ||
356 | # eval: (add-hook 'write-file-hooks 'time-stamp) | ||
357 | # time-stamp-start: "scriptversion=" | ||
358 | # time-stamp-format: "%:y-%02m-%02d.%02H" | ||
359 | # time-stamp-end: "$" | ||
360 | # End: | ||
diff --git a/mkinstalldirs b/mkinstalldirs index 5d26a485..6fbe5e11 100644 --- a/mkinstalldirs +++ b/mkinstalldirs | |||
@@ -1,7 +1,7 @@ | |||
1 | #! /bin/sh | 1 | #! /bin/sh |
2 | # mkinstalldirs --- make directory hierarchy | 2 | # mkinstalldirs --- make directory hierarchy |
3 | 3 | ||
4 | scriptversion=2005-02-02.21 | 4 | scriptversion=2004-02-15.20 |
5 | 5 | ||
6 | # Original author: Noah Friedman <friedman@prep.ai.mit.edu> | 6 | # Original author: Noah Friedman <friedman@prep.ai.mit.edu> |
7 | # Created: 1993-05-16 | 7 | # Created: 1993-05-16 |
@@ -27,7 +27,7 @@ while test $# -gt 0 ; do | |||
27 | case $1 in | 27 | case $1 in |
28 | -h | --help | --h*) # -h for help | 28 | -h | --help | --h*) # -h for help |
29 | echo "$usage" | 29 | echo "$usage" |
30 | exit $? | 30 | exit 0 |
31 | ;; | 31 | ;; |
32 | -m) # -m PERM arg | 32 | -m) # -m PERM arg |
33 | shift | 33 | shift |
@@ -37,7 +37,7 @@ while test $# -gt 0 ; do | |||
37 | ;; | 37 | ;; |
38 | --version) | 38 | --version) |
39 | echo "$0 $scriptversion" | 39 | echo "$0 $scriptversion" |
40 | exit $? | 40 | exit 0 |
41 | ;; | 41 | ;; |
42 | --) # stop option processing | 42 | --) # stop option processing |
43 | shift | 43 | shift |
diff --git a/src/Makefile.am b/src/Makefile.am index 61acfa05..1043ff02 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -1,28 +1 @@ | |||
1 | INCLUDES = \ | SUBDIRS = include common core plugins | |
2 | -I$(top_srcdir)/intl \ | ||
3 | @GTK_CFLAGS@ \ | ||
4 | @GNUNETGTK_CFLAGS@ | ||
5 | |||
6 | bin_PROGRAMS = gnunet-gtk | ||
7 | |||
8 | gnunet_gtk_SOURCES = \ | ||
9 | about.c \ | ||
10 | daemon.c daemon.h \ | ||
11 | download.c download.h \ | ||
12 | fs.c fs.h \ | ||
13 | gettext.h \ | ||
14 | helper.c helper.h \ | ||
15 | main.c main.h \ | ||
16 | platform.h plibc.h \ | ||
17 | search.c search.h \ | ||
18 | upload.c upload.h | ||
19 | |||
20 | gnunet_gtk_LDADD = \ | ||
21 | @GTK_LIBS@ \ | ||
22 | @GNUNETGTK_LIBS@ \ | ||
23 | $(INTLLIBS) \ | ||
24 | -lgthread-2.0 \ | ||
25 | -lextractor | ||
26 | |||
27 | gnunet_gtk_LDFLAGS = \ | ||
28 | -export-dynamic | ||
diff --git a/src/common/Makefile.am b/src/common/Makefile.am new file mode 100644 index 00000000..683ff1de --- /dev/null +++ b/src/common/Makefile.am | |||
@@ -0,0 +1,22 @@ | |||
1 | INCLUDES = \ | ||
2 | -I$(top_srcdir)/intl -I$(top_srcdir)/src/includes \ | ||
3 | @GTK_CFLAGS@ \ | ||
4 | @GNUNETGTK_CFLAGS@ | ||
5 | |||
6 | lib_LTLIBRARIES = \ | ||
7 | libgnunetgtk_common.la | ||
8 | |||
9 | libgnunetgtk_common_la__SOURCES = \ | ||
10 | helper.c | ||
11 | |||
12 | libgnunetgtk_common_la_LDFLAGS = \ | ||
13 | -export-dynamic $(LIBLTDL) $(LIBGCRYPT_LIBS) $(SOLFLAGS) $(WINFLAGS) $(LIBS) \ | ||
14 | -version-info 0:0:0 | ||
15 | |||
16 | libgnunetgtk_common_la_LIBADD = \ | ||
17 | @GTK_LIBS@ \ | ||
18 | @GNUNETGTK_LIBS@ \ | ||
19 | $(INTLLIBS) \ | ||
20 | -lgthread-2.0 | ||
21 | |||
22 | |||
diff --git a/src/helper.c b/src/common/helper.c index 8fab5cb7..8fab5cb7 100644 --- a/src/helper.c +++ b/src/common/helper.c | |||
diff --git a/src/core/Makefile.am b/src/core/Makefile.am new file mode 100644 index 00000000..d3635d59 --- /dev/null +++ b/src/core/Makefile.am | |||
@@ -0,0 +1,20 @@ | |||
1 | INCLUDES = \ | ||
2 | -I$(top_srcdir)/intl \ | ||
3 | -I$(top_srcdir)/src/include \ | ||
4 | @GTK_CFLAGS@ \ | ||
5 | @GNUNETGTK_CFLAGS@ | ||
6 | |||
7 | bin_PROGRAMS = gnunet-gtk | ||
8 | |||
9 | gnunet_gtk_SOURCES = \ | ||
10 | main.c main.h | ||
11 | |||
12 | gnunet_gtk_LDADD = \ | ||
13 | @GTK_LIBS@ \ | ||
14 | @GNUNETGTK_LIBS@ \ | ||
15 | $(INTLLIBS) \ | ||
16 | -lgthread-2.0 \ | ||
17 | $(top_builddir)/src/common/libgnunetgtk_common.la | ||
18 | |||
19 | gnunet_gtk_LDFLAGS = \ | ||
20 | -export-dynamic | ||
diff --git a/src/main.c b/src/core/main.c index b2095a70..ecb04830 100644 --- a/src/main.c +++ b/src/core/main.c | |||
@@ -30,8 +30,6 @@ | |||
30 | #include <GNUnet/gnunet_util.h> | 30 | #include <GNUnet/gnunet_util.h> |
31 | 31 | ||
32 | #include "main.h" | 32 | #include "main.h" |
33 | #include "fs.h" | ||
34 | #include "daemon.h" | ||
35 | #include "helper.h" | 33 | #include "helper.h" |
36 | 34 | ||
37 | /** | 35 | /** |
@@ -110,12 +108,14 @@ int main(int argc, | |||
110 | return 0; | 108 | return 0; |
111 | startCron(); | 109 | startCron(); |
112 | gtkInitSaveCalls(); | 110 | gtkInitSaveCalls(); |
111 | /* load the plugins */ | ||
112 | |||
113 | /* load the interface */ | 113 | /* load the interface */ |
114 | #ifdef MINGW | 114 | #ifdef MINGW |
115 | gladeFile = MALLOC(_MAX_PATH + 1); | 115 | gladeFile = MALLOC(_MAX_PATH + 1); |
116 | plibc_conv_to_win_path(PACKAGE_DATA_DIR"/gnunet-gtk.glade", gladeFile); | 116 | plibc_conv_to_win_path(PACKAGE_DATA_DIR"/gnunet-gtk.glade", gladeFile); |
117 | #else | 117 | #else |
118 | gladeFile = STRDUP(PACKAGE_DATA_DIR"/gnunet-gtk.glade"); | 118 | gladeFile = STRDUP(PACKAGE_DATA_DIR"/gnunet-gtk.glade"); |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | mainXML = glade_xml_new(gladeFile, | 121 | mainXML = glade_xml_new(gladeFile, |
@@ -125,21 +125,16 @@ int main(int argc, | |||
125 | /* connect the signals in the interface */ | 125 | /* connect the signals in the interface */ |
126 | setCustomLogProc(&addLogEntry); | 126 | setCustomLogProc(&addLogEntry); |
127 | glade_xml_signal_autoconnect(mainXML); | 127 | glade_xml_signal_autoconnect(mainXML); |
128 | gtk_fs_init(); | 128 | |
129 | addCronJob(&cronCheckDaemon, | ||
130 | 0, | ||
131 | 15 * cronSECONDS, | ||
132 | NULL); | ||
133 | /* start the event loop */ | 129 | /* start the event loop */ |
134 | gdk_threads_enter(); | 130 | gdk_threads_enter(); |
135 | gtk_main(); | 131 | gtk_main(); |
136 | gdk_threads_leave(); | 132 | gdk_threads_leave(); |
137 | setCustomLogProc(NULL); | 133 | setCustomLogProc(NULL); |
138 | stopCron(); | 134 | stopCron(); |
139 | delCronJob(&cronCheckDaemon, | 135 | |
140 | 15 * cronSECONDS, | 136 | /* unload the plugins */ |
141 | NULL); | 137 | |
142 | gtk_fs_done(); | ||
143 | gtkDoneSaveCalls(); | 138 | gtkDoneSaveCalls(); |
144 | UNREF(mainXML); | 139 | UNREF(mainXML); |
145 | doneUtil(); | 140 | doneUtil(); |
diff --git a/src/main.h b/src/core/main.h index e2c0a286..e2c0a286 100644 --- a/src/main.h +++ b/src/core/main.h | |||
diff --git a/src/include/Makefile.am b/src/include/Makefile.am new file mode 100644 index 00000000..c407728b --- /dev/null +++ b/src/include/Makefile.am | |||
@@ -0,0 +1,4 @@ | |||
1 | EXTRA_DIST = \ | ||
2 | gettext.h \ | ||
3 | plibc.h \ | ||
4 | platform.h | ||
diff --git a/src/gettext.h b/src/include/gettext.h index 4b318c87..4b318c87 100644 --- a/src/gettext.h +++ b/src/include/gettext.h | |||
diff --git a/src/helper.h b/src/include/helper.h index 3bf65f11..3bf65f11 100644 --- a/src/helper.h +++ b/src/include/helper.h | |||
diff --git a/src/platform.h b/src/include/platform.h index b90c0939..b90c0939 100644 --- a/src/platform.h +++ b/src/include/platform.h | |||
diff --git a/src/plibc.h b/src/include/plibc.h index f06e5c6c..f06e5c6c 100644 --- a/src/plibc.h +++ b/src/include/plibc.h | |||
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am new file mode 100644 index 00000000..43fb1470 --- /dev/null +++ b/src/plugins/Makefile.am | |||
@@ -0,0 +1 @@ | |||
SUBDIRS = about daemon fs | |||
diff --git a/src/plugins/about/Makefile.am b/src/plugins/about/Makefile.am new file mode 100644 index 00000000..9bec2da5 --- /dev/null +++ b/src/plugins/about/Makefile.am | |||
@@ -0,0 +1,17 @@ | |||
1 | INCLUDES = \ | ||
2 | -I$(top_srcdir)/intl \ | ||
3 | -I$(top_srcdir)/src/include \ | ||
4 | @GTK_CFLAGS@ \ | ||
5 | @GNUNETGTK_CFLAGS@ | ||
6 | |||
7 | plugindir = $(libdir)/gnunet-gtk | ||
8 | |||
9 | plugin_LTLIBRARIES = \ | ||
10 | libgnunetgtkmodule_about.la | ||
11 | |||
12 | libgnunetgtkmodule_about_la_SOURCES = \ | ||
13 | about.c | ||
14 | libgnunetgtkmodule_about_la_LIBADD = \ | ||
15 | $(top_builddir)/src/common/libgnunetgtk_common.la | ||
16 | libgnunetgtkmodule_about_la_LDFLAGS = \ | ||
17 | -export-dynamic -avoid-version -module | ||
diff --git a/src/about.c b/src/plugins/about/about.c index 5cf780c4..5cf780c4 100644 --- a/src/about.c +++ b/src/plugins/about/about.c | |||
diff --git a/src/plugins/daemon/Makefile.am b/src/plugins/daemon/Makefile.am new file mode 100644 index 00000000..ca6cccf5 --- /dev/null +++ b/src/plugins/daemon/Makefile.am | |||
@@ -0,0 +1,17 @@ | |||
1 | INCLUDES = \ | ||
2 | -I$(top_srcdir)/intl \ | ||
3 | -I$(top_srcdir)/src/include \ | ||
4 | @GTK_CFLAGS@ \ | ||
5 | @GNUNETGTK_CFLAGS@ | ||
6 | |||
7 | plugindir = $(libdir)/gnunet-gtk | ||
8 | |||
9 | plugin_LTLIBRARIES = \ | ||
10 | libgnunetgtkmodule_daemon.la | ||
11 | |||
12 | libgnunetgtkmodule_daemon_la_SOURCES = \ | ||
13 | daemon.c | ||
14 | libgnunetgtkmodule_daemon_la_LIBADD = \ | ||
15 | $(top_builddir)/src/common/libgnunetgtk_common.la | ||
16 | libgnunetgtkmodule_daemon_la_LDFLAGS = \ | ||
17 | -export-dynamic -avoid-version -module | ||
diff --git a/src/daemon.c b/src/plugins/daemon/daemon.c index b294f313..01b82318 100644 --- a/src/daemon.c +++ b/src/plugins/daemon/daemon.c | |||
@@ -31,6 +31,17 @@ | |||
31 | #include "helper.h" | 31 | #include "helper.h" |
32 | #include <GNUnet/gnunet_util.h> | 32 | #include <GNUnet/gnunet_util.h> |
33 | 33 | ||
34 | addCronJob(&cronCheckDaemon, | ||
35 | 0, | ||
36 | 15 * cronSECONDS, | ||
37 | NULL); | ||
38 | |||
39 | delCronJob(&cronCheckDaemon, | ||
40 | 15 * cronSECONDS, | ||
41 | NULL); | ||
42 | |||
43 | |||
44 | |||
34 | /** | 45 | /** |
35 | * Launch gnunetd w/ checks | 46 | * Launch gnunetd w/ checks |
36 | */ | 47 | */ |
diff --git a/src/daemon.h b/src/plugins/daemon/daemon.h index 9ff68267..9ff68267 100644 --- a/src/daemon.h +++ b/src/plugins/daemon/daemon.h | |||
diff --git a/src/plugins/fs/Makefile.am b/src/plugins/fs/Makefile.am new file mode 100644 index 00000000..eede2761 --- /dev/null +++ b/src/plugins/fs/Makefile.am | |||
@@ -0,0 +1,27 @@ | |||
1 | INCLUDES = \ | ||
2 | -I$(top_srcdir)/intl \ | ||
3 | -I$(top_srcdir)/src/include \ | ||
4 | @GTK_CFLAGS@ \ | ||
5 | @GNUNETGTK_CFLAGS@ | ||
6 | |||
7 | plugindir = $(libdir)/gnunet-gtk | ||
8 | |||
9 | plugin_LTLIBRARIES = \ | ||
10 | libgnunetgtkmodule_fs.la | ||
11 | |||
12 | libgnunetgtkmodule_fs_la_SOURCES = \ | ||
13 | download.c download.h \ | ||
14 | fs.c fs.h \ | ||
15 | search.c search.h \ | ||
16 | upload.c upload.h | ||
17 | libgnunetgtkmodule_fs_la_LIBADD = \ | ||
18 | $(top_builddir)/src/common/libgnunetgtk_common.la \ | ||
19 | @GTK_LIBS@ \ | ||
20 | @GNUNETGTK_LIBS@ \ | ||
21 | $(INTLLIBS) \ | ||
22 | -lgthread-2.0 \ | ||
23 | -lextractor | ||
24 | libgnunetgtkmodule_fs_la_LDFLAGS = \ | ||
25 | -export-dynamic -avoid-version -module | ||
26 | |||
27 | |||
diff --git a/src/download.c b/src/plugins/fs/download.c index 3dd68460..3dd68460 100644 --- a/src/download.c +++ b/src/plugins/fs/download.c | |||
diff --git a/src/download.h b/src/plugins/fs/download.h index b78e4b59..b78e4b59 100644 --- a/src/download.h +++ b/src/plugins/fs/download.h | |||
diff --git a/src/fs/extensions/musicinsert.c b/src/plugins/fs/extensions/musicinsert.c index 002bf8e9..002bf8e9 100644 --- a/src/fs/extensions/musicinsert.c +++ b/src/plugins/fs/extensions/musicinsert.c | |||
diff --git a/src/fs/extensions/musicinsert.glade b/src/plugins/fs/extensions/musicinsert.glade index c7bb64b9..c7bb64b9 100644 --- a/src/fs/extensions/musicinsert.glade +++ b/src/plugins/fs/extensions/musicinsert.glade | |||
diff --git a/src/fs/extensions/musicinsert.h b/src/plugins/fs/extensions/musicinsert.h index 2f8a346b..2f8a346b 100644 --- a/src/fs/extensions/musicinsert.h +++ b/src/plugins/fs/extensions/musicinsert.h | |||
diff --git a/src/fs.c b/src/plugins/fs/fs.c index 114efe0f..114efe0f 100644 --- a/src/fs.c +++ b/src/plugins/fs/fs.c | |||
diff --git a/src/fs.h b/src/plugins/fs/fs.h index f08904fc..f08904fc 100644 --- a/src/fs.h +++ b/src/plugins/fs/fs.h | |||
diff --git a/src/search.c b/src/plugins/fs/search.c index 14bfac51..14bfac51 100644 --- a/src/search.c +++ b/src/plugins/fs/search.c | |||
diff --git a/src/search.h b/src/plugins/fs/search.h index f027a46b..f027a46b 100644 --- a/src/search.h +++ b/src/plugins/fs/search.h | |||
diff --git a/src/upload.c b/src/plugins/fs/upload.c index 3a15b1aa..3a15b1aa 100644 --- a/src/upload.c +++ b/src/plugins/fs/upload.c | |||
diff --git a/src/upload.h b/src/plugins/fs/upload.h index 64f11d75..64f11d75 100644 --- a/src/upload.h +++ b/src/plugins/fs/upload.h | |||