Codebase list xapp / 58dadab
Imported Upstream version 1.0.2 Margarita Manterola 7 years ago
38 changed file(s) with 11872 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
(New empty file)
0 GNU GENERAL PUBLIC LICENSE
1 Version 2, June 1991
2
3 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
4 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The licenses for most software are designed to take away your
11 freedom to share and change it. By contrast, the GNU General Public
12 License is intended to guarantee your freedom to share and change free
13 software--to make sure the software is free for all its users. This
14 General Public License applies to most of the Free Software
15 Foundation's software and to any other program whose authors commit to
16 using it. (Some other Free Software Foundation software is covered by
17 the GNU Lesser General Public License instead.) You can apply it to
18 your programs, too.
19
20 When we speak of free software, we are referring to freedom, not
21 price. Our General Public Licenses are designed to make sure that you
22 have the freedom to distribute copies of free software (and charge for
23 this service if you wish), that you receive source code or can get it
24 if you want it, that you can change the software or use pieces of it
25 in new free programs; and that you know you can do these things.
26
27 To protect your rights, we need to make restrictions that forbid
28 anyone to deny you these rights or to ask you to surrender the rights.
29 These restrictions translate to certain responsibilities for you if you
30 distribute copies of the software, or if you modify it.
31
32 For example, if you distribute copies of such a program, whether
33 gratis or for a fee, you must give the recipients all the rights that
34 you have. You must make sure that they, too, receive or can get the
35 source code. And you must show them these terms so they know their
36 rights.
37
38 We protect your rights with two steps: (1) copyright the software, and
39 (2) offer you this license which gives you legal permission to copy,
40 distribute and/or modify the software.
41
42 Also, for each author's protection and ours, we want to make certain
43 that everyone understands that there is no warranty for this free
44 software. If the software is modified by someone else and passed on, we
45 want its recipients to know that what they have is not the original, so
46 that any problems introduced by others will not reflect on the original
47 authors' reputations.
48
49 Finally, any free program is threatened constantly by software
50 patents. We wish to avoid the danger that redistributors of a free
51 program will individually obtain patent licenses, in effect making the
52 program proprietary. To prevent this, we have made it clear that any
53 patent must be licensed for everyone's free use or not licensed at all.
54
55 The precise terms and conditions for copying, distribution and
56 modification follow.
57
58 GNU GENERAL PUBLIC LICENSE
59 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
60
61 0. This License applies to any program or other work which contains
62 a notice placed by the copyright holder saying it may be distributed
63 under the terms of this General Public License. The "Program", below,
64 refers to any such program or work, and a "work based on the Program"
65 means either the Program or any derivative work under copyright law:
66 that is to say, a work containing the Program or a portion of it,
67 either verbatim or with modifications and/or translated into another
68 language. (Hereinafter, translation is included without limitation in
69 the term "modification".) Each licensee is addressed as "you".
70
71 Activities other than copying, distribution and modification are not
72 covered by this License; they are outside its scope. The act of
73 running the Program is not restricted, and the output from the Program
74 is covered only if its contents constitute a work based on the
75 Program (independent of having been made by running the Program).
76 Whether that is true depends on what the Program does.
77
78 1. You may copy and distribute verbatim copies of the Program's
79 source code as you receive it, in any medium, provided that you
80 conspicuously and appropriately publish on each copy an appropriate
81 copyright notice and disclaimer of warranty; keep intact all the
82 notices that refer to this License and to the absence of any warranty;
83 and give any other recipients of the Program a copy of this License
84 along with the Program.
85
86 You may charge a fee for the physical act of transferring a copy, and
87 you may at your option offer warranty protection in exchange for a fee.
88
89 2. You may modify your copy or copies of the Program or any portion
90 of it, thus forming a work based on the Program, and copy and
91 distribute such modifications or work under the terms of Section 1
92 above, provided that you also meet all of these conditions:
93
94 a) You must cause the modified files to carry prominent notices
95 stating that you changed the files and the date of any change.
96
97 b) You must cause any work that you distribute or publish, that in
98 whole or in part contains or is derived from the Program or any
99 part thereof, to be licensed as a whole at no charge to all third
100 parties under the terms of this License.
101
102 c) If the modified program normally reads commands interactively
103 when run, you must cause it, when started running for such
104 interactive use in the most ordinary way, to print or display an
105 announcement including an appropriate copyright notice and a
106 notice that there is no warranty (or else, saying that you provide
107 a warranty) and that users may redistribute the program under
108 these conditions, and telling the user how to view a copy of this
109 License. (Exception: if the Program itself is interactive but
110 does not normally print such an announcement, your work based on
111 the Program is not required to print an announcement.)
112
113 These requirements apply to the modified work as a whole. If
114 identifiable sections of that work are not derived from the Program,
115 and can be reasonably considered independent and separate works in
116 themselves, then this License, and its terms, do not apply to those
117 sections when you distribute them as separate works. But when you
118 distribute the same sections as part of a whole which is a work based
119 on the Program, the distribution of the whole must be on the terms of
120 this License, whose permissions for other licensees extend to the
121 entire whole, and thus to each and every part regardless of who wrote it.
122
123 Thus, it is not the intent of this section to claim rights or contest
124 your rights to work written entirely by you; rather, the intent is to
125 exercise the right to control the distribution of derivative or
126 collective works based on the Program.
127
128 In addition, mere aggregation of another work not based on the Program
129 with the Program (or with a work based on the Program) on a volume of
130 a storage or distribution medium does not bring the other work under
131 the scope of this License.
132
133 3. You may copy and distribute the Program (or a work based on it,
134 under Section 2) in object code or executable form under the terms of
135 Sections 1 and 2 above provided that you also do one of the following:
136
137 a) Accompany it with the complete corresponding machine-readable
138 source code, which must be distributed under the terms of Sections
139 1 and 2 above on a medium customarily used for software interchange; or,
140
141 b) Accompany it with a written offer, valid for at least three
142 years, to give any third party, for a charge no more than your
143 cost of physically performing source distribution, a complete
144 machine-readable copy of the corresponding source code, to be
145 distributed under the terms of Sections 1 and 2 above on a medium
146 customarily used for software interchange; or,
147
148 c) Accompany it with the information you received as to the offer
149 to distribute corresponding source code. (This alternative is
150 allowed only for noncommercial distribution and only if you
151 received the program in object code or executable form with such
152 an offer, in accord with Subsection b above.)
153
154 The source code for a work means the preferred form of the work for
155 making modifications to it. For an executable work, complete source
156 code means all the source code for all modules it contains, plus any
157 associated interface definition files, plus the scripts used to
158 control compilation and installation of the executable. However, as a
159 special exception, the source code distributed need not include
160 anything that is normally distributed (in either source or binary
161 form) with the major components (compiler, kernel, and so on) of the
162 operating system on which the executable runs, unless that component
163 itself accompanies the executable.
164
165 If distribution of executable or object code is made by offering
166 access to copy from a designated place, then offering equivalent
167 access to copy the source code from the same place counts as
168 distribution of the source code, even though third parties are not
169 compelled to copy the source along with the object code.
170
171 4. You may not copy, modify, sublicense, or distribute the Program
172 except as expressly provided under this License. Any attempt
173 otherwise to copy, modify, sublicense or distribute the Program is
174 void, and will automatically terminate your rights under this License.
175 However, parties who have received copies, or rights, from you under
176 this License will not have their licenses terminated so long as such
177 parties remain in full compliance.
178
179 5. You are not required to accept this License, since you have not
180 signed it. However, nothing else grants you permission to modify or
181 distribute the Program or its derivative works. These actions are
182 prohibited by law if you do not accept this License. Therefore, by
183 modifying or distributing the Program (or any work based on the
184 Program), you indicate your acceptance of this License to do so, and
185 all its terms and conditions for copying, distributing or modifying
186 the Program or works based on it.
187
188 6. Each time you redistribute the Program (or any work based on the
189 Program), the recipient automatically receives a license from the
190 original licensor to copy, distribute or modify the Program subject to
191 these terms and conditions. You may not impose any further
192 restrictions on the recipients' exercise of the rights granted herein.
193 You are not responsible for enforcing compliance by third parties to
194 this License.
195
196 7. If, as a consequence of a court judgment or allegation of patent
197 infringement or for any other reason (not limited to patent issues),
198 conditions are imposed on you (whether by court order, agreement or
199 otherwise) that contradict the conditions of this License, they do not
200 excuse you from the conditions of this License. If you cannot
201 distribute so as to satisfy simultaneously your obligations under this
202 License and any other pertinent obligations, then as a consequence you
203 may not distribute the Program at all. For example, if a patent
204 license would not permit royalty-free redistribution of the Program by
205 all those who receive copies directly or indirectly through you, then
206 the only way you could satisfy both it and this License would be to
207 refrain entirely from distribution of the Program.
208
209 If any portion of this section is held invalid or unenforceable under
210 any particular circumstance, the balance of the section is intended to
211 apply and the section as a whole is intended to apply in other
212 circumstances.
213
214 It is not the purpose of this section to induce you to infringe any
215 patents or other property right claims or to contest validity of any
216 such claims; this section has the sole purpose of protecting the
217 integrity of the free software distribution system, which is
218 implemented by public license practices. Many people have made
219 generous contributions to the wide range of software distributed
220 through that system in reliance on consistent application of that
221 system; it is up to the author/donor to decide if he or she is willing
222 to distribute software through any other system and a licensee cannot
223 impose that choice.
224
225 This section is intended to make thoroughly clear what is believed to
226 be a consequence of the rest of this License.
227
228 8. If the distribution and/or use of the Program is restricted in
229 certain countries either by patents or by copyrighted interfaces, the
230 original copyright holder who places the Program under this License
231 may add an explicit geographical distribution limitation excluding
232 those countries, so that distribution is permitted only in or among
233 countries not thus excluded. In such case, this License incorporates
234 the limitation as if written in the body of this License.
235
236 9. The Free Software Foundation may publish revised and/or new versions
237 of the General Public License from time to time. Such new versions will
238 be similar in spirit to the present version, but may differ in detail to
239 address new problems or concerns.
240
241 Each version is given a distinguishing version number. If the Program
242 specifies a version number of this License which applies to it and "any
243 later version", you have the option of following the terms and conditions
244 either of that version or of any later version published by the Free
245 Software Foundation. If the Program does not specify a version number of
246 this License, you may choose any version ever published by the Free Software
247 Foundation.
248
249 10. If you wish to incorporate parts of the Program into other free
250 programs whose distribution conditions are different, write to the author
251 to ask for permission. For software which is copyrighted by the Free
252 Software Foundation, write to the Free Software Foundation; we sometimes
253 make exceptions for this. Our decision will be guided by the two goals
254 of preserving the free status of all derivatives of our free software and
255 of promoting the sharing and reuse of software generally.
256
257 NO WARRANTY
258
259 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
260 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
261 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
262 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
263 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
264 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
265 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
266 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
267 REPAIR OR CORRECTION.
268
269 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
270 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
271 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
272 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
273 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
274 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
275 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
276 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
277 POSSIBILITY OF SUCH DAMAGES.
278
279 END OF TERMS AND CONDITIONS
280
281 How to Apply These Terms to Your New Programs
282
283 If you develop a new program, and you want it to be of the greatest
284 possible use to the public, the best way to achieve this is to make it
285 free software which everyone can redistribute and change under these terms.
286
287 To do so, attach the following notices to the program. It is safest
288 to attach them to the start of each source file to most effectively
289 convey the exclusion of warranty; and each file should have at least
290 the "copyright" line and a pointer to where the full notice is found.
291
292 <one line to give the program's name and a brief idea of what it does.>
293 Copyright (C) <year> <name of author>
294
295 This program is free software; you can redistribute it and/or modify
296 it under the terms of the GNU General Public License as published by
297 the Free Software Foundation; either version 2 of the License, or
298 (at your option) any later version.
299
300 This program is distributed in the hope that it will be useful,
301 but WITHOUT ANY WARRANTY; without even the implied warranty of
302 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
303 GNU General Public License for more details.
304
305 You should have received a copy of the GNU General Public License along
306 with this program; if not, write to the Free Software Foundation, Inc.,
307 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
308
309 Also add information on how to contact you by electronic and paper mail.
310
311 If the program is interactive, make it output a short notice like this
312 when it starts in an interactive mode:
313
314 Gnomovision version 69, Copyright (C) year name of author
315 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
316 This is free software, and you are welcome to redistribute it
317 under certain conditions; type `show c' for details.
318
319 The hypothetical commands `show w' and `show c' should show the appropriate
320 parts of the General Public License. Of course, the commands you use may
321 be called something other than `show w' and `show c'; they could even be
322 mouse-clicks or menu items--whatever suits your program.
323
324 You should also get your employer (if you work as a programmer) or your
325 school, if any, to sign a "copyright disclaimer" for the program, if
326 necessary. Here is a sample; alter the names:
327
328 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
329 `Gnomovision' (which makes passes at compilers) written by James Hacker.
330
331 <signature of Ty Coon>, 1 April 1989
332 Ty Coon, President of Vice
333
334 This General Public License does not permit incorporating your program into
335 proprietary programs. If your program is a subroutine library, you may
336 consider it more useful to permit linking proprietary applications with the
337 library. If this is what you want to do, use the GNU Lesser General
338 Public License instead of this License.
0 SUBDIRS = libxapp po schemas files
1
2 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
3
4 DISTCHECK_CONFIGURE_FLAGS = --enable-introspection
5
6 @INTLTOOL_XML_RULE@
7
8 MAINTAINERCLEANFILES = \
9 $(srcdir)/aclocal.m4 \
10 $(srcdir)/config.guess \
11 $(srcdir)/config.h.in \
12 $(srcdir)/config.sub \
13 $(srcdir)/depcomp \
14 $(srcdir)/install-sh \
15 $(srcdir)/ltmain.sh \
16 $(srcdir)/missing \
17 $(srcdir)/mkinstalldirs \
18 `find "$(srcdir)" -type f -name Makefile.in -print` \
19 $(srcdir)/configure \
20 $(srcdir)/m4/gnome-doc-utils.m4 \
21 $(srcdir)/m4/gtk-doc.m4 \
22 $(srcdir)/m4/intltool.m4
23
24 dist-hook:
25 $(AM_V_GEN)if test -d "$(srcdir)/.git"; then \
26 ( echo '# Generated by Makefile. Do not edit.'; echo; \
27 GIT_DIR="$(top_srcdir)/.git" ./missing --run \
28 git log $(CHANGELOG_GIT_RANGE) --no-color -M -C --name-status ) \
29 > ChangeLog.tmp \
30 && mv -f ChangeLog.tmp $(distdir)/ChangeLog \
31 || ( rm -f ChangeLog.tmp ; echo Failed to generate ChangeLog >&2 ); \
32 else \
33 echo A git checkout is required to generate ChangeLog >&2; \
34 fi
35
36 GITIGNOREFILES = $(PACKAGE)-\*.tar.{gz,bz2,xz}
37 -include $(top_srcdir)/git.mk
(New empty file)
0 This project gathers the components which are common to multiple desktop environments and required to implement cross-DE solutions.
1
2 # xapp-common
3
4 A set of resources and tools.
5
6 # libxapp
7
8 A library available in C, Python and other languages (via Gobject Introspection).
9
10 # Scope
11
12 In the long term Xapps are there to provide applications to users in multiple DEs, but also to provide building blocks, resources and libraries to Linux developers who want to develop applications which work well in multiple DEs.
13
14 This project is still relatively new though and we can't yet commit to a stable ABI.
15
16 You are welcome to use libxapp or xapps-common in your application, but if you do, please make sure to tell us, so that we can communicate with you going forward about any potential changes.
17
18 ## XAppMonitorBlanker
19
20 XAppMonitorBlanker is used to blank other monitors. It takes a window as an argument and blanks all the monitors but the one where the window is located.
21
22 This is particularly useful in multi-monitor situations, for presentations, full screen media playback etc..
23
24 `XAppMonitorBlanker *xapp_monitor_blanker_new (void);`
25
26 `void xapp_monitor_blanker_blank_other_monitors (XAppMonitorBlanker *self, GtkWindow *window);`
27
28 `void xapp_monitor_blanker_unblank_monitors (XAppMonitorBlanker *self);`
29
30 `gboolean xapp_monitor_blanker_are_monitors_blanked (XAppMonitorBlanker *self);`
31
32 This is used by:
33
34 - xplayer
35
36 ## XAppKbdLayoutController
37
38 XAppKbdLayoutController is used to get a keyboard layout code or flag for a given locale.
39
40 `XAppKbdLayoutController *xapp_kbd_layout_controller_new (void);`
41
42 `gboolean xapp_kbd_layout_controller_get_enabled (XAppKbdLayoutController *controller);`
43
44 `guint xapp_kbd_layout_controller_get_current_group (XAppKbdLayoutController *controller);`
45
46 `void xapp_kbd_layout_controller_set_current_group (XAppKbdLayoutController *controller, guint group);`
47
48 `void xapp_kbd_layout_controller_next_group (XAppKbdLayoutController *controller);`
49
50 `void xapp_kbd_layout_controller_previous_group (XAppKbdLayoutController *controller);`
51
52 `gchar *xapp_kbd_layout_controller_get_current_name (XAppKbdLayoutController *controller);`
53
54 `gchar **xapp_kbd_layout_controller_get_all_names (XAppKbdLayoutController *controller);`
55
56 `gchar *xapp_kbd_layout_controller_get_current_icon_name (XAppKbdLayoutController *controller);`
57
58 `gchar *xapp_kbd_layout_controller_get_icon_name_for_group (XAppKbdLayoutController *controller, guint group);`
59
60 `gchar *xapp_kbd_layout_controller_get_short_name (XAppKbdLayoutController *controller);`
61
62 `gchar *xapp_kbd_layout_controller_get_short_name_for_group (XAppKbdLayoutController *controller, guint group);`
63
64 This is used by:
65
66 - cinnamon-screensaver
67 - cinnamon keyboard applet
0 # Configure paths for ESD
1 # Manish Singh 98-9-30
2 # stolen back from Frank Belew
3 # stolen from Manish Singh
4 # Shamelessly stolen from Owen Taylor
5
6 dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
7 dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
8 dnl
9 AC_DEFUN([AM_PATH_ESD],
10 [dnl
11 dnl Get the cflags and libraries from the esd-config script
12 dnl
13 AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)],
14 esd_prefix="$withval", esd_prefix="")
15 AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)],
16 esd_exec_prefix="$withval", esd_exec_prefix="")
17 AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program],
18 , enable_esdtest=yes)
19
20 if test x$esd_exec_prefix != x ; then
21 esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
22 if test x${ESD_CONFIG+set} != xset ; then
23 ESD_CONFIG=$esd_exec_prefix/bin/esd-config
24 fi
25 fi
26 if test x$esd_prefix != x ; then
27 esd_args="$esd_args --prefix=$esd_prefix"
28 if test x${ESD_CONFIG+set} != xset ; then
29 ESD_CONFIG=$esd_prefix/bin/esd-config
30 fi
31 fi
32
33 AC_PATH_PROG(ESD_CONFIG, esd-config, no)
34 min_esd_version=ifelse([$1], ,0.2.5,$1)
35 AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
36 no_esd=""
37 if test "$ESD_CONFIG" = "no" ; then
38 no_esd=yes
39 else
40 ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
41 ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
42
43 esd_major_version=`$ESD_CONFIG $esd_args --version | \
44 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
45 esd_minor_version=`$ESD_CONFIG $esd_args --version | \
46 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
47 esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
48 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
49 if test "x$enable_esdtest" = "xyes" ; then
50 ac_save_CFLAGS="$CFLAGS"
51 ac_save_LIBS="$LIBS"
52 CFLAGS="$CFLAGS $ESD_CFLAGS"
53 LIBS="$LIBS $ESD_LIBS"
54 dnl
55 dnl Now check if the installed ESD is sufficiently new. (Also sanity
56 dnl checks the results of esd-config to some extent
57 dnl
58 rm -f conf.esdtest
59 AC_TRY_RUN([
60 #include <stdio.h>
61 #include <stdlib.h>
62 #include <string.h>
63 #include <esd.h>
64
65 char*
66 my_strdup (char *str)
67 {
68 char *new_str;
69
70 if (str)
71 {
72 new_str = malloc ((strlen (str) + 1) * sizeof(char));
73 strcpy (new_str, str);
74 }
75 else
76 new_str = NULL;
77
78 return new_str;
79 }
80
81 int main ()
82 {
83 int major, minor, micro;
84 char *tmp_version;
85
86 system ("touch conf.esdtest");
87
88 /* HP/UX 9 (%@#!) writes to sscanf strings */
89 tmp_version = my_strdup("$min_esd_version");
90 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
91 printf("%s, bad version string\n", "$min_esd_version");
92 exit(1);
93 }
94
95 if (($esd_major_version > major) ||
96 (($esd_major_version == major) && ($esd_minor_version > minor)) ||
97 (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
98 {
99 return 0;
100 }
101 else
102 {
103 printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
104 printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
105 printf("*** best to upgrade to the required version.\n");
106 printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
107 printf("*** to point to the correct copy of esd-config, and remove the file\n");
108 printf("*** config.cache before re-running configure\n");
109 return 1;
110 }
111 }
112
113 ],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
114 CFLAGS="$ac_save_CFLAGS"
115 LIBS="$ac_save_LIBS"
116 fi
117 fi
118 if test "x$no_esd" = x ; then
119 AC_MSG_RESULT(yes)
120 ifelse([$2], , :, [$2])
121 else
122 AC_MSG_RESULT(no)
123 if test "$ESD_CONFIG" = "no" ; then
124 echo "*** The esd-config script installed by ESD could not be found"
125 echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
126 echo "*** your path, or set the ESD_CONFIG environment variable to the"
127 echo "*** full path to esd-config."
128 else
129 if test -f conf.esdtest ; then
130 :
131 else
132 echo "*** Could not run ESD test program, checking why..."
133 CFLAGS="$CFLAGS $ESD_CFLAGS"
134 LIBS="$LIBS $ESD_LIBS"
135 AC_TRY_LINK([
136 #include <stdio.h>
137 #include <esd.h>
138 ], [ return 0; ],
139 [ echo "*** The test program compiled, but did not run. This usually means"
140 echo "*** that the run-time linker is not finding ESD or finding the wrong"
141 echo "*** version of ESD. If it is not finding ESD, you'll need to set your"
142 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
143 echo "*** to the installed location Also, make sure you have run ldconfig if that"
144 echo "*** is required on your system"
145 echo "***"
146 echo "*** If you have an old version installed, it is best to remove it, although"
147 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
148 [ echo "*** The test program failed to compile or link. See the file config.log for the"
149 echo "*** exact error that occured. This usually means ESD was incorrectly installed"
150 echo "*** or that you have moved ESD since it was installed. In the latter case, you"
151 echo "*** may want to edit the esd-config script: $ESD_CONFIG" ])
152 CFLAGS="$ac_save_CFLAGS"
153 LIBS="$ac_save_LIBS"
154 fi
155 fi
156 ESD_CFLAGS=""
157 ESD_LIBS=""
158 ifelse([$3], , :, [$3])
159 fi
160 AC_SUBST(ESD_CFLAGS)
161 AC_SUBST(ESD_LIBS)
162 rm -f conf.esdtest
163 ])
0 #!/bin/sh
1
2 srcdir=`dirname $0`
3 test -z "$srcdir" && srcdir=.
4
5 which gnome-autogen.sh || {
6 echo "You need to install gnome-common from GNOME Git (or from"
7 echo "your OS vendor's package manager)."
8 exit 1
9 }
10 . gnome-autogen.sh
0
1 AC_INIT(xapp, 1.0.2)
2 AC_CONFIG_SRCDIR(libxapp)
3
4 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar])
5 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
6
7 AC_CONFIG_HEADERS([config.h])
8
9 AC_CONFIG_MACRO_DIR([m4])
10
11 # Before making a release, the LT_VERSION string should be modified.
12 # The string is of the form C:R:A.
13 # - If interfaces have been changed or added, but binary compatibility has
14 # been preserved, change to C+1:0:A+1
15 # - If binary compatibility has been broken (eg removed or changed interfaces)
16 # change to C+1:0:0
17 # - If the interface is the same as the previous version, change to C:R+1:A
18
19 LT_VERSION=1:0:0
20 AC_SUBST(LT_VERSION)
21
22 LT_PREREQ([2.2.6])
23 LT_INIT([dlopen win32-dll disable-static])
24
25 IT_PROG_INTLTOOL([0.40.6])
26
27 AC_PROG_CC
28 PKG_PROG_PKG_CONFIG
29
30 GNOME_COMPILE_WARNINGS([maximum])
31 GNOME_MAINTAINER_MODE_DEFINES
32
33 AC_ARG_ENABLE(deprecation_flags,
34 [AC_HELP_STRING([--enable-deprecation-flags],
35 [use *_DISABLE_DEPRECATED flags @<:@default=no@:>@])],,
36 [enable_deprecation_flags=no])
37
38 if test "x$enable_deprecation_flags" = "xyes"; then
39 DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
40 AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
41 fi
42
43 dnl If you add a version number here, you *must* add an AC_SUBST line for
44 dnl it too, or it will never make it into the spec file!
45
46 GDK_PIXBUF_REQUIRED=2.22.0
47 GTK_REQUIRED=3.3.16
48 GLIB_REQUIRED=2.37.3
49
50 AC_SUBST(GTK_REQUIRED)
51 AC_SUBST(GLIB_REQUIRED)
52 AC_SUBST(GDK_PIXBUF_REQUIRED)
53
54 PKG_CHECK_MODULES(XLIB, x11,
55 X11_PACKAGE=x11,
56 [X11_PACKAGE=
57 AC_PATH_XTRA
58 if test "x$no_x" = xyes; then
59 AC_MSG_ERROR("no (requires X development libraries)")
60 else
61 XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
62 XLIB_CFLAGS=$X_CFLAGS
63 fi])
64 AC_SUBST(X11_PACKAGE)
65 AC_SUBST(XLIB_CFLAGS)
66 AC_SUBST(XLIB_LIBS)
67
68 dnl pkg-config dependency checks
69
70 PKG_CHECK_MODULES(XAPP, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED
71 gtk+-3.0 >= $GTK_REQUIRED
72 glib-2.0 >= $GLIB_REQUIRED
73 gio-2.0 >= $GLIB_REQUIRED
74 cairo
75 libgnomekbdui)
76
77 dnl Language Support
78
79 GETTEXT_PACKAGE=xapp
80 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
81 [The gettext translation domain])
82 AC_SUBST(GETTEXT_PACKAGE)
83
84 AM_GLIB_GNU_GETTEXT
85
86 GLIB_GSETTINGS
87
88 GOBJECT_INTROSPECTION_CHECK([0.9.7])
89
90 AC_CONFIG_FILES([
91 Makefile
92 libxapp/Makefile
93 libxapp/xapp.pc
94 libxapp/xapp-uninstalled.pc
95 schemas/Makefile
96 po/Makefile.in
97 files/Makefile
98 ])
99
100 AC_OUTPUT
101
102 dnl ---------------------------------------------------------------------------
103 dnl - Show summary
104 dnl ---------------------------------------------------------------------------
105
106 echo "
107
108 prefix: ${prefix}
109 exec_prefix: ${exec_prefix}
110 libdir: ${libdir}
111 bindir: ${bindir}
112 sbindir: ${sbindir}
113 sysconfdir: ${sysconfdir}
114 localstatedir: ${localstatedir}
115 datadir: ${datadir}
116 source code location: ${srcdir}
117 compiler: ${CC}
118 cflags: ${CFLAGS}
119 Maintainer mode: ${USE_MAINTAINER_MODE}
120 Use *_DISABLE_DEPRECATED: ${enable_deprecation_flags}
121
122 "
0 install-data-hook:
1 find -mindepth 1 -maxdepth 1 -type d -exec cp -R {} $(DESTDIR)/ \;
2
3 uninstall-hook:
4 find -mindepth 1 -type f -exec rm $(DESTDIR)/{} \;
0 #!/usr/bin/python3
1
2 import sys
3 import os
4 import stat
5 import subprocess
6
7 content = ""
8
9 mode = os.fstat(0).st_mode
10 if stat.S_ISFIFO(mode):
11 content = sys.stdin.read()
12 elif stat.S_ISREG(mode):
13 content = sys.stdin.read()
14 else:
15 args = sys.argv[1:]
16 if len(args) == 1 and os.path.exists(args[0]):
17 with open(args[0], 'r') as infile:
18 content = infile.read()
19 else:
20 str_args = ' '.join(args)
21 content = str_args
22
23 if content != "":
24 for paster in ['/usr/bin/gist-paste', '/usr/bin/fpaste']:
25 if os.path.exists(paster):
26 p = subprocess.Popen([paster], stdin=subprocess.PIPE)
27 p.communicate(content.encode("UTF-8"))
0 #!/usr/bin/python3
1
2 import subprocess, os
3
4 inxi = subprocess.Popen(['inxi', '-Fxxrzc0'], stdout=subprocess.PIPE)
5 pastebin = subprocess.Popen(['/usr/bin/pastebin'], stdin=inxi.stdout, stdout=subprocess.PIPE)
6 inxi.stdout.close()
7 output = pastebin.communicate()[0]
8 output = output.split()[0] # if we have more than one URL, only use the first one
9 pastebin.wait()
10 subprocess.call(['xdg-open', output])
0 #!/bin/bash
1
2 # Author: Weitian Leung <weitianleung@gmail.com>
3 # Version: 2.0
4 # License: GPL-3.0
5 # Description: set a picture as xfce4 wallpaper
6
7 wallpaper=$1
8
9 # check image
10 mime_type=`file --mime-type -b "$wallpaper"`
11 if [[ ! "$mime_type" == image/* ]]; then
12 echo "Invalid image"
13 exit 1
14 fi
15
16 # set to every monitor that contains image-path/last-image
17 properties=$(xfconf-query -c xfce4-desktop -p /backdrop -l | grep -e "screen.*/monitor.*image-path$" -e "screen.*/monitor.*/last-image$")
18
19 for property in $properties; do
20 xfconf-query -c xfce4-desktop -p $property -s "$wallpaper"
21 done
22
23
24
25
26
27
28
29
30
31
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <!-- Created with Inkscape (http://www.inkscape.org/) -->
2
3 <svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11 id="svg7384"
12 height="16"
13 width="16"
14 version="1.1"
15 inkscape:version="0.91 r13725"
16 sodipodi:docname="xapp-search-entire-word-symbolic.svg">
17 <defs
18 id="defs7667" />
19 <sodipodi:namedview
20 pagecolor="#ffffff"
21 bordercolor="#666666"
22 borderopacity="1"
23 objecttolerance="10"
24 gridtolerance="10"
25 guidetolerance="10"
26 inkscape:pageopacity="0"
27 inkscape:pageshadow="2"
28 inkscape:window-width="1479"
29 inkscape:window-height="852"
30 id="namedview7665"
31 showgrid="true"
32 inkscape:zoom="22.627417"
33 inkscape:cx="11.198507"
34 inkscape:cy="11.756873"
35 inkscape:window-x="2265"
36 inkscape:window-y="90"
37 inkscape:window-maximized="0"
38 inkscape:current-layer="g4147"
39 inkscape:snap-bbox="true"
40 inkscape:bbox-paths="true"
41 inkscape:snap-bbox-midpoints="true"
42 inkscape:snap-bbox-edge-midpoints="true"
43 inkscape:bbox-nodes="true"
44 inkscape:snap-intersection-paths="true"
45 inkscape:object-nodes="true">
46 <inkscape:grid
47 type="xygrid"
48 id="grid4148" />
49 </sodipodi:namedview>
50 <metadata
51 id="metadata90">
52 <rdf:RDF>
53 <cc:Work
54 rdf:about="">
55 <dc:format>image/svg+xml</dc:format>
56 <dc:type
57 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
58 <dc:title>Gnome Symbolic Icon Theme</dc:title>
59 </cc:Work>
60 </rdf:RDF>
61 </metadata>
62 <title
63 id="title9167">Gnome Symbolic Icon Theme</title>
64 <g
65 id="g4147"
66 style="fill:#bebebe;fill-opacity:1;stroke:none"
67 transform="matrix(1.3889016,0,0,1.3889016,-3.0103731,-3.5159478)">
68 <g
69 transform="scale(1.1627898,0.86000064)"
70 style="font-style:normal;font-weight:normal;font-size:23.34823418px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
71 id="text4138-6">
72 <path
73 d="m 9.9135395,5.4551583 1.8575845,-2e-7 0,2.8410321 c 0,2.0390788 -0.631802,3.0193748 -1.8575845,3.0193748 l 3e-7,-0.837201 c 0.3385492,-0.03113 0.5778682,-0.2446 0.7179572,-0.5403447 0.14009,-0.2957443 0.210134,-0.8405365 0.210134,-1.6343764 l -0.0051,-0.3370195 -0.9229612,0 z"
74 style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#bebebe;fill-opacity:1;stroke:none"
75 id="path4157"
76 inkscape:connector-curvature="0"
77 sodipodi:nodetypes="ccsccssccc" />
78 <path
79 sodipodi:nodetypes="ccsccssccc"
80 inkscape:connector-curvature="0"
81 id="path4159"
82 style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#bebebe;fill-opacity:1;stroke:none"
83 d="m 7.4367607,5.4551581 1.8575849,-2e-7 0,2.8410321 c 0,2.039079 -0.631802,3.019375 -1.8575849,3.019375 l 3e-7,-0.837201 c 0.3385493,-0.03113 0.5778685,-0.2446 0.7179576,-0.5403449 0.14009,-0.2957443 0.210134,-0.8405365 0.210134,-1.6343764 l -0.0051,-0.3370195 -0.9229616,0 z" />
84 <path
85 d="m 6.1983412,11.315703 -1.8575849,0 0,-2.8410321 c 0,-2.039079 0.631802,-3.019375 1.8575849,-3.019375 l -3e-7,0.837201 c -0.3385493,0.03113 -0.5778685,0.2446 -0.7179576,0.5403449 -0.14009,0.2957443 -0.210134,0.8405365 -0.210134,1.6343764 l 0.0051,0.3370195 0.9229616,0 z"
86 style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#bebebe;fill-opacity:1;stroke:none"
87 id="path4161"
88 inkscape:connector-curvature="0"
89 sodipodi:nodetypes="ccsccssccc" />
90 <path
91 sodipodi:nodetypes="ccsccssccc"
92 inkscape:connector-curvature="0"
93 id="path4163"
94 style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:FreeSans;-inkscape-font-specification:FreeSans;fill:#bebebe;fill-opacity:1;stroke:none"
95 d="m 3.7215923,11.315565 -1.8575849,0 0,-2.8410319 c 0,-2.039079 0.631802,-3.019375 1.8575849,-3.019375 l -3e-7,0.837201 c -0.3385493,0.03113 -0.5778685,0.2446 -0.7179576,0.5403449 -0.14009,0.2957443 -0.210134,0.8405365 -0.210134,1.6343764 l 0.0051,0.3370195 0.9229616,0 z" />
96 </g>
97 </g>
98 </svg>
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <!-- Created with Inkscape (http://www.inkscape.org/) -->
2
3 <svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11 id="svg7384"
12 height="16"
13 width="16"
14 version="1.1"
15 inkscape:version="0.91 r13725"
16 sodipodi:docname="xapp-search-wrap-symbolic.svg">
17 <defs
18 id="defs9" />
19 <sodipodi:namedview
20 pagecolor="#ffffff"
21 bordercolor="#666666"
22 borderopacity="1"
23 objecttolerance="10"
24 gridtolerance="10"
25 guidetolerance="10"
26 inkscape:pageopacity="0"
27 inkscape:pageshadow="2"
28 inkscape:window-width="1236"
29 inkscape:window-height="795"
30 id="namedview7"
31 showgrid="true"
32 inkscape:snap-bbox="true"
33 inkscape:bbox-paths="true"
34 inkscape:bbox-nodes="true"
35 inkscape:snap-bbox-edge-midpoints="true"
36 inkscape:snap-bbox-midpoints="true"
37 inkscape:object-paths="true"
38 inkscape:snap-intersection-paths="true"
39 inkscape:object-nodes="true"
40 inkscape:snap-smooth-nodes="true"
41 inkscape:zoom="41.7193"
42 inkscape:cx="10.555301"
43 inkscape:cy="7.666891"
44 inkscape:window-x="583"
45 inkscape:window-y="99"
46 inkscape:window-maximized="0"
47 inkscape:current-layer="svg7384">
48 <inkscape:grid
49 type="xygrid"
50 id="grid4137" />
51 </sodipodi:namedview>
52 <metadata
53 id="metadata90">
54 <rdf:RDF>
55 <cc:Work
56 rdf:about="">
57 <dc:format>image/svg+xml</dc:format>
58 <dc:type
59 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
60 <dc:title>Gnome Symbolic Icon Theme</dc:title>
61 </cc:Work>
62 </rdf:RDF>
63 </metadata>
64 <title
65 id="title9167">Gnome Symbolic Icon Theme</title>
66 <path
67 style="opacity:1;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
68 d="M 2,1 C 1.446,1 1,1.446 1,2 l 0,12 c 0,0.554 0.446,1 1,1 l 11,0 c 0.554,0 0.82481,-0.474429 1,-1 l 0,-3 -2,0 0,1 c 0,0.554 -0.446,1 -1,1 L 4,13 C 3.446,13 3,12.554 3,12 L 3,4 C 3,3.446 3.446,3 4,3 l 7,0 c 0.554,0 1,0.4726696 1,1 l 0,1 -2,0 0,1 3,3 3,-3 0,-1 -2,0 0,-3 C 14,1.446 13.554,1 13,1 Z"
69 id="rect4144"
70 inkscape:connector-curvature="0"
71 sodipodi:nodetypes="ssssscccsssssssscccccccsss" />
72 </svg>
0 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
1 <!-- Created with Inkscape (http://www.inkscape.org/) -->
2
3 <svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11 id="svg7384"
12 height="16"
13 width="16"
14 version="1.1"
15 inkscape:version="0.91 r13725"
16 sodipodi:docname="xapp-text-case-symbolic.svg">
17 <defs
18 id="defs7667" />
19 <sodipodi:namedview
20 pagecolor="#ffffff"
21 bordercolor="#666666"
22 borderopacity="1"
23 objecttolerance="10"
24 gridtolerance="10"
25 guidetolerance="10"
26 inkscape:pageopacity="0"
27 inkscape:pageshadow="2"
28 inkscape:window-width="1560"
29 inkscape:window-height="849"
30 id="namedview7665"
31 showgrid="true"
32 inkscape:zoom="32"
33 inkscape:cx="1.8642481"
34 inkscape:cy="7.8505367"
35 inkscape:window-x="2231"
36 inkscape:window-y="204"
37 inkscape:window-maximized="0"
38 inkscape:current-layer="g4147"
39 inkscape:snap-bbox="true"
40 inkscape:bbox-paths="true"
41 inkscape:snap-bbox-edge-midpoints="true"
42 inkscape:bbox-nodes="true"
43 inkscape:snap-bbox-midpoints="true">
44 <inkscape:grid
45 type="xygrid"
46 id="grid4138" />
47 </sodipodi:namedview>
48 <metadata
49 id="metadata90">
50 <rdf:RDF>
51 <cc:Work
52 rdf:about="">
53 <dc:format>image/svg+xml</dc:format>
54 <dc:type
55 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
56 <dc:title>Gnome Symbolic Icon Theme</dc:title>
57 </cc:Work>
58 </rdf:RDF>
59 </metadata>
60 <title
61 id="title9167">Gnome Symbolic Icon Theme</title>
62 <g
63 id="g4147"
64 style="fill:#bebebe;fill-opacity:1;stroke:none"
65 transform="matrix(1.3889016,0,0,1.3889016,-3.0103731,-3.5159478)">
66 <g
67 transform="matrix(0.83484587,0,0,1.0714235,1.697848,-0.28559499)"
68 style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:11.25px;line-height:125%;font-family:'Noto Sans UI';-inkscape-font-specification:'Noto Sans UI, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
69 id="flowRoot4140">
70 <path
71 d="m 6.489624,12.037222 -0.5822754,-1.911621 -2.9278564,0 -0.5822754,1.911621 -1.8347168,0 2.8344727,-8.0639647 2.0819091,0 2.845459,8.0639647 -1.8347168,0 z M 5.5008545,8.6973784 Q 4.6933594,6.0991118 4.5889893,5.7585356 4.4901123,5.4179594 4.446167,5.2202055 4.2648926,5.9233305 3.407959,8.6973784 l 2.0928955,0 z"
72 id="path4160"
73 inkscape:connector-curvature="0" />
74 </g>
75 <g
76 transform="matrix(1.0955533,0,0,1.2543973,-0.50361273,-1.4227521)"
77 style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:8.09992599px;line-height:125%;font-family:'Noto Sans UI';-inkscape-font-specification:'Noto Sans UI, Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#bebebe;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
78 id="flowRoot4148">
79 <path
80 d="m 12.110808,11.108837 -0.233347,-0.601167 -0.03164,0 q -0.304539,0.383639 -0.628852,0.533931 -0.320358,0.146337 -0.838469,0.146337 -0.6367617,0 -1.0045807,-0.363864 -0.3638638,-0.363864 -0.3638638,-1.0362213 0,-0.7039975 0.4904252,-1.036221 0.4943802,-0.3361786 1.4870953,-0.371774 l 0.767279,-0.02373 0,-0.1937971 q 0,-0.6723571 -0.688178,-0.6723571 -0.529975,0 -1.2458379,0.3203584 L 9.4213799,6.995593 q 0.7633231,-0.3994592 1.6927581,-0.3994592 0.889884,0 1.364489,0.3875941 0.474605,0.3875941 0.474605,1.1786025 l 0,2.9465066 -0.842424,0 z m -0.355953,-2.0487121 -0.466695,0.01582 q -0.526021,0.01582 -0.783099,0.189842 -0.257077,0.1740219 -0.257077,0.5299757 0,0.5102004 0.585346,0.5102004 0.419234,0 0.668402,-0.241257 0.253123,-0.2412581 0.253123,-0.6407174 l 0,-0.3638639 z"
81 id="path4157"
82 inkscape:connector-curvature="0" />
83 </g>
84 </g>
85 </svg>
0 CLEANFILES =
1
2 noinst_LTLIBRARIES =
3 lib_LTLIBRARIES = libxapp.la
4
5 AM_CPPFLAGS = \
6 -I$(top_srcdir) \
7 $(XAPP_CFLAGS) \
8 $(XLIB_CFLAGS) \
9 -DG_LOG_DOMAIN=\"XApp\" \
10 -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale\"" \
11 $(DISABLE_DEPRECATED_CFLAGS)
12
13 AM_CFLAGS = $(WARN_CFLAGS)
14
15 introspection_sources = \
16 xapp-monitor-blanker.c \
17 xapp-kbd-layout-controller.c
18
19 libxapp_la_SOURCES = \
20 $(introspection_sources)
21
22 libxapp_la_LIBADD = \
23 $(XLIB_LIBS) \
24 $(XAPP_LIBS) \
25 -lrt
26
27 libxapp_la_LDFLAGS = \
28 -version-info $(LT_VERSION) \
29 -export-symbols-regex "^xapp_.*" \
30 -no-undefined
31
32 pkgconfigdir = $(libdir)/pkgconfig
33 pkgconfig_DATA = xapp.pc
34
35 libxappdir = $(includedir)/xapp/libxapp
36 libxapp_HEADERS = \
37 xapp-monitor-blanker.h \
38 xapp-kbd-layout-controller.h
39
40 -include $(INTROSPECTION_MAKEFILE)
41 INTROSPECTION_GIRS =
42 INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
43 INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
44
45 if HAVE_INTROSPECTION
46
47 XApp-1.0.gir: libxapp.la
48 XApp_1_0_gir_INCLUDES = GObject-2.0 Gtk-3.0
49 XApp_1_0_gir_PACKAGES = gdk-pixbuf-2.0 glib-2.0 gobject-2.0 gio-2.0 gtk+-3.0
50 XApp_1_0_gir_EXPORT_PACKAGES = xapp
51 XApp_1_0_gir_CFLAGS = -I$(top_srcdir) -DWITH_INTROSPECTION
52 XApp_1_0_gir_LIBS = libxapp.la
53 XApp_1_0_gir_FILES = $(introspection_sources) $(libxapp_HEADERS)
54 XApp_1_0_gir_SCANNERFLAGS = --identifier-prefix=XApp --symbol-prefix=xapp_
55 INTROSPECTION_GIRS += XApp-1.0.gir
56
57 girdir = $(datadir)/gir-1.0
58 gir_DATA = $(INTROSPECTION_GIRS)
59
60 typelibdir = $(libdir)/girepository-1.0
61 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
62
63 CLEANFILES += $(gir_DATA) $(typelib_DATA)
64 endif
65
66 EXTRA_DIST = \
67 xapp.pc.in \
68 xapp-uninstalled.pc.in \
69 $(pnpdata_DATA_dist)
70
71 -include $(top_srcdir)/git.mk
0
1 #include <config.h>
2
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <string.h>
6 #include <math.h>
7
8 #include <glib/gstdio.h>
9 #include <gdk/gdk.h>
10 #include <gtk/gtk.h>
11
12 #include <libgnomekbd/gkbd-configuration.h>
13
14 #include "xapp-kbd-layout-controller.h"
15
16 enum
17 {
18 PROP_0,
19
20 PROP_ENABLED
21 };
22
23 enum
24 {
25 KBD_LAYOUT_CHANGED,
26 KBD_CONFIG_CHANGED,
27
28 LAST_SIGNAL
29 };
30
31 static guint signals[LAST_SIGNAL] = { 0, };
32
33 typedef struct
34 {
35 gchar *group_name;
36 gchar *variant_name;
37
38 gchar *group_label;
39 gint group_dupe_id;
40
41 gchar *variant_label;
42 gint variant_dupe_id;
43 } GroupData;
44
45 #define GROUP_DATA(ptr, idx) ((GroupData *) g_ptr_array_index (ptr, idx))
46
47 static void
48 group_data_free (GroupData *data)
49 {
50 g_clear_pointer (&data->group_name, g_free);
51 g_clear_pointer (&data->group_label, g_free);
52 g_clear_pointer (&data->variant_label, g_free);
53 data->group_dupe_id = 0;
54 data->variant_dupe_id = 0;
55
56 g_slice_free (GroupData, data);
57 }
58
59 struct _XAppKbdLayoutControllerPrivate
60 {
61 GkbdConfiguration *config;
62
63 gint num_groups;
64
65 GPtrArray *group_data;
66
67 gulong changed_id;
68 gulong group_changed_id;
69 guint idle_changed_id;
70
71 gboolean enabled;
72 };
73
74 G_DEFINE_TYPE (XAppKbdLayoutController, xapp_kbd_layout_controller, G_TYPE_OBJECT);
75
76 static void
77 clear_stores (XAppKbdLayoutController *controller)
78 {
79 XAppKbdLayoutControllerPrivate *priv = controller->priv;
80
81 g_clear_pointer (&priv->group_data, g_ptr_array_unref);
82 }
83
84 static gchar *
85 create_label (XAppKbdLayoutController *controller,
86 const gchar *name,
87 gint dupe_id)
88 {
89 if (g_utf8_validate (name, -1, NULL))
90 {
91 gchar utf8[20];
92 gchar *utf8_cased = NULL;
93
94 g_utf8_strncpy (utf8, name, 2);
95
96 utf8_cased = g_utf8_strdown (utf8, -1);
97
98 GString *string = g_string_new (utf8_cased);
99
100 g_free (utf8_cased);
101
102 if (dupe_id > 0)
103 {
104 string = g_string_append_unichar (string, 0x2080 + dupe_id);
105 }
106
107 return g_string_free (string, FALSE);
108 }
109
110 return NULL;
111 }
112
113 static void
114 load_stores (XAppKbdLayoutController *controller)
115 {
116 XAppKbdLayoutControllerPrivate *priv = controller->priv;
117
118 gchar **group_names = gkbd_configuration_get_group_names (priv->config);
119 priv->num_groups = g_strv_length (group_names);
120
121 /* We do nothing if there's only one keyboard layout enabled */
122 if (priv->num_groups == 1)
123 {
124 priv->enabled = FALSE;
125 return;
126 }
127
128 priv->enabled = TRUE;
129
130 /* Populate the GroupData pointer array */
131
132 gint i, j, group_dupe_id, variant_dupe_id;
133 GPtrArray *list = g_ptr_array_new_with_free_func ((GDestroyNotify) group_data_free);
134
135 for (i = 0; i < priv->num_groups; i++)
136 {
137 GroupData *data = g_slice_new0 (GroupData);
138
139 /* Iterate through group names, figure out subscript values for duplicates */
140
141 gchar *group_name = gkbd_configuration_get_group_name (priv->config, i);
142 group_dupe_id = 0;
143
144 for (j = 0; j < list->len; j++)
145 {
146 GroupData *iter = g_ptr_array_index (list, j);
147
148 if (g_strcmp0 (group_name, iter->group_name) == 0)
149 {
150 group_dupe_id++;
151 iter->group_dupe_id = group_dupe_id;
152 }
153 }
154
155 if (group_dupe_id > 0)
156 {
157 group_dupe_id++;
158 }
159
160 data->group_name = group_name;
161 data->group_dupe_id = group_dupe_id;
162
163 /* Iterate through layout/variant names, figure out subscript values for duplicates */
164
165 gchar *variant_name = gkbd_configuration_extract_layout_name (priv->config, i);
166 variant_dupe_id = 0;
167
168 for (j = 0; j < list->len; j++)
169 {
170 GroupData *iter = g_ptr_array_index (list, j);
171
172 if (g_strcmp0 (variant_name, iter->variant_name) == 0)
173 {
174 variant_dupe_id++;
175 iter->variant_dupe_id = variant_dupe_id;
176 }
177 }
178
179 if (variant_dupe_id > 0)
180 {
181 variant_dupe_id++;
182 }
183
184 data->variant_name = variant_name;
185 data->variant_dupe_id = variant_dupe_id;
186
187 /* Finally, add the GroupData slice to the array */
188 g_ptr_array_add (list, data);
189 }
190
191 for (i = 0; i < priv->num_groups; i++)
192 {
193 GroupData *data = g_ptr_array_index (list, i);
194
195 /* Now generate labels for group names and for variant names. This is done
196 * in its own loop after the initial run, because previous dupe ids could have
197 * changed later in the loop.
198 */
199
200 data->group_label = create_label (controller, data->group_name, data->group_dupe_id);
201 data->variant_label = create_label (controller, data->variant_name, data->variant_dupe_id);
202 }
203
204 priv->group_data = list;
205 }
206
207 static gboolean
208 idle_config_changed (XAppKbdLayoutController *controller)
209 {
210 XAppKbdLayoutControllerPrivate *priv = controller->priv;
211
212 clear_stores (controller);
213 load_stores (controller);
214
215 if (gkbd_configuration_get_current_group (priv->config) >= priv->num_groups)
216 {
217 xapp_kbd_layout_controller_set_current_group (controller, 0);
218 }
219
220 g_signal_emit (controller, signals[KBD_CONFIG_CHANGED], 0);
221
222 priv->idle_changed_id = 0;
223 return FALSE;
224 }
225
226 static void
227 on_configuration_changed (GkbdConfiguration *config,
228 XAppKbdLayoutController *controller)
229 {
230 XAppKbdLayoutControllerPrivate *priv = controller->priv;
231
232 if (priv->idle_changed_id != 0)
233 {
234 g_source_remove (priv->idle_changed_id);
235 priv->idle_changed_id = 0;
236 }
237
238 priv->idle_changed_id = g_idle_add ((GSourceFunc) idle_config_changed, controller);
239 }
240
241
242 static void
243 on_configuration_group_changed (GkbdConfiguration *config,
244 gint group,
245 XAppKbdLayoutController *controller)
246 {
247 g_signal_emit (controller, signals[KBD_LAYOUT_CHANGED], 0, (guint) group);
248 }
249
250 static void
251 xapp_kbd_layout_controller_init (XAppKbdLayoutController *controller)
252 {
253 controller->priv = G_TYPE_INSTANCE_GET_PRIVATE (controller, XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutControllerPrivate);
254
255 XAppKbdLayoutControllerPrivate *priv = controller->priv;
256
257 priv->config = gkbd_configuration_get ();
258 priv->enabled = FALSE;
259 priv->idle_changed_id = 0;
260
261 priv->group_data = NULL;
262 }
263
264 static void
265 xapp_kbd_layout_controller_constructed (GObject *object)
266 {
267 G_OBJECT_CLASS (xapp_kbd_layout_controller_parent_class)->constructed (object);
268
269 XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (object);
270 XAppKbdLayoutControllerPrivate *priv = controller->priv;
271
272 gkbd_configuration_start_listen (priv->config);
273
274 priv->changed_id = g_signal_connect_object (priv->config,
275 "changed",
276 G_CALLBACK (on_configuration_changed),
277 controller, 0);
278
279 priv->group_changed_id = g_signal_connect_object (priv->config,
280 "group-changed",
281 G_CALLBACK (on_configuration_group_changed),
282 controller, 0);
283 clear_stores (controller);
284 load_stores (controller);
285 }
286
287 static void
288 xapp_kbd_layout_controller_get_property (GObject *gobject,
289 guint prop_id,
290 GValue *value,
291 GParamSpec *pspec)
292 {
293 XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (gobject);
294 XAppKbdLayoutControllerPrivate *priv = controller->priv;
295
296 switch (prop_id)
297 {
298 case PROP_ENABLED:
299 g_value_set_boolean (value, priv->enabled);
300 break;
301 default:
302 G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
303 break;
304 }
305 }
306
307 static void
308 xapp_kbd_layout_controller_dispose (GObject *object)
309 {
310 XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (object);
311 XAppKbdLayoutControllerPrivate *priv = controller->priv;
312
313 gkbd_configuration_stop_listen (priv->config);
314
315 clear_stores (controller);
316
317 if (priv->changed_id > 0)
318 {
319 g_signal_handler_disconnect (priv->config, priv->changed_id);
320 priv->changed_id = 0;
321 }
322
323 if (priv->group_changed_id > 0)
324 {
325 g_signal_handler_disconnect (priv->config, priv->group_changed_id);
326 priv->group_changed_id = 0;
327 }
328
329 if (priv->idle_changed_id != 0)
330 {
331 g_source_remove (priv->idle_changed_id);
332 priv->idle_changed_id = 0;
333 }
334
335 G_OBJECT_CLASS (xapp_kbd_layout_controller_parent_class)->dispose (object);
336 }
337
338 static void
339 xapp_kbd_layout_controller_finalize (GObject *object)
340 {
341 XAppKbdLayoutController *controller = XAPP_KBD_LAYOUT_CONTROLLER (object);
342 XAppKbdLayoutControllerPrivate *priv = controller->priv;
343
344 g_clear_object (&priv->config);
345
346 G_OBJECT_CLASS (xapp_kbd_layout_controller_parent_class)->finalize (object);
347 }
348
349 static void
350 xapp_kbd_layout_controller_class_init (XAppKbdLayoutControllerClass *klass)
351 {
352 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
353
354 gobject_class->dispose = xapp_kbd_layout_controller_dispose;
355 gobject_class->finalize = xapp_kbd_layout_controller_finalize;
356 gobject_class->get_property = xapp_kbd_layout_controller_get_property;
357 gobject_class->constructed = xapp_kbd_layout_controller_constructed;
358
359 g_type_class_add_private (gobject_class, sizeof (XAppKbdLayoutControllerPrivate));
360
361 g_object_class_install_property (gobject_class, PROP_ENABLED,
362 g_param_spec_boolean ("enabled",
363 "Enabled",
364 "Whether we're enabled (more than one keyboard layout is installed)",
365 FALSE,
366 G_PARAM_READABLE)
367 );
368
369 signals[KBD_LAYOUT_CHANGED] = g_signal_new ("layout-changed",
370 G_TYPE_FROM_CLASS (gobject_class),
371 G_SIGNAL_RUN_LAST,
372 0,
373 NULL, NULL,
374 g_cclosure_marshal_VOID__UINT,
375 G_TYPE_NONE,
376 1, G_TYPE_UINT);
377
378 signals[KBD_CONFIG_CHANGED] = g_signal_new ("config-changed",
379 G_TYPE_FROM_CLASS (gobject_class),
380 G_SIGNAL_RUN_LAST,
381 0,
382 NULL, NULL,
383 g_cclosure_marshal_VOID__VOID,
384 G_TYPE_NONE,
385 0, G_TYPE_NONE);
386 }
387
388 XAppKbdLayoutController *
389 xapp_kbd_layout_controller_new (void)
390 {
391 return g_object_new (XAPP_TYPE_KBD_LAYOUT_CONTROLLER, NULL);
392 }
393
394 gboolean
395 xapp_kbd_layout_controller_get_enabled (XAppKbdLayoutController *controller)
396 {
397 return controller->priv->enabled;
398 }
399
400 guint
401 xapp_kbd_layout_controller_get_current_group (XAppKbdLayoutController *controller)
402 {
403 g_return_val_if_fail (controller->priv->enabled, 0);
404
405 return gkbd_configuration_get_current_group (controller->priv->config);
406 }
407
408 void
409 xapp_kbd_layout_controller_set_current_group (XAppKbdLayoutController *controller,
410 guint group)
411 {
412 g_return_if_fail (controller->priv->enabled);
413 g_return_if_fail (group <= controller->priv->num_groups);
414
415 guint current = gkbd_configuration_get_current_group (controller->priv->config);
416
417 if (current != group)
418 {
419 gkbd_configuration_lock_group (controller->priv->config, group);
420 }
421 }
422
423 void
424 xapp_kbd_layout_controller_next_group (XAppKbdLayoutController *controller)
425 {
426 g_return_if_fail (controller->priv->enabled);
427
428 gkbd_configuration_lock_next_group (controller->priv->config);
429 }
430
431 void
432 xapp_kbd_layout_controller_previous_group (XAppKbdLayoutController *controller)
433 {
434 g_return_if_fail (controller->priv->enabled);
435
436 XAppKbdLayoutControllerPrivate *priv = controller->priv;
437
438 gint current = gkbd_configuration_get_current_group (priv->config);
439
440 if (current > 0)
441 {
442 current--;
443 }
444 else
445 {
446 current = priv->num_groups - 1;
447 }
448
449 gkbd_configuration_lock_group (controller->priv->config, current);
450 }
451
452 /**
453 * xapp_kbd_layout_controller_get_current_name:
454 *
455 * Returns the full name of the current keyboard layout.
456 *
457 * Returns: (transfer full): the newly created string or NULL
458 * if something went wrong.
459 */
460 gchar *
461 xapp_kbd_layout_controller_get_current_name (XAppKbdLayoutController *controller)
462 {
463 g_return_val_if_fail (controller->priv->enabled, NULL);
464
465 return gkbd_configuration_get_current_tooltip (controller->priv->config);
466 }
467
468 /**
469 * xapp_kbd_layout_controller_get_all_names:
470 *
471 * Returns an array of all full layout names
472 *
473 * Returns: (transfer none) (array zero-terminated=1): array of names
474 */
475 gchar **
476 xapp_kbd_layout_controller_get_all_names (XAppKbdLayoutController *controller)
477 {
478 g_return_val_if_fail (controller->priv->enabled, NULL);
479
480 return gkbd_configuration_get_group_names (controller->priv->config);
481 }
482
483 /**
484 * xapp_kbd_layout_controller_get_current_icon_name:
485 *
486 * Returns the icon file name (no path or extension) to use for the current layout
487 *
488 * Returns: (transfer full): a new string with the icon name.
489 */
490 gchar *
491 xapp_kbd_layout_controller_get_current_icon_name (XAppKbdLayoutController *controller)
492 {
493 g_return_val_if_fail (controller->priv->enabled, NULL);
494
495 XAppKbdLayoutControllerPrivate *priv = controller->priv;
496
497 guint current = gkbd_configuration_get_current_group (priv->config);
498
499 return g_strdup (GROUP_DATA (priv->group_data, current)->group_name);
500 }
501
502 /**
503 * xapp_kbd_layout_controller_get_icon_name_for_group:
504 *
505 * Returns the icon file name (no path or extension) to use for the specified layout.
506 *
507 * Returns: (transfer full): a new string with the icon name.
508 */
509 gchar *
510 xapp_kbd_layout_controller_get_icon_name_for_group (XAppKbdLayoutController *controller,
511 guint group)
512 {
513 g_return_val_if_fail (controller->priv->enabled, NULL);
514 g_return_val_if_fail (group <= controller->priv->num_groups, NULL);
515
516 XAppKbdLayoutControllerPrivate *priv = controller->priv;
517
518 return g_strdup (GROUP_DATA (priv->group_data, group)->group_name);
519 }
520
521 /**
522 * xapp_kbd_layout_controller_get_current_flag_id:
523 *
524 * Returns the duplicate id for the current layout
525 *
526 * Returns: the id
527 */
528 gint
529 xapp_kbd_layout_controller_get_current_flag_id (XAppKbdLayoutController *controller)
530 {
531 g_return_val_if_fail (controller->priv->enabled, 0);
532
533 XAppKbdLayoutControllerPrivate *priv = controller->priv;
534
535 guint current = gkbd_configuration_get_current_group (priv->config);
536
537 return GROUP_DATA (priv->group_data, current)->group_dupe_id;
538 }
539
540
541 /**
542 * xapp_kbd_layout_controller_flag_id_for_group:
543 *
544 * Returns the duplicate id for the specified layout
545 *
546 * Returns: the id
547 */
548 gint
549 xapp_kbd_layout_controller_get_flag_id_for_group (XAppKbdLayoutController *controller,
550 guint group)
551 {
552 g_return_val_if_fail (controller->priv->enabled, 0);
553 g_return_val_if_fail (group < controller->priv->num_groups, 0);
554
555 XAppKbdLayoutControllerPrivate *priv = controller->priv;
556
557 return GROUP_DATA (priv->group_data, group)->group_dupe_id;
558 }
559
560 /**
561 * xapp_kbd_layout_controller_get_current_short_group_label:
562 *
563 * Returns the short group label (and subscript, if any) of the current layout
564 *
565 * Returns: (transfer full): a new string or NULL.
566 */
567 gchar *
568 xapp_kbd_layout_controller_get_current_short_group_label (XAppKbdLayoutController *controller)
569 {
570 g_return_val_if_fail (controller->priv->enabled, NULL);
571
572 XAppKbdLayoutControllerPrivate *priv = controller->priv;
573
574 guint current = gkbd_configuration_get_current_group (priv->config);
575
576 return g_strdup (GROUP_DATA (priv->group_data, current)->group_label);
577 }
578
579 /**
580 * xapp_kbd_layout_controller_get_short_group_label_for_group:
581 *
582 * Returns the short group label and subscript of the specified layout.
583 *
584 * Returns: (transfer full): a new string or NULL.
585 */
586 gchar *
587 xapp_kbd_layout_controller_get_short_group_label_for_group (XAppKbdLayoutController *controller,
588 guint group)
589 {
590 g_return_val_if_fail (controller->priv->enabled, NULL);
591 g_return_val_if_fail (group < controller->priv->num_groups, NULL);
592
593 XAppKbdLayoutControllerPrivate *priv = controller->priv;
594
595
596 return g_strdup (GROUP_DATA (priv->group_data, group)->group_label);
597 }
598
599 /**
600 * xapp_kbd_layout_controller_get_current_variant_label:
601 *
602 * Returns the variant label (and subscript, if any) of the current layout
603 *
604 * Returns: (transfer full): a new string or NULL.
605 */
606 gchar *
607 xapp_kbd_layout_controller_get_current_variant_label (XAppKbdLayoutController *controller)
608 {
609 g_return_val_if_fail (controller->priv->enabled, NULL);
610
611 XAppKbdLayoutControllerPrivate *priv = controller->priv;
612
613 guint current = gkbd_configuration_get_current_group (priv->config);
614
615 return g_strdup (GROUP_DATA (priv->group_data, current)->variant_label);
616 }
617
618 /**
619 * xapp_kbd_layout_controller_get_variant_label_for_group:
620 *
621 * Returns the variant label and subscript of the specified layout.
622 *
623 * Returns: (transfer full): a new string or NULL.
624 */
625 gchar *
626 xapp_kbd_layout_controller_get_variant_label_for_group (XAppKbdLayoutController *controller,
627 guint group)
628 {
629 g_return_val_if_fail (controller->priv->enabled, NULL);
630
631 XAppKbdLayoutControllerPrivate *priv = controller->priv;
632
633 g_return_val_if_fail (group < controller->priv->num_groups, NULL);
634
635 return g_strdup (GROUP_DATA (priv->group_data, group)->variant_label);
636 }
637
638 void
639 xapp_kbd_layout_controller_render_cairo_subscript (cairo_t *cr,
640 gdouble x,
641 gdouble y,
642 gdouble width,
643 gdouble height,
644 gint subscript)
645 {
646 if (subscript == 0)
647 {
648 return;
649 }
650
651 cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, .5);
652 cairo_rectangle (cr, x, y, width, height);
653 cairo_fill (cr);
654
655 cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, .8);
656 cairo_rectangle (cr, x + 1, y + 1, width - 2, height - 2);
657 cairo_fill (cr);
658
659 cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 1.0);
660
661 gchar *num_string = g_strdup_printf ("%d", subscript);
662 cairo_select_font_face (cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
663 cairo_set_font_size (cr, height - 2.0);
664
665 cairo_text_extents_t ext;
666 cairo_text_extents (cr, num_string, &ext);
667
668 cairo_move_to (cr,
669 (x + (width / 2.0) - (ext.width / 2.0)),
670 (y + (height / 2.0) + (ext.height / 2.0)));
671
672 cairo_show_text (cr, num_string);
673 g_free (num_string);
674 }
675
0 #ifndef __XAPP_KBD_LAYOUT_CONTROLLER_H__
1 #define __XAPP_KBD_LAYOUT_CONTROLLER_H__
2
3 #include <stdio.h>
4 #include <gdk-pixbuf/gdk-pixbuf.h>
5
6 #include <glib-object.h>
7 #include <cairo.h>
8
9 G_BEGIN_DECLS
10
11 #define XAPP_TYPE_KBD_LAYOUT_CONTROLLER (xapp_kbd_layout_controller_get_type ())
12 #define XAPP_KBD_LAYOUT_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutController))
13 #define XAPP_KBD_LAYOUT_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutControllerClass))
14 #define XAPP_IS_KBD_LAYOUT_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XAPP_TYPE_KBD_LAYOUT_CONTROLLER))
15 #define XAPP_IS_KBD_LAYOUT_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XAPP_TYPE_KBD_LAYOUT_CONTROLLER))
16 #define XAPP_KBD_LAYOUT_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XAPP_TYPE_KBD_LAYOUT_CONTROLLER, XAppKbdLayoutControllerClass))
17
18 typedef struct _XAppKbdLayoutControllerPrivate XAppKbdLayoutControllerPrivate;
19 typedef struct _XAppKbdLayoutController XAppKbdLayoutController;
20 typedef struct _XAppKbdLayoutControllerClass XAppKbdLayoutControllerClass;
21
22 struct _XAppKbdLayoutController
23 {
24 GObject parent_object;
25
26 XAppKbdLayoutControllerPrivate *priv;
27 };
28
29 struct _XAppKbdLayoutControllerClass
30 {
31 GObjectClass parent_class;
32 };
33
34 GType xapp_kbd_layout_controller_get_type (void);
35 XAppKbdLayoutController *xapp_kbd_layout_controller_new (void);
36 gboolean xapp_kbd_layout_controller_get_enabled (XAppKbdLayoutController *controller);
37 guint xapp_kbd_layout_controller_get_current_group (XAppKbdLayoutController *controller);
38 void xapp_kbd_layout_controller_set_current_group (XAppKbdLayoutController *controller,
39 guint group);
40 void xapp_kbd_layout_controller_next_group (XAppKbdLayoutController *controller);
41 void xapp_kbd_layout_controller_previous_group (XAppKbdLayoutController *controller);
42 gchar *xapp_kbd_layout_controller_get_current_name (XAppKbdLayoutController *controller);
43 gchar **xapp_kbd_layout_controller_get_all_names (XAppKbdLayoutController *controller);
44
45 gchar *xapp_kbd_layout_controller_get_current_icon_name (XAppKbdLayoutController *controller);
46 gchar *xapp_kbd_layout_controller_get_icon_name_for_group (XAppKbdLayoutController *controller,
47 guint group);
48 gint xapp_kbd_layout_controller_get_current_flag_id (XAppKbdLayoutController *controller);
49 gint xapp_kbd_layout_controller_get_flag_id_for_group (XAppKbdLayoutController *controller,
50 guint group);
51 gchar *xapp_kbd_layout_controller_get_current_short_group_label (XAppKbdLayoutController *controller);
52 gchar *xapp_kbd_layout_controller_get_short_group_label_for_group (XAppKbdLayoutController *controller,
53 guint group);
54 gchar *xapp_kbd_layout_controller_get_current_variant_label (XAppKbdLayoutController *controller);
55
56 gchar *xapp_kbd_layout_controller_get_variant_label_for_group (XAppKbdLayoutController *controller,
57 guint group);
58
59 /* Class function */
60 void xapp_kbd_layout_controller_render_cairo_subscript (cairo_t *cr,
61 gdouble x,
62 gdouble y,
63 gdouble width,
64 gdouble height,
65 gint subscript);
66
67 G_END_DECLS
68
69 #endif /* __XAPP_KBD_LAYOUT_CONTROLLER_H__ */
0
1 #include <config.h>
2
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <string.h>
6
7 #include <gdk/gdkx.h>
8 #include <gtk/gtk.h>
9
10 #include <glib/gi18n-lib.h>
11
12 #include "xapp-monitor-blanker.h"
13
14 struct _XAppMonitorBlankerPrivate
15 {
16 int num_outputs;
17 gboolean blanked;
18 GtkWidget **windows;
19 };
20
21 G_DEFINE_TYPE (XAppMonitorBlanker, xapp_monitor_blanker, G_TYPE_OBJECT);
22
23 GtkWidget *create_blanking_window (GdkScreen *screen,
24 int monitor);
25
26 static void
27 xapp_monitor_blanker_init (XAppMonitorBlanker *self)
28 {
29 self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, XAPP_TYPE_MONITOR_BLANKER, XAppMonitorBlankerPrivate);
30 self->priv->num_outputs = 0;
31 self->priv->blanked = FALSE;
32 self->priv->windows = NULL;
33 }
34
35 static void
36 xapp_monitor_blanker_finalize (GObject *object)
37 {
38 XAppMonitorBlanker *self = XAPP_MONITOR_BLANKER (object);
39
40 if (self->priv->windows != NULL)
41 {
42 xapp_monitor_blanker_unblank_monitors (XAPP_MONITOR_BLANKER(self));
43 g_free (self->priv->windows);
44 }
45
46 G_OBJECT_CLASS (xapp_monitor_blanker_parent_class)->finalize (object);
47 }
48
49 static void
50 xapp_monitor_blanker_class_init (XAppMonitorBlankerClass *klass)
51 {
52 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
53
54 gobject_class->finalize = xapp_monitor_blanker_finalize;
55
56 g_type_class_add_private (gobject_class, sizeof (XAppMonitorBlankerPrivate));
57 }
58
59 XAppMonitorBlanker *
60 xapp_monitor_blanker_new (void)
61 {
62 return g_object_new (XAPP_TYPE_MONITOR_BLANKER, NULL);
63 }
64
65 GtkWidget *
66 create_blanking_window (GdkScreen *screen,
67 int monitor)
68 {
69 GdkRectangle fullscreen;
70 GtkWidget *window;
71 GtkStyleContext *context;
72 GtkCssProvider *provider;
73
74 gdk_screen_get_monitor_geometry(screen, monitor, &fullscreen);
75
76 window = gtk_window_new (GTK_WINDOW_POPUP);
77 gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), TRUE);
78 gtk_window_set_skip_pager_hint (GTK_WINDOW (window), TRUE);
79 gtk_window_resize (GTK_WINDOW (window), fullscreen.width, fullscreen.height);
80 gtk_window_move (GTK_WINDOW (window), fullscreen.x, fullscreen.y);
81 gtk_widget_set_visible (window, TRUE);
82
83 context = gtk_widget_get_style_context (GTK_WIDGET (window));
84 gtk_style_context_add_class (context, "xapp-blanking-window");
85 provider = gtk_css_provider_new ();
86 gtk_css_provider_load_from_data (provider,
87 ".xapp-blanking-window { background-color: rgb(0, 0, 0); }",
88 -1, NULL);
89 gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
90
91 return window;
92 }
93
94 void
95 xapp_monitor_blanker_blank_other_monitors (XAppMonitorBlanker *self,
96 GtkWindow *window)
97 {
98 GdkScreen *screen;
99 int active_monitor;
100 int i;
101
102 g_return_if_fail (XAPP_IS_MONITOR_BLANKER (self));
103
104 if (self->priv->windows != NULL)
105 return;
106
107 screen = gtk_window_get_screen (window);
108 active_monitor = gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window (GTK_WIDGET (window)));
109 self->priv->num_outputs = gdk_screen_get_n_monitors (screen);
110 self->priv->windows = g_new (GtkWidget *, self->priv->num_outputs);
111
112 for (i = 0; i < self->priv->num_outputs; i++)
113 {
114 if (i != active_monitor)
115 {
116 self->priv->windows[i] = create_blanking_window (screen, i);
117 }
118 else
119 {
120 // initialize at NULL so it gets properly skipped when windows get destroyed
121 self->priv->windows[i] = NULL;
122 }
123 }
124
125 self->priv->blanked = TRUE;
126 }
127
128 void
129 xapp_monitor_blanker_unblank_monitors (XAppMonitorBlanker *self)
130 {
131 int i;
132 g_return_if_fail (XAPP_IS_MONITOR_BLANKER (self));
133
134 if (self->priv->windows == NULL)
135 return;
136
137 for (i = 0; i < self->priv->num_outputs; i++)
138 {
139 if (self->priv->windows[i] != NULL)
140 {
141 gtk_widget_destroy (self->priv->windows[i]);
142 self->priv->windows[i] = NULL;
143 }
144 }
145 g_free (self->priv->windows);
146 self->priv->windows = NULL;
147 self->priv->blanked = FALSE;
148 }
149
150 gboolean
151 xapp_monitor_blanker_are_monitors_blanked (XAppMonitorBlanker *self)
152 {
153 return self->priv->blanked;
154 }
0 #ifndef __XAPP_MONITOR_BLANKER_H__
1 #define __XAPP_MONITOR_BLANKER_H__
2
3 #include <stdio.h>
4 #include <gtk/gtk.h>
5
6 #include <glib-object.h>
7
8 G_BEGIN_DECLS
9
10 #define XAPP_TYPE_MONITOR_BLANKER (xapp_monitor_blanker_get_type ())
11 #define XAPP_MONITOR_BLANKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XAPP_TYPE_MONITOR_BLANKER, XAppMonitorBlanker))
12 #define XAPP_MONITOR_BLANKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XAPP_TYPE_MONITOR_BLANKER, XAppMonitorBlankerClass))
13 #define XAPP_IS_MONITOR_BLANKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XAPP_TYPE_MONITOR_BLANKER))
14 #define XAPP_IS_MONITOR_BLANKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XAPP_TYPE_MONITOR_BLANKER))
15 #define XAPP_MONITOR_BLANKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XAPP_TYPE_MONITOR_BLANKER, XAppMonitorBlankerClass))
16
17 typedef struct _XAppMonitorBlankerPrivate XAppMonitorBlankerPrivate;
18 typedef struct _XAppMonitorBlanker XAppMonitorBlanker;
19 typedef struct _XAppMonitorBlankerClass XAppMonitorBlankerClass;
20
21 struct _XAppMonitorBlanker
22 {
23 GObject parent_object;
24
25 XAppMonitorBlankerPrivate *priv;
26 };
27
28 struct _XAppMonitorBlankerClass
29 {
30 GObjectClass parent_class;
31 };
32
33 GType xapp_monitor_blanker_get_type (void);
34 XAppMonitorBlanker *xapp_monitor_blanker_new (void);
35 void xapp_monitor_blanker_blank_other_monitors (XAppMonitorBlanker *self,
36 GtkWindow *window);
37 void xapp_monitor_blanker_unblank_monitors (XAppMonitorBlanker *self);
38 gboolean xapp_monitor_blanker_are_monitors_blanked (XAppMonitorBlanker *self);
39
40 G_END_DECLS
41
42 #endif /* __XAPP_MONITOR_BLANKER_H__ */
0 prefix=@prefix@
1 exec_prefix=@exec_prefix@
2 libdir=@libdir@
3 includedir=@includedir@
4
5 Name: xapp
6 Description: Utility library for loading .desktop files
7 Requires: gtk+-3.0
8 Version: @VERSION@
9 Libs: ${pc_top_builddir}/${pcfiledir}/libxapp.la
10 Cflags: -I${pc_top_builddir}/${pcfiledir}/..
0 prefix=@prefix@
1 exec_prefix=@exec_prefix@
2 libdir=@libdir@
3 includedir=@includedir@
4
5 Name: xapp
6 Description: Utility library for loading .desktop files
7 Requires: gtk+-3.0
8 Requires.private: xkbfile
9 Version: @VERSION@
10 Libs: -L${libdir} -lxapp
11 Cflags: -I${includedir}/xapp
0 dnl -*- mode: autoconf -*-
1
2 # serial 1
3
4 dnl Usage:
5 dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
6 AC_DEFUN([GTK_DOC_CHECK],
7 [
8 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9 AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
10 AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
11
12 dnl check for tools we added during development
13 AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check])
14 AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true])
15 AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf])
16
17 dnl for overriding the documentation installation directory
18 AC_ARG_WITH([html-dir],
19 AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
20 [with_html_dir='${datadir}/gtk-doc/html'])
21 HTML_DIR="$with_html_dir"
22 AC_SUBST([HTML_DIR])
23
24 dnl enable/disable documentation building
25 AC_ARG_ENABLE([gtk-doc],
26 AS_HELP_STRING([--enable-gtk-doc],
27 [use gtk-doc to build documentation [[default=no]]]),,
28 [enable_gtk_doc=no])
29
30 if test x$enable_gtk_doc = xyes; then
31 ifelse([$1],[],
32 [PKG_CHECK_EXISTS([gtk-doc],,
33 AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))],
34 [PKG_CHECK_EXISTS([gtk-doc >= $1],,
35 AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))])
36 dnl don't check for glib if we build glib
37 if test "x$PACKAGE_NAME" != "xglib"; then
38 dnl don't fail if someone does not have glib
39 PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,)
40 fi
41 fi
42
43 AC_MSG_CHECKING([whether to build gtk-doc documentation])
44 AC_MSG_RESULT($enable_gtk_doc)
45
46 dnl enable/disable output formats
47 AC_ARG_ENABLE([gtk-doc-html],
48 AS_HELP_STRING([--enable-gtk-doc-html],
49 [build documentation in html format [[default=yes]]]),,
50 [enable_gtk_doc_html=yes])
51 AC_ARG_ENABLE([gtk-doc-pdf],
52 AS_HELP_STRING([--enable-gtk-doc-pdf],
53 [build documentation in pdf format [[default=no]]]),,
54 [enable_gtk_doc_pdf=no])
55
56 if test -z "$GTKDOC_MKPDF"; then
57 enable_gtk_doc_pdf=no
58 fi
59
60
61 AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes])
62 AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes])
63 AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes])
64 AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"])
65 AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"])
66 ])
0 ## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
1 ## Copyright (C) 2001 Eazel, Inc.
2 ## Author: Maciej Stachowiak <mjs@noisehavoc.org>
3 ## Kenneth Christiansen <kenneth@gnu.org>
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ##
19 ## As a special exception to the GNU General Public License, if you
20 ## distribute this file as part of a program that contains a
21 ## configuration script generated by Autoconf, you may include it under
22 ## the same distribution terms that you use for the rest of that program.
23
24 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
25 # serial 42 IT_PROG_INTLTOOL
26 AC_DEFUN([IT_PROG_INTLTOOL], [
27 AC_PREREQ([2.50])dnl
28 AC_REQUIRE([AM_NLS])dnl
29
30 case "$am__api_version" in
31 1.[01234])
32 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
33 ;;
34 *)
35 ;;
36 esac
37
38 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
39 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
40 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
41 if test -n "$1"; then
42 AC_MSG_CHECKING([for intltool >= $1])
43 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
44 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
45 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
46 fi
47
48 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
49 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
50 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
51 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
52 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
53 fi
54
55 if test -z "$AM_DEFAULT_VERBOSITY"; then
56 AM_DEFAULT_VERBOSITY=1
57 fi
58 AC_SUBST([AM_DEFAULT_VERBOSITY])
59
60 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
61 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
62 INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
63 AC_SUBST(INTLTOOL_V_MERGE)
64 AC_SUBST(INTLTOOL__v_MERGE_)
65 AC_SUBST(INTLTOOL__v_MERGE_0)
66
67 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
68 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
69 intltool__v_merge_options_0='-q'
70 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
71 AC_SUBST(intltool__v_merge_options_)
72 AC_SUBST(intltool__v_merge_options_0)
73
74 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
75 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
76 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
77 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
78 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
79 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
80 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
81 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
82 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
83 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
84 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
85 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
86 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
87 else
88 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
89 fi
90 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
91 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
92 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
93 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
94 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
95 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
96 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
97
98 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
99 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
100 _IT_SUBST(INTLTOOL_KEYS_RULE)
101 _IT_SUBST(INTLTOOL_PROP_RULE)
102 _IT_SUBST(INTLTOOL_OAF_RULE)
103 _IT_SUBST(INTLTOOL_PONG_RULE)
104 _IT_SUBST(INTLTOOL_SERVER_RULE)
105 _IT_SUBST(INTLTOOL_SHEET_RULE)
106 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
107 _IT_SUBST(INTLTOOL_UI_RULE)
108 _IT_SUBST(INTLTOOL_XAM_RULE)
109 _IT_SUBST(INTLTOOL_KBD_RULE)
110 _IT_SUBST(INTLTOOL_XML_RULE)
111 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
112 _IT_SUBST(INTLTOOL_CAVES_RULE)
113 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
114 _IT_SUBST(INTLTOOL_THEME_RULE)
115 _IT_SUBST(INTLTOOL_SERVICE_RULE)
116 _IT_SUBST(INTLTOOL_POLICY_RULE)
117
118 # Check the gettext tools to make sure they are GNU
119 AC_PATH_PROG(XGETTEXT, xgettext)
120 AC_PATH_PROG(MSGMERGE, msgmerge)
121 AC_PATH_PROG(MSGFMT, msgfmt)
122 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
123 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
124 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
125 fi
126 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
127 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
128 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
129 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
130 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
131 fi
132
133 AC_PATH_PROG(INTLTOOL_PERL, perl)
134 if test -z "$INTLTOOL_PERL"; then
135 AC_MSG_ERROR([perl not found])
136 fi
137 AC_MSG_CHECKING([for perl >= 5.8.1])
138 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
139 if test $? -ne 0; then
140 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
141 else
142 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
143 AC_MSG_RESULT([$IT_PERL_VERSION])
144 fi
145 if test "x$2" != "xno-xml"; then
146 AC_MSG_CHECKING([for XML::Parser])
147 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
148 AC_MSG_RESULT([ok])
149 else
150 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
151 fi
152 fi
153
154 # Substitute ALL_LINGUAS so we can use it in po/Makefile
155 AC_SUBST(ALL_LINGUAS)
156
157 # Set DATADIRNAME correctly if it is not set yet
158 # (copied from glib-gettext.m4)
159 if test -z "$DATADIRNAME"; then
160 AC_LINK_IFELSE(
161 [AC_LANG_PROGRAM([[]],
162 [[extern int _nl_msg_cat_cntr;
163 return _nl_msg_cat_cntr]])],
164 [DATADIRNAME=share],
165 [case $host in
166 *-*-solaris*)
167 dnl On Solaris, if bind_textdomain_codeset is in libc,
168 dnl GNU format message catalog is always supported,
169 dnl since both are added to the libc all together.
170 dnl Hence, we'd like to go with DATADIRNAME=share
171 dnl in this case.
172 AC_CHECK_FUNC(bind_textdomain_codeset,
173 [DATADIRNAME=share], [DATADIRNAME=lib])
174 ;;
175 *)
176 [DATADIRNAME=lib]
177 ;;
178 esac])
179 fi
180 AC_SUBST(DATADIRNAME)
181
182 IT_PO_SUBDIR([po])
183
184 ])
185
186
187 # IT_PO_SUBDIR(DIRNAME)
188 # ---------------------
189 # All po subdirs have to be declared with this macro; the subdir "po" is
190 # declared by IT_PROG_INTLTOOL.
191 #
192 AC_DEFUN([IT_PO_SUBDIR],
193 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
194 dnl
195 dnl The following CONFIG_COMMANDS should be executed at the very end
196 dnl of config.status.
197 AC_CONFIG_COMMANDS_PRE([
198 AC_CONFIG_COMMANDS([$1/stamp-it], [
199 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
200 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
201 fi
202 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
203 >"$1/stamp-it.tmp"
204 [sed '/^#/d
205 s/^[[].*] *//
206 /^[ ]*$/d
207 '"s|^| $ac_top_srcdir/|" \
208 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
209 ]
210 [sed '/^POTFILES =/,/[^\\]$/ {
211 /^POTFILES =/!d
212 r $1/POTFILES
213 }
214 ' "$1/Makefile.in" >"$1/Makefile"]
215 rm -f "$1/Makefile.tmp"
216 mv "$1/stamp-it.tmp" "$1/stamp-it"
217 ])
218 ])dnl
219 ])
220
221 # _IT_SUBST(VARIABLE)
222 # -------------------
223 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
224 #
225 AC_DEFUN([_IT_SUBST],
226 [
227 AC_SUBST([$1])
228 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
229 ]
230 )
231
232 # deprecated macros
233 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
234 # A hint is needed for aclocal from Automake <= 1.9.4:
235 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
236
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 #
2 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
3 # Written by Gordon Matzigkeit, 1996
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 m4_define([_LT_COPYING], [dnl
10 # Copyright (C) 2014 Free Software Foundation, Inc.
11 # This is free software; see the source for copying conditions. There is NO
12 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 # GNU Libtool is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of of the License, or
17 # (at your option) any later version.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program or library that is built
21 # using GNU Libtool, you may include this file under the same
22 # distribution terms that you use for the rest of that program.
23 #
24 # GNU Libtool is distributed in the hope that it will be useful, but
25 # WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 # GNU General Public License for more details.
28 #
29 # You should have received a copy of the GNU General Public License
30 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31 ])
32
33 # serial 58 LT_INIT
34
35
36 # LT_PREREQ(VERSION)
37 # ------------------
38 # Complain and exit if this libtool version is less that VERSION.
39 m4_defun([LT_PREREQ],
40 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
41 [m4_default([$3],
42 [m4_fatal([Libtool version $1 or higher is required],
43 63)])],
44 [$2])])
45
46
47 # _LT_CHECK_BUILDDIR
48 # ------------------
49 # Complain if the absolute build directory name contains unusual characters
50 m4_defun([_LT_CHECK_BUILDDIR],
51 [case `pwd` in
52 *\ * | *\ *)
53 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
54 esac
55 ])
56
57
58 # LT_INIT([OPTIONS])
59 # ------------------
60 AC_DEFUN([LT_INIT],
61 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
62 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
63 AC_BEFORE([$0], [LT_LANG])dnl
64 AC_BEFORE([$0], [LT_OUTPUT])dnl
65 AC_BEFORE([$0], [LTDL_INIT])dnl
66 m4_require([_LT_CHECK_BUILDDIR])dnl
67
68 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
69 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
70 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
71 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
72 dnl unless we require an AC_DEFUNed macro:
73 AC_REQUIRE([LTOPTIONS_VERSION])dnl
74 AC_REQUIRE([LTSUGAR_VERSION])dnl
75 AC_REQUIRE([LTVERSION_VERSION])dnl
76 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
77 m4_require([_LT_PROG_LTMAIN])dnl
78
79 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
80
81 dnl Parse OPTIONS
82 _LT_SET_OPTIONS([$0], [$1])
83
84 # This can be used to rebuild libtool when needed
85 LIBTOOL_DEPS=$ltmain
86
87 # Always use our own libtool.
88 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
89 AC_SUBST(LIBTOOL)dnl
90
91 _LT_SETUP
92
93 # Only expand once:
94 m4_define([LT_INIT])
95 ])# LT_INIT
96
97 # Old names:
98 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
99 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
100 dnl aclocal-1.4 backwards compatibility:
101 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
102 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
103
104
105 # _LT_PREPARE_CC_BASENAME
106 # -----------------------
107 m4_defun([_LT_PREPARE_CC_BASENAME], [
108 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
109 func_cc_basename ()
110 {
111 for cc_temp in @S|@*""; do
112 case $cc_temp in
113 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
114 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
115 \-*) ;;
116 *) break;;
117 esac
118 done
119 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
120 }
121 ])# _LT_PREPARE_CC_BASENAME
122
123
124 # _LT_CC_BASENAME(CC)
125 # -------------------
126 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
127 # but that macro is also expanded into generated libtool script, which
128 # arranges for $SED and $ECHO to be set by different means.
129 m4_defun([_LT_CC_BASENAME],
130 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
131 AC_REQUIRE([_LT_DECL_SED])dnl
132 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
133 func_cc_basename $1
134 cc_basename=$func_cc_basename_result
135 ])
136
137
138 # _LT_FILEUTILS_DEFAULTS
139 # ----------------------
140 # It is okay to use these file commands and assume they have been set
141 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
142 m4_defun([_LT_FILEUTILS_DEFAULTS],
143 [: ${CP="cp -f"}
144 : ${MV="mv -f"}
145 : ${RM="rm -f"}
146 ])# _LT_FILEUTILS_DEFAULTS
147
148
149 # _LT_SETUP
150 # ---------
151 m4_defun([_LT_SETUP],
152 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
153 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
154 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
155 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
156
157 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
158 dnl
159 _LT_DECL([], [host_alias], [0], [The host system])dnl
160 _LT_DECL([], [host], [0])dnl
161 _LT_DECL([], [host_os], [0])dnl
162 dnl
163 _LT_DECL([], [build_alias], [0], [The build system])dnl
164 _LT_DECL([], [build], [0])dnl
165 _LT_DECL([], [build_os], [0])dnl
166 dnl
167 AC_REQUIRE([AC_PROG_CC])dnl
168 AC_REQUIRE([LT_PATH_LD])dnl
169 AC_REQUIRE([LT_PATH_NM])dnl
170 dnl
171 AC_REQUIRE([AC_PROG_LN_S])dnl
172 test -z "$LN_S" && LN_S="ln -s"
173 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
174 dnl
175 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
176 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
177 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
178 dnl
179 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
180 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
181 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
182 m4_require([_LT_CMD_RELOAD])dnl
183 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
184 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
185 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
186 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
187 m4_require([_LT_WITH_SYSROOT])dnl
188 m4_require([_LT_CMD_TRUNCATE])dnl
189
190 _LT_CONFIG_LIBTOOL_INIT([
191 # See if we are running on zsh, and set the options that allow our
192 # commands through without removal of \ escapes INIT.
193 if test -n "\${ZSH_VERSION+set}"; then
194 setopt NO_GLOB_SUBST
195 fi
196 ])
197 if test -n "${ZSH_VERSION+set}"; then
198 setopt NO_GLOB_SUBST
199 fi
200
201 _LT_CHECK_OBJDIR
202
203 m4_require([_LT_TAG_COMPILER])dnl
204
205 case $host_os in
206 aix3*)
207 # AIX sometimes has problems with the GCC collect2 program. For some
208 # reason, if we set the COLLECT_NAMES environment variable, the problems
209 # vanish in a puff of smoke.
210 if test set != "${COLLECT_NAMES+set}"; then
211 COLLECT_NAMES=
212 export COLLECT_NAMES
213 fi
214 ;;
215 esac
216
217 # Global variables:
218 ofile=libtool
219 can_build_shared=yes
220
221 # All known linkers require a '.a' archive for static linking (except MSVC,
222 # which needs '.lib').
223 libext=a
224
225 with_gnu_ld=$lt_cv_prog_gnu_ld
226
227 old_CC=$CC
228 old_CFLAGS=$CFLAGS
229
230 # Set sane defaults for various variables
231 test -z "$CC" && CC=cc
232 test -z "$LTCC" && LTCC=$CC
233 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
234 test -z "$LD" && LD=ld
235 test -z "$ac_objext" && ac_objext=o
236
237 _LT_CC_BASENAME([$compiler])
238
239 # Only perform the check for file, if the check method requires it
240 test -z "$MAGIC_CMD" && MAGIC_CMD=file
241 case $deplibs_check_method in
242 file_magic*)
243 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
244 _LT_PATH_MAGIC
245 fi
246 ;;
247 esac
248
249 # Use C for the default configuration in the libtool script
250 LT_SUPPORTED_TAG([CC])
251 _LT_LANG_C_CONFIG
252 _LT_LANG_DEFAULT_CONFIG
253 _LT_CONFIG_COMMANDS
254 ])# _LT_SETUP
255
256
257 # _LT_PREPARE_SED_QUOTE_VARS
258 # --------------------------
259 # Define a few sed substitution that help us do robust quoting.
260 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
261 [# Backslashify metacharacters that are still active within
262 # double-quoted strings.
263 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
264
265 # Same as above, but do not quote variable references.
266 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
267
268 # Sed substitution to delay expansion of an escaped shell variable in a
269 # double_quote_subst'ed string.
270 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
271
272 # Sed substitution to delay expansion of an escaped single quote.
273 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
274
275 # Sed substitution to avoid accidental globbing in evaled expressions
276 no_glob_subst='s/\*/\\\*/g'
277 ])
278
279 # _LT_PROG_LTMAIN
280 # ---------------
281 # Note that this code is called both from 'configure', and 'config.status'
282 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
283 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
284 # so we pass a copy along to make sure it has a sensible value anyway.
285 m4_defun([_LT_PROG_LTMAIN],
286 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
287 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
288 ltmain=$ac_aux_dir/ltmain.sh
289 ])# _LT_PROG_LTMAIN
290
291
292 ## ------------------------------------- ##
293 ## Accumulate code for creating libtool. ##
294 ## ------------------------------------- ##
295
296 # So that we can recreate a full libtool script including additional
297 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
298 # in macros and then make a single call at the end using the 'libtool'
299 # label.
300
301
302 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
303 # ----------------------------------------
304 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
305 m4_define([_LT_CONFIG_LIBTOOL_INIT],
306 [m4_ifval([$1],
307 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
308 [$1
309 ])])])
310
311 # Initialize.
312 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
313
314
315 # _LT_CONFIG_LIBTOOL([COMMANDS])
316 # ------------------------------
317 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
318 m4_define([_LT_CONFIG_LIBTOOL],
319 [m4_ifval([$1],
320 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
321 [$1
322 ])])])
323
324 # Initialize.
325 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
326
327
328 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
329 # -----------------------------------------------------
330 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
331 [_LT_CONFIG_LIBTOOL([$1])
332 _LT_CONFIG_LIBTOOL_INIT([$2])
333 ])
334
335
336 # _LT_FORMAT_COMMENT([COMMENT])
337 # -----------------------------
338 # Add leading comment marks to the start of each line, and a trailing
339 # full-stop to the whole comment if one is not present already.
340 m4_define([_LT_FORMAT_COMMENT],
341 [m4_ifval([$1], [
342 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
343 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
344 )])
345
346
347
348 ## ------------------------ ##
349 ## FIXME: Eliminate VARNAME ##
350 ## ------------------------ ##
351
352
353 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
354 # -------------------------------------------------------------------
355 # CONFIGNAME is the name given to the value in the libtool script.
356 # VARNAME is the (base) name used in the configure script.
357 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
358 # VARNAME. Any other value will be used directly.
359 m4_define([_LT_DECL],
360 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
361 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
362 [m4_ifval([$1], [$1], [$2])])
363 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
364 m4_ifval([$4],
365 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
366 lt_dict_add_subkey([lt_decl_dict], [$2],
367 [tagged?], [m4_ifval([$5], [yes], [no])])])
368 ])
369
370
371 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
372 # --------------------------------------------------------
373 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
374
375
376 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
377 # ------------------------------------------------
378 m4_define([lt_decl_tag_varnames],
379 [_lt_decl_filter([tagged?], [yes], $@)])
380
381
382 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
383 # ---------------------------------------------------------
384 m4_define([_lt_decl_filter],
385 [m4_case([$#],
386 [0], [m4_fatal([$0: too few arguments: $#])],
387 [1], [m4_fatal([$0: too few arguments: $#: $1])],
388 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
389 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
390 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
391 ])
392
393
394 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
395 # --------------------------------------------------
396 m4_define([lt_decl_quote_varnames],
397 [_lt_decl_filter([value], [1], $@)])
398
399
400 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
401 # ---------------------------------------------------
402 m4_define([lt_decl_dquote_varnames],
403 [_lt_decl_filter([value], [2], $@)])
404
405
406 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
407 # ---------------------------------------------------
408 m4_define([lt_decl_varnames_tagged],
409 [m4_assert([$# <= 2])dnl
410 _$0(m4_quote(m4_default([$1], [[, ]])),
411 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
412 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
413 m4_define([_lt_decl_varnames_tagged],
414 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
415
416
417 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
418 # ------------------------------------------------
419 m4_define([lt_decl_all_varnames],
420 [_$0(m4_quote(m4_default([$1], [[, ]])),
421 m4_if([$2], [],
422 m4_quote(lt_decl_varnames),
423 m4_quote(m4_shift($@))))[]dnl
424 ])
425 m4_define([_lt_decl_all_varnames],
426 [lt_join($@, lt_decl_varnames_tagged([$1],
427 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
428 ])
429
430
431 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
432 # ------------------------------------
433 # Quote a variable value, and forward it to 'config.status' so that its
434 # declaration there will have the same value as in 'configure'. VARNAME
435 # must have a single quote delimited value for this to work.
436 m4_define([_LT_CONFIG_STATUS_DECLARE],
437 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
438
439
440 # _LT_CONFIG_STATUS_DECLARATIONS
441 # ------------------------------
442 # We delimit libtool config variables with single quotes, so when
443 # we write them to config.status, we have to be sure to quote all
444 # embedded single quotes properly. In configure, this macro expands
445 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
446 #
447 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
448 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
449 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
450 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
451
452
453 # _LT_LIBTOOL_TAGS
454 # ----------------
455 # Output comment and list of tags supported by the script
456 m4_defun([_LT_LIBTOOL_TAGS],
457 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
458 available_tags='_LT_TAGS'dnl
459 ])
460
461
462 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
463 # -----------------------------------
464 # Extract the dictionary values for VARNAME (optionally with TAG) and
465 # expand to a commented shell variable setting:
466 #
467 # # Some comment about what VAR is for.
468 # visible_name=$lt_internal_name
469 m4_define([_LT_LIBTOOL_DECLARE],
470 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
471 [description])))[]dnl
472 m4_pushdef([_libtool_name],
473 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
474 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
475 [0], [_libtool_name=[$]$1],
476 [1], [_libtool_name=$lt_[]$1],
477 [2], [_libtool_name=$lt_[]$1],
478 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
479 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
480 ])
481
482
483 # _LT_LIBTOOL_CONFIG_VARS
484 # -----------------------
485 # Produce commented declarations of non-tagged libtool config variables
486 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
487 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
488 # section) are produced by _LT_LIBTOOL_TAG_VARS.
489 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
490 [m4_foreach([_lt_var],
491 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
492 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
493
494
495 # _LT_LIBTOOL_TAG_VARS(TAG)
496 # -------------------------
497 m4_define([_LT_LIBTOOL_TAG_VARS],
498 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
499 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
500
501
502 # _LT_TAGVAR(VARNAME, [TAGNAME])
503 # ------------------------------
504 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
505
506
507 # _LT_CONFIG_COMMANDS
508 # -------------------
509 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
510 # variables for single and double quote escaping we saved from calls
511 # to _LT_DECL, we can put quote escaped variables declarations
512 # into 'config.status', and then the shell code to quote escape them in
513 # for loops in 'config.status'. Finally, any additional code accumulated
514 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
515 m4_defun([_LT_CONFIG_COMMANDS],
516 [AC_PROVIDE_IFELSE([LT_OUTPUT],
517 dnl If the libtool generation code has been placed in $CONFIG_LT,
518 dnl instead of duplicating it all over again into config.status,
519 dnl then we will have config.status run $CONFIG_LT later, so it
520 dnl needs to know what name is stored there:
521 [AC_CONFIG_COMMANDS([libtool],
522 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
523 dnl If the libtool generation code is destined for config.status,
524 dnl expand the accumulated commands and init code now:
525 [AC_CONFIG_COMMANDS([libtool],
526 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
527 ])#_LT_CONFIG_COMMANDS
528
529
530 # Initialize.
531 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
532 [
533
534 # The HP-UX ksh and POSIX shell print the target directory to stdout
535 # if CDPATH is set.
536 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
537
538 sed_quote_subst='$sed_quote_subst'
539 double_quote_subst='$double_quote_subst'
540 delay_variable_subst='$delay_variable_subst'
541 _LT_CONFIG_STATUS_DECLARATIONS
542 LTCC='$LTCC'
543 LTCFLAGS='$LTCFLAGS'
544 compiler='$compiler_DEFAULT'
545
546 # A function that is used when there is no print builtin or printf.
547 func_fallback_echo ()
548 {
549 eval 'cat <<_LTECHO_EOF
550 \$[]1
551 _LTECHO_EOF'
552 }
553
554 # Quote evaled strings.
555 for var in lt_decl_all_varnames([[ \
556 ]], lt_decl_quote_varnames); do
557 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
558 *[[\\\\\\\`\\"\\\$]]*)
559 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
560 ;;
561 *)
562 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
563 ;;
564 esac
565 done
566
567 # Double-quote double-evaled strings.
568 for var in lt_decl_all_varnames([[ \
569 ]], lt_decl_dquote_varnames); do
570 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
571 *[[\\\\\\\`\\"\\\$]]*)
572 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
573 ;;
574 *)
575 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
576 ;;
577 esac
578 done
579
580 _LT_OUTPUT_LIBTOOL_INIT
581 ])
582
583 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
584 # ------------------------------------
585 # Generate a child script FILE with all initialization necessary to
586 # reuse the environment learned by the parent script, and make the
587 # file executable. If COMMENT is supplied, it is inserted after the
588 # '#!' sequence but before initialization text begins. After this
589 # macro, additional text can be appended to FILE to form the body of
590 # the child script. The macro ends with non-zero status if the
591 # file could not be fully written (such as if the disk is full).
592 m4_ifdef([AS_INIT_GENERATED],
593 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
594 [m4_defun([_LT_GENERATED_FILE_INIT],
595 [m4_require([AS_PREPARE])]dnl
596 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
597 [lt_write_fail=0
598 cat >$1 <<_ASEOF || lt_write_fail=1
599 #! $SHELL
600 # Generated by $as_me.
601 $2
602 SHELL=\${CONFIG_SHELL-$SHELL}
603 export SHELL
604 _ASEOF
605 cat >>$1 <<\_ASEOF || lt_write_fail=1
606 AS_SHELL_SANITIZE
607 _AS_PREPARE
608 exec AS_MESSAGE_FD>&1
609 _ASEOF
610 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
611 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
612
613 # LT_OUTPUT
614 # ---------
615 # This macro allows early generation of the libtool script (before
616 # AC_OUTPUT is called), incase it is used in configure for compilation
617 # tests.
618 AC_DEFUN([LT_OUTPUT],
619 [: ${CONFIG_LT=./config.lt}
620 AC_MSG_NOTICE([creating $CONFIG_LT])
621 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
622 [# Run this file to recreate a libtool stub with the current configuration.])
623
624 cat >>"$CONFIG_LT" <<\_LTEOF
625 lt_cl_silent=false
626 exec AS_MESSAGE_LOG_FD>>config.log
627 {
628 echo
629 AS_BOX([Running $as_me.])
630 } >&AS_MESSAGE_LOG_FD
631
632 lt_cl_help="\
633 '$as_me' creates a local libtool stub from the current configuration,
634 for use in further configure time tests before the real libtool is
635 generated.
636
637 Usage: $[0] [[OPTIONS]]
638
639 -h, --help print this help, then exit
640 -V, --version print version number, then exit
641 -q, --quiet do not print progress messages
642 -d, --debug don't remove temporary files
643
644 Report bugs to <bug-libtool@gnu.org>."
645
646 lt_cl_version="\
647 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
648 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
649 configured by $[0], generated by m4_PACKAGE_STRING.
650
651 Copyright (C) 2011 Free Software Foundation, Inc.
652 This config.lt script is free software; the Free Software Foundation
653 gives unlimited permision to copy, distribute and modify it."
654
655 while test 0 != $[#]
656 do
657 case $[1] in
658 --version | --v* | -V )
659 echo "$lt_cl_version"; exit 0 ;;
660 --help | --h* | -h )
661 echo "$lt_cl_help"; exit 0 ;;
662 --debug | --d* | -d )
663 debug=: ;;
664 --quiet | --q* | --silent | --s* | -q )
665 lt_cl_silent=: ;;
666
667 -*) AC_MSG_ERROR([unrecognized option: $[1]
668 Try '$[0] --help' for more information.]) ;;
669
670 *) AC_MSG_ERROR([unrecognized argument: $[1]
671 Try '$[0] --help' for more information.]) ;;
672 esac
673 shift
674 done
675
676 if $lt_cl_silent; then
677 exec AS_MESSAGE_FD>/dev/null
678 fi
679 _LTEOF
680
681 cat >>"$CONFIG_LT" <<_LTEOF
682 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
683 _LTEOF
684
685 cat >>"$CONFIG_LT" <<\_LTEOF
686 AC_MSG_NOTICE([creating $ofile])
687 _LT_OUTPUT_LIBTOOL_COMMANDS
688 AS_EXIT(0)
689 _LTEOF
690 chmod +x "$CONFIG_LT"
691
692 # configure is writing to config.log, but config.lt does its own redirection,
693 # appending to config.log, which fails on DOS, as config.log is still kept
694 # open by configure. Here we exec the FD to /dev/null, effectively closing
695 # config.log, so it can be properly (re)opened and appended to by config.lt.
696 lt_cl_success=:
697 test yes = "$silent" &&
698 lt_config_lt_args="$lt_config_lt_args --quiet"
699 exec AS_MESSAGE_LOG_FD>/dev/null
700 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
701 exec AS_MESSAGE_LOG_FD>>config.log
702 $lt_cl_success || AS_EXIT(1)
703 ])# LT_OUTPUT
704
705
706 # _LT_CONFIG(TAG)
707 # ---------------
708 # If TAG is the built-in tag, create an initial libtool script with a
709 # default configuration from the untagged config vars. Otherwise add code
710 # to config.status for appending the configuration named by TAG from the
711 # matching tagged config vars.
712 m4_defun([_LT_CONFIG],
713 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
714 _LT_CONFIG_SAVE_COMMANDS([
715 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
716 m4_if(_LT_TAG, [C], [
717 # See if we are running on zsh, and set the options that allow our
718 # commands through without removal of \ escapes.
719 if test -n "${ZSH_VERSION+set}"; then
720 setopt NO_GLOB_SUBST
721 fi
722
723 cfgfile=${ofile}T
724 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
725 $RM "$cfgfile"
726
727 cat <<_LT_EOF >> "$cfgfile"
728 #! $SHELL
729 # Generated automatically by $as_me ($PACKAGE) $VERSION
730 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
731 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
732
733 # Provide generalized library-building support services.
734 # Written by Gordon Matzigkeit, 1996
735
736 _LT_COPYING
737 _LT_LIBTOOL_TAGS
738
739 # Configured defaults for sys_lib_dlsearch_path munging.
740 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
741
742 # ### BEGIN LIBTOOL CONFIG
743 _LT_LIBTOOL_CONFIG_VARS
744 _LT_LIBTOOL_TAG_VARS
745 # ### END LIBTOOL CONFIG
746
747 _LT_EOF
748
749 cat <<'_LT_EOF' >> "$cfgfile"
750
751 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
752
753 _LT_PREPARE_MUNGE_PATH_LIST
754 _LT_PREPARE_CC_BASENAME
755
756 # ### END FUNCTIONS SHARED WITH CONFIGURE
757
758 _LT_EOF
759
760 case $host_os in
761 aix3*)
762 cat <<\_LT_EOF >> "$cfgfile"
763 # AIX sometimes has problems with the GCC collect2 program. For some
764 # reason, if we set the COLLECT_NAMES environment variable, the problems
765 # vanish in a puff of smoke.
766 if test set != "${COLLECT_NAMES+set}"; then
767 COLLECT_NAMES=
768 export COLLECT_NAMES
769 fi
770 _LT_EOF
771 ;;
772 esac
773
774 _LT_PROG_LTMAIN
775
776 # We use sed instead of cat because bash on DJGPP gets confused if
777 # if finds mixed CR/LF and LF-only lines. Since sed operates in
778 # text mode, it properly converts lines to CR/LF. This bash problem
779 # is reportedly fixed, but why not run on old versions too?
780 sed '$q' "$ltmain" >> "$cfgfile" \
781 || (rm -f "$cfgfile"; exit 1)
782
783 mv -f "$cfgfile" "$ofile" ||
784 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
785 chmod +x "$ofile"
786 ],
787 [cat <<_LT_EOF >> "$ofile"
788
789 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
790 dnl in a comment (ie after a #).
791 # ### BEGIN LIBTOOL TAG CONFIG: $1
792 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
793 # ### END LIBTOOL TAG CONFIG: $1
794 _LT_EOF
795 ])dnl /m4_if
796 ],
797 [m4_if([$1], [], [
798 PACKAGE='$PACKAGE'
799 VERSION='$VERSION'
800 RM='$RM'
801 ofile='$ofile'], [])
802 ])dnl /_LT_CONFIG_SAVE_COMMANDS
803 ])# _LT_CONFIG
804
805
806 # LT_SUPPORTED_TAG(TAG)
807 # ---------------------
808 # Trace this macro to discover what tags are supported by the libtool
809 # --tag option, using:
810 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
811 AC_DEFUN([LT_SUPPORTED_TAG], [])
812
813
814 # C support is built-in for now
815 m4_define([_LT_LANG_C_enabled], [])
816 m4_define([_LT_TAGS], [])
817
818
819 # LT_LANG(LANG)
820 # -------------
821 # Enable libtool support for the given language if not already enabled.
822 AC_DEFUN([LT_LANG],
823 [AC_BEFORE([$0], [LT_OUTPUT])dnl
824 m4_case([$1],
825 [C], [_LT_LANG(C)],
826 [C++], [_LT_LANG(CXX)],
827 [Go], [_LT_LANG(GO)],
828 [Java], [_LT_LANG(GCJ)],
829 [Fortran 77], [_LT_LANG(F77)],
830 [Fortran], [_LT_LANG(FC)],
831 [Windows Resource], [_LT_LANG(RC)],
832 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
833 [_LT_LANG($1)],
834 [m4_fatal([$0: unsupported language: "$1"])])])dnl
835 ])# LT_LANG
836
837
838 # _LT_LANG(LANGNAME)
839 # ------------------
840 m4_defun([_LT_LANG],
841 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
842 [LT_SUPPORTED_TAG([$1])dnl
843 m4_append([_LT_TAGS], [$1 ])dnl
844 m4_define([_LT_LANG_]$1[_enabled], [])dnl
845 _LT_LANG_$1_CONFIG($1)])dnl
846 ])# _LT_LANG
847
848
849 m4_ifndef([AC_PROG_GO], [
850 ############################################################
851 # NOTE: This macro has been submitted for inclusion into #
852 # GNU Autoconf as AC_PROG_GO. When it is available in #
853 # a released version of Autoconf we should remove this #
854 # macro and use it instead. #
855 ############################################################
856 m4_defun([AC_PROG_GO],
857 [AC_LANG_PUSH(Go)dnl
858 AC_ARG_VAR([GOC], [Go compiler command])dnl
859 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
860 _AC_ARG_VAR_LDFLAGS()dnl
861 AC_CHECK_TOOL(GOC, gccgo)
862 if test -z "$GOC"; then
863 if test -n "$ac_tool_prefix"; then
864 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
865 fi
866 fi
867 if test -z "$GOC"; then
868 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
869 fi
870 ])#m4_defun
871 ])#m4_ifndef
872
873
874 # _LT_LANG_DEFAULT_CONFIG
875 # -----------------------
876 m4_defun([_LT_LANG_DEFAULT_CONFIG],
877 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
878 [LT_LANG(CXX)],
879 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
880
881 AC_PROVIDE_IFELSE([AC_PROG_F77],
882 [LT_LANG(F77)],
883 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
884
885 AC_PROVIDE_IFELSE([AC_PROG_FC],
886 [LT_LANG(FC)],
887 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
888
889 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
890 dnl pulling things in needlessly.
891 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
892 [LT_LANG(GCJ)],
893 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
894 [LT_LANG(GCJ)],
895 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
896 [LT_LANG(GCJ)],
897 [m4_ifdef([AC_PROG_GCJ],
898 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
899 m4_ifdef([A][M_PROG_GCJ],
900 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
901 m4_ifdef([LT_PROG_GCJ],
902 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
903
904 AC_PROVIDE_IFELSE([AC_PROG_GO],
905 [LT_LANG(GO)],
906 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
907
908 AC_PROVIDE_IFELSE([LT_PROG_RC],
909 [LT_LANG(RC)],
910 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
911 ])# _LT_LANG_DEFAULT_CONFIG
912
913 # Obsolete macros:
914 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
915 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
916 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
917 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
918 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
919 dnl aclocal-1.4 backwards compatibility:
920 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
921 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
922 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
923 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
924 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
925
926
927 # _LT_TAG_COMPILER
928 # ----------------
929 m4_defun([_LT_TAG_COMPILER],
930 [AC_REQUIRE([AC_PROG_CC])dnl
931
932 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
933 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
934 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
935 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
936
937 # If no C compiler was specified, use CC.
938 LTCC=${LTCC-"$CC"}
939
940 # If no C compiler flags were specified, use CFLAGS.
941 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
942
943 # Allow CC to be a program name with arguments.
944 compiler=$CC
945 ])# _LT_TAG_COMPILER
946
947
948 # _LT_COMPILER_BOILERPLATE
949 # ------------------------
950 # Check for compiler boilerplate output or warnings with
951 # the simple compiler test code.
952 m4_defun([_LT_COMPILER_BOILERPLATE],
953 [m4_require([_LT_DECL_SED])dnl
954 ac_outfile=conftest.$ac_objext
955 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
956 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
957 _lt_compiler_boilerplate=`cat conftest.err`
958 $RM conftest*
959 ])# _LT_COMPILER_BOILERPLATE
960
961
962 # _LT_LINKER_BOILERPLATE
963 # ----------------------
964 # Check for linker boilerplate output or warnings with
965 # the simple link test code.
966 m4_defun([_LT_LINKER_BOILERPLATE],
967 [m4_require([_LT_DECL_SED])dnl
968 ac_outfile=conftest.$ac_objext
969 echo "$lt_simple_link_test_code" >conftest.$ac_ext
970 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
971 _lt_linker_boilerplate=`cat conftest.err`
972 $RM -r conftest*
973 ])# _LT_LINKER_BOILERPLATE
974
975 # _LT_REQUIRED_DARWIN_CHECKS
976 # -------------------------
977 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
978 case $host_os in
979 rhapsody* | darwin*)
980 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
981 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
982 AC_CHECK_TOOL([LIPO], [lipo], [:])
983 AC_CHECK_TOOL([OTOOL], [otool], [:])
984 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
985 _LT_DECL([], [DSYMUTIL], [1],
986 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
987 _LT_DECL([], [NMEDIT], [1],
988 [Tool to change global to local symbols on Mac OS X])
989 _LT_DECL([], [LIPO], [1],
990 [Tool to manipulate fat objects and archives on Mac OS X])
991 _LT_DECL([], [OTOOL], [1],
992 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
993 _LT_DECL([], [OTOOL64], [1],
994 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
995
996 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
997 [lt_cv_apple_cc_single_mod=no
998 if test -z "$LT_MULTI_MODULE"; then
999 # By default we will add the -single_module flag. You can override
1000 # by either setting the environment variable LT_MULTI_MODULE
1001 # non-empty at configure time, or by adding -multi_module to the
1002 # link flags.
1003 rm -rf libconftest.dylib*
1004 echo "int foo(void){return 1;}" > conftest.c
1005 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1006 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1007 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1008 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1009 _lt_result=$?
1010 # If there is a non-empty error log, and "single_module"
1011 # appears in it, assume the flag caused a linker warning
1012 if test -s conftest.err && $GREP single_module conftest.err; then
1013 cat conftest.err >&AS_MESSAGE_LOG_FD
1014 # Otherwise, if the output was created with a 0 exit code from
1015 # the compiler, it worked.
1016 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1017 lt_cv_apple_cc_single_mod=yes
1018 else
1019 cat conftest.err >&AS_MESSAGE_LOG_FD
1020 fi
1021 rm -rf libconftest.dylib*
1022 rm -f conftest.*
1023 fi])
1024
1025 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1026 [lt_cv_ld_exported_symbols_list],
1027 [lt_cv_ld_exported_symbols_list=no
1028 save_LDFLAGS=$LDFLAGS
1029 echo "_main" > conftest.sym
1030 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1031 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1032 [lt_cv_ld_exported_symbols_list=yes],
1033 [lt_cv_ld_exported_symbols_list=no])
1034 LDFLAGS=$save_LDFLAGS
1035 ])
1036
1037 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1038 [lt_cv_ld_force_load=no
1039 cat > conftest.c << _LT_EOF
1040 int forced_loaded() { return 2;}
1041 _LT_EOF
1042 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1043 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1044 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1045 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1046 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1047 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1048 cat > conftest.c << _LT_EOF
1049 int main() { return 0;}
1050 _LT_EOF
1051 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1052 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1053 _lt_result=$?
1054 if test -s conftest.err && $GREP force_load conftest.err; then
1055 cat conftest.err >&AS_MESSAGE_LOG_FD
1056 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1057 lt_cv_ld_force_load=yes
1058 else
1059 cat conftest.err >&AS_MESSAGE_LOG_FD
1060 fi
1061 rm -f conftest.err libconftest.a conftest conftest.c
1062 rm -rf conftest.dSYM
1063 ])
1064 case $host_os in
1065 rhapsody* | darwin1.[[012]])
1066 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1067 darwin1.*)
1068 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1069 darwin*) # darwin 5.x on
1070 # if running on 10.5 or later, the deployment target defaults
1071 # to the OS version, if on x86, and 10.4, the deployment
1072 # target defaults to 10.4. Don't you love it?
1073 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1074 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1075 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1076 10.[[012]][[,.]]*)
1077 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1078 10.*)
1079 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1080 esac
1081 ;;
1082 esac
1083 if test yes = "$lt_cv_apple_cc_single_mod"; then
1084 _lt_dar_single_mod='$single_module'
1085 fi
1086 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1087 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1088 else
1089 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1090 fi
1091 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1092 _lt_dsymutil='~$DSYMUTIL $lib || :'
1093 else
1094 _lt_dsymutil=
1095 fi
1096 ;;
1097 esac
1098 ])
1099
1100
1101 # _LT_DARWIN_LINKER_FEATURES([TAG])
1102 # ---------------------------------
1103 # Checks for linker and compiler features on darwin
1104 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1105 [
1106 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1107 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1108 _LT_TAGVAR(hardcode_direct, $1)=no
1109 _LT_TAGVAR(hardcode_automatic, $1)=yes
1110 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1111 if test yes = "$lt_cv_ld_force_load"; then
1112 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1113 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1114 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1115 else
1116 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1117 fi
1118 _LT_TAGVAR(link_all_deplibs, $1)=yes
1119 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1120 case $cc_basename in
1121 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1122 *) _lt_dar_can_shared=$GCC ;;
1123 esac
1124 if test yes = "$_lt_dar_can_shared"; then
1125 output_verbose_link_cmd=func_echo_all
1126 _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"
1127 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1128 _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"
1129 _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"
1130 m4_if([$1], [CXX],
1131 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1132 _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"
1133 _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"
1134 fi
1135 ],[])
1136 else
1137 _LT_TAGVAR(ld_shlibs, $1)=no
1138 fi
1139 ])
1140
1141 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1142 # ----------------------------------
1143 # Links a minimal program and checks the executable
1144 # for the system default hardcoded library path. In most cases,
1145 # this is /usr/lib:/lib, but when the MPI compilers are used
1146 # the location of the communication and MPI libs are included too.
1147 # If we don't find anything, use the default library path according
1148 # to the aix ld manual.
1149 # Store the results from the different compilers for each TAGNAME.
1150 # Allow to override them for all tags through lt_cv_aix_libpath.
1151 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1152 [m4_require([_LT_DECL_SED])dnl
1153 if test set = "${lt_cv_aix_libpath+set}"; then
1154 aix_libpath=$lt_cv_aix_libpath
1155 else
1156 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1157 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1158 lt_aix_libpath_sed='[
1159 /Import File Strings/,/^$/ {
1160 /^0/ {
1161 s/^0 *\([^ ]*\) *$/\1/
1162 p
1163 }
1164 }]'
1165 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1166 # Check for a 64-bit object if we didn't find anything.
1167 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1168 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1169 fi],[])
1170 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1171 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1172 fi
1173 ])
1174 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1175 fi
1176 ])# _LT_SYS_MODULE_PATH_AIX
1177
1178
1179 # _LT_SHELL_INIT(ARG)
1180 # -------------------
1181 m4_define([_LT_SHELL_INIT],
1182 [m4_divert_text([M4SH-INIT], [$1
1183 ])])# _LT_SHELL_INIT
1184
1185
1186
1187 # _LT_PROG_ECHO_BACKSLASH
1188 # -----------------------
1189 # Find how we can fake an echo command that does not interpret backslash.
1190 # In particular, with Autoconf 2.60 or later we add some code to the start
1191 # of the generated configure script that will find a shell with a builtin
1192 # printf (that we can use as an echo command).
1193 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1194 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1197
1198 AC_MSG_CHECKING([how to print strings])
1199 # Test print first, because it will be a builtin if present.
1200 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1201 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1202 ECHO='print -r --'
1203 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1204 ECHO='printf %s\n'
1205 else
1206 # Use this function as a fallback that always works.
1207 func_fallback_echo ()
1208 {
1209 eval 'cat <<_LTECHO_EOF
1210 $[]1
1211 _LTECHO_EOF'
1212 }
1213 ECHO='func_fallback_echo'
1214 fi
1215
1216 # func_echo_all arg...
1217 # Invoke $ECHO with all args, space-separated.
1218 func_echo_all ()
1219 {
1220 $ECHO "$*"
1221 }
1222
1223 case $ECHO in
1224 printf*) AC_MSG_RESULT([printf]) ;;
1225 print*) AC_MSG_RESULT([print -r]) ;;
1226 *) AC_MSG_RESULT([cat]) ;;
1227 esac
1228
1229 m4_ifdef([_AS_DETECT_SUGGESTED],
1230 [_AS_DETECT_SUGGESTED([
1231 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1232 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1233 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1235 PATH=/empty FPATH=/empty; export PATH FPATH
1236 test "X`printf %s $ECHO`" = "X$ECHO" \
1237 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1238
1239 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1240 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1241 ])# _LT_PROG_ECHO_BACKSLASH
1242
1243
1244 # _LT_WITH_SYSROOT
1245 # ----------------
1246 AC_DEFUN([_LT_WITH_SYSROOT],
1247 [AC_MSG_CHECKING([for sysroot])
1248 AC_ARG_WITH([sysroot],
1249 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1250 [Search for dependent libraries within DIR (or the compiler's sysroot
1251 if not specified).])],
1252 [], [with_sysroot=no])
1253
1254 dnl lt_sysroot will always be passed unquoted. We quote it here
1255 dnl in case the user passed a directory name.
1256 lt_sysroot=
1257 case $with_sysroot in #(
1258 yes)
1259 if test yes = "$GCC"; then
1260 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1261 fi
1262 ;; #(
1263 /*)
1264 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1265 ;; #(
1266 no|'')
1267 ;; #(
1268 *)
1269 AC_MSG_RESULT([$with_sysroot])
1270 AC_MSG_ERROR([The sysroot must be an absolute path.])
1271 ;;
1272 esac
1273
1274 AC_MSG_RESULT([${lt_sysroot:-no}])
1275 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1276 [dependent libraries, and where our libraries should be installed.])])
1277
1278 # _LT_ENABLE_LOCK
1279 # ---------------
1280 m4_defun([_LT_ENABLE_LOCK],
1281 [AC_ARG_ENABLE([libtool-lock],
1282 [AS_HELP_STRING([--disable-libtool-lock],
1283 [avoid locking (might break parallel builds)])])
1284 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1285
1286 # Some flags need to be propagated to the compiler or linker for good
1287 # libtool support.
1288 case $host in
1289 ia64-*-hpux*)
1290 # Find out what ABI is being produced by ac_compile, and set mode
1291 # options accordingly.
1292 echo 'int i;' > conftest.$ac_ext
1293 if AC_TRY_EVAL(ac_compile); then
1294 case `/usr/bin/file conftest.$ac_objext` in
1295 *ELF-32*)
1296 HPUX_IA64_MODE=32
1297 ;;
1298 *ELF-64*)
1299 HPUX_IA64_MODE=64
1300 ;;
1301 esac
1302 fi
1303 rm -rf conftest*
1304 ;;
1305 *-*-irix6*)
1306 # Find out what ABI is being produced by ac_compile, and set linker
1307 # options accordingly.
1308 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1309 if AC_TRY_EVAL(ac_compile); then
1310 if test yes = "$lt_cv_prog_gnu_ld"; then
1311 case `/usr/bin/file conftest.$ac_objext` in
1312 *32-bit*)
1313 LD="${LD-ld} -melf32bsmip"
1314 ;;
1315 *N32*)
1316 LD="${LD-ld} -melf32bmipn32"
1317 ;;
1318 *64-bit*)
1319 LD="${LD-ld} -melf64bmip"
1320 ;;
1321 esac
1322 else
1323 case `/usr/bin/file conftest.$ac_objext` in
1324 *32-bit*)
1325 LD="${LD-ld} -32"
1326 ;;
1327 *N32*)
1328 LD="${LD-ld} -n32"
1329 ;;
1330 *64-bit*)
1331 LD="${LD-ld} -64"
1332 ;;
1333 esac
1334 fi
1335 fi
1336 rm -rf conftest*
1337 ;;
1338
1339 mips64*-*linux*)
1340 # Find out what ABI is being produced by ac_compile, and set linker
1341 # options accordingly.
1342 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1343 if AC_TRY_EVAL(ac_compile); then
1344 emul=elf
1345 case `/usr/bin/file conftest.$ac_objext` in
1346 *32-bit*)
1347 emul="${emul}32"
1348 ;;
1349 *64-bit*)
1350 emul="${emul}64"
1351 ;;
1352 esac
1353 case `/usr/bin/file conftest.$ac_objext` in
1354 *MSB*)
1355 emul="${emul}btsmip"
1356 ;;
1357 *LSB*)
1358 emul="${emul}ltsmip"
1359 ;;
1360 esac
1361 case `/usr/bin/file conftest.$ac_objext` in
1362 *N32*)
1363 emul="${emul}n32"
1364 ;;
1365 esac
1366 LD="${LD-ld} -m $emul"
1367 fi
1368 rm -rf conftest*
1369 ;;
1370
1371 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1372 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1373 # Find out what ABI is being produced by ac_compile, and set linker
1374 # options accordingly. Note that the listed cases only cover the
1375 # situations where additional linker options are needed (such as when
1376 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1377 # vice versa); the common cases where no linker options are needed do
1378 # not appear in the list.
1379 echo 'int i;' > conftest.$ac_ext
1380 if AC_TRY_EVAL(ac_compile); then
1381 case `/usr/bin/file conftest.o` in
1382 *32-bit*)
1383 case $host in
1384 x86_64-*kfreebsd*-gnu)
1385 LD="${LD-ld} -m elf_i386_fbsd"
1386 ;;
1387 x86_64-*linux*)
1388 case `/usr/bin/file conftest.o` in
1389 *x86-64*)
1390 LD="${LD-ld} -m elf32_x86_64"
1391 ;;
1392 *)
1393 LD="${LD-ld} -m elf_i386"
1394 ;;
1395 esac
1396 ;;
1397 powerpc64le-*linux*)
1398 LD="${LD-ld} -m elf32lppclinux"
1399 ;;
1400 powerpc64-*linux*)
1401 LD="${LD-ld} -m elf32ppclinux"
1402 ;;
1403 s390x-*linux*)
1404 LD="${LD-ld} -m elf_s390"
1405 ;;
1406 sparc64-*linux*)
1407 LD="${LD-ld} -m elf32_sparc"
1408 ;;
1409 esac
1410 ;;
1411 *64-bit*)
1412 case $host in
1413 x86_64-*kfreebsd*-gnu)
1414 LD="${LD-ld} -m elf_x86_64_fbsd"
1415 ;;
1416 x86_64-*linux*)
1417 LD="${LD-ld} -m elf_x86_64"
1418 ;;
1419 powerpcle-*linux*)
1420 LD="${LD-ld} -m elf64lppc"
1421 ;;
1422 powerpc-*linux*)
1423 LD="${LD-ld} -m elf64ppc"
1424 ;;
1425 s390*-*linux*|s390*-*tpf*)
1426 LD="${LD-ld} -m elf64_s390"
1427 ;;
1428 sparc*-*linux*)
1429 LD="${LD-ld} -m elf64_sparc"
1430 ;;
1431 esac
1432 ;;
1433 esac
1434 fi
1435 rm -rf conftest*
1436 ;;
1437
1438 *-*-sco3.2v5*)
1439 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1440 SAVE_CFLAGS=$CFLAGS
1441 CFLAGS="$CFLAGS -belf"
1442 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1443 [AC_LANG_PUSH(C)
1444 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1445 AC_LANG_POP])
1446 if test yes != "$lt_cv_cc_needs_belf"; then
1447 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1448 CFLAGS=$SAVE_CFLAGS
1449 fi
1450 ;;
1451 *-*solaris*)
1452 # Find out what ABI is being produced by ac_compile, and set linker
1453 # options accordingly.
1454 echo 'int i;' > conftest.$ac_ext
1455 if AC_TRY_EVAL(ac_compile); then
1456 case `/usr/bin/file conftest.o` in
1457 *64-bit*)
1458 case $lt_cv_prog_gnu_ld in
1459 yes*)
1460 case $host in
1461 i?86-*-solaris*|x86_64-*-solaris*)
1462 LD="${LD-ld} -m elf_x86_64"
1463 ;;
1464 sparc*-*-solaris*)
1465 LD="${LD-ld} -m elf64_sparc"
1466 ;;
1467 esac
1468 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1469 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1470 LD=${LD-ld}_sol2
1471 fi
1472 ;;
1473 *)
1474 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1475 LD="${LD-ld} -64"
1476 fi
1477 ;;
1478 esac
1479 ;;
1480 esac
1481 fi
1482 rm -rf conftest*
1483 ;;
1484 esac
1485
1486 need_locks=$enable_libtool_lock
1487 ])# _LT_ENABLE_LOCK
1488
1489
1490 # _LT_PROG_AR
1491 # -----------
1492 m4_defun([_LT_PROG_AR],
1493 [AC_CHECK_TOOLS(AR, [ar], false)
1494 : ${AR=ar}
1495 : ${AR_FLAGS=cru}
1496 _LT_DECL([], [AR], [1], [The archiver])
1497 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1498
1499 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1500 [lt_cv_ar_at_file=no
1501 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1502 [echo conftest.$ac_objext > conftest.lst
1503 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1504 AC_TRY_EVAL([lt_ar_try])
1505 if test 0 -eq "$ac_status"; then
1506 # Ensure the archiver fails upon bogus file names.
1507 rm -f conftest.$ac_objext libconftest.a
1508 AC_TRY_EVAL([lt_ar_try])
1509 if test 0 -ne "$ac_status"; then
1510 lt_cv_ar_at_file=@
1511 fi
1512 fi
1513 rm -f conftest.* libconftest.a
1514 ])
1515 ])
1516
1517 if test no = "$lt_cv_ar_at_file"; then
1518 archiver_list_spec=
1519 else
1520 archiver_list_spec=$lt_cv_ar_at_file
1521 fi
1522 _LT_DECL([], [archiver_list_spec], [1],
1523 [How to feed a file listing to the archiver])
1524 ])# _LT_PROG_AR
1525
1526
1527 # _LT_CMD_OLD_ARCHIVE
1528 # -------------------
1529 m4_defun([_LT_CMD_OLD_ARCHIVE],
1530 [_LT_PROG_AR
1531
1532 AC_CHECK_TOOL(STRIP, strip, :)
1533 test -z "$STRIP" && STRIP=:
1534 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1535
1536 AC_CHECK_TOOL(RANLIB, ranlib, :)
1537 test -z "$RANLIB" && RANLIB=:
1538 _LT_DECL([], [RANLIB], [1],
1539 [Commands used to install an old-style archive])
1540
1541 # Determine commands to create old-style static archives.
1542 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1543 old_postinstall_cmds='chmod 644 $oldlib'
1544 old_postuninstall_cmds=
1545
1546 if test -n "$RANLIB"; then
1547 case $host_os in
1548 bitrig* | openbsd*)
1549 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1550 ;;
1551 *)
1552 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1553 ;;
1554 esac
1555 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1556 fi
1557
1558 case $host_os in
1559 darwin*)
1560 lock_old_archive_extraction=yes ;;
1561 *)
1562 lock_old_archive_extraction=no ;;
1563 esac
1564 _LT_DECL([], [old_postinstall_cmds], [2])
1565 _LT_DECL([], [old_postuninstall_cmds], [2])
1566 _LT_TAGDECL([], [old_archive_cmds], [2],
1567 [Commands used to build an old-style archive])
1568 _LT_DECL([], [lock_old_archive_extraction], [0],
1569 [Whether to use a lock for old archive extraction])
1570 ])# _LT_CMD_OLD_ARCHIVE
1571
1572
1573 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1574 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1575 # ----------------------------------------------------------------
1576 # Check whether the given compiler option works
1577 AC_DEFUN([_LT_COMPILER_OPTION],
1578 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1579 m4_require([_LT_DECL_SED])dnl
1580 AC_CACHE_CHECK([$1], [$2],
1581 [$2=no
1582 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1583 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1584 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
1585 # Insert the option either (1) after the last *FLAGS variable, or
1586 # (2) before a word containing "conftest.", or (3) at the end.
1587 # Note that $ac_compile itself does not contain backslashes and begins
1588 # with a dollar sign (not a hyphen), so the echo should work correctly.
1589 # The option is referenced via a variable to avoid confusing sed.
1590 lt_compile=`echo "$ac_compile" | $SED \
1591 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1592 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1593 -e 's:$: $lt_compiler_flag:'`
1594 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1595 (eval "$lt_compile" 2>conftest.err)
1596 ac_status=$?
1597 cat conftest.err >&AS_MESSAGE_LOG_FD
1598 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1599 if (exit $ac_status) && test -s "$ac_outfile"; then
1600 # The compiler can only warn and ignore the option if not recognized
1601 # So say no if there are warnings other than the usual output.
1602 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1603 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1604 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1605 $2=yes
1606 fi
1607 fi
1608 $RM conftest*
1609 ])
1610
1611 if test yes = "[$]$2"; then
1612 m4_if([$5], , :, [$5])
1613 else
1614 m4_if([$6], , :, [$6])
1615 fi
1616 ])# _LT_COMPILER_OPTION
1617
1618 # Old name:
1619 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1620 dnl aclocal-1.4 backwards compatibility:
1621 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1622
1623
1624 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1625 # [ACTION-SUCCESS], [ACTION-FAILURE])
1626 # ----------------------------------------------------
1627 # Check whether the given linker option works
1628 AC_DEFUN([_LT_LINKER_OPTION],
1629 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1630 m4_require([_LT_DECL_SED])dnl
1631 AC_CACHE_CHECK([$1], [$2],
1632 [$2=no
1633 save_LDFLAGS=$LDFLAGS
1634 LDFLAGS="$LDFLAGS $3"
1635 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1636 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1637 # The linker can only warn and ignore the option if not recognized
1638 # So say no if there are warnings
1639 if test -s conftest.err; then
1640 # Append any errors to the config.log.
1641 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1642 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1643 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1644 if diff conftest.exp conftest.er2 >/dev/null; then
1645 $2=yes
1646 fi
1647 else
1648 $2=yes
1649 fi
1650 fi
1651 $RM -r conftest*
1652 LDFLAGS=$save_LDFLAGS
1653 ])
1654
1655 if test yes = "[$]$2"; then
1656 m4_if([$4], , :, [$4])
1657 else
1658 m4_if([$5], , :, [$5])
1659 fi
1660 ])# _LT_LINKER_OPTION
1661
1662 # Old name:
1663 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1664 dnl aclocal-1.4 backwards compatibility:
1665 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1666
1667
1668 # LT_CMD_MAX_LEN
1669 #---------------
1670 AC_DEFUN([LT_CMD_MAX_LEN],
1671 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1672 # find the maximum length of command line arguments
1673 AC_MSG_CHECKING([the maximum length of command line arguments])
1674 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1675 i=0
1676 teststring=ABCD
1677
1678 case $build_os in
1679 msdosdjgpp*)
1680 # On DJGPP, this test can blow up pretty badly due to problems in libc
1681 # (any single argument exceeding 2000 bytes causes a buffer overrun
1682 # during glob expansion). Even if it were fixed, the result of this
1683 # check would be larger than it should be.
1684 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1685 ;;
1686
1687 gnu*)
1688 # Under GNU Hurd, this test is not required because there is
1689 # no limit to the length of command line arguments.
1690 # Libtool will interpret -1 as no limit whatsoever
1691 lt_cv_sys_max_cmd_len=-1;
1692 ;;
1693
1694 cygwin* | mingw* | cegcc*)
1695 # On Win9x/ME, this test blows up -- it succeeds, but takes
1696 # about 5 minutes as the teststring grows exponentially.
1697 # Worse, since 9x/ME are not pre-emptively multitasking,
1698 # you end up with a "frozen" computer, even though with patience
1699 # the test eventually succeeds (with a max line length of 256k).
1700 # Instead, let's just punt: use the minimum linelength reported by
1701 # all of the supported platforms: 8192 (on NT/2K/XP).
1702 lt_cv_sys_max_cmd_len=8192;
1703 ;;
1704
1705 mint*)
1706 # On MiNT this can take a long time and run out of memory.
1707 lt_cv_sys_max_cmd_len=8192;
1708 ;;
1709
1710 amigaos*)
1711 # On AmigaOS with pdksh, this test takes hours, literally.
1712 # So we just punt and use a minimum line length of 8192.
1713 lt_cv_sys_max_cmd_len=8192;
1714 ;;
1715
1716 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1717 # This has been around since 386BSD, at least. Likely further.
1718 if test -x /sbin/sysctl; then
1719 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1720 elif test -x /usr/sbin/sysctl; then
1721 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1722 else
1723 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1724 fi
1725 # And add a safety zone
1726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1728 ;;
1729
1730 interix*)
1731 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1732 lt_cv_sys_max_cmd_len=196608
1733 ;;
1734
1735 os2*)
1736 # The test takes a long time on OS/2.
1737 lt_cv_sys_max_cmd_len=8192
1738 ;;
1739
1740 osf*)
1741 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1742 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1743 # nice to cause kernel panics so lets avoid the loop below.
1744 # First set a reasonable default.
1745 lt_cv_sys_max_cmd_len=16384
1746 #
1747 if test -x /sbin/sysconfig; then
1748 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1749 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1750 esac
1751 fi
1752 ;;
1753 sco3.2v5*)
1754 lt_cv_sys_max_cmd_len=102400
1755 ;;
1756 sysv5* | sco5v6* | sysv4.2uw2*)
1757 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1758 if test -n "$kargmax"; then
1759 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1760 else
1761 lt_cv_sys_max_cmd_len=32768
1762 fi
1763 ;;
1764 *)
1765 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1766 if test -n "$lt_cv_sys_max_cmd_len" && \
1767 test undefined != "$lt_cv_sys_max_cmd_len"; then
1768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1770 else
1771 # Make teststring a little bigger before we do anything with it.
1772 # a 1K string should be a reasonable start.
1773 for i in 1 2 3 4 5 6 7 8; do
1774 teststring=$teststring$teststring
1775 done
1776 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1777 # If test is not a shell built-in, we'll probably end up computing a
1778 # maximum length that is only half of the actual maximum length, but
1779 # we can't tell.
1780 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1781 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1782 test 17 != "$i" # 1/2 MB should be enough
1783 do
1784 i=`expr $i + 1`
1785 teststring=$teststring$teststring
1786 done
1787 # Only check the string length outside the loop.
1788 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1789 teststring=
1790 # Add a significant safety factor because C++ compilers can tack on
1791 # massive amounts of additional arguments before passing them to the
1792 # linker. It appears as though 1/2 is a usable value.
1793 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1794 fi
1795 ;;
1796 esac
1797 ])
1798 if test -n "$lt_cv_sys_max_cmd_len"; then
1799 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1800 else
1801 AC_MSG_RESULT(none)
1802 fi
1803 max_cmd_len=$lt_cv_sys_max_cmd_len
1804 _LT_DECL([], [max_cmd_len], [0],
1805 [What is the maximum length of a command?])
1806 ])# LT_CMD_MAX_LEN
1807
1808 # Old name:
1809 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1810 dnl aclocal-1.4 backwards compatibility:
1811 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1812
1813
1814 # _LT_HEADER_DLFCN
1815 # ----------------
1816 m4_defun([_LT_HEADER_DLFCN],
1817 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1818 ])# _LT_HEADER_DLFCN
1819
1820
1821 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1822 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1823 # ----------------------------------------------------------------
1824 m4_defun([_LT_TRY_DLOPEN_SELF],
1825 [m4_require([_LT_HEADER_DLFCN])dnl
1826 if test yes = "$cross_compiling"; then :
1827 [$4]
1828 else
1829 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1830 lt_status=$lt_dlunknown
1831 cat > conftest.$ac_ext <<_LT_EOF
1832 [#line $LINENO "configure"
1833 #include "confdefs.h"
1834
1835 #if HAVE_DLFCN_H
1836 #include <dlfcn.h>
1837 #endif
1838
1839 #include <stdio.h>
1840
1841 #ifdef RTLD_GLOBAL
1842 # define LT_DLGLOBAL RTLD_GLOBAL
1843 #else
1844 # ifdef DL_GLOBAL
1845 # define LT_DLGLOBAL DL_GLOBAL
1846 # else
1847 # define LT_DLGLOBAL 0
1848 # endif
1849 #endif
1850
1851 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1852 find out it does not work in some platform. */
1853 #ifndef LT_DLLAZY_OR_NOW
1854 # ifdef RTLD_LAZY
1855 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1856 # else
1857 # ifdef DL_LAZY
1858 # define LT_DLLAZY_OR_NOW DL_LAZY
1859 # else
1860 # ifdef RTLD_NOW
1861 # define LT_DLLAZY_OR_NOW RTLD_NOW
1862 # else
1863 # ifdef DL_NOW
1864 # define LT_DLLAZY_OR_NOW DL_NOW
1865 # else
1866 # define LT_DLLAZY_OR_NOW 0
1867 # endif
1868 # endif
1869 # endif
1870 # endif
1871 #endif
1872
1873 /* When -fvisibility=hidden is used, assume the code has been annotated
1874 correspondingly for the symbols needed. */
1875 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1876 int fnord () __attribute__((visibility("default")));
1877 #endif
1878
1879 int fnord () { return 42; }
1880 int main ()
1881 {
1882 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1883 int status = $lt_dlunknown;
1884
1885 if (self)
1886 {
1887 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1888 else
1889 {
1890 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1891 else puts (dlerror ());
1892 }
1893 /* dlclose (self); */
1894 }
1895 else
1896 puts (dlerror ());
1897
1898 return status;
1899 }]
1900 _LT_EOF
1901 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1902 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1903 lt_status=$?
1904 case x$lt_status in
1905 x$lt_dlno_uscore) $1 ;;
1906 x$lt_dlneed_uscore) $2 ;;
1907 x$lt_dlunknown|x*) $3 ;;
1908 esac
1909 else :
1910 # compilation failed
1911 $3
1912 fi
1913 fi
1914 rm -fr conftest*
1915 ])# _LT_TRY_DLOPEN_SELF
1916
1917
1918 # LT_SYS_DLOPEN_SELF
1919 # ------------------
1920 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1921 [m4_require([_LT_HEADER_DLFCN])dnl
1922 if test yes != "$enable_dlopen"; then
1923 enable_dlopen=unknown
1924 enable_dlopen_self=unknown
1925 enable_dlopen_self_static=unknown
1926 else
1927 lt_cv_dlopen=no
1928 lt_cv_dlopen_libs=
1929
1930 case $host_os in
1931 beos*)
1932 lt_cv_dlopen=load_add_on
1933 lt_cv_dlopen_libs=
1934 lt_cv_dlopen_self=yes
1935 ;;
1936
1937 mingw* | pw32* | cegcc*)
1938 lt_cv_dlopen=LoadLibrary
1939 lt_cv_dlopen_libs=
1940 ;;
1941
1942 cygwin*)
1943 lt_cv_dlopen=dlopen
1944 lt_cv_dlopen_libs=
1945 ;;
1946
1947 darwin*)
1948 # if libdl is installed we need to link against it
1949 AC_CHECK_LIB([dl], [dlopen],
1950 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1951 lt_cv_dlopen=dyld
1952 lt_cv_dlopen_libs=
1953 lt_cv_dlopen_self=yes
1954 ])
1955 ;;
1956
1957 tpf*)
1958 # Don't try to run any link tests for TPF. We know it's impossible
1959 # because TPF is a cross-compiler, and we know how we open DSOs.
1960 lt_cv_dlopen=dlopen
1961 lt_cv_dlopen_libs=
1962 lt_cv_dlopen_self=no
1963 ;;
1964
1965 *)
1966 AC_CHECK_FUNC([shl_load],
1967 [lt_cv_dlopen=shl_load],
1968 [AC_CHECK_LIB([dld], [shl_load],
1969 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1970 [AC_CHECK_FUNC([dlopen],
1971 [lt_cv_dlopen=dlopen],
1972 [AC_CHECK_LIB([dl], [dlopen],
1973 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1974 [AC_CHECK_LIB([svld], [dlopen],
1975 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1976 [AC_CHECK_LIB([dld], [dld_link],
1977 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1978 ])
1979 ])
1980 ])
1981 ])
1982 ])
1983 ;;
1984 esac
1985
1986 if test no = "$lt_cv_dlopen"; then
1987 enable_dlopen=no
1988 else
1989 enable_dlopen=yes
1990 fi
1991
1992 case $lt_cv_dlopen in
1993 dlopen)
1994 save_CPPFLAGS=$CPPFLAGS
1995 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1996
1997 save_LDFLAGS=$LDFLAGS
1998 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1999
2000 save_LIBS=$LIBS
2001 LIBS="$lt_cv_dlopen_libs $LIBS"
2002
2003 AC_CACHE_CHECK([whether a program can dlopen itself],
2004 lt_cv_dlopen_self, [dnl
2005 _LT_TRY_DLOPEN_SELF(
2006 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2007 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2008 ])
2009
2010 if test yes = "$lt_cv_dlopen_self"; then
2011 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2012 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2013 lt_cv_dlopen_self_static, [dnl
2014 _LT_TRY_DLOPEN_SELF(
2015 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2016 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2017 ])
2018 fi
2019
2020 CPPFLAGS=$save_CPPFLAGS
2021 LDFLAGS=$save_LDFLAGS
2022 LIBS=$save_LIBS
2023 ;;
2024 esac
2025
2026 case $lt_cv_dlopen_self in
2027 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2028 *) enable_dlopen_self=unknown ;;
2029 esac
2030
2031 case $lt_cv_dlopen_self_static in
2032 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2033 *) enable_dlopen_self_static=unknown ;;
2034 esac
2035 fi
2036 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2037 [Whether dlopen is supported])
2038 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2039 [Whether dlopen of programs is supported])
2040 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2041 [Whether dlopen of statically linked programs is supported])
2042 ])# LT_SYS_DLOPEN_SELF
2043
2044 # Old name:
2045 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2046 dnl aclocal-1.4 backwards compatibility:
2047 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2048
2049
2050 # _LT_COMPILER_C_O([TAGNAME])
2051 # ---------------------------
2052 # Check to see if options -c and -o are simultaneously supported by compiler.
2053 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2054 m4_defun([_LT_COMPILER_C_O],
2055 [m4_require([_LT_DECL_SED])dnl
2056 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2057 m4_require([_LT_TAG_COMPILER])dnl
2058 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2059 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2061 $RM -r conftest 2>/dev/null
2062 mkdir conftest
2063 cd conftest
2064 mkdir out
2065 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2066
2067 lt_compiler_flag="-o out/conftest2.$ac_objext"
2068 # Insert the option either (1) after the last *FLAGS variable, or
2069 # (2) before a word containing "conftest.", or (3) at the end.
2070 # Note that $ac_compile itself does not contain backslashes and begins
2071 # with a dollar sign (not a hyphen), so the echo should work correctly.
2072 lt_compile=`echo "$ac_compile" | $SED \
2073 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2074 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2075 -e 's:$: $lt_compiler_flag:'`
2076 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2077 (eval "$lt_compile" 2>out/conftest.err)
2078 ac_status=$?
2079 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2080 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2081 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2082 then
2083 # The compiler can only warn and ignore the option if not recognized
2084 # So say no if there are warnings
2085 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2086 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2087 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2088 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2089 fi
2090 fi
2091 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2092 $RM conftest*
2093 # SGI C++ compiler will create directory out/ii_files/ for
2094 # template instantiation
2095 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2096 $RM out/* && rmdir out
2097 cd ..
2098 $RM -r conftest
2099 $RM conftest*
2100 ])
2101 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2102 [Does compiler simultaneously support -c and -o options?])
2103 ])# _LT_COMPILER_C_O
2104
2105
2106 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2107 # ----------------------------------
2108 # Check to see if we can do hard links to lock some files if needed
2109 m4_defun([_LT_COMPILER_FILE_LOCKS],
2110 [m4_require([_LT_ENABLE_LOCK])dnl
2111 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2112 _LT_COMPILER_C_O([$1])
2113
2114 hard_links=nottested
2115 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2116 # do not overwrite the value of need_locks provided by the user
2117 AC_MSG_CHECKING([if we can lock with hard links])
2118 hard_links=yes
2119 $RM conftest*
2120 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2121 touch conftest.a
2122 ln conftest.a conftest.b 2>&5 || hard_links=no
2123 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2124 AC_MSG_RESULT([$hard_links])
2125 if test no = "$hard_links"; then
2126 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2127 need_locks=warn
2128 fi
2129 else
2130 need_locks=no
2131 fi
2132 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2133 ])# _LT_COMPILER_FILE_LOCKS
2134
2135
2136 # _LT_CHECK_OBJDIR
2137 # ----------------
2138 m4_defun([_LT_CHECK_OBJDIR],
2139 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2140 [rm -f .libs 2>/dev/null
2141 mkdir .libs 2>/dev/null
2142 if test -d .libs; then
2143 lt_cv_objdir=.libs
2144 else
2145 # MS-DOS does not allow filenames that begin with a dot.
2146 lt_cv_objdir=_libs
2147 fi
2148 rmdir .libs 2>/dev/null])
2149 objdir=$lt_cv_objdir
2150 _LT_DECL([], [objdir], [0],
2151 [The name of the directory that contains temporary libtool files])dnl
2152 m4_pattern_allow([LT_OBJDIR])dnl
2153 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2154 [Define to the sub-directory where libtool stores uninstalled libraries.])
2155 ])# _LT_CHECK_OBJDIR
2156
2157
2158 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2159 # --------------------------------------
2160 # Check hardcoding attributes.
2161 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2162 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2163 _LT_TAGVAR(hardcode_action, $1)=
2164 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2165 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2166 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2167
2168 # We can hardcode non-existent directories.
2169 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2170 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2171 # have to relink, otherwise we might link with an installed library
2172 # when we should be linking with a yet-to-be-installed one
2173 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2174 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2175 # Linking always hardcodes the temporary library directory.
2176 _LT_TAGVAR(hardcode_action, $1)=relink
2177 else
2178 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2179 _LT_TAGVAR(hardcode_action, $1)=immediate
2180 fi
2181 else
2182 # We cannot hardcode anything, or else we can only hardcode existing
2183 # directories.
2184 _LT_TAGVAR(hardcode_action, $1)=unsupported
2185 fi
2186 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2187
2188 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2189 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2190 # Fast installation is not supported
2191 enable_fast_install=no
2192 elif test yes = "$shlibpath_overrides_runpath" ||
2193 test no = "$enable_shared"; then
2194 # Fast installation is not necessary
2195 enable_fast_install=needless
2196 fi
2197 _LT_TAGDECL([], [hardcode_action], [0],
2198 [How to hardcode a shared library path into an executable])
2199 ])# _LT_LINKER_HARDCODE_LIBPATH
2200
2201
2202 # _LT_CMD_STRIPLIB
2203 # ----------------
2204 m4_defun([_LT_CMD_STRIPLIB],
2205 [m4_require([_LT_DECL_EGREP])
2206 striplib=
2207 old_striplib=
2208 AC_MSG_CHECKING([whether stripping libraries is possible])
2209 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2210 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2211 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2212 AC_MSG_RESULT([yes])
2213 else
2214 # FIXME - insert some real tests, host_os isn't really good enough
2215 case $host_os in
2216 darwin*)
2217 if test -n "$STRIP"; then
2218 striplib="$STRIP -x"
2219 old_striplib="$STRIP -S"
2220 AC_MSG_RESULT([yes])
2221 else
2222 AC_MSG_RESULT([no])
2223 fi
2224 ;;
2225 *)
2226 AC_MSG_RESULT([no])
2227 ;;
2228 esac
2229 fi
2230 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2231 _LT_DECL([], [striplib], [1])
2232 ])# _LT_CMD_STRIPLIB
2233
2234
2235 # _LT_PREPARE_MUNGE_PATH_LIST
2236 # ---------------------------
2237 # Make sure func_munge_path_list() is defined correctly.
2238 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2239 [[# func_munge_path_list VARIABLE PATH
2240 # -----------------------------------
2241 # VARIABLE is name of variable containing _space_ separated list of
2242 # directories to be munged by the contents of PATH, which is string
2243 # having a format:
2244 # "DIR[:DIR]:"
2245 # string "DIR[ DIR]" will be prepended to VARIABLE
2246 # ":DIR[:DIR]"
2247 # string "DIR[ DIR]" will be appended to VARIABLE
2248 # "DIRP[:DIRP]::[DIRA:]DIRA"
2249 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2250 # "DIRA[ DIRA]" will be appended to VARIABLE
2251 # "DIR[:DIR]"
2252 # VARIABLE will be replaced by "DIR[ DIR]"
2253 func_munge_path_list ()
2254 {
2255 case x@S|@2 in
2256 x)
2257 ;;
2258 *:)
2259 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2260 ;;
2261 x:*)
2262 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2263 ;;
2264 *::*)
2265 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2266 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2267 ;;
2268 *)
2269 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2270 ;;
2271 esac
2272 }
2273 ]])# _LT_PREPARE_PATH_LIST
2274
2275
2276 # _LT_SYS_DYNAMIC_LINKER([TAG])
2277 # -----------------------------
2278 # PORTME Fill in your ld.so characteristics
2279 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2280 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2281 m4_require([_LT_DECL_EGREP])dnl
2282 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2283 m4_require([_LT_DECL_OBJDUMP])dnl
2284 m4_require([_LT_DECL_SED])dnl
2285 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2286 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2287 AC_MSG_CHECKING([dynamic linker characteristics])
2288 m4_if([$1],
2289 [], [
2290 if test yes = "$GCC"; then
2291 case $host_os in
2292 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2293 *) lt_awk_arg='/^libraries:/' ;;
2294 esac
2295 case $host_os in
2296 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2297 *) lt_sed_strip_eq='s|=/|/|g' ;;
2298 esac
2299 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2300 case $lt_search_path_spec in
2301 *\;*)
2302 # if the path contains ";" then we assume it to be the separator
2303 # otherwise default to the standard path separator (i.e. ":") - it is
2304 # assumed that no part of a normal pathname contains ";" but that should
2305 # okay in the real world where ";" in dirpaths is itself problematic.
2306 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2307 ;;
2308 *)
2309 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2310 ;;
2311 esac
2312 # Ok, now we have the path, separated by spaces, we can step through it
2313 # and add multilib dir if necessary...
2314 lt_tmp_lt_search_path_spec=
2315 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2316 # ...but if some path component already ends with the multilib dir we assume
2317 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2318 case "$lt_multi_os_dir; $lt_search_path_spec " in
2319 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2320 lt_multi_os_dir=
2321 ;;
2322 esac
2323 for lt_sys_path in $lt_search_path_spec; do
2324 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2325 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2326 elif test -n "$lt_multi_os_dir"; then
2327 test -d "$lt_sys_path" && \
2328 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2329 fi
2330 done
2331 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2332 BEGIN {RS = " "; FS = "/|\n";} {
2333 lt_foo = "";
2334 lt_count = 0;
2335 for (lt_i = NF; lt_i > 0; lt_i--) {
2336 if ($lt_i != "" && $lt_i != ".") {
2337 if ($lt_i == "..") {
2338 lt_count++;
2339 } else {
2340 if (lt_count == 0) {
2341 lt_foo = "/" $lt_i lt_foo;
2342 } else {
2343 lt_count--;
2344 }
2345 }
2346 }
2347 }
2348 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2349 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2350 }'`
2351 # AWK program above erroneously prepends '/' to C:/dos/paths
2352 # for these hosts.
2353 case $host_os in
2354 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2355 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2356 esac
2357 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2358 else
2359 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2360 fi])
2361 library_names_spec=
2362 libname_spec='lib$name'
2363 soname_spec=
2364 shrext_cmds=.so
2365 postinstall_cmds=
2366 postuninstall_cmds=
2367 finish_cmds=
2368 finish_eval=
2369 shlibpath_var=
2370 shlibpath_overrides_runpath=unknown
2371 version_type=none
2372 dynamic_linker="$host_os ld.so"
2373 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2374 need_lib_prefix=unknown
2375 hardcode_into_libs=no
2376
2377 # when you set need_version to no, make sure it does not cause -set_version
2378 # flags to be left without arguments
2379 need_version=unknown
2380
2381 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2382 [User-defined run-time library search path.])
2383
2384 case $host_os in
2385 aix3*)
2386 version_type=linux # correct to gnu/linux during the next big refactor
2387 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2388 shlibpath_var=LIBPATH
2389
2390 # AIX 3 has no versioning support, so we append a major version to the name.
2391 soname_spec='$libname$release$shared_ext$major'
2392 ;;
2393
2394 aix[[4-9]]*)
2395 version_type=linux # correct to gnu/linux during the next big refactor
2396 need_lib_prefix=no
2397 need_version=no
2398 hardcode_into_libs=yes
2399 if test ia64 = "$host_cpu"; then
2400 # AIX 5 supports IA64
2401 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2402 shlibpath_var=LD_LIBRARY_PATH
2403 else
2404 # With GCC up to 2.95.x, collect2 would create an import file
2405 # for dependence libraries. The import file would start with
2406 # the line '#! .'. This would cause the generated library to
2407 # depend on '.', always an invalid library. This was fixed in
2408 # development snapshots of GCC prior to 3.0.
2409 case $host_os in
2410 aix4 | aix4.[[01]] | aix4.[[01]].*)
2411 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2412 echo ' yes '
2413 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2414 :
2415 else
2416 can_build_shared=no
2417 fi
2418 ;;
2419 esac
2420 # Using Import Files as archive members, it is possible to support
2421 # filename-based versioning of shared library archives on AIX. While
2422 # this would work for both with and without runtime linking, it will
2423 # prevent static linking of such archives. So we do filename-based
2424 # shared library versioning with .so extension only, which is used
2425 # when both runtime linking and shared linking is enabled.
2426 # Unfortunately, runtime linking may impact performance, so we do
2427 # not want this to be the default eventually. Also, we use the
2428 # versioned .so libs for executables only if there is the -brtl
2429 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2430 # To allow for filename-based versioning support, we need to create
2431 # libNAME.so.V as an archive file, containing:
2432 # *) an Import File, referring to the versioned filename of the
2433 # archive as well as the shared archive member, telling the
2434 # bitwidth (32 or 64) of that shared object, and providing the
2435 # list of exported symbols of that shared object, eventually
2436 # decorated with the 'weak' keyword
2437 # *) the shared object with the F_LOADONLY flag set, to really avoid
2438 # it being seen by the linker.
2439 # At run time we better use the real file rather than another symlink,
2440 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2441
2442 case $with_aix_soname,$aix_use_runtimelinking in
2443 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2444 # soname into executable. Probably we can add versioning support to
2445 # collect2, so additional links can be useful in future.
2446 aix,yes) # traditional libtool
2447 dynamic_linker='AIX unversionable lib.so'
2448 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2449 # instead of lib<name>.a to let people know that these are not
2450 # typical AIX shared libraries.
2451 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2452 ;;
2453 aix,no) # traditional AIX only
2454 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2455 # We preserve .a as extension for shared libraries through AIX4.2
2456 # and later when we are not doing run time linking.
2457 library_names_spec='$libname$release.a $libname.a'
2458 soname_spec='$libname$release$shared_ext$major'
2459 ;;
2460 svr4,*) # full svr4 only
2461 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2462 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2463 # We do not specify a path in Import Files, so LIBPATH fires.
2464 shlibpath_overrides_runpath=yes
2465 ;;
2466 *,yes) # both, prefer svr4
2467 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2468 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2469 # unpreferred sharedlib libNAME.a needs extra handling
2470 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2471 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2472 # We do not specify a path in Import Files, so LIBPATH fires.
2473 shlibpath_overrides_runpath=yes
2474 ;;
2475 *,no) # both, prefer aix
2476 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2477 library_names_spec='$libname$release.a $libname.a'
2478 soname_spec='$libname$release$shared_ext$major'
2479 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2480 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2481 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2482 ;;
2483 esac
2484 shlibpath_var=LIBPATH
2485 fi
2486 ;;
2487
2488 amigaos*)
2489 case $host_cpu in
2490 powerpc)
2491 # Since July 2007 AmigaOS4 officially supports .so libraries.
2492 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2493 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2494 ;;
2495 m68k)
2496 library_names_spec='$libname.ixlibrary $libname.a'
2497 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2498 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
2499 ;;
2500 esac
2501 ;;
2502
2503 beos*)
2504 library_names_spec='$libname$shared_ext'
2505 dynamic_linker="$host_os ld.so"
2506 shlibpath_var=LIBRARY_PATH
2507 ;;
2508
2509 bsdi[[45]]*)
2510 version_type=linux # correct to gnu/linux during the next big refactor
2511 need_version=no
2512 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2513 soname_spec='$libname$release$shared_ext$major'
2514 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2515 shlibpath_var=LD_LIBRARY_PATH
2516 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2517 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2518 # the default ld.so.conf also contains /usr/contrib/lib and
2519 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2520 # libtool to hard-code these into programs
2521 ;;
2522
2523 cygwin* | mingw* | pw32* | cegcc*)
2524 version_type=windows
2525 shrext_cmds=.dll
2526 need_version=no
2527 need_lib_prefix=no
2528
2529 case $GCC,$cc_basename in
2530 yes,*)
2531 # gcc
2532 library_names_spec='$libname.dll.a'
2533 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2534 postinstall_cmds='base_file=`basename \$file`~
2535 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2536 dldir=$destdir/`dirname \$dlpath`~
2537 test -d \$dldir || mkdir -p \$dldir~
2538 $install_prog $dir/$dlname \$dldir/$dlname~
2539 chmod a+x \$dldir/$dlname~
2540 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2541 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2542 fi'
2543 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2544 dlpath=$dir/\$dldll~
2545 $RM \$dlpath'
2546 shlibpath_overrides_runpath=yes
2547
2548 case $host_os in
2549 cygwin*)
2550 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2551 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2552 m4_if([$1], [],[
2553 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2554 ;;
2555 mingw* | cegcc*)
2556 # MinGW DLLs use traditional 'lib' prefix
2557 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2558 ;;
2559 pw32*)
2560 # pw32 DLLs use 'pw' prefix rather than 'lib'
2561 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2562 ;;
2563 esac
2564 dynamic_linker='Win32 ld.exe'
2565 ;;
2566
2567 *,cl*)
2568 # Native MSVC
2569 libname_spec='$name'
2570 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2571 library_names_spec='$libname.dll.lib'
2572
2573 case $build_os in
2574 mingw*)
2575 sys_lib_search_path_spec=
2576 lt_save_ifs=$IFS
2577 IFS=';'
2578 for lt_path in $LIB
2579 do
2580 IFS=$lt_save_ifs
2581 # Let DOS variable expansion print the short 8.3 style file name.
2582 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2583 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2584 done
2585 IFS=$lt_save_ifs
2586 # Convert to MSYS style.
2587 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2588 ;;
2589 cygwin*)
2590 # Convert to unix form, then to dos form, then back to unix form
2591 # but this time dos style (no spaces!) so that the unix form looks
2592 # like /cygdrive/c/PROGRA~1:/cygdr...
2593 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2594 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2595 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2596 ;;
2597 *)
2598 sys_lib_search_path_spec=$LIB
2599 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2600 # It is most probably a Windows format PATH.
2601 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2602 else
2603 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2604 fi
2605 # FIXME: find the short name or the path components, as spaces are
2606 # common. (e.g. "Program Files" -> "PROGRA~1")
2607 ;;
2608 esac
2609
2610 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2611 postinstall_cmds='base_file=`basename \$file`~
2612 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2613 dldir=$destdir/`dirname \$dlpath`~
2614 test -d \$dldir || mkdir -p \$dldir~
2615 $install_prog $dir/$dlname \$dldir/$dlname'
2616 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2617 dlpath=$dir/\$dldll~
2618 $RM \$dlpath'
2619 shlibpath_overrides_runpath=yes
2620 dynamic_linker='Win32 link.exe'
2621 ;;
2622
2623 *)
2624 # Assume MSVC wrapper
2625 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2626 dynamic_linker='Win32 ld.exe'
2627 ;;
2628 esac
2629 # FIXME: first we should search . and the directory the executable is in
2630 shlibpath_var=PATH
2631 ;;
2632
2633 darwin* | rhapsody*)
2634 dynamic_linker="$host_os dyld"
2635 version_type=darwin
2636 need_lib_prefix=no
2637 need_version=no
2638 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2639 soname_spec='$libname$release$major$shared_ext'
2640 shlibpath_overrides_runpath=yes
2641 shlibpath_var=DYLD_LIBRARY_PATH
2642 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2643 m4_if([$1], [],[
2644 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2645 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2646 ;;
2647
2648 dgux*)
2649 version_type=linux # correct to gnu/linux during the next big refactor
2650 need_lib_prefix=no
2651 need_version=no
2652 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2653 soname_spec='$libname$release$shared_ext$major'
2654 shlibpath_var=LD_LIBRARY_PATH
2655 ;;
2656
2657 freebsd* | dragonfly*)
2658 # DragonFly does not have aout. When/if they implement a new
2659 # versioning mechanism, adjust this.
2660 if test -x /usr/bin/objformat; then
2661 objformat=`/usr/bin/objformat`
2662 else
2663 case $host_os in
2664 freebsd[[23]].*) objformat=aout ;;
2665 *) objformat=elf ;;
2666 esac
2667 fi
2668 version_type=freebsd-$objformat
2669 case $version_type in
2670 freebsd-elf*)
2671 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2672 soname_spec='$libname$release$shared_ext$major'
2673 need_version=no
2674 need_lib_prefix=no
2675 ;;
2676 freebsd-*)
2677 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2678 need_version=yes
2679 ;;
2680 esac
2681 shlibpath_var=LD_LIBRARY_PATH
2682 case $host_os in
2683 freebsd2.*)
2684 shlibpath_overrides_runpath=yes
2685 ;;
2686 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2687 shlibpath_overrides_runpath=yes
2688 hardcode_into_libs=yes
2689 ;;
2690 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2691 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2692 shlibpath_overrides_runpath=no
2693 hardcode_into_libs=yes
2694 ;;
2695 *) # from 4.6 on, and DragonFly
2696 shlibpath_overrides_runpath=yes
2697 hardcode_into_libs=yes
2698 ;;
2699 esac
2700 ;;
2701
2702 haiku*)
2703 version_type=linux # correct to gnu/linux during the next big refactor
2704 need_lib_prefix=no
2705 need_version=no
2706 dynamic_linker="$host_os runtime_loader"
2707 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2708 soname_spec='$libname$release$shared_ext$major'
2709 shlibpath_var=LIBRARY_PATH
2710 shlibpath_overrides_runpath=no
2711 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2712 hardcode_into_libs=yes
2713 ;;
2714
2715 hpux9* | hpux10* | hpux11*)
2716 # Give a soname corresponding to the major version so that dld.sl refuses to
2717 # link against other versions.
2718 version_type=sunos
2719 need_lib_prefix=no
2720 need_version=no
2721 case $host_cpu in
2722 ia64*)
2723 shrext_cmds='.so'
2724 hardcode_into_libs=yes
2725 dynamic_linker="$host_os dld.so"
2726 shlibpath_var=LD_LIBRARY_PATH
2727 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2728 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2729 soname_spec='$libname$release$shared_ext$major'
2730 if test 32 = "$HPUX_IA64_MODE"; then
2731 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2732 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2733 else
2734 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2735 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2736 fi
2737 ;;
2738 hppa*64*)
2739 shrext_cmds='.sl'
2740 hardcode_into_libs=yes
2741 dynamic_linker="$host_os dld.sl"
2742 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2743 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2744 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2745 soname_spec='$libname$release$shared_ext$major'
2746 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2747 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2748 ;;
2749 *)
2750 shrext_cmds='.sl'
2751 dynamic_linker="$host_os dld.sl"
2752 shlibpath_var=SHLIB_PATH
2753 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2754 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2755 soname_spec='$libname$release$shared_ext$major'
2756 ;;
2757 esac
2758 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2759 postinstall_cmds='chmod 555 $lib'
2760 # or fails outright, so override atomically:
2761 install_override_mode=555
2762 ;;
2763
2764 interix[[3-9]]*)
2765 version_type=linux # correct to gnu/linux during the next big refactor
2766 need_lib_prefix=no
2767 need_version=no
2768 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2769 soname_spec='$libname$release$shared_ext$major'
2770 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2771 shlibpath_var=LD_LIBRARY_PATH
2772 shlibpath_overrides_runpath=no
2773 hardcode_into_libs=yes
2774 ;;
2775
2776 irix5* | irix6* | nonstopux*)
2777 case $host_os in
2778 nonstopux*) version_type=nonstopux ;;
2779 *)
2780 if test yes = "$lt_cv_prog_gnu_ld"; then
2781 version_type=linux # correct to gnu/linux during the next big refactor
2782 else
2783 version_type=irix
2784 fi ;;
2785 esac
2786 need_lib_prefix=no
2787 need_version=no
2788 soname_spec='$libname$release$shared_ext$major'
2789 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2790 case $host_os in
2791 irix5* | nonstopux*)
2792 libsuff= shlibsuff=
2793 ;;
2794 *)
2795 case $LD in # libtool.m4 will add one of these switches to LD
2796 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2797 libsuff= shlibsuff= libmagic=32-bit;;
2798 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2799 libsuff=32 shlibsuff=N32 libmagic=N32;;
2800 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2801 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2802 *) libsuff= shlibsuff= libmagic=never-match;;
2803 esac
2804 ;;
2805 esac
2806 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2807 shlibpath_overrides_runpath=no
2808 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2809 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2810 hardcode_into_libs=yes
2811 ;;
2812
2813 # No shared lib support for Linux oldld, aout, or coff.
2814 linux*oldld* | linux*aout* | linux*coff*)
2815 dynamic_linker=no
2816 ;;
2817
2818 linux*android*)
2819 version_type=none # Android doesn't support versioned libraries.
2820 need_lib_prefix=no
2821 need_version=no
2822 library_names_spec='$libname$release$shared_ext'
2823 soname_spec='$libname$release$shared_ext'
2824 finish_cmds=
2825 shlibpath_var=LD_LIBRARY_PATH
2826 shlibpath_overrides_runpath=yes
2827
2828 # This implies no fast_install, which is unacceptable.
2829 # Some rework will be needed to allow for fast_install
2830 # before this can be enabled.
2831 hardcode_into_libs=yes
2832
2833 dynamic_linker='Android linker'
2834 # Don't embed -rpath directories since the linker doesn't support them.
2835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2836 ;;
2837
2838 # This must be glibc/ELF.
2839 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2840 version_type=linux # correct to gnu/linux during the next big refactor
2841 need_lib_prefix=no
2842 need_version=no
2843 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2844 soname_spec='$libname$release$shared_ext$major'
2845 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2846 shlibpath_var=LD_LIBRARY_PATH
2847 shlibpath_overrides_runpath=no
2848
2849 # Some binutils ld are patched to set DT_RUNPATH
2850 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2851 [lt_cv_shlibpath_overrides_runpath=no
2852 save_LDFLAGS=$LDFLAGS
2853 save_libdir=$libdir
2854 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2855 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2856 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2857 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2858 [lt_cv_shlibpath_overrides_runpath=yes])])
2859 LDFLAGS=$save_LDFLAGS
2860 libdir=$save_libdir
2861 ])
2862 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2863
2864 # This implies no fast_install, which is unacceptable.
2865 # Some rework will be needed to allow for fast_install
2866 # before this can be enabled.
2867 hardcode_into_libs=yes
2868
2869 # Ideally, we could use ldconfig to report *all* directores which are
2870 # searched for libraries, however this is still not possible. Aside from not
2871 # being certain /sbin/ldconfig is available, command
2872 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2873 # even though it is searched at run-time. Try to do the best guess by
2874 # appending ld.so.conf contents (and includes) to the search path.
2875 if test -f /etc/ld.so.conf; then
2876 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2877 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2878 fi
2879
2880 # We used to test for /lib/ld.so.1 and disable shared libraries on
2881 # powerpc, because MkLinux only supported shared libraries with the
2882 # GNU dynamic linker. Since this was broken with cross compilers,
2883 # most powerpc-linux boxes support dynamic linking these days and
2884 # people can always --disable-shared, the test was removed, and we
2885 # assume the GNU/Linux dynamic linker is in use.
2886 dynamic_linker='GNU/Linux ld.so'
2887 ;;
2888
2889 netbsdelf*-gnu)
2890 version_type=linux
2891 need_lib_prefix=no
2892 need_version=no
2893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2894 soname_spec='${libname}${release}${shared_ext}$major'
2895 shlibpath_var=LD_LIBRARY_PATH
2896 shlibpath_overrides_runpath=no
2897 hardcode_into_libs=yes
2898 dynamic_linker='NetBSD ld.elf_so'
2899 ;;
2900
2901 netbsd*)
2902 version_type=sunos
2903 need_lib_prefix=no
2904 need_version=no
2905 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2906 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2907 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2908 dynamic_linker='NetBSD (a.out) ld.so'
2909 else
2910 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2911 soname_spec='$libname$release$shared_ext$major'
2912 dynamic_linker='NetBSD ld.elf_so'
2913 fi
2914 shlibpath_var=LD_LIBRARY_PATH
2915 shlibpath_overrides_runpath=yes
2916 hardcode_into_libs=yes
2917 ;;
2918
2919 newsos6)
2920 version_type=linux # correct to gnu/linux during the next big refactor
2921 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2922 shlibpath_var=LD_LIBRARY_PATH
2923 shlibpath_overrides_runpath=yes
2924 ;;
2925
2926 *nto* | *qnx*)
2927 version_type=qnx
2928 need_lib_prefix=no
2929 need_version=no
2930 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2931 soname_spec='$libname$release$shared_ext$major'
2932 shlibpath_var=LD_LIBRARY_PATH
2933 shlibpath_overrides_runpath=no
2934 hardcode_into_libs=yes
2935 dynamic_linker='ldqnx.so'
2936 ;;
2937
2938 openbsd* | bitrig*)
2939 version_type=sunos
2940 sys_lib_dlsearch_path_spec=/usr/lib
2941 need_lib_prefix=no
2942 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2943 need_version=no
2944 else
2945 need_version=yes
2946 fi
2947 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2948 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2949 shlibpath_var=LD_LIBRARY_PATH
2950 shlibpath_overrides_runpath=yes
2951 ;;
2952
2953 os2*)
2954 libname_spec='$name'
2955 version_type=windows
2956 shrext_cmds=.dll
2957 need_version=no
2958 need_lib_prefix=no
2959 # OS/2 can only load a DLL with a base name of 8 characters or less.
2960 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2961 v=$($ECHO $release$versuffix | tr -d .-);
2962 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2963 $ECHO $n$v`$shared_ext'
2964 library_names_spec='${libname}_dll.$libext'
2965 dynamic_linker='OS/2 ld.exe'
2966 shlibpath_var=BEGINLIBPATH
2967 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2968 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2969 postinstall_cmds='base_file=`basename \$file`~
2970 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2971 dldir=$destdir/`dirname \$dlpath`~
2972 test -d \$dldir || mkdir -p \$dldir~
2973 $install_prog $dir/$dlname \$dldir/$dlname~
2974 chmod a+x \$dldir/$dlname~
2975 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2976 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2977 fi'
2978 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2979 dlpath=$dir/\$dldll~
2980 $RM \$dlpath'
2981 ;;
2982
2983 osf3* | osf4* | osf5*)
2984 version_type=osf
2985 need_lib_prefix=no
2986 need_version=no
2987 soname_spec='$libname$release$shared_ext$major'
2988 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2989 shlibpath_var=LD_LIBRARY_PATH
2990 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2991 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2992 ;;
2993
2994 rdos*)
2995 dynamic_linker=no
2996 ;;
2997
2998 solaris*)
2999 version_type=linux # correct to gnu/linux during the next big refactor
3000 need_lib_prefix=no
3001 need_version=no
3002 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3003 soname_spec='$libname$release$shared_ext$major'
3004 shlibpath_var=LD_LIBRARY_PATH
3005 shlibpath_overrides_runpath=yes
3006 hardcode_into_libs=yes
3007 # ldd complains unless libraries are executable
3008 postinstall_cmds='chmod +x $lib'
3009 ;;
3010
3011 sunos4*)
3012 version_type=sunos
3013 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3014 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3015 shlibpath_var=LD_LIBRARY_PATH
3016 shlibpath_overrides_runpath=yes
3017 if test yes = "$with_gnu_ld"; then
3018 need_lib_prefix=no
3019 fi
3020 need_version=yes
3021 ;;
3022
3023 sysv4 | sysv4.3*)
3024 version_type=linux # correct to gnu/linux during the next big refactor
3025 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3026 soname_spec='$libname$release$shared_ext$major'
3027 shlibpath_var=LD_LIBRARY_PATH
3028 case $host_vendor in
3029 sni)
3030 shlibpath_overrides_runpath=no
3031 need_lib_prefix=no
3032 runpath_var=LD_RUN_PATH
3033 ;;
3034 siemens)
3035 need_lib_prefix=no
3036 ;;
3037 motorola)
3038 need_lib_prefix=no
3039 need_version=no
3040 shlibpath_overrides_runpath=no
3041 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3042 ;;
3043 esac
3044 ;;
3045
3046 sysv4*MP*)
3047 if test -d /usr/nec; then
3048 version_type=linux # correct to gnu/linux during the next big refactor
3049 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3050 soname_spec='$libname$shared_ext.$major'
3051 shlibpath_var=LD_LIBRARY_PATH
3052 fi
3053 ;;
3054
3055 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3056 version_type=sco
3057 need_lib_prefix=no
3058 need_version=no
3059 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3060 soname_spec='$libname$release$shared_ext$major'
3061 shlibpath_var=LD_LIBRARY_PATH
3062 shlibpath_overrides_runpath=yes
3063 hardcode_into_libs=yes
3064 if test yes = "$with_gnu_ld"; then
3065 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3066 else
3067 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3068 case $host_os in
3069 sco3.2v5*)
3070 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3071 ;;
3072 esac
3073 fi
3074 sys_lib_dlsearch_path_spec='/usr/lib'
3075 ;;
3076
3077 tpf*)
3078 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3079 version_type=linux # correct to gnu/linux during the next big refactor
3080 need_lib_prefix=no
3081 need_version=no
3082 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3083 shlibpath_var=LD_LIBRARY_PATH
3084 shlibpath_overrides_runpath=no
3085 hardcode_into_libs=yes
3086 ;;
3087
3088 uts4*)
3089 version_type=linux # correct to gnu/linux during the next big refactor
3090 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3091 soname_spec='$libname$release$shared_ext$major'
3092 shlibpath_var=LD_LIBRARY_PATH
3093 ;;
3094
3095 *)
3096 dynamic_linker=no
3097 ;;
3098 esac
3099 AC_MSG_RESULT([$dynamic_linker])
3100 test no = "$dynamic_linker" && can_build_shared=no
3101
3102 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3103 if test yes = "$GCC"; then
3104 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3105 fi
3106
3107 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3108 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3109 fi
3110
3111 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3112 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3113 fi
3114
3115 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3116 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3117
3118 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3119 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3120
3121 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3122 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3123
3124 _LT_DECL([], [variables_saved_for_relink], [1],
3125 [Variables whose values should be saved in libtool wrapper scripts and
3126 restored at link time])
3127 _LT_DECL([], [need_lib_prefix], [0],
3128 [Do we need the "lib" prefix for modules?])
3129 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3130 _LT_DECL([], [version_type], [0], [Library versioning type])
3131 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3132 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3133 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3134 [Is shlibpath searched before the hard-coded library search path?])
3135 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3136 _LT_DECL([], [library_names_spec], [1],
3137 [[List of archive names. First name is the real one, the rest are links.
3138 The last name is the one that the linker finds with -lNAME]])
3139 _LT_DECL([], [soname_spec], [1],
3140 [[The coded name of the library, if different from the real name]])
3141 _LT_DECL([], [install_override_mode], [1],
3142 [Permission mode override for installation of shared libraries])
3143 _LT_DECL([], [postinstall_cmds], [2],
3144 [Command to use after installation of a shared archive])
3145 _LT_DECL([], [postuninstall_cmds], [2],
3146 [Command to use after uninstallation of a shared archive])
3147 _LT_DECL([], [finish_cmds], [2],
3148 [Commands used to finish a libtool library installation in a directory])
3149 _LT_DECL([], [finish_eval], [1],
3150 [[As "finish_cmds", except a single script fragment to be evaled but
3151 not shown]])
3152 _LT_DECL([], [hardcode_into_libs], [0],
3153 [Whether we should hardcode library paths into libraries])
3154 _LT_DECL([], [sys_lib_search_path_spec], [2],
3155 [Compile-time system search path for libraries])
3156 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3157 [Detected run-time system search path for libraries])
3158 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3159 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3160 ])# _LT_SYS_DYNAMIC_LINKER
3161
3162
3163 # _LT_PATH_TOOL_PREFIX(TOOL)
3164 # --------------------------
3165 # find a file program that can recognize shared library
3166 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3167 [m4_require([_LT_DECL_EGREP])dnl
3168 AC_MSG_CHECKING([for $1])
3169 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3170 [case $MAGIC_CMD in
3171 [[\\/*] | ?:[\\/]*])
3172 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3173 ;;
3174 *)
3175 lt_save_MAGIC_CMD=$MAGIC_CMD
3176 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3177 dnl $ac_dummy forces splitting on constant user-supplied paths.
3178 dnl POSIX.2 word splitting is done only on the output of word expansions,
3179 dnl not every word. This closes a longstanding sh security hole.
3180 ac_dummy="m4_if([$2], , $PATH, [$2])"
3181 for ac_dir in $ac_dummy; do
3182 IFS=$lt_save_ifs
3183 test -z "$ac_dir" && ac_dir=.
3184 if test -f "$ac_dir/$1"; then
3185 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3186 if test -n "$file_magic_test_file"; then
3187 case $deplibs_check_method in
3188 "file_magic "*)
3189 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3190 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3191 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3192 $EGREP "$file_magic_regex" > /dev/null; then
3193 :
3194 else
3195 cat <<_LT_EOF 1>&2
3196
3197 *** Warning: the command libtool uses to detect shared libraries,
3198 *** $file_magic_cmd, produces output that libtool cannot recognize.
3199 *** The result is that libtool may fail to recognize shared libraries
3200 *** as such. This will affect the creation of libtool libraries that
3201 *** depend on shared libraries, but programs linked with such libtool
3202 *** libraries will work regardless of this problem. Nevertheless, you
3203 *** may want to report the problem to your system manager and/or to
3204 *** bug-libtool@gnu.org
3205
3206 _LT_EOF
3207 fi ;;
3208 esac
3209 fi
3210 break
3211 fi
3212 done
3213 IFS=$lt_save_ifs
3214 MAGIC_CMD=$lt_save_MAGIC_CMD
3215 ;;
3216 esac])
3217 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3218 if test -n "$MAGIC_CMD"; then
3219 AC_MSG_RESULT($MAGIC_CMD)
3220 else
3221 AC_MSG_RESULT(no)
3222 fi
3223 _LT_DECL([], [MAGIC_CMD], [0],
3224 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3225 ])# _LT_PATH_TOOL_PREFIX
3226
3227 # Old name:
3228 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3229 dnl aclocal-1.4 backwards compatibility:
3230 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3231
3232
3233 # _LT_PATH_MAGIC
3234 # --------------
3235 # find a file program that can recognize a shared library
3236 m4_defun([_LT_PATH_MAGIC],
3237 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3238 if test -z "$lt_cv_path_MAGIC_CMD"; then
3239 if test -n "$ac_tool_prefix"; then
3240 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3241 else
3242 MAGIC_CMD=:
3243 fi
3244 fi
3245 ])# _LT_PATH_MAGIC
3246
3247
3248 # LT_PATH_LD
3249 # ----------
3250 # find the pathname to the GNU or non-GNU linker
3251 AC_DEFUN([LT_PATH_LD],
3252 [AC_REQUIRE([AC_PROG_CC])dnl
3253 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3254 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3255 m4_require([_LT_DECL_SED])dnl
3256 m4_require([_LT_DECL_EGREP])dnl
3257 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3258
3259 AC_ARG_WITH([gnu-ld],
3260 [AS_HELP_STRING([--with-gnu-ld],
3261 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3262 [test no = "$withval" || with_gnu_ld=yes],
3263 [with_gnu_ld=no])dnl
3264
3265 ac_prog=ld
3266 if test yes = "$GCC"; then
3267 # Check if gcc -print-prog-name=ld gives a path.
3268 AC_MSG_CHECKING([for ld used by $CC])
3269 case $host in
3270 *-*-mingw*)
3271 # gcc leaves a trailing carriage return, which upsets mingw
3272 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3273 *)
3274 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3275 esac
3276 case $ac_prog in
3277 # Accept absolute paths.
3278 [[\\/]]* | ?:[[\\/]]*)
3279 re_direlt='/[[^/]][[^/]]*/\.\./'
3280 # Canonicalize the pathname of ld
3281 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3282 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3283 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3284 done
3285 test -z "$LD" && LD=$ac_prog
3286 ;;
3287 "")
3288 # If it fails, then pretend we aren't using GCC.
3289 ac_prog=ld
3290 ;;
3291 *)
3292 # If it is relative, then search for the first ld in PATH.
3293 with_gnu_ld=unknown
3294 ;;
3295 esac
3296 elif test yes = "$with_gnu_ld"; then
3297 AC_MSG_CHECKING([for GNU ld])
3298 else
3299 AC_MSG_CHECKING([for non-GNU ld])
3300 fi
3301 AC_CACHE_VAL(lt_cv_path_LD,
3302 [if test -z "$LD"; then
3303 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3304 for ac_dir in $PATH; do
3305 IFS=$lt_save_ifs
3306 test -z "$ac_dir" && ac_dir=.
3307 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3308 lt_cv_path_LD=$ac_dir/$ac_prog
3309 # Check to see if the program is GNU ld. I'd rather use --version,
3310 # but apparently some variants of GNU ld only accept -v.
3311 # Break only if it was the GNU/non-GNU ld that we prefer.
3312 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3313 *GNU* | *'with BFD'*)
3314 test no != "$with_gnu_ld" && break
3315 ;;
3316 *)
3317 test yes != "$with_gnu_ld" && break
3318 ;;
3319 esac
3320 fi
3321 done
3322 IFS=$lt_save_ifs
3323 else
3324 lt_cv_path_LD=$LD # Let the user override the test with a path.
3325 fi])
3326 LD=$lt_cv_path_LD
3327 if test -n "$LD"; then
3328 AC_MSG_RESULT($LD)
3329 else
3330 AC_MSG_RESULT(no)
3331 fi
3332 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3333 _LT_PATH_LD_GNU
3334 AC_SUBST([LD])
3335
3336 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3337 ])# LT_PATH_LD
3338
3339 # Old names:
3340 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3341 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3342 dnl aclocal-1.4 backwards compatibility:
3343 dnl AC_DEFUN([AM_PROG_LD], [])
3344 dnl AC_DEFUN([AC_PROG_LD], [])
3345
3346
3347 # _LT_PATH_LD_GNU
3348 #- --------------
3349 m4_defun([_LT_PATH_LD_GNU],
3350 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3351 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3352 case `$LD -v 2>&1 </dev/null` in
3353 *GNU* | *'with BFD'*)
3354 lt_cv_prog_gnu_ld=yes
3355 ;;
3356 *)
3357 lt_cv_prog_gnu_ld=no
3358 ;;
3359 esac])
3360 with_gnu_ld=$lt_cv_prog_gnu_ld
3361 ])# _LT_PATH_LD_GNU
3362
3363
3364 # _LT_CMD_RELOAD
3365 # --------------
3366 # find reload flag for linker
3367 # -- PORTME Some linkers may need a different reload flag.
3368 m4_defun([_LT_CMD_RELOAD],
3369 [AC_CACHE_CHECK([for $LD option to reload object files],
3370 lt_cv_ld_reload_flag,
3371 [lt_cv_ld_reload_flag='-r'])
3372 reload_flag=$lt_cv_ld_reload_flag
3373 case $reload_flag in
3374 "" | " "*) ;;
3375 *) reload_flag=" $reload_flag" ;;
3376 esac
3377 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3378 case $host_os in
3379 cygwin* | mingw* | pw32* | cegcc*)
3380 if test yes != "$GCC"; then
3381 reload_cmds=false
3382 fi
3383 ;;
3384 darwin*)
3385 if test yes = "$GCC"; then
3386 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3387 else
3388 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3389 fi
3390 ;;
3391 esac
3392 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3393 _LT_TAGDECL([], [reload_cmds], [2])dnl
3394 ])# _LT_CMD_RELOAD
3395
3396
3397 # _LT_PATH_DD
3398 # -----------
3399 # find a working dd
3400 m4_defun([_LT_PATH_DD],
3401 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3402 [printf 0123456789abcdef0123456789abcdef >conftest.i
3403 cat conftest.i conftest.i >conftest2.i
3404 : ${lt_DD:=$DD}
3405 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3406 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3407 cmp -s conftest.i conftest.out \
3408 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3409 fi])
3410 rm -f conftest.i conftest2.i conftest.out])
3411 ])# _LT_PATH_DD
3412
3413
3414 # _LT_CMD_TRUNCATE
3415 # ----------------
3416 # find command to truncate a binary pipe
3417 m4_defun([_LT_CMD_TRUNCATE],
3418 [m4_require([_LT_PATH_DD])
3419 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3420 [printf 0123456789abcdef0123456789abcdef >conftest.i
3421 cat conftest.i conftest.i >conftest2.i
3422 lt_cv_truncate_bin=
3423 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3424 cmp -s conftest.i conftest.out \
3425 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3426 fi
3427 rm -f conftest.i conftest2.i conftest.out
3428 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3429 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3430 [Command to truncate a binary pipe])
3431 ])# _LT_CMD_TRUNCATE
3432
3433
3434 # _LT_CHECK_MAGIC_METHOD
3435 # ----------------------
3436 # how to check for library dependencies
3437 # -- PORTME fill in with the dynamic library characteristics
3438 m4_defun([_LT_CHECK_MAGIC_METHOD],
3439 [m4_require([_LT_DECL_EGREP])
3440 m4_require([_LT_DECL_OBJDUMP])
3441 AC_CACHE_CHECK([how to recognize dependent libraries],
3442 lt_cv_deplibs_check_method,
3443 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3444 lt_cv_file_magic_test_file=
3445 lt_cv_deplibs_check_method='unknown'
3446 # Need to set the preceding variable on all platforms that support
3447 # interlibrary dependencies.
3448 # 'none' -- dependencies not supported.
3449 # 'unknown' -- same as none, but documents that we really don't know.
3450 # 'pass_all' -- all dependencies passed with no checks.
3451 # 'test_compile' -- check by making test program.
3452 # 'file_magic [[regex]]' -- check by looking for files in library path
3453 # that responds to the $file_magic_cmd with a given extended regex.
3454 # If you have 'file' or equivalent on your system and you're not sure
3455 # whether 'pass_all' will *always* work, you probably want this one.
3456
3457 case $host_os in
3458 aix[[4-9]]*)
3459 lt_cv_deplibs_check_method=pass_all
3460 ;;
3461
3462 beos*)
3463 lt_cv_deplibs_check_method=pass_all
3464 ;;
3465
3466 bsdi[[45]]*)
3467 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3468 lt_cv_file_magic_cmd='/usr/bin/file -L'
3469 lt_cv_file_magic_test_file=/shlib/libc.so
3470 ;;
3471
3472 cygwin*)
3473 # func_win32_libid is a shell function defined in ltmain.sh
3474 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3475 lt_cv_file_magic_cmd='func_win32_libid'
3476 ;;
3477
3478 mingw* | pw32*)
3479 # Base MSYS/MinGW do not provide the 'file' command needed by
3480 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3481 # unless we find 'file', for example because we are cross-compiling.
3482 if ( file / ) >/dev/null 2>&1; then
3483 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3484 lt_cv_file_magic_cmd='func_win32_libid'
3485 else
3486 # Keep this pattern in sync with the one in func_win32_libid.
3487 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3488 lt_cv_file_magic_cmd='$OBJDUMP -f'
3489 fi
3490 ;;
3491
3492 cegcc*)
3493 # use the weaker test based on 'objdump'. See mingw*.
3494 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3495 lt_cv_file_magic_cmd='$OBJDUMP -f'
3496 ;;
3497
3498 darwin* | rhapsody*)
3499 lt_cv_deplibs_check_method=pass_all
3500 ;;
3501
3502 freebsd* | dragonfly*)
3503 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3504 case $host_cpu in
3505 i*86 )
3506 # Not sure whether the presence of OpenBSD here was a mistake.
3507 # Let's accept both of them until this is cleared up.
3508 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3509 lt_cv_file_magic_cmd=/usr/bin/file
3510 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3511 ;;
3512 esac
3513 else
3514 lt_cv_deplibs_check_method=pass_all
3515 fi
3516 ;;
3517
3518 haiku*)
3519 lt_cv_deplibs_check_method=pass_all
3520 ;;
3521
3522 hpux10.20* | hpux11*)
3523 lt_cv_file_magic_cmd=/usr/bin/file
3524 case $host_cpu in
3525 ia64*)
3526 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3527 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3528 ;;
3529 hppa*64*)
3530 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3531 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3532 ;;
3533 *)
3534 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3535 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3536 ;;
3537 esac
3538 ;;
3539
3540 interix[[3-9]]*)
3541 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3542 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3543 ;;
3544
3545 irix5* | irix6* | nonstopux*)
3546 case $LD in
3547 *-32|*"-32 ") libmagic=32-bit;;
3548 *-n32|*"-n32 ") libmagic=N32;;
3549 *-64|*"-64 ") libmagic=64-bit;;
3550 *) libmagic=never-match;;
3551 esac
3552 lt_cv_deplibs_check_method=pass_all
3553 ;;
3554
3555 # This must be glibc/ELF.
3556 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3557 lt_cv_deplibs_check_method=pass_all
3558 ;;
3559
3560 netbsd* | netbsdelf*-gnu)
3561 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3562 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3563 else
3564 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3565 fi
3566 ;;
3567
3568 newos6*)
3569 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3570 lt_cv_file_magic_cmd=/usr/bin/file
3571 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3572 ;;
3573
3574 *nto* | *qnx*)
3575 lt_cv_deplibs_check_method=pass_all
3576 ;;
3577
3578 openbsd* | bitrig*)
3579 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3580 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3581 else
3582 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3583 fi
3584 ;;
3585
3586 osf3* | osf4* | osf5*)
3587 lt_cv_deplibs_check_method=pass_all
3588 ;;
3589
3590 rdos*)
3591 lt_cv_deplibs_check_method=pass_all
3592 ;;
3593
3594 solaris*)
3595 lt_cv_deplibs_check_method=pass_all
3596 ;;
3597
3598 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3599 lt_cv_deplibs_check_method=pass_all
3600 ;;
3601
3602 sysv4 | sysv4.3*)
3603 case $host_vendor in
3604 motorola)
3605 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]]'
3606 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3607 ;;
3608 ncr)
3609 lt_cv_deplibs_check_method=pass_all
3610 ;;
3611 sequent)
3612 lt_cv_file_magic_cmd='/bin/file'
3613 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3614 ;;
3615 sni)
3616 lt_cv_file_magic_cmd='/bin/file'
3617 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3618 lt_cv_file_magic_test_file=/lib/libc.so
3619 ;;
3620 siemens)
3621 lt_cv_deplibs_check_method=pass_all
3622 ;;
3623 pc)
3624 lt_cv_deplibs_check_method=pass_all
3625 ;;
3626 esac
3627 ;;
3628
3629 tpf*)
3630 lt_cv_deplibs_check_method=pass_all
3631 ;;
3632 os2*)
3633 lt_cv_deplibs_check_method=pass_all
3634 ;;
3635 esac
3636 ])
3637
3638 file_magic_glob=
3639 want_nocaseglob=no
3640 if test "$build" = "$host"; then
3641 case $host_os in
3642 mingw* | pw32*)
3643 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3644 want_nocaseglob=yes
3645 else
3646 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3647 fi
3648 ;;
3649 esac
3650 fi
3651
3652 file_magic_cmd=$lt_cv_file_magic_cmd
3653 deplibs_check_method=$lt_cv_deplibs_check_method
3654 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3655
3656 _LT_DECL([], [deplibs_check_method], [1],
3657 [Method to check whether dependent libraries are shared objects])
3658 _LT_DECL([], [file_magic_cmd], [1],
3659 [Command to use when deplibs_check_method = "file_magic"])
3660 _LT_DECL([], [file_magic_glob], [1],
3661 [How to find potential files when deplibs_check_method = "file_magic"])
3662 _LT_DECL([], [want_nocaseglob], [1],
3663 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3664 ])# _LT_CHECK_MAGIC_METHOD
3665
3666
3667 # LT_PATH_NM
3668 # ----------
3669 # find the pathname to a BSD- or MS-compatible name lister
3670 AC_DEFUN([LT_PATH_NM],
3671 [AC_REQUIRE([AC_PROG_CC])dnl
3672 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3673 [if test -n "$NM"; then
3674 # Let the user override the test.
3675 lt_cv_path_NM=$NM
3676 else
3677 lt_nm_to_check=${ac_tool_prefix}nm
3678 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3679 lt_nm_to_check="$lt_nm_to_check nm"
3680 fi
3681 for lt_tmp_nm in $lt_nm_to_check; do
3682 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3683 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3684 IFS=$lt_save_ifs
3685 test -z "$ac_dir" && ac_dir=.
3686 tmp_nm=$ac_dir/$lt_tmp_nm
3687 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3688 # Check to see if the nm accepts a BSD-compat flag.
3689 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3690 # nm: unknown option "B" ignored
3691 # Tru64's nm complains that /dev/null is an invalid object file
3692 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3693 case $build_os in
3694 mingw*) lt_bad_file=conftest.nm/nofile ;;
3695 *) lt_bad_file=/dev/null ;;
3696 esac
3697 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3698 *$lt_bad_file* | *'Invalid file or object type'*)
3699 lt_cv_path_NM="$tmp_nm -B"
3700 break 2
3701 ;;
3702 *)
3703 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3704 */dev/null*)
3705 lt_cv_path_NM="$tmp_nm -p"
3706 break 2
3707 ;;
3708 *)
3709 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3710 continue # so that we can try to find one that supports BSD flags
3711 ;;
3712 esac
3713 ;;
3714 esac
3715 fi
3716 done
3717 IFS=$lt_save_ifs
3718 done
3719 : ${lt_cv_path_NM=no}
3720 fi])
3721 if test no != "$lt_cv_path_NM"; then
3722 NM=$lt_cv_path_NM
3723 else
3724 # Didn't find any BSD compatible name lister, look for dumpbin.
3725 if test -n "$DUMPBIN"; then :
3726 # Let the user override the test.
3727 else
3728 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3729 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3730 *COFF*)
3731 DUMPBIN="$DUMPBIN -symbols -headers"
3732 ;;
3733 *)
3734 DUMPBIN=:
3735 ;;
3736 esac
3737 fi
3738 AC_SUBST([DUMPBIN])
3739 if test : != "$DUMPBIN"; then
3740 NM=$DUMPBIN
3741 fi
3742 fi
3743 test -z "$NM" && NM=nm
3744 AC_SUBST([NM])
3745 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3746
3747 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3748 [lt_cv_nm_interface="BSD nm"
3749 echo "int some_variable = 0;" > conftest.$ac_ext
3750 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3751 (eval "$ac_compile" 2>conftest.err)
3752 cat conftest.err >&AS_MESSAGE_LOG_FD
3753 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3754 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3755 cat conftest.err >&AS_MESSAGE_LOG_FD
3756 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3757 cat conftest.out >&AS_MESSAGE_LOG_FD
3758 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3759 lt_cv_nm_interface="MS dumpbin"
3760 fi
3761 rm -f conftest*])
3762 ])# LT_PATH_NM
3763
3764 # Old names:
3765 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3766 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3767 dnl aclocal-1.4 backwards compatibility:
3768 dnl AC_DEFUN([AM_PROG_NM], [])
3769 dnl AC_DEFUN([AC_PROG_NM], [])
3770
3771 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3772 # --------------------------------
3773 # how to determine the name of the shared library
3774 # associated with a specific link library.
3775 # -- PORTME fill in with the dynamic library characteristics
3776 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3777 [m4_require([_LT_DECL_EGREP])
3778 m4_require([_LT_DECL_OBJDUMP])
3779 m4_require([_LT_DECL_DLLTOOL])
3780 AC_CACHE_CHECK([how to associate runtime and link libraries],
3781 lt_cv_sharedlib_from_linklib_cmd,
3782 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3783
3784 case $host_os in
3785 cygwin* | mingw* | pw32* | cegcc*)
3786 # two different shell functions defined in ltmain.sh;
3787 # decide which one to use based on capabilities of $DLLTOOL
3788 case `$DLLTOOL --help 2>&1` in
3789 *--identify-strict*)
3790 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3791 ;;
3792 *)
3793 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3794 ;;
3795 esac
3796 ;;
3797 *)
3798 # fallback: assume linklib IS sharedlib
3799 lt_cv_sharedlib_from_linklib_cmd=$ECHO
3800 ;;
3801 esac
3802 ])
3803 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3804 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3805
3806 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3807 [Command to associate shared and link libraries])
3808 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3809
3810
3811 # _LT_PATH_MANIFEST_TOOL
3812 # ----------------------
3813 # locate the manifest tool
3814 m4_defun([_LT_PATH_MANIFEST_TOOL],
3815 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3816 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3817 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3818 [lt_cv_path_mainfest_tool=no
3819 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3820 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3821 cat conftest.err >&AS_MESSAGE_LOG_FD
3822 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3823 lt_cv_path_mainfest_tool=yes
3824 fi
3825 rm -f conftest*])
3826 if test yes != "$lt_cv_path_mainfest_tool"; then
3827 MANIFEST_TOOL=:
3828 fi
3829 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3830 ])# _LT_PATH_MANIFEST_TOOL
3831
3832
3833 # _LT_DLL_DEF_P([FILE])
3834 # ---------------------
3835 # True iff FILE is a Windows DLL '.def' file.
3836 # Keep in sync with func_dll_def_p in the libtool script
3837 AC_DEFUN([_LT_DLL_DEF_P],
3838 [dnl
3839 test DEF = "`$SED -n dnl
3840 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3841 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3842 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3843 -e q dnl Only consider the first "real" line
3844 $1`" dnl
3845 ])# _LT_DLL_DEF_P
3846
3847
3848 # LT_LIB_M
3849 # --------
3850 # check for math library
3851 AC_DEFUN([LT_LIB_M],
3852 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3853 LIBM=
3854 case $host in
3855 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3856 # These system don't have libm, or don't need it
3857 ;;
3858 *-ncr-sysv4.3*)
3859 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3860 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3861 ;;
3862 *)
3863 AC_CHECK_LIB(m, cos, LIBM=-lm)
3864 ;;
3865 esac
3866 AC_SUBST([LIBM])
3867 ])# LT_LIB_M
3868
3869 # Old name:
3870 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3871 dnl aclocal-1.4 backwards compatibility:
3872 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3873
3874
3875 # _LT_COMPILER_NO_RTTI([TAGNAME])
3876 # -------------------------------
3877 m4_defun([_LT_COMPILER_NO_RTTI],
3878 [m4_require([_LT_TAG_COMPILER])dnl
3879
3880 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3881
3882 if test yes = "$GCC"; then
3883 case $cc_basename in
3884 nvcc*)
3885 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3886 *)
3887 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3888 esac
3889
3890 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3891 lt_cv_prog_compiler_rtti_exceptions,
3892 [-fno-rtti -fno-exceptions], [],
3893 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3894 fi
3895 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3896 [Compiler flag to turn off builtin functions])
3897 ])# _LT_COMPILER_NO_RTTI
3898
3899
3900 # _LT_CMD_GLOBAL_SYMBOLS
3901 # ----------------------
3902 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3903 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3904 AC_REQUIRE([AC_PROG_CC])dnl
3905 AC_REQUIRE([AC_PROG_AWK])dnl
3906 AC_REQUIRE([LT_PATH_NM])dnl
3907 AC_REQUIRE([LT_PATH_LD])dnl
3908 m4_require([_LT_DECL_SED])dnl
3909 m4_require([_LT_DECL_EGREP])dnl
3910 m4_require([_LT_TAG_COMPILER])dnl
3911
3912 # Check for command to grab the raw symbol name followed by C symbol from nm.
3913 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3914 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3915 [
3916 # These are sane defaults that work on at least a few old systems.
3917 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3918
3919 # Character class describing NM global symbol codes.
3920 symcode='[[BCDEGRST]]'
3921
3922 # Regexp to match symbols that can be accessed directly from C.
3923 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3924
3925 # Define system-specific variables.
3926 case $host_os in
3927 aix*)
3928 symcode='[[BCDT]]'
3929 ;;
3930 cygwin* | mingw* | pw32* | cegcc*)
3931 symcode='[[ABCDGISTW]]'
3932 ;;
3933 hpux*)
3934 if test ia64 = "$host_cpu"; then
3935 symcode='[[ABCDEGRST]]'
3936 fi
3937 ;;
3938 irix* | nonstopux*)
3939 symcode='[[BCDEGRST]]'
3940 ;;
3941 osf*)
3942 symcode='[[BCDEGQRST]]'
3943 ;;
3944 solaris*)
3945 symcode='[[BDRT]]'
3946 ;;
3947 sco3.2v5*)
3948 symcode='[[DT]]'
3949 ;;
3950 sysv4.2uw2*)
3951 symcode='[[DT]]'
3952 ;;
3953 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3954 symcode='[[ABDT]]'
3955 ;;
3956 sysv4)
3957 symcode='[[DFNSTU]]'
3958 ;;
3959 esac
3960
3961 # If we're using GNU nm, then use its standard symbol codes.
3962 case `$NM -V 2>&1` in
3963 *GNU* | *'with BFD'*)
3964 symcode='[[ABCDGIRSTW]]' ;;
3965 esac
3966
3967 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3968 # Gets list of data symbols to import.
3969 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3970 # Adjust the below global symbol transforms to fixup imported variables.
3971 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3972 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
3973 lt_c_name_lib_hook="\
3974 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
3975 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
3976 else
3977 # Disable hooks by default.
3978 lt_cv_sys_global_symbol_to_import=
3979 lt_cdecl_hook=
3980 lt_c_name_hook=
3981 lt_c_name_lib_hook=
3982 fi
3983
3984 # Transform an extracted symbol line into a proper C declaration.
3985 # Some systems (esp. on ia64) link data and code symbols differently,
3986 # so use this general approach.
3987 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
3988 $lt_cdecl_hook\
3989 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3990 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
3991
3992 # Transform an extracted symbol line into symbol name and symbol address
3993 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3994 $lt_c_name_hook\
3995 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
3996 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
3997
3998 # Transform an extracted symbol line into symbol name with lib prefix and
3999 # symbol address.
4000 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4001 $lt_c_name_lib_hook\
4002 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4003 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4004 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
4005
4006 # Handle CRLF in mingw tool chain
4007 opt_cr=
4008 case $build_os in
4009 mingw*)
4010 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4011 ;;
4012 esac
4013
4014 # Try without a prefix underscore, then with it.
4015 for ac_symprfx in "" "_"; do
4016
4017 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4018 symxfrm="\\1 $ac_symprfx\\2 \\2"
4019
4020 # Write the raw and C identifiers.
4021 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4022 # Fake it for dumpbin and say T for any non-static function,
4023 # D for any global variable and I for any imported variable.
4024 # Also find C++ and __fastcall symbols from MSVC++,
4025 # which start with @ or ?.
4026 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4027 " {last_section=section; section=\$ 3};"\
4028 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4029 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4030 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4031 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4032 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4033 " \$ 0!~/External *\|/{next};"\
4034 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4035 " {if(hide[section]) next};"\
4036 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4037 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4038 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4039 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4040 " ' prfx=^$ac_symprfx]"
4041 else
4042 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4043 fi
4044 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4045
4046 # Check to see that the pipe works correctly.
4047 pipe_works=no
4048
4049 rm -f conftest*
4050 cat > conftest.$ac_ext <<_LT_EOF
4051 #ifdef __cplusplus
4052 extern "C" {
4053 #endif
4054 char nm_test_var;
4055 void nm_test_func(void);
4056 void nm_test_func(void){}
4057 #ifdef __cplusplus
4058 }
4059 #endif
4060 int main(){nm_test_var='a';nm_test_func();return(0);}
4061 _LT_EOF
4062
4063 if AC_TRY_EVAL(ac_compile); then
4064 # Now try to grab the symbols.
4065 nlist=conftest.nm
4066 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4067 # Try sorting and uniquifying the output.
4068 if sort "$nlist" | uniq > "$nlist"T; then
4069 mv -f "$nlist"T "$nlist"
4070 else
4071 rm -f "$nlist"T
4072 fi
4073
4074 # Make sure that we snagged all the symbols we need.
4075 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4076 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4077 cat <<_LT_EOF > conftest.$ac_ext
4078 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4079 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4080 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4081 relocations are performed -- see ld's documentation on pseudo-relocs. */
4082 # define LT@&t@_DLSYM_CONST
4083 #elif defined __osf__
4084 /* This system does not cope well with relocations in const data. */
4085 # define LT@&t@_DLSYM_CONST
4086 #else
4087 # define LT@&t@_DLSYM_CONST const
4088 #endif
4089
4090 #ifdef __cplusplus
4091 extern "C" {
4092 #endif
4093
4094 _LT_EOF
4095 # Now generate the symbol file.
4096 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4097
4098 cat <<_LT_EOF >> conftest.$ac_ext
4099
4100 /* The mapping between symbol names and symbols. */
4101 LT@&t@_DLSYM_CONST struct {
4102 const char *name;
4103 void *address;
4104 }
4105 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4106 {
4107 { "@PROGRAM@", (void *) 0 },
4108 _LT_EOF
4109 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4110 cat <<\_LT_EOF >> conftest.$ac_ext
4111 {0, (void *) 0}
4112 };
4113
4114 /* This works around a problem in FreeBSD linker */
4115 #ifdef FREEBSD_WORKAROUND
4116 static const void *lt_preloaded_setup() {
4117 return lt__PROGRAM__LTX_preloaded_symbols;
4118 }
4119 #endif
4120
4121 #ifdef __cplusplus
4122 }
4123 #endif
4124 _LT_EOF
4125 # Now try linking the two files.
4126 mv conftest.$ac_objext conftstm.$ac_objext
4127 lt_globsym_save_LIBS=$LIBS
4128 lt_globsym_save_CFLAGS=$CFLAGS
4129 LIBS=conftstm.$ac_objext
4130 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4131 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4132 pipe_works=yes
4133 fi
4134 LIBS=$lt_globsym_save_LIBS
4135 CFLAGS=$lt_globsym_save_CFLAGS
4136 else
4137 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4138 fi
4139 else
4140 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4141 fi
4142 else
4143 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4144 fi
4145 else
4146 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4147 cat conftest.$ac_ext >&5
4148 fi
4149 rm -rf conftest* conftst*
4150
4151 # Do not use the global_symbol_pipe unless it works.
4152 if test yes = "$pipe_works"; then
4153 break
4154 else
4155 lt_cv_sys_global_symbol_pipe=
4156 fi
4157 done
4158 ])
4159 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4160 lt_cv_sys_global_symbol_to_cdecl=
4161 fi
4162 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4163 AC_MSG_RESULT(failed)
4164 else
4165 AC_MSG_RESULT(ok)
4166 fi
4167
4168 # Response file support.
4169 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4170 nm_file_list_spec='@'
4171 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4172 nm_file_list_spec='@'
4173 fi
4174
4175 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4176 [Take the output of nm and produce a listing of raw symbols and C names])
4177 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4178 [Transform the output of nm in a proper C declaration])
4179 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4180 [Transform the output of nm into a list of symbols to manually relocate])
4181 _LT_DECL([global_symbol_to_c_name_address],
4182 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4183 [Transform the output of nm in a C name address pair])
4184 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4185 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4186 [Transform the output of nm in a C name address pair when lib prefix is needed])
4187 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4188 [The name lister interface])
4189 _LT_DECL([], [nm_file_list_spec], [1],
4190 [Specify filename containing input files for $NM])
4191 ]) # _LT_CMD_GLOBAL_SYMBOLS
4192
4193
4194 # _LT_COMPILER_PIC([TAGNAME])
4195 # ---------------------------
4196 m4_defun([_LT_COMPILER_PIC],
4197 [m4_require([_LT_TAG_COMPILER])dnl
4198 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4199 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4200 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4201
4202 m4_if([$1], [CXX], [
4203 # C++ specific cases for pic, static, wl, etc.
4204 if test yes = "$GXX"; then
4205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4207
4208 case $host_os in
4209 aix*)
4210 # All AIX code is PIC.
4211 if test ia64 = "$host_cpu"; then
4212 # AIX 5 now supports IA64 processor
4213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4214 fi
4215 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4216 ;;
4217
4218 amigaos*)
4219 case $host_cpu in
4220 powerpc)
4221 # see comment about AmigaOS4 .so support
4222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4223 ;;
4224 m68k)
4225 # FIXME: we need at least 68020 code to build shared libraries, but
4226 # adding the '-m68020' flag to GCC prevents building anything better,
4227 # like '-m68040'.
4228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4229 ;;
4230 esac
4231 ;;
4232
4233 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4234 # PIC is the default for these OSes.
4235 ;;
4236 mingw* | cygwin* | os2* | pw32* | cegcc*)
4237 # This hack is so that the source file can tell whether it is being
4238 # built for inclusion in a dll (and should export symbols for example).
4239 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4240 # (--disable-auto-import) libraries
4241 m4_if([$1], [GCJ], [],
4242 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4243 case $host_os in
4244 os2*)
4245 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4246 ;;
4247 esac
4248 ;;
4249 darwin* | rhapsody*)
4250 # PIC is the default on this platform
4251 # Common symbols not allowed in MH_DYLIB files
4252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4253 ;;
4254 *djgpp*)
4255 # DJGPP does not support shared libraries at all
4256 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4257 ;;
4258 haiku*)
4259 # PIC is the default for Haiku.
4260 # The "-static" flag exists, but is broken.
4261 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4262 ;;
4263 interix[[3-9]]*)
4264 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4265 # Instead, we relocate shared libraries at runtime.
4266 ;;
4267 sysv4*MP*)
4268 if test -d /usr/nec; then
4269 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4270 fi
4271 ;;
4272 hpux*)
4273 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4274 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4275 # sets the default TLS model and affects inlining.
4276 case $host_cpu in
4277 hppa*64*)
4278 ;;
4279 *)
4280 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4281 ;;
4282 esac
4283 ;;
4284 *qnx* | *nto*)
4285 # QNX uses GNU C++, but need to define -shared option too, otherwise
4286 # it will coredump.
4287 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4288 ;;
4289 *)
4290 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4291 ;;
4292 esac
4293 else
4294 case $host_os in
4295 aix[[4-9]]*)
4296 # All AIX code is PIC.
4297 if test ia64 = "$host_cpu"; then
4298 # AIX 5 now supports IA64 processor
4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4300 else
4301 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4302 fi
4303 ;;
4304 chorus*)
4305 case $cc_basename in
4306 cxch68*)
4307 # Green Hills C++ Compiler
4308 # _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"
4309 ;;
4310 esac
4311 ;;
4312 mingw* | cygwin* | os2* | pw32* | cegcc*)
4313 # This hack is so that the source file can tell whether it is being
4314 # built for inclusion in a dll (and should export symbols for example).
4315 m4_if([$1], [GCJ], [],
4316 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4317 ;;
4318 dgux*)
4319 case $cc_basename in
4320 ec++*)
4321 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4322 ;;
4323 ghcx*)
4324 # Green Hills C++ Compiler
4325 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4326 ;;
4327 *)
4328 ;;
4329 esac
4330 ;;
4331 freebsd* | dragonfly*)
4332 # FreeBSD uses GNU C++
4333 ;;
4334 hpux9* | hpux10* | hpux11*)
4335 case $cc_basename in
4336 CC*)
4337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4338 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4339 if test ia64 != "$host_cpu"; then
4340 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4341 fi
4342 ;;
4343 aCC*)
4344 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4345 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4346 case $host_cpu in
4347 hppa*64*|ia64*)
4348 # +Z the default
4349 ;;
4350 *)
4351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4352 ;;
4353 esac
4354 ;;
4355 *)
4356 ;;
4357 esac
4358 ;;
4359 interix*)
4360 # This is c89, which is MS Visual C++ (no shared libs)
4361 # Anyone wants to do a port?
4362 ;;
4363 irix5* | irix6* | nonstopux*)
4364 case $cc_basename in
4365 CC*)
4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4367 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4368 # CC pic flag -KPIC is the default.
4369 ;;
4370 *)
4371 ;;
4372 esac
4373 ;;
4374 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4375 case $cc_basename in
4376 KCC*)
4377 # KAI C++ Compiler
4378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4380 ;;
4381 ecpc* )
4382 # old Intel C++ for x86_64, which still supported -KPIC.
4383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4386 ;;
4387 icpc* )
4388 # Intel C++, used to be incompatible with GCC.
4389 # ICC 10 doesn't accept -KPIC any more.
4390 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4391 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4392 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4393 ;;
4394 pgCC* | pgcpp*)
4395 # Portland Group C++ compiler
4396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4399 ;;
4400 cxx*)
4401 # Compaq C++
4402 # Make sure the PIC flag is empty. It appears that all Alpha
4403 # Linux and Compaq Tru64 Unix objects are PIC.
4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4406 ;;
4407 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4408 # IBM XL 8.0, 9.0 on PPC and BlueGene
4409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4412 ;;
4413 *)
4414 case `$CC -V 2>&1 | sed 5q` in
4415 *Sun\ C*)
4416 # Sun C++ 5.9
4417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4420 ;;
4421 esac
4422 ;;
4423 esac
4424 ;;
4425 lynxos*)
4426 ;;
4427 m88k*)
4428 ;;
4429 mvs*)
4430 case $cc_basename in
4431 cxx*)
4432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4433 ;;
4434 *)
4435 ;;
4436 esac
4437 ;;
4438 netbsd* | netbsdelf*-gnu)
4439 ;;
4440 *qnx* | *nto*)
4441 # QNX uses GNU C++, but need to define -shared option too, otherwise
4442 # it will coredump.
4443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4444 ;;
4445 osf3* | osf4* | osf5*)
4446 case $cc_basename in
4447 KCC*)
4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4449 ;;
4450 RCC*)
4451 # Rational C++ 2.4.1
4452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4453 ;;
4454 cxx*)
4455 # Digital/Compaq C++
4456 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4457 # Make sure the PIC flag is empty. It appears that all Alpha
4458 # Linux and Compaq Tru64 Unix objects are PIC.
4459 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4461 ;;
4462 *)
4463 ;;
4464 esac
4465 ;;
4466 psos*)
4467 ;;
4468 solaris*)
4469 case $cc_basename in
4470 CC* | sunCC*)
4471 # Sun C++ 4.2, 5.x and Centerline C++
4472 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4473 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4475 ;;
4476 gcx*)
4477 # Green Hills C++ Compiler
4478 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4479 ;;
4480 *)
4481 ;;
4482 esac
4483 ;;
4484 sunos4*)
4485 case $cc_basename in
4486 CC*)
4487 # Sun C++ 4.x
4488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4490 ;;
4491 lcc*)
4492 # Lucid
4493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4494 ;;
4495 *)
4496 ;;
4497 esac
4498 ;;
4499 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4500 case $cc_basename in
4501 CC*)
4502 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4503 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4504 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4505 ;;
4506 esac
4507 ;;
4508 tandem*)
4509 case $cc_basename in
4510 NCC*)
4511 # NonStop-UX NCC 3.20
4512 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4513 ;;
4514 *)
4515 ;;
4516 esac
4517 ;;
4518 vxworks*)
4519 ;;
4520 *)
4521 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4522 ;;
4523 esac
4524 fi
4525 ],
4526 [
4527 if test yes = "$GCC"; then
4528 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4530
4531 case $host_os in
4532 aix*)
4533 # All AIX code is PIC.
4534 if test ia64 = "$host_cpu"; then
4535 # AIX 5 now supports IA64 processor
4536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4537 fi
4538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4539 ;;
4540
4541 amigaos*)
4542 case $host_cpu in
4543 powerpc)
4544 # see comment about AmigaOS4 .so support
4545 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4546 ;;
4547 m68k)
4548 # FIXME: we need at least 68020 code to build shared libraries, but
4549 # adding the '-m68020' flag to GCC prevents building anything better,
4550 # like '-m68040'.
4551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4552 ;;
4553 esac
4554 ;;
4555
4556 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4557 # PIC is the default for these OSes.
4558 ;;
4559
4560 mingw* | cygwin* | pw32* | os2* | cegcc*)
4561 # This hack is so that the source file can tell whether it is being
4562 # built for inclusion in a dll (and should export symbols for example).
4563 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4564 # (--disable-auto-import) libraries
4565 m4_if([$1], [GCJ], [],
4566 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4567 case $host_os in
4568 os2*)
4569 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4570 ;;
4571 esac
4572 ;;
4573
4574 darwin* | rhapsody*)
4575 # PIC is the default on this platform
4576 # Common symbols not allowed in MH_DYLIB files
4577 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4578 ;;
4579
4580 haiku*)
4581 # PIC is the default for Haiku.
4582 # The "-static" flag exists, but is broken.
4583 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4584 ;;
4585
4586 hpux*)
4587 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4588 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4589 # sets the default TLS model and affects inlining.
4590 case $host_cpu in
4591 hppa*64*)
4592 # +Z the default
4593 ;;
4594 *)
4595 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4596 ;;
4597 esac
4598 ;;
4599
4600 interix[[3-9]]*)
4601 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4602 # Instead, we relocate shared libraries at runtime.
4603 ;;
4604
4605 msdosdjgpp*)
4606 # Just because we use GCC doesn't mean we suddenly get shared libraries
4607 # on systems that don't support them.
4608 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4609 enable_shared=no
4610 ;;
4611
4612 *nto* | *qnx*)
4613 # QNX uses GNU C++, but need to define -shared option too, otherwise
4614 # it will coredump.
4615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4616 ;;
4617
4618 sysv4*MP*)
4619 if test -d /usr/nec; then
4620 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4621 fi
4622 ;;
4623
4624 *)
4625 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4626 ;;
4627 esac
4628
4629 case $cc_basename in
4630 nvcc*) # Cuda Compiler Driver 2.2
4631 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4632 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4633 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4634 fi
4635 ;;
4636 esac
4637 else
4638 # PORTME Check for flag to pass linker flags through the system compiler.
4639 case $host_os in
4640 aix*)
4641 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4642 if test ia64 = "$host_cpu"; then
4643 # AIX 5 now supports IA64 processor
4644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4645 else
4646 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4647 fi
4648 ;;
4649
4650 darwin* | rhapsody*)
4651 # PIC is the default on this platform
4652 # Common symbols not allowed in MH_DYLIB files
4653 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4654 case $cc_basename in
4655 nagfor*)
4656 # NAG Fortran compiler
4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4659 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4660 ;;
4661 esac
4662 ;;
4663
4664 mingw* | cygwin* | pw32* | os2* | cegcc*)
4665 # This hack is so that the source file can tell whether it is being
4666 # built for inclusion in a dll (and should export symbols for example).
4667 m4_if([$1], [GCJ], [],
4668 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4669 case $host_os in
4670 os2*)
4671 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4672 ;;
4673 esac
4674 ;;
4675
4676 hpux9* | hpux10* | hpux11*)
4677 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4678 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4679 # not for PA HP-UX.
4680 case $host_cpu in
4681 hppa*64*|ia64*)
4682 # +Z the default
4683 ;;
4684 *)
4685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4686 ;;
4687 esac
4688 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4689 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4690 ;;
4691
4692 irix5* | irix6* | nonstopux*)
4693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4694 # PIC (with -KPIC) is the default.
4695 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4696 ;;
4697
4698 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4699 case $cc_basename in
4700 # old Intel for x86_64, which still supported -KPIC.
4701 ecc*)
4702 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4704 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4705 ;;
4706 # icc used to be incompatible with GCC.
4707 # ICC 10 doesn't accept -KPIC any more.
4708 icc* | ifort*)
4709 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4710 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4711 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4712 ;;
4713 # Lahey Fortran 8.1.
4714 lf95*)
4715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4716 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4717 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4718 ;;
4719 nagfor*)
4720 # NAG Fortran compiler
4721 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4723 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4724 ;;
4725 tcc*)
4726 # Fabrice Bellard et al's Tiny C Compiler
4727 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4730 ;;
4731 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4732 # Portland Group compilers (*not* the Pentium gcc compiler,
4733 # which looks to be a dead project)
4734 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4735 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4736 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4737 ;;
4738 ccc*)
4739 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4740 # All Alpha code is PIC.
4741 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4742 ;;
4743 xl* | bgxl* | bgf* | mpixl*)
4744 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4746 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4747 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4748 ;;
4749 *)
4750 case `$CC -V 2>&1 | sed 5q` in
4751 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4752 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4753 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4754 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4755 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4756 ;;
4757 *Sun\ F* | *Sun*Fortran*)
4758 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4759 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4761 ;;
4762 *Sun\ C*)
4763 # Sun C 5.9
4764 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4765 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4767 ;;
4768 *Intel*\ [[CF]]*Compiler*)
4769 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4770 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4771 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4772 ;;
4773 *Portland\ Group*)
4774 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4775 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4776 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4777 ;;
4778 esac
4779 ;;
4780 esac
4781 ;;
4782
4783 newsos6)
4784 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4785 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4786 ;;
4787
4788 *nto* | *qnx*)
4789 # QNX uses GNU C++, but need to define -shared option too, otherwise
4790 # it will coredump.
4791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4792 ;;
4793
4794 osf3* | osf4* | osf5*)
4795 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4796 # All OSF/1 code is PIC.
4797 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4798 ;;
4799
4800 rdos*)
4801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4802 ;;
4803
4804 solaris*)
4805 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4806 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4807 case $cc_basename in
4808 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4809 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4810 *)
4811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4812 esac
4813 ;;
4814
4815 sunos4*)
4816 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4817 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4818 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4819 ;;
4820
4821 sysv4 | sysv4.2uw2* | sysv4.3*)
4822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4823 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4825 ;;
4826
4827 sysv4*MP*)
4828 if test -d /usr/nec; then
4829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4831 fi
4832 ;;
4833
4834 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4838 ;;
4839
4840 unicos*)
4841 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4842 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4843 ;;
4844
4845 uts4*)
4846 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4847 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4848 ;;
4849
4850 *)
4851 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4852 ;;
4853 esac
4854 fi
4855 ])
4856 case $host_os in
4857 # For platforms that do not support PIC, -DPIC is meaningless:
4858 *djgpp*)
4859 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4860 ;;
4861 *)
4862 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4863 ;;
4864 esac
4865
4866 AC_CACHE_CHECK([for $compiler option to produce PIC],
4867 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4868 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4869 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4870
4871 #
4872 # Check to make sure the PIC flag actually works.
4873 #
4874 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4875 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4876 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4877 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4878 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4879 "" | " "*) ;;
4880 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4881 esac],
4882 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4883 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4884 fi
4885 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4886 [Additional compiler flags for building library objects])
4887
4888 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4889 [How to pass a linker flag through the compiler])
4890 #
4891 # Check to make sure the static flag actually works.
4892 #
4893 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4894 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4895 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4896 $lt_tmp_static_flag,
4897 [],
4898 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4899 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4900 [Compiler flag to prevent dynamic linking])
4901 ])# _LT_COMPILER_PIC
4902
4903
4904 # _LT_LINKER_SHLIBS([TAGNAME])
4905 # ----------------------------
4906 # See if the linker supports building shared libraries.
4907 m4_defun([_LT_LINKER_SHLIBS],
4908 [AC_REQUIRE([LT_PATH_LD])dnl
4909 AC_REQUIRE([LT_PATH_NM])dnl
4910 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4911 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4912 m4_require([_LT_DECL_EGREP])dnl
4913 m4_require([_LT_DECL_SED])dnl
4914 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4915 m4_require([_LT_TAG_COMPILER])dnl
4916 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4917 m4_if([$1], [CXX], [
4918 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4919 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4920 case $host_os in
4921 aix[[4-9]]*)
4922 # If we're using GNU nm, then we don't want the "-C" option.
4923 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4924 # Without the "-l" option, or with the "-B" option, AIX nm treats
4925 # weak defined symbols like other global defined symbols, whereas
4926 # GNU nm marks them as "W".
4927 # While the 'weak' keyword is ignored in the Export File, we need
4928 # it in the Import File for the 'aix-soname' feature, so we have
4929 # to replace the "-B" option with "-P" for AIX nm.
4930 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4931 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
4932 else
4933 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4934 fi
4935 ;;
4936 pw32*)
4937 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4938 ;;
4939 cygwin* | mingw* | cegcc*)
4940 case $cc_basename in
4941 cl*)
4942 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4943 ;;
4944 *)
4945 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4946 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4947 ;;
4948 esac
4949 ;;
4950 linux* | k*bsd*-gnu | gnu*)
4951 _LT_TAGVAR(link_all_deplibs, $1)=no
4952 ;;
4953 *)
4954 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4955 ;;
4956 esac
4957 ], [
4958 runpath_var=
4959 _LT_TAGVAR(allow_undefined_flag, $1)=
4960 _LT_TAGVAR(always_export_symbols, $1)=no
4961 _LT_TAGVAR(archive_cmds, $1)=
4962 _LT_TAGVAR(archive_expsym_cmds, $1)=
4963 _LT_TAGVAR(compiler_needs_object, $1)=no
4964 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4965 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4966 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4967 _LT_TAGVAR(hardcode_automatic, $1)=no
4968 _LT_TAGVAR(hardcode_direct, $1)=no
4969 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4970 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4971 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4972 _LT_TAGVAR(hardcode_minus_L, $1)=no
4973 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4974 _LT_TAGVAR(inherit_rpath, $1)=no
4975 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4976 _LT_TAGVAR(module_cmds, $1)=
4977 _LT_TAGVAR(module_expsym_cmds, $1)=
4978 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4979 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4980 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4981 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4982 # include_expsyms should be a list of space-separated symbols to be *always*
4983 # included in the symbol list
4984 _LT_TAGVAR(include_expsyms, $1)=
4985 # exclude_expsyms can be an extended regexp of symbols to exclude
4986 # it will be wrapped by ' (' and ')$', so one must not match beginning or
4987 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4988 # as well as any symbol that contains 'd'.
4989 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4990 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4991 # platforms (ab)use it in PIC code, but their linkers get confused if
4992 # the symbol is explicitly referenced. Since portable code cannot
4993 # rely on this symbol name, it's probably fine to never include it in
4994 # preloaded symbol tables.
4995 # Exclude shared library initialization/finalization symbols.
4996 dnl Note also adjust exclude_expsyms for C++ above.
4997 extract_expsyms_cmds=
4998
4999 case $host_os in
5000 cygwin* | mingw* | pw32* | cegcc*)
5001 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5002 # When not using gcc, we currently assume that we are using
5003 # Microsoft Visual C++.
5004 if test yes != "$GCC"; then
5005 with_gnu_ld=no
5006 fi
5007 ;;
5008 interix*)
5009 # we just hope/assume this is gcc and not c89 (= MSVC++)
5010 with_gnu_ld=yes
5011 ;;
5012 openbsd* | bitrig*)
5013 with_gnu_ld=no
5014 ;;
5015 linux* | k*bsd*-gnu | gnu*)
5016 _LT_TAGVAR(link_all_deplibs, $1)=no
5017 ;;
5018 esac
5019
5020 _LT_TAGVAR(ld_shlibs, $1)=yes
5021
5022 # On some targets, GNU ld is compatible enough with the native linker
5023 # that we're better off using the native interface for both.
5024 lt_use_gnu_ld_interface=no
5025 if test yes = "$with_gnu_ld"; then
5026 case $host_os in
5027 aix*)
5028 # The AIX port of GNU ld has always aspired to compatibility
5029 # with the native linker. However, as the warning in the GNU ld
5030 # block says, versions before 2.19.5* couldn't really create working
5031 # shared libraries, regardless of the interface used.
5032 case `$LD -v 2>&1` in
5033 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5034 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5035 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5036 *)
5037 lt_use_gnu_ld_interface=yes
5038 ;;
5039 esac
5040 ;;
5041 *)
5042 lt_use_gnu_ld_interface=yes
5043 ;;
5044 esac
5045 fi
5046
5047 if test yes = "$lt_use_gnu_ld_interface"; then
5048 # If archive_cmds runs LD, not CC, wlarc should be empty
5049 wlarc='$wl'
5050
5051 # Set some defaults for GNU ld with shared library support. These
5052 # are reset later if shared libraries are not supported. Putting them
5053 # here allows them to be overridden if necessary.
5054 runpath_var=LD_RUN_PATH
5055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5056 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5057 # ancient GNU ld didn't support --whole-archive et. al.
5058 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5059 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5060 else
5061 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5062 fi
5063 supports_anon_versioning=no
5064 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5065 *GNU\ gold*) supports_anon_versioning=yes ;;
5066 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5067 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5068 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5069 *\ 2.11.*) ;; # other 2.11 versions
5070 *) supports_anon_versioning=yes ;;
5071 esac
5072
5073 # See if GNU ld supports shared libraries.
5074 case $host_os in
5075 aix[[3-9]]*)
5076 # On AIX/PPC, the GNU linker is very broken
5077 if test ia64 != "$host_cpu"; then
5078 _LT_TAGVAR(ld_shlibs, $1)=no
5079 cat <<_LT_EOF 1>&2
5080
5081 *** Warning: the GNU linker, at least up to release 2.19, is reported
5082 *** to be unable to reliably create shared libraries on AIX.
5083 *** Therefore, libtool is disabling shared libraries support. If you
5084 *** really care for shared libraries, you may want to install binutils
5085 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5086 *** You will then need to restart the configuration process.
5087
5088 _LT_EOF
5089 fi
5090 ;;
5091
5092 amigaos*)
5093 case $host_cpu in
5094 powerpc)
5095 # see comment about AmigaOS4 .so support
5096 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5097 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5098 ;;
5099 m68k)
5100 _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)'
5101 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5102 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5103 ;;
5104 esac
5105 ;;
5106
5107 beos*)
5108 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5109 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5110 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5111 # support --undefined. This deserves some investigation. FIXME
5112 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5113 else
5114 _LT_TAGVAR(ld_shlibs, $1)=no
5115 fi
5116 ;;
5117
5118 cygwin* | mingw* | pw32* | cegcc*)
5119 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5120 # as there is no search path for DLLs.
5121 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5122 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5123 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5124 _LT_TAGVAR(always_export_symbols, $1)=no
5125 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5126 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5127 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5128
5129 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5130 _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'
5131 # If the export-symbols file already is a .def file, use it as
5132 # is; otherwise, prepend EXPORTS...
5133 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5134 cp $export_symbols $output_objdir/$soname.def;
5135 else
5136 echo EXPORTS > $output_objdir/$soname.def;
5137 cat $export_symbols >> $output_objdir/$soname.def;
5138 fi~
5139 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5140 else
5141 _LT_TAGVAR(ld_shlibs, $1)=no
5142 fi
5143 ;;
5144
5145 haiku*)
5146 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5147 _LT_TAGVAR(link_all_deplibs, $1)=yes
5148 ;;
5149
5150 os2*)
5151 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5152 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5153 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5154 shrext_cmds=.dll
5155 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5156 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5157 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5158 $ECHO EXPORTS >> $output_objdir/$libname.def~
5159 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5160 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5161 emximp -o $lib $output_objdir/$libname.def'
5162 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5163 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5164 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5165 $ECHO EXPORTS >> $output_objdir/$libname.def~
5166 prefix_cmds="$SED"~
5167 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5168 prefix_cmds="$prefix_cmds -e 1d";
5169 fi~
5170 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5171 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5172 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5173 emximp -o $lib $output_objdir/$libname.def'
5174 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5175 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5176 ;;
5177
5178 interix[[3-9]]*)
5179 _LT_TAGVAR(hardcode_direct, $1)=no
5180 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5182 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5183 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5184 # Instead, shared libraries are loaded at an image base (0x10000000 by
5185 # default) and relocated if they conflict, which is a slow very memory
5186 # consuming and fragmenting process. To avoid this, we pick a random,
5187 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5188 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5189 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5190 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5191 ;;
5192
5193 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5194 tmp_diet=no
5195 if test linux-dietlibc = "$host_os"; then
5196 case $cc_basename in
5197 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5198 esac
5199 fi
5200 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5201 && test no = "$tmp_diet"
5202 then
5203 tmp_addflag=' $pic_flag'
5204 tmp_sharedflag='-shared'
5205 case $cc_basename,$host_cpu in
5206 pgcc*) # Portland Group C compiler
5207 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5208 tmp_addflag=' $pic_flag'
5209 ;;
5210 pgf77* | pgf90* | pgf95* | pgfortran*)
5211 # Portland Group f77 and f90 compilers
5212 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5213 tmp_addflag=' $pic_flag -Mnomain' ;;
5214 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5215 tmp_addflag=' -i_dynamic' ;;
5216 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5217 tmp_addflag=' -i_dynamic -nofor_main' ;;
5218 ifc* | ifort*) # Intel Fortran compiler
5219 tmp_addflag=' -nofor_main' ;;
5220 lf95*) # Lahey Fortran 8.1
5221 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5222 tmp_sharedflag='--shared' ;;
5223 nagfor*) # NAGFOR 5.3
5224 tmp_sharedflag='-Wl,-shared' ;;
5225 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5226 tmp_sharedflag='-qmkshrobj'
5227 tmp_addflag= ;;
5228 nvcc*) # Cuda Compiler Driver 2.2
5229 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5230 _LT_TAGVAR(compiler_needs_object, $1)=yes
5231 ;;
5232 esac
5233 case `$CC -V 2>&1 | sed 5q` in
5234 *Sun\ C*) # Sun C 5.9
5235 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5236 _LT_TAGVAR(compiler_needs_object, $1)=yes
5237 tmp_sharedflag='-G' ;;
5238 *Sun\ F*) # Sun Fortran 8.3
5239 tmp_sharedflag='-G' ;;
5240 esac
5241 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5242
5243 if test yes = "$supports_anon_versioning"; then
5244 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5245 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5246 echo "local: *; };" >> $output_objdir/$libname.ver~
5247 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5248 fi
5249
5250 case $cc_basename in
5251 tcc*)
5252 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5253 ;;
5254 xlf* | bgf* | bgxlf* | mpixlf*)
5255 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5256 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5257 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5258 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5259 if test yes = "$supports_anon_versioning"; then
5260 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5261 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5262 echo "local: *; };" >> $output_objdir/$libname.ver~
5263 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5264 fi
5265 ;;
5266 esac
5267 else
5268 _LT_TAGVAR(ld_shlibs, $1)=no
5269 fi
5270 ;;
5271
5272 netbsd* | netbsdelf*-gnu)
5273 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5274 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5275 wlarc=
5276 else
5277 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5278 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5279 fi
5280 ;;
5281
5282 solaris*)
5283 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5284 _LT_TAGVAR(ld_shlibs, $1)=no
5285 cat <<_LT_EOF 1>&2
5286
5287 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5288 *** create shared libraries on Solaris systems. Therefore, libtool
5289 *** is disabling shared libraries support. We urge you to upgrade GNU
5290 *** binutils to release 2.9.1 or newer. Another option is to modify
5291 *** your PATH or compiler configuration so that the native linker is
5292 *** used, and then restart.
5293
5294 _LT_EOF
5295 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5296 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5297 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5298 else
5299 _LT_TAGVAR(ld_shlibs, $1)=no
5300 fi
5301 ;;
5302
5303 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5304 case `$LD -v 2>&1` in
5305 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5306 _LT_TAGVAR(ld_shlibs, $1)=no
5307 cat <<_LT_EOF 1>&2
5308
5309 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5310 *** reliably create shared libraries on SCO systems. Therefore, libtool
5311 *** is disabling shared libraries support. We urge you to upgrade GNU
5312 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5313 *** your PATH or compiler configuration so that the native linker is
5314 *** used, and then restart.
5315
5316 _LT_EOF
5317 ;;
5318 *)
5319 # For security reasons, it is highly recommended that you always
5320 # use absolute paths for naming shared libraries, and exclude the
5321 # DT_RUNPATH tag from executables and libraries. But doing so
5322 # requires that you compile everything twice, which is a pain.
5323 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5325 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5326 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5327 else
5328 _LT_TAGVAR(ld_shlibs, $1)=no
5329 fi
5330 ;;
5331 esac
5332 ;;
5333
5334 sunos4*)
5335 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5336 wlarc=
5337 _LT_TAGVAR(hardcode_direct, $1)=yes
5338 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5339 ;;
5340
5341 *)
5342 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5344 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5345 else
5346 _LT_TAGVAR(ld_shlibs, $1)=no
5347 fi
5348 ;;
5349 esac
5350
5351 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5352 runpath_var=
5353 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5354 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5355 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5356 fi
5357 else
5358 # PORTME fill in a description of your system's linker (not GNU ld)
5359 case $host_os in
5360 aix3*)
5361 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5362 _LT_TAGVAR(always_export_symbols, $1)=yes
5363 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5364 # Note: this linker hardcodes the directories in LIBPATH if there
5365 # are no directories specified by -L.
5366 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5367 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5368 # Neither direct hardcoding nor static linking is supported with a
5369 # broken collect2.
5370 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5371 fi
5372 ;;
5373
5374 aix[[4-9]]*)
5375 if test ia64 = "$host_cpu"; then
5376 # On IA64, the linker does run time linking by default, so we don't
5377 # have to do anything special.
5378 aix_use_runtimelinking=no
5379 exp_sym_flag='-Bexport'
5380 no_entry_flag=
5381 else
5382 # If we're using GNU nm, then we don't want the "-C" option.
5383 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5384 # Without the "-l" option, or with the "-B" option, AIX nm treats
5385 # weak defined symbols like other global defined symbols, whereas
5386 # GNU nm marks them as "W".
5387 # While the 'weak' keyword is ignored in the Export File, we need
5388 # it in the Import File for the 'aix-soname' feature, so we have
5389 # to replace the "-B" option with "-P" for AIX nm.
5390 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5391 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5392 else
5393 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5394 fi
5395 aix_use_runtimelinking=no
5396
5397 # Test if we are trying to use run time linking or normal
5398 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5399 # have runtime linking enabled, and use it for executables.
5400 # For shared libraries, we enable/disable runtime linking
5401 # depending on the kind of the shared library created -
5402 # when "with_aix_soname,aix_use_runtimelinking" is:
5403 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5404 # "aix,yes" lib.so shared, rtl:yes, for executables
5405 # lib.a static archive
5406 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5407 # lib.a(lib.so.V) shared, rtl:no, for executables
5408 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5409 # lib.a(lib.so.V) shared, rtl:no
5410 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5411 # lib.a static archive
5412 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5413 for ld_flag in $LDFLAGS; do
5414 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5415 aix_use_runtimelinking=yes
5416 break
5417 fi
5418 done
5419 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5420 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5421 # so we don't have lib.a shared libs to link our executables.
5422 # We have to force runtime linking in this case.
5423 aix_use_runtimelinking=yes
5424 LDFLAGS="$LDFLAGS -Wl,-brtl"
5425 fi
5426 ;;
5427 esac
5428
5429 exp_sym_flag='-bexport'
5430 no_entry_flag='-bnoentry'
5431 fi
5432
5433 # When large executables or shared objects are built, AIX ld can
5434 # have problems creating the table of contents. If linking a library
5435 # or program results in "error TOC overflow" add -mminimal-toc to
5436 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5437 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5438
5439 _LT_TAGVAR(archive_cmds, $1)=''
5440 _LT_TAGVAR(hardcode_direct, $1)=yes
5441 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5442 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5443 _LT_TAGVAR(link_all_deplibs, $1)=yes
5444 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5445 case $with_aix_soname,$aix_use_runtimelinking in
5446 aix,*) ;; # traditional, no import file
5447 svr4,* | *,yes) # use import file
5448 # The Import File defines what to hardcode.
5449 _LT_TAGVAR(hardcode_direct, $1)=no
5450 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5451 ;;
5452 esac
5453
5454 if test yes = "$GCC"; then
5455 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5456 # We only want to do this on AIX 4.2 and lower, the check
5457 # below for broken collect2 doesn't work under 4.3+
5458 collect2name=`$CC -print-prog-name=collect2`
5459 if test -f "$collect2name" &&
5460 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5461 then
5462 # We have reworked collect2
5463 :
5464 else
5465 # We have old collect2
5466 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5467 # It fails to find uninstalled libraries when the uninstalled
5468 # path is not listed in the libpath. Setting hardcode_minus_L
5469 # to unsupported forces relinking
5470 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5471 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5472 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5473 fi
5474 ;;
5475 esac
5476 shared_flag='-shared'
5477 if test yes = "$aix_use_runtimelinking"; then
5478 shared_flag="$shared_flag "'$wl-G'
5479 fi
5480 # Need to ensure runtime linking is disabled for the traditional
5481 # shared library, or the linker may eventually find shared libraries
5482 # /with/ Import File - we do not want to mix them.
5483 shared_flag_aix='-shared'
5484 shared_flag_svr4='-shared $wl-G'
5485 else
5486 # not using gcc
5487 if test ia64 = "$host_cpu"; then
5488 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5489 # chokes on -Wl,-G. The following line is correct:
5490 shared_flag='-G'
5491 else
5492 if test yes = "$aix_use_runtimelinking"; then
5493 shared_flag='$wl-G'
5494 else
5495 shared_flag='$wl-bM:SRE'
5496 fi
5497 shared_flag_aix='$wl-bM:SRE'
5498 shared_flag_svr4='$wl-G'
5499 fi
5500 fi
5501
5502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5503 # It seems that -bexpall does not export symbols beginning with
5504 # underscore (_), so it is better to generate a list of symbols to export.
5505 _LT_TAGVAR(always_export_symbols, $1)=yes
5506 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5507 # Warning - without using the other runtime loading flags (-brtl),
5508 # -berok will link without error, but may produce a broken library.
5509 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5510 # Determine the default libpath from the value encoded in an
5511 # empty executable.
5512 _LT_SYS_MODULE_PATH_AIX([$1])
5513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5514 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
5515 else
5516 if test ia64 = "$host_cpu"; then
5517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5518 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5519 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
5520 else
5521 # Determine the default libpath from the value encoded in an
5522 # empty executable.
5523 _LT_SYS_MODULE_PATH_AIX([$1])
5524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5525 # Warning - without using the other run time loading flags,
5526 # -berok will link without error, but may produce a broken library.
5527 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5528 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5529 if test yes = "$with_gnu_ld"; then
5530 # We only use this code for GNU lds that support --whole-archive.
5531 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5532 else
5533 # Exported symbols can be pulled into shared objects from archives
5534 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5535 fi
5536 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5537 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5538 # -brtl affects multiple linker settings, -berok does not and is overridden later
5539 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5540 if test svr4 != "$with_aix_soname"; then
5541 # This is similar to how AIX traditionally builds its shared libraries.
5542 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5543 fi
5544 if test aix != "$with_aix_soname"; then
5545 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5546 else
5547 # used by -dlpreopen to get the symbols
5548 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5549 fi
5550 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5551 fi
5552 fi
5553 ;;
5554
5555 amigaos*)
5556 case $host_cpu in
5557 powerpc)
5558 # see comment about AmigaOS4 .so support
5559 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5560 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5561 ;;
5562 m68k)
5563 _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)'
5564 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5565 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5566 ;;
5567 esac
5568 ;;
5569
5570 bsdi[[45]]*)
5571 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5572 ;;
5573
5574 cygwin* | mingw* | pw32* | cegcc*)
5575 # When not using gcc, we currently assume that we are using
5576 # Microsoft Visual C++.
5577 # hardcode_libdir_flag_spec is actually meaningless, as there is
5578 # no search path for DLLs.
5579 case $cc_basename in
5580 cl*)
5581 # Native MSVC
5582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5583 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5584 _LT_TAGVAR(always_export_symbols, $1)=yes
5585 _LT_TAGVAR(file_list_spec, $1)='@'
5586 # Tell ltmain to make .lib files, not .a files.
5587 libext=lib
5588 # Tell ltmain to make .dll files, not .so files.
5589 shrext_cmds=.dll
5590 # FIXME: Setting linknames here is a bad hack.
5591 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5592 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5593 cp "$export_symbols" "$output_objdir/$soname.def";
5594 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5595 else
5596 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5597 fi~
5598 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5599 linknames='
5600 # The linker will not automatically build a static lib if we build a DLL.
5601 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5602 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5603 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5604 _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'
5605 # Don't use ranlib
5606 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5607 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5608 lt_tool_outputfile="@TOOL_OUTPUT@"~
5609 case $lt_outputfile in
5610 *.exe|*.EXE) ;;
5611 *)
5612 lt_outputfile=$lt_outputfile.exe
5613 lt_tool_outputfile=$lt_tool_outputfile.exe
5614 ;;
5615 esac~
5616 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5617 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5618 $RM "$lt_outputfile.manifest";
5619 fi'
5620 ;;
5621 *)
5622 # Assume MSVC wrapper
5623 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5624 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5625 # Tell ltmain to make .lib files, not .a files.
5626 libext=lib
5627 # Tell ltmain to make .dll files, not .so files.
5628 shrext_cmds=.dll
5629 # FIXME: Setting linknames here is a bad hack.
5630 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5631 # The linker will automatically build a .lib file if we build a DLL.
5632 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5633 # FIXME: Should let the user specify the lib program.
5634 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5635 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5636 ;;
5637 esac
5638 ;;
5639
5640 darwin* | rhapsody*)
5641 _LT_DARWIN_LINKER_FEATURES($1)
5642 ;;
5643
5644 dgux*)
5645 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5646 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5647 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5648 ;;
5649
5650 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5651 # support. Future versions do this automatically, but an explicit c++rt0.o
5652 # does not break anything, and helps significantly (at the cost of a little
5653 # extra space).
5654 freebsd2.2*)
5655 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5657 _LT_TAGVAR(hardcode_direct, $1)=yes
5658 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5659 ;;
5660
5661 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5662 freebsd2.*)
5663 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5664 _LT_TAGVAR(hardcode_direct, $1)=yes
5665 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5666 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5667 ;;
5668
5669 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5670 freebsd* | dragonfly*)
5671 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5672 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5673 _LT_TAGVAR(hardcode_direct, $1)=yes
5674 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5675 ;;
5676
5677 hpux9*)
5678 if test yes = "$GCC"; then
5679 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5680 else
5681 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5682 fi
5683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5684 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5685 _LT_TAGVAR(hardcode_direct, $1)=yes
5686
5687 # hardcode_minus_L: Not really in the search PATH,
5688 # but as the default location of the library.
5689 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5691 ;;
5692
5693 hpux10*)
5694 if test yes,no = "$GCC,$with_gnu_ld"; then
5695 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5696 else
5697 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5698 fi
5699 if test no = "$with_gnu_ld"; then
5700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5701 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5702 _LT_TAGVAR(hardcode_direct, $1)=yes
5703 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5705 # hardcode_minus_L: Not really in the search PATH,
5706 # but as the default location of the library.
5707 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5708 fi
5709 ;;
5710
5711 hpux11*)
5712 if test yes,no = "$GCC,$with_gnu_ld"; then
5713 case $host_cpu in
5714 hppa*64*)
5715 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5716 ;;
5717 ia64*)
5718 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5719 ;;
5720 *)
5721 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5722 ;;
5723 esac
5724 else
5725 case $host_cpu in
5726 hppa*64*)
5727 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5728 ;;
5729 ia64*)
5730 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5731 ;;
5732 *)
5733 m4_if($1, [], [
5734 # Older versions of the 11.00 compiler do not understand -b yet
5735 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5736 _LT_LINKER_OPTION([if $CC understands -b],
5737 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5738 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5739 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5740 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5741 ;;
5742 esac
5743 fi
5744 if test no = "$with_gnu_ld"; then
5745 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5746 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5747
5748 case $host_cpu in
5749 hppa*64*|ia64*)
5750 _LT_TAGVAR(hardcode_direct, $1)=no
5751 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5752 ;;
5753 *)
5754 _LT_TAGVAR(hardcode_direct, $1)=yes
5755 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5756 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5757
5758 # hardcode_minus_L: Not really in the search PATH,
5759 # but as the default location of the library.
5760 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5761 ;;
5762 esac
5763 fi
5764 ;;
5765
5766 irix5* | irix6* | nonstopux*)
5767 if test yes = "$GCC"; then
5768 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5769 # Try to use the -exported_symbol ld option, if it does not
5770 # work, assume that -exports_file does not work either and
5771 # implicitly export all symbols.
5772 # This should be the same for all languages, so no per-tag cache variable.
5773 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5774 [lt_cv_irix_exported_symbol],
5775 [save_LDFLAGS=$LDFLAGS
5776 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5777 AC_LINK_IFELSE(
5778 [AC_LANG_SOURCE(
5779 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5780 [C++], [[int foo (void) { return 0; }]],
5781 [Fortran 77], [[
5782 subroutine foo
5783 end]],
5784 [Fortran], [[
5785 subroutine foo
5786 end]])])],
5787 [lt_cv_irix_exported_symbol=yes],
5788 [lt_cv_irix_exported_symbol=no])
5789 LDFLAGS=$save_LDFLAGS])
5790 if test yes = "$lt_cv_irix_exported_symbol"; then
5791 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
5792 fi
5793 _LT_TAGVAR(link_all_deplibs, $1)=no
5794 else
5795 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5796 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
5797 fi
5798 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5799 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5800 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5801 _LT_TAGVAR(inherit_rpath, $1)=yes
5802 _LT_TAGVAR(link_all_deplibs, $1)=yes
5803 ;;
5804
5805 linux*)
5806 case $cc_basename in
5807 tcc*)
5808 # Fabrice Bellard et al's Tiny C Compiler
5809 _LT_TAGVAR(ld_shlibs, $1)=yes
5810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5811 ;;
5812 esac
5813 ;;
5814
5815 netbsd* | netbsdelf*-gnu)
5816 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5817 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5818 else
5819 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5820 fi
5821 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5822 _LT_TAGVAR(hardcode_direct, $1)=yes
5823 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5824 ;;
5825
5826 newsos6)
5827 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5828 _LT_TAGVAR(hardcode_direct, $1)=yes
5829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5830 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5831 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5832 ;;
5833
5834 *nto* | *qnx*)
5835 ;;
5836
5837 openbsd* | bitrig*)
5838 if test -f /usr/libexec/ld.so; then
5839 _LT_TAGVAR(hardcode_direct, $1)=yes
5840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5841 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5842 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5845 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5846 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5847 else
5848 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5850 fi
5851 else
5852 _LT_TAGVAR(ld_shlibs, $1)=no
5853 fi
5854 ;;
5855
5856 os2*)
5857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5858 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5859 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5860 shrext_cmds=.dll
5861 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5862 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5863 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5864 $ECHO EXPORTS >> $output_objdir/$libname.def~
5865 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5866 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5867 emximp -o $lib $output_objdir/$libname.def'
5868 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5869 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5870 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5871 $ECHO EXPORTS >> $output_objdir/$libname.def~
5872 prefix_cmds="$SED"~
5873 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5874 prefix_cmds="$prefix_cmds -e 1d";
5875 fi~
5876 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5877 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5878 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5879 emximp -o $lib $output_objdir/$libname.def'
5880 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5881 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5882 ;;
5883
5884 osf3*)
5885 if test yes = "$GCC"; then
5886 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5887 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5888 else
5889 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5890 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5891 fi
5892 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5894 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5895 ;;
5896
5897 osf4* | osf5*) # as osf3* with the addition of -msym flag
5898 if test yes = "$GCC"; then
5899 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5900 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5901 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5902 else
5903 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5904 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5905 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5906 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
5907
5908 # Both c and cxx compiler support -rpath directly
5909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5910 fi
5911 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5912 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5913 ;;
5914
5915 solaris*)
5916 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5917 if test yes = "$GCC"; then
5918 wlarc='$wl'
5919 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5920 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5921 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5922 else
5923 case `$CC -V 2>&1` in
5924 *"Compilers 5.0"*)
5925 wlarc=''
5926 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5927 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5928 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5929 ;;
5930 *)
5931 wlarc='$wl'
5932 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5933 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5934 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5935 ;;
5936 esac
5937 fi
5938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5939 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5940 case $host_os in
5941 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5942 *)
5943 # The compiler driver will combine and reorder linker options,
5944 # but understands '-z linker_flag'. GCC discards it without '$wl',
5945 # but is careful enough not to reorder.
5946 # Supported since Solaris 2.6 (maybe 2.5.1?)
5947 if test yes = "$GCC"; then
5948 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5949 else
5950 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5951 fi
5952 ;;
5953 esac
5954 _LT_TAGVAR(link_all_deplibs, $1)=yes
5955 ;;
5956
5957 sunos4*)
5958 if test sequent = "$host_vendor"; then
5959 # Use $CC to link under sequent, because it throws in some extra .o
5960 # files that make .init and .fini sections work.
5961 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5962 else
5963 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5964 fi
5965 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5966 _LT_TAGVAR(hardcode_direct, $1)=yes
5967 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5968 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5969 ;;
5970
5971 sysv4)
5972 case $host_vendor in
5973 sni)
5974 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5975 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5976 ;;
5977 siemens)
5978 ## LD is ld it makes a PLAMLIB
5979 ## CC just makes a GrossModule.
5980 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5981 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5982 _LT_TAGVAR(hardcode_direct, $1)=no
5983 ;;
5984 motorola)
5985 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5986 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5987 ;;
5988 esac
5989 runpath_var='LD_RUN_PATH'
5990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5991 ;;
5992
5993 sysv4.3*)
5994 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5995 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5996 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5997 ;;
5998
5999 sysv4*MP*)
6000 if test -d /usr/nec; then
6001 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6002 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6003 runpath_var=LD_RUN_PATH
6004 hardcode_runpath_var=yes
6005 _LT_TAGVAR(ld_shlibs, $1)=yes
6006 fi
6007 ;;
6008
6009 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6010 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6011 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6012 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6013 runpath_var='LD_RUN_PATH'
6014
6015 if test yes = "$GCC"; then
6016 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6017 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6018 else
6019 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6020 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6021 fi
6022 ;;
6023
6024 sysv5* | sco3.2v5* | sco5v6*)
6025 # Note: We CANNOT use -z defs as we might desire, because we do not
6026 # link with -lc, and that would cause any symbols used from libc to
6027 # always be unresolved, which means just about no library would
6028 # ever link correctly. If we're not using GNU ld we use -z text
6029 # though, which does catch some bad symbols but isn't as heavy-handed
6030 # as -z defs.
6031 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6032 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6033 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6035 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6036 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6037 _LT_TAGVAR(link_all_deplibs, $1)=yes
6038 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6039 runpath_var='LD_RUN_PATH'
6040
6041 if test yes = "$GCC"; then
6042 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6043 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6044 else
6045 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6046 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6047 fi
6048 ;;
6049
6050 uts4*)
6051 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6052 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6054 ;;
6055
6056 *)
6057 _LT_TAGVAR(ld_shlibs, $1)=no
6058 ;;
6059 esac
6060
6061 if test sni = "$host_vendor"; then
6062 case $host in
6063 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6065 ;;
6066 esac
6067 fi
6068 fi
6069 ])
6070 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6071 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6072
6073 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6074
6075 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6076 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6077 _LT_DECL([], [extract_expsyms_cmds], [2],
6078 [The commands to extract the exported symbol list from a shared archive])
6079
6080 #
6081 # Do we need to explicitly link libc?
6082 #
6083 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6084 x|xyes)
6085 # Assume -lc should be added
6086 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6087
6088 if test yes,yes = "$GCC,$enable_shared"; then
6089 case $_LT_TAGVAR(archive_cmds, $1) in
6090 *'~'*)
6091 # FIXME: we may have to deal with multi-command sequences.
6092 ;;
6093 '$CC '*)
6094 # Test whether the compiler implicitly links with -lc since on some
6095 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6096 # to ld, don't add -lc before -lgcc.
6097 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6098 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6099 [$RM conftest*
6100 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6101
6102 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6103 soname=conftest
6104 lib=conftest
6105 libobjs=conftest.$ac_objext
6106 deplibs=
6107 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6108 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6109 compiler_flags=-v
6110 linker_flags=-v
6111 verstring=
6112 output_objdir=.
6113 libname=conftest
6114 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6115 _LT_TAGVAR(allow_undefined_flag, $1)=
6116 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6117 then
6118 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6119 else
6120 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6121 fi
6122 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6123 else
6124 cat conftest.err 1>&5
6125 fi
6126 $RM conftest*
6127 ])
6128 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6129 ;;
6130 esac
6131 fi
6132 ;;
6133 esac
6134
6135 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6136 [Whether or not to add -lc for building shared libraries])
6137 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6138 [enable_shared_with_static_runtimes], [0],
6139 [Whether or not to disallow shared libs when runtime libs are static])
6140 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6141 [Compiler flag to allow reflexive dlopens])
6142 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6143 [Compiler flag to generate shared objects directly from archives])
6144 _LT_TAGDECL([], [compiler_needs_object], [1],
6145 [Whether the compiler copes with passing no objects directly])
6146 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6147 [Create an old-style archive from a shared archive])
6148 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6149 [Create a temporary old-style archive to link instead of a shared archive])
6150 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6151 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6152 _LT_TAGDECL([], [module_cmds], [2],
6153 [Commands used to build a loadable module if different from building
6154 a shared archive.])
6155 _LT_TAGDECL([], [module_expsym_cmds], [2])
6156 _LT_TAGDECL([], [with_gnu_ld], [1],
6157 [Whether we are building with GNU ld or not])
6158 _LT_TAGDECL([], [allow_undefined_flag], [1],
6159 [Flag that allows shared libraries with undefined symbols to be built])
6160 _LT_TAGDECL([], [no_undefined_flag], [1],
6161 [Flag that enforces no undefined symbols])
6162 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6163 [Flag to hardcode $libdir into a binary during linking.
6164 This must work even if $libdir does not exist])
6165 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6166 [Whether we need a single "-rpath" flag with a separated argument])
6167 _LT_TAGDECL([], [hardcode_direct], [0],
6168 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6169 DIR into the resulting binary])
6170 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6171 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6172 DIR into the resulting binary and the resulting library dependency is
6173 "absolute", i.e impossible to change by setting $shlibpath_var if the
6174 library is relocated])
6175 _LT_TAGDECL([], [hardcode_minus_L], [0],
6176 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6177 into the resulting binary])
6178 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6179 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6180 into the resulting binary])
6181 _LT_TAGDECL([], [hardcode_automatic], [0],
6182 [Set to "yes" if building a shared library automatically hardcodes DIR
6183 into the library and all subsequent libraries and executables linked
6184 against it])
6185 _LT_TAGDECL([], [inherit_rpath], [0],
6186 [Set to yes if linker adds runtime paths of dependent libraries
6187 to runtime path list])
6188 _LT_TAGDECL([], [link_all_deplibs], [0],
6189 [Whether libtool must link a program against all its dependency libraries])
6190 _LT_TAGDECL([], [always_export_symbols], [0],
6191 [Set to "yes" if exported symbols are required])
6192 _LT_TAGDECL([], [export_symbols_cmds], [2],
6193 [The commands to list exported symbols])
6194 _LT_TAGDECL([], [exclude_expsyms], [1],
6195 [Symbols that should not be listed in the preloaded symbols])
6196 _LT_TAGDECL([], [include_expsyms], [1],
6197 [Symbols that must always be exported])
6198 _LT_TAGDECL([], [prelink_cmds], [2],
6199 [Commands necessary for linking programs (against libraries) with templates])
6200 _LT_TAGDECL([], [postlink_cmds], [2],
6201 [Commands necessary for finishing linking programs])
6202 _LT_TAGDECL([], [file_list_spec], [1],
6203 [Specify filename containing input files])
6204 dnl FIXME: Not yet implemented
6205 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6206 dnl [Compiler flag to generate thread safe objects])
6207 ])# _LT_LINKER_SHLIBS
6208
6209
6210 # _LT_LANG_C_CONFIG([TAG])
6211 # ------------------------
6212 # Ensure that the configuration variables for a C compiler are suitably
6213 # defined. These variables are subsequently used by _LT_CONFIG to write
6214 # the compiler configuration to 'libtool'.
6215 m4_defun([_LT_LANG_C_CONFIG],
6216 [m4_require([_LT_DECL_EGREP])dnl
6217 lt_save_CC=$CC
6218 AC_LANG_PUSH(C)
6219
6220 # Source file extension for C test sources.
6221 ac_ext=c
6222
6223 # Object file extension for compiled C test sources.
6224 objext=o
6225 _LT_TAGVAR(objext, $1)=$objext
6226
6227 # Code to be used in simple compile tests
6228 lt_simple_compile_test_code="int some_variable = 0;"
6229
6230 # Code to be used in simple link tests
6231 lt_simple_link_test_code='int main(){return(0);}'
6232
6233 _LT_TAG_COMPILER
6234 # Save the default compiler, since it gets overwritten when the other
6235 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6236 compiler_DEFAULT=$CC
6237
6238 # save warnings/boilerplate of simple test code
6239 _LT_COMPILER_BOILERPLATE
6240 _LT_LINKER_BOILERPLATE
6241
6242 ## CAVEAT EMPTOR:
6243 ## There is no encapsulation within the following macros, do not change
6244 ## the running order or otherwise move them around unless you know exactly
6245 ## what you are doing...
6246 if test -n "$compiler"; then
6247 _LT_COMPILER_NO_RTTI($1)
6248 _LT_COMPILER_PIC($1)
6249 _LT_COMPILER_C_O($1)
6250 _LT_COMPILER_FILE_LOCKS($1)
6251 _LT_LINKER_SHLIBS($1)
6252 _LT_SYS_DYNAMIC_LINKER($1)
6253 _LT_LINKER_HARDCODE_LIBPATH($1)
6254 LT_SYS_DLOPEN_SELF
6255 _LT_CMD_STRIPLIB
6256
6257 # Report what library types will actually be built
6258 AC_MSG_CHECKING([if libtool supports shared libraries])
6259 AC_MSG_RESULT([$can_build_shared])
6260
6261 AC_MSG_CHECKING([whether to build shared libraries])
6262 test no = "$can_build_shared" && enable_shared=no
6263
6264 # On AIX, shared libraries and static libraries use the same namespace, and
6265 # are all built from PIC.
6266 case $host_os in
6267 aix3*)
6268 test yes = "$enable_shared" && enable_static=no
6269 if test -n "$RANLIB"; then
6270 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6271 postinstall_cmds='$RANLIB $lib'
6272 fi
6273 ;;
6274
6275 aix[[4-9]]*)
6276 if test ia64 != "$host_cpu"; then
6277 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6278 yes,aix,yes) ;; # shared object as lib.so file only
6279 yes,svr4,*) ;; # shared object as lib.so archive member only
6280 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6281 esac
6282 fi
6283 ;;
6284 esac
6285 AC_MSG_RESULT([$enable_shared])
6286
6287 AC_MSG_CHECKING([whether to build static libraries])
6288 # Make sure either enable_shared or enable_static is yes.
6289 test yes = "$enable_shared" || enable_static=yes
6290 AC_MSG_RESULT([$enable_static])
6291
6292 _LT_CONFIG($1)
6293 fi
6294 AC_LANG_POP
6295 CC=$lt_save_CC
6296 ])# _LT_LANG_C_CONFIG
6297
6298
6299 # _LT_LANG_CXX_CONFIG([TAG])
6300 # --------------------------
6301 # Ensure that the configuration variables for a C++ compiler are suitably
6302 # defined. These variables are subsequently used by _LT_CONFIG to write
6303 # the compiler configuration to 'libtool'.
6304 m4_defun([_LT_LANG_CXX_CONFIG],
6305 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6306 m4_require([_LT_DECL_EGREP])dnl
6307 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6308 if test -n "$CXX" && ( test no != "$CXX" &&
6309 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6310 (test g++ != "$CXX"))); then
6311 AC_PROG_CXXCPP
6312 else
6313 _lt_caught_CXX_error=yes
6314 fi
6315
6316 AC_LANG_PUSH(C++)
6317 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6318 _LT_TAGVAR(allow_undefined_flag, $1)=
6319 _LT_TAGVAR(always_export_symbols, $1)=no
6320 _LT_TAGVAR(archive_expsym_cmds, $1)=
6321 _LT_TAGVAR(compiler_needs_object, $1)=no
6322 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6323 _LT_TAGVAR(hardcode_direct, $1)=no
6324 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6326 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6327 _LT_TAGVAR(hardcode_minus_L, $1)=no
6328 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6329 _LT_TAGVAR(hardcode_automatic, $1)=no
6330 _LT_TAGVAR(inherit_rpath, $1)=no
6331 _LT_TAGVAR(module_cmds, $1)=
6332 _LT_TAGVAR(module_expsym_cmds, $1)=
6333 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6334 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6335 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6336 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6337 _LT_TAGVAR(no_undefined_flag, $1)=
6338 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6339 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6340
6341 # Source file extension for C++ test sources.
6342 ac_ext=cpp
6343
6344 # Object file extension for compiled C++ test sources.
6345 objext=o
6346 _LT_TAGVAR(objext, $1)=$objext
6347
6348 # No sense in running all these tests if we already determined that
6349 # the CXX compiler isn't working. Some variables (like enable_shared)
6350 # are currently assumed to apply to all compilers on this platform,
6351 # and will be corrupted by setting them based on a non-working compiler.
6352 if test yes != "$_lt_caught_CXX_error"; then
6353 # Code to be used in simple compile tests
6354 lt_simple_compile_test_code="int some_variable = 0;"
6355
6356 # Code to be used in simple link tests
6357 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6358
6359 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6360 _LT_TAG_COMPILER
6361
6362 # save warnings/boilerplate of simple test code
6363 _LT_COMPILER_BOILERPLATE
6364 _LT_LINKER_BOILERPLATE
6365
6366 # Allow CC to be a program name with arguments.
6367 lt_save_CC=$CC
6368 lt_save_CFLAGS=$CFLAGS
6369 lt_save_LD=$LD
6370 lt_save_GCC=$GCC
6371 GCC=$GXX
6372 lt_save_with_gnu_ld=$with_gnu_ld
6373 lt_save_path_LD=$lt_cv_path_LD
6374 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6375 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6376 else
6377 $as_unset lt_cv_prog_gnu_ld
6378 fi
6379 if test -n "${lt_cv_path_LDCXX+set}"; then
6380 lt_cv_path_LD=$lt_cv_path_LDCXX
6381 else
6382 $as_unset lt_cv_path_LD
6383 fi
6384 test -z "${LDCXX+set}" || LD=$LDCXX
6385 CC=${CXX-"c++"}
6386 CFLAGS=$CXXFLAGS
6387 compiler=$CC
6388 _LT_TAGVAR(compiler, $1)=$CC
6389 _LT_CC_BASENAME([$compiler])
6390
6391 if test -n "$compiler"; then
6392 # We don't want -fno-exception when compiling C++ code, so set the
6393 # no_builtin_flag separately
6394 if test yes = "$GXX"; then
6395 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6396 else
6397 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6398 fi
6399
6400 if test yes = "$GXX"; then
6401 # Set up default GNU C++ configuration
6402
6403 LT_PATH_LD
6404
6405 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6406 # archiving commands below assume that GNU ld is being used.
6407 if test yes = "$with_gnu_ld"; then
6408 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6409 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6410
6411 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6412 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6413
6414 # If archive_cmds runs LD, not CC, wlarc should be empty
6415 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6416 # investigate it a little bit more. (MM)
6417 wlarc='$wl'
6418
6419 # ancient GNU ld didn't support --whole-archive et. al.
6420 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6421 $GREP 'no-whole-archive' > /dev/null; then
6422 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6423 else
6424 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6425 fi
6426 else
6427 with_gnu_ld=no
6428 wlarc=
6429
6430 # A generic and very simple default shared library creation
6431 # command for GNU C++ for the case where it uses the native
6432 # linker, instead of GNU ld. If possible, this setting should
6433 # overridden to take advantage of the native linker features on
6434 # the platform it is being used on.
6435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6436 fi
6437
6438 # Commands to make compiler produce verbose output that lists
6439 # what "hidden" libraries, object files and flags are used when
6440 # linking a shared library.
6441 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6442
6443 else
6444 GXX=no
6445 with_gnu_ld=no
6446 wlarc=
6447 fi
6448
6449 # PORTME: fill in a description of your system's C++ link characteristics
6450 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6451 _LT_TAGVAR(ld_shlibs, $1)=yes
6452 case $host_os in
6453 aix3*)
6454 # FIXME: insert proper C++ library support
6455 _LT_TAGVAR(ld_shlibs, $1)=no
6456 ;;
6457 aix[[4-9]]*)
6458 if test ia64 = "$host_cpu"; then
6459 # On IA64, the linker does run time linking by default, so we don't
6460 # have to do anything special.
6461 aix_use_runtimelinking=no
6462 exp_sym_flag='-Bexport'
6463 no_entry_flag=
6464 else
6465 aix_use_runtimelinking=no
6466
6467 # Test if we are trying to use run time linking or normal
6468 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6469 # have runtime linking enabled, and use it for executables.
6470 # For shared libraries, we enable/disable runtime linking
6471 # depending on the kind of the shared library created -
6472 # when "with_aix_soname,aix_use_runtimelinking" is:
6473 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6474 # "aix,yes" lib.so shared, rtl:yes, for executables
6475 # lib.a static archive
6476 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6477 # lib.a(lib.so.V) shared, rtl:no, for executables
6478 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6479 # lib.a(lib.so.V) shared, rtl:no
6480 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6481 # lib.a static archive
6482 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6483 for ld_flag in $LDFLAGS; do
6484 case $ld_flag in
6485 *-brtl*)
6486 aix_use_runtimelinking=yes
6487 break
6488 ;;
6489 esac
6490 done
6491 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6492 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6493 # so we don't have lib.a shared libs to link our executables.
6494 # We have to force runtime linking in this case.
6495 aix_use_runtimelinking=yes
6496 LDFLAGS="$LDFLAGS -Wl,-brtl"
6497 fi
6498 ;;
6499 esac
6500
6501 exp_sym_flag='-bexport'
6502 no_entry_flag='-bnoentry'
6503 fi
6504
6505 # When large executables or shared objects are built, AIX ld can
6506 # have problems creating the table of contents. If linking a library
6507 # or program results in "error TOC overflow" add -mminimal-toc to
6508 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6509 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6510
6511 _LT_TAGVAR(archive_cmds, $1)=''
6512 _LT_TAGVAR(hardcode_direct, $1)=yes
6513 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6514 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6515 _LT_TAGVAR(link_all_deplibs, $1)=yes
6516 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6517 case $with_aix_soname,$aix_use_runtimelinking in
6518 aix,*) ;; # no import file
6519 svr4,* | *,yes) # use import file
6520 # The Import File defines what to hardcode.
6521 _LT_TAGVAR(hardcode_direct, $1)=no
6522 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6523 ;;
6524 esac
6525
6526 if test yes = "$GXX"; then
6527 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6528 # We only want to do this on AIX 4.2 and lower, the check
6529 # below for broken collect2 doesn't work under 4.3+
6530 collect2name=`$CC -print-prog-name=collect2`
6531 if test -f "$collect2name" &&
6532 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6533 then
6534 # We have reworked collect2
6535 :
6536 else
6537 # We have old collect2
6538 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6539 # It fails to find uninstalled libraries when the uninstalled
6540 # path is not listed in the libpath. Setting hardcode_minus_L
6541 # to unsupported forces relinking
6542 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6543 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6544 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6545 fi
6546 esac
6547 shared_flag='-shared'
6548 if test yes = "$aix_use_runtimelinking"; then
6549 shared_flag=$shared_flag' $wl-G'
6550 fi
6551 # Need to ensure runtime linking is disabled for the traditional
6552 # shared library, or the linker may eventually find shared libraries
6553 # /with/ Import File - we do not want to mix them.
6554 shared_flag_aix='-shared'
6555 shared_flag_svr4='-shared $wl-G'
6556 else
6557 # not using gcc
6558 if test ia64 = "$host_cpu"; then
6559 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6560 # chokes on -Wl,-G. The following line is correct:
6561 shared_flag='-G'
6562 else
6563 if test yes = "$aix_use_runtimelinking"; then
6564 shared_flag='$wl-G'
6565 else
6566 shared_flag='$wl-bM:SRE'
6567 fi
6568 shared_flag_aix='$wl-bM:SRE'
6569 shared_flag_svr4='$wl-G'
6570 fi
6571 fi
6572
6573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6574 # It seems that -bexpall does not export symbols beginning with
6575 # underscore (_), so it is better to generate a list of symbols to
6576 # export.
6577 _LT_TAGVAR(always_export_symbols, $1)=yes
6578 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6579 # Warning - without using the other runtime loading flags (-brtl),
6580 # -berok will link without error, but may produce a broken library.
6581 # The "-G" linker flag allows undefined symbols.
6582 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6583 # Determine the default libpath from the value encoded in an empty
6584 # executable.
6585 _LT_SYS_MODULE_PATH_AIX([$1])
6586 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6587
6588 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6589 else
6590 if test ia64 = "$host_cpu"; then
6591 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6592 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6593 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
6594 else
6595 # Determine the default libpath from the value encoded in an
6596 # empty executable.
6597 _LT_SYS_MODULE_PATH_AIX([$1])
6598 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6599 # Warning - without using the other run time loading flags,
6600 # -berok will link without error, but may produce a broken library.
6601 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6602 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6603 if test yes = "$with_gnu_ld"; then
6604 # We only use this code for GNU lds that support --whole-archive.
6605 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6606 else
6607 # Exported symbols can be pulled into shared objects from archives
6608 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6609 fi
6610 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6611 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6612 # -brtl affects multiple linker settings, -berok does not and is overridden later
6613 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6614 if test svr4 != "$with_aix_soname"; then
6615 # This is similar to how AIX traditionally builds its shared
6616 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6617 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6618 fi
6619 if test aix != "$with_aix_soname"; then
6620 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6621 else
6622 # used by -dlpreopen to get the symbols
6623 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6624 fi
6625 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6626 fi
6627 fi
6628 ;;
6629
6630 beos*)
6631 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6632 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6633 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6634 # support --undefined. This deserves some investigation. FIXME
6635 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6636 else
6637 _LT_TAGVAR(ld_shlibs, $1)=no
6638 fi
6639 ;;
6640
6641 chorus*)
6642 case $cc_basename in
6643 *)
6644 # FIXME: insert proper C++ library support
6645 _LT_TAGVAR(ld_shlibs, $1)=no
6646 ;;
6647 esac
6648 ;;
6649
6650 cygwin* | mingw* | pw32* | cegcc*)
6651 case $GXX,$cc_basename in
6652 ,cl* | no,cl*)
6653 # Native MSVC
6654 # hardcode_libdir_flag_spec is actually meaningless, as there is
6655 # no search path for DLLs.
6656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6657 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6658 _LT_TAGVAR(always_export_symbols, $1)=yes
6659 _LT_TAGVAR(file_list_spec, $1)='@'
6660 # Tell ltmain to make .lib files, not .a files.
6661 libext=lib
6662 # Tell ltmain to make .dll files, not .so files.
6663 shrext_cmds=.dll
6664 # FIXME: Setting linknames here is a bad hack.
6665 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6666 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6667 cp "$export_symbols" "$output_objdir/$soname.def";
6668 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6669 else
6670 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6671 fi~
6672 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6673 linknames='
6674 # The linker will not automatically build a static lib if we build a DLL.
6675 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6676 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6677 # Don't use ranlib
6678 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6679 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6680 lt_tool_outputfile="@TOOL_OUTPUT@"~
6681 case $lt_outputfile in
6682 *.exe|*.EXE) ;;
6683 *)
6684 lt_outputfile=$lt_outputfile.exe
6685 lt_tool_outputfile=$lt_tool_outputfile.exe
6686 ;;
6687 esac~
6688 func_to_tool_file "$lt_outputfile"~
6689 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6690 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6691 $RM "$lt_outputfile.manifest";
6692 fi'
6693 ;;
6694 *)
6695 # g++
6696 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6697 # as there is no search path for DLLs.
6698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6699 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6700 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6701 _LT_TAGVAR(always_export_symbols, $1)=no
6702 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6703
6704 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6705 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6706 # If the export-symbols file already is a .def file, use it as
6707 # is; otherwise, prepend EXPORTS...
6708 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6709 cp $export_symbols $output_objdir/$soname.def;
6710 else
6711 echo EXPORTS > $output_objdir/$soname.def;
6712 cat $export_symbols >> $output_objdir/$soname.def;
6713 fi~
6714 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6715 else
6716 _LT_TAGVAR(ld_shlibs, $1)=no
6717 fi
6718 ;;
6719 esac
6720 ;;
6721 darwin* | rhapsody*)
6722 _LT_DARWIN_LINKER_FEATURES($1)
6723 ;;
6724
6725 os2*)
6726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6727 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6728 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6729 shrext_cmds=.dll
6730 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6731 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6732 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6733 $ECHO EXPORTS >> $output_objdir/$libname.def~
6734 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6735 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6736 emximp -o $lib $output_objdir/$libname.def'
6737 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6738 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6739 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6740 $ECHO EXPORTS >> $output_objdir/$libname.def~
6741 prefix_cmds="$SED"~
6742 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6743 prefix_cmds="$prefix_cmds -e 1d";
6744 fi~
6745 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6746 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6747 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6748 emximp -o $lib $output_objdir/$libname.def'
6749 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6750 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6751 ;;
6752
6753 dgux*)
6754 case $cc_basename in
6755 ec++*)
6756 # FIXME: insert proper C++ library support
6757 _LT_TAGVAR(ld_shlibs, $1)=no
6758 ;;
6759 ghcx*)
6760 # Green Hills C++ Compiler
6761 # FIXME: insert proper C++ library support
6762 _LT_TAGVAR(ld_shlibs, $1)=no
6763 ;;
6764 *)
6765 # FIXME: insert proper C++ library support
6766 _LT_TAGVAR(ld_shlibs, $1)=no
6767 ;;
6768 esac
6769 ;;
6770
6771 freebsd2.*)
6772 # C++ shared libraries reported to be fairly broken before
6773 # switch to ELF
6774 _LT_TAGVAR(ld_shlibs, $1)=no
6775 ;;
6776
6777 freebsd-elf*)
6778 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6779 ;;
6780
6781 freebsd* | dragonfly*)
6782 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6783 # conventions
6784 _LT_TAGVAR(ld_shlibs, $1)=yes
6785 ;;
6786
6787 haiku*)
6788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6789 _LT_TAGVAR(link_all_deplibs, $1)=yes
6790 ;;
6791
6792 hpux9*)
6793 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6794 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6795 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6796 _LT_TAGVAR(hardcode_direct, $1)=yes
6797 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6798 # but as the default
6799 # location of the library.
6800
6801 case $cc_basename in
6802 CC*)
6803 # FIXME: insert proper C++ library support
6804 _LT_TAGVAR(ld_shlibs, $1)=no
6805 ;;
6806 aCC*)
6807 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6808 # Commands to make compiler produce verbose output that lists
6809 # what "hidden" libraries, object files and flags are used when
6810 # linking a shared library.
6811 #
6812 # There doesn't appear to be a way to prevent this compiler from
6813 # explicitly linking system object files so we need to strip them
6814 # from the output so that they don't get included in the library
6815 # dependencies.
6816 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6817 ;;
6818 *)
6819 if test yes = "$GXX"; then
6820 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6821 else
6822 # FIXME: insert proper C++ library support
6823 _LT_TAGVAR(ld_shlibs, $1)=no
6824 fi
6825 ;;
6826 esac
6827 ;;
6828
6829 hpux10*|hpux11*)
6830 if test no = "$with_gnu_ld"; then
6831 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6832 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6833
6834 case $host_cpu in
6835 hppa*64*|ia64*)
6836 ;;
6837 *)
6838 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6839 ;;
6840 esac
6841 fi
6842 case $host_cpu in
6843 hppa*64*|ia64*)
6844 _LT_TAGVAR(hardcode_direct, $1)=no
6845 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6846 ;;
6847 *)
6848 _LT_TAGVAR(hardcode_direct, $1)=yes
6849 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6850 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6851 # but as the default
6852 # location of the library.
6853 ;;
6854 esac
6855
6856 case $cc_basename in
6857 CC*)
6858 # FIXME: insert proper C++ library support
6859 _LT_TAGVAR(ld_shlibs, $1)=no
6860 ;;
6861 aCC*)
6862 case $host_cpu in
6863 hppa*64*)
6864 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6865 ;;
6866 ia64*)
6867 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6868 ;;
6869 *)
6870 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6871 ;;
6872 esac
6873 # Commands to make compiler produce verbose output that lists
6874 # what "hidden" libraries, object files and flags are used when
6875 # linking a shared library.
6876 #
6877 # There doesn't appear to be a way to prevent this compiler from
6878 # explicitly linking system object files so we need to strip them
6879 # from the output so that they don't get included in the library
6880 # dependencies.
6881 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6882 ;;
6883 *)
6884 if test yes = "$GXX"; then
6885 if test no = "$with_gnu_ld"; then
6886 case $host_cpu in
6887 hppa*64*)
6888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6889 ;;
6890 ia64*)
6891 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6892 ;;
6893 *)
6894 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6895 ;;
6896 esac
6897 fi
6898 else
6899 # FIXME: insert proper C++ library support
6900 _LT_TAGVAR(ld_shlibs, $1)=no
6901 fi
6902 ;;
6903 esac
6904 ;;
6905
6906 interix[[3-9]]*)
6907 _LT_TAGVAR(hardcode_direct, $1)=no
6908 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6910 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6911 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6912 # Instead, shared libraries are loaded at an image base (0x10000000 by
6913 # default) and relocated if they conflict, which is a slow very memory
6914 # consuming and fragmenting process. To avoid this, we pick a random,
6915 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6916 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6918 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6919 ;;
6920 irix5* | irix6*)
6921 case $cc_basename in
6922 CC*)
6923 # SGI C++
6924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
6925
6926 # Archives containing C++ object files must be created using
6927 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6928 # necessary to make sure instantiated templates are included
6929 # in the archive.
6930 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6931 ;;
6932 *)
6933 if test yes = "$GXX"; then
6934 if test no = "$with_gnu_ld"; then
6935 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
6936 else
6937 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
6938 fi
6939 fi
6940 _LT_TAGVAR(link_all_deplibs, $1)=yes
6941 ;;
6942 esac
6943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6944 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6945 _LT_TAGVAR(inherit_rpath, $1)=yes
6946 ;;
6947
6948 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6949 case $cc_basename in
6950 KCC*)
6951 # Kuck and Associates, Inc. (KAI) C++ Compiler
6952
6953 # KCC will only create a shared library if the output file
6954 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6955 # to its proper name (with version) after linking.
6956 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6957 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
6958 # Commands to make compiler produce verbose output that lists
6959 # what "hidden" libraries, object files and flags are used when
6960 # linking a shared library.
6961 #
6962 # There doesn't appear to be a way to prevent this compiler from
6963 # explicitly linking system object files so we need to strip them
6964 # from the output so that they don't get included in the library
6965 # dependencies.
6966 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6967
6968 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6969 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6970
6971 # Archives containing C++ object files must be created using
6972 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6973 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6974 ;;
6975 icpc* | ecpc* )
6976 # Intel C++
6977 with_gnu_ld=yes
6978 # version 8.0 and above of icpc choke on multiply defined symbols
6979 # if we add $predep_objects and $postdep_objects, however 7.1 and
6980 # earlier do not add the objects themselves.
6981 case `$CC -V 2>&1` in
6982 *"Version 7."*)
6983 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6984 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6985 ;;
6986 *) # Version 8.0 or newer
6987 tmp_idyn=
6988 case $host_cpu in
6989 ia64*) tmp_idyn=' -i_dynamic';;
6990 esac
6991 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6992 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6993 ;;
6994 esac
6995 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6996 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6997 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6998 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6999 ;;
7000 pgCC* | pgcpp*)
7001 # Portland Group C++ compiler
7002 case `$CC -V` in
7003 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7004 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7005 rm -rf $tpldir~
7006 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7007 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7008 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7009 rm -rf $tpldir~
7010 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7011 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7012 $RANLIB $oldlib'
7013 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7014 rm -rf $tpldir~
7015 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7016 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7017 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7018 rm -rf $tpldir~
7019 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7020 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
7021 ;;
7022 *) # Version 6 and above use weak symbols
7023 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7024 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
7025 ;;
7026 esac
7027
7028 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7029 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7030 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7031 ;;
7032 cxx*)
7033 # Compaq C++
7034 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7035 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
7036
7037 runpath_var=LD_RUN_PATH
7038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7039 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7040
7041 # Commands to make compiler produce verbose output that lists
7042 # what "hidden" libraries, object files and flags are used when
7043 # linking a shared library.
7044 #
7045 # There doesn't appear to be a way to prevent this compiler from
7046 # explicitly linking system object files so we need to strip them
7047 # from the output so that they don't get included in the library
7048 # dependencies.
7049 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7050 ;;
7051 xl* | mpixl* | bgxl*)
7052 # IBM XL 8.0 on PPC, with GNU ld
7053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7054 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7055 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7056 if test yes = "$supports_anon_versioning"; then
7057 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7058 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7059 echo "local: *; };" >> $output_objdir/$libname.ver~
7060 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7061 fi
7062 ;;
7063 *)
7064 case `$CC -V 2>&1 | sed 5q` in
7065 *Sun\ C*)
7066 # Sun C++ 5.9
7067 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7068 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7069 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
7070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7071 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7072 _LT_TAGVAR(compiler_needs_object, $1)=yes
7073
7074 # Not sure whether something based on
7075 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7076 # would be better.
7077 output_verbose_link_cmd='func_echo_all'
7078
7079 # Archives containing C++ object files must be created using
7080 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7081 # necessary to make sure instantiated templates are included
7082 # in the archive.
7083 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7084 ;;
7085 esac
7086 ;;
7087 esac
7088 ;;
7089
7090 lynxos*)
7091 # FIXME: insert proper C++ library support
7092 _LT_TAGVAR(ld_shlibs, $1)=no
7093 ;;
7094
7095 m88k*)
7096 # FIXME: insert proper C++ library support
7097 _LT_TAGVAR(ld_shlibs, $1)=no
7098 ;;
7099
7100 mvs*)
7101 case $cc_basename in
7102 cxx*)
7103 # FIXME: insert proper C++ library support
7104 _LT_TAGVAR(ld_shlibs, $1)=no
7105 ;;
7106 *)
7107 # FIXME: insert proper C++ library support
7108 _LT_TAGVAR(ld_shlibs, $1)=no
7109 ;;
7110 esac
7111 ;;
7112
7113 netbsd*)
7114 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7115 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7116 wlarc=
7117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7118 _LT_TAGVAR(hardcode_direct, $1)=yes
7119 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7120 fi
7121 # Workaround some broken pre-1.5 toolchains
7122 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7123 ;;
7124
7125 *nto* | *qnx*)
7126 _LT_TAGVAR(ld_shlibs, $1)=yes
7127 ;;
7128
7129 openbsd* | bitrig*)
7130 if test -f /usr/libexec/ld.so; then
7131 _LT_TAGVAR(hardcode_direct, $1)=yes
7132 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7133 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7134 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7136 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7137 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
7138 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7139 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7140 fi
7141 output_verbose_link_cmd=func_echo_all
7142 else
7143 _LT_TAGVAR(ld_shlibs, $1)=no
7144 fi
7145 ;;
7146
7147 osf3* | osf4* | osf5*)
7148 case $cc_basename in
7149 KCC*)
7150 # Kuck and Associates, Inc. (KAI) C++ Compiler
7151
7152 # KCC will only create a shared library if the output file
7153 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7154 # to its proper name (with version) after linking.
7155 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7156
7157 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7158 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7159
7160 # Archives containing C++ object files must be created using
7161 # the KAI C++ compiler.
7162 case $host in
7163 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7164 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7165 esac
7166 ;;
7167 RCC*)
7168 # Rational C++ 2.4.1
7169 # FIXME: insert proper C++ library support
7170 _LT_TAGVAR(ld_shlibs, $1)=no
7171 ;;
7172 cxx*)
7173 case $host in
7174 osf3*)
7175 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7176 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7178 ;;
7179 *)
7180 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7181 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7182 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7183 echo "-hidden">> $lib.exp~
7184 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
7185 $RM $lib.exp'
7186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7187 ;;
7188 esac
7189
7190 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7191
7192 # Commands to make compiler produce verbose output that lists
7193 # what "hidden" libraries, object files and flags are used when
7194 # linking a shared library.
7195 #
7196 # There doesn't appear to be a way to prevent this compiler from
7197 # explicitly linking system object files so we need to strip them
7198 # from the output so that they don't get included in the library
7199 # dependencies.
7200 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7201 ;;
7202 *)
7203 if test yes,no = "$GXX,$with_gnu_ld"; then
7204 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7205 case $host in
7206 osf3*)
7207 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7208 ;;
7209 *)
7210 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7211 ;;
7212 esac
7213
7214 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7215 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7216
7217 # Commands to make compiler produce verbose output that lists
7218 # what "hidden" libraries, object files and flags are used when
7219 # linking a shared library.
7220 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7221
7222 else
7223 # FIXME: insert proper C++ library support
7224 _LT_TAGVAR(ld_shlibs, $1)=no
7225 fi
7226 ;;
7227 esac
7228 ;;
7229
7230 psos*)
7231 # FIXME: insert proper C++ library support
7232 _LT_TAGVAR(ld_shlibs, $1)=no
7233 ;;
7234
7235 sunos4*)
7236 case $cc_basename in
7237 CC*)
7238 # Sun C++ 4.x
7239 # FIXME: insert proper C++ library support
7240 _LT_TAGVAR(ld_shlibs, $1)=no
7241 ;;
7242 lcc*)
7243 # Lucid
7244 # FIXME: insert proper C++ library support
7245 _LT_TAGVAR(ld_shlibs, $1)=no
7246 ;;
7247 *)
7248 # FIXME: insert proper C++ library support
7249 _LT_TAGVAR(ld_shlibs, $1)=no
7250 ;;
7251 esac
7252 ;;
7253
7254 solaris*)
7255 case $cc_basename in
7256 CC* | sunCC*)
7257 # Sun C++ 4.2, 5.x and Centerline C++
7258 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7259 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7260 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7261 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7262 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7263
7264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7265 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7266 case $host_os in
7267 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7268 *)
7269 # The compiler driver will combine and reorder linker options,
7270 # but understands '-z linker_flag'.
7271 # Supported since Solaris 2.6 (maybe 2.5.1?)
7272 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7273 ;;
7274 esac
7275 _LT_TAGVAR(link_all_deplibs, $1)=yes
7276
7277 output_verbose_link_cmd='func_echo_all'
7278
7279 # Archives containing C++ object files must be created using
7280 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7281 # necessary to make sure instantiated templates are included
7282 # in the archive.
7283 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7284 ;;
7285 gcx*)
7286 # Green Hills C++ Compiler
7287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7288
7289 # The C++ compiler must be used to create the archive.
7290 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7291 ;;
7292 *)
7293 # GNU C++ compiler with Solaris linker
7294 if test yes,no = "$GXX,$with_gnu_ld"; then
7295 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7296 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7298 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7299 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7300
7301 # Commands to make compiler produce verbose output that lists
7302 # what "hidden" libraries, object files and flags are used when
7303 # linking a shared library.
7304 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7305 else
7306 # g++ 2.7 appears to require '-G' NOT '-shared' on this
7307 # platform.
7308 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7309 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7310 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7311
7312 # Commands to make compiler produce verbose output that lists
7313 # what "hidden" libraries, object files and flags are used when
7314 # linking a shared library.
7315 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7316 fi
7317
7318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7319 case $host_os in
7320 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7321 *)
7322 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7323 ;;
7324 esac
7325 fi
7326 ;;
7327 esac
7328 ;;
7329
7330 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7331 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7332 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7333 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7334 runpath_var='LD_RUN_PATH'
7335
7336 case $cc_basename in
7337 CC*)
7338 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7339 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7340 ;;
7341 *)
7342 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7343 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7344 ;;
7345 esac
7346 ;;
7347
7348 sysv5* | sco3.2v5* | sco5v6*)
7349 # Note: We CANNOT use -z defs as we might desire, because we do not
7350 # link with -lc, and that would cause any symbols used from libc to
7351 # always be unresolved, which means just about no library would
7352 # ever link correctly. If we're not using GNU ld we use -z text
7353 # though, which does catch some bad symbols but isn't as heavy-handed
7354 # as -z defs.
7355 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7356 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7357 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7358 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7360 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7361 _LT_TAGVAR(link_all_deplibs, $1)=yes
7362 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7363 runpath_var='LD_RUN_PATH'
7364
7365 case $cc_basename in
7366 CC*)
7367 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7368 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7369 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7370 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7371 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7372 '"$_LT_TAGVAR(reload_cmds, $1)"
7373 ;;
7374 *)
7375 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7376 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7377 ;;
7378 esac
7379 ;;
7380
7381 tandem*)
7382 case $cc_basename in
7383 NCC*)
7384 # NonStop-UX NCC 3.20
7385 # FIXME: insert proper C++ library support
7386 _LT_TAGVAR(ld_shlibs, $1)=no
7387 ;;
7388 *)
7389 # FIXME: insert proper C++ library support
7390 _LT_TAGVAR(ld_shlibs, $1)=no
7391 ;;
7392 esac
7393 ;;
7394
7395 vxworks*)
7396 # FIXME: insert proper C++ library support
7397 _LT_TAGVAR(ld_shlibs, $1)=no
7398 ;;
7399
7400 *)
7401 # FIXME: insert proper C++ library support
7402 _LT_TAGVAR(ld_shlibs, $1)=no
7403 ;;
7404 esac
7405
7406 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7407 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7408
7409 _LT_TAGVAR(GCC, $1)=$GXX
7410 _LT_TAGVAR(LD, $1)=$LD
7411
7412 ## CAVEAT EMPTOR:
7413 ## There is no encapsulation within the following macros, do not change
7414 ## the running order or otherwise move them around unless you know exactly
7415 ## what you are doing...
7416 _LT_SYS_HIDDEN_LIBDEPS($1)
7417 _LT_COMPILER_PIC($1)
7418 _LT_COMPILER_C_O($1)
7419 _LT_COMPILER_FILE_LOCKS($1)
7420 _LT_LINKER_SHLIBS($1)
7421 _LT_SYS_DYNAMIC_LINKER($1)
7422 _LT_LINKER_HARDCODE_LIBPATH($1)
7423
7424 _LT_CONFIG($1)
7425 fi # test -n "$compiler"
7426
7427 CC=$lt_save_CC
7428 CFLAGS=$lt_save_CFLAGS
7429 LDCXX=$LD
7430 LD=$lt_save_LD
7431 GCC=$lt_save_GCC
7432 with_gnu_ld=$lt_save_with_gnu_ld
7433 lt_cv_path_LDCXX=$lt_cv_path_LD
7434 lt_cv_path_LD=$lt_save_path_LD
7435 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7436 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7437 fi # test yes != "$_lt_caught_CXX_error"
7438
7439 AC_LANG_POP
7440 ])# _LT_LANG_CXX_CONFIG
7441
7442
7443 # _LT_FUNC_STRIPNAME_CNF
7444 # ----------------------
7445 # func_stripname_cnf prefix suffix name
7446 # strip PREFIX and SUFFIX off of NAME.
7447 # PREFIX and SUFFIX must not contain globbing or regex special
7448 # characters, hashes, percent signs, but SUFFIX may contain a leading
7449 # dot (in which case that matches only a dot).
7450 #
7451 # This function is identical to the (non-XSI) version of func_stripname,
7452 # except this one can be used by m4 code that may be executed by configure,
7453 # rather than the libtool script.
7454 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7455 AC_REQUIRE([_LT_DECL_SED])
7456 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7457 func_stripname_cnf ()
7458 {
7459 case @S|@2 in
7460 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7461 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7462 esac
7463 } # func_stripname_cnf
7464 ])# _LT_FUNC_STRIPNAME_CNF
7465
7466
7467 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7468 # ---------------------------------
7469 # Figure out "hidden" library dependencies from verbose
7470 # compiler output when linking a shared library.
7471 # Parse the compiler output and extract the necessary
7472 # objects, libraries and library flags.
7473 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7474 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7475 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7476 # Dependencies to place before and after the object being linked:
7477 _LT_TAGVAR(predep_objects, $1)=
7478 _LT_TAGVAR(postdep_objects, $1)=
7479 _LT_TAGVAR(predeps, $1)=
7480 _LT_TAGVAR(postdeps, $1)=
7481 _LT_TAGVAR(compiler_lib_search_path, $1)=
7482
7483 dnl we can't use the lt_simple_compile_test_code here,
7484 dnl because it contains code intended for an executable,
7485 dnl not a library. It's possible we should let each
7486 dnl tag define a new lt_????_link_test_code variable,
7487 dnl but it's only used here...
7488 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7489 int a;
7490 void foo (void) { a = 0; }
7491 _LT_EOF
7492 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7493 class Foo
7494 {
7495 public:
7496 Foo (void) { a = 0; }
7497 private:
7498 int a;
7499 };
7500 _LT_EOF
7501 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7502 subroutine foo
7503 implicit none
7504 integer*4 a
7505 a=0
7506 return
7507 end
7508 _LT_EOF
7509 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7510 subroutine foo
7511 implicit none
7512 integer a
7513 a=0
7514 return
7515 end
7516 _LT_EOF
7517 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7518 public class foo {
7519 private int a;
7520 public void bar (void) {
7521 a = 0;
7522 }
7523 };
7524 _LT_EOF
7525 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7526 package foo
7527 func foo() {
7528 }
7529 _LT_EOF
7530 ])
7531
7532 _lt_libdeps_save_CFLAGS=$CFLAGS
7533 case "$CC $CFLAGS " in #(
7534 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7535 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7536 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7537 esac
7538
7539 dnl Parse the compiler output and extract the necessary
7540 dnl objects, libraries and library flags.
7541 if AC_TRY_EVAL(ac_compile); then
7542 # Parse the compiler output and extract the necessary
7543 # objects, libraries and library flags.
7544
7545 # Sentinel used to keep track of whether or not we are before
7546 # the conftest object file.
7547 pre_test_object_deps_done=no
7548
7549 for p in `eval "$output_verbose_link_cmd"`; do
7550 case $prev$p in
7551
7552 -L* | -R* | -l*)
7553 # Some compilers place space between "-{L,R}" and the path.
7554 # Remove the space.
7555 if test x-L = "$p" ||
7556 test x-R = "$p"; then
7557 prev=$p
7558 continue
7559 fi
7560
7561 # Expand the sysroot to ease extracting the directories later.
7562 if test -z "$prev"; then
7563 case $p in
7564 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7565 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7566 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7567 esac
7568 fi
7569 case $p in
7570 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7571 esac
7572 if test no = "$pre_test_object_deps_done"; then
7573 case $prev in
7574 -L | -R)
7575 # Internal compiler library paths should come after those
7576 # provided the user. The postdeps already come after the
7577 # user supplied libs so there is no need to process them.
7578 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7579 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7580 else
7581 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7582 fi
7583 ;;
7584 # The "-l" case would never come before the object being
7585 # linked, so don't bother handling this case.
7586 esac
7587 else
7588 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7589 _LT_TAGVAR(postdeps, $1)=$prev$p
7590 else
7591 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7592 fi
7593 fi
7594 prev=
7595 ;;
7596
7597 *.lto.$objext) ;; # Ignore GCC LTO objects
7598 *.$objext)
7599 # This assumes that the test object file only shows up
7600 # once in the compiler output.
7601 if test "$p" = "conftest.$objext"; then
7602 pre_test_object_deps_done=yes
7603 continue
7604 fi
7605
7606 if test no = "$pre_test_object_deps_done"; then
7607 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7608 _LT_TAGVAR(predep_objects, $1)=$p
7609 else
7610 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7611 fi
7612 else
7613 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7614 _LT_TAGVAR(postdep_objects, $1)=$p
7615 else
7616 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7617 fi
7618 fi
7619 ;;
7620
7621 *) ;; # Ignore the rest.
7622
7623 esac
7624 done
7625
7626 # Clean up.
7627 rm -f a.out a.exe
7628 else
7629 echo "libtool.m4: error: problem compiling $1 test program"
7630 fi
7631
7632 $RM -f confest.$objext
7633 CFLAGS=$_lt_libdeps_save_CFLAGS
7634
7635 # PORTME: override above test on systems where it is broken
7636 m4_if([$1], [CXX],
7637 [case $host_os in
7638 interix[[3-9]]*)
7639 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7640 # hack all around it, let's just trust "g++" to DTRT.
7641 _LT_TAGVAR(predep_objects,$1)=
7642 _LT_TAGVAR(postdep_objects,$1)=
7643 _LT_TAGVAR(postdeps,$1)=
7644 ;;
7645 esac
7646 ])
7647
7648 case " $_LT_TAGVAR(postdeps, $1) " in
7649 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7650 esac
7651 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7652 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7653 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7654 fi
7655 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7656 [The directories searched by this compiler when creating a shared library])
7657 _LT_TAGDECL([], [predep_objects], [1],
7658 [Dependencies to place before and after the objects being linked to
7659 create a shared library])
7660 _LT_TAGDECL([], [postdep_objects], [1])
7661 _LT_TAGDECL([], [predeps], [1])
7662 _LT_TAGDECL([], [postdeps], [1])
7663 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7664 [The library search path used internally by the compiler when linking
7665 a shared library])
7666 ])# _LT_SYS_HIDDEN_LIBDEPS
7667
7668
7669 # _LT_LANG_F77_CONFIG([TAG])
7670 # --------------------------
7671 # Ensure that the configuration variables for a Fortran 77 compiler are
7672 # suitably defined. These variables are subsequently used by _LT_CONFIG
7673 # to write the compiler configuration to 'libtool'.
7674 m4_defun([_LT_LANG_F77_CONFIG],
7675 [AC_LANG_PUSH(Fortran 77)
7676 if test -z "$F77" || test no = "$F77"; then
7677 _lt_disable_F77=yes
7678 fi
7679
7680 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7681 _LT_TAGVAR(allow_undefined_flag, $1)=
7682 _LT_TAGVAR(always_export_symbols, $1)=no
7683 _LT_TAGVAR(archive_expsym_cmds, $1)=
7684 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7685 _LT_TAGVAR(hardcode_direct, $1)=no
7686 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7688 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7689 _LT_TAGVAR(hardcode_minus_L, $1)=no
7690 _LT_TAGVAR(hardcode_automatic, $1)=no
7691 _LT_TAGVAR(inherit_rpath, $1)=no
7692 _LT_TAGVAR(module_cmds, $1)=
7693 _LT_TAGVAR(module_expsym_cmds, $1)=
7694 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7695 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7696 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7697 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7698 _LT_TAGVAR(no_undefined_flag, $1)=
7699 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7700 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7701
7702 # Source file extension for f77 test sources.
7703 ac_ext=f
7704
7705 # Object file extension for compiled f77 test sources.
7706 objext=o
7707 _LT_TAGVAR(objext, $1)=$objext
7708
7709 # No sense in running all these tests if we already determined that
7710 # the F77 compiler isn't working. Some variables (like enable_shared)
7711 # are currently assumed to apply to all compilers on this platform,
7712 # and will be corrupted by setting them based on a non-working compiler.
7713 if test yes != "$_lt_disable_F77"; then
7714 # Code to be used in simple compile tests
7715 lt_simple_compile_test_code="\
7716 subroutine t
7717 return
7718 end
7719 "
7720
7721 # Code to be used in simple link tests
7722 lt_simple_link_test_code="\
7723 program t
7724 end
7725 "
7726
7727 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7728 _LT_TAG_COMPILER
7729
7730 # save warnings/boilerplate of simple test code
7731 _LT_COMPILER_BOILERPLATE
7732 _LT_LINKER_BOILERPLATE
7733
7734 # Allow CC to be a program name with arguments.
7735 lt_save_CC=$CC
7736 lt_save_GCC=$GCC
7737 lt_save_CFLAGS=$CFLAGS
7738 CC=${F77-"f77"}
7739 CFLAGS=$FFLAGS
7740 compiler=$CC
7741 _LT_TAGVAR(compiler, $1)=$CC
7742 _LT_CC_BASENAME([$compiler])
7743 GCC=$G77
7744 if test -n "$compiler"; then
7745 AC_MSG_CHECKING([if libtool supports shared libraries])
7746 AC_MSG_RESULT([$can_build_shared])
7747
7748 AC_MSG_CHECKING([whether to build shared libraries])
7749 test no = "$can_build_shared" && enable_shared=no
7750
7751 # On AIX, shared libraries and static libraries use the same namespace, and
7752 # are all built from PIC.
7753 case $host_os in
7754 aix3*)
7755 test yes = "$enable_shared" && enable_static=no
7756 if test -n "$RANLIB"; then
7757 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7758 postinstall_cmds='$RANLIB $lib'
7759 fi
7760 ;;
7761 aix[[4-9]]*)
7762 if test ia64 != "$host_cpu"; then
7763 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7764 yes,aix,yes) ;; # shared object as lib.so file only
7765 yes,svr4,*) ;; # shared object as lib.so archive member only
7766 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7767 esac
7768 fi
7769 ;;
7770 esac
7771 AC_MSG_RESULT([$enable_shared])
7772
7773 AC_MSG_CHECKING([whether to build static libraries])
7774 # Make sure either enable_shared or enable_static is yes.
7775 test yes = "$enable_shared" || enable_static=yes
7776 AC_MSG_RESULT([$enable_static])
7777
7778 _LT_TAGVAR(GCC, $1)=$G77
7779 _LT_TAGVAR(LD, $1)=$LD
7780
7781 ## CAVEAT EMPTOR:
7782 ## There is no encapsulation within the following macros, do not change
7783 ## the running order or otherwise move them around unless you know exactly
7784 ## what you are doing...
7785 _LT_COMPILER_PIC($1)
7786 _LT_COMPILER_C_O($1)
7787 _LT_COMPILER_FILE_LOCKS($1)
7788 _LT_LINKER_SHLIBS($1)
7789 _LT_SYS_DYNAMIC_LINKER($1)
7790 _LT_LINKER_HARDCODE_LIBPATH($1)
7791
7792 _LT_CONFIG($1)
7793 fi # test -n "$compiler"
7794
7795 GCC=$lt_save_GCC
7796 CC=$lt_save_CC
7797 CFLAGS=$lt_save_CFLAGS
7798 fi # test yes != "$_lt_disable_F77"
7799
7800 AC_LANG_POP
7801 ])# _LT_LANG_F77_CONFIG
7802
7803
7804 # _LT_LANG_FC_CONFIG([TAG])
7805 # -------------------------
7806 # Ensure that the configuration variables for a Fortran compiler are
7807 # suitably defined. These variables are subsequently used by _LT_CONFIG
7808 # to write the compiler configuration to 'libtool'.
7809 m4_defun([_LT_LANG_FC_CONFIG],
7810 [AC_LANG_PUSH(Fortran)
7811
7812 if test -z "$FC" || test no = "$FC"; then
7813 _lt_disable_FC=yes
7814 fi
7815
7816 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7817 _LT_TAGVAR(allow_undefined_flag, $1)=
7818 _LT_TAGVAR(always_export_symbols, $1)=no
7819 _LT_TAGVAR(archive_expsym_cmds, $1)=
7820 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7821 _LT_TAGVAR(hardcode_direct, $1)=no
7822 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7823 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7824 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7825 _LT_TAGVAR(hardcode_minus_L, $1)=no
7826 _LT_TAGVAR(hardcode_automatic, $1)=no
7827 _LT_TAGVAR(inherit_rpath, $1)=no
7828 _LT_TAGVAR(module_cmds, $1)=
7829 _LT_TAGVAR(module_expsym_cmds, $1)=
7830 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7831 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7832 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7833 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7834 _LT_TAGVAR(no_undefined_flag, $1)=
7835 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7836 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7837
7838 # Source file extension for fc test sources.
7839 ac_ext=${ac_fc_srcext-f}
7840
7841 # Object file extension for compiled fc test sources.
7842 objext=o
7843 _LT_TAGVAR(objext, $1)=$objext
7844
7845 # No sense in running all these tests if we already determined that
7846 # the FC compiler isn't working. Some variables (like enable_shared)
7847 # are currently assumed to apply to all compilers on this platform,
7848 # and will be corrupted by setting them based on a non-working compiler.
7849 if test yes != "$_lt_disable_FC"; then
7850 # Code to be used in simple compile tests
7851 lt_simple_compile_test_code="\
7852 subroutine t
7853 return
7854 end
7855 "
7856
7857 # Code to be used in simple link tests
7858 lt_simple_link_test_code="\
7859 program t
7860 end
7861 "
7862
7863 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7864 _LT_TAG_COMPILER
7865
7866 # save warnings/boilerplate of simple test code
7867 _LT_COMPILER_BOILERPLATE
7868 _LT_LINKER_BOILERPLATE
7869
7870 # Allow CC to be a program name with arguments.
7871 lt_save_CC=$CC
7872 lt_save_GCC=$GCC
7873 lt_save_CFLAGS=$CFLAGS
7874 CC=${FC-"f95"}
7875 CFLAGS=$FCFLAGS
7876 compiler=$CC
7877 GCC=$ac_cv_fc_compiler_gnu
7878
7879 _LT_TAGVAR(compiler, $1)=$CC
7880 _LT_CC_BASENAME([$compiler])
7881
7882 if test -n "$compiler"; then
7883 AC_MSG_CHECKING([if libtool supports shared libraries])
7884 AC_MSG_RESULT([$can_build_shared])
7885
7886 AC_MSG_CHECKING([whether to build shared libraries])
7887 test no = "$can_build_shared" && enable_shared=no
7888
7889 # On AIX, shared libraries and static libraries use the same namespace, and
7890 # are all built from PIC.
7891 case $host_os in
7892 aix3*)
7893 test yes = "$enable_shared" && enable_static=no
7894 if test -n "$RANLIB"; then
7895 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7896 postinstall_cmds='$RANLIB $lib'
7897 fi
7898 ;;
7899 aix[[4-9]]*)
7900 if test ia64 != "$host_cpu"; then
7901 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7902 yes,aix,yes) ;; # shared object as lib.so file only
7903 yes,svr4,*) ;; # shared object as lib.so archive member only
7904 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7905 esac
7906 fi
7907 ;;
7908 esac
7909 AC_MSG_RESULT([$enable_shared])
7910
7911 AC_MSG_CHECKING([whether to build static libraries])
7912 # Make sure either enable_shared or enable_static is yes.
7913 test yes = "$enable_shared" || enable_static=yes
7914 AC_MSG_RESULT([$enable_static])
7915
7916 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7917 _LT_TAGVAR(LD, $1)=$LD
7918
7919 ## CAVEAT EMPTOR:
7920 ## There is no encapsulation within the following macros, do not change
7921 ## the running order or otherwise move them around unless you know exactly
7922 ## what you are doing...
7923 _LT_SYS_HIDDEN_LIBDEPS($1)
7924 _LT_COMPILER_PIC($1)
7925 _LT_COMPILER_C_O($1)
7926 _LT_COMPILER_FILE_LOCKS($1)
7927 _LT_LINKER_SHLIBS($1)
7928 _LT_SYS_DYNAMIC_LINKER($1)
7929 _LT_LINKER_HARDCODE_LIBPATH($1)
7930
7931 _LT_CONFIG($1)
7932 fi # test -n "$compiler"
7933
7934 GCC=$lt_save_GCC
7935 CC=$lt_save_CC
7936 CFLAGS=$lt_save_CFLAGS
7937 fi # test yes != "$_lt_disable_FC"
7938
7939 AC_LANG_POP
7940 ])# _LT_LANG_FC_CONFIG
7941
7942
7943 # _LT_LANG_GCJ_CONFIG([TAG])
7944 # --------------------------
7945 # Ensure that the configuration variables for the GNU Java Compiler compiler
7946 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7947 # to write the compiler configuration to 'libtool'.
7948 m4_defun([_LT_LANG_GCJ_CONFIG],
7949 [AC_REQUIRE([LT_PROG_GCJ])dnl
7950 AC_LANG_SAVE
7951
7952 # Source file extension for Java test sources.
7953 ac_ext=java
7954
7955 # Object file extension for compiled Java test sources.
7956 objext=o
7957 _LT_TAGVAR(objext, $1)=$objext
7958
7959 # Code to be used in simple compile tests
7960 lt_simple_compile_test_code="class foo {}"
7961
7962 # Code to be used in simple link tests
7963 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7964
7965 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7966 _LT_TAG_COMPILER
7967
7968 # save warnings/boilerplate of simple test code
7969 _LT_COMPILER_BOILERPLATE
7970 _LT_LINKER_BOILERPLATE
7971
7972 # Allow CC to be a program name with arguments.
7973 lt_save_CC=$CC
7974 lt_save_CFLAGS=$CFLAGS
7975 lt_save_GCC=$GCC
7976 GCC=yes
7977 CC=${GCJ-"gcj"}
7978 CFLAGS=$GCJFLAGS
7979 compiler=$CC
7980 _LT_TAGVAR(compiler, $1)=$CC
7981 _LT_TAGVAR(LD, $1)=$LD
7982 _LT_CC_BASENAME([$compiler])
7983
7984 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7985 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7986
7987 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7988 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7989 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7990
7991 ## CAVEAT EMPTOR:
7992 ## There is no encapsulation within the following macros, do not change
7993 ## the running order or otherwise move them around unless you know exactly
7994 ## what you are doing...
7995 if test -n "$compiler"; then
7996 _LT_COMPILER_NO_RTTI($1)
7997 _LT_COMPILER_PIC($1)
7998 _LT_COMPILER_C_O($1)
7999 _LT_COMPILER_FILE_LOCKS($1)
8000 _LT_LINKER_SHLIBS($1)
8001 _LT_LINKER_HARDCODE_LIBPATH($1)
8002
8003 _LT_CONFIG($1)
8004 fi
8005
8006 AC_LANG_RESTORE
8007
8008 GCC=$lt_save_GCC
8009 CC=$lt_save_CC
8010 CFLAGS=$lt_save_CFLAGS
8011 ])# _LT_LANG_GCJ_CONFIG
8012
8013
8014 # _LT_LANG_GO_CONFIG([TAG])
8015 # --------------------------
8016 # Ensure that the configuration variables for the GNU Go compiler
8017 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8018 # to write the compiler configuration to 'libtool'.
8019 m4_defun([_LT_LANG_GO_CONFIG],
8020 [AC_REQUIRE([LT_PROG_GO])dnl
8021 AC_LANG_SAVE
8022
8023 # Source file extension for Go test sources.
8024 ac_ext=go
8025
8026 # Object file extension for compiled Go test sources.
8027 objext=o
8028 _LT_TAGVAR(objext, $1)=$objext
8029
8030 # Code to be used in simple compile tests
8031 lt_simple_compile_test_code="package main; func main() { }"
8032
8033 # Code to be used in simple link tests
8034 lt_simple_link_test_code='package main; func main() { }'
8035
8036 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8037 _LT_TAG_COMPILER
8038
8039 # save warnings/boilerplate of simple test code
8040 _LT_COMPILER_BOILERPLATE
8041 _LT_LINKER_BOILERPLATE
8042
8043 # Allow CC to be a program name with arguments.
8044 lt_save_CC=$CC
8045 lt_save_CFLAGS=$CFLAGS
8046 lt_save_GCC=$GCC
8047 GCC=yes
8048 CC=${GOC-"gccgo"}
8049 CFLAGS=$GOFLAGS
8050 compiler=$CC
8051 _LT_TAGVAR(compiler, $1)=$CC
8052 _LT_TAGVAR(LD, $1)=$LD
8053 _LT_CC_BASENAME([$compiler])
8054
8055 # Go did not exist at the time GCC didn't implicitly link libc in.
8056 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8057
8058 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8059 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8060 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8061
8062 ## CAVEAT EMPTOR:
8063 ## There is no encapsulation within the following macros, do not change
8064 ## the running order or otherwise move them around unless you know exactly
8065 ## what you are doing...
8066 if test -n "$compiler"; then
8067 _LT_COMPILER_NO_RTTI($1)
8068 _LT_COMPILER_PIC($1)
8069 _LT_COMPILER_C_O($1)
8070 _LT_COMPILER_FILE_LOCKS($1)
8071 _LT_LINKER_SHLIBS($1)
8072 _LT_LINKER_HARDCODE_LIBPATH($1)
8073
8074 _LT_CONFIG($1)
8075 fi
8076
8077 AC_LANG_RESTORE
8078
8079 GCC=$lt_save_GCC
8080 CC=$lt_save_CC
8081 CFLAGS=$lt_save_CFLAGS
8082 ])# _LT_LANG_GO_CONFIG
8083
8084
8085 # _LT_LANG_RC_CONFIG([TAG])
8086 # -------------------------
8087 # Ensure that the configuration variables for the Windows resource compiler
8088 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8089 # to write the compiler configuration to 'libtool'.
8090 m4_defun([_LT_LANG_RC_CONFIG],
8091 [AC_REQUIRE([LT_PROG_RC])dnl
8092 AC_LANG_SAVE
8093
8094 # Source file extension for RC test sources.
8095 ac_ext=rc
8096
8097 # Object file extension for compiled RC test sources.
8098 objext=o
8099 _LT_TAGVAR(objext, $1)=$objext
8100
8101 # Code to be used in simple compile tests
8102 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8103
8104 # Code to be used in simple link tests
8105 lt_simple_link_test_code=$lt_simple_compile_test_code
8106
8107 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8108 _LT_TAG_COMPILER
8109
8110 # save warnings/boilerplate of simple test code
8111 _LT_COMPILER_BOILERPLATE
8112 _LT_LINKER_BOILERPLATE
8113
8114 # Allow CC to be a program name with arguments.
8115 lt_save_CC=$CC
8116 lt_save_CFLAGS=$CFLAGS
8117 lt_save_GCC=$GCC
8118 GCC=
8119 CC=${RC-"windres"}
8120 CFLAGS=
8121 compiler=$CC
8122 _LT_TAGVAR(compiler, $1)=$CC
8123 _LT_CC_BASENAME([$compiler])
8124 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8125
8126 if test -n "$compiler"; then
8127 :
8128 _LT_CONFIG($1)
8129 fi
8130
8131 GCC=$lt_save_GCC
8132 AC_LANG_RESTORE
8133 CC=$lt_save_CC
8134 CFLAGS=$lt_save_CFLAGS
8135 ])# _LT_LANG_RC_CONFIG
8136
8137
8138 # LT_PROG_GCJ
8139 # -----------
8140 AC_DEFUN([LT_PROG_GCJ],
8141 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8142 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8143 [AC_CHECK_TOOL(GCJ, gcj,)
8144 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8145 AC_SUBST(GCJFLAGS)])])[]dnl
8146 ])
8147
8148 # Old name:
8149 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8150 dnl aclocal-1.4 backwards compatibility:
8151 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8152
8153
8154 # LT_PROG_GO
8155 # ----------
8156 AC_DEFUN([LT_PROG_GO],
8157 [AC_CHECK_TOOL(GOC, gccgo,)
8158 ])
8159
8160
8161 # LT_PROG_RC
8162 # ----------
8163 AC_DEFUN([LT_PROG_RC],
8164 [AC_CHECK_TOOL(RC, windres,)
8165 ])
8166
8167 # Old name:
8168 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8169 dnl aclocal-1.4 backwards compatibility:
8170 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8171
8172
8173 # _LT_DECL_EGREP
8174 # --------------
8175 # If we don't have a new enough Autoconf to choose the best grep
8176 # available, choose the one first in the user's PATH.
8177 m4_defun([_LT_DECL_EGREP],
8178 [AC_REQUIRE([AC_PROG_EGREP])dnl
8179 AC_REQUIRE([AC_PROG_FGREP])dnl
8180 test -z "$GREP" && GREP=grep
8181 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8182 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8183 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8184 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8185 AC_SUBST([GREP])
8186 ])
8187
8188
8189 # _LT_DECL_OBJDUMP
8190 # --------------
8191 # If we don't have a new enough Autoconf to choose the best objdump
8192 # available, choose the one first in the user's PATH.
8193 m4_defun([_LT_DECL_OBJDUMP],
8194 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8195 test -z "$OBJDUMP" && OBJDUMP=objdump
8196 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8197 AC_SUBST([OBJDUMP])
8198 ])
8199
8200 # _LT_DECL_DLLTOOL
8201 # ----------------
8202 # Ensure DLLTOOL variable is set.
8203 m4_defun([_LT_DECL_DLLTOOL],
8204 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8205 test -z "$DLLTOOL" && DLLTOOL=dlltool
8206 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8207 AC_SUBST([DLLTOOL])
8208 ])
8209
8210 # _LT_DECL_SED
8211 # ------------
8212 # Check for a fully-functional sed program, that truncates
8213 # as few characters as possible. Prefer GNU sed if found.
8214 m4_defun([_LT_DECL_SED],
8215 [AC_PROG_SED
8216 test -z "$SED" && SED=sed
8217 Xsed="$SED -e 1s/^X//"
8218 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8219 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8220 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8221 ])# _LT_DECL_SED
8222
8223 m4_ifndef([AC_PROG_SED], [
8224 ############################################################
8225 # NOTE: This macro has been submitted for inclusion into #
8226 # GNU Autoconf as AC_PROG_SED. When it is available in #
8227 # a released version of Autoconf we should remove this #
8228 # macro and use it instead. #
8229 ############################################################
8230
8231 m4_defun([AC_PROG_SED],
8232 [AC_MSG_CHECKING([for a sed that does not truncate output])
8233 AC_CACHE_VAL(lt_cv_path_SED,
8234 [# Loop through the user's path and test for sed and gsed.
8235 # Then use that list of sed's as ones to test for truncation.
8236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237 for as_dir in $PATH
8238 do
8239 IFS=$as_save_IFS
8240 test -z "$as_dir" && as_dir=.
8241 for lt_ac_prog in sed gsed; do
8242 for ac_exec_ext in '' $ac_executable_extensions; do
8243 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8244 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8245 fi
8246 done
8247 done
8248 done
8249 IFS=$as_save_IFS
8250 lt_ac_max=0
8251 lt_ac_count=0
8252 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8253 # along with /bin/sed that truncates output.
8254 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8255 test ! -f "$lt_ac_sed" && continue
8256 cat /dev/null > conftest.in
8257 lt_ac_count=0
8258 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8259 # Check for GNU sed and select it if it is found.
8260 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8261 lt_cv_path_SED=$lt_ac_sed
8262 break
8263 fi
8264 while true; do
8265 cat conftest.in conftest.in >conftest.tmp
8266 mv conftest.tmp conftest.in
8267 cp conftest.in conftest.nl
8268 echo >>conftest.nl
8269 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8270 cmp -s conftest.out conftest.nl || break
8271 # 10000 chars as input seems more than enough
8272 test 10 -lt "$lt_ac_count" && break
8273 lt_ac_count=`expr $lt_ac_count + 1`
8274 if test "$lt_ac_count" -gt "$lt_ac_max"; then
8275 lt_ac_max=$lt_ac_count
8276 lt_cv_path_SED=$lt_ac_sed
8277 fi
8278 done
8279 done
8280 ])
8281 SED=$lt_cv_path_SED
8282 AC_SUBST([SED])
8283 AC_MSG_RESULT([$SED])
8284 ])#AC_PROG_SED
8285 ])#m4_ifndef
8286
8287 # Old name:
8288 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8289 dnl aclocal-1.4 backwards compatibility:
8290 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8291
8292
8293 # _LT_CHECK_SHELL_FEATURES
8294 # ------------------------
8295 # Find out whether the shell is Bourne or XSI compatible,
8296 # or has some other useful features.
8297 m4_defun([_LT_CHECK_SHELL_FEATURES],
8298 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8299 lt_unset=unset
8300 else
8301 lt_unset=false
8302 fi
8303 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8304
8305 # test EBCDIC or ASCII
8306 case `echo X|tr X '\101'` in
8307 A) # ASCII based system
8308 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8309 lt_SP2NL='tr \040 \012'
8310 lt_NL2SP='tr \015\012 \040\040'
8311 ;;
8312 *) # EBCDIC based system
8313 lt_SP2NL='tr \100 \n'
8314 lt_NL2SP='tr \r\n \100\100'
8315 ;;
8316 esac
8317 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8318 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8319 ])# _LT_CHECK_SHELL_FEATURES
8320
8321
8322 # _LT_PATH_CONVERSION_FUNCTIONS
8323 # -----------------------------
8324 # Determine what file name conversion functions should be used by
8325 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8326 # for certain cross-compile configurations and native mingw.
8327 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8328 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8329 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8330 AC_MSG_CHECKING([how to convert $build file names to $host format])
8331 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8332 [case $host in
8333 *-*-mingw* )
8334 case $build in
8335 *-*-mingw* ) # actually msys
8336 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8337 ;;
8338 *-*-cygwin* )
8339 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8340 ;;
8341 * ) # otherwise, assume *nix
8342 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8343 ;;
8344 esac
8345 ;;
8346 *-*-cygwin* )
8347 case $build in
8348 *-*-mingw* ) # actually msys
8349 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8350 ;;
8351 *-*-cygwin* )
8352 lt_cv_to_host_file_cmd=func_convert_file_noop
8353 ;;
8354 * ) # otherwise, assume *nix
8355 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8356 ;;
8357 esac
8358 ;;
8359 * ) # unhandled hosts (and "normal" native builds)
8360 lt_cv_to_host_file_cmd=func_convert_file_noop
8361 ;;
8362 esac
8363 ])
8364 to_host_file_cmd=$lt_cv_to_host_file_cmd
8365 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8366 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8367 [0], [convert $build file names to $host format])dnl
8368
8369 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8370 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8371 [#assume ordinary cross tools, or native build.
8372 lt_cv_to_tool_file_cmd=func_convert_file_noop
8373 case $host in
8374 *-*-mingw* )
8375 case $build in
8376 *-*-mingw* ) # actually msys
8377 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8378 ;;
8379 esac
8380 ;;
8381 esac
8382 ])
8383 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8384 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8385 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8386 [0], [convert $build files to toolchain format])dnl
8387 ])# _LT_PATH_CONVERSION_FUNCTIONS
0 # Helper functions for option handling. -*- Autoconf -*-
1 #
2 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
3 # Foundation, Inc.
4 # Written by Gary V. Vaughan, 2004
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 8 ltoptions.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
15
16 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17 # ------------------------------------------
18 m4_define([_LT_MANGLE_OPTION],
19 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
21
22 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23 # ---------------------------------------
24 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
26 # saved as a flag.
27 m4_define([_LT_SET_OPTION],
28 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option '$2'])])[]dnl
32 ])
33
34
35 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36 # ------------------------------------------------------------
37 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38 m4_define([_LT_IF_OPTION],
39 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
41
42 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43 # -------------------------------------------------------
44 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45 # are set.
46 m4_define([_LT_UNLESS_OPTIONS],
47 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49 [m4_define([$0_found])])])[]dnl
50 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51 ])[]dnl
52 ])
53
54
55 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56 # ----------------------------------------
57 # OPTION-LIST is a space-separated list of Libtool options associated
58 # with MACRO-NAME. If any OPTION has a matching handler declared with
59 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60 # the unknown option and exit.
61 m4_defun([_LT_SET_OPTIONS],
62 [# Set options
63 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64 [_LT_SET_OPTION([$1], _LT_Option)])
65
66 m4_if([$1],[LT_INIT],[
67 dnl
68 dnl Simply set some default values (i.e off) if boolean options were not
69 dnl specified:
70 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71 ])
72 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73 ])
74 dnl
75 dnl If no reference was made to various pairs of opposing options, then
76 dnl we run the default mode handler for the pair. For example, if neither
77 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
78 dnl archives by default:
79 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
84 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
85 [_LT_WITH_AIX_SONAME([aix])])
86 ])
87 ])# _LT_SET_OPTIONS
88
89
90 ## --------------------------------- ##
91 ## Macros to handle LT_INIT options. ##
92 ## --------------------------------- ##
93
94 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
95 # -----------------------------------------
96 m4_define([_LT_MANGLE_DEFUN],
97 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
98
99
100 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
101 # -----------------------------------------------
102 m4_define([LT_OPTION_DEFINE],
103 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
104 ])# LT_OPTION_DEFINE
105
106
107 # dlopen
108 # ------
109 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
110 ])
111
112 AU_DEFUN([AC_LIBTOOL_DLOPEN],
113 [_LT_SET_OPTION([LT_INIT], [dlopen])
114 AC_DIAGNOSE([obsolete],
115 [$0: Remove this warning and the call to _LT_SET_OPTION when you
116 put the 'dlopen' option into LT_INIT's first parameter.])
117 ])
118
119 dnl aclocal-1.4 backwards compatibility:
120 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
121
122
123 # win32-dll
124 # ---------
125 # Declare package support for building win32 dll's.
126 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
127 [enable_win32_dll=yes
128
129 case $host in
130 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
131 AC_CHECK_TOOL(AS, as, false)
132 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
133 AC_CHECK_TOOL(OBJDUMP, objdump, false)
134 ;;
135 esac
136
137 test -z "$AS" && AS=as
138 _LT_DECL([], [AS], [1], [Assembler program])dnl
139
140 test -z "$DLLTOOL" && DLLTOOL=dlltool
141 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
142
143 test -z "$OBJDUMP" && OBJDUMP=objdump
144 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
145 ])# win32-dll
146
147 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
148 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
149 _LT_SET_OPTION([LT_INIT], [win32-dll])
150 AC_DIAGNOSE([obsolete],
151 [$0: Remove this warning and the call to _LT_SET_OPTION when you
152 put the 'win32-dll' option into LT_INIT's first parameter.])
153 ])
154
155 dnl aclocal-1.4 backwards compatibility:
156 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
157
158
159 # _LT_ENABLE_SHARED([DEFAULT])
160 # ----------------------------
161 # implement the --enable-shared flag, and supports the 'shared' and
162 # 'disable-shared' LT_INIT options.
163 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
164 m4_define([_LT_ENABLE_SHARED],
165 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
166 AC_ARG_ENABLE([shared],
167 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
168 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
169 [p=${PACKAGE-default}
170 case $enableval in
171 yes) enable_shared=yes ;;
172 no) enable_shared=no ;;
173 *)
174 enable_shared=no
175 # Look at the argument we got. We use all the common list separators.
176 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
177 for pkg in $enableval; do
178 IFS=$lt_save_ifs
179 if test "X$pkg" = "X$p"; then
180 enable_shared=yes
181 fi
182 done
183 IFS=$lt_save_ifs
184 ;;
185 esac],
186 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
187
188 _LT_DECL([build_libtool_libs], [enable_shared], [0],
189 [Whether or not to build shared libraries])
190 ])# _LT_ENABLE_SHARED
191
192 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
193 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
194
195 # Old names:
196 AC_DEFUN([AC_ENABLE_SHARED],
197 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
198 ])
199
200 AC_DEFUN([AC_DISABLE_SHARED],
201 [_LT_SET_OPTION([LT_INIT], [disable-shared])
202 ])
203
204 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
205 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
206
207 dnl aclocal-1.4 backwards compatibility:
208 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
209 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
210
211
212
213 # _LT_ENABLE_STATIC([DEFAULT])
214 # ----------------------------
215 # implement the --enable-static flag, and support the 'static' and
216 # 'disable-static' LT_INIT options.
217 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
218 m4_define([_LT_ENABLE_STATIC],
219 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
220 AC_ARG_ENABLE([static],
221 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
222 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
223 [p=${PACKAGE-default}
224 case $enableval in
225 yes) enable_static=yes ;;
226 no) enable_static=no ;;
227 *)
228 enable_static=no
229 # Look at the argument we got. We use all the common list separators.
230 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
231 for pkg in $enableval; do
232 IFS=$lt_save_ifs
233 if test "X$pkg" = "X$p"; then
234 enable_static=yes
235 fi
236 done
237 IFS=$lt_save_ifs
238 ;;
239 esac],
240 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
241
242 _LT_DECL([build_old_libs], [enable_static], [0],
243 [Whether or not to build static libraries])
244 ])# _LT_ENABLE_STATIC
245
246 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
247 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
248
249 # Old names:
250 AC_DEFUN([AC_ENABLE_STATIC],
251 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
252 ])
253
254 AC_DEFUN([AC_DISABLE_STATIC],
255 [_LT_SET_OPTION([LT_INIT], [disable-static])
256 ])
257
258 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
259 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
260
261 dnl aclocal-1.4 backwards compatibility:
262 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
263 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
264
265
266
267 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
268 # ----------------------------------
269 # implement the --enable-fast-install flag, and support the 'fast-install'
270 # and 'disable-fast-install' LT_INIT options.
271 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
272 m4_define([_LT_ENABLE_FAST_INSTALL],
273 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
274 AC_ARG_ENABLE([fast-install],
275 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
276 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
277 [p=${PACKAGE-default}
278 case $enableval in
279 yes) enable_fast_install=yes ;;
280 no) enable_fast_install=no ;;
281 *)
282 enable_fast_install=no
283 # Look at the argument we got. We use all the common list separators.
284 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
285 for pkg in $enableval; do
286 IFS=$lt_save_ifs
287 if test "X$pkg" = "X$p"; then
288 enable_fast_install=yes
289 fi
290 done
291 IFS=$lt_save_ifs
292 ;;
293 esac],
294 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
295
296 _LT_DECL([fast_install], [enable_fast_install], [0],
297 [Whether or not to optimize for fast installation])dnl
298 ])# _LT_ENABLE_FAST_INSTALL
299
300 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
301 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
302
303 # Old names:
304 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
305 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
306 AC_DIAGNOSE([obsolete],
307 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
308 the 'fast-install' option into LT_INIT's first parameter.])
309 ])
310
311 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
312 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
313 AC_DIAGNOSE([obsolete],
314 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
315 the 'disable-fast-install' option into LT_INIT's first parameter.])
316 ])
317
318 dnl aclocal-1.4 backwards compatibility:
319 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
320 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
321
322
323 # _LT_WITH_AIX_SONAME([DEFAULT])
324 # ----------------------------------
325 # implement the --with-aix-soname flag, and support the `aix-soname=aix'
326 # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
327 # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
328 m4_define([_LT_WITH_AIX_SONAME],
329 [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
330 shared_archive_member_spec=
331 case $host,$enable_shared in
332 power*-*-aix[[5-9]]*,yes)
333 AC_MSG_CHECKING([which variant of shared library versioning to provide])
334 AC_ARG_WITH([aix-soname],
335 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
336 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
337 [case $withval in
338 aix|svr4|both)
339 ;;
340 *)
341 AC_MSG_ERROR([Unknown argument to --with-aix-soname])
342 ;;
343 esac
344 lt_cv_with_aix_soname=$with_aix_soname],
345 [AC_CACHE_VAL([lt_cv_with_aix_soname],
346 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
347 with_aix_soname=$lt_cv_with_aix_soname])
348 AC_MSG_RESULT([$with_aix_soname])
349 if test aix != "$with_aix_soname"; then
350 # For the AIX way of multilib, we name the shared archive member
351 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
352 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
353 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
354 # the AIX toolchain works better with OBJECT_MODE set (default 32).
355 if test 64 = "${OBJECT_MODE-32}"; then
356 shared_archive_member_spec=shr_64
357 else
358 shared_archive_member_spec=shr
359 fi
360 fi
361 ;;
362 *)
363 with_aix_soname=aix
364 ;;
365 esac
366
367 _LT_DECL([], [shared_archive_member_spec], [0],
368 [Shared archive member basename, for filename based shared library versioning on AIX])dnl
369 ])# _LT_WITH_AIX_SONAME
370
371 LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
372 LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
373 LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
374
375
376 # _LT_WITH_PIC([MODE])
377 # --------------------
378 # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
379 # LT_INIT options.
380 # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
381 m4_define([_LT_WITH_PIC],
382 [AC_ARG_WITH([pic],
383 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
384 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
385 [lt_p=${PACKAGE-default}
386 case $withval in
387 yes|no) pic_mode=$withval ;;
388 *)
389 pic_mode=default
390 # Look at the argument we got. We use all the common list separators.
391 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
392 for lt_pkg in $withval; do
393 IFS=$lt_save_ifs
394 if test "X$lt_pkg" = "X$lt_p"; then
395 pic_mode=yes
396 fi
397 done
398 IFS=$lt_save_ifs
399 ;;
400 esac],
401 [pic_mode=m4_default([$1], [default])])
402
403 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
404 ])# _LT_WITH_PIC
405
406 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
407 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
408
409 # Old name:
410 AU_DEFUN([AC_LIBTOOL_PICMODE],
411 [_LT_SET_OPTION([LT_INIT], [pic-only])
412 AC_DIAGNOSE([obsolete],
413 [$0: Remove this warning and the call to _LT_SET_OPTION when you
414 put the 'pic-only' option into LT_INIT's first parameter.])
415 ])
416
417 dnl aclocal-1.4 backwards compatibility:
418 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
419
420 ## ----------------- ##
421 ## LTDL_INIT Options ##
422 ## ----------------- ##
423
424 m4_define([_LTDL_MODE], [])
425 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
426 [m4_define([_LTDL_MODE], [nonrecursive])])
427 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
428 [m4_define([_LTDL_MODE], [recursive])])
429 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
430 [m4_define([_LTDL_MODE], [subproject])])
431
432 m4_define([_LTDL_TYPE], [])
433 LT_OPTION_DEFINE([LTDL_INIT], [installable],
434 [m4_define([_LTDL_TYPE], [installable])])
435 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
436 [m4_define([_LTDL_TYPE], [convenience])])
0 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
3 # Foundation, Inc.
4 # Written by Gary V. Vaughan, 2004
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 6 ltsugar.m4
11
12 # This is to help aclocal find these macros, as it can't see m4_define.
13 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
14
15
16 # lt_join(SEP, ARG1, [ARG2...])
17 # -----------------------------
18 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
19 # associated separator.
20 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
21 # versions in m4sugar had bugs.
22 m4_define([lt_join],
23 [m4_if([$#], [1], [],
24 [$#], [2], [[$2]],
25 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
26 m4_define([_lt_join],
27 [m4_if([$#$2], [2], [],
28 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
29
30
31 # lt_car(LIST)
32 # lt_cdr(LIST)
33 # ------------
34 # Manipulate m4 lists.
35 # These macros are necessary as long as will still need to support
36 # Autoconf-2.59, which quotes differently.
37 m4_define([lt_car], [[$1]])
38 m4_define([lt_cdr],
39 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
40 [$#], 1, [],
41 [m4_dquote(m4_shift($@))])])
42 m4_define([lt_unquote], $1)
43
44
45 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
46 # ------------------------------------------
47 # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
48 # Note that neither SEPARATOR nor STRING are expanded; they are appended
49 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
50 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
51 # than defined and empty).
52 #
53 # This macro is needed until we can rely on Autoconf 2.62, since earlier
54 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
55 m4_define([lt_append],
56 [m4_define([$1],
57 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
58
59
60
61 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
62 # ----------------------------------------------------------
63 # Produce a SEP delimited list of all paired combinations of elements of
64 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
65 # has the form PREFIXmINFIXSUFFIXn.
66 # Needed until we can rely on m4_combine added in Autoconf 2.62.
67 m4_define([lt_combine],
68 [m4_if(m4_eval([$# > 3]), [1],
69 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
70 [[m4_foreach([_Lt_prefix], [$2],
71 [m4_foreach([_Lt_suffix],
72 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
73 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
74
75
76 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
77 # -----------------------------------------------------------------------
78 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
79 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
80 m4_define([lt_if_append_uniq],
81 [m4_ifdef([$1],
82 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
83 [lt_append([$1], [$2], [$3])$4],
84 [$5])],
85 [lt_append([$1], [$2], [$3])$4])])
86
87
88 # lt_dict_add(DICT, KEY, VALUE)
89 # -----------------------------
90 m4_define([lt_dict_add],
91 [m4_define([$1($2)], [$3])])
92
93
94 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
95 # --------------------------------------------
96 m4_define([lt_dict_add_subkey],
97 [m4_define([$1($2:$3)], [$4])])
98
99
100 # lt_dict_fetch(DICT, KEY, [SUBKEY])
101 # ----------------------------------
102 m4_define([lt_dict_fetch],
103 [m4_ifval([$3],
104 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
105 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
106
107
108 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
109 # -----------------------------------------------------------------
110 m4_define([lt_if_dict_fetch],
111 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
112 [$5],
113 [$6])])
114
115
116 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
117 # --------------------------------------------------------------
118 m4_define([lt_dict_filter],
119 [m4_if([$5], [], [],
120 [lt_join(m4_quote(m4_default([$4], [[, ]])),
121 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
122 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
123 ])
0 # ltversion.m4 -- version numbers -*- Autoconf -*-
1 #
2 # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
3 # Written by Scott James Remnant, 2004
4 #
5 # This file is free software; the Free Software Foundation gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8
9 # @configure_input@
10
11 # serial 4179 ltversion.m4
12 # This file is part of GNU Libtool
13
14 m4_define([LT_PACKAGE_VERSION], [2.4.6])
15 m4_define([LT_PACKAGE_REVISION], [2.4.6])
16
17 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.6'
19 macro_revision='2.4.6'
20 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
21 _LT_DECL(, macro_revision, 0)
22 ])
0 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
1 #
2 # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
3 # Foundation, Inc.
4 # Written by Scott James Remnant, 2004.
5 #
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
9
10 # serial 5 lt~obsolete.m4
11
12 # These exist entirely to fool aclocal when bootstrapping libtool.
13 #
14 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
15 # which have later been changed to m4_define as they aren't part of the
16 # exported API, or moved to Autoconf or Automake where they belong.
17 #
18 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
19 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
20 # using a macro with the same name in our local m4/libtool.m4 it'll
21 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
22 # and doesn't know about Autoconf macros at all.)
23 #
24 # So we provide this file, which has a silly filename so it's always
25 # included after everything else. This provides aclocal with the
26 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
27 # because those macros already exist, or will be overwritten later.
28 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
29 #
30 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
31 # Yes, that means every name once taken will need to remain here until
32 # we give up compatibility with versions before 1.7, at which point
33 # we need to keep only those names which we still refer to.
34
35 # This is to help aclocal find these macros, as it can't see m4_define.
36 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
37
38 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
39 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
40 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
41 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
42 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
43 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
44 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
45 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
46 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
47 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
48 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
49 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
50 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
51 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
52 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
53 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
54 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
55 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
56 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
57 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
58 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
59 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
60 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
61 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
62 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
63 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
64 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
65 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
66 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
67 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
68 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
69 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
70 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
71 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
72 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
73 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
74 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
75 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
76 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
77 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
78 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
79 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
80 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
81 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
82 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
83 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
84 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
85 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
86 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
87 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
88 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
89 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
90 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
91 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
92 m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
93 m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
94 m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
95 m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
96 m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
97 m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
98 m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
0 # please keep this list sorted alphabetically
1 #
2 fr
0 # Makefile for program source directory in GNU NLS utilities package.
1 # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
2 # Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
3 #
4 # This file may be copied and used freely without restrictions. It may
5 # be used in projects which are not available under a GNU Public License,
6 # but which still want to provide support for the GNU gettext functionality.
7 #
8 # - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
9 # instead of PACKAGE and to look for po2tbl in ./ not in intl/
10 #
11 # - Modified by jacob berkman <jacob@ximian.com> to install
12 # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
13 #
14 # - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
15 #
16 # We have the following line for use by intltoolize:
17 # INTLTOOL_MAKEFILE
18
19 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
20 PACKAGE = @PACKAGE@
21 VERSION = @VERSION@
22
23 SHELL = @SHELL@
24
25 srcdir = @srcdir@
26 top_srcdir = @top_srcdir@
27 top_builddir = @top_builddir@
28 VPATH = @srcdir@
29
30 prefix = @prefix@
31 exec_prefix = @exec_prefix@
32 datadir = @datadir@
33 datarootdir = @datarootdir@
34 libdir = @libdir@
35 DATADIRNAME = @DATADIRNAME@
36 itlocaledir = $(prefix)/$(DATADIRNAME)/locale
37 subdir = po
38 install_sh = @install_sh@
39 # Automake >= 1.8 provides @mkdir_p@.
40 # Until it can be supposed, use the safe fallback:
41 mkdir_p = $(install_sh) -d
42
43 INSTALL = @INSTALL@
44 INSTALL_DATA = @INSTALL_DATA@
45
46 GMSGFMT = @GMSGFMT@
47 MSGFMT = @MSGFMT@
48 XGETTEXT = @XGETTEXT@
49 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
50 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
51 MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
52 GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
53
54 ALL_LINGUAS = @ALL_LINGUAS@
55
56 PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
57
58 USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
59
60 USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
61
62 POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
63
64 DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
65 EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
66
67 POTFILES = \
68 # This comment gets stripped out
69
70 CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
71
72 .SUFFIXES:
73 .SUFFIXES: .po .pox .gmo .mo .msg .cat
74
75 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
76 INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
77 INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
78 INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@;
79
80 .po.pox:
81 $(MAKE) $(GETTEXT_PACKAGE).pot
82 $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
83
84 .po.mo:
85 $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
86
87 .po.gmo:
88 $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
89 && rm -f $$file && $(GMSGFMT) -o $$file $<
90
91 .po.cat:
92 sed -f ../intl/po2msg.sed < $< > $*.msg \
93 && rm -f $@ && gencat $@ $*.msg
94
95
96 all: all-@USE_NLS@
97
98 all-yes: $(CATALOGS)
99 all-no:
100
101 $(GETTEXT_PACKAGE).pot: $(POTFILES)
102 $(GENPOT)
103
104 install: install-data
105 install-data: install-data-@USE_NLS@
106 install-data-no: all
107 install-data-yes: all
108 linguas="$(USE_LINGUAS)"; \
109 for lang in $$linguas; do \
110 dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
111 $(mkdir_p) $$dir; \
112 if test -r $$lang.gmo; then \
113 $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
114 echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
115 else \
116 $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
117 echo "installing $(srcdir)/$$lang.gmo as" \
118 "$$dir/$(GETTEXT_PACKAGE).mo"; \
119 fi; \
120 if test -r $$lang.gmo.m; then \
121 $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
122 echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
123 else \
124 if test -r $(srcdir)/$$lang.gmo.m ; then \
125 $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
126 $$dir/$(GETTEXT_PACKAGE).mo.m; \
127 echo "installing $(srcdir)/$$lang.gmo.m as" \
128 "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
129 else \
130 true; \
131 fi; \
132 fi; \
133 done
134
135 # Empty stubs to satisfy archaic automake needs
136 dvi info ctags tags CTAGS TAGS ID:
137
138 # Define this as empty until I found a useful application.
139 install-exec installcheck:
140
141 uninstall:
142 linguas="$(USE_LINGUAS)"; \
143 for lang in $$linguas; do \
144 rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
145 rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
146 done
147
148 check: all $(GETTEXT_PACKAGE).pot
149 rm -f missing notexist
150 srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
151 if [ -r missing -o -r notexist ]; then \
152 exit 1; \
153 fi
154
155 mostlyclean:
156 rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
157 rm -f .intltool-merge-cache
158
159 clean: mostlyclean
160
161 distclean: clean
162 rm -f Makefile Makefile.in POTFILES stamp-it
163 rm -f *.mo *.msg *.cat *.cat.m *.gmo
164
165 maintainer-clean: distclean
166 @echo "This command is intended for maintainers to use;"
167 @echo "it deletes files that may require special tools to rebuild."
168 rm -f Makefile.in.in
169
170 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
171 dist distdir: $(DISTFILES)
172 dists="$(DISTFILES)"; \
173 extra_dists="$(EXTRA_DISTFILES)"; \
174 for file in $$extra_dists; do \
175 test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
176 done; \
177 for file in $$dists; do \
178 test -f $$file || file="$(srcdir)/$$file"; \
179 ln $$file $(distdir) 2> /dev/null \
180 || cp -p $$file $(distdir); \
181 done
182
183 update-po: Makefile
184 $(MAKE) $(GETTEXT_PACKAGE).pot
185 tmpdir=`pwd`; \
186 linguas="$(USE_LINGUAS)"; \
187 for lang in $$linguas; do \
188 echo "$$lang:"; \
189 result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
190 if $$result; then \
191 if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
192 rm -f $$tmpdir/$$lang.new.po; \
193 else \
194 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
195 :; \
196 else \
197 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
198 rm -f $$tmpdir/$$lang.new.po; \
199 exit 1; \
200 fi; \
201 fi; \
202 else \
203 echo "msgmerge for $$lang.gmo failed!"; \
204 rm -f $$tmpdir/$$lang.new.po; \
205 fi; \
206 done
207
208 Makefile POTFILES: stamp-it
209 @if test ! -f $@; then \
210 rm -f stamp-it; \
211 $(MAKE) stamp-it; \
212 fi
213
214 stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
215 cd $(top_builddir) \
216 && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
217 $(SHELL) ./config.status
218
219 # Tell versions [3.59,3.63) of GNU make not to export all variables.
220 # Otherwise a system limit (for SysV at least) may be exceeded.
221 .NOEXPORT:
0 # List of source files containing translatable strings.
1 # Please keep this file sorted alphabetically.
2 # When adding a file here, make sure that the entry point in the API of this
3 # file calls _gnome_desktop_init_i18n ()
4 schemas/org.x.apps.gschema.xml.in.in
0 # List of source files containing translatable strings that should not be
1 # translated.
2 # Please keep this file sorted alphabetically.
(New empty file)
0 desktop_gschemas_in_in = \
1 org.x.apps.gschema.xml.in.in
2
3 @INTLTOOL_XML_NOMERGE_RULE@
4
5 gsettings_ENUM_NAMESPACE = org.x.apps
6 gsettings_ENUM_FILES = $(top_srcdir)/libxapp/*.h
7
8 desktop_gschemas_in = $(desktop_gschemas_in_in:.xml.in.in=.xml.in)
9 gsettings_SCHEMAS = $(desktop_gschemas_in:.xml.in=.xml)
10
11 %.gschema.xml.in: %.gschema.xml.in.in Makefile
12 $(AM_V_GEN) $(SED) -e 's^\@datadir\@^$(datadir)^g' -e 's^\@GETTEXT_PACKAGE\@^$(GETTEXT_PACKAGE)^g' < $< > $@
13
14 @GSETTINGS_RULES@
15
16 EXTRA_DIST = \
17 $(desktop_gschemas_in_in)
18
19 CLEANFILES = \
20 $(gsettings__enum_file) \
21 $(gsettings_SCHEMAS) \
22 $(desktop_gschemas_in) \
23 *.gschema.valid
24
25 -include $(top_srcdir)/git.mk
0 <?xml version="1.0"?>
1 <schemalist>
2 <schema id="org.x.apps" path="/org/x/apps/">
3
4 </schema>
5 </schemalist>
0 #! /usr/bin/python3
1
2 """
3 A demo/test script for the XAppKbdLayoutController class
4 """
5 import sys, os
6 import signal
7 import gettext
8
9 import gi
10 gi.require_version('Gtk', '3.0')
11 gi.require_version('XApp', '1.0')
12
13 from gi.repository import Gtk, XApp, GObject, Gkbd, GdkPixbuf
14
15 signal.signal(signal.SIGINT, signal.SIG_DFL)
16
17 class Main:
18 def __init__(self):
19 win = Gtk.Window()
20 frame = Gtk.Frame()
21 frame.set_margin_start(2)
22 frame.set_margin_end(2)
23 frame.set_margin_top(2)
24 frame.set_margin_bottom(2)
25
26 win.add(frame)
27
28 box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
29 box.set_margin_start(2)
30 box.set_margin_end(2)
31 box.set_margin_top(2)
32 box.set_margin_bottom(2)
33
34 frame.add(box)
35
36 self.use_caps = False
37
38 self.controller = XApp.KbdLayoutController()
39 self.controller.connect("layout-changed", self.on_layout_changed)
40 self.controller.connect("config-changed", self.on_config_changed)
41
42 self.label = Gtk.Label()
43 self.label.set_text(self.controller.get_current_name())
44 box.pack_start(self.label, True, True, 4)
45
46 self.flag_button = Gtk.Button()
47 box.pack_start(self.flag_button, True, True, 4)
48 self.flag_button.connect("clicked", self.on_button_clicked)
49
50 self.group_button = Gtk.Button()
51 box.pack_start(self.group_button, True, True, 4)
52 self.group_button.connect("clicked", self.on_button_clicked)
53
54 self.variant_button = Gtk.Button()
55 box.pack_start(self.variant_button, True, True, 4)
56 self.variant_button.connect("clicked", self.on_button_clicked)
57
58 check = Gtk.CheckButton.new_with_label("Use caps")
59 check.connect("toggled", self.on_caps_toggled)
60 box.pack_start(check, True, True, 4)
61
62 frame.show_all()
63
64 win.connect("delete-event", lambda w, e: Gtk.main_quit())
65
66 self.on_layout_changed(self.controller)
67
68 win.present()
69
70 Gtk.main()
71
72 def on_caps_toggled(self, widget):
73 self.use_caps = widget.get_active()
74 self.on_layout_changed(self.controller)
75
76 def on_button_clicked(self, widget, data=None):
77 self.controller.next_group()
78
79 def on_layout_changed(self, controller, group=None):
80 handled = False
81
82 name = self.controller.get_current_icon_name()
83 if name != None:
84 filename = "/usr/share/flags/iso-4x3-svg/%s.svgz" % name
85
86 valid, width, height = Gtk.IconSize.lookup(Gtk.IconSize.BUTTON)
87 pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(filename, -1, height)
88
89 image = Gtk.Image.new_from_pixbuf(pixbuf)
90 self.flag_button.set_image(image)
91 handled = True
92
93 if not handled:
94 name = self.controller.get_current_short_group_label()
95 self.flag_button.set_label(name.upper())
96 self.flag_button.set_image(None)
97
98 self.label.set_text(self.controller.get_current_name())
99
100 group_label = self.controller.get_current_short_group_label()
101 variant_label = self.controller.get_current_variant_label()
102
103 if self.use_caps:
104 group_label = group_label.upper()
105 variant_label = variant_label.upper()
106
107 self.group_button.set_label(group_label)
108 self.variant_button.set_label(variant_label)
109
110 def on_config_changed(self, controller):
111 GObject.idle_add(self.on_layout_changed, controller)
112
113 if __name__ == "__main__":
114 main = Main()