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