Merge lp:~indicator-applet-developers/indicator-datetime/ubuntu into lp:~ubuntu-desktop/indicator-datetime/ubuntu
- ubuntu
- Merge into ubuntu
Proposed by
Ted Gould
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ken VanDine | Pending | ||
Review via email: mp+52135@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'AUTHORS' |
2 | --- AUTHORS 2011-02-17 19:08:06 +0000 |
3 | +++ AUTHORS 2011-03-03 21:07:52 +0000 |
4 | @@ -2,6 +2,7 @@ |
5 | |
6 | David Barth |
7 | karl-qdh |
8 | + Ken VanDine |
9 | Kyle Nitzsche |
10 | Luke Yelavich |
11 | Marco Trevisan (Treviño) |
12 | |
13 | === modified file 'ChangeLog' |
14 | --- ChangeLog 2011-02-28 13:28:17 +0000 |
15 | +++ ChangeLog 2011-03-03 21:07:52 +0000 |
16 | @@ -1,5 +1,114 @@ |
17 | # Generated by Makefile. Do not edit. |
18 | |
19 | +2011-03-03 Ted Gould <ted@gould.cx> |
20 | + |
21 | + 0.1.96 |
22 | + |
23 | +2011-03-03 Ted Gould <ted@gould.cx> |
24 | + |
25 | + White space and include fixes |
26 | + |
27 | +2011-02-25 karl-qdh <karl@qdh.org.uk> |
28 | + |
29 | + Updated to newest trunk needs more merging |
30 | + |
31 | +2011-03-03 Ted Gould <ted@gould.cx> |
32 | + |
33 | + Close window on close button press |
34 | + |
35 | +2011-03-03 Ken VanDine <ken.vandine@canonical.com> |
36 | + |
37 | + quit when the close putton is clicked |
38 | + |
39 | +2011-03-03 Ted Gould <ted@gould.cx> |
40 | + |
41 | + Colored icons make me smile |
42 | + |
43 | +2011-03-03 karl-qdh <karl@qdh.org.uk> |
44 | + |
45 | + Width appears to be repeatedly overwritten with zero |
46 | + |
47 | +2011-03-03 karl-qdh <karl@qdh.org.uk> |
48 | + |
49 | + Added some small fixes to make sure the pixbuf redraws everytime. There may be some memory leaks corrupting data somewhere. |
50 | + |
51 | +2011-03-03 karl-qdh <karl@qdh.org.uk> |
52 | + |
53 | + Added decent conversion from cairo context to pixbuf and updated the colour code so it works. |
54 | + Currently we show a rectangle, but we could equally use a mask. |
55 | + |
56 | +2011-03-03 karl-qdh <karl@qdh.org.uk> |
57 | + |
58 | + This actually gets the current recurrance times etc... properly - we're close to getting colours too ;) |
59 | + |
60 | +2011-03-02 karl-qdh <karl@qdh.org.uk> |
61 | + |
62 | + Remove items from menu when the show events key changes |
63 | + |
64 | +2011-03-02 karl-qdh <karl@qdh.org.uk> |
65 | + |
66 | + * Fixed adding/removing locations not triggering update |
67 | + * Improved update appointment menu items code |
68 | + * Improved populate_appointment_instances |
69 | + * Opened up objects generation to include marking days |
70 | + |
71 | +2011-03-02 karl-qdh <karl@qdh.org.uk> |
72 | + |
73 | + Better handling of recurring items get_dtstart returns the same date for all items unfortunately |
74 | + |
75 | +2011-03-01 karl-qdh <karl@qdh.org.uk> |
76 | + |
77 | + Fixes for the recurring tasks and events settings change, the pointers are currently a bit chewed up |
78 | + as I try to figure out the right way round to get this. |
79 | + |
80 | +2011-03-01 karl-qdh <karl@qdh.org.uk> |
81 | + |
82 | + These changes should fix the problems with the recurring appointments and dconf changes for show/hide events |
83 | + |
84 | +2011-02-28 karl-qdh <karl@qdh.org.uk> |
85 | + |
86 | + Minor change for kenvandine to test sorting |
87 | + |
88 | +2011-03-03 Ted Gould <ted@gould.cx> |
89 | + |
90 | + UI Fixes |
91 | + |
92 | +2011-03-03 Michael Terry <mike@mterry.name> |
93 | + |
94 | + merge from trunk; fix utc time always being displayed in manual time spin button |
95 | + |
96 | +2011-03-03 Michael Terry <mike@mterry.name> |
97 | + |
98 | + fix some visual issues mpt found; drop libmap/Makefile.in from bzr |
99 | + |
100 | +2011-03-03 Ted Gould <ted@gould.cx> |
101 | + |
102 | + Improve spin button behavior |
103 | + |
104 | +2011-03-03 Michael Terry <mike@mterry.name> |
105 | + |
106 | + add back missing unref |
107 | + |
108 | +2011-03-01 Michael Terry <mike@mterry.name> |
109 | + |
110 | + let date spin buttons work |
111 | + |
112 | +2011-03-01 Michael Terry <mike@mterry.name> |
113 | + |
114 | + merge from trunk |
115 | + |
116 | +2011-02-24 Michael Terry <mike@mterry.name> |
117 | + |
118 | + have spinners work in unison -- only save when neither is focused |
119 | + |
120 | +2011-03-02 Ted Gould <ted@gould.cx> |
121 | + |
122 | + Use the query language to specify the dates instead of building them ourselves |
123 | + |
124 | +2011-02-28 Ken VanDine <ken.vandine@canonical.com> |
125 | + |
126 | + Simplify calendar query, we don't need to compute times for the range. The query system has a built in way to specify a relative range. |
127 | + |
128 | 2011-02-28 David Barth <david.barth@canonical.com> |
129 | |
130 | bumping release number |
131 | |
132 | === modified file 'Makefile.in' |
133 | --- Makefile.in 2011-02-28 13:28:17 +0000 |
134 | +++ Makefile.in 2011-03-03 21:07:52 +0000 |
135 | @@ -40,10 +40,7 @@ |
136 | compile config.guess config.sub depcomp install-sh ltmain.sh \ |
137 | missing mkinstalldirs |
138 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
139 | -am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \ |
140 | - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ |
141 | - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ |
142 | - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac |
143 | +am__aclocal_m4_deps = $(top_srcdir)/configure.ac |
144 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
145 | $(ACLOCAL_M4) |
146 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ |
147 | |
148 | === modified file 'aclocal.m4' |
149 | --- aclocal.m4 2011-02-28 13:28:17 +0000 |
150 | +++ aclocal.m4 2011-03-03 21:07:52 +0000 |
151 | @@ -536,6 +536,8166 @@ |
152 | ] |
153 | ) |
154 | |
155 | + |
156 | +dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) |
157 | +# serial 40 IT_PROG_INTLTOOL |
158 | +AC_DEFUN([IT_PROG_INTLTOOL], [ |
159 | +AC_PREREQ([2.50])dnl |
160 | +AC_REQUIRE([AM_NLS])dnl |
161 | + |
162 | +case "$am__api_version" in |
163 | + 1.[01234]) |
164 | + AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) |
165 | + ;; |
166 | + *) |
167 | + ;; |
168 | +esac |
169 | + |
170 | +if test -n "$1"; then |
171 | + AC_MSG_CHECKING([for intltool >= $1]) |
172 | + |
173 | + INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` |
174 | + INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` |
175 | + [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` |
176 | + ] |
177 | + AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) |
178 | + test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || |
179 | + AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) |
180 | +fi |
181 | + |
182 | +AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) |
183 | +AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) |
184 | +AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) |
185 | +if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then |
186 | + AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) |
187 | +fi |
188 | + |
189 | + INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
190 | +INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
191 | + INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
192 | + INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
193 | + INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' |
194 | + INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
195 | + INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
196 | + INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
197 | +INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
198 | + INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
199 | + INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
200 | + INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' |
201 | + INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
202 | + INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
203 | + INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
204 | + INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
205 | + INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
206 | + INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
207 | + INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
208 | + |
209 | +_IT_SUBST(INTLTOOL_DESKTOP_RULE) |
210 | +_IT_SUBST(INTLTOOL_DIRECTORY_RULE) |
211 | +_IT_SUBST(INTLTOOL_KEYS_RULE) |
212 | +_IT_SUBST(INTLTOOL_PROP_RULE) |
213 | +_IT_SUBST(INTLTOOL_OAF_RULE) |
214 | +_IT_SUBST(INTLTOOL_PONG_RULE) |
215 | +_IT_SUBST(INTLTOOL_SERVER_RULE) |
216 | +_IT_SUBST(INTLTOOL_SHEET_RULE) |
217 | +_IT_SUBST(INTLTOOL_SOUNDLIST_RULE) |
218 | +_IT_SUBST(INTLTOOL_UI_RULE) |
219 | +_IT_SUBST(INTLTOOL_XAM_RULE) |
220 | +_IT_SUBST(INTLTOOL_KBD_RULE) |
221 | +_IT_SUBST(INTLTOOL_XML_RULE) |
222 | +_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) |
223 | +_IT_SUBST(INTLTOOL_CAVES_RULE) |
224 | +_IT_SUBST(INTLTOOL_SCHEMAS_RULE) |
225 | +_IT_SUBST(INTLTOOL_THEME_RULE) |
226 | +_IT_SUBST(INTLTOOL_SERVICE_RULE) |
227 | +_IT_SUBST(INTLTOOL_POLICY_RULE) |
228 | + |
229 | +# Check the gettext tools to make sure they are GNU |
230 | +AC_PATH_PROG(XGETTEXT, xgettext) |
231 | +AC_PATH_PROG(MSGMERGE, msgmerge) |
232 | +AC_PATH_PROG(MSGFMT, msgfmt) |
233 | +AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) |
234 | +if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then |
235 | + AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) |
236 | +fi |
237 | +xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" |
238 | +mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" |
239 | +mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" |
240 | +if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then |
241 | + AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) |
242 | +fi |
243 | + |
244 | +AC_PATH_PROG(INTLTOOL_PERL, perl) |
245 | +if test -z "$INTLTOOL_PERL"; then |
246 | + AC_MSG_ERROR([perl not found]) |
247 | +fi |
248 | +AC_MSG_CHECKING([for perl >= 5.8.1]) |
249 | +$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 |
250 | +if test $? -ne 0; then |
251 | + AC_MSG_ERROR([perl 5.8.1 is required for intltool]) |
252 | +else |
253 | + IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`" |
254 | + AC_MSG_RESULT([$IT_PERL_VERSION]) |
255 | +fi |
256 | +if test "x$2" != "xno-xml"; then |
257 | + AC_MSG_CHECKING([for XML::Parser]) |
258 | + if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then |
259 | + AC_MSG_RESULT([ok]) |
260 | + else |
261 | + AC_MSG_ERROR([XML::Parser perl module is required for intltool]) |
262 | + fi |
263 | +fi |
264 | + |
265 | +# Substitute ALL_LINGUAS so we can use it in po/Makefile |
266 | +AC_SUBST(ALL_LINGUAS) |
267 | + |
268 | +# Set DATADIRNAME correctly if it is not set yet |
269 | +# (copied from glib-gettext.m4) |
270 | +if test -z "$DATADIRNAME"; then |
271 | + AC_LINK_IFELSE( |
272 | + [AC_LANG_PROGRAM([[]], |
273 | + [[extern int _nl_msg_cat_cntr; |
274 | + return _nl_msg_cat_cntr]])], |
275 | + [DATADIRNAME=share], |
276 | + [case $host in |
277 | + *-*-solaris*) |
278 | + dnl On Solaris, if bind_textdomain_codeset is in libc, |
279 | + dnl GNU format message catalog is always supported, |
280 | + dnl since both are added to the libc all together. |
281 | + dnl Hence, we'd like to go with DATADIRNAME=share |
282 | + dnl in this case. |
283 | + AC_CHECK_FUNC(bind_textdomain_codeset, |
284 | + [DATADIRNAME=share], [DATADIRNAME=lib]) |
285 | + ;; |
286 | + *) |
287 | + [DATADIRNAME=lib] |
288 | + ;; |
289 | + esac]) |
290 | +fi |
291 | +AC_SUBST(DATADIRNAME) |
292 | + |
293 | +IT_PO_SUBDIR([po]) |
294 | + |
295 | +]) |
296 | + |
297 | + |
298 | +# IT_PO_SUBDIR(DIRNAME) |
299 | +# --------------------- |
300 | +# All po subdirs have to be declared with this macro; the subdir "po" is |
301 | +# declared by IT_PROG_INTLTOOL. |
302 | +# |
303 | +AC_DEFUN([IT_PO_SUBDIR], |
304 | +[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. |
305 | +dnl |
306 | +dnl The following CONFIG_COMMANDS should be executed at the very end |
307 | +dnl of config.status. |
308 | +AC_CONFIG_COMMANDS_PRE([ |
309 | + AC_CONFIG_COMMANDS([$1/stamp-it], [ |
310 | + if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then |
311 | + AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) |
312 | + fi |
313 | + rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" |
314 | + >"$1/stamp-it.tmp" |
315 | + [sed '/^#/d |
316 | + s/^[[].*] *// |
317 | + /^[ ]*$/d |
318 | + '"s|^| $ac_top_srcdir/|" \ |
319 | + "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" |
320 | + ] |
321 | + [sed '/^POTFILES =/,/[^\\]$/ { |
322 | + /^POTFILES =/!d |
323 | + r $1/POTFILES |
324 | + } |
325 | + ' "$1/Makefile.in" >"$1/Makefile"] |
326 | + rm -f "$1/Makefile.tmp" |
327 | + mv "$1/stamp-it.tmp" "$1/stamp-it" |
328 | + ]) |
329 | +])dnl |
330 | +]) |
331 | + |
332 | +# _IT_SUBST(VARIABLE) |
333 | +# ------------------- |
334 | +# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST |
335 | +# |
336 | +AC_DEFUN([_IT_SUBST], |
337 | +[ |
338 | +AC_SUBST([$1]) |
339 | +m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) |
340 | +] |
341 | +) |
342 | + |
343 | +# deprecated macros |
344 | +AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) |
345 | +# A hint is needed for aclocal from Automake <= 1.9.4: |
346 | +# AC_DEFUN([AC_PROG_INTLTOOL], ...) |
347 | + |
348 | + |
349 | +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
350 | +# |
351 | +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, |
352 | +# 2006, 2007, 2008 Free Software Foundation, Inc. |
353 | +# Written by Gordon Matzigkeit, 1996 |
354 | +# |
355 | +# This file is free software; the Free Software Foundation gives |
356 | +# unlimited permission to copy and/or distribute it, with or without |
357 | +# modifications, as long as this notice is preserved. |
358 | + |
359 | +m4_define([_LT_COPYING], [dnl |
360 | +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, |
361 | +# 2006, 2007, 2008 Free Software Foundation, Inc. |
362 | +# Written by Gordon Matzigkeit, 1996 |
363 | +# |
364 | +# This file is part of GNU Libtool. |
365 | +# |
366 | +# GNU Libtool is free software; you can redistribute it and/or |
367 | +# modify it under the terms of the GNU General Public License as |
368 | +# published by the Free Software Foundation; either version 2 of |
369 | +# the License, or (at your option) any later version. |
370 | +# |
371 | +# As a special exception to the GNU General Public License, |
372 | +# if you distribute this file as part of a program or library that |
373 | +# is built using GNU Libtool, you may include this file under the |
374 | +# same distribution terms that you use for the rest of that program. |
375 | +# |
376 | +# GNU Libtool is distributed in the hope that it will be useful, |
377 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
378 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
379 | +# GNU General Public License for more details. |
380 | +# |
381 | +# You should have received a copy of the GNU General Public License |
382 | +# along with GNU Libtool; see the file COPYING. If not, a copy |
383 | +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or |
384 | +# obtained by writing to the Free Software Foundation, Inc., |
385 | +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
386 | +]) |
387 | + |
388 | +# serial 56 LT_INIT |
389 | + |
390 | + |
391 | +# LT_PREREQ(VERSION) |
392 | +# ------------------ |
393 | +# Complain and exit if this libtool version is less that VERSION. |
394 | +m4_defun([LT_PREREQ], |
395 | +[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, |
396 | + [m4_default([$3], |
397 | + [m4_fatal([Libtool version $1 or higher is required], |
398 | + 63)])], |
399 | + [$2])]) |
400 | + |
401 | + |
402 | +# _LT_CHECK_BUILDDIR |
403 | +# ------------------ |
404 | +# Complain if the absolute build directory name contains unusual characters |
405 | +m4_defun([_LT_CHECK_BUILDDIR], |
406 | +[case `pwd` in |
407 | + *\ * | *\ *) |
408 | + AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; |
409 | +esac |
410 | +]) |
411 | + |
412 | + |
413 | +# LT_INIT([OPTIONS]) |
414 | +# ------------------ |
415 | +AC_DEFUN([LT_INIT], |
416 | +[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT |
417 | +AC_BEFORE([$0], [LT_LANG])dnl |
418 | +AC_BEFORE([$0], [LT_OUTPUT])dnl |
419 | +AC_BEFORE([$0], [LTDL_INIT])dnl |
420 | +m4_require([_LT_CHECK_BUILDDIR])dnl |
421 | + |
422 | +dnl Autoconf doesn't catch unexpanded LT_ macros by default: |
423 | +m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl |
424 | +m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl |
425 | +dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 |
426 | +dnl unless we require an AC_DEFUNed macro: |
427 | +AC_REQUIRE([LTOPTIONS_VERSION])dnl |
428 | +AC_REQUIRE([LTSUGAR_VERSION])dnl |
429 | +AC_REQUIRE([LTVERSION_VERSION])dnl |
430 | +AC_REQUIRE([LTOBSOLETE_VERSION])dnl |
431 | +m4_require([_LT_PROG_LTMAIN])dnl |
432 | + |
433 | +dnl Parse OPTIONS |
434 | +_LT_SET_OPTIONS([$0], [$1]) |
435 | + |
436 | +# This can be used to rebuild libtool when needed |
437 | +LIBTOOL_DEPS="$ltmain" |
438 | + |
439 | +# Always use our own libtool. |
440 | +LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
441 | +AC_SUBST(LIBTOOL)dnl |
442 | + |
443 | +_LT_SETUP |
444 | + |
445 | +# Only expand once: |
446 | +m4_define([LT_INIT]) |
447 | +])# LT_INIT |
448 | + |
449 | +# Old names: |
450 | +AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) |
451 | +AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) |
452 | +dnl aclocal-1.4 backwards compatibility: |
453 | +dnl AC_DEFUN([AC_PROG_LIBTOOL], []) |
454 | +dnl AC_DEFUN([AM_PROG_LIBTOOL], []) |
455 | + |
456 | + |
457 | +# _LT_CC_BASENAME(CC) |
458 | +# ------------------- |
459 | +# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. |
460 | +m4_defun([_LT_CC_BASENAME], |
461 | +[for cc_temp in $1""; do |
462 | + case $cc_temp in |
463 | + compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; |
464 | + distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; |
465 | + \-*) ;; |
466 | + *) break;; |
467 | + esac |
468 | +done |
469 | +cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` |
470 | +]) |
471 | + |
472 | + |
473 | +# _LT_FILEUTILS_DEFAULTS |
474 | +# ---------------------- |
475 | +# It is okay to use these file commands and assume they have been set |
476 | +# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. |
477 | +m4_defun([_LT_FILEUTILS_DEFAULTS], |
478 | +[: ${CP="cp -f"} |
479 | +: ${MV="mv -f"} |
480 | +: ${RM="rm -f"} |
481 | +])# _LT_FILEUTILS_DEFAULTS |
482 | + |
483 | + |
484 | +# _LT_SETUP |
485 | +# --------- |
486 | +m4_defun([_LT_SETUP], |
487 | +[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
488 | +AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
489 | +_LT_DECL([], [host_alias], [0], [The host system])dnl |
490 | +_LT_DECL([], [host], [0])dnl |
491 | +_LT_DECL([], [host_os], [0])dnl |
492 | +dnl |
493 | +_LT_DECL([], [build_alias], [0], [The build system])dnl |
494 | +_LT_DECL([], [build], [0])dnl |
495 | +_LT_DECL([], [build_os], [0])dnl |
496 | +dnl |
497 | +AC_REQUIRE([AC_PROG_CC])dnl |
498 | +AC_REQUIRE([LT_PATH_LD])dnl |
499 | +AC_REQUIRE([LT_PATH_NM])dnl |
500 | +dnl |
501 | +AC_REQUIRE([AC_PROG_LN_S])dnl |
502 | +test -z "$LN_S" && LN_S="ln -s" |
503 | +_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl |
504 | +dnl |
505 | +AC_REQUIRE([LT_CMD_MAX_LEN])dnl |
506 | +_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl |
507 | +_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl |
508 | +dnl |
509 | +m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
510 | +m4_require([_LT_CHECK_SHELL_FEATURES])dnl |
511 | +m4_require([_LT_CMD_RELOAD])dnl |
512 | +m4_require([_LT_CHECK_MAGIC_METHOD])dnl |
513 | +m4_require([_LT_CMD_OLD_ARCHIVE])dnl |
514 | +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl |
515 | + |
516 | +_LT_CONFIG_LIBTOOL_INIT([ |
517 | +# See if we are running on zsh, and set the options which allow our |
518 | +# commands through without removal of \ escapes INIT. |
519 | +if test -n "\${ZSH_VERSION+set}" ; then |
520 | + setopt NO_GLOB_SUBST |
521 | +fi |
522 | +]) |
523 | +if test -n "${ZSH_VERSION+set}" ; then |
524 | + setopt NO_GLOB_SUBST |
525 | +fi |
526 | + |
527 | +_LT_CHECK_OBJDIR |
528 | + |
529 | +m4_require([_LT_TAG_COMPILER])dnl |
530 | +_LT_PROG_ECHO_BACKSLASH |
531 | + |
532 | +case $host_os in |
533 | +aix3*) |
534 | + # AIX sometimes has problems with the GCC collect2 program. For some |
535 | + # reason, if we set the COLLECT_NAMES environment variable, the problems |
536 | + # vanish in a puff of smoke. |
537 | + if test "X${COLLECT_NAMES+set}" != Xset; then |
538 | + COLLECT_NAMES= |
539 | + export COLLECT_NAMES |
540 | + fi |
541 | + ;; |
542 | +esac |
543 | + |
544 | +# Sed substitution that helps us do robust quoting. It backslashifies |
545 | +# metacharacters that are still active within double-quoted strings. |
546 | +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' |
547 | + |
548 | +# Same as above, but do not quote variable references. |
549 | +double_quote_subst='s/\([["`\\]]\)/\\\1/g' |
550 | + |
551 | +# Sed substitution to delay expansion of an escaped shell variable in a |
552 | +# double_quote_subst'ed string. |
553 | +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
554 | + |
555 | +# Sed substitution to delay expansion of an escaped single quote. |
556 | +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' |
557 | + |
558 | +# Sed substitution to avoid accidental globbing in evaled expressions |
559 | +no_glob_subst='s/\*/\\\*/g' |
560 | + |
561 | +# Global variables: |
562 | +ofile=libtool |
563 | +can_build_shared=yes |
564 | + |
565 | +# All known linkers require a `.a' archive for static linking (except MSVC, |
566 | +# which needs '.lib'). |
567 | +libext=a |
568 | + |
569 | +with_gnu_ld="$lt_cv_prog_gnu_ld" |
570 | + |
571 | +old_CC="$CC" |
572 | +old_CFLAGS="$CFLAGS" |
573 | + |
574 | +# Set sane defaults for various variables |
575 | +test -z "$CC" && CC=cc |
576 | +test -z "$LTCC" && LTCC=$CC |
577 | +test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS |
578 | +test -z "$LD" && LD=ld |
579 | +test -z "$ac_objext" && ac_objext=o |
580 | + |
581 | +_LT_CC_BASENAME([$compiler]) |
582 | + |
583 | +# Only perform the check for file, if the check method requires it |
584 | +test -z "$MAGIC_CMD" && MAGIC_CMD=file |
585 | +case $deplibs_check_method in |
586 | +file_magic*) |
587 | + if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
588 | + _LT_PATH_MAGIC |
589 | + fi |
590 | + ;; |
591 | +esac |
592 | + |
593 | +# Use C for the default configuration in the libtool script |
594 | +LT_SUPPORTED_TAG([CC]) |
595 | +_LT_LANG_C_CONFIG |
596 | +_LT_LANG_DEFAULT_CONFIG |
597 | +_LT_CONFIG_COMMANDS |
598 | +])# _LT_SETUP |
599 | + |
600 | + |
601 | +# _LT_PROG_LTMAIN |
602 | +# --------------- |
603 | +# Note that this code is called both from `configure', and `config.status' |
604 | +# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, |
605 | +# `config.status' has no value for ac_aux_dir unless we are using Automake, |
606 | +# so we pass a copy along to make sure it has a sensible value anyway. |
607 | +m4_defun([_LT_PROG_LTMAIN], |
608 | +[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl |
609 | +_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) |
610 | +ltmain="$ac_aux_dir/ltmain.sh" |
611 | +])# _LT_PROG_LTMAIN |
612 | + |
613 | + |
614 | + |
615 | +# So that we can recreate a full libtool script including additional |
616 | +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS |
617 | +# in macros and then make a single call at the end using the `libtool' |
618 | +# label. |
619 | + |
620 | + |
621 | +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) |
622 | +# ---------------------------------------- |
623 | +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. |
624 | +m4_define([_LT_CONFIG_LIBTOOL_INIT], |
625 | +[m4_ifval([$1], |
626 | + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], |
627 | + [$1 |
628 | +])])]) |
629 | + |
630 | +# Initialize. |
631 | +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) |
632 | + |
633 | + |
634 | +# _LT_CONFIG_LIBTOOL([COMMANDS]) |
635 | +# ------------------------------ |
636 | +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. |
637 | +m4_define([_LT_CONFIG_LIBTOOL], |
638 | +[m4_ifval([$1], |
639 | + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], |
640 | + [$1 |
641 | +])])]) |
642 | + |
643 | +# Initialize. |
644 | +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) |
645 | + |
646 | + |
647 | +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) |
648 | +# ----------------------------------------------------- |
649 | +m4_defun([_LT_CONFIG_SAVE_COMMANDS], |
650 | +[_LT_CONFIG_LIBTOOL([$1]) |
651 | +_LT_CONFIG_LIBTOOL_INIT([$2]) |
652 | +]) |
653 | + |
654 | + |
655 | +# _LT_FORMAT_COMMENT([COMMENT]) |
656 | +# ----------------------------- |
657 | +# Add leading comment marks to the start of each line, and a trailing |
658 | +# full-stop to the whole comment if one is not present already. |
659 | +m4_define([_LT_FORMAT_COMMENT], |
660 | +[m4_ifval([$1], [ |
661 | +m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], |
662 | + [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) |
663 | +)]) |
664 | + |
665 | + |
666 | + |
667 | + |
668 | + |
669 | +# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) |
670 | +# ------------------------------------------------------------------- |
671 | +# CONFIGNAME is the name given to the value in the libtool script. |
672 | +# VARNAME is the (base) name used in the configure script. |
673 | +# VALUE may be 0, 1 or 2 for a computed quote escaped value based on |
674 | +# VARNAME. Any other value will be used directly. |
675 | +m4_define([_LT_DECL], |
676 | +[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], |
677 | + [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], |
678 | + [m4_ifval([$1], [$1], [$2])]) |
679 | + lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) |
680 | + m4_ifval([$4], |
681 | + [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) |
682 | + lt_dict_add_subkey([lt_decl_dict], [$2], |
683 | + [tagged?], [m4_ifval([$5], [yes], [no])])]) |
684 | +]) |
685 | + |
686 | + |
687 | +# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) |
688 | +# -------------------------------------------------------- |
689 | +m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) |
690 | + |
691 | + |
692 | +# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) |
693 | +# ------------------------------------------------ |
694 | +m4_define([lt_decl_tag_varnames], |
695 | +[_lt_decl_filter([tagged?], [yes], $@)]) |
696 | + |
697 | + |
698 | +# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) |
699 | +# --------------------------------------------------------- |
700 | +m4_define([_lt_decl_filter], |
701 | +[m4_case([$#], |
702 | + [0], [m4_fatal([$0: too few arguments: $#])], |
703 | + [1], [m4_fatal([$0: too few arguments: $#: $1])], |
704 | + [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], |
705 | + [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], |
706 | + [lt_dict_filter([lt_decl_dict], $@)])[]dnl |
707 | +]) |
708 | + |
709 | + |
710 | +# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) |
711 | +# -------------------------------------------------- |
712 | +m4_define([lt_decl_quote_varnames], |
713 | +[_lt_decl_filter([value], [1], $@)]) |
714 | + |
715 | + |
716 | +# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) |
717 | +# --------------------------------------------------- |
718 | +m4_define([lt_decl_dquote_varnames], |
719 | +[_lt_decl_filter([value], [2], $@)]) |
720 | + |
721 | + |
722 | +# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) |
723 | +# --------------------------------------------------- |
724 | +m4_define([lt_decl_varnames_tagged], |
725 | +[m4_assert([$# <= 2])dnl |
726 | +_$0(m4_quote(m4_default([$1], [[, ]])), |
727 | + m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), |
728 | + m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) |
729 | +m4_define([_lt_decl_varnames_tagged], |
730 | +[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) |
731 | + |
732 | + |
733 | +# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) |
734 | +# ------------------------------------------------ |
735 | +m4_define([lt_decl_all_varnames], |
736 | +[_$0(m4_quote(m4_default([$1], [[, ]])), |
737 | + m4_if([$2], [], |
738 | + m4_quote(lt_decl_varnames), |
739 | + m4_quote(m4_shift($@))))[]dnl |
740 | +]) |
741 | +m4_define([_lt_decl_all_varnames], |
742 | +[lt_join($@, lt_decl_varnames_tagged([$1], |
743 | + lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl |
744 | +]) |
745 | + |
746 | + |
747 | +# _LT_CONFIG_STATUS_DECLARE([VARNAME]) |
748 | +# ------------------------------------ |
749 | +# Quote a variable value, and forward it to `config.status' so that its |
750 | +# declaration there will have the same value as in `configure'. VARNAME |
751 | +# must have a single quote delimited value for this to work. |
752 | +m4_define([_LT_CONFIG_STATUS_DECLARE], |
753 | +[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) |
754 | + |
755 | + |
756 | +# _LT_CONFIG_STATUS_DECLARATIONS |
757 | +# ------------------------------ |
758 | +# We delimit libtool config variables with single quotes, so when |
759 | +# we write them to config.status, we have to be sure to quote all |
760 | +# embedded single quotes properly. In configure, this macro expands |
761 | +# each variable declared with _LT_DECL (and _LT_TAGDECL) into: |
762 | +# |
763 | +# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' |
764 | +m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], |
765 | +[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), |
766 | + [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) |
767 | + |
768 | + |
769 | +# _LT_LIBTOOL_TAGS |
770 | +# ---------------- |
771 | +# Output comment and list of tags supported by the script |
772 | +m4_defun([_LT_LIBTOOL_TAGS], |
773 | +[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl |
774 | +available_tags="_LT_TAGS"dnl |
775 | +]) |
776 | + |
777 | + |
778 | +# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) |
779 | +# ----------------------------------- |
780 | +# Extract the dictionary values for VARNAME (optionally with TAG) and |
781 | +# expand to a commented shell variable setting: |
782 | +# |
783 | +# # Some comment about what VAR is for. |
784 | +# visible_name=$lt_internal_name |
785 | +m4_define([_LT_LIBTOOL_DECLARE], |
786 | +[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], |
787 | + [description])))[]dnl |
788 | +m4_pushdef([_libtool_name], |
789 | + m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl |
790 | +m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), |
791 | + [0], [_libtool_name=[$]$1], |
792 | + [1], [_libtool_name=$lt_[]$1], |
793 | + [2], [_libtool_name=$lt_[]$1], |
794 | + [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl |
795 | +m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl |
796 | +]) |
797 | + |
798 | + |
799 | +# _LT_LIBTOOL_CONFIG_VARS |
800 | +# ----------------------- |
801 | +# Produce commented declarations of non-tagged libtool config variables |
802 | +# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' |
803 | +# script. Tagged libtool config variables (even for the LIBTOOL CONFIG |
804 | +# section) are produced by _LT_LIBTOOL_TAG_VARS. |
805 | +m4_defun([_LT_LIBTOOL_CONFIG_VARS], |
806 | +[m4_foreach([_lt_var], |
807 | + m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), |
808 | + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) |
809 | + |
810 | + |
811 | +# _LT_LIBTOOL_TAG_VARS(TAG) |
812 | +# ------------------------- |
813 | +m4_define([_LT_LIBTOOL_TAG_VARS], |
814 | +[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), |
815 | + [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) |
816 | + |
817 | + |
818 | +# _LT_TAGVAR(VARNAME, [TAGNAME]) |
819 | +# ------------------------------ |
820 | +m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) |
821 | + |
822 | + |
823 | +# _LT_CONFIG_COMMANDS |
824 | +# ------------------- |
825 | +# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of |
826 | +# variables for single and double quote escaping we saved from calls |
827 | +# to _LT_DECL, we can put quote escaped variables declarations |
828 | +# into `config.status', and then the shell code to quote escape them in |
829 | +# for loops in `config.status'. Finally, any additional code accumulated |
830 | +# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. |
831 | +m4_defun([_LT_CONFIG_COMMANDS], |
832 | +[AC_PROVIDE_IFELSE([LT_OUTPUT], |
833 | + dnl If the libtool generation code has been placed in $CONFIG_LT, |
834 | + dnl instead of duplicating it all over again into config.status, |
835 | + dnl then we will have config.status run $CONFIG_LT later, so it |
836 | + dnl needs to know what name is stored there: |
837 | + [AC_CONFIG_COMMANDS([libtool], |
838 | + [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], |
839 | + dnl If the libtool generation code is destined for config.status, |
840 | + dnl expand the accumulated commands and init code now: |
841 | + [AC_CONFIG_COMMANDS([libtool], |
842 | + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) |
843 | +])#_LT_CONFIG_COMMANDS |
844 | + |
845 | + |
846 | +# Initialize. |
847 | +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], |
848 | +[ |
849 | + |
850 | +# The HP-UX ksh and POSIX shell print the target directory to stdout |
851 | +# if CDPATH is set. |
852 | +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
853 | + |
854 | +sed_quote_subst='$sed_quote_subst' |
855 | +double_quote_subst='$double_quote_subst' |
856 | +delay_variable_subst='$delay_variable_subst' |
857 | +_LT_CONFIG_STATUS_DECLARATIONS |
858 | +LTCC='$LTCC' |
859 | +LTCFLAGS='$LTCFLAGS' |
860 | +compiler='$compiler_DEFAULT' |
861 | + |
862 | +# Quote evaled strings. |
863 | +for var in lt_decl_all_varnames([[ \ |
864 | +]], lt_decl_quote_varnames); do |
865 | + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in |
866 | + *[[\\\\\\\`\\"\\\$]]*) |
867 | + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" |
868 | + ;; |
869 | + *) |
870 | + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" |
871 | + ;; |
872 | + esac |
873 | +done |
874 | + |
875 | +# Double-quote double-evaled strings. |
876 | +for var in lt_decl_all_varnames([[ \ |
877 | +]], lt_decl_dquote_varnames); do |
878 | + case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in |
879 | + *[[\\\\\\\`\\"\\\$]]*) |
880 | + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" |
881 | + ;; |
882 | + *) |
883 | + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" |
884 | + ;; |
885 | + esac |
886 | +done |
887 | + |
888 | +# Fix-up fallback echo if it was mangled by the above quoting rules. |
889 | +case \$lt_ECHO in |
890 | +*'\\\[$]0 --fallback-echo"')dnl " |
891 | + lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` |
892 | + ;; |
893 | +esac |
894 | + |
895 | +_LT_OUTPUT_LIBTOOL_INIT |
896 | +]) |
897 | + |
898 | + |
899 | +# LT_OUTPUT |
900 | +# --------- |
901 | +# This macro allows early generation of the libtool script (before |
902 | +# AC_OUTPUT is called), incase it is used in configure for compilation |
903 | +# tests. |
904 | +AC_DEFUN([LT_OUTPUT], |
905 | +[: ${CONFIG_LT=./config.lt} |
906 | +AC_MSG_NOTICE([creating $CONFIG_LT]) |
907 | +cat >"$CONFIG_LT" <<_LTEOF |
908 | +#! $SHELL |
909 | +# Generated by $as_me. |
910 | +# Run this file to recreate a libtool stub with the current configuration. |
911 | + |
912 | +lt_cl_silent=false |
913 | +SHELL=\${CONFIG_SHELL-$SHELL} |
914 | +_LTEOF |
915 | + |
916 | +cat >>"$CONFIG_LT" <<\_LTEOF |
917 | +AS_SHELL_SANITIZE |
918 | +_AS_PREPARE |
919 | + |
920 | +exec AS_MESSAGE_FD>&1 |
921 | +exec AS_MESSAGE_LOG_FD>>config.log |
922 | +{ |
923 | + echo |
924 | + AS_BOX([Running $as_me.]) |
925 | +} >&AS_MESSAGE_LOG_FD |
926 | + |
927 | +lt_cl_help="\ |
928 | +\`$as_me' creates a local libtool stub from the current configuration, |
929 | +for use in further configure time tests before the real libtool is |
930 | +generated. |
931 | + |
932 | +Usage: $[0] [[OPTIONS]] |
933 | + |
934 | + -h, --help print this help, then exit |
935 | + -V, --version print version number, then exit |
936 | + -q, --quiet do not print progress messages |
937 | + -d, --debug don't remove temporary files |
938 | + |
939 | +Report bugs to <bug-libtool@gnu.org>." |
940 | + |
941 | +lt_cl_version="\ |
942 | +m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl |
943 | +m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) |
944 | +configured by $[0], generated by m4_PACKAGE_STRING. |
945 | + |
946 | +Copyright (C) 2008 Free Software Foundation, Inc. |
947 | +This config.lt script is free software; the Free Software Foundation |
948 | +gives unlimited permision to copy, distribute and modify it." |
949 | + |
950 | +while test $[#] != 0 |
951 | +do |
952 | + case $[1] in |
953 | + --version | --v* | -V ) |
954 | + echo "$lt_cl_version"; exit 0 ;; |
955 | + --help | --h* | -h ) |
956 | + echo "$lt_cl_help"; exit 0 ;; |
957 | + --debug | --d* | -d ) |
958 | + debug=: ;; |
959 | + --quiet | --q* | --silent | --s* | -q ) |
960 | + lt_cl_silent=: ;; |
961 | + |
962 | + -*) AC_MSG_ERROR([unrecognized option: $[1] |
963 | +Try \`$[0] --help' for more information.]) ;; |
964 | + |
965 | + *) AC_MSG_ERROR([unrecognized argument: $[1] |
966 | +Try \`$[0] --help' for more information.]) ;; |
967 | + esac |
968 | + shift |
969 | +done |
970 | + |
971 | +if $lt_cl_silent; then |
972 | + exec AS_MESSAGE_FD>/dev/null |
973 | +fi |
974 | +_LTEOF |
975 | + |
976 | +cat >>"$CONFIG_LT" <<_LTEOF |
977 | +_LT_OUTPUT_LIBTOOL_COMMANDS_INIT |
978 | +_LTEOF |
979 | + |
980 | +cat >>"$CONFIG_LT" <<\_LTEOF |
981 | +AC_MSG_NOTICE([creating $ofile]) |
982 | +_LT_OUTPUT_LIBTOOL_COMMANDS |
983 | +AS_EXIT(0) |
984 | +_LTEOF |
985 | +chmod +x "$CONFIG_LT" |
986 | + |
987 | +# configure is writing to config.log, but config.lt does its own redirection, |
988 | +# appending to config.log, which fails on DOS, as config.log is still kept |
989 | +# open by configure. Here we exec the FD to /dev/null, effectively closing |
990 | +# config.log, so it can be properly (re)opened and appended to by config.lt. |
991 | +if test "$no_create" != yes; then |
992 | + lt_cl_success=: |
993 | + test "$silent" = yes && |
994 | + lt_config_lt_args="$lt_config_lt_args --quiet" |
995 | + exec AS_MESSAGE_LOG_FD>/dev/null |
996 | + $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false |
997 | + exec AS_MESSAGE_LOG_FD>>config.log |
998 | + $lt_cl_success || AS_EXIT(1) |
999 | +fi |
1000 | +])# LT_OUTPUT |
1001 | + |
1002 | + |
1003 | +# _LT_CONFIG(TAG) |
1004 | +# --------------- |
1005 | +# If TAG is the built-in tag, create an initial libtool script with a |
1006 | +# default configuration from the untagged config vars. Otherwise add code |
1007 | +# to config.status for appending the configuration named by TAG from the |
1008 | +# matching tagged config vars. |
1009 | +m4_defun([_LT_CONFIG], |
1010 | +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
1011 | +_LT_CONFIG_SAVE_COMMANDS([ |
1012 | + m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl |
1013 | + m4_if(_LT_TAG, [C], [ |
1014 | + # See if we are running on zsh, and set the options which allow our |
1015 | + # commands through without removal of \ escapes. |
1016 | + if test -n "${ZSH_VERSION+set}" ; then |
1017 | + setopt NO_GLOB_SUBST |
1018 | + fi |
1019 | + |
1020 | + cfgfile="${ofile}T" |
1021 | + trap "$RM \"$cfgfile\"; exit 1" 1 2 15 |
1022 | + $RM "$cfgfile" |
1023 | + |
1024 | + cat <<_LT_EOF >> "$cfgfile" |
1025 | +#! $SHELL |
1026 | + |
1027 | +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. |
1028 | +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION |
1029 | +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
1030 | +# NOTE: Changes made to this file will be lost: look at ltmain.sh. |
1031 | +# |
1032 | +_LT_COPYING |
1033 | +_LT_LIBTOOL_TAGS |
1034 | + |
1035 | +# ### BEGIN LIBTOOL CONFIG |
1036 | +_LT_LIBTOOL_CONFIG_VARS |
1037 | +_LT_LIBTOOL_TAG_VARS |
1038 | +# ### END LIBTOOL CONFIG |
1039 | + |
1040 | +_LT_EOF |
1041 | + |
1042 | + case $host_os in |
1043 | + aix3*) |
1044 | + cat <<\_LT_EOF >> "$cfgfile" |
1045 | +# AIX sometimes has problems with the GCC collect2 program. For some |
1046 | +# reason, if we set the COLLECT_NAMES environment variable, the problems |
1047 | +# vanish in a puff of smoke. |
1048 | +if test "X${COLLECT_NAMES+set}" != Xset; then |
1049 | + COLLECT_NAMES= |
1050 | + export COLLECT_NAMES |
1051 | +fi |
1052 | +_LT_EOF |
1053 | + ;; |
1054 | + esac |
1055 | + |
1056 | + _LT_PROG_LTMAIN |
1057 | + |
1058 | + # We use sed instead of cat because bash on DJGPP gets confused if |
1059 | + # if finds mixed CR/LF and LF-only lines. Since sed operates in |
1060 | + # text mode, it properly converts lines to CR/LF. This bash problem |
1061 | + # is reportedly fixed, but why not run on old versions too? |
1062 | + sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ |
1063 | + || (rm -f "$cfgfile"; exit 1) |
1064 | + |
1065 | + _LT_PROG_XSI_SHELLFNS |
1066 | + |
1067 | + sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ |
1068 | + || (rm -f "$cfgfile"; exit 1) |
1069 | + |
1070 | + mv -f "$cfgfile" "$ofile" || |
1071 | + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") |
1072 | + chmod +x "$ofile" |
1073 | +], |
1074 | +[cat <<_LT_EOF >> "$ofile" |
1075 | + |
1076 | +dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded |
1077 | +dnl in a comment (ie after a #). |
1078 | +# ### BEGIN LIBTOOL TAG CONFIG: $1 |
1079 | +_LT_LIBTOOL_TAG_VARS(_LT_TAG) |
1080 | +# ### END LIBTOOL TAG CONFIG: $1 |
1081 | +_LT_EOF |
1082 | +])dnl /m4_if |
1083 | +], |
1084 | +[m4_if([$1], [], [ |
1085 | + PACKAGE='$PACKAGE' |
1086 | + VERSION='$VERSION' |
1087 | + TIMESTAMP='$TIMESTAMP' |
1088 | + RM='$RM' |
1089 | + ofile='$ofile'], []) |
1090 | +])dnl /_LT_CONFIG_SAVE_COMMANDS |
1091 | +])# _LT_CONFIG |
1092 | + |
1093 | + |
1094 | +# LT_SUPPORTED_TAG(TAG) |
1095 | +# --------------------- |
1096 | +# Trace this macro to discover what tags are supported by the libtool |
1097 | +# --tag option, using: |
1098 | +# autoconf --trace 'LT_SUPPORTED_TAG:$1' |
1099 | +AC_DEFUN([LT_SUPPORTED_TAG], []) |
1100 | + |
1101 | + |
1102 | +# C support is built-in for now |
1103 | +m4_define([_LT_LANG_C_enabled], []) |
1104 | +m4_define([_LT_TAGS], []) |
1105 | + |
1106 | + |
1107 | +# LT_LANG(LANG) |
1108 | +# ------------- |
1109 | +# Enable libtool support for the given language if not already enabled. |
1110 | +AC_DEFUN([LT_LANG], |
1111 | +[AC_BEFORE([$0], [LT_OUTPUT])dnl |
1112 | +m4_case([$1], |
1113 | + [C], [_LT_LANG(C)], |
1114 | + [C++], [_LT_LANG(CXX)], |
1115 | + [Java], [_LT_LANG(GCJ)], |
1116 | + [Fortran 77], [_LT_LANG(F77)], |
1117 | + [Fortran], [_LT_LANG(FC)], |
1118 | + [Windows Resource], [_LT_LANG(RC)], |
1119 | + [m4_ifdef([_LT_LANG_]$1[_CONFIG], |
1120 | + [_LT_LANG($1)], |
1121 | + [m4_fatal([$0: unsupported language: "$1"])])])dnl |
1122 | +])# LT_LANG |
1123 | + |
1124 | + |
1125 | +# _LT_LANG(LANGNAME) |
1126 | +# ------------------ |
1127 | +m4_defun([_LT_LANG], |
1128 | +[m4_ifdef([_LT_LANG_]$1[_enabled], [], |
1129 | + [LT_SUPPORTED_TAG([$1])dnl |
1130 | + m4_append([_LT_TAGS], [$1 ])dnl |
1131 | + m4_define([_LT_LANG_]$1[_enabled], [])dnl |
1132 | + _LT_LANG_$1_CONFIG($1)])dnl |
1133 | +])# _LT_LANG |
1134 | + |
1135 | + |
1136 | +# _LT_LANG_DEFAULT_CONFIG |
1137 | +# ----------------------- |
1138 | +m4_defun([_LT_LANG_DEFAULT_CONFIG], |
1139 | +[AC_PROVIDE_IFELSE([AC_PROG_CXX], |
1140 | + [LT_LANG(CXX)], |
1141 | + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) |
1142 | + |
1143 | +AC_PROVIDE_IFELSE([AC_PROG_F77], |
1144 | + [LT_LANG(F77)], |
1145 | + [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) |
1146 | + |
1147 | +AC_PROVIDE_IFELSE([AC_PROG_FC], |
1148 | + [LT_LANG(FC)], |
1149 | + [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) |
1150 | + |
1151 | +dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal |
1152 | +dnl pulling things in needlessly. |
1153 | +AC_PROVIDE_IFELSE([AC_PROG_GCJ], |
1154 | + [LT_LANG(GCJ)], |
1155 | + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], |
1156 | + [LT_LANG(GCJ)], |
1157 | + [AC_PROVIDE_IFELSE([LT_PROG_GCJ], |
1158 | + [LT_LANG(GCJ)], |
1159 | + [m4_ifdef([AC_PROG_GCJ], |
1160 | + [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) |
1161 | + m4_ifdef([A][M_PROG_GCJ], |
1162 | + [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) |
1163 | + m4_ifdef([LT_PROG_GCJ], |
1164 | + [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) |
1165 | + |
1166 | +AC_PROVIDE_IFELSE([LT_PROG_RC], |
1167 | + [LT_LANG(RC)], |
1168 | + [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) |
1169 | +])# _LT_LANG_DEFAULT_CONFIG |
1170 | + |
1171 | +# Obsolete macros: |
1172 | +AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) |
1173 | +AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) |
1174 | +AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) |
1175 | +AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) |
1176 | +dnl aclocal-1.4 backwards compatibility: |
1177 | +dnl AC_DEFUN([AC_LIBTOOL_CXX], []) |
1178 | +dnl AC_DEFUN([AC_LIBTOOL_F77], []) |
1179 | +dnl AC_DEFUN([AC_LIBTOOL_FC], []) |
1180 | +dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) |
1181 | + |
1182 | + |
1183 | +# _LT_TAG_COMPILER |
1184 | +# ---------------- |
1185 | +m4_defun([_LT_TAG_COMPILER], |
1186 | +[AC_REQUIRE([AC_PROG_CC])dnl |
1187 | + |
1188 | +_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl |
1189 | +_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl |
1190 | +_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl |
1191 | +_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl |
1192 | + |
1193 | +# If no C compiler was specified, use CC. |
1194 | +LTCC=${LTCC-"$CC"} |
1195 | + |
1196 | +# If no C compiler flags were specified, use CFLAGS. |
1197 | +LTCFLAGS=${LTCFLAGS-"$CFLAGS"} |
1198 | + |
1199 | +# Allow CC to be a program name with arguments. |
1200 | +compiler=$CC |
1201 | +])# _LT_TAG_COMPILER |
1202 | + |
1203 | + |
1204 | +# _LT_COMPILER_BOILERPLATE |
1205 | +# ------------------------ |
1206 | +# Check for compiler boilerplate output or warnings with |
1207 | +# the simple compiler test code. |
1208 | +m4_defun([_LT_COMPILER_BOILERPLATE], |
1209 | +[m4_require([_LT_DECL_SED])dnl |
1210 | +ac_outfile=conftest.$ac_objext |
1211 | +echo "$lt_simple_compile_test_code" >conftest.$ac_ext |
1212 | +eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err |
1213 | +_lt_compiler_boilerplate=`cat conftest.err` |
1214 | +$RM conftest* |
1215 | +])# _LT_COMPILER_BOILERPLATE |
1216 | + |
1217 | + |
1218 | +# _LT_LINKER_BOILERPLATE |
1219 | +# ---------------------- |
1220 | +# Check for linker boilerplate output or warnings with |
1221 | +# the simple link test code. |
1222 | +m4_defun([_LT_LINKER_BOILERPLATE], |
1223 | +[m4_require([_LT_DECL_SED])dnl |
1224 | +ac_outfile=conftest.$ac_objext |
1225 | +echo "$lt_simple_link_test_code" >conftest.$ac_ext |
1226 | +eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err |
1227 | +_lt_linker_boilerplate=`cat conftest.err` |
1228 | +$RM -r conftest* |
1229 | +])# _LT_LINKER_BOILERPLATE |
1230 | + |
1231 | +# _LT_REQUIRED_DARWIN_CHECKS |
1232 | +# ------------------------- |
1233 | +m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ |
1234 | + case $host_os in |
1235 | + rhapsody* | darwin*) |
1236 | + AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) |
1237 | + AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) |
1238 | + AC_CHECK_TOOL([LIPO], [lipo], [:]) |
1239 | + AC_CHECK_TOOL([OTOOL], [otool], [:]) |
1240 | + AC_CHECK_TOOL([OTOOL64], [otool64], [:]) |
1241 | + _LT_DECL([], [DSYMUTIL], [1], |
1242 | + [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) |
1243 | + _LT_DECL([], [NMEDIT], [1], |
1244 | + [Tool to change global to local symbols on Mac OS X]) |
1245 | + _LT_DECL([], [LIPO], [1], |
1246 | + [Tool to manipulate fat objects and archives on Mac OS X]) |
1247 | + _LT_DECL([], [OTOOL], [1], |
1248 | + [ldd/readelf like tool for Mach-O binaries on Mac OS X]) |
1249 | + _LT_DECL([], [OTOOL64], [1], |
1250 | + [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) |
1251 | + |
1252 | + AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], |
1253 | + [lt_cv_apple_cc_single_mod=no |
1254 | + if test -z "${LT_MULTI_MODULE}"; then |
1255 | + # By default we will add the -single_module flag. You can override |
1256 | + # by either setting the environment variable LT_MULTI_MODULE |
1257 | + # non-empty at configure time, or by adding -multi_module to the |
1258 | + # link flags. |
1259 | + rm -rf libconftest.dylib* |
1260 | + echo "int foo(void){return 1;}" > conftest.c |
1261 | + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ |
1262 | +-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD |
1263 | + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ |
1264 | + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err |
1265 | + _lt_result=$? |
1266 | + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then |
1267 | + lt_cv_apple_cc_single_mod=yes |
1268 | + else |
1269 | + cat conftest.err >&AS_MESSAGE_LOG_FD |
1270 | + fi |
1271 | + rm -rf libconftest.dylib* |
1272 | + rm -f conftest.* |
1273 | + fi]) |
1274 | + AC_CACHE_CHECK([for -exported_symbols_list linker flag], |
1275 | + [lt_cv_ld_exported_symbols_list], |
1276 | + [lt_cv_ld_exported_symbols_list=no |
1277 | + save_LDFLAGS=$LDFLAGS |
1278 | + echo "_main" > conftest.sym |
1279 | + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" |
1280 | + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], |
1281 | + [lt_cv_ld_exported_symbols_list=yes], |
1282 | + [lt_cv_ld_exported_symbols_list=no]) |
1283 | + LDFLAGS="$save_LDFLAGS" |
1284 | + ]) |
1285 | + case $host_os in |
1286 | + rhapsody* | darwin1.[[012]]) |
1287 | + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; |
1288 | + darwin1.*) |
1289 | + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; |
1290 | + darwin*) # darwin 5.x on |
1291 | + # if running on 10.5 or later, the deployment target defaults |
1292 | + # to the OS version, if on x86, and 10.4, the deployment |
1293 | + # target defaults to 10.4. Don't you love it? |
1294 | + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in |
1295 | + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) |
1296 | + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; |
1297 | + 10.[[012]]*) |
1298 | + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; |
1299 | + 10.*) |
1300 | + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; |
1301 | + esac |
1302 | + ;; |
1303 | + esac |
1304 | + if test "$lt_cv_apple_cc_single_mod" = "yes"; then |
1305 | + _lt_dar_single_mod='$single_module' |
1306 | + fi |
1307 | + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then |
1308 | + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' |
1309 | + else |
1310 | + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' |
1311 | + fi |
1312 | + if test "$DSYMUTIL" != ":"; then |
1313 | + _lt_dsymutil='~$DSYMUTIL $lib || :' |
1314 | + else |
1315 | + _lt_dsymutil= |
1316 | + fi |
1317 | + ;; |
1318 | + esac |
1319 | +]) |
1320 | + |
1321 | + |
1322 | +# _LT_DARWIN_LINKER_FEATURES |
1323 | +# -------------------------- |
1324 | +# Checks for linker and compiler features on darwin |
1325 | +m4_defun([_LT_DARWIN_LINKER_FEATURES], |
1326 | +[ |
1327 | + m4_require([_LT_REQUIRED_DARWIN_CHECKS]) |
1328 | + _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
1329 | + _LT_TAGVAR(hardcode_direct, $1)=no |
1330 | + _LT_TAGVAR(hardcode_automatic, $1)=yes |
1331 | + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
1332 | + _LT_TAGVAR(whole_archive_flag_spec, $1)='' |
1333 | + _LT_TAGVAR(link_all_deplibs, $1)=yes |
1334 | + _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" |
1335 | + case $cc_basename in |
1336 | + ifort*) _lt_dar_can_shared=yes ;; |
1337 | + *) _lt_dar_can_shared=$GCC ;; |
1338 | + esac |
1339 | + if test "$_lt_dar_can_shared" = "yes"; then |
1340 | + output_verbose_link_cmd=echo |
1341 | + _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" |
1342 | + _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" |
1343 | + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" |
1344 | + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" |
1345 | + m4_if([$1], [CXX], |
1346 | +[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then |
1347 | + _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" |
1348 | + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" |
1349 | + fi |
1350 | +],[]) |
1351 | + else |
1352 | + _LT_TAGVAR(ld_shlibs, $1)=no |
1353 | + fi |
1354 | +]) |
1355 | + |
1356 | +# _LT_SYS_MODULE_PATH_AIX |
1357 | +# ----------------------- |
1358 | +# Links a minimal program and checks the executable |
1359 | +# for the system default hardcoded library path. In most cases, |
1360 | +# this is /usr/lib:/lib, but when the MPI compilers are used |
1361 | +# the location of the communication and MPI libs are included too. |
1362 | +# If we don't find anything, use the default library path according |
1363 | +# to the aix ld manual. |
1364 | +m4_defun([_LT_SYS_MODULE_PATH_AIX], |
1365 | +[m4_require([_LT_DECL_SED])dnl |
1366 | +AC_LINK_IFELSE(AC_LANG_PROGRAM,[ |
1367 | +lt_aix_libpath_sed=' |
1368 | + /Import File Strings/,/^$/ { |
1369 | + /^0/ { |
1370 | + s/^0 *\(.*\)$/\1/ |
1371 | + p |
1372 | + } |
1373 | + }' |
1374 | +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` |
1375 | +# Check for a 64-bit object if we didn't find anything. |
1376 | +if test -z "$aix_libpath"; then |
1377 | + aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` |
1378 | +fi],[]) |
1379 | +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi |
1380 | +])# _LT_SYS_MODULE_PATH_AIX |
1381 | + |
1382 | + |
1383 | +# _LT_SHELL_INIT(ARG) |
1384 | +# ------------------- |
1385 | +m4_define([_LT_SHELL_INIT], |
1386 | +[ifdef([AC_DIVERSION_NOTICE], |
1387 | + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], |
1388 | + [AC_DIVERT_PUSH(NOTICE)]) |
1389 | +$1 |
1390 | +AC_DIVERT_POP |
1391 | +])# _LT_SHELL_INIT |
1392 | + |
1393 | + |
1394 | +# _LT_PROG_ECHO_BACKSLASH |
1395 | +# ----------------------- |
1396 | +# Add some code to the start of the generated configure script which |
1397 | +# will find an echo command which doesn't interpret backslashes. |
1398 | +m4_defun([_LT_PROG_ECHO_BACKSLASH], |
1399 | +[_LT_SHELL_INIT([ |
1400 | +# Check that we are running under the correct shell. |
1401 | +SHELL=${CONFIG_SHELL-/bin/sh} |
1402 | + |
1403 | +case X$lt_ECHO in |
1404 | +X*--fallback-echo) |
1405 | + # Remove one level of quotation (which was required for Make). |
1406 | + ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` |
1407 | + ;; |
1408 | +esac |
1409 | + |
1410 | +ECHO=${lt_ECHO-echo} |
1411 | +if test "X[$]1" = X--no-reexec; then |
1412 | + # Discard the --no-reexec flag, and continue. |
1413 | + shift |
1414 | +elif test "X[$]1" = X--fallback-echo; then |
1415 | + # Avoid inline document here, it may be left over |
1416 | + : |
1417 | +elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then |
1418 | + # Yippee, $ECHO works! |
1419 | + : |
1420 | +else |
1421 | + # Restart under the correct shell. |
1422 | + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} |
1423 | +fi |
1424 | + |
1425 | +if test "X[$]1" = X--fallback-echo; then |
1426 | + # used as fallback echo |
1427 | + shift |
1428 | + cat <<_LT_EOF |
1429 | +[$]* |
1430 | +_LT_EOF |
1431 | + exit 0 |
1432 | +fi |
1433 | + |
1434 | +# The HP-UX ksh and POSIX shell print the target directory to stdout |
1435 | +# if CDPATH is set. |
1436 | +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
1437 | + |
1438 | +if test -z "$lt_ECHO"; then |
1439 | + if test "X${echo_test_string+set}" != Xset; then |
1440 | + # find a string as large as possible, as long as the shell can cope with it |
1441 | + for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do |
1442 | + # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... |
1443 | + if { echo_test_string=`eval $cmd`; } 2>/dev/null && |
1444 | + { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null |
1445 | + then |
1446 | + break |
1447 | + fi |
1448 | + done |
1449 | + fi |
1450 | + |
1451 | + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && |
1452 | + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && |
1453 | + test "X$echo_testing_string" = "X$echo_test_string"; then |
1454 | + : |
1455 | + else |
1456 | + # The Solaris, AIX, and Digital Unix default echo programs unquote |
1457 | + # backslashes. This makes it impossible to quote backslashes using |
1458 | + # echo "$something" | sed 's/\\/\\\\/g' |
1459 | + # |
1460 | + # So, first we look for a working echo in the user's PATH. |
1461 | + |
1462 | + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
1463 | + for dir in $PATH /usr/ucb; do |
1464 | + IFS="$lt_save_ifs" |
1465 | + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && |
1466 | + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && |
1467 | + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && |
1468 | + test "X$echo_testing_string" = "X$echo_test_string"; then |
1469 | + ECHO="$dir/echo" |
1470 | + break |
1471 | + fi |
1472 | + done |
1473 | + IFS="$lt_save_ifs" |
1474 | + |
1475 | + if test "X$ECHO" = Xecho; then |
1476 | + # We didn't find a better echo, so look for alternatives. |
1477 | + if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && |
1478 | + echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && |
1479 | + test "X$echo_testing_string" = "X$echo_test_string"; then |
1480 | + # This shell has a builtin print -r that does the trick. |
1481 | + ECHO='print -r' |
1482 | + elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && |
1483 | + test "X$CONFIG_SHELL" != X/bin/ksh; then |
1484 | + # If we have ksh, try running configure again with it. |
1485 | + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} |
1486 | + export ORIGINAL_CONFIG_SHELL |
1487 | + CONFIG_SHELL=/bin/ksh |
1488 | + export CONFIG_SHELL |
1489 | + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} |
1490 | + else |
1491 | + # Try using printf. |
1492 | + ECHO='printf %s\n' |
1493 | + if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && |
1494 | + echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && |
1495 | + test "X$echo_testing_string" = "X$echo_test_string"; then |
1496 | + # Cool, printf works |
1497 | + : |
1498 | + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
1499 | + test "X$echo_testing_string" = 'X\t' && |
1500 | + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
1501 | + test "X$echo_testing_string" = "X$echo_test_string"; then |
1502 | + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL |
1503 | + export CONFIG_SHELL |
1504 | + SHELL="$CONFIG_SHELL" |
1505 | + export SHELL |
1506 | + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" |
1507 | + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && |
1508 | + test "X$echo_testing_string" = 'X\t' && |
1509 | + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && |
1510 | + test "X$echo_testing_string" = "X$echo_test_string"; then |
1511 | + ECHO="$CONFIG_SHELL [$]0 --fallback-echo" |
1512 | + else |
1513 | + # maybe with a smaller string... |
1514 | + prev=: |
1515 | + |
1516 | + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do |
1517 | + if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null |
1518 | + then |
1519 | + break |
1520 | + fi |
1521 | + prev="$cmd" |
1522 | + done |
1523 | + |
1524 | + if test "$prev" != 'sed 50q "[$]0"'; then |
1525 | + echo_test_string=`eval $prev` |
1526 | + export echo_test_string |
1527 | + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} |
1528 | + else |
1529 | + # Oops. We lost completely, so just stick with echo. |
1530 | + ECHO=echo |
1531 | + fi |
1532 | + fi |
1533 | + fi |
1534 | + fi |
1535 | + fi |
1536 | +fi |
1537 | + |
1538 | +# Copy echo and quote the copy suitably for passing to libtool from |
1539 | +# the Makefile, instead of quoting the original, which is used later. |
1540 | +lt_ECHO=$ECHO |
1541 | +if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then |
1542 | + lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" |
1543 | +fi |
1544 | + |
1545 | +AC_SUBST(lt_ECHO) |
1546 | +]) |
1547 | +_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) |
1548 | +_LT_DECL([], [ECHO], [1], |
1549 | + [An echo program that does not interpret backslashes]) |
1550 | +])# _LT_PROG_ECHO_BACKSLASH |
1551 | + |
1552 | + |
1553 | +# _LT_ENABLE_LOCK |
1554 | +# --------------- |
1555 | +m4_defun([_LT_ENABLE_LOCK], |
1556 | +[AC_ARG_ENABLE([libtool-lock], |
1557 | + [AS_HELP_STRING([--disable-libtool-lock], |
1558 | + [avoid locking (might break parallel builds)])]) |
1559 | +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes |
1560 | + |
1561 | +# Some flags need to be propagated to the compiler or linker for good |
1562 | +# libtool support. |
1563 | +case $host in |
1564 | +ia64-*-hpux*) |
1565 | + # Find out which ABI we are using. |
1566 | + echo 'int i;' > conftest.$ac_ext |
1567 | + if AC_TRY_EVAL(ac_compile); then |
1568 | + case `/usr/bin/file conftest.$ac_objext` in |
1569 | + *ELF-32*) |
1570 | + HPUX_IA64_MODE="32" |
1571 | + ;; |
1572 | + *ELF-64*) |
1573 | + HPUX_IA64_MODE="64" |
1574 | + ;; |
1575 | + esac |
1576 | + fi |
1577 | + rm -rf conftest* |
1578 | + ;; |
1579 | +*-*-irix6*) |
1580 | + # Find out which ABI we are using. |
1581 | + echo '[#]line __oline__ "configure"' > conftest.$ac_ext |
1582 | + if AC_TRY_EVAL(ac_compile); then |
1583 | + if test "$lt_cv_prog_gnu_ld" = yes; then |
1584 | + case `/usr/bin/file conftest.$ac_objext` in |
1585 | + *32-bit*) |
1586 | + LD="${LD-ld} -melf32bsmip" |
1587 | + ;; |
1588 | + *N32*) |
1589 | + LD="${LD-ld} -melf32bmipn32" |
1590 | + ;; |
1591 | + *64-bit*) |
1592 | + LD="${LD-ld} -melf64bmip" |
1593 | + ;; |
1594 | + esac |
1595 | + else |
1596 | + case `/usr/bin/file conftest.$ac_objext` in |
1597 | + *32-bit*) |
1598 | + LD="${LD-ld} -32" |
1599 | + ;; |
1600 | + *N32*) |
1601 | + LD="${LD-ld} -n32" |
1602 | + ;; |
1603 | + *64-bit*) |
1604 | + LD="${LD-ld} -64" |
1605 | + ;; |
1606 | + esac |
1607 | + fi |
1608 | + fi |
1609 | + rm -rf conftest* |
1610 | + ;; |
1611 | + |
1612 | +x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ |
1613 | +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) |
1614 | + # Find out which ABI we are using. |
1615 | + echo 'int i;' > conftest.$ac_ext |
1616 | + if AC_TRY_EVAL(ac_compile); then |
1617 | + case `/usr/bin/file conftest.o` in |
1618 | + *32-bit*) |
1619 | + case $host in |
1620 | + x86_64-*kfreebsd*-gnu) |
1621 | + LD="${LD-ld} -m elf_i386_fbsd" |
1622 | + ;; |
1623 | + x86_64-*linux*) |
1624 | + LD="${LD-ld} -m elf_i386" |
1625 | + ;; |
1626 | + ppc64-*linux*|powerpc64-*linux*) |
1627 | + LD="${LD-ld} -m elf32ppclinux" |
1628 | + ;; |
1629 | + s390x-*linux*) |
1630 | + LD="${LD-ld} -m elf_s390" |
1631 | + ;; |
1632 | + sparc64-*linux*) |
1633 | + LD="${LD-ld} -m elf32_sparc" |
1634 | + ;; |
1635 | + esac |
1636 | + ;; |
1637 | + *64-bit*) |
1638 | + case $host in |
1639 | + x86_64-*kfreebsd*-gnu) |
1640 | + LD="${LD-ld} -m elf_x86_64_fbsd" |
1641 | + ;; |
1642 | + x86_64-*linux*) |
1643 | + LD="${LD-ld} -m elf_x86_64" |
1644 | + ;; |
1645 | + ppc*-*linux*|powerpc*-*linux*) |
1646 | + LD="${LD-ld} -m elf64ppc" |
1647 | + ;; |
1648 | + s390*-*linux*|s390*-*tpf*) |
1649 | + LD="${LD-ld} -m elf64_s390" |
1650 | + ;; |
1651 | + sparc*-*linux*) |
1652 | + LD="${LD-ld} -m elf64_sparc" |
1653 | + ;; |
1654 | + esac |
1655 | + ;; |
1656 | + esac |
1657 | + fi |
1658 | + rm -rf conftest* |
1659 | + ;; |
1660 | + |
1661 | +*-*-sco3.2v5*) |
1662 | + # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
1663 | + SAVE_CFLAGS="$CFLAGS" |
1664 | + CFLAGS="$CFLAGS -belf" |
1665 | + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
1666 | + [AC_LANG_PUSH(C) |
1667 | + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
1668 | + AC_LANG_POP]) |
1669 | + if test x"$lt_cv_cc_needs_belf" != x"yes"; then |
1670 | + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
1671 | + CFLAGS="$SAVE_CFLAGS" |
1672 | + fi |
1673 | + ;; |
1674 | +sparc*-*solaris*) |
1675 | + # Find out which ABI we are using. |
1676 | + echo 'int i;' > conftest.$ac_ext |
1677 | + if AC_TRY_EVAL(ac_compile); then |
1678 | + case `/usr/bin/file conftest.o` in |
1679 | + *64-bit*) |
1680 | + case $lt_cv_prog_gnu_ld in |
1681 | + yes*) LD="${LD-ld} -m elf64_sparc" ;; |
1682 | + *) |
1683 | + if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then |
1684 | + LD="${LD-ld} -64" |
1685 | + fi |
1686 | + ;; |
1687 | + esac |
1688 | + ;; |
1689 | + esac |
1690 | + fi |
1691 | + rm -rf conftest* |
1692 | + ;; |
1693 | +esac |
1694 | + |
1695 | +need_locks="$enable_libtool_lock" |
1696 | +])# _LT_ENABLE_LOCK |
1697 | + |
1698 | + |
1699 | +# _LT_CMD_OLD_ARCHIVE |
1700 | +# ------------------- |
1701 | +m4_defun([_LT_CMD_OLD_ARCHIVE], |
1702 | +[AC_CHECK_TOOL(AR, ar, false) |
1703 | +test -z "$AR" && AR=ar |
1704 | +test -z "$AR_FLAGS" && AR_FLAGS=cru |
1705 | +_LT_DECL([], [AR], [1], [The archiver]) |
1706 | +_LT_DECL([], [AR_FLAGS], [1]) |
1707 | + |
1708 | +AC_CHECK_TOOL(STRIP, strip, :) |
1709 | +test -z "$STRIP" && STRIP=: |
1710 | +_LT_DECL([], [STRIP], [1], [A symbol stripping program]) |
1711 | + |
1712 | +AC_CHECK_TOOL(RANLIB, ranlib, :) |
1713 | +test -z "$RANLIB" && RANLIB=: |
1714 | +_LT_DECL([], [RANLIB], [1], |
1715 | + [Commands used to install an old-style archive]) |
1716 | + |
1717 | +# Determine commands to create old-style static archives. |
1718 | +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' |
1719 | +old_postinstall_cmds='chmod 644 $oldlib' |
1720 | +old_postuninstall_cmds= |
1721 | + |
1722 | +if test -n "$RANLIB"; then |
1723 | + case $host_os in |
1724 | + openbsd*) |
1725 | + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" |
1726 | + ;; |
1727 | + *) |
1728 | + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" |
1729 | + ;; |
1730 | + esac |
1731 | + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" |
1732 | +fi |
1733 | +_LT_DECL([], [old_postinstall_cmds], [2]) |
1734 | +_LT_DECL([], [old_postuninstall_cmds], [2]) |
1735 | +_LT_TAGDECL([], [old_archive_cmds], [2], |
1736 | + [Commands used to build an old-style archive]) |
1737 | +])# _LT_CMD_OLD_ARCHIVE |
1738 | + |
1739 | + |
1740 | +# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
1741 | +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) |
1742 | +# ---------------------------------------------------------------- |
1743 | +# Check whether the given compiler option works |
1744 | +AC_DEFUN([_LT_COMPILER_OPTION], |
1745 | +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
1746 | +m4_require([_LT_DECL_SED])dnl |
1747 | +AC_CACHE_CHECK([$1], [$2], |
1748 | + [$2=no |
1749 | + m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) |
1750 | + echo "$lt_simple_compile_test_code" > conftest.$ac_ext |
1751 | + lt_compiler_flag="$3" |
1752 | + # Insert the option either (1) after the last *FLAGS variable, or |
1753 | + # (2) before a word containing "conftest.", or (3) at the end. |
1754 | + # Note that $ac_compile itself does not contain backslashes and begins |
1755 | + # with a dollar sign (not a hyphen), so the echo should work correctly. |
1756 | + # The option is referenced via a variable to avoid confusing sed. |
1757 | + lt_compile=`echo "$ac_compile" | $SED \ |
1758 | + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
1759 | + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
1760 | + -e 's:$: $lt_compiler_flag:'` |
1761 | + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
1762 | + (eval "$lt_compile" 2>conftest.err) |
1763 | + ac_status=$? |
1764 | + cat conftest.err >&AS_MESSAGE_LOG_FD |
1765 | + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
1766 | + if (exit $ac_status) && test -s "$ac_outfile"; then |
1767 | + # The compiler can only warn and ignore the option if not recognized |
1768 | + # So say no if there are warnings other than the usual output. |
1769 | + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp |
1770 | + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
1771 | + if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then |
1772 | + $2=yes |
1773 | + fi |
1774 | + fi |
1775 | + $RM conftest* |
1776 | +]) |
1777 | + |
1778 | +if test x"[$]$2" = xyes; then |
1779 | + m4_if([$5], , :, [$5]) |
1780 | +else |
1781 | + m4_if([$6], , :, [$6]) |
1782 | +fi |
1783 | +])# _LT_COMPILER_OPTION |
1784 | + |
1785 | +# Old name: |
1786 | +AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) |
1787 | +dnl aclocal-1.4 backwards compatibility: |
1788 | +dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) |
1789 | + |
1790 | + |
1791 | +# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
1792 | +# [ACTION-SUCCESS], [ACTION-FAILURE]) |
1793 | +# ---------------------------------------------------- |
1794 | +# Check whether the given linker option works |
1795 | +AC_DEFUN([_LT_LINKER_OPTION], |
1796 | +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
1797 | +m4_require([_LT_DECL_SED])dnl |
1798 | +AC_CACHE_CHECK([$1], [$2], |
1799 | + [$2=no |
1800 | + save_LDFLAGS="$LDFLAGS" |
1801 | + LDFLAGS="$LDFLAGS $3" |
1802 | + echo "$lt_simple_link_test_code" > conftest.$ac_ext |
1803 | + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then |
1804 | + # The linker can only warn and ignore the option if not recognized |
1805 | + # So say no if there are warnings |
1806 | + if test -s conftest.err; then |
1807 | + # Append any errors to the config.log. |
1808 | + cat conftest.err 1>&AS_MESSAGE_LOG_FD |
1809 | + $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp |
1810 | + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
1811 | + if diff conftest.exp conftest.er2 >/dev/null; then |
1812 | + $2=yes |
1813 | + fi |
1814 | + else |
1815 | + $2=yes |
1816 | + fi |
1817 | + fi |
1818 | + $RM -r conftest* |
1819 | + LDFLAGS="$save_LDFLAGS" |
1820 | +]) |
1821 | + |
1822 | +if test x"[$]$2" = xyes; then |
1823 | + m4_if([$4], , :, [$4]) |
1824 | +else |
1825 | + m4_if([$5], , :, [$5]) |
1826 | +fi |
1827 | +])# _LT_LINKER_OPTION |
1828 | + |
1829 | +# Old name: |
1830 | +AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) |
1831 | +dnl aclocal-1.4 backwards compatibility: |
1832 | +dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) |
1833 | + |
1834 | + |
1835 | +# LT_CMD_MAX_LEN |
1836 | +#--------------- |
1837 | +AC_DEFUN([LT_CMD_MAX_LEN], |
1838 | +[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
1839 | +# find the maximum length of command line arguments |
1840 | +AC_MSG_CHECKING([the maximum length of command line arguments]) |
1841 | +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl |
1842 | + i=0 |
1843 | + teststring="ABCD" |
1844 | + |
1845 | + case $build_os in |
1846 | + msdosdjgpp*) |
1847 | + # On DJGPP, this test can blow up pretty badly due to problems in libc |
1848 | + # (any single argument exceeding 2000 bytes causes a buffer overrun |
1849 | + # during glob expansion). Even if it were fixed, the result of this |
1850 | + # check would be larger than it should be. |
1851 | + lt_cv_sys_max_cmd_len=12288; # 12K is about right |
1852 | + ;; |
1853 | + |
1854 | + gnu*) |
1855 | + # Under GNU Hurd, this test is not required because there is |
1856 | + # no limit to the length of command line arguments. |
1857 | + # Libtool will interpret -1 as no limit whatsoever |
1858 | + lt_cv_sys_max_cmd_len=-1; |
1859 | + ;; |
1860 | + |
1861 | + cygwin* | mingw* | cegcc*) |
1862 | + # On Win9x/ME, this test blows up -- it succeeds, but takes |
1863 | + # about 5 minutes as the teststring grows exponentially. |
1864 | + # Worse, since 9x/ME are not pre-emptively multitasking, |
1865 | + # you end up with a "frozen" computer, even though with patience |
1866 | + # the test eventually succeeds (with a max line length of 256k). |
1867 | + # Instead, let's just punt: use the minimum linelength reported by |
1868 | + # all of the supported platforms: 8192 (on NT/2K/XP). |
1869 | + lt_cv_sys_max_cmd_len=8192; |
1870 | + ;; |
1871 | + |
1872 | + amigaos*) |
1873 | + # On AmigaOS with pdksh, this test takes hours, literally. |
1874 | + # So we just punt and use a minimum line length of 8192. |
1875 | + lt_cv_sys_max_cmd_len=8192; |
1876 | + ;; |
1877 | + |
1878 | + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) |
1879 | + # This has been around since 386BSD, at least. Likely further. |
1880 | + if test -x /sbin/sysctl; then |
1881 | + lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` |
1882 | + elif test -x /usr/sbin/sysctl; then |
1883 | + lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` |
1884 | + else |
1885 | + lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs |
1886 | + fi |
1887 | + # And add a safety zone |
1888 | + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` |
1889 | + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` |
1890 | + ;; |
1891 | + |
1892 | + interix*) |
1893 | + # We know the value 262144 and hardcode it with a safety zone (like BSD) |
1894 | + lt_cv_sys_max_cmd_len=196608 |
1895 | + ;; |
1896 | + |
1897 | + osf*) |
1898 | + # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure |
1899 | + # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not |
1900 | + # nice to cause kernel panics so lets avoid the loop below. |
1901 | + # First set a reasonable default. |
1902 | + lt_cv_sys_max_cmd_len=16384 |
1903 | + # |
1904 | + if test -x /sbin/sysconfig; then |
1905 | + case `/sbin/sysconfig -q proc exec_disable_arg_limit` in |
1906 | + *1*) lt_cv_sys_max_cmd_len=-1 ;; |
1907 | + esac |
1908 | + fi |
1909 | + ;; |
1910 | + sco3.2v5*) |
1911 | + lt_cv_sys_max_cmd_len=102400 |
1912 | + ;; |
1913 | + sysv5* | sco5v6* | sysv4.2uw2*) |
1914 | + kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` |
1915 | + if test -n "$kargmax"; then |
1916 | + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` |
1917 | + else |
1918 | + lt_cv_sys_max_cmd_len=32768 |
1919 | + fi |
1920 | + ;; |
1921 | + *) |
1922 | + lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` |
1923 | + if test -n "$lt_cv_sys_max_cmd_len"; then |
1924 | + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` |
1925 | + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` |
1926 | + else |
1927 | + # Make teststring a little bigger before we do anything with it. |
1928 | + # a 1K string should be a reasonable start. |
1929 | + for i in 1 2 3 4 5 6 7 8 ; do |
1930 | + teststring=$teststring$teststring |
1931 | + done |
1932 | + SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} |
1933 | + # If test is not a shell built-in, we'll probably end up computing a |
1934 | + # maximum length that is only half of the actual maximum length, but |
1935 | + # we can't tell. |
1936 | + while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ |
1937 | + = "XX$teststring$teststring"; } >/dev/null 2>&1 && |
1938 | + test $i != 17 # 1/2 MB should be enough |
1939 | + do |
1940 | + i=`expr $i + 1` |
1941 | + teststring=$teststring$teststring |
1942 | + done |
1943 | + # Only check the string length outside the loop. |
1944 | + lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` |
1945 | + teststring= |
1946 | + # Add a significant safety factor because C++ compilers can tack on |
1947 | + # massive amounts of additional arguments before passing them to the |
1948 | + # linker. It appears as though 1/2 is a usable value. |
1949 | + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` |
1950 | + fi |
1951 | + ;; |
1952 | + esac |
1953 | +]) |
1954 | +if test -n $lt_cv_sys_max_cmd_len ; then |
1955 | + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) |
1956 | +else |
1957 | + AC_MSG_RESULT(none) |
1958 | +fi |
1959 | +max_cmd_len=$lt_cv_sys_max_cmd_len |
1960 | +_LT_DECL([], [max_cmd_len], [0], |
1961 | + [What is the maximum length of a command?]) |
1962 | +])# LT_CMD_MAX_LEN |
1963 | + |
1964 | +# Old name: |
1965 | +AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) |
1966 | +dnl aclocal-1.4 backwards compatibility: |
1967 | +dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) |
1968 | + |
1969 | + |
1970 | +# _LT_HEADER_DLFCN |
1971 | +# ---------------- |
1972 | +m4_defun([_LT_HEADER_DLFCN], |
1973 | +[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl |
1974 | +])# _LT_HEADER_DLFCN |
1975 | + |
1976 | + |
1977 | +# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
1978 | +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
1979 | +# ---------------------------------------------------------------- |
1980 | +m4_defun([_LT_TRY_DLOPEN_SELF], |
1981 | +[m4_require([_LT_HEADER_DLFCN])dnl |
1982 | +if test "$cross_compiling" = yes; then : |
1983 | + [$4] |
1984 | +else |
1985 | + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
1986 | + lt_status=$lt_dlunknown |
1987 | + cat > conftest.$ac_ext <<_LT_EOF |
1988 | +[#line __oline__ "configure" |
1989 | +#include "confdefs.h" |
1990 | + |
1991 | +#if HAVE_DLFCN_H |
1992 | +#include <dlfcn.h> |
1993 | +#endif |
1994 | + |
1995 | +#include <stdio.h> |
1996 | + |
1997 | +#ifdef RTLD_GLOBAL |
1998 | +# define LT_DLGLOBAL RTLD_GLOBAL |
1999 | +#else |
2000 | +# ifdef DL_GLOBAL |
2001 | +# define LT_DLGLOBAL DL_GLOBAL |
2002 | +# else |
2003 | +# define LT_DLGLOBAL 0 |
2004 | +# endif |
2005 | +#endif |
2006 | + |
2007 | +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
2008 | + find out it does not work in some platform. */ |
2009 | +#ifndef LT_DLLAZY_OR_NOW |
2010 | +# ifdef RTLD_LAZY |
2011 | +# define LT_DLLAZY_OR_NOW RTLD_LAZY |
2012 | +# else |
2013 | +# ifdef DL_LAZY |
2014 | +# define LT_DLLAZY_OR_NOW DL_LAZY |
2015 | +# else |
2016 | +# ifdef RTLD_NOW |
2017 | +# define LT_DLLAZY_OR_NOW RTLD_NOW |
2018 | +# else |
2019 | +# ifdef DL_NOW |
2020 | +# define LT_DLLAZY_OR_NOW DL_NOW |
2021 | +# else |
2022 | +# define LT_DLLAZY_OR_NOW 0 |
2023 | +# endif |
2024 | +# endif |
2025 | +# endif |
2026 | +# endif |
2027 | +#endif |
2028 | + |
2029 | +void fnord() { int i=42;} |
2030 | +int main () |
2031 | +{ |
2032 | + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
2033 | + int status = $lt_dlunknown; |
2034 | + |
2035 | + if (self) |
2036 | + { |
2037 | + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
2038 | + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
2039 | + /* dlclose (self); */ |
2040 | + } |
2041 | + else |
2042 | + puts (dlerror ()); |
2043 | + |
2044 | + return status; |
2045 | +}] |
2046 | +_LT_EOF |
2047 | + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then |
2048 | + (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null |
2049 | + lt_status=$? |
2050 | + case x$lt_status in |
2051 | + x$lt_dlno_uscore) $1 ;; |
2052 | + x$lt_dlneed_uscore) $2 ;; |
2053 | + x$lt_dlunknown|x*) $3 ;; |
2054 | + esac |
2055 | + else : |
2056 | + # compilation failed |
2057 | + $3 |
2058 | + fi |
2059 | +fi |
2060 | +rm -fr conftest* |
2061 | +])# _LT_TRY_DLOPEN_SELF |
2062 | + |
2063 | + |
2064 | +# LT_SYS_DLOPEN_SELF |
2065 | +# ------------------ |
2066 | +AC_DEFUN([LT_SYS_DLOPEN_SELF], |
2067 | +[m4_require([_LT_HEADER_DLFCN])dnl |
2068 | +if test "x$enable_dlopen" != xyes; then |
2069 | + enable_dlopen=unknown |
2070 | + enable_dlopen_self=unknown |
2071 | + enable_dlopen_self_static=unknown |
2072 | +else |
2073 | + lt_cv_dlopen=no |
2074 | + lt_cv_dlopen_libs= |
2075 | + |
2076 | + case $host_os in |
2077 | + beos*) |
2078 | + lt_cv_dlopen="load_add_on" |
2079 | + lt_cv_dlopen_libs= |
2080 | + lt_cv_dlopen_self=yes |
2081 | + ;; |
2082 | + |
2083 | + mingw* | pw32* | cegcc*) |
2084 | + lt_cv_dlopen="LoadLibrary" |
2085 | + lt_cv_dlopen_libs= |
2086 | + ;; |
2087 | + |
2088 | + cygwin*) |
2089 | + lt_cv_dlopen="dlopen" |
2090 | + lt_cv_dlopen_libs= |
2091 | + ;; |
2092 | + |
2093 | + darwin*) |
2094 | + # if libdl is installed we need to link against it |
2095 | + AC_CHECK_LIB([dl], [dlopen], |
2096 | + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ |
2097 | + lt_cv_dlopen="dyld" |
2098 | + lt_cv_dlopen_libs= |
2099 | + lt_cv_dlopen_self=yes |
2100 | + ]) |
2101 | + ;; |
2102 | + |
2103 | + *) |
2104 | + AC_CHECK_FUNC([shl_load], |
2105 | + [lt_cv_dlopen="shl_load"], |
2106 | + [AC_CHECK_LIB([dld], [shl_load], |
2107 | + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], |
2108 | + [AC_CHECK_FUNC([dlopen], |
2109 | + [lt_cv_dlopen="dlopen"], |
2110 | + [AC_CHECK_LIB([dl], [dlopen], |
2111 | + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], |
2112 | + [AC_CHECK_LIB([svld], [dlopen], |
2113 | + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], |
2114 | + [AC_CHECK_LIB([dld], [dld_link], |
2115 | + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) |
2116 | + ]) |
2117 | + ]) |
2118 | + ]) |
2119 | + ]) |
2120 | + ]) |
2121 | + ;; |
2122 | + esac |
2123 | + |
2124 | + if test "x$lt_cv_dlopen" != xno; then |
2125 | + enable_dlopen=yes |
2126 | + else |
2127 | + enable_dlopen=no |
2128 | + fi |
2129 | + |
2130 | + case $lt_cv_dlopen in |
2131 | + dlopen) |
2132 | + save_CPPFLAGS="$CPPFLAGS" |
2133 | + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
2134 | + |
2135 | + save_LDFLAGS="$LDFLAGS" |
2136 | + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
2137 | + |
2138 | + save_LIBS="$LIBS" |
2139 | + LIBS="$lt_cv_dlopen_libs $LIBS" |
2140 | + |
2141 | + AC_CACHE_CHECK([whether a program can dlopen itself], |
2142 | + lt_cv_dlopen_self, [dnl |
2143 | + _LT_TRY_DLOPEN_SELF( |
2144 | + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
2145 | + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
2146 | + ]) |
2147 | + |
2148 | + if test "x$lt_cv_dlopen_self" = xyes; then |
2149 | + wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" |
2150 | + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
2151 | + lt_cv_dlopen_self_static, [dnl |
2152 | + _LT_TRY_DLOPEN_SELF( |
2153 | + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
2154 | + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
2155 | + ]) |
2156 | + fi |
2157 | + |
2158 | + CPPFLAGS="$save_CPPFLAGS" |
2159 | + LDFLAGS="$save_LDFLAGS" |
2160 | + LIBS="$save_LIBS" |
2161 | + ;; |
2162 | + esac |
2163 | + |
2164 | + case $lt_cv_dlopen_self in |
2165 | + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
2166 | + *) enable_dlopen_self=unknown ;; |
2167 | + esac |
2168 | + |
2169 | + case $lt_cv_dlopen_self_static in |
2170 | + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
2171 | + *) enable_dlopen_self_static=unknown ;; |
2172 | + esac |
2173 | +fi |
2174 | +_LT_DECL([dlopen_support], [enable_dlopen], [0], |
2175 | + [Whether dlopen is supported]) |
2176 | +_LT_DECL([dlopen_self], [enable_dlopen_self], [0], |
2177 | + [Whether dlopen of programs is supported]) |
2178 | +_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], |
2179 | + [Whether dlopen of statically linked programs is supported]) |
2180 | +])# LT_SYS_DLOPEN_SELF |
2181 | + |
2182 | +# Old name: |
2183 | +AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) |
2184 | +dnl aclocal-1.4 backwards compatibility: |
2185 | +dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) |
2186 | + |
2187 | + |
2188 | +# _LT_COMPILER_C_O([TAGNAME]) |
2189 | +# --------------------------- |
2190 | +# Check to see if options -c and -o are simultaneously supported by compiler. |
2191 | +# This macro does not hard code the compiler like AC_PROG_CC_C_O. |
2192 | +m4_defun([_LT_COMPILER_C_O], |
2193 | +[m4_require([_LT_DECL_SED])dnl |
2194 | +m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
2195 | +m4_require([_LT_TAG_COMPILER])dnl |
2196 | +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], |
2197 | + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], |
2198 | + [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no |
2199 | + $RM -r conftest 2>/dev/null |
2200 | + mkdir conftest |
2201 | + cd conftest |
2202 | + mkdir out |
2203 | + echo "$lt_simple_compile_test_code" > conftest.$ac_ext |
2204 | + |
2205 | + lt_compiler_flag="-o out/conftest2.$ac_objext" |
2206 | + # Insert the option either (1) after the last *FLAGS variable, or |
2207 | + # (2) before a word containing "conftest.", or (3) at the end. |
2208 | + # Note that $ac_compile itself does not contain backslashes and begins |
2209 | + # with a dollar sign (not a hyphen), so the echo should work correctly. |
2210 | + lt_compile=`echo "$ac_compile" | $SED \ |
2211 | + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
2212 | + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
2213 | + -e 's:$: $lt_compiler_flag:'` |
2214 | + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
2215 | + (eval "$lt_compile" 2>out/conftest.err) |
2216 | + ac_status=$? |
2217 | + cat out/conftest.err >&AS_MESSAGE_LOG_FD |
2218 | + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
2219 | + if (exit $ac_status) && test -s out/conftest2.$ac_objext |
2220 | + then |
2221 | + # The compiler can only warn and ignore the option if not recognized |
2222 | + # So say no if there are warnings |
2223 | + $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp |
2224 | + $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
2225 | + if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then |
2226 | + _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
2227 | + fi |
2228 | + fi |
2229 | + chmod u+w . 2>&AS_MESSAGE_LOG_FD |
2230 | + $RM conftest* |
2231 | + # SGI C++ compiler will create directory out/ii_files/ for |
2232 | + # template instantiation |
2233 | + test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files |
2234 | + $RM out/* && rmdir out |
2235 | + cd .. |
2236 | + $RM -r conftest |
2237 | + $RM conftest* |
2238 | +]) |
2239 | +_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], |
2240 | + [Does compiler simultaneously support -c and -o options?]) |
2241 | +])# _LT_COMPILER_C_O |
2242 | + |
2243 | + |
2244 | +# _LT_COMPILER_FILE_LOCKS([TAGNAME]) |
2245 | +# ---------------------------------- |
2246 | +# Check to see if we can do hard links to lock some files if needed |
2247 | +m4_defun([_LT_COMPILER_FILE_LOCKS], |
2248 | +[m4_require([_LT_ENABLE_LOCK])dnl |
2249 | +m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
2250 | +_LT_COMPILER_C_O([$1]) |
2251 | + |
2252 | +hard_links="nottested" |
2253 | +if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then |
2254 | + # do not overwrite the value of need_locks provided by the user |
2255 | + AC_MSG_CHECKING([if we can lock with hard links]) |
2256 | + hard_links=yes |
2257 | + $RM conftest* |
2258 | + ln conftest.a conftest.b 2>/dev/null && hard_links=no |
2259 | + touch conftest.a |
2260 | + ln conftest.a conftest.b 2>&5 || hard_links=no |
2261 | + ln conftest.a conftest.b 2>/dev/null && hard_links=no |
2262 | + AC_MSG_RESULT([$hard_links]) |
2263 | + if test "$hard_links" = no; then |
2264 | + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) |
2265 | + need_locks=warn |
2266 | + fi |
2267 | +else |
2268 | + need_locks=no |
2269 | +fi |
2270 | +_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) |
2271 | +])# _LT_COMPILER_FILE_LOCKS |
2272 | + |
2273 | + |
2274 | +# _LT_CHECK_OBJDIR |
2275 | +# ---------------- |
2276 | +m4_defun([_LT_CHECK_OBJDIR], |
2277 | +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], |
2278 | +[rm -f .libs 2>/dev/null |
2279 | +mkdir .libs 2>/dev/null |
2280 | +if test -d .libs; then |
2281 | + lt_cv_objdir=.libs |
2282 | +else |
2283 | + # MS-DOS does not allow filenames that begin with a dot. |
2284 | + lt_cv_objdir=_libs |
2285 | +fi |
2286 | +rmdir .libs 2>/dev/null]) |
2287 | +objdir=$lt_cv_objdir |
2288 | +_LT_DECL([], [objdir], [0], |
2289 | + [The name of the directory that contains temporary libtool files])dnl |
2290 | +m4_pattern_allow([LT_OBJDIR])dnl |
2291 | +AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", |
2292 | + [Define to the sub-directory in which libtool stores uninstalled libraries.]) |
2293 | +])# _LT_CHECK_OBJDIR |
2294 | + |
2295 | + |
2296 | +# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) |
2297 | +# -------------------------------------- |
2298 | +# Check hardcoding attributes. |
2299 | +m4_defun([_LT_LINKER_HARDCODE_LIBPATH], |
2300 | +[AC_MSG_CHECKING([how to hardcode library paths into programs]) |
2301 | +_LT_TAGVAR(hardcode_action, $1)= |
2302 | +if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || |
2303 | + test -n "$_LT_TAGVAR(runpath_var, $1)" || |
2304 | + test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then |
2305 | + |
2306 | + # We can hardcode non-existent directories. |
2307 | + if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && |
2308 | + # If the only mechanism to avoid hardcoding is shlibpath_var, we |
2309 | + # have to relink, otherwise we might link with an installed library |
2310 | + # when we should be linking with a yet-to-be-installed one |
2311 | + ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && |
2312 | + test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then |
2313 | + # Linking always hardcodes the temporary library directory. |
2314 | + _LT_TAGVAR(hardcode_action, $1)=relink |
2315 | + else |
2316 | + # We can link without hardcoding, and we can hardcode nonexisting dirs. |
2317 | + _LT_TAGVAR(hardcode_action, $1)=immediate |
2318 | + fi |
2319 | +else |
2320 | + # We cannot hardcode anything, or else we can only hardcode existing |
2321 | + # directories. |
2322 | + _LT_TAGVAR(hardcode_action, $1)=unsupported |
2323 | +fi |
2324 | +AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) |
2325 | + |
2326 | +if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || |
2327 | + test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then |
2328 | + # Fast installation is not supported |
2329 | + enable_fast_install=no |
2330 | +elif test "$shlibpath_overrides_runpath" = yes || |
2331 | + test "$enable_shared" = no; then |
2332 | + # Fast installation is not necessary |
2333 | + enable_fast_install=needless |
2334 | +fi |
2335 | +_LT_TAGDECL([], [hardcode_action], [0], |
2336 | + [How to hardcode a shared library path into an executable]) |
2337 | +])# _LT_LINKER_HARDCODE_LIBPATH |
2338 | + |
2339 | + |
2340 | +# _LT_CMD_STRIPLIB |
2341 | +# ---------------- |
2342 | +m4_defun([_LT_CMD_STRIPLIB], |
2343 | +[m4_require([_LT_DECL_EGREP]) |
2344 | +striplib= |
2345 | +old_striplib= |
2346 | +AC_MSG_CHECKING([whether stripping libraries is possible]) |
2347 | +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then |
2348 | + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" |
2349 | + test -z "$striplib" && striplib="$STRIP --strip-unneeded" |
2350 | + AC_MSG_RESULT([yes]) |
2351 | +else |
2352 | +# FIXME - insert some real tests, host_os isn't really good enough |
2353 | + case $host_os in |
2354 | + darwin*) |
2355 | + if test -n "$STRIP" ; then |
2356 | + striplib="$STRIP -x" |
2357 | + old_striplib="$STRIP -S" |
2358 | + AC_MSG_RESULT([yes]) |
2359 | + else |
2360 | + AC_MSG_RESULT([no]) |
2361 | + fi |
2362 | + ;; |
2363 | + *) |
2364 | + AC_MSG_RESULT([no]) |
2365 | + ;; |
2366 | + esac |
2367 | +fi |
2368 | +_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) |
2369 | +_LT_DECL([], [striplib], [1]) |
2370 | +])# _LT_CMD_STRIPLIB |
2371 | + |
2372 | + |
2373 | +# _LT_SYS_DYNAMIC_LINKER([TAG]) |
2374 | +# ----------------------------- |
2375 | +# PORTME Fill in your ld.so characteristics |
2376 | +m4_defun([_LT_SYS_DYNAMIC_LINKER], |
2377 | +[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
2378 | +m4_require([_LT_DECL_EGREP])dnl |
2379 | +m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
2380 | +m4_require([_LT_DECL_OBJDUMP])dnl |
2381 | +m4_require([_LT_DECL_SED])dnl |
2382 | +AC_MSG_CHECKING([dynamic linker characteristics]) |
2383 | +m4_if([$1], |
2384 | + [], [ |
2385 | +if test "$GCC" = yes; then |
2386 | + case $host_os in |
2387 | + darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; |
2388 | + *) lt_awk_arg="/^libraries:/" ;; |
2389 | + esac |
2390 | + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` |
2391 | + if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then |
2392 | + # if the path contains ";" then we assume it to be the separator |
2393 | + # otherwise default to the standard path separator (i.e. ":") - it is |
2394 | + # assumed that no part of a normal pathname contains ";" but that should |
2395 | + # okay in the real world where ";" in dirpaths is itself problematic. |
2396 | + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` |
2397 | + else |
2398 | + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` |
2399 | + fi |
2400 | + # Ok, now we have the path, separated by spaces, we can step through it |
2401 | + # and add multilib dir if necessary. |
2402 | + lt_tmp_lt_search_path_spec= |
2403 | + lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` |
2404 | + for lt_sys_path in $lt_search_path_spec; do |
2405 | + if test -d "$lt_sys_path/$lt_multi_os_dir"; then |
2406 | + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" |
2407 | + else |
2408 | + test -d "$lt_sys_path" && \ |
2409 | + lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" |
2410 | + fi |
2411 | + done |
2412 | + lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' |
2413 | +BEGIN {RS=" "; FS="/|\n";} { |
2414 | + lt_foo=""; |
2415 | + lt_count=0; |
2416 | + for (lt_i = NF; lt_i > 0; lt_i--) { |
2417 | + if ($lt_i != "" && $lt_i != ".") { |
2418 | + if ($lt_i == "..") { |
2419 | + lt_count++; |
2420 | + } else { |
2421 | + if (lt_count == 0) { |
2422 | + lt_foo="/" $lt_i lt_foo; |
2423 | + } else { |
2424 | + lt_count--; |
2425 | + } |
2426 | + } |
2427 | + } |
2428 | + } |
2429 | + if (lt_foo != "") { lt_freq[[lt_foo]]++; } |
2430 | + if (lt_freq[[lt_foo]] == 1) { print lt_foo; } |
2431 | +}'` |
2432 | + sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` |
2433 | +else |
2434 | + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
2435 | +fi]) |
2436 | +library_names_spec= |
2437 | +libname_spec='lib$name' |
2438 | +soname_spec= |
2439 | +shrext_cmds=".so" |
2440 | +postinstall_cmds= |
2441 | +postuninstall_cmds= |
2442 | +finish_cmds= |
2443 | +finish_eval= |
2444 | +shlibpath_var= |
2445 | +shlibpath_overrides_runpath=unknown |
2446 | +version_type=none |
2447 | +dynamic_linker="$host_os ld.so" |
2448 | +sys_lib_dlsearch_path_spec="/lib /usr/lib" |
2449 | +need_lib_prefix=unknown |
2450 | +hardcode_into_libs=no |
2451 | + |
2452 | +# when you set need_version to no, make sure it does not cause -set_version |
2453 | +# flags to be left without arguments |
2454 | +need_version=unknown |
2455 | + |
2456 | +case $host_os in |
2457 | +aix3*) |
2458 | + version_type=linux |
2459 | + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' |
2460 | + shlibpath_var=LIBPATH |
2461 | + |
2462 | + # AIX 3 has no versioning support, so we append a major version to the name. |
2463 | + soname_spec='${libname}${release}${shared_ext}$major' |
2464 | + ;; |
2465 | + |
2466 | +aix[[4-9]]*) |
2467 | + version_type=linux |
2468 | + need_lib_prefix=no |
2469 | + need_version=no |
2470 | + hardcode_into_libs=yes |
2471 | + if test "$host_cpu" = ia64; then |
2472 | + # AIX 5 supports IA64 |
2473 | + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' |
2474 | + shlibpath_var=LD_LIBRARY_PATH |
2475 | + else |
2476 | + # With GCC up to 2.95.x, collect2 would create an import file |
2477 | + # for dependence libraries. The import file would start with |
2478 | + # the line `#! .'. This would cause the generated library to |
2479 | + # depend on `.', always an invalid library. This was fixed in |
2480 | + # development snapshots of GCC prior to 3.0. |
2481 | + case $host_os in |
2482 | + aix4 | aix4.[[01]] | aix4.[[01]].*) |
2483 | + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
2484 | + echo ' yes ' |
2485 | + echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then |
2486 | + : |
2487 | + else |
2488 | + can_build_shared=no |
2489 | + fi |
2490 | + ;; |
2491 | + esac |
2492 | + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct |
2493 | + # soname into executable. Probably we can add versioning support to |
2494 | + # collect2, so additional links can be useful in future. |
2495 | + if test "$aix_use_runtimelinking" = yes; then |
2496 | + # If using run time linking (on AIX 4.2 or later) use lib<name>.so |
2497 | + # instead of lib<name>.a to let people know that these are not |
2498 | + # typical AIX shared libraries. |
2499 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2500 | + else |
2501 | + # We preserve .a as extension for shared libraries through AIX4.2 |
2502 | + # and later when we are not doing run time linking. |
2503 | + library_names_spec='${libname}${release}.a $libname.a' |
2504 | + soname_spec='${libname}${release}${shared_ext}$major' |
2505 | + fi |
2506 | + shlibpath_var=LIBPATH |
2507 | + fi |
2508 | + ;; |
2509 | + |
2510 | +amigaos*) |
2511 | + case $host_cpu in |
2512 | + powerpc) |
2513 | + # Since July 2007 AmigaOS4 officially supports .so libraries. |
2514 | + # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. |
2515 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2516 | + ;; |
2517 | + m68k) |
2518 | + library_names_spec='$libname.ixlibrary $libname.a' |
2519 | + # Create ${libname}_ixlibrary.a entries in /sys/libs. |
2520 | + 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' |
2521 | + ;; |
2522 | + esac |
2523 | + ;; |
2524 | + |
2525 | +beos*) |
2526 | + library_names_spec='${libname}${shared_ext}' |
2527 | + dynamic_linker="$host_os ld.so" |
2528 | + shlibpath_var=LIBRARY_PATH |
2529 | + ;; |
2530 | + |
2531 | +bsdi[[45]]*) |
2532 | + version_type=linux |
2533 | + need_version=no |
2534 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2535 | + soname_spec='${libname}${release}${shared_ext}$major' |
2536 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
2537 | + shlibpath_var=LD_LIBRARY_PATH |
2538 | + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
2539 | + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
2540 | + # the default ld.so.conf also contains /usr/contrib/lib and |
2541 | + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
2542 | + # libtool to hard-code these into programs |
2543 | + ;; |
2544 | + |
2545 | +cygwin* | mingw* | pw32* | cegcc*) |
2546 | + version_type=windows |
2547 | + shrext_cmds=".dll" |
2548 | + need_version=no |
2549 | + need_lib_prefix=no |
2550 | + |
2551 | + case $GCC,$host_os in |
2552 | + yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) |
2553 | + library_names_spec='$libname.dll.a' |
2554 | + # DLL is installed to $(libdir)/../bin by postinstall_cmds |
2555 | + postinstall_cmds='base_file=`basename \${file}`~ |
2556 | + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ |
2557 | + dldir=$destdir/`dirname \$dlpath`~ |
2558 | + test -d \$dldir || mkdir -p \$dldir~ |
2559 | + $install_prog $dir/$dlname \$dldir/$dlname~ |
2560 | + chmod a+x \$dldir/$dlname~ |
2561 | + if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then |
2562 | + eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; |
2563 | + fi' |
2564 | + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
2565 | + dlpath=$dir/\$dldll~ |
2566 | + $RM \$dlpath' |
2567 | + shlibpath_overrides_runpath=yes |
2568 | + |
2569 | + case $host_os in |
2570 | + cygwin*) |
2571 | + # Cygwin DLLs use 'cyg' prefix rather than 'lib' |
2572 | + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
2573 | + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" |
2574 | + ;; |
2575 | + mingw* | cegcc*) |
2576 | + # MinGW DLLs use traditional 'lib' prefix |
2577 | + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
2578 | + sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` |
2579 | + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then |
2580 | + # It is most probably a Windows format PATH printed by |
2581 | + # mingw gcc, but we are running on Cygwin. Gcc prints its search |
2582 | + # path with ; separators, and with drive letters. We can handle the |
2583 | + # drive letters (cygwin fileutils understands them), so leave them, |
2584 | + # especially as we might pass files found there to a mingw objdump, |
2585 | + # which wouldn't understand a cygwinified path. Ahh. |
2586 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` |
2587 | + else |
2588 | + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` |
2589 | + fi |
2590 | + ;; |
2591 | + pw32*) |
2592 | + # pw32 DLLs use 'pw' prefix rather than 'lib' |
2593 | + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' |
2594 | + ;; |
2595 | + esac |
2596 | + ;; |
2597 | + |
2598 | + *) |
2599 | + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' |
2600 | + ;; |
2601 | + esac |
2602 | + dynamic_linker='Win32 ld.exe' |
2603 | + # FIXME: first we should search . and the directory the executable is in |
2604 | + shlibpath_var=PATH |
2605 | + ;; |
2606 | + |
2607 | +darwin* | rhapsody*) |
2608 | + dynamic_linker="$host_os dyld" |
2609 | + version_type=darwin |
2610 | + need_lib_prefix=no |
2611 | + need_version=no |
2612 | + library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' |
2613 | + soname_spec='${libname}${release}${major}$shared_ext' |
2614 | + shlibpath_overrides_runpath=yes |
2615 | + shlibpath_var=DYLD_LIBRARY_PATH |
2616 | + shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' |
2617 | +m4_if([$1], [],[ |
2618 | + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) |
2619 | + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' |
2620 | + ;; |
2621 | + |
2622 | +dgux*) |
2623 | + version_type=linux |
2624 | + need_lib_prefix=no |
2625 | + need_version=no |
2626 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' |
2627 | + soname_spec='${libname}${release}${shared_ext}$major' |
2628 | + shlibpath_var=LD_LIBRARY_PATH |
2629 | + ;; |
2630 | + |
2631 | +freebsd1*) |
2632 | + dynamic_linker=no |
2633 | + ;; |
2634 | + |
2635 | +freebsd* | dragonfly*) |
2636 | + # DragonFly does not have aout. When/if they implement a new |
2637 | + # versioning mechanism, adjust this. |
2638 | + if test -x /usr/bin/objformat; then |
2639 | + objformat=`/usr/bin/objformat` |
2640 | + else |
2641 | + case $host_os in |
2642 | + freebsd[[123]]*) objformat=aout ;; |
2643 | + *) objformat=elf ;; |
2644 | + esac |
2645 | + fi |
2646 | + version_type=freebsd-$objformat |
2647 | + case $version_type in |
2648 | + freebsd-elf*) |
2649 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' |
2650 | + need_version=no |
2651 | + need_lib_prefix=no |
2652 | + ;; |
2653 | + freebsd-*) |
2654 | + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' |
2655 | + need_version=yes |
2656 | + ;; |
2657 | + esac |
2658 | + shlibpath_var=LD_LIBRARY_PATH |
2659 | + case $host_os in |
2660 | + freebsd2*) |
2661 | + shlibpath_overrides_runpath=yes |
2662 | + ;; |
2663 | + freebsd3.[[01]]* | freebsdelf3.[[01]]*) |
2664 | + shlibpath_overrides_runpath=yes |
2665 | + hardcode_into_libs=yes |
2666 | + ;; |
2667 | + freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ |
2668 | + freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) |
2669 | + shlibpath_overrides_runpath=no |
2670 | + hardcode_into_libs=yes |
2671 | + ;; |
2672 | + *) # from 4.6 on, and DragonFly |
2673 | + shlibpath_overrides_runpath=yes |
2674 | + hardcode_into_libs=yes |
2675 | + ;; |
2676 | + esac |
2677 | + ;; |
2678 | + |
2679 | +gnu*) |
2680 | + version_type=linux |
2681 | + need_lib_prefix=no |
2682 | + need_version=no |
2683 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' |
2684 | + soname_spec='${libname}${release}${shared_ext}$major' |
2685 | + shlibpath_var=LD_LIBRARY_PATH |
2686 | + hardcode_into_libs=yes |
2687 | + ;; |
2688 | + |
2689 | +hpux9* | hpux10* | hpux11*) |
2690 | + # Give a soname corresponding to the major version so that dld.sl refuses to |
2691 | + # link against other versions. |
2692 | + version_type=sunos |
2693 | + need_lib_prefix=no |
2694 | + need_version=no |
2695 | + case $host_cpu in |
2696 | + ia64*) |
2697 | + shrext_cmds='.so' |
2698 | + hardcode_into_libs=yes |
2699 | + dynamic_linker="$host_os dld.so" |
2700 | + shlibpath_var=LD_LIBRARY_PATH |
2701 | + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
2702 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2703 | + soname_spec='${libname}${release}${shared_ext}$major' |
2704 | + if test "X$HPUX_IA64_MODE" = X32; then |
2705 | + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" |
2706 | + else |
2707 | + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" |
2708 | + fi |
2709 | + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
2710 | + ;; |
2711 | + hppa*64*) |
2712 | + shrext_cmds='.sl' |
2713 | + hardcode_into_libs=yes |
2714 | + dynamic_linker="$host_os dld.sl" |
2715 | + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH |
2716 | + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
2717 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2718 | + soname_spec='${libname}${release}${shared_ext}$major' |
2719 | + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" |
2720 | + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
2721 | + ;; |
2722 | + *) |
2723 | + shrext_cmds='.sl' |
2724 | + dynamic_linker="$host_os dld.sl" |
2725 | + shlibpath_var=SHLIB_PATH |
2726 | + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
2727 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2728 | + soname_spec='${libname}${release}${shared_ext}$major' |
2729 | + ;; |
2730 | + esac |
2731 | + # HP-UX runs *really* slowly unless shared libraries are mode 555. |
2732 | + postinstall_cmds='chmod 555 $lib' |
2733 | + ;; |
2734 | + |
2735 | +interix[[3-9]]*) |
2736 | + version_type=linux |
2737 | + need_lib_prefix=no |
2738 | + need_version=no |
2739 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' |
2740 | + soname_spec='${libname}${release}${shared_ext}$major' |
2741 | + dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' |
2742 | + shlibpath_var=LD_LIBRARY_PATH |
2743 | + shlibpath_overrides_runpath=no |
2744 | + hardcode_into_libs=yes |
2745 | + ;; |
2746 | + |
2747 | +irix5* | irix6* | nonstopux*) |
2748 | + case $host_os in |
2749 | + nonstopux*) version_type=nonstopux ;; |
2750 | + *) |
2751 | + if test "$lt_cv_prog_gnu_ld" = yes; then |
2752 | + version_type=linux |
2753 | + else |
2754 | + version_type=irix |
2755 | + fi ;; |
2756 | + esac |
2757 | + need_lib_prefix=no |
2758 | + need_version=no |
2759 | + soname_spec='${libname}${release}${shared_ext}$major' |
2760 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' |
2761 | + case $host_os in |
2762 | + irix5* | nonstopux*) |
2763 | + libsuff= shlibsuff= |
2764 | + ;; |
2765 | + *) |
2766 | + case $LD in # libtool.m4 will add one of these switches to LD |
2767 | + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") |
2768 | + libsuff= shlibsuff= libmagic=32-bit;; |
2769 | + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") |
2770 | + libsuff=32 shlibsuff=N32 libmagic=N32;; |
2771 | + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") |
2772 | + libsuff=64 shlibsuff=64 libmagic=64-bit;; |
2773 | + *) libsuff= shlibsuff= libmagic=never-match;; |
2774 | + esac |
2775 | + ;; |
2776 | + esac |
2777 | + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
2778 | + shlibpath_overrides_runpath=no |
2779 | + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" |
2780 | + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" |
2781 | + hardcode_into_libs=yes |
2782 | + ;; |
2783 | + |
2784 | +# No shared lib support for Linux oldld, aout, or coff. |
2785 | +linux*oldld* | linux*aout* | linux*coff*) |
2786 | + dynamic_linker=no |
2787 | + ;; |
2788 | + |
2789 | +# This must be Linux ELF. |
2790 | +linux* | k*bsd*-gnu | kopensolaris*-gnu) |
2791 | + version_type=linux |
2792 | + need_lib_prefix=no |
2793 | + need_version=no |
2794 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2795 | + soname_spec='${libname}${release}${shared_ext}$major' |
2796 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
2797 | + shlibpath_var=LD_LIBRARY_PATH |
2798 | + shlibpath_overrides_runpath=no |
2799 | + # Some binutils ld are patched to set DT_RUNPATH |
2800 | + save_LDFLAGS=$LDFLAGS |
2801 | + save_libdir=$libdir |
2802 | + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ |
2803 | + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" |
2804 | + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], |
2805 | + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], |
2806 | + [shlibpath_overrides_runpath=yes])]) |
2807 | + LDFLAGS=$save_LDFLAGS |
2808 | + libdir=$save_libdir |
2809 | + |
2810 | + # This implies no fast_install, which is unacceptable. |
2811 | + # Some rework will be needed to allow for fast_install |
2812 | + # before this can be enabled. |
2813 | + hardcode_into_libs=yes |
2814 | + |
2815 | + # Append ld.so.conf contents to the search path |
2816 | + if test -f /etc/ld.so.conf; then |
2817 | + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` |
2818 | + sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" |
2819 | + fi |
2820 | + |
2821 | + # We used to test for /lib/ld.so.1 and disable shared libraries on |
2822 | + # powerpc, because MkLinux only supported shared libraries with the |
2823 | + # GNU dynamic linker. Since this was broken with cross compilers, |
2824 | + # most powerpc-linux boxes support dynamic linking these days and |
2825 | + # people can always --disable-shared, the test was removed, and we |
2826 | + # assume the GNU/Linux dynamic linker is in use. |
2827 | + dynamic_linker='GNU/Linux ld.so' |
2828 | + ;; |
2829 | + |
2830 | +netbsdelf*-gnu) |
2831 | + version_type=linux |
2832 | + need_lib_prefix=no |
2833 | + need_version=no |
2834 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' |
2835 | + soname_spec='${libname}${release}${shared_ext}$major' |
2836 | + shlibpath_var=LD_LIBRARY_PATH |
2837 | + shlibpath_overrides_runpath=no |
2838 | + hardcode_into_libs=yes |
2839 | + dynamic_linker='NetBSD ld.elf_so' |
2840 | + ;; |
2841 | + |
2842 | +netbsd*) |
2843 | + version_type=sunos |
2844 | + need_lib_prefix=no |
2845 | + need_version=no |
2846 | + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
2847 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
2848 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
2849 | + dynamic_linker='NetBSD (a.out) ld.so' |
2850 | + else |
2851 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' |
2852 | + soname_spec='${libname}${release}${shared_ext}$major' |
2853 | + dynamic_linker='NetBSD ld.elf_so' |
2854 | + fi |
2855 | + shlibpath_var=LD_LIBRARY_PATH |
2856 | + shlibpath_overrides_runpath=yes |
2857 | + hardcode_into_libs=yes |
2858 | + ;; |
2859 | + |
2860 | +newsos6) |
2861 | + version_type=linux |
2862 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2863 | + shlibpath_var=LD_LIBRARY_PATH |
2864 | + shlibpath_overrides_runpath=yes |
2865 | + ;; |
2866 | + |
2867 | +*nto* | *qnx*) |
2868 | + version_type=qnx |
2869 | + need_lib_prefix=no |
2870 | + need_version=no |
2871 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2872 | + soname_spec='${libname}${release}${shared_ext}$major' |
2873 | + shlibpath_var=LD_LIBRARY_PATH |
2874 | + shlibpath_overrides_runpath=no |
2875 | + hardcode_into_libs=yes |
2876 | + dynamic_linker='ldqnx.so' |
2877 | + ;; |
2878 | + |
2879 | +openbsd*) |
2880 | + version_type=sunos |
2881 | + sys_lib_dlsearch_path_spec="/usr/lib" |
2882 | + need_lib_prefix=no |
2883 | + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. |
2884 | + case $host_os in |
2885 | + openbsd3.3 | openbsd3.3.*) need_version=yes ;; |
2886 | + *) need_version=no ;; |
2887 | + esac |
2888 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
2889 | + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
2890 | + shlibpath_var=LD_LIBRARY_PATH |
2891 | + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
2892 | + case $host_os in |
2893 | + openbsd2.[[89]] | openbsd2.[[89]].*) |
2894 | + shlibpath_overrides_runpath=no |
2895 | + ;; |
2896 | + *) |
2897 | + shlibpath_overrides_runpath=yes |
2898 | + ;; |
2899 | + esac |
2900 | + else |
2901 | + shlibpath_overrides_runpath=yes |
2902 | + fi |
2903 | + ;; |
2904 | + |
2905 | +os2*) |
2906 | + libname_spec='$name' |
2907 | + shrext_cmds=".dll" |
2908 | + need_lib_prefix=no |
2909 | + library_names_spec='$libname${shared_ext} $libname.a' |
2910 | + dynamic_linker='OS/2 ld.exe' |
2911 | + shlibpath_var=LIBPATH |
2912 | + ;; |
2913 | + |
2914 | +osf3* | osf4* | osf5*) |
2915 | + version_type=osf |
2916 | + need_lib_prefix=no |
2917 | + need_version=no |
2918 | + soname_spec='${libname}${release}${shared_ext}$major' |
2919 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2920 | + shlibpath_var=LD_LIBRARY_PATH |
2921 | + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
2922 | + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" |
2923 | + ;; |
2924 | + |
2925 | +rdos*) |
2926 | + dynamic_linker=no |
2927 | + ;; |
2928 | + |
2929 | +solaris*) |
2930 | + version_type=linux |
2931 | + need_lib_prefix=no |
2932 | + need_version=no |
2933 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2934 | + soname_spec='${libname}${release}${shared_ext}$major' |
2935 | + shlibpath_var=LD_LIBRARY_PATH |
2936 | + shlibpath_overrides_runpath=yes |
2937 | + hardcode_into_libs=yes |
2938 | + # ldd complains unless libraries are executable |
2939 | + postinstall_cmds='chmod +x $lib' |
2940 | + ;; |
2941 | + |
2942 | +sunos4*) |
2943 | + version_type=sunos |
2944 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' |
2945 | + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
2946 | + shlibpath_var=LD_LIBRARY_PATH |
2947 | + shlibpath_overrides_runpath=yes |
2948 | + if test "$with_gnu_ld" = yes; then |
2949 | + need_lib_prefix=no |
2950 | + fi |
2951 | + need_version=yes |
2952 | + ;; |
2953 | + |
2954 | +sysv4 | sysv4.3*) |
2955 | + version_type=linux |
2956 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
2957 | + soname_spec='${libname}${release}${shared_ext}$major' |
2958 | + shlibpath_var=LD_LIBRARY_PATH |
2959 | + case $host_vendor in |
2960 | + sni) |
2961 | + shlibpath_overrides_runpath=no |
2962 | + need_lib_prefix=no |
2963 | + runpath_var=LD_RUN_PATH |
2964 | + ;; |
2965 | + siemens) |
2966 | + need_lib_prefix=no |
2967 | + ;; |
2968 | + motorola) |
2969 | + need_lib_prefix=no |
2970 | + need_version=no |
2971 | + shlibpath_overrides_runpath=no |
2972 | + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
2973 | + ;; |
2974 | + esac |
2975 | + ;; |
2976 | + |
2977 | +sysv4*MP*) |
2978 | + if test -d /usr/nec ;then |
2979 | + version_type=linux |
2980 | + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' |
2981 | + soname_spec='$libname${shared_ext}.$major' |
2982 | + shlibpath_var=LD_LIBRARY_PATH |
2983 | + fi |
2984 | + ;; |
2985 | + |
2986 | +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
2987 | + version_type=freebsd-elf |
2988 | + need_lib_prefix=no |
2989 | + need_version=no |
2990 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' |
2991 | + soname_spec='${libname}${release}${shared_ext}$major' |
2992 | + shlibpath_var=LD_LIBRARY_PATH |
2993 | + shlibpath_overrides_runpath=yes |
2994 | + hardcode_into_libs=yes |
2995 | + if test "$with_gnu_ld" = yes; then |
2996 | + sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' |
2997 | + else |
2998 | + sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' |
2999 | + case $host_os in |
3000 | + sco3.2v5*) |
3001 | + sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" |
3002 | + ;; |
3003 | + esac |
3004 | + fi |
3005 | + sys_lib_dlsearch_path_spec='/usr/lib' |
3006 | + ;; |
3007 | + |
3008 | +tpf*) |
3009 | + # TPF is a cross-target only. Preferred cross-host = GNU/Linux. |
3010 | + version_type=linux |
3011 | + need_lib_prefix=no |
3012 | + need_version=no |
3013 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
3014 | + shlibpath_var=LD_LIBRARY_PATH |
3015 | + shlibpath_overrides_runpath=no |
3016 | + hardcode_into_libs=yes |
3017 | + ;; |
3018 | + |
3019 | +uts4*) |
3020 | + version_type=linux |
3021 | + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' |
3022 | + soname_spec='${libname}${release}${shared_ext}$major' |
3023 | + shlibpath_var=LD_LIBRARY_PATH |
3024 | + ;; |
3025 | + |
3026 | +*) |
3027 | + dynamic_linker=no |
3028 | + ;; |
3029 | +esac |
3030 | +AC_MSG_RESULT([$dynamic_linker]) |
3031 | +test "$dynamic_linker" = no && can_build_shared=no |
3032 | + |
3033 | +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
3034 | +if test "$GCC" = yes; then |
3035 | + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
3036 | +fi |
3037 | + |
3038 | +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then |
3039 | + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" |
3040 | +fi |
3041 | +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then |
3042 | + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" |
3043 | +fi |
3044 | + |
3045 | +_LT_DECL([], [variables_saved_for_relink], [1], |
3046 | + [Variables whose values should be saved in libtool wrapper scripts and |
3047 | + restored at link time]) |
3048 | +_LT_DECL([], [need_lib_prefix], [0], |
3049 | + [Do we need the "lib" prefix for modules?]) |
3050 | +_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) |
3051 | +_LT_DECL([], [version_type], [0], [Library versioning type]) |
3052 | +_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) |
3053 | +_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) |
3054 | +_LT_DECL([], [shlibpath_overrides_runpath], [0], |
3055 | + [Is shlibpath searched before the hard-coded library search path?]) |
3056 | +_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) |
3057 | +_LT_DECL([], [library_names_spec], [1], |
3058 | + [[List of archive names. First name is the real one, the rest are links. |
3059 | + The last name is the one that the linker finds with -lNAME]]) |
3060 | +_LT_DECL([], [soname_spec], [1], |
3061 | + [[The coded name of the library, if different from the real name]]) |
3062 | +_LT_DECL([], [postinstall_cmds], [2], |
3063 | + [Command to use after installation of a shared archive]) |
3064 | +_LT_DECL([], [postuninstall_cmds], [2], |
3065 | + [Command to use after uninstallation of a shared archive]) |
3066 | +_LT_DECL([], [finish_cmds], [2], |
3067 | + [Commands used to finish a libtool library installation in a directory]) |
3068 | +_LT_DECL([], [finish_eval], [1], |
3069 | + [[As "finish_cmds", except a single script fragment to be evaled but |
3070 | + not shown]]) |
3071 | +_LT_DECL([], [hardcode_into_libs], [0], |
3072 | + [Whether we should hardcode library paths into libraries]) |
3073 | +_LT_DECL([], [sys_lib_search_path_spec], [2], |
3074 | + [Compile-time system search path for libraries]) |
3075 | +_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], |
3076 | + [Run-time system search path for libraries]) |
3077 | +])# _LT_SYS_DYNAMIC_LINKER |
3078 | + |
3079 | + |
3080 | +# _LT_PATH_TOOL_PREFIX(TOOL) |
3081 | +# -------------------------- |
3082 | +# find a file program which can recognize shared library |
3083 | +AC_DEFUN([_LT_PATH_TOOL_PREFIX], |
3084 | +[m4_require([_LT_DECL_EGREP])dnl |
3085 | +AC_MSG_CHECKING([for $1]) |
3086 | +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
3087 | +[case $MAGIC_CMD in |
3088 | +[[\\/*] | ?:[\\/]*]) |
3089 | + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. |
3090 | + ;; |
3091 | +*) |
3092 | + lt_save_MAGIC_CMD="$MAGIC_CMD" |
3093 | + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
3094 | +dnl $ac_dummy forces splitting on constant user-supplied paths. |
3095 | +dnl POSIX.2 word splitting is done only on the output of word expansions, |
3096 | +dnl not every word. This closes a longstanding sh security hole. |
3097 | + ac_dummy="m4_if([$2], , $PATH, [$2])" |
3098 | + for ac_dir in $ac_dummy; do |
3099 | + IFS="$lt_save_ifs" |
3100 | + test -z "$ac_dir" && ac_dir=. |
3101 | + if test -f $ac_dir/$1; then |
3102 | + lt_cv_path_MAGIC_CMD="$ac_dir/$1" |
3103 | + if test -n "$file_magic_test_file"; then |
3104 | + case $deplibs_check_method in |
3105 | + "file_magic "*) |
3106 | + file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` |
3107 | + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
3108 | + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
3109 | + $EGREP "$file_magic_regex" > /dev/null; then |
3110 | + : |
3111 | + else |
3112 | + cat <<_LT_EOF 1>&2 |
3113 | + |
3114 | +*** Warning: the command libtool uses to detect shared libraries, |
3115 | +*** $file_magic_cmd, produces output that libtool cannot recognize. |
3116 | +*** The result is that libtool may fail to recognize shared libraries |
3117 | +*** as such. This will affect the creation of libtool libraries that |
3118 | +*** depend on shared libraries, but programs linked with such libtool |
3119 | +*** libraries will work regardless of this problem. Nevertheless, you |
3120 | +*** may want to report the problem to your system manager and/or to |
3121 | +*** bug-libtool@gnu.org |
3122 | + |
3123 | +_LT_EOF |
3124 | + fi ;; |
3125 | + esac |
3126 | + fi |
3127 | + break |
3128 | + fi |
3129 | + done |
3130 | + IFS="$lt_save_ifs" |
3131 | + MAGIC_CMD="$lt_save_MAGIC_CMD" |
3132 | + ;; |
3133 | +esac]) |
3134 | +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" |
3135 | +if test -n "$MAGIC_CMD"; then |
3136 | + AC_MSG_RESULT($MAGIC_CMD) |
3137 | +else |
3138 | + AC_MSG_RESULT(no) |
3139 | +fi |
3140 | +_LT_DECL([], [MAGIC_CMD], [0], |
3141 | + [Used to examine libraries when file_magic_cmd begins with "file"])dnl |
3142 | +])# _LT_PATH_TOOL_PREFIX |
3143 | + |
3144 | +# Old name: |
3145 | +AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) |
3146 | +dnl aclocal-1.4 backwards compatibility: |
3147 | +dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) |
3148 | + |
3149 | + |
3150 | +# _LT_PATH_MAGIC |
3151 | +# -------------- |
3152 | +# find a file program which can recognize a shared library |
3153 | +m4_defun([_LT_PATH_MAGIC], |
3154 | +[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) |
3155 | +if test -z "$lt_cv_path_MAGIC_CMD"; then |
3156 | + if test -n "$ac_tool_prefix"; then |
3157 | + _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) |
3158 | + else |
3159 | + MAGIC_CMD=: |
3160 | + fi |
3161 | +fi |
3162 | +])# _LT_PATH_MAGIC |
3163 | + |
3164 | + |
3165 | +# LT_PATH_LD |
3166 | +# ---------- |
3167 | +# find the pathname to the GNU or non-GNU linker |
3168 | +AC_DEFUN([LT_PATH_LD], |
3169 | +[AC_REQUIRE([AC_PROG_CC])dnl |
3170 | +AC_REQUIRE([AC_CANONICAL_HOST])dnl |
3171 | +AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
3172 | +m4_require([_LT_DECL_SED])dnl |
3173 | +m4_require([_LT_DECL_EGREP])dnl |
3174 | + |
3175 | +AC_ARG_WITH([gnu-ld], |
3176 | + [AS_HELP_STRING([--with-gnu-ld], |
3177 | + [assume the C compiler uses GNU ld @<:@default=no@:>@])], |
3178 | + [test "$withval" = no || with_gnu_ld=yes], |
3179 | + [with_gnu_ld=no])dnl |
3180 | + |
3181 | +ac_prog=ld |
3182 | +if test "$GCC" = yes; then |
3183 | + # Check if gcc -print-prog-name=ld gives a path. |
3184 | + AC_MSG_CHECKING([for ld used by $CC]) |
3185 | + case $host in |
3186 | + *-*-mingw*) |
3187 | + # gcc leaves a trailing carriage return which upsets mingw |
3188 | + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
3189 | + *) |
3190 | + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
3191 | + esac |
3192 | + case $ac_prog in |
3193 | + # Accept absolute paths. |
3194 | + [[\\/]]* | ?:[[\\/]]*) |
3195 | + re_direlt='/[[^/]][[^/]]*/\.\./' |
3196 | + # Canonicalize the pathname of ld |
3197 | + ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` |
3198 | + while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do |
3199 | + ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` |
3200 | + done |
3201 | + test -z "$LD" && LD="$ac_prog" |
3202 | + ;; |
3203 | + "") |
3204 | + # If it fails, then pretend we aren't using GCC. |
3205 | + ac_prog=ld |
3206 | + ;; |
3207 | + *) |
3208 | + # If it is relative, then search for the first ld in PATH. |
3209 | + with_gnu_ld=unknown |
3210 | + ;; |
3211 | + esac |
3212 | +elif test "$with_gnu_ld" = yes; then |
3213 | + AC_MSG_CHECKING([for GNU ld]) |
3214 | +else |
3215 | + AC_MSG_CHECKING([for non-GNU ld]) |
3216 | +fi |
3217 | +AC_CACHE_VAL(lt_cv_path_LD, |
3218 | +[if test -z "$LD"; then |
3219 | + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
3220 | + for ac_dir in $PATH; do |
3221 | + IFS="$lt_save_ifs" |
3222 | + test -z "$ac_dir" && ac_dir=. |
3223 | + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
3224 | + lt_cv_path_LD="$ac_dir/$ac_prog" |
3225 | + # Check to see if the program is GNU ld. I'd rather use --version, |
3226 | + # but apparently some variants of GNU ld only accept -v. |
3227 | + # Break only if it was the GNU/non-GNU ld that we prefer. |
3228 | + case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in |
3229 | + *GNU* | *'with BFD'*) |
3230 | + test "$with_gnu_ld" != no && break |
3231 | + ;; |
3232 | + *) |
3233 | + test "$with_gnu_ld" != yes && break |
3234 | + ;; |
3235 | + esac |
3236 | + fi |
3237 | + done |
3238 | + IFS="$lt_save_ifs" |
3239 | +else |
3240 | + lt_cv_path_LD="$LD" # Let the user override the test with a path. |
3241 | +fi]) |
3242 | +LD="$lt_cv_path_LD" |
3243 | +if test -n "$LD"; then |
3244 | + AC_MSG_RESULT($LD) |
3245 | +else |
3246 | + AC_MSG_RESULT(no) |
3247 | +fi |
3248 | +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
3249 | +_LT_PATH_LD_GNU |
3250 | +AC_SUBST([LD]) |
3251 | + |
3252 | +_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) |
3253 | +])# LT_PATH_LD |
3254 | + |
3255 | +# Old names: |
3256 | +AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) |
3257 | +AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) |
3258 | +dnl aclocal-1.4 backwards compatibility: |
3259 | +dnl AC_DEFUN([AM_PROG_LD], []) |
3260 | +dnl AC_DEFUN([AC_PROG_LD], []) |
3261 | + |
3262 | + |
3263 | +# _LT_PATH_LD_GNU |
3264 | +#- -------------- |
3265 | +m4_defun([_LT_PATH_LD_GNU], |
3266 | +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
3267 | +[# I'd rather use --version here, but apparently some GNU lds only accept -v. |
3268 | +case `$LD -v 2>&1 </dev/null` in |
3269 | +*GNU* | *'with BFD'*) |
3270 | + lt_cv_prog_gnu_ld=yes |
3271 | + ;; |
3272 | +*) |
3273 | + lt_cv_prog_gnu_ld=no |
3274 | + ;; |
3275 | +esac]) |
3276 | +with_gnu_ld=$lt_cv_prog_gnu_ld |
3277 | +])# _LT_PATH_LD_GNU |
3278 | + |
3279 | + |
3280 | +# _LT_CMD_RELOAD |
3281 | +# -------------- |
3282 | +# find reload flag for linker |
3283 | +# -- PORTME Some linkers may need a different reload flag. |
3284 | +m4_defun([_LT_CMD_RELOAD], |
3285 | +[AC_CACHE_CHECK([for $LD option to reload object files], |
3286 | + lt_cv_ld_reload_flag, |
3287 | + [lt_cv_ld_reload_flag='-r']) |
3288 | +reload_flag=$lt_cv_ld_reload_flag |
3289 | +case $reload_flag in |
3290 | +"" | " "*) ;; |
3291 | +*) reload_flag=" $reload_flag" ;; |
3292 | +esac |
3293 | +reload_cmds='$LD$reload_flag -o $output$reload_objs' |
3294 | +case $host_os in |
3295 | + darwin*) |
3296 | + if test "$GCC" = yes; then |
3297 | + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' |
3298 | + else |
3299 | + reload_cmds='$LD$reload_flag -o $output$reload_objs' |
3300 | + fi |
3301 | + ;; |
3302 | +esac |
3303 | +_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl |
3304 | +_LT_DECL([], [reload_cmds], [2])dnl |
3305 | +])# _LT_CMD_RELOAD |
3306 | + |
3307 | + |
3308 | +# _LT_CHECK_MAGIC_METHOD |
3309 | +# ---------------------- |
3310 | +# how to check for library dependencies |
3311 | +# -- PORTME fill in with the dynamic library characteristics |
3312 | +m4_defun([_LT_CHECK_MAGIC_METHOD], |
3313 | +[m4_require([_LT_DECL_EGREP]) |
3314 | +m4_require([_LT_DECL_OBJDUMP]) |
3315 | +AC_CACHE_CHECK([how to recognize dependent libraries], |
3316 | +lt_cv_deplibs_check_method, |
3317 | +[lt_cv_file_magic_cmd='$MAGIC_CMD' |
3318 | +lt_cv_file_magic_test_file= |
3319 | +lt_cv_deplibs_check_method='unknown' |
3320 | +# Need to set the preceding variable on all platforms that support |
3321 | +# interlibrary dependencies. |
3322 | +# 'none' -- dependencies not supported. |
3323 | +# `unknown' -- same as none, but documents that we really don't know. |
3324 | +# 'pass_all' -- all dependencies passed with no checks. |
3325 | +# 'test_compile' -- check by making test program. |
3326 | +# 'file_magic [[regex]]' -- check by looking for files in library path |
3327 | +# which responds to the $file_magic_cmd with a given extended regex. |
3328 | +# If you have `file' or equivalent on your system and you're not sure |
3329 | +# whether `pass_all' will *always* work, you probably want this one. |
3330 | + |
3331 | +case $host_os in |
3332 | +aix[[4-9]]*) |
3333 | + lt_cv_deplibs_check_method=pass_all |
3334 | + ;; |
3335 | + |
3336 | +beos*) |
3337 | + lt_cv_deplibs_check_method=pass_all |
3338 | + ;; |
3339 | + |
3340 | +bsdi[[45]]*) |
3341 | + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
3342 | + lt_cv_file_magic_cmd='/usr/bin/file -L' |
3343 | + lt_cv_file_magic_test_file=/shlib/libc.so |
3344 | + ;; |
3345 | + |
3346 | +cygwin*) |
3347 | + # func_win32_libid is a shell function defined in ltmain.sh |
3348 | + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' |
3349 | + lt_cv_file_magic_cmd='func_win32_libid' |
3350 | + ;; |
3351 | + |
3352 | +mingw* | pw32*) |
3353 | + # Base MSYS/MinGW do not provide the 'file' command needed by |
3354 | + # func_win32_libid shell function, so use a weaker test based on 'objdump', |
3355 | + # unless we find 'file', for example because we are cross-compiling. |
3356 | + if ( file / ) >/dev/null 2>&1; then |
3357 | + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' |
3358 | + lt_cv_file_magic_cmd='func_win32_libid' |
3359 | + else |
3360 | + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' |
3361 | + lt_cv_file_magic_cmd='$OBJDUMP -f' |
3362 | + fi |
3363 | + ;; |
3364 | + |
3365 | +cegcc) |
3366 | + # use the weaker test based on 'objdump'. See mingw*. |
3367 | + lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' |
3368 | + lt_cv_file_magic_cmd='$OBJDUMP -f' |
3369 | + ;; |
3370 | + |
3371 | +darwin* | rhapsody*) |
3372 | + lt_cv_deplibs_check_method=pass_all |
3373 | + ;; |
3374 | + |
3375 | +freebsd* | dragonfly*) |
3376 | + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then |
3377 | + case $host_cpu in |
3378 | + i*86 ) |
3379 | + # Not sure whether the presence of OpenBSD here was a mistake. |
3380 | + # Let's accept both of them until this is cleared up. |
3381 | + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' |
3382 | + lt_cv_file_magic_cmd=/usr/bin/file |
3383 | + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
3384 | + ;; |
3385 | + esac |
3386 | + else |
3387 | + lt_cv_deplibs_check_method=pass_all |
3388 | + fi |
3389 | + ;; |
3390 | + |
3391 | +gnu*) |
3392 | + lt_cv_deplibs_check_method=pass_all |
3393 | + ;; |
3394 | + |
3395 | +hpux10.20* | hpux11*) |
3396 | + lt_cv_file_magic_cmd=/usr/bin/file |
3397 | + case $host_cpu in |
3398 | + ia64*) |
3399 | + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' |
3400 | + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so |
3401 | + ;; |
3402 | + hppa*64*) |
3403 | + [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]'] |
3404 | + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl |
3405 | + ;; |
3406 | + *) |
3407 | + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' |
3408 | + lt_cv_file_magic_test_file=/usr/lib/libc.sl |
3409 | + ;; |
3410 | + esac |
3411 | + ;; |
3412 | + |
3413 | +interix[[3-9]]*) |
3414 | + # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here |
3415 | + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' |
3416 | + ;; |
3417 | + |
3418 | +irix5* | irix6* | nonstopux*) |
3419 | + case $LD in |
3420 | + *-32|*"-32 ") libmagic=32-bit;; |
3421 | + *-n32|*"-n32 ") libmagic=N32;; |
3422 | + *-64|*"-64 ") libmagic=64-bit;; |
3423 | + *) libmagic=never-match;; |
3424 | + esac |
3425 | + lt_cv_deplibs_check_method=pass_all |
3426 | + ;; |
3427 | + |
3428 | +# This must be Linux ELF. |
3429 | +linux* | k*bsd*-gnu | kopensolaris*-gnu) |
3430 | + lt_cv_deplibs_check_method=pass_all |
3431 | + ;; |
3432 | + |
3433 | +netbsd* | netbsdelf*-gnu) |
3434 | + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then |
3435 | + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' |
3436 | + else |
3437 | + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' |
3438 | + fi |
3439 | + ;; |
3440 | + |
3441 | +newos6*) |
3442 | + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
3443 | + lt_cv_file_magic_cmd=/usr/bin/file |
3444 | + lt_cv_file_magic_test_file=/usr/lib/libnls.so |
3445 | + ;; |
3446 | + |
3447 | +*nto* | *qnx*) |
3448 | + lt_cv_deplibs_check_method=pass_all |
3449 | + ;; |
3450 | + |
3451 | +openbsd*) |
3452 | + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then |
3453 | + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' |
3454 | + else |
3455 | + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' |
3456 | + fi |
3457 | + ;; |
3458 | + |
3459 | +osf3* | osf4* | osf5*) |
3460 | + lt_cv_deplibs_check_method=pass_all |
3461 | + ;; |
3462 | + |
3463 | +rdos*) |
3464 | + lt_cv_deplibs_check_method=pass_all |
3465 | + ;; |
3466 | + |
3467 | +solaris*) |
3468 | + lt_cv_deplibs_check_method=pass_all |
3469 | + ;; |
3470 | + |
3471 | +sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
3472 | + lt_cv_deplibs_check_method=pass_all |
3473 | + ;; |
3474 | + |
3475 | +sysv4 | sysv4.3*) |
3476 | + case $host_vendor in |
3477 | + motorola) |
3478 | + 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]]' |
3479 | + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
3480 | + ;; |
3481 | + ncr) |
3482 | + lt_cv_deplibs_check_method=pass_all |
3483 | + ;; |
3484 | + sequent) |
3485 | + lt_cv_file_magic_cmd='/bin/file' |
3486 | + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
3487 | + ;; |
3488 | + sni) |
3489 | + lt_cv_file_magic_cmd='/bin/file' |
3490 | + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
3491 | + lt_cv_file_magic_test_file=/lib/libc.so |
3492 | + ;; |
3493 | + siemens) |
3494 | + lt_cv_deplibs_check_method=pass_all |
3495 | + ;; |
3496 | + pc) |
3497 | + lt_cv_deplibs_check_method=pass_all |
3498 | + ;; |
3499 | + esac |
3500 | + ;; |
3501 | + |
3502 | +tpf*) |
3503 | + lt_cv_deplibs_check_method=pass_all |
3504 | + ;; |
3505 | +esac |
3506 | +]) |
3507 | +file_magic_cmd=$lt_cv_file_magic_cmd |
3508 | +deplibs_check_method=$lt_cv_deplibs_check_method |
3509 | +test -z "$deplibs_check_method" && deplibs_check_method=unknown |
3510 | + |
3511 | +_LT_DECL([], [deplibs_check_method], [1], |
3512 | + [Method to check whether dependent libraries are shared objects]) |
3513 | +_LT_DECL([], [file_magic_cmd], [1], |
3514 | + [Command to use when deplibs_check_method == "file_magic"]) |
3515 | +])# _LT_CHECK_MAGIC_METHOD |
3516 | + |
3517 | + |
3518 | +# LT_PATH_NM |
3519 | +# ---------- |
3520 | +# find the pathname to a BSD- or MS-compatible name lister |
3521 | +AC_DEFUN([LT_PATH_NM], |
3522 | +[AC_REQUIRE([AC_PROG_CC])dnl |
3523 | +AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, |
3524 | +[if test -n "$NM"; then |
3525 | + # Let the user override the test. |
3526 | + lt_cv_path_NM="$NM" |
3527 | +else |
3528 | + lt_nm_to_check="${ac_tool_prefix}nm" |
3529 | + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then |
3530 | + lt_nm_to_check="$lt_nm_to_check nm" |
3531 | + fi |
3532 | + for lt_tmp_nm in $lt_nm_to_check; do |
3533 | + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR |
3534 | + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do |
3535 | + IFS="$lt_save_ifs" |
3536 | + test -z "$ac_dir" && ac_dir=. |
3537 | + tmp_nm="$ac_dir/$lt_tmp_nm" |
3538 | + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then |
3539 | + # Check to see if the nm accepts a BSD-compat flag. |
3540 | + # Adding the `sed 1q' prevents false positives on HP-UX, which says: |
3541 | + # nm: unknown option "B" ignored |
3542 | + # Tru64's nm complains that /dev/null is an invalid object file |
3543 | + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in |
3544 | + */dev/null* | *'Invalid file or object type'*) |
3545 | + lt_cv_path_NM="$tmp_nm -B" |
3546 | + break |
3547 | + ;; |
3548 | + *) |
3549 | + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in |
3550 | + */dev/null*) |
3551 | + lt_cv_path_NM="$tmp_nm -p" |
3552 | + break |
3553 | + ;; |
3554 | + *) |
3555 | + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
3556 | + continue # so that we can try to find one that supports BSD flags |
3557 | + ;; |
3558 | + esac |
3559 | + ;; |
3560 | + esac |
3561 | + fi |
3562 | + done |
3563 | + IFS="$lt_save_ifs" |
3564 | + done |
3565 | + : ${lt_cv_path_NM=no} |
3566 | +fi]) |
3567 | +if test "$lt_cv_path_NM" != "no"; then |
3568 | + NM="$lt_cv_path_NM" |
3569 | +else |
3570 | + # Didn't find any BSD compatible name lister, look for dumpbin. |
3571 | + AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) |
3572 | + AC_SUBST([DUMPBIN]) |
3573 | + if test "$DUMPBIN" != ":"; then |
3574 | + NM="$DUMPBIN" |
3575 | + fi |
3576 | +fi |
3577 | +test -z "$NM" && NM=nm |
3578 | +AC_SUBST([NM]) |
3579 | +_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl |
3580 | + |
3581 | +AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], |
3582 | + [lt_cv_nm_interface="BSD nm" |
3583 | + echo "int some_variable = 0;" > conftest.$ac_ext |
3584 | + (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) |
3585 | + (eval "$ac_compile" 2>conftest.err) |
3586 | + cat conftest.err >&AS_MESSAGE_LOG_FD |
3587 | + (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) |
3588 | + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) |
3589 | + cat conftest.err >&AS_MESSAGE_LOG_FD |
3590 | + (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) |
3591 | + cat conftest.out >&AS_MESSAGE_LOG_FD |
3592 | + if $GREP 'External.*some_variable' conftest.out > /dev/null; then |
3593 | + lt_cv_nm_interface="MS dumpbin" |
3594 | + fi |
3595 | + rm -f conftest*]) |
3596 | +])# LT_PATH_NM |
3597 | + |
3598 | +# Old names: |
3599 | +AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) |
3600 | +AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) |
3601 | +dnl aclocal-1.4 backwards compatibility: |
3602 | +dnl AC_DEFUN([AM_PROG_NM], []) |
3603 | +dnl AC_DEFUN([AC_PROG_NM], []) |
3604 | + |
3605 | + |
3606 | +# LT_LIB_M |
3607 | +# -------- |
3608 | +# check for math library |
3609 | +AC_DEFUN([LT_LIB_M], |
3610 | +[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
3611 | +LIBM= |
3612 | +case $host in |
3613 | +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) |
3614 | + # These system don't have libm, or don't need it |
3615 | + ;; |
3616 | +*-ncr-sysv4.3*) |
3617 | + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") |
3618 | + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") |
3619 | + ;; |
3620 | +*) |
3621 | + AC_CHECK_LIB(m, cos, LIBM="-lm") |
3622 | + ;; |
3623 | +esac |
3624 | +AC_SUBST([LIBM]) |
3625 | +])# LT_LIB_M |
3626 | + |
3627 | +# Old name: |
3628 | +AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) |
3629 | +dnl aclocal-1.4 backwards compatibility: |
3630 | +dnl AC_DEFUN([AC_CHECK_LIBM], []) |
3631 | + |
3632 | + |
3633 | +# _LT_COMPILER_NO_RTTI([TAGNAME]) |
3634 | +# ------------------------------- |
3635 | +m4_defun([_LT_COMPILER_NO_RTTI], |
3636 | +[m4_require([_LT_TAG_COMPILER])dnl |
3637 | + |
3638 | +_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
3639 | + |
3640 | +if test "$GCC" = yes; then |
3641 | + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
3642 | + |
3643 | + _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], |
3644 | + lt_cv_prog_compiler_rtti_exceptions, |
3645 | + [-fno-rtti -fno-exceptions], [], |
3646 | + [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) |
3647 | +fi |
3648 | +_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], |
3649 | + [Compiler flag to turn off builtin functions]) |
3650 | +])# _LT_COMPILER_NO_RTTI |
3651 | + |
3652 | + |
3653 | +# _LT_CMD_GLOBAL_SYMBOLS |
3654 | +# ---------------------- |
3655 | +m4_defun([_LT_CMD_GLOBAL_SYMBOLS], |
3656 | +[AC_REQUIRE([AC_CANONICAL_HOST])dnl |
3657 | +AC_REQUIRE([AC_PROG_CC])dnl |
3658 | +AC_REQUIRE([LT_PATH_NM])dnl |
3659 | +AC_REQUIRE([LT_PATH_LD])dnl |
3660 | +m4_require([_LT_DECL_SED])dnl |
3661 | +m4_require([_LT_DECL_EGREP])dnl |
3662 | +m4_require([_LT_TAG_COMPILER])dnl |
3663 | + |
3664 | +# Check for command to grab the raw symbol name followed by C symbol from nm. |
3665 | +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) |
3666 | +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], |
3667 | +[ |
3668 | +# These are sane defaults that work on at least a few old systems. |
3669 | +# [They come from Ultrix. What could be older than Ultrix?!! ;)] |
3670 | + |
3671 | +# Character class describing NM global symbol codes. |
3672 | +symcode='[[BCDEGRST]]' |
3673 | + |
3674 | +# Regexp to match symbols that can be accessed directly from C. |
3675 | +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
3676 | + |
3677 | +# Define system-specific variables. |
3678 | +case $host_os in |
3679 | +aix*) |
3680 | + symcode='[[BCDT]]' |
3681 | + ;; |
3682 | +cygwin* | mingw* | pw32* | cegcc*) |
3683 | + symcode='[[ABCDGISTW]]' |
3684 | + ;; |
3685 | +hpux*) |
3686 | + if test "$host_cpu" = ia64; then |
3687 | + symcode='[[ABCDEGRST]]' |
3688 | + fi |
3689 | + ;; |
3690 | +irix* | nonstopux*) |
3691 | + symcode='[[BCDEGRST]]' |
3692 | + ;; |
3693 | +osf*) |
3694 | + symcode='[[BCDEGQRST]]' |
3695 | + ;; |
3696 | +solaris*) |
3697 | + symcode='[[BDRT]]' |
3698 | + ;; |
3699 | +sco3.2v5*) |
3700 | + symcode='[[DT]]' |
3701 | + ;; |
3702 | +sysv4.2uw2*) |
3703 | + symcode='[[DT]]' |
3704 | + ;; |
3705 | +sysv5* | sco5v6* | unixware* | OpenUNIX*) |
3706 | + symcode='[[ABDT]]' |
3707 | + ;; |
3708 | +sysv4) |
3709 | + symcode='[[DFNSTU]]' |
3710 | + ;; |
3711 | +esac |
3712 | + |
3713 | +# If we're using GNU nm, then use its standard symbol codes. |
3714 | +case `$NM -V 2>&1` in |
3715 | +*GNU* | *'with BFD'*) |
3716 | + symcode='[[ABCDGIRSTW]]' ;; |
3717 | +esac |
3718 | + |
3719 | +# Transform an extracted symbol line into a proper C declaration. |
3720 | +# Some systems (esp. on ia64) link data and code symbols differently, |
3721 | +# so use this general approach. |
3722 | +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" |
3723 | + |
3724 | +# Transform an extracted symbol line into symbol name and symbol address |
3725 | +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" |
3726 | +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" |
3727 | + |
3728 | +# Handle CRLF in mingw tool chain |
3729 | +opt_cr= |
3730 | +case $build_os in |
3731 | +mingw*) |
3732 | + opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
3733 | + ;; |
3734 | +esac |
3735 | + |
3736 | +# Try without a prefix underscore, then with it. |
3737 | +for ac_symprfx in "" "_"; do |
3738 | + |
3739 | + # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. |
3740 | + symxfrm="\\1 $ac_symprfx\\2 \\2" |
3741 | + |
3742 | + # Write the raw and C identifiers. |
3743 | + if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
3744 | + # Fake it for dumpbin and say T for any non-static function |
3745 | + # and D for any global variable. |
3746 | + # Also find C++ and __fastcall symbols from MSVC++, |
3747 | + # which start with @ or ?. |
3748 | + lt_cv_sys_global_symbol_pipe="$AWK ['"\ |
3749 | +" {last_section=section; section=\$ 3};"\ |
3750 | +" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ |
3751 | +" \$ 0!~/External *\|/{next};"\ |
3752 | +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ |
3753 | +" {if(hide[section]) next};"\ |
3754 | +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ |
3755 | +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ |
3756 | +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ |
3757 | +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ |
3758 | +" ' prfx=^$ac_symprfx]" |
3759 | + else |
3760 | + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" |
3761 | + fi |
3762 | + |
3763 | + # Check to see that the pipe works correctly. |
3764 | + pipe_works=no |
3765 | + |
3766 | + rm -f conftest* |
3767 | + cat > conftest.$ac_ext <<_LT_EOF |
3768 | +#ifdef __cplusplus |
3769 | +extern "C" { |
3770 | +#endif |
3771 | +char nm_test_var; |
3772 | +void nm_test_func(void); |
3773 | +void nm_test_func(void){} |
3774 | +#ifdef __cplusplus |
3775 | +} |
3776 | +#endif |
3777 | +int main(){nm_test_var='a';nm_test_func();return(0);} |
3778 | +_LT_EOF |
3779 | + |
3780 | + if AC_TRY_EVAL(ac_compile); then |
3781 | + # Now try to grab the symbols. |
3782 | + nlist=conftest.nm |
3783 | + if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then |
3784 | + # Try sorting and uniquifying the output. |
3785 | + if sort "$nlist" | uniq > "$nlist"T; then |
3786 | + mv -f "$nlist"T "$nlist" |
3787 | + else |
3788 | + rm -f "$nlist"T |
3789 | + fi |
3790 | + |
3791 | + # Make sure that we snagged all the symbols we need. |
3792 | + if $GREP ' nm_test_var$' "$nlist" >/dev/null; then |
3793 | + if $GREP ' nm_test_func$' "$nlist" >/dev/null; then |
3794 | + cat <<_LT_EOF > conftest.$ac_ext |
3795 | +#ifdef __cplusplus |
3796 | +extern "C" { |
3797 | +#endif |
3798 | + |
3799 | +_LT_EOF |
3800 | + # Now generate the symbol file. |
3801 | + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' |
3802 | + |
3803 | + cat <<_LT_EOF >> conftest.$ac_ext |
3804 | + |
3805 | +/* The mapping between symbol names and symbols. */ |
3806 | +const struct { |
3807 | + const char *name; |
3808 | + void *address; |
3809 | +} |
3810 | +lt__PROGRAM__LTX_preloaded_symbols[[]] = |
3811 | +{ |
3812 | + { "@PROGRAM@", (void *) 0 }, |
3813 | +_LT_EOF |
3814 | + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext |
3815 | + cat <<\_LT_EOF >> conftest.$ac_ext |
3816 | + {0, (void *) 0} |
3817 | +}; |
3818 | + |
3819 | +/* This works around a problem in FreeBSD linker */ |
3820 | +#ifdef FREEBSD_WORKAROUND |
3821 | +static const void *lt_preloaded_setup() { |
3822 | + return lt__PROGRAM__LTX_preloaded_symbols; |
3823 | +} |
3824 | +#endif |
3825 | + |
3826 | +#ifdef __cplusplus |
3827 | +} |
3828 | +#endif |
3829 | +_LT_EOF |
3830 | + # Now try linking the two files. |
3831 | + mv conftest.$ac_objext conftstm.$ac_objext |
3832 | + lt_save_LIBS="$LIBS" |
3833 | + lt_save_CFLAGS="$CFLAGS" |
3834 | + LIBS="conftstm.$ac_objext" |
3835 | + CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" |
3836 | + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then |
3837 | + pipe_works=yes |
3838 | + fi |
3839 | + LIBS="$lt_save_LIBS" |
3840 | + CFLAGS="$lt_save_CFLAGS" |
3841 | + else |
3842 | + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD |
3843 | + fi |
3844 | + else |
3845 | + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD |
3846 | + fi |
3847 | + else |
3848 | + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD |
3849 | + fi |
3850 | + else |
3851 | + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD |
3852 | + cat conftest.$ac_ext >&5 |
3853 | + fi |
3854 | + rm -rf conftest* conftst* |
3855 | + |
3856 | + # Do not use the global_symbol_pipe unless it works. |
3857 | + if test "$pipe_works" = yes; then |
3858 | + break |
3859 | + else |
3860 | + lt_cv_sys_global_symbol_pipe= |
3861 | + fi |
3862 | +done |
3863 | +]) |
3864 | +if test -z "$lt_cv_sys_global_symbol_pipe"; then |
3865 | + lt_cv_sys_global_symbol_to_cdecl= |
3866 | +fi |
3867 | +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then |
3868 | + AC_MSG_RESULT(failed) |
3869 | +else |
3870 | + AC_MSG_RESULT(ok) |
3871 | +fi |
3872 | + |
3873 | +_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], |
3874 | + [Take the output of nm and produce a listing of raw symbols and C names]) |
3875 | +_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], |
3876 | + [Transform the output of nm in a proper C declaration]) |
3877 | +_LT_DECL([global_symbol_to_c_name_address], |
3878 | + [lt_cv_sys_global_symbol_to_c_name_address], [1], |
3879 | + [Transform the output of nm in a C name address pair]) |
3880 | +_LT_DECL([global_symbol_to_c_name_address_lib_prefix], |
3881 | + [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], |
3882 | + [Transform the output of nm in a C name address pair when lib prefix is needed]) |
3883 | +]) # _LT_CMD_GLOBAL_SYMBOLS |
3884 | + |
3885 | + |
3886 | +# _LT_COMPILER_PIC([TAGNAME]) |
3887 | +# --------------------------- |
3888 | +m4_defun([_LT_COMPILER_PIC], |
3889 | +[m4_require([_LT_TAG_COMPILER])dnl |
3890 | +_LT_TAGVAR(lt_prog_compiler_wl, $1)= |
3891 | +_LT_TAGVAR(lt_prog_compiler_pic, $1)= |
3892 | +_LT_TAGVAR(lt_prog_compiler_static, $1)= |
3893 | + |
3894 | +AC_MSG_CHECKING([for $compiler option to produce PIC]) |
3895 | +m4_if([$1], [CXX], [ |
3896 | + # C++ specific cases for pic, static, wl, etc. |
3897 | + if test "$GXX" = yes; then |
3898 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
3899 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
3900 | + |
3901 | + case $host_os in |
3902 | + aix*) |
3903 | + # All AIX code is PIC. |
3904 | + if test "$host_cpu" = ia64; then |
3905 | + # AIX 5 now supports IA64 processor |
3906 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
3907 | + fi |
3908 | + ;; |
3909 | + |
3910 | + amigaos*) |
3911 | + case $host_cpu in |
3912 | + powerpc) |
3913 | + # see comment about AmigaOS4 .so support |
3914 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
3915 | + ;; |
3916 | + m68k) |
3917 | + # FIXME: we need at least 68020 code to build shared libraries, but |
3918 | + # adding the `-m68020' flag to GCC prevents building anything better, |
3919 | + # like `-m68040'. |
3920 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
3921 | + ;; |
3922 | + esac |
3923 | + ;; |
3924 | + |
3925 | + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
3926 | + # PIC is the default for these OSes. |
3927 | + ;; |
3928 | + mingw* | cygwin* | os2* | pw32* | cegcc*) |
3929 | + # This hack is so that the source file can tell whether it is being |
3930 | + # built for inclusion in a dll (and should export symbols for example). |
3931 | + # Although the cygwin gcc ignores -fPIC, still need this for old-style |
3932 | + # (--disable-auto-import) libraries |
3933 | + m4_if([$1], [GCJ], [], |
3934 | + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) |
3935 | + ;; |
3936 | + darwin* | rhapsody*) |
3937 | + # PIC is the default on this platform |
3938 | + # Common symbols not allowed in MH_DYLIB files |
3939 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
3940 | + ;; |
3941 | + *djgpp*) |
3942 | + # DJGPP does not support shared libraries at all |
3943 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)= |
3944 | + ;; |
3945 | + interix[[3-9]]*) |
3946 | + # Interix 3.x gcc -fpic/-fPIC options generate broken code. |
3947 | + # Instead, we relocate shared libraries at runtime. |
3948 | + ;; |
3949 | + sysv4*MP*) |
3950 | + if test -d /usr/nec; then |
3951 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
3952 | + fi |
3953 | + ;; |
3954 | + hpux*) |
3955 | + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit |
3956 | + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag |
3957 | + # sets the default TLS model and affects inlining. |
3958 | + case $host_cpu in |
3959 | + hppa*64*) |
3960 | + ;; |
3961 | + *) |
3962 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
3963 | + ;; |
3964 | + esac |
3965 | + ;; |
3966 | + *qnx* | *nto*) |
3967 | + # QNX uses GNU C++, but need to define -shared option too, otherwise |
3968 | + # it will coredump. |
3969 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' |
3970 | + ;; |
3971 | + *) |
3972 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
3973 | + ;; |
3974 | + esac |
3975 | + else |
3976 | + case $host_os in |
3977 | + aix[[4-9]]*) |
3978 | + # All AIX code is PIC. |
3979 | + if test "$host_cpu" = ia64; then |
3980 | + # AIX 5 now supports IA64 processor |
3981 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
3982 | + else |
3983 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
3984 | + fi |
3985 | + ;; |
3986 | + chorus*) |
3987 | + case $cc_basename in |
3988 | + cxch68*) |
3989 | + # Green Hills C++ Compiler |
3990 | + # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" |
3991 | + ;; |
3992 | + esac |
3993 | + ;; |
3994 | + dgux*) |
3995 | + case $cc_basename in |
3996 | + ec++*) |
3997 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
3998 | + ;; |
3999 | + ghcx*) |
4000 | + # Green Hills C++ Compiler |
4001 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
4002 | + ;; |
4003 | + *) |
4004 | + ;; |
4005 | + esac |
4006 | + ;; |
4007 | + freebsd* | dragonfly*) |
4008 | + # FreeBSD uses GNU C++ |
4009 | + ;; |
4010 | + hpux9* | hpux10* | hpux11*) |
4011 | + case $cc_basename in |
4012 | + CC*) |
4013 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4014 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
4015 | + if test "$host_cpu" != ia64; then |
4016 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
4017 | + fi |
4018 | + ;; |
4019 | + aCC*) |
4020 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4021 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
4022 | + case $host_cpu in |
4023 | + hppa*64*|ia64*) |
4024 | + # +Z the default |
4025 | + ;; |
4026 | + *) |
4027 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
4028 | + ;; |
4029 | + esac |
4030 | + ;; |
4031 | + *) |
4032 | + ;; |
4033 | + esac |
4034 | + ;; |
4035 | + interix*) |
4036 | + # This is c89, which is MS Visual C++ (no shared libs) |
4037 | + # Anyone wants to do a port? |
4038 | + ;; |
4039 | + irix5* | irix6* | nonstopux*) |
4040 | + case $cc_basename in |
4041 | + CC*) |
4042 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4043 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
4044 | + # CC pic flag -KPIC is the default. |
4045 | + ;; |
4046 | + *) |
4047 | + ;; |
4048 | + esac |
4049 | + ;; |
4050 | + linux* | k*bsd*-gnu | kopensolaris*-gnu) |
4051 | + case $cc_basename in |
4052 | + KCC*) |
4053 | + # KAI C++ Compiler |
4054 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
4055 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
4056 | + ;; |
4057 | + ecpc* ) |
4058 | + # old Intel C++ for x86_64 which still supported -KPIC. |
4059 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4060 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4061 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
4062 | + ;; |
4063 | + icpc* ) |
4064 | + # Intel C++, used to be incompatible with GCC. |
4065 | + # ICC 10 doesn't accept -KPIC any more. |
4066 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4067 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
4068 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
4069 | + ;; |
4070 | + pgCC* | pgcpp*) |
4071 | + # Portland Group C++ compiler |
4072 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4073 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' |
4074 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4075 | + ;; |
4076 | + cxx*) |
4077 | + # Compaq C++ |
4078 | + # Make sure the PIC flag is empty. It appears that all Alpha |
4079 | + # Linux and Compaq Tru64 Unix objects are PIC. |
4080 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)= |
4081 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
4082 | + ;; |
4083 | + xlc* | xlC*) |
4084 | + # IBM XL 8.0 on PPC |
4085 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4086 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' |
4087 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' |
4088 | + ;; |
4089 | + *) |
4090 | + case `$CC -V 2>&1 | sed 5q` in |
4091 | + *Sun\ C*) |
4092 | + # Sun C++ 5.9 |
4093 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4094 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4095 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
4096 | + ;; |
4097 | + esac |
4098 | + ;; |
4099 | + esac |
4100 | + ;; |
4101 | + lynxos*) |
4102 | + ;; |
4103 | + m88k*) |
4104 | + ;; |
4105 | + mvs*) |
4106 | + case $cc_basename in |
4107 | + cxx*) |
4108 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' |
4109 | + ;; |
4110 | + *) |
4111 | + ;; |
4112 | + esac |
4113 | + ;; |
4114 | + netbsd* | netbsdelf*-gnu) |
4115 | + ;; |
4116 | + *qnx* | *nto*) |
4117 | + # QNX uses GNU C++, but need to define -shared option too, otherwise |
4118 | + # it will coredump. |
4119 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' |
4120 | + ;; |
4121 | + osf3* | osf4* | osf5*) |
4122 | + case $cc_basename in |
4123 | + KCC*) |
4124 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
4125 | + ;; |
4126 | + RCC*) |
4127 | + # Rational C++ 2.4.1 |
4128 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
4129 | + ;; |
4130 | + cxx*) |
4131 | + # Digital/Compaq C++ |
4132 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4133 | + # Make sure the PIC flag is empty. It appears that all Alpha |
4134 | + # Linux and Compaq Tru64 Unix objects are PIC. |
4135 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)= |
4136 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
4137 | + ;; |
4138 | + *) |
4139 | + ;; |
4140 | + esac |
4141 | + ;; |
4142 | + psos*) |
4143 | + ;; |
4144 | + solaris*) |
4145 | + case $cc_basename in |
4146 | + CC*) |
4147 | + # Sun C++ 4.2, 5.x and Centerline C++ |
4148 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4149 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4150 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
4151 | + ;; |
4152 | + gcx*) |
4153 | + # Green Hills C++ Compiler |
4154 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
4155 | + ;; |
4156 | + *) |
4157 | + ;; |
4158 | + esac |
4159 | + ;; |
4160 | + sunos4*) |
4161 | + case $cc_basename in |
4162 | + CC*) |
4163 | + # Sun C++ 4.x |
4164 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
4165 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4166 | + ;; |
4167 | + lcc*) |
4168 | + # Lucid |
4169 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
4170 | + ;; |
4171 | + *) |
4172 | + ;; |
4173 | + esac |
4174 | + ;; |
4175 | + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) |
4176 | + case $cc_basename in |
4177 | + CC*) |
4178 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4179 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4180 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4181 | + ;; |
4182 | + esac |
4183 | + ;; |
4184 | + tandem*) |
4185 | + case $cc_basename in |
4186 | + NCC*) |
4187 | + # NonStop-UX NCC 3.20 |
4188 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4189 | + ;; |
4190 | + *) |
4191 | + ;; |
4192 | + esac |
4193 | + ;; |
4194 | + vxworks*) |
4195 | + ;; |
4196 | + *) |
4197 | + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
4198 | + ;; |
4199 | + esac |
4200 | + fi |
4201 | +], |
4202 | +[ |
4203 | + if test "$GCC" = yes; then |
4204 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4205 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
4206 | + |
4207 | + case $host_os in |
4208 | + aix*) |
4209 | + # All AIX code is PIC. |
4210 | + if test "$host_cpu" = ia64; then |
4211 | + # AIX 5 now supports IA64 processor |
4212 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4213 | + fi |
4214 | + ;; |
4215 | + |
4216 | + amigaos*) |
4217 | + case $host_cpu in |
4218 | + powerpc) |
4219 | + # see comment about AmigaOS4 .so support |
4220 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
4221 | + ;; |
4222 | + m68k) |
4223 | + # FIXME: we need at least 68020 code to build shared libraries, but |
4224 | + # adding the `-m68020' flag to GCC prevents building anything better, |
4225 | + # like `-m68040'. |
4226 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
4227 | + ;; |
4228 | + esac |
4229 | + ;; |
4230 | + |
4231 | + beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
4232 | + # PIC is the default for these OSes. |
4233 | + ;; |
4234 | + |
4235 | + mingw* | cygwin* | pw32* | os2* | cegcc*) |
4236 | + # This hack is so that the source file can tell whether it is being |
4237 | + # built for inclusion in a dll (and should export symbols for example). |
4238 | + # Although the cygwin gcc ignores -fPIC, still need this for old-style |
4239 | + # (--disable-auto-import) libraries |
4240 | + m4_if([$1], [GCJ], [], |
4241 | + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) |
4242 | + ;; |
4243 | + |
4244 | + darwin* | rhapsody*) |
4245 | + # PIC is the default on this platform |
4246 | + # Common symbols not allowed in MH_DYLIB files |
4247 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
4248 | + ;; |
4249 | + |
4250 | + hpux*) |
4251 | + # PIC is the default for 64-bit PA HP-UX, but not for 32-bit |
4252 | + # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag |
4253 | + # sets the default TLS model and affects inlining. |
4254 | + case $host_cpu in |
4255 | + hppa*64*) |
4256 | + # +Z the default |
4257 | + ;; |
4258 | + *) |
4259 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
4260 | + ;; |
4261 | + esac |
4262 | + ;; |
4263 | + |
4264 | + interix[[3-9]]*) |
4265 | + # Interix 3.x gcc -fpic/-fPIC options generate broken code. |
4266 | + # Instead, we relocate shared libraries at runtime. |
4267 | + ;; |
4268 | + |
4269 | + msdosdjgpp*) |
4270 | + # Just because we use GCC doesn't mean we suddenly get shared libraries |
4271 | + # on systems that don't support them. |
4272 | + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
4273 | + enable_shared=no |
4274 | + ;; |
4275 | + |
4276 | + *nto* | *qnx*) |
4277 | + # QNX uses GNU C++, but need to define -shared option too, otherwise |
4278 | + # it will coredump. |
4279 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' |
4280 | + ;; |
4281 | + |
4282 | + sysv4*MP*) |
4283 | + if test -d /usr/nec; then |
4284 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
4285 | + fi |
4286 | + ;; |
4287 | + |
4288 | + *) |
4289 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
4290 | + ;; |
4291 | + esac |
4292 | + else |
4293 | + # PORTME Check for flag to pass linker flags through the system compiler. |
4294 | + case $host_os in |
4295 | + aix*) |
4296 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4297 | + if test "$host_cpu" = ia64; then |
4298 | + # AIX 5 now supports IA64 processor |
4299 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4300 | + else |
4301 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
4302 | + fi |
4303 | + ;; |
4304 | + |
4305 | + mingw* | cygwin* | pw32* | os2* | cegcc*) |
4306 | + # This hack is so that the source file can tell whether it is being |
4307 | + # built for inclusion in a dll (and should export symbols for example). |
4308 | + m4_if([$1], [GCJ], [], |
4309 | + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) |
4310 | + ;; |
4311 | + |
4312 | + hpux9* | hpux10* | hpux11*) |
4313 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4314 | + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
4315 | + # not for PA HP-UX. |
4316 | + case $host_cpu in |
4317 | + hppa*64*|ia64*) |
4318 | + # +Z the default |
4319 | + ;; |
4320 | + *) |
4321 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
4322 | + ;; |
4323 | + esac |
4324 | + # Is there a better lt_prog_compiler_static that works with the bundled CC? |
4325 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' |
4326 | + ;; |
4327 | + |
4328 | + irix5* | irix6* | nonstopux*) |
4329 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4330 | + # PIC (with -KPIC) is the default. |
4331 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
4332 | + ;; |
4333 | + |
4334 | + linux* | k*bsd*-gnu | kopensolaris*-gnu) |
4335 | + case $cc_basename in |
4336 | + # old Intel for x86_64 which still supported -KPIC. |
4337 | + ecc*) |
4338 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4339 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4340 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
4341 | + ;; |
4342 | + # icc used to be incompatible with GCC. |
4343 | + # ICC 10 doesn't accept -KPIC any more. |
4344 | + icc* | ifort*) |
4345 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4346 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
4347 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
4348 | + ;; |
4349 | + # Lahey Fortran 8.1. |
4350 | + lf95*) |
4351 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4352 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' |
4353 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' |
4354 | + ;; |
4355 | + pgcc* | pgf77* | pgf90* | pgf95*) |
4356 | + # Portland Group compilers (*not* the Pentium gcc compiler, |
4357 | + # which looks to be a dead project) |
4358 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4359 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' |
4360 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4361 | + ;; |
4362 | + ccc*) |
4363 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4364 | + # All Alpha code is PIC. |
4365 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
4366 | + ;; |
4367 | + xl*) |
4368 | + # IBM XL C 8.0/Fortran 10.1 on PPC |
4369 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4370 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' |
4371 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' |
4372 | + ;; |
4373 | + *) |
4374 | + case `$CC -V 2>&1 | sed 5q` in |
4375 | + *Sun\ C*) |
4376 | + # Sun C 5.9 |
4377 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4378 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4379 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4380 | + ;; |
4381 | + *Sun\ F*) |
4382 | + # Sun Fortran 8.3 passes all unrecognized flags to the linker |
4383 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4384 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4385 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' |
4386 | + ;; |
4387 | + esac |
4388 | + ;; |
4389 | + esac |
4390 | + ;; |
4391 | + |
4392 | + newsos6) |
4393 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4394 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4395 | + ;; |
4396 | + |
4397 | + *nto* | *qnx*) |
4398 | + # QNX uses GNU C++, but need to define -shared option too, otherwise |
4399 | + # it will coredump. |
4400 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' |
4401 | + ;; |
4402 | + |
4403 | + osf3* | osf4* | osf5*) |
4404 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4405 | + # All OSF/1 code is PIC. |
4406 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
4407 | + ;; |
4408 | + |
4409 | + rdos*) |
4410 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
4411 | + ;; |
4412 | + |
4413 | + solaris*) |
4414 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4415 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4416 | + case $cc_basename in |
4417 | + f77* | f90* | f95*) |
4418 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; |
4419 | + *) |
4420 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; |
4421 | + esac |
4422 | + ;; |
4423 | + |
4424 | + sunos4*) |
4425 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
4426 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
4427 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4428 | + ;; |
4429 | + |
4430 | + sysv4 | sysv4.2uw2* | sysv4.3*) |
4431 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4432 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4433 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4434 | + ;; |
4435 | + |
4436 | + sysv4*MP*) |
4437 | + if test -d /usr/nec ;then |
4438 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' |
4439 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4440 | + fi |
4441 | + ;; |
4442 | + |
4443 | + sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) |
4444 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4445 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
4446 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4447 | + ;; |
4448 | + |
4449 | + unicos*) |
4450 | + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
4451 | + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
4452 | + ;; |
4453 | + |
4454 | + uts4*) |
4455 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
4456 | + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
4457 | + ;; |
4458 | + |
4459 | + *) |
4460 | + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
4461 | + ;; |
4462 | + esac |
4463 | + fi |
4464 | +]) |
4465 | +case $host_os in |
4466 | + # For platforms which do not support PIC, -DPIC is meaningless: |
4467 | + *djgpp*) |
4468 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)= |
4469 | + ;; |
4470 | + *) |
4471 | + _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" |
4472 | + ;; |
4473 | +esac |
4474 | +AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) |
4475 | +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], |
4476 | + [How to pass a linker flag through the compiler]) |
4477 | + |
4478 | +# |
4479 | +# Check to make sure the PIC flag actually works. |
4480 | +# |
4481 | +if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then |
4482 | + _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], |
4483 | + [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], |
4484 | + [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], |
4485 | + [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in |
4486 | + "" | " "*) ;; |
4487 | + *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; |
4488 | + esac], |
4489 | + [_LT_TAGVAR(lt_prog_compiler_pic, $1)= |
4490 | + _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) |
4491 | +fi |
4492 | +_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], |
4493 | + [Additional compiler flags for building library objects]) |
4494 | + |
4495 | +# |
4496 | +# Check to make sure the static flag actually works. |
4497 | +# |
4498 | +wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" |
4499 | +_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], |
4500 | + _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), |
4501 | + $lt_tmp_static_flag, |
4502 | + [], |
4503 | + [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) |
4504 | +_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], |
4505 | + [Compiler flag to prevent dynamic linking]) |
4506 | +])# _LT_COMPILER_PIC |
4507 | + |
4508 | + |
4509 | +# _LT_LINKER_SHLIBS([TAGNAME]) |
4510 | +# ---------------------------- |
4511 | +# See if the linker supports building shared libraries. |
4512 | +m4_defun([_LT_LINKER_SHLIBS], |
4513 | +[AC_REQUIRE([LT_PATH_LD])dnl |
4514 | +AC_REQUIRE([LT_PATH_NM])dnl |
4515 | +m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
4516 | +m4_require([_LT_DECL_EGREP])dnl |
4517 | +m4_require([_LT_DECL_SED])dnl |
4518 | +m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl |
4519 | +m4_require([_LT_TAG_COMPILER])dnl |
4520 | +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
4521 | +m4_if([$1], [CXX], [ |
4522 | + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
4523 | + case $host_os in |
4524 | + aix[[4-9]]*) |
4525 | + # If we're using GNU nm, then we don't want the "-C" option. |
4526 | + # -C means demangle to AIX nm, but means don't demangle with GNU nm |
4527 | + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
4528 | + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' |
4529 | + else |
4530 | + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' |
4531 | + fi |
4532 | + ;; |
4533 | + pw32*) |
4534 | + _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" |
4535 | + ;; |
4536 | + cygwin* | mingw* | cegcc*) |
4537 | + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' |
4538 | + ;; |
4539 | + linux* | k*bsd*-gnu) |
4540 | + _LT_TAGVAR(link_all_deplibs, $1)=no |
4541 | + ;; |
4542 | + *) |
4543 | + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
4544 | + ;; |
4545 | + esac |
4546 | + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] |
4547 | +], [ |
4548 | + runpath_var= |
4549 | + _LT_TAGVAR(allow_undefined_flag, $1)= |
4550 | + _LT_TAGVAR(always_export_symbols, $1)=no |
4551 | + _LT_TAGVAR(archive_cmds, $1)= |
4552 | + _LT_TAGVAR(archive_expsym_cmds, $1)= |
4553 | + _LT_TAGVAR(compiler_needs_object, $1)=no |
4554 | + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
4555 | + _LT_TAGVAR(export_dynamic_flag_spec, $1)= |
4556 | + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
4557 | + _LT_TAGVAR(hardcode_automatic, $1)=no |
4558 | + _LT_TAGVAR(hardcode_direct, $1)=no |
4559 | + _LT_TAGVAR(hardcode_direct_absolute, $1)=no |
4560 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= |
4561 | + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= |
4562 | + _LT_TAGVAR(hardcode_libdir_separator, $1)= |
4563 | + _LT_TAGVAR(hardcode_minus_L, $1)=no |
4564 | + _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
4565 | + _LT_TAGVAR(inherit_rpath, $1)=no |
4566 | + _LT_TAGVAR(link_all_deplibs, $1)=unknown |
4567 | + _LT_TAGVAR(module_cmds, $1)= |
4568 | + _LT_TAGVAR(module_expsym_cmds, $1)= |
4569 | + _LT_TAGVAR(old_archive_from_new_cmds, $1)= |
4570 | + _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= |
4571 | + _LT_TAGVAR(thread_safe_flag_spec, $1)= |
4572 | + _LT_TAGVAR(whole_archive_flag_spec, $1)= |
4573 | + # include_expsyms should be a list of space-separated symbols to be *always* |
4574 | + # included in the symbol list |
4575 | + _LT_TAGVAR(include_expsyms, $1)= |
4576 | + # exclude_expsyms can be an extended regexp of symbols to exclude |
4577 | + # it will be wrapped by ` (' and `)$', so one must not match beginning or |
4578 | + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', |
4579 | + # as well as any symbol that contains `d'. |
4580 | + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] |
4581 | + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
4582 | + # platforms (ab)use it in PIC code, but their linkers get confused if |
4583 | + # the symbol is explicitly referenced. Since portable code cannot |
4584 | + # rely on this symbol name, it's probably fine to never include it in |
4585 | + # preloaded symbol tables. |
4586 | + # Exclude shared library initialization/finalization symbols. |
4587 | +dnl Note also adjust exclude_expsyms for C++ above. |
4588 | + extract_expsyms_cmds= |
4589 | + |
4590 | + case $host_os in |
4591 | + cygwin* | mingw* | pw32* | cegcc*) |
4592 | + # FIXME: the MSVC++ port hasn't been tested in a loooong time |
4593 | + # When not using gcc, we currently assume that we are using |
4594 | + # Microsoft Visual C++. |
4595 | + if test "$GCC" != yes; then |
4596 | + with_gnu_ld=no |
4597 | + fi |
4598 | + ;; |
4599 | + interix*) |
4600 | + # we just hope/assume this is gcc and not c89 (= MSVC++) |
4601 | + with_gnu_ld=yes |
4602 | + ;; |
4603 | + openbsd*) |
4604 | + with_gnu_ld=no |
4605 | + ;; |
4606 | + linux* | k*bsd*-gnu) |
4607 | + _LT_TAGVAR(link_all_deplibs, $1)=no |
4608 | + ;; |
4609 | + esac |
4610 | + |
4611 | + _LT_TAGVAR(ld_shlibs, $1)=yes |
4612 | + if test "$with_gnu_ld" = yes; then |
4613 | + # If archive_cmds runs LD, not CC, wlarc should be empty |
4614 | + wlarc='${wl}' |
4615 | + |
4616 | + # Set some defaults for GNU ld with shared library support. These |
4617 | + # are reset later if shared libraries are not supported. Putting them |
4618 | + # here allows them to be overridden if necessary. |
4619 | + runpath_var=LD_RUN_PATH |
4620 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
4621 | + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' |
4622 | + # ancient GNU ld didn't support --whole-archive et. al. |
4623 | + if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then |
4624 | + _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' |
4625 | + else |
4626 | + _LT_TAGVAR(whole_archive_flag_spec, $1)= |
4627 | + fi |
4628 | + supports_anon_versioning=no |
4629 | + case `$LD -v 2>&1` in |
4630 | + *GNU\ gold*) supports_anon_versioning=yes ;; |
4631 | + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 |
4632 | + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... |
4633 | + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... |
4634 | + *\ 2.11.*) ;; # other 2.11 versions |
4635 | + *) supports_anon_versioning=yes ;; |
4636 | + esac |
4637 | + |
4638 | + # See if GNU ld supports shared libraries. |
4639 | + case $host_os in |
4640 | + aix[[3-9]]*) |
4641 | + # On AIX/PPC, the GNU linker is very broken |
4642 | + if test "$host_cpu" != ia64; then |
4643 | + _LT_TAGVAR(ld_shlibs, $1)=no |
4644 | + cat <<_LT_EOF 1>&2 |
4645 | + |
4646 | +*** Warning: the GNU linker, at least up to release 2.9.1, is reported |
4647 | +*** to be unable to reliably create shared libraries on AIX. |
4648 | +*** Therefore, libtool is disabling shared libraries support. If you |
4649 | +*** really care for shared libraries, you may want to modify your PATH |
4650 | +*** so that a non-GNU linker is found, and then restart. |
4651 | + |
4652 | +_LT_EOF |
4653 | + fi |
4654 | + ;; |
4655 | + |
4656 | + amigaos*) |
4657 | + case $host_cpu in |
4658 | + powerpc) |
4659 | + # see comment about AmigaOS4 .so support |
4660 | + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
4661 | + _LT_TAGVAR(archive_expsym_cmds, $1)='' |
4662 | + ;; |
4663 | + m68k) |
4664 | + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' |
4665 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
4666 | + _LT_TAGVAR(hardcode_minus_L, $1)=yes |
4667 | + ;; |
4668 | + esac |
4669 | + ;; |
4670 | + |
4671 | + beos*) |
4672 | + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then |
4673 | + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
4674 | + # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
4675 | + # support --undefined. This deserves some investigation. FIXME |
4676 | + _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
4677 | + else |
4678 | + _LT_TAGVAR(ld_shlibs, $1)=no |
4679 | + fi |
4680 | + ;; |
4681 | + |
4682 | + cygwin* | mingw* | pw32* | cegcc*) |
4683 | + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
4684 | + # as there is no search path for DLLs. |
4685 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
4686 | + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
4687 | + _LT_TAGVAR(always_export_symbols, $1)=no |
4688 | + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
4689 | + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' |
4690 | + |
4691 | + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then |
4692 | + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' |
4693 | + # If the export-symbols file already is a .def file (1st line |
4694 | + # is EXPORTS), use it as is; otherwise, prepend... |
4695 | + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then |
4696 | + cp $export_symbols $output_objdir/$soname.def; |
4697 | + else |
4698 | + echo EXPORTS > $output_objdir/$soname.def; |
4699 | + cat $export_symbols >> $output_objdir/$soname.def; |
4700 | + fi~ |
4701 | + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' |
4702 | + else |
4703 | + _LT_TAGVAR(ld_shlibs, $1)=no |
4704 | + fi |
4705 | + ;; |
4706 | + |
4707 | + interix[[3-9]]*) |
4708 | + _LT_TAGVAR(hardcode_direct, $1)=no |
4709 | + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
4710 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' |
4711 | + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' |
4712 | + # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. |
4713 | + # Instead, shared libraries are loaded at an image base (0x10000000 by |
4714 | + # default) and relocated if they conflict, which is a slow very memory |
4715 | + # consuming and fragmenting process. To avoid this, we pick a random, |
4716 | + # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
4717 | + # time. Moving up from 0x10000000 also allows more sbrk(2) space. |
4718 | + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' |
4719 | + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' |
4720 | + ;; |
4721 | + |
4722 | + gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) |
4723 | + tmp_diet=no |
4724 | + if test "$host_os" = linux-dietlibc; then |
4725 | + case $cc_basename in |
4726 | + diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) |
4727 | + esac |
4728 | + fi |
4729 | + if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ |
4730 | + && test "$tmp_diet" = no |
4731 | + then |
4732 | + tmp_addflag= |
4733 | + tmp_sharedflag='-shared' |
4734 | + case $cc_basename,$host_cpu in |
4735 | + pgcc*) # Portland Group C compiler |
4736 | + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' |
4737 | + tmp_addflag=' $pic_flag' |
4738 | + ;; |
4739 | + pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers |
4740 | + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' |
4741 | + tmp_addflag=' $pic_flag -Mnomain' ;; |
4742 | + ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 |
4743 | + tmp_addflag=' -i_dynamic' ;; |
4744 | + efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 |
4745 | + tmp_addflag=' -i_dynamic -nofor_main' ;; |
4746 | + ifc* | ifort*) # Intel Fortran compiler |
4747 | + tmp_addflag=' -nofor_main' ;; |
4748 | + lf95*) # Lahey Fortran 8.1 |
4749 | + _LT_TAGVAR(whole_archive_flag_spec, $1)= |
4750 | + tmp_sharedflag='--shared' ;; |
4751 | + xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) |
4752 | + tmp_sharedflag='-qmkshrobj' |
4753 | + tmp_addflag= ;; |
4754 | + esac |
4755 | + case `$CC -V 2>&1 | sed 5q` in |
4756 | + *Sun\ C*) # Sun C 5.9 |
4757 | + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' |
4758 | + _LT_TAGVAR(compiler_needs_object, $1)=yes |
4759 | + tmp_sharedflag='-G' ;; |
4760 | + *Sun\ F*) # Sun Fortran 8.3 |
4761 | + tmp_sharedflag='-G' ;; |
4762 | + esac |
4763 | + _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
4764 | + |
4765 | + if test "x$supports_anon_versioning" = xyes; then |
4766 | + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ |
4767 | + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ |
4768 | + echo "local: *; };" >> $output_objdir/$libname.ver~ |
4769 | + $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' |
4770 | + fi |
4771 | + |
4772 | + case $cc_basename in |
4773 | + xlf*) |
4774 | + # IBM XL Fortran 10.1 on PPC cannot create shared libs itself |
4775 | + _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' |
4776 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= |
4777 | + _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' |
4778 | + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' |
4779 | + if test "x$supports_anon_versioning" = xyes; then |
4780 | + _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ |
4781 | + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ |
4782 | + echo "local: *; };" >> $output_objdir/$libname.ver~ |
4783 | + $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' |
4784 | + fi |
4785 | + ;; |
4786 | + esac |
4787 | + else |
4788 | + _LT_TAGVAR(ld_shlibs, $1)=no |
4789 | + fi |
4790 | + ;; |
4791 | + |
4792 | + netbsd* | netbsdelf*-gnu) |
4793 | + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
4794 | + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
4795 | + wlarc= |
4796 | + else |
4797 | + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
4798 | + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
4799 | + fi |
4800 | + ;; |
4801 | + |
4802 | + solaris*) |
4803 | + if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then |
4804 | + _LT_TAGVAR(ld_shlibs, $1)=no |
4805 | + cat <<_LT_EOF 1>&2 |
4806 | + |
4807 | +*** Warning: The releases 2.8.* of the GNU linker cannot reliably |
4808 | +*** create shared libraries on Solaris systems. Therefore, libtool |
4809 | +*** is disabling shared libraries support. We urge you to upgrade GNU |
4810 | +*** binutils to release 2.9.1 or newer. Another option is to modify |
4811 | +*** your PATH or compiler configuration so that the native linker is |
4812 | +*** used, and then restart. |
4813 | + |
4814 | +_LT_EOF |
4815 | + elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then |
4816 | + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
4817 | + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
4818 | + else |
4819 | + _LT_TAGVAR(ld_shlibs, $1)=no |
4820 | + fi |
4821 | + ;; |
4822 | + |
4823 | + sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) |
4824 | + case `$LD -v 2>&1` in |
4825 | + *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) |
4826 | + _LT_TAGVAR(ld_shlibs, $1)=no |
4827 | + cat <<_LT_EOF 1>&2 |
4828 | + |
4829 | +*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not |
4830 | +*** reliably create shared libraries on SCO systems. Therefore, libtool |
4831 | +*** is disabling shared libraries support. We urge you to upgrade GNU |
4832 | +*** binutils to release 2.16.91.0.3 or newer. Another option is to modify |
4833 | +*** your PATH or compiler configuration so that the native linker is |
4834 | +*** used, and then restart. |
4835 | + |
4836 | +_LT_EOF |
4837 | + ;; |
4838 | + *) |
4839 | + # For security reasons, it is highly recommended that you always |
4840 | + # use absolute paths for naming shared libraries, and exclude the |
4841 | + # DT_RUNPATH tag from executables and libraries. But doing so |
4842 | + # requires that you compile everything twice, which is a pain. |
4843 | + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then |
4844 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' |
4845 | + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
4846 | + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
4847 | + else |
4848 | + _LT_TAGVAR(ld_shlibs, $1)=no |
4849 | + fi |
4850 | + ;; |
4851 | + esac |
4852 | + ;; |
4853 | + |
4854 | + sunos4*) |
4855 | + _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
4856 | + wlarc= |
4857 | + _LT_TAGVAR(hardcode_direct, $1)=yes |
4858 | + _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
4859 | + ;; |
4860 | + |
4861 | + *) |
4862 | + if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then |
4863 | + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' |
4864 | + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' |
4865 | + else |
4866 | + _LT_TAGVAR(ld_shlibs, $1)=no |
4867 | + fi |
4868 | + ;; |
4869 | + esac |
4870 | + |
4871 | + if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then |
4872 | + runpath_var= |
4873 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= |
4874 | + _LT_TAGVAR(export_dynamic_flag_spec, $1)= |
4875 | + _LT_TAGVAR(whole_archive_flag_spec, $1)= |
4876 | + fi |
4877 | + else |
4878 | + # PORTME fill in a description of your system's linker (not GNU ld) |
4879 | + case $host_os in |
4880 | + aix3*) |
4881 | + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
4882 | + _LT_TAGVAR(always_export_symbols, $1)=yes |
4883 | + _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' |
4884 | + # Note: this linker hardcodes the directories in LIBPATH if there |
4885 | + # are no directories specified by -L. |
4886 | + _LT_TAGVAR(hardcode_minus_L, $1)=yes |
4887 | + if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then |
4888 | + # Neither direct hardcoding nor static linking is supported with a |
4889 | + # broken collect2. |
4890 | + _LT_TAGVAR(hardcode_direct, $1)=unsupported |
4891 | + fi |
4892 | + ;; |
4893 | + |
4894 | + aix[[4-9]]*) |
4895 | + if test "$host_cpu" = ia64; then |
4896 | + # On IA64, the linker does run time linking by default, so we don't |
4897 | + # have to do anything special. |
4898 | + aix_use_runtimelinking=no |
4899 | + exp_sym_flag='-Bexport' |
4900 | + no_entry_flag="" |
4901 | + else |
4902 | + # If we're using GNU nm, then we don't want the "-C" option. |
4903 | + # -C means demangle to AIX nm, but means don't demangle with GNU nm |
4904 | + if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
4905 | + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' |
4906 | + else |
4907 | + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' |
4908 | + fi |
4909 | + aix_use_runtimelinking=no |
4910 | + |
4911 | + # Test if we are trying to use run time linking or normal |
4912 | + # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
4913 | + # need to do runtime linking. |
4914 | + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) |
4915 | + for ld_flag in $LDFLAGS; do |
4916 | + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then |
4917 | + aix_use_runtimelinking=yes |
4918 | + break |
4919 | + fi |
4920 | + done |
4921 | + ;; |
4922 | + esac |
4923 | + |
4924 | + exp_sym_flag='-bexport' |
4925 | + no_entry_flag='-bnoentry' |
4926 | + fi |
4927 | + |
4928 | + # When large executables or shared objects are built, AIX ld can |
4929 | + # have problems creating the table of contents. If linking a library |
4930 | + # or program results in "error TOC overflow" add -mminimal-toc to |
4931 | + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
4932 | + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
4933 | + |
4934 | + _LT_TAGVAR(archive_cmds, $1)='' |
4935 | + _LT_TAGVAR(hardcode_direct, $1)=yes |
4936 | + _LT_TAGVAR(hardcode_direct_absolute, $1)=yes |
4937 | + _LT_TAGVAR(hardcode_libdir_separator, $1)=':' |
4938 | + _LT_TAGVAR(link_all_deplibs, $1)=yes |
4939 | + _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' |
4940 | + |
4941 | + if test "$GCC" = yes; then |
4942 | + case $host_os in aix4.[[012]]|aix4.[[012]].*) |
4943 | + # We only want to do this on AIX 4.2 and lower, the check |
4944 | + # below for broken collect2 doesn't work under 4.3+ |
4945 | + collect2name=`${CC} -print-prog-name=collect2` |
4946 | + if test -f "$collect2name" && |
4947 | + strings "$collect2name" | $GREP resolve_lib_name >/dev/null |
4948 | + then |
4949 | + # We have reworked collect2 |
4950 | + : |
4951 | + else |
4952 | + # We have old collect2 |
4953 | + _LT_TAGVAR(hardcode_direct, $1)=unsupported |
4954 | + # It fails to find uninstalled libraries when the uninstalled |
4955 | + # path is not listed in the libpath. Setting hardcode_minus_L |
4956 | + # to unsupported forces relinking |
4957 | + _LT_TAGVAR(hardcode_minus_L, $1)=yes |
4958 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
4959 | + _LT_TAGVAR(hardcode_libdir_separator, $1)= |
4960 | + fi |
4961 | + ;; |
4962 | + esac |
4963 | + shared_flag='-shared' |
4964 | + if test "$aix_use_runtimelinking" = yes; then |
4965 | + shared_flag="$shared_flag "'${wl}-G' |
4966 | + fi |
4967 | + _LT_TAGVAR(link_all_deplibs, $1)=no |
4968 | + else |
4969 | + # not using gcc |
4970 | + if test "$host_cpu" = ia64; then |
4971 | + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
4972 | + # chokes on -Wl,-G. The following line is correct: |
4973 | + shared_flag='-G' |
4974 | + else |
4975 | + if test "$aix_use_runtimelinking" = yes; then |
4976 | + shared_flag='${wl}-G' |
4977 | + else |
4978 | + shared_flag='${wl}-bM:SRE' |
4979 | + fi |
4980 | + fi |
4981 | + fi |
4982 | + |
4983 | + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' |
4984 | + # It seems that -bexpall does not export symbols beginning with |
4985 | + # underscore (_), so it is better to generate a list of symbols to export. |
4986 | + _LT_TAGVAR(always_export_symbols, $1)=yes |
4987 | + if test "$aix_use_runtimelinking" = yes; then |
4988 | + # Warning - without using the other runtime loading flags (-brtl), |
4989 | + # -berok will link without error, but may produce a broken library. |
4990 | + _LT_TAGVAR(allow_undefined_flag, $1)='-berok' |
4991 | + # Determine the default libpath from the value encoded in an |
4992 | + # empty executable. |
4993 | + _LT_SYS_MODULE_PATH_AIX |
4994 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" |
4995 | + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" |
4996 | + else |
4997 | + if test "$host_cpu" = ia64; then |
4998 | + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' |
4999 | + _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
5000 | + _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" |
The diff has been truncated for viewing.