Codebase list policykit-1-gnome / d256881
Imported Upstream version 0.5 Michael Biebl 14 years ago
46 changed file(s) with 53864 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 David Zeuthen <davidz@redhat.com>
1
0
1 GNU GENERAL PUBLIC LICENSE
2 Version 2, June 1991
3
4 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 Preamble
10
11 The licenses for most software are designed to take away your
12 freedom to share and change it. By contrast, the GNU General Public
13 License is intended to guarantee your freedom to share and change free
14 software--to make sure the software is free for all its users. This
15 General Public License applies to most of the Free Software
16 Foundation's software and to any other program whose authors commit to
17 using it. (Some other Free Software Foundation software is covered by
18 the GNU Library General Public License instead.) You can apply it to
19 your programs, too.
20
21 When we speak of free software, we are referring to freedom, not
22 price. Our General Public Licenses are designed to make sure that you
23 have the freedom to distribute copies of free software (and charge for
24 this service if you wish), that you receive source code or can get it
25 if you want it, that you can change the software or use pieces of it
26 in new free programs; and that you know you can do these things.
27
28 To protect your rights, we need to make restrictions that forbid
29 anyone to deny you these rights or to ask you to surrender the rights.
30 These restrictions translate to certain responsibilities for you if you
31 distribute copies of the software, or if you modify it.
32
33 For example, if you distribute copies of such a program, whether
34 gratis or for a fee, you must give the recipients all the rights that
35 you have. You must make sure that they, too, receive or can get the
36 source code. And you must show them these terms so they know their
37 rights.
38
39 We protect your rights with two steps: (1) copyright the software, and
40 (2) offer you this license which gives you legal permission to copy,
41 distribute and/or modify the software.
42
43 Also, for each author's protection and ours, we want to make certain
44 that everyone understands that there is no warranty for this free
45 software. If the software is modified by someone else and passed on, we
46 want its recipients to know that what they have is not the original, so
47 that any problems introduced by others will not reflect on the original
48 authors' reputations.
49
50 Finally, any free program is threatened constantly by software
51 patents. We wish to avoid the danger that redistributors of a free
52 program will individually obtain patent licenses, in effect making the
53 program proprietary. To prevent this, we have made it clear that any
54 patent must be licensed for everyone's free use or not licensed at all.
55
56 The precise terms and conditions for copying, distribution and
57 modification follow.
58
59 GNU GENERAL PUBLIC LICENSE
60 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
62 0. This License applies to any program or other work which contains
63 a notice placed by the copyright holder saying it may be distributed
64 under the terms of this General Public License. The "Program", below,
65 refers to any such program or work, and a "work based on the Program"
66 means either the Program or any derivative work under copyright law:
67 that is to say, a work containing the Program or a portion of it,
68 either verbatim or with modifications and/or translated into another
69 language. (Hereinafter, translation is included without limitation in
70 the term "modification".) Each licensee is addressed as "you".
71
72 Activities other than copying, distribution and modification are not
73 covered by this License; they are outside its scope. The act of
74 running the Program is not restricted, and the output from the Program
75 is covered only if its contents constitute a work based on the
76 Program (independent of having been made by running the Program).
77 Whether that is true depends on what the Program does.
78
79 1. You may copy and distribute verbatim copies of the Program's
80 source code as you receive it, in any medium, provided that you
81 conspicuously and appropriately publish on each copy an appropriate
82 copyright notice and disclaimer of warranty; keep intact all the
83 notices that refer to this License and to the absence of any warranty;
84 and give any other recipients of the Program a copy of this License
85 along with the Program.
86
87 You may charge a fee for the physical act of transferring a copy, and
88 you may at your option offer warranty protection in exchange for a fee.
89
90 2. You may modify your copy or copies of the Program or any portion
91 of it, thus forming a work based on the Program, and copy and
92 distribute such modifications or work under the terms of Section 1
93 above, provided that you also meet all of these conditions:
94
95 a) You must cause the modified files to carry prominent notices
96 stating that you changed the files and the date of any change.
97
98 b) You must cause any work that you distribute or publish, that in
99 whole or in part contains or is derived from the Program or any
100 part thereof, to be licensed as a whole at no charge to all third
101 parties under the terms of this License.
102
103 c) If the modified program normally reads commands interactively
104 when run, you must cause it, when started running for such
105 interactive use in the most ordinary way, to print or display an
106 announcement including an appropriate copyright notice and a
107 notice that there is no warranty (or else, saying that you provide
108 a warranty) and that users may redistribute the program under
109 these conditions, and telling the user how to view a copy of this
110 License. (Exception: if the Program itself is interactive but
111 does not normally print such an announcement, your work based on
112 the Program is not required to print an announcement.)
113
114 These requirements apply to the modified work as a whole. If
115 identifiable sections of that work are not derived from the Program,
116 and can be reasonably considered independent and separate works in
117 themselves, then this License, and its terms, do not apply to those
118 sections when you distribute them as separate works. But when you
119 distribute the same sections as part of a whole which is a work based
120 on the Program, the distribution of the whole must be on the terms of
121 this License, whose permissions for other licensees extend to the
122 entire whole, and thus to each and every part regardless of who wrote it.
123
124 Thus, it is not the intent of this section to claim rights or contest
125 your rights to work written entirely by you; rather, the intent is to
126 exercise the right to control the distribution of derivative or
127 collective works based on the Program.
128
129 In addition, mere aggregation of another work not based on the Program
130 with the Program (or with a work based on the Program) on a volume of
131 a storage or distribution medium does not bring the other work under
132 the scope of this License.
133
134 3. You may copy and distribute the Program (or a work based on it,
135 under Section 2) in object code or executable form under the terms of
136 Sections 1 and 2 above provided that you also do one of the following:
137
138 a) Accompany it with the complete corresponding machine-readable
139 source code, which must be distributed under the terms of Sections
140 1 and 2 above on a medium customarily used for software interchange; or,
141
142 b) Accompany it with a written offer, valid for at least three
143 years, to give any third party, for a charge no more than your
144 cost of physically performing source distribution, a complete
145 machine-readable copy of the corresponding source code, to be
146 distributed under the terms of Sections 1 and 2 above on a medium
147 customarily used for software interchange; or,
148
149 c) Accompany it with the information you received as to the offer
150 to distribute corresponding source code. (This alternative is
151 allowed only for noncommercial distribution and only if you
152 received the program in object code or executable form with such
153 an offer, in accord with Subsection b above.)
154
155 The source code for a work means the preferred form of the work for
156 making modifications to it. For an executable work, complete source
157 code means all the source code for all modules it contains, plus any
158 associated interface definition files, plus the scripts used to
159 control compilation and installation of the executable. However, as a
160 special exception, the source code distributed need not include
161 anything that is normally distributed (in either source or binary
162 form) with the major components (compiler, kernel, and so on) of the
163 operating system on which the executable runs, unless that component
164 itself accompanies the executable.
165
166 If distribution of executable or object code is made by offering
167 access to copy from a designated place, then offering equivalent
168 access to copy the source code from the same place counts as
169 distribution of the source code, even though third parties are not
170 compelled to copy the source along with the object code.
171
172 4. You may not copy, modify, sublicense, or distribute the Program
173 except as expressly provided under this License. Any attempt
174 otherwise to copy, modify, sublicense or distribute the Program is
175 void, and will automatically terminate your rights under this License.
176 However, parties who have received copies, or rights, from you under
177 this License will not have their licenses terminated so long as such
178 parties remain in full compliance.
179
180 5. You are not required to accept this License, since you have not
181 signed it. However, nothing else grants you permission to modify or
182 distribute the Program or its derivative works. These actions are
183 prohibited by law if you do not accept this License. Therefore, by
184 modifying or distributing the Program (or any work based on the
185 Program), you indicate your acceptance of this License to do so, and
186 all its terms and conditions for copying, distributing or modifying
187 the Program or works based on it.
188
189 6. Each time you redistribute the Program (or any work based on the
190 Program), the recipient automatically receives a license from the
191 original licensor to copy, distribute or modify the Program subject to
192 these terms and conditions. You may not impose any further
193 restrictions on the recipients' exercise of the rights granted herein.
194 You are not responsible for enforcing compliance by third parties to
195 this License.
196
197 7. If, as a consequence of a court judgment or allegation of patent
198 infringement or for any other reason (not limited to patent issues),
199 conditions are imposed on you (whether by court order, agreement or
200 otherwise) that contradict the conditions of this License, they do not
201 excuse you from the conditions of this License. If you cannot
202 distribute so as to satisfy simultaneously your obligations under this
203 License and any other pertinent obligations, then as a consequence you
204 may not distribute the Program at all. For example, if a patent
205 license would not permit royalty-free redistribution of the Program by
206 all those who receive copies directly or indirectly through you, then
207 the only way you could satisfy both it and this License would be to
208 refrain entirely from distribution of the Program.
209
210 If any portion of this section is held invalid or unenforceable under
211 any particular circumstance, the balance of the section is intended to
212 apply and the section as a whole is intended to apply in other
213 circumstances.
214
215 It is not the purpose of this section to induce you to infringe any
216 patents or other property right claims or to contest validity of any
217 such claims; this section has the sole purpose of protecting the
218 integrity of the free software distribution system, which is
219 implemented by public license practices. Many people have made
220 generous contributions to the wide range of software distributed
221 through that system in reliance on consistent application of that
222 system; it is up to the author/donor to decide if he or she is willing
223 to distribute software through any other system and a licensee cannot
224 impose that choice.
225
226 This section is intended to make thoroughly clear what is believed to
227 be a consequence of the rest of this License.
228
229 8. If the distribution and/or use of the Program is restricted in
230 certain countries either by patents or by copyrighted interfaces, the
231 original copyright holder who places the Program under this License
232 may add an explicit geographical distribution limitation excluding
233 those countries, so that distribution is permitted only in or among
234 countries not thus excluded. In such case, this License incorporates
235 the limitation as if written in the body of this License.
236
237 9. The Free Software Foundation may publish revised and/or new versions
238 of the General Public License from time to time. Such new versions will
239 be similar in spirit to the present version, but may differ in detail to
240 address new problems or concerns.
241
242 Each version is given a distinguishing version number. If the Program
243 specifies a version number of this License which applies to it and "any
244 later version", you have the option of following the terms and conditions
245 either of that version or of any later version published by the Free
246 Software Foundation. If the Program does not specify a version number of
247 this License, you may choose any version ever published by the Free Software
248 Foundation.
249
250 10. If you wish to incorporate parts of the Program into other free
251 programs whose distribution conditions are different, write to the author
252 to ask for permission. For software which is copyrighted by the Free
253 Software Foundation, write to the Free Software Foundation; we sometimes
254 make exceptions for this. Our decision will be guided by the two goals
255 of preserving the free status of all derivatives of our free software and
256 of promoting the sharing and reuse of software generally.
257
258 NO WARRANTY
259
260 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 REPAIR OR CORRECTION.
269
270 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 POSSIBILITY OF SUCH DAMAGES.
279
280 END OF TERMS AND CONDITIONS
281
282 How to Apply These Terms to Your New Programs
283
284 If you develop a new program, and you want it to be of the greatest
285 possible use to the public, the best way to achieve this is to make it
286 free software which everyone can redistribute and change under these terms.
287
288 To do so, attach the following notices to the program. It is safest
289 to attach them to the start of each source file to most effectively
290 convey the exclusion of warranty; and each file should have at least
291 the "copyright" line and a pointer to where the full notice is found.
292
293 <one line to give the program's name and a brief idea of what it does.>
294 Copyright (C) 19yy <name of author>
295
296 This program is free software; you can redistribute it and/or modify
297 it under the terms of the GNU General Public License as published by
298 the Free Software Foundation; either version 2 of the License, or
299 (at your option) any later version.
300
301 This program is distributed in the hope that it will be useful,
302 but WITHOUT ANY WARRANTY; without even the implied warranty of
303 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 GNU General Public License for more details.
305
306 You should have received a copy of the GNU General Public License
307 along with this program; if not, write to the Free Software
308 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
309
310
311 Also add information on how to contact you by electronic and paper mail.
312
313 If the program is interactive, make it output a short notice like this
314 when it starts in an interactive mode:
315
316 Gnomovision version 69, Copyright (C) 19yy name of author
317 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318 This is free software, and you are welcome to redistribute it
319 under certain conditions; type `show c' for details.
320
321 The hypothetical commands `show w' and `show c' should show the appropriate
322 parts of the General Public License. Of course, the commands you use may
323 be called something other than `show w' and `show c'; they could even be
324 mouse-clicks or menu items--whatever suits your program.
325
326 You should also get your employer (if you work as a programmer) or your
327 school, if any, to sign a "copyright disclaimer" for the program, if
328 necessary. Here is a sample; alter the names:
329
330 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331 `Gnomovision' (which makes passes at compilers) written by James Hacker.
332
333 <signature of Ty Coon>, 1 April 1989
334 Ty Coon, President of Vice
335
336 This General Public License does not permit incorporating your program into
337 proprietary programs. If your program is a subroutine library, you may
338 consider it more useful to permit linking proprietary applications with the
339 library. If this is what you want to do, use the GNU Library General
340 Public License instead of this License.
0 SCM (will be moved to GNOME SVN at some point)
1 ==============================================
2
3 - anonymous checkouts
4
5 $ git clone git://people.freedesktop.org/~david/PolicyKit-gnome
6
7 - commit to local repository
8
9 $ git commit -a
10
11 - pull changes from master repository at fd.o
12
13 $ git pull
14
15 - diff of working tree versus local repository
16
17 $ git diff
18
19 - diff of local repository vs. master repository at fd.o
20
21 synchronize with upstream repo:
22 $ git pull
23
24 (possibly merge changes)
25
26 generate the diff:
27 $ git diff origin HEAD
28
29 - influential environment variables (set these in e.g. .bash_profile)
30
31 export GIT_AUTHOR_NAME='Your Full Name'
32 export GIT_COMMITTER_NAME='Your Full Name'
33 export GIT_COMMITTER_EMAIL=youremail@domain.net
34 export GIT_AUTHOR_EMAIL=youremail@domain.net
35
36 - see also
37
38 http://www.kernel.org/pub/software/scm/git/docs/
39
40
41 Committing code
42 ===
43
44 - Commit messages should be of the form (the five lines between the
45 lines starting with ===)
46
47 === begin example commit ===
48 short explanation of the commit
49
50 Longer explanation explaining exactly what's changed, whether any
51 external or private interfaces changed, what bugs were fixed (with bug
52 tracker reference if applicable) and so forth. Be concise but not too brief.
53 === end example commit ===
54
55 - Always add a brief description of the commit to the _first_ line of
56 the commit and terminate by two newlines (it will work without the
57 second newline, but that is not nice for the interfaces).
58
59 - First line (the brief description) must only be one sentence and
60 must not start with a capital letter. Don't use a trailing period
61 either.
62
63 - The main description (the body) is normal prose and should use normal
64 punctuation and capital letters where appropriate. Normally, for patches
65 sent to a mailing list it's copied from there.
66
67 - When committing code on behalf of others use the --author option, e.g.
68 git commit -a --author "Joe Coder <joe@coder.org>"
69
70 Coding Style
71 ===
72
73 - Please follow the coding style already used - it's not a must, but it's
74 nice to have consistency.
75
76 - Write docs for all functions and structs and so on. We use gtkdoc format.
77
78 - All external interfaces (network protocols, file formats, etc.)
79 should have documented specifications sufficient to allow an
80 alternative implementation to be written. Our implementation should
81 be strict about specification compliance (should not for example
82 heuristically parse a file and accept not-well-formed
83 data). Avoiding heuristics is also important for security reasons;
84 if it looks funny, ignore it (or exit, or disconnect).
0 SUBDIRS = data src examples po
1
2 EXTRA_DIST = \
3 autogen.sh \
4 intltool-extract.in \
5 intltool-merge.in \
6 intltool-update.in \
7 TODO \
8 HACKING
9
10 DISTCLEANFILES = \
11 intltool-extract \
12 intltool-merge \
13 intltool-update
14
15 clean-local :
16 rm -f *~ po/*~
0 # Makefile.in generated by automake 1.10 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 pkgdatadir = $(datadir)/@PACKAGE@
17 pkglibdir = $(libdir)/@PACKAGE@
18 pkgincludedir = $(includedir)/@PACKAGE@
19 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
20 install_sh_DATA = $(install_sh) -c -m 644
21 install_sh_PROGRAM = $(install_sh) -c
22 install_sh_SCRIPT = $(install_sh) -c
23 INSTALL_HEADER = $(INSTALL_DATA)
24 transform = $(program_transform_name)
25 NORMAL_INSTALL = :
26 PRE_INSTALL = :
27 POST_INSTALL = :
28 NORMAL_UNINSTALL = :
29 PRE_UNINSTALL = :
30 POST_UNINSTALL = :
31 build_triplet = @build@
32 host_triplet = @host@
33 subdir = .
34 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
35 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
36 $(top_srcdir)/configure AUTHORS COPYING NEWS TODO config.guess \
37 config.sub depcomp install-sh ltmain.sh missing mkinstalldirs
38 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
40 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
41 $(ACLOCAL_M4)
42 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
43 configure.lineno config.status.lineno
44 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
45 CONFIG_HEADER = config.h
46 CONFIG_CLEAN_FILES =
47 SOURCES =
48 DIST_SOURCES =
49 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
50 html-recursive info-recursive install-data-recursive \
51 install-dvi-recursive install-exec-recursive \
52 install-html-recursive install-info-recursive \
53 install-pdf-recursive install-ps-recursive install-recursive \
54 installcheck-recursive installdirs-recursive pdf-recursive \
55 ps-recursive uninstall-recursive
56 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
57 distclean-recursive maintainer-clean-recursive
58 ETAGS = etags
59 CTAGS = ctags
60 DIST_SUBDIRS = $(SUBDIRS)
61 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
62 distdir = $(PACKAGE)-$(VERSION)
63 top_distdir = $(distdir)
64 am__remove_distdir = \
65 { test ! -d $(distdir) \
66 || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
67 && rm -fr $(distdir); }; }
68 GZIP_ENV = --best
69 DIST_ARCHIVES = $(distdir).tar.bz2
70 distuninstallcheck_listfiles = find . -type f -print
71 distcleancheck_listfiles = find . -type f -print
72 ACLOCAL = @ACLOCAL@
73 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
74 ALL_LINGUAS = @ALL_LINGUAS@
75 AMTAR = @AMTAR@
76 AM_CFLAGS = @AM_CFLAGS@
77 AM_CPPFLAGS = @AM_CPPFLAGS@
78 AM_CXXFLAGS = @AM_CXXFLAGS@
79 AM_LDFLAGS = @AM_LDFLAGS@
80 AR = @AR@
81 AUTOCONF = @AUTOCONF@
82 AUTOHEADER = @AUTOHEADER@
83 AUTOMAKE = @AUTOMAKE@
84 AWK = @AWK@
85 CATALOGS = @CATALOGS@
86 CATOBJEXT = @CATOBJEXT@
87 CC = @CC@
88 CCDEPMODE = @CCDEPMODE@
89 CFLAGS = @CFLAGS@
90 CPP = @CPP@
91 CPPFLAGS = @CPPFLAGS@
92 CXX = @CXX@
93 CXXCPP = @CXXCPP@
94 CXXDEPMODE = @CXXDEPMODE@
95 CXXFLAGS = @CXXFLAGS@
96 CYGPATH_W = @CYGPATH_W@
97 DATADIRNAME = @DATADIRNAME@
98 DEFS = @DEFS@
99 DEPDIR = @DEPDIR@
100 DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
101 DOC_USER_FORMATS = @DOC_USER_FORMATS@
102 ECHO = @ECHO@
103 ECHO_C = @ECHO_C@
104 ECHO_N = @ECHO_N@
105 ECHO_T = @ECHO_T@
106 EGREP = @EGREP@
107 EXEEXT = @EXEEXT@
108 F77 = @F77@
109 FFLAGS = @FFLAGS@
110 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
111 GMOFILES = @GMOFILES@
112 GMSGFMT = @GMSGFMT@
113 GREP = @GREP@
114 HELP_DIR = @HELP_DIR@
115 INSTALL = @INSTALL@
116 INSTALL_DATA = @INSTALL_DATA@
117 INSTALL_PROGRAM = @INSTALL_PROGRAM@
118 INSTALL_SCRIPT = @INSTALL_SCRIPT@
119 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
120 INSTOBJEXT = @INSTOBJEXT@
121 INTLLIBS = @INTLLIBS@
122 INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
123 INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
124 INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
125 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
126 INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
127 INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
128 INTLTOOL_MERGE = @INTLTOOL_MERGE@
129 INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
130 INTLTOOL_PERL = @INTLTOOL_PERL@
131 INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
132 INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
133 INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
134 INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
135 INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
136 INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
137 INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
138 INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
139 INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
140 INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
141 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
142 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
143 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
144 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
145 LDFLAGS = @LDFLAGS@
146 LIBOBJS = @LIBOBJS@
147 LIBS = @LIBS@
148 LIBTOOL = @LIBTOOL@
149 LN_S = @LN_S@
150 LTLIBOBJS = @LTLIBOBJS@
151 MAINT = @MAINT@
152 MAKEINFO = @MAKEINFO@
153 MKDIR_P = @MKDIR_P@
154 MKINSTALLDIRS = @MKINSTALLDIRS@
155 MSGFMT = @MSGFMT@
156 MSGFMT_OPTS = @MSGFMT_OPTS@
157 OBJEXT = @OBJEXT@
158 OMF_DIR = @OMF_DIR@
159 PACKAGE = @PACKAGE@
160 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
161 PACKAGE_NAME = @PACKAGE_NAME@
162 PACKAGE_STRING = @PACKAGE_STRING@
163 PACKAGE_TARNAME = @PACKAGE_TARNAME@
164 PACKAGE_VERSION = @PACKAGE_VERSION@
165 PATH_SEPARATOR = @PATH_SEPARATOR@
166 PKG_CONFIG = @PKG_CONFIG@
167 POFILES = @POFILES@
168 POLKIT_GNOME_CFLAGS = @POLKIT_GNOME_CFLAGS@
169 POLKIT_GNOME_LIBS = @POLKIT_GNOME_LIBS@
170 POLKIT_POLICY_FILE_VALIDATE = @POLKIT_POLICY_FILE_VALIDATE@
171 POSUB = @POSUB@
172 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
173 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
174 RANLIB = @RANLIB@
175 SED = @SED@
176 SET_MAKE = @SET_MAKE@
177 SHELL = @SHELL@
178 STRIP = @STRIP@
179 USE_NLS = @USE_NLS@
180 VERSION = @VERSION@
181 WARN_CFLAGS = @WARN_CFLAGS@
182 XGETTEXT = @XGETTEXT@
183 abs_builddir = @abs_builddir@
184 abs_srcdir = @abs_srcdir@
185 abs_top_builddir = @abs_top_builddir@
186 abs_top_srcdir = @abs_top_srcdir@
187 ac_ct_CC = @ac_ct_CC@
188 ac_ct_CXX = @ac_ct_CXX@
189 ac_ct_F77 = @ac_ct_F77@
190 am__include = @am__include@
191 am__leading_dot = @am__leading_dot@
192 am__quote = @am__quote@
193 am__tar = @am__tar@
194 am__untar = @am__untar@
195 bindir = @bindir@
196 build = @build@
197 build_alias = @build_alias@
198 build_cpu = @build_cpu@
199 build_os = @build_os@
200 build_vendor = @build_vendor@
201 builddir = @builddir@
202 datadir = @datadir@
203 datarootdir = @datarootdir@
204 docdir = @docdir@
205 dvidir = @dvidir@
206 exec_prefix = @exec_prefix@
207 host = @host@
208 host_alias = @host_alias@
209 host_cpu = @host_cpu@
210 host_os = @host_os@
211 host_vendor = @host_vendor@
212 htmldir = @htmldir@
213 includedir = @includedir@
214 infodir = @infodir@
215 install_sh = @install_sh@
216 libdir = @libdir@
217 libexecdir = @libexecdir@
218 localedir = @localedir@
219 localstatedir = @localstatedir@
220 mandir = @mandir@
221 mkdir_p = @mkdir_p@
222 oldincludedir = @oldincludedir@
223 pdfdir = @pdfdir@
224 prefix = @prefix@
225 program_transform_name = @program_transform_name@
226 psdir = @psdir@
227 sbindir = @sbindir@
228 sharedstatedir = @sharedstatedir@
229 srcdir = @srcdir@
230 sysconfdir = @sysconfdir@
231 target_alias = @target_alias@
232 top_builddir = @top_builddir@
233 top_srcdir = @top_srcdir@
234 SUBDIRS = data src examples po
235 EXTRA_DIST = \
236 autogen.sh \
237 intltool-extract.in \
238 intltool-merge.in \
239 intltool-update.in \
240 TODO \
241 HACKING
242
243 DISTCLEANFILES = \
244 intltool-extract \
245 intltool-merge \
246 intltool-update
247
248 all: config.h
249 $(MAKE) $(AM_MAKEFLAGS) all-recursive
250
251 .SUFFIXES:
252 am--refresh:
253 @:
254 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
255 @for dep in $?; do \
256 case '$(am__configure_deps)' in \
257 *$$dep*) \
258 echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
259 cd $(srcdir) && $(AUTOMAKE) --foreign \
260 && exit 0; \
261 exit 1;; \
262 esac; \
263 done; \
264 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
265 cd $(top_srcdir) && \
266 $(AUTOMAKE) --foreign Makefile
267 .PRECIOUS: Makefile
268 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
269 @case '$?' in \
270 *config.status*) \
271 echo ' $(SHELL) ./config.status'; \
272 $(SHELL) ./config.status;; \
273 *) \
274 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
275 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
276 esac;
277
278 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
279 $(SHELL) ./config.status --recheck
280
281 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
282 cd $(srcdir) && $(AUTOCONF)
283 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
284 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
285
286 config.h: stamp-h1
287 @if test ! -f $@; then \
288 rm -f stamp-h1; \
289 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
290 else :; fi
291
292 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
293 @rm -f stamp-h1
294 cd $(top_builddir) && $(SHELL) ./config.status config.h
295 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
296 cd $(top_srcdir) && $(AUTOHEADER)
297 rm -f stamp-h1
298 touch $@
299
300 distclean-hdr:
301 -rm -f config.h stamp-h1
302
303 mostlyclean-libtool:
304 -rm -f *.lo
305
306 clean-libtool:
307 -rm -rf .libs _libs
308
309 distclean-libtool:
310 -rm -f libtool
311
312 # This directory's subdirectories are mostly independent; you can cd
313 # into them and run `make' without going through this Makefile.
314 # To change the values of `make' variables: instead of editing Makefiles,
315 # (1) if the variable is set in `config.status', edit `config.status'
316 # (which will cause the Makefiles to be regenerated when you run `make');
317 # (2) otherwise, pass the desired values on the `make' command line.
318 $(RECURSIVE_TARGETS):
319 @failcom='exit 1'; \
320 for f in x $$MAKEFLAGS; do \
321 case $$f in \
322 *=* | --[!k]*);; \
323 *k*) failcom='fail=yes';; \
324 esac; \
325 done; \
326 dot_seen=no; \
327 target=`echo $@ | sed s/-recursive//`; \
328 list='$(SUBDIRS)'; for subdir in $$list; do \
329 echo "Making $$target in $$subdir"; \
330 if test "$$subdir" = "."; then \
331 dot_seen=yes; \
332 local_target="$$target-am"; \
333 else \
334 local_target="$$target"; \
335 fi; \
336 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
337 || eval $$failcom; \
338 done; \
339 if test "$$dot_seen" = "no"; then \
340 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
341 fi; test -z "$$fail"
342
343 $(RECURSIVE_CLEAN_TARGETS):
344 @failcom='exit 1'; \
345 for f in x $$MAKEFLAGS; do \
346 case $$f in \
347 *=* | --[!k]*);; \
348 *k*) failcom='fail=yes';; \
349 esac; \
350 done; \
351 dot_seen=no; \
352 case "$@" in \
353 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
354 *) list='$(SUBDIRS)' ;; \
355 esac; \
356 rev=''; for subdir in $$list; do \
357 if test "$$subdir" = "."; then :; else \
358 rev="$$subdir $$rev"; \
359 fi; \
360 done; \
361 rev="$$rev ."; \
362 target=`echo $@ | sed s/-recursive//`; \
363 for subdir in $$rev; do \
364 echo "Making $$target in $$subdir"; \
365 if test "$$subdir" = "."; then \
366 local_target="$$target-am"; \
367 else \
368 local_target="$$target"; \
369 fi; \
370 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
371 || eval $$failcom; \
372 done && test -z "$$fail"
373 tags-recursive:
374 list='$(SUBDIRS)'; for subdir in $$list; do \
375 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
376 done
377 ctags-recursive:
378 list='$(SUBDIRS)'; for subdir in $$list; do \
379 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
380 done
381
382 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
383 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
384 unique=`for i in $$list; do \
385 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
386 done | \
387 $(AWK) ' { files[$$0] = 1; } \
388 END { for (i in files) print i; }'`; \
389 mkid -fID $$unique
390 tags: TAGS
391
392 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
393 $(TAGS_FILES) $(LISP)
394 tags=; \
395 here=`pwd`; \
396 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
397 include_option=--etags-include; \
398 empty_fix=.; \
399 else \
400 include_option=--include; \
401 empty_fix=; \
402 fi; \
403 list='$(SUBDIRS)'; for subdir in $$list; do \
404 if test "$$subdir" = .; then :; else \
405 test ! -f $$subdir/TAGS || \
406 tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
407 fi; \
408 done; \
409 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
410 unique=`for i in $$list; do \
411 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
412 done | \
413 $(AWK) ' { files[$$0] = 1; } \
414 END { for (i in files) print i; }'`; \
415 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
416 test -n "$$unique" || unique=$$empty_fix; \
417 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
418 $$tags $$unique; \
419 fi
420 ctags: CTAGS
421 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
422 $(TAGS_FILES) $(LISP)
423 tags=; \
424 here=`pwd`; \
425 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
426 unique=`for i in $$list; do \
427 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
428 done | \
429 $(AWK) ' { files[$$0] = 1; } \
430 END { for (i in files) print i; }'`; \
431 test -z "$(CTAGS_ARGS)$$tags$$unique" \
432 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
433 $$tags $$unique
434
435 GTAGS:
436 here=`$(am__cd) $(top_builddir) && pwd` \
437 && cd $(top_srcdir) \
438 && gtags -i $(GTAGS_ARGS) $$here
439
440 distclean-tags:
441 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
442
443 distdir: $(DISTFILES)
444 $(am__remove_distdir)
445 test -d $(distdir) || mkdir $(distdir)
446 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
447 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
448 list='$(DISTFILES)'; \
449 dist_files=`for file in $$list; do echo $$file; done | \
450 sed -e "s|^$$srcdirstrip/||;t" \
451 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
452 case $$dist_files in \
453 */*) $(MKDIR_P) `echo "$$dist_files" | \
454 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
455 sort -u` ;; \
456 esac; \
457 for file in $$dist_files; do \
458 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
459 if test -d $$d/$$file; then \
460 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
461 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
462 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
463 fi; \
464 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
465 else \
466 test -f $(distdir)/$$file \
467 || cp -p $$d/$$file $(distdir)/$$file \
468 || exit 1; \
469 fi; \
470 done
471 list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
472 if test "$$subdir" = .; then :; else \
473 test -d "$(distdir)/$$subdir" \
474 || $(MKDIR_P) "$(distdir)/$$subdir" \
475 || exit 1; \
476 distdir=`$(am__cd) $(distdir) && pwd`; \
477 top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
478 (cd $$subdir && \
479 $(MAKE) $(AM_MAKEFLAGS) \
480 top_distdir="$$top_distdir" \
481 distdir="$$distdir/$$subdir" \
482 am__remove_distdir=: \
483 am__skip_length_check=: \
484 distdir) \
485 || exit 1; \
486 fi; \
487 done
488 -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
489 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
490 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
491 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
492 || chmod -R a+r $(distdir)
493 dist-gzip: distdir
494 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
495 $(am__remove_distdir)
496 dist-bzip2: distdir
497 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
498 $(am__remove_distdir)
499
500 dist-tarZ: distdir
501 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
502 $(am__remove_distdir)
503
504 dist-shar: distdir
505 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
506 $(am__remove_distdir)
507
508 dist-zip: distdir
509 -rm -f $(distdir).zip
510 zip -rq $(distdir).zip $(distdir)
511 $(am__remove_distdir)
512
513 dist dist-all: distdir
514 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
515 $(am__remove_distdir)
516
517 # This target untars the dist file and tries a VPATH configuration. Then
518 # it guarantees that the distribution is self-contained by making another
519 # tarfile.
520 distcheck: dist
521 case '$(DIST_ARCHIVES)' in \
522 *.tar.gz*) \
523 GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
524 *.tar.bz2*) \
525 bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
526 *.tar.Z*) \
527 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
528 *.shar.gz*) \
529 GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
530 *.zip*) \
531 unzip $(distdir).zip ;;\
532 esac
533 chmod -R a-w $(distdir); chmod a+w $(distdir)
534 mkdir $(distdir)/_build
535 mkdir $(distdir)/_inst
536 chmod a-w $(distdir)
537 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
538 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
539 && cd $(distdir)/_build \
540 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
541 $(DISTCHECK_CONFIGURE_FLAGS) \
542 && $(MAKE) $(AM_MAKEFLAGS) \
543 && $(MAKE) $(AM_MAKEFLAGS) dvi \
544 && $(MAKE) $(AM_MAKEFLAGS) check \
545 && $(MAKE) $(AM_MAKEFLAGS) install \
546 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
547 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
548 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
549 distuninstallcheck \
550 && chmod -R a-w "$$dc_install_base" \
551 && ({ \
552 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
553 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
554 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
555 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
556 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
557 } || { rm -rf "$$dc_destdir"; exit 1; }) \
558 && rm -rf "$$dc_destdir" \
559 && $(MAKE) $(AM_MAKEFLAGS) dist \
560 && rm -rf $(DIST_ARCHIVES) \
561 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
562 $(am__remove_distdir)
563 @(echo "$(distdir) archives ready for distribution: "; \
564 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
565 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
566 distuninstallcheck:
567 @cd $(distuninstallcheck_dir) \
568 && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
569 || { echo "ERROR: files left after uninstall:" ; \
570 if test -n "$(DESTDIR)"; then \
571 echo " (check DESTDIR support)"; \
572 fi ; \
573 $(distuninstallcheck_listfiles) ; \
574 exit 1; } >&2
575 distcleancheck: distclean
576 @if test '$(srcdir)' = . ; then \
577 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
578 exit 1 ; \
579 fi
580 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
581 || { echo "ERROR: files left in build directory after distclean:" ; \
582 $(distcleancheck_listfiles) ; \
583 exit 1; } >&2
584 check-am: all-am
585 check: check-recursive
586 all-am: Makefile config.h
587 installdirs: installdirs-recursive
588 installdirs-am:
589 install: install-recursive
590 install-exec: install-exec-recursive
591 install-data: install-data-recursive
592 uninstall: uninstall-recursive
593
594 install-am: all-am
595 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
596
597 installcheck: installcheck-recursive
598 install-strip:
599 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
600 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
601 `test -z '$(STRIP)' || \
602 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
603 mostlyclean-generic:
604
605 clean-generic:
606
607 distclean-generic:
608 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
609 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
610
611 maintainer-clean-generic:
612 @echo "This command is intended for maintainers to use"
613 @echo "it deletes files that may require special tools to rebuild."
614 clean: clean-recursive
615
616 clean-am: clean-generic clean-libtool clean-local mostlyclean-am
617
618 distclean: distclean-recursive
619 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
620 -rm -f Makefile
621 distclean-am: clean-am distclean-generic distclean-hdr \
622 distclean-libtool distclean-tags
623
624 dvi: dvi-recursive
625
626 dvi-am:
627
628 html: html-recursive
629
630 info: info-recursive
631
632 info-am:
633
634 install-data-am:
635
636 install-dvi: install-dvi-recursive
637
638 install-exec-am:
639
640 install-html: install-html-recursive
641
642 install-info: install-info-recursive
643
644 install-man:
645
646 install-pdf: install-pdf-recursive
647
648 install-ps: install-ps-recursive
649
650 installcheck-am:
651
652 maintainer-clean: maintainer-clean-recursive
653 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
654 -rm -rf $(top_srcdir)/autom4te.cache
655 -rm -f Makefile
656 maintainer-clean-am: distclean-am maintainer-clean-generic
657
658 mostlyclean: mostlyclean-recursive
659
660 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
661
662 pdf: pdf-recursive
663
664 pdf-am:
665
666 ps: ps-recursive
667
668 ps-am:
669
670 uninstall-am:
671
672 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
673 install-strip
674
675 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
676 all all-am am--refresh check check-am clean clean-generic \
677 clean-libtool clean-local ctags ctags-recursive dist dist-all \
678 dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip distcheck \
679 distclean distclean-generic distclean-hdr distclean-libtool \
680 distclean-tags distcleancheck distdir distuninstallcheck dvi \
681 dvi-am html html-am info info-am install install-am \
682 install-data install-data-am install-dvi install-dvi-am \
683 install-exec install-exec-am install-html install-html-am \
684 install-info install-info-am install-man install-pdf \
685 install-pdf-am install-ps install-ps-am install-strip \
686 installcheck installcheck-am installdirs installdirs-am \
687 maintainer-clean maintainer-clean-generic mostlyclean \
688 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
689 tags tags-recursive uninstall uninstall-am
690
691
692 clean-local :
693 rm -f *~ po/*~
694 # Tell versions [3.59,3.63) of GNU make to not export all variables.
695 # Otherwise a system limit (for SysV at least) may be exceeded.
696 .NOEXPORT:
0 ==========
1 PolicyKit-gnome 0.5
2 ==========
3
4 Released on August 31st 2007.
5
6 This is the third release of PolicyKit-gnome. An incompatible change
7 from the 0.4 release has been introduced; the signature of the method
8 ShowDialog() has changed; it now takes an X11 window ID. Pass zero
9 as the identifier if you don't have a window.
10
11 David Zeuthen (12):
12 post-release version bump to version 0.5
13 fix up i18n framework and add Danish translations
14 fix make distcheck
15 put icons on buttons to signify whether the action is permitted
16 update to work with PolicyKit HEAD's support for <define_admin_auth/>
17 break the D-Bus by taking an X11 window ID
18 add en_CA translations
19 update to be compatible with PolicyKit HEAD
20 add an example of how annotations are used
21 update danish translations and remove en_CA translations
22 rename the session daemon from polkit-gnome to polkit-gnome-manager
23 update NEWS
24
25 WARNING WARNING WARNING: do not use this software in a stable
26 distribution; there are still security sensitive things that needs to
27 be audited.
28
29 Requirements for PolicyKit-gnome 0.5
30
31 - PolicyKit == 0.5
32 - GTK+ >= 2.11
33 - dbus >= 0.90
34 - dbus-glib >= 0.71
35 - libgnome >= 2.14.0
36 - libgnome-ui >= 2.14.0
37
38 ==========
39 PolicyKit-gnome 0.4
40 ==========
41
42 Released on July 25th 2007.
43
44 This is the second release of PolicyKit-gnome.
45
46 WARNING WARNING WARNING: do not use this software in a stable
47 distribution; there are still security sensitive things that needs to
48 be audited.
49
50 Requirements for PolicyKit-gnome 0.4
51
52 - PolicyKit == 0.4
53 - GTK+ >= 2.6
54 - dbus >= 0.90
55 - dbus-glib >= 0.71
56 - libgnome >= 2.14.0
57 - libgnome-ui >= 2.14.0
58
59 ==========
60 PolicyKit-gnome 0.3
61 ==========
62
63 Released on June 20th 2007.
64
65 This is the first release of PolicyKit-gnome.
66
67 WARNING WARNING WARNING: do not use this software in a stable
68 distribution; there are still security sensitive things that needs to
69 be audited.
70
71 Requirements for PolicyKit-gnome 0.3
72
73 - PolicyKit == 0.3
74 - GTK+ >= 2.6
75 - dbus >= 0.90
76 - dbus-glib >= 0.71
77 - libgnome >= 2.14.0
78 - libgnome-ui >= 2.14.0
79
0 TODO: write me
0
1 - Extend the D-Bus interface to take an XID so the dialog can be
2 managed accordingly by the Window Manager
3
4 - Would it make sense to have a convience library libpolkit-gnome
5 that calls into the D-Bus service?
6
7 - HIGgy stuff
8
9 - Clean up the code; parts of it is somewhat a mess right now; do
10 we really need to link to libgnome and libgnome-ui?
11
12 - Support for systems that don't use the root account; e.g. instead
13 of authenticating as root, authenticate any user in e.g. the
14 'wheel' group. Probably means we need a combobox for selecting the
15 user to auth as. See also the TODO in PolicyKit
16
17 - Move the GNOME SVN (ticket ID [gnome.org #2863])
18
19 - Make the daemon exit after 30 seconds of no service requests
20
21 - Make the example use the new D-Bus system bus activation for the
22 helper as well as the (to be) setuid binary we've got now
0 # generated automatically by aclocal 1.10 -*- Autoconf -*-
1
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 # PARTICULAR PURPOSE.
12
13 m4_if(m4_PACKAGE_VERSION, [2.61],,
14 [m4_fatal([this file was generated for autoconf 2.61.
15 You have another version of autoconf. If you want to use that,
16 you should regenerate the build system entirely.], [63])])
17
18 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
19 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
20 #
21 # This file is free software, distributed under the terms of the GNU
22 # General Public License. As a special exception to the GNU General
23 # Public License, this file may be distributed as part of a program
24 # that contains a configuration script generated by Autoconf, under
25 # the same distribution terms as the rest of that program.
26 #
27 # This file can be copied and used freely without restrictions. It can
28 # be used in projects which are not available under the GNU Public License
29 # but which still want to provide support for the GNU gettext functionality.
30 #
31 # Macro to add for using GNU gettext.
32 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
33 #
34 # Modified to never use included libintl.
35 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
36 #
37 # Major rework to remove unused code
38 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
39 #
40 # Added better handling of ALL_LINGUAS from GNU gettext version
41 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
42 #
43 # Modified to require ngettext
44 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
45 #
46 # We need this here as well, since someone might use autoconf-2.5x
47 # to configure GLib then an older version to configure a package
48 # using AM_GLIB_GNU_GETTEXT
49 AC_PREREQ(2.53)
50
51 dnl
52 dnl We go to great lengths to make sure that aclocal won't
53 dnl try to pull in the installed version of these macros
54 dnl when running aclocal in the glib directory.
55 dnl
56 m4_copy([AC_DEFUN],[glib_DEFUN])
57 m4_copy([AC_REQUIRE],[glib_REQUIRE])
58 dnl
59 dnl At the end, if we're not within glib, we'll define the public
60 dnl definitions in terms of our private definitions.
61 dnl
62
63 # GLIB_LC_MESSAGES
64 #--------------------
65 glib_DEFUN([GLIB_LC_MESSAGES],
66 [AC_CHECK_HEADERS([locale.h])
67 if test $ac_cv_header_locale_h = yes; then
68 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
69 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
70 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
71 if test $am_cv_val_LC_MESSAGES = yes; then
72 AC_DEFINE(HAVE_LC_MESSAGES, 1,
73 [Define if your <locale.h> file defines LC_MESSAGES.])
74 fi
75 fi])
76
77 # GLIB_PATH_PROG_WITH_TEST
78 #----------------------------
79 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
80 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
81 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
82 [# Extract the first word of "$2", so it can be a program name with args.
83 set dummy $2; ac_word=[$]2
84 AC_MSG_CHECKING([for $ac_word])
85 AC_CACHE_VAL(ac_cv_path_$1,
86 [case "[$]$1" in
87 /*)
88 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
89 ;;
90 *)
91 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
92 for ac_dir in ifelse([$5], , $PATH, [$5]); do
93 test -z "$ac_dir" && ac_dir=.
94 if test -f $ac_dir/$ac_word; then
95 if [$3]; then
96 ac_cv_path_$1="$ac_dir/$ac_word"
97 break
98 fi
99 fi
100 done
101 IFS="$ac_save_ifs"
102 dnl If no 4th arg is given, leave the cache variable unset,
103 dnl so AC_PATH_PROGS will keep looking.
104 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
105 ])dnl
106 ;;
107 esac])dnl
108 $1="$ac_cv_path_$1"
109 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
110 AC_MSG_RESULT([$]$1)
111 else
112 AC_MSG_RESULT(no)
113 fi
114 AC_SUBST($1)dnl
115 ])
116
117 # GLIB_WITH_NLS
118 #-----------------
119 glib_DEFUN([GLIB_WITH_NLS],
120 dnl NLS is obligatory
121 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
122 USE_NLS=yes
123 AC_SUBST(USE_NLS)
124
125 gt_cv_have_gettext=no
126
127 CATOBJEXT=NONE
128 XGETTEXT=:
129 INTLLIBS=
130
131 AC_CHECK_HEADER(libintl.h,
132 [gt_cv_func_dgettext_libintl="no"
133 libintl_extra_libs=""
134
135 #
136 # First check in libc
137 #
138 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
139 [AC_TRY_LINK([
140 #include <libintl.h>
141 ],
142 [return !ngettext ("","", 1)],
143 gt_cv_func_ngettext_libc=yes,
144 gt_cv_func_ngettext_libc=no)
145 ])
146
147 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
148 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
149 [AC_TRY_LINK([
150 #include <libintl.h>
151 ],
152 [return !dgettext ("","")],
153 gt_cv_func_dgettext_libc=yes,
154 gt_cv_func_dgettext_libc=no)
155 ])
156 fi
157
158 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
159 AC_CHECK_FUNCS(bind_textdomain_codeset)
160 fi
161
162 #
163 # If we don't have everything we want, check in libintl
164 #
165 if test "$gt_cv_func_dgettext_libc" != "yes" \
166 || test "$gt_cv_func_ngettext_libc" != "yes" \
167 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
168
169 AC_CHECK_LIB(intl, bindtextdomain,
170 [AC_CHECK_LIB(intl, ngettext,
171 [AC_CHECK_LIB(intl, dgettext,
172 gt_cv_func_dgettext_libintl=yes)])])
173
174 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
175 AC_MSG_CHECKING([if -liconv is needed to use gettext])
176 AC_MSG_RESULT([])
177 AC_CHECK_LIB(intl, ngettext,
178 [AC_CHECK_LIB(intl, dcgettext,
179 [gt_cv_func_dgettext_libintl=yes
180 libintl_extra_libs=-liconv],
181 :,-liconv)],
182 :,-liconv)
183 fi
184
185 #
186 # If we found libintl, then check in it for bind_textdomain_codeset();
187 # we'll prefer libc if neither have bind_textdomain_codeset(),
188 # and both have dgettext and ngettext
189 #
190 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
191 glib_save_LIBS="$LIBS"
192 LIBS="$LIBS -lintl $libintl_extra_libs"
193 unset ac_cv_func_bind_textdomain_codeset
194 AC_CHECK_FUNCS(bind_textdomain_codeset)
195 LIBS="$glib_save_LIBS"
196
197 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
198 gt_cv_func_dgettext_libc=no
199 else
200 if test "$gt_cv_func_dgettext_libc" = "yes" \
201 && test "$gt_cv_func_ngettext_libc" = "yes"; then
202 gt_cv_func_dgettext_libintl=no
203 fi
204 fi
205 fi
206 fi
207
208 if test "$gt_cv_func_dgettext_libc" = "yes" \
209 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
210 gt_cv_have_gettext=yes
211 fi
212
213 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
214 INTLLIBS="-lintl $libintl_extra_libs"
215 fi
216
217 if test "$gt_cv_have_gettext" = "yes"; then
218 AC_DEFINE(HAVE_GETTEXT,1,
219 [Define if the GNU gettext() function is already present or preinstalled.])
220 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
221 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
222 if test "$MSGFMT" != "no"; then
223 glib_save_LIBS="$LIBS"
224 LIBS="$LIBS $INTLLIBS"
225 AC_CHECK_FUNCS(dcgettext)
226 MSGFMT_OPTS=
227 AC_MSG_CHECKING([if msgfmt accepts -c])
228 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
229 msgid ""
230 msgstr ""
231 "Content-Type: text/plain; charset=UTF-8\n"
232 "Project-Id-Version: test 1.0\n"
233 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
234 "Last-Translator: test <foo@bar.xx>\n"
235 "Language-Team: C <LL@li.org>\n"
236 "MIME-Version: 1.0\n"
237 "Content-Transfer-Encoding: 8bit\n"
238 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
239 AC_SUBST(MSGFMT_OPTS)
240 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
241 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
242 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
243 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
244 return _nl_msg_cat_cntr],
245 [CATOBJEXT=.gmo
246 DATADIRNAME=share],
247 [case $host in
248 *-*-solaris*)
249 dnl On Solaris, if bind_textdomain_codeset is in libc,
250 dnl GNU format message catalog is always supported,
251 dnl since both are added to the libc all together.
252 dnl Hence, we'd like to go with DATADIRNAME=share and
253 dnl and CATOBJEXT=.gmo in this case.
254 AC_CHECK_FUNC(bind_textdomain_codeset,
255 [CATOBJEXT=.gmo
256 DATADIRNAME=share],
257 [CATOBJEXT=.mo
258 DATADIRNAME=lib])
259 ;;
260 *)
261 CATOBJEXT=.mo
262 DATADIRNAME=lib
263 ;;
264 esac])
265 LIBS="$glib_save_LIBS"
266 INSTOBJEXT=.mo
267 else
268 gt_cv_have_gettext=no
269 fi
270 fi
271 ])
272
273 if test "$gt_cv_have_gettext" = "yes" ; then
274 AC_DEFINE(ENABLE_NLS, 1,
275 [always defined to indicate that i18n is enabled])
276 fi
277
278 dnl Test whether we really found GNU xgettext.
279 if test "$XGETTEXT" != ":"; then
280 dnl If it is not GNU xgettext we define it as : so that the
281 dnl Makefiles still can work.
282 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
283 : ;
284 else
285 AC_MSG_RESULT(
286 [found xgettext program is not GNU xgettext; ignore it])
287 XGETTEXT=":"
288 fi
289 fi
290
291 # We need to process the po/ directory.
292 POSUB=po
293
294 AC_OUTPUT_COMMANDS(
295 [case "$CONFIG_FILES" in *po/Makefile.in*)
296 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
297 esac])
298
299 dnl These rules are solely for the distribution goal. While doing this
300 dnl we only have to keep exactly one list of the available catalogs
301 dnl in configure.in.
302 for lang in $ALL_LINGUAS; do
303 GMOFILES="$GMOFILES $lang.gmo"
304 POFILES="$POFILES $lang.po"
305 done
306
307 dnl Make all variables we use known to autoconf.
308 AC_SUBST(CATALOGS)
309 AC_SUBST(CATOBJEXT)
310 AC_SUBST(DATADIRNAME)
311 AC_SUBST(GMOFILES)
312 AC_SUBST(INSTOBJEXT)
313 AC_SUBST(INTLLIBS)
314 AC_SUBST(PO_IN_DATADIR_TRUE)
315 AC_SUBST(PO_IN_DATADIR_FALSE)
316 AC_SUBST(POFILES)
317 AC_SUBST(POSUB)
318 ])
319
320 # AM_GLIB_GNU_GETTEXT
321 # -------------------
322 # Do checks necessary for use of gettext. If a suitable implementation
323 # of gettext is found in either in libintl or in the C library,
324 # it will set INTLLIBS to the libraries needed for use of gettext
325 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
326 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
327 # on various variables needed by the Makefile.in.in installed by
328 # glib-gettextize.
329 dnl
330 glib_DEFUN([GLIB_GNU_GETTEXT],
331 [AC_REQUIRE([AC_PROG_CC])dnl
332 AC_REQUIRE([AC_HEADER_STDC])dnl
333
334 GLIB_LC_MESSAGES
335 GLIB_WITH_NLS
336
337 if test "$gt_cv_have_gettext" = "yes"; then
338 if test "x$ALL_LINGUAS" = "x"; then
339 LINGUAS=
340 else
341 AC_MSG_CHECKING(for catalogs to be installed)
342 NEW_LINGUAS=
343 for presentlang in $ALL_LINGUAS; do
344 useit=no
345 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
346 desiredlanguages="$LINGUAS"
347 else
348 desiredlanguages="$ALL_LINGUAS"
349 fi
350 for desiredlang in $desiredlanguages; do
351 # Use the presentlang catalog if desiredlang is
352 # a. equal to presentlang, or
353 # b. a variant of presentlang (because in this case,
354 # presentlang can be used as a fallback for messages
355 # which are not translated in the desiredlang catalog).
356 case "$desiredlang" in
357 "$presentlang"*) useit=yes;;
358 esac
359 done
360 if test $useit = yes; then
361 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
362 fi
363 done
364 LINGUAS=$NEW_LINGUAS
365 AC_MSG_RESULT($LINGUAS)
366 fi
367
368 dnl Construct list of names of catalog files to be constructed.
369 if test -n "$LINGUAS"; then
370 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
371 fi
372 fi
373
374 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
375 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
376 dnl Try to locate is.
377 MKINSTALLDIRS=
378 if test -n "$ac_aux_dir"; then
379 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
380 fi
381 if test -z "$MKINSTALLDIRS"; then
382 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
383 fi
384 AC_SUBST(MKINSTALLDIRS)
385
386 dnl Generate list of files to be processed by xgettext which will
387 dnl be included in po/Makefile.
388 test -d po || mkdir po
389 if test "x$srcdir" != "x."; then
390 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
391 posrcprefix="$srcdir/"
392 else
393 posrcprefix="../$srcdir/"
394 fi
395 else
396 posrcprefix="../"
397 fi
398 rm -f po/POTFILES
399 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
400 < $srcdir/po/POTFILES.in > po/POTFILES
401 ])
402
403 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
404 # -------------------------------
405 # Define VARIABLE to the location where catalog files will
406 # be installed by po/Makefile.
407 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
408 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
409 glib_save_prefix="$prefix"
410 glib_save_exec_prefix="$exec_prefix"
411 glib_save_datarootdir="$datarootdir"
412 test "x$prefix" = xNONE && prefix=$ac_default_prefix
413 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
414 datarootdir=`eval echo "${datarootdir}"`
415 if test "x$CATOBJEXT" = "x.mo" ; then
416 localedir=`eval echo "${libdir}/locale"`
417 else
418 localedir=`eval echo "${datadir}/locale"`
419 fi
420 prefix="$glib_save_prefix"
421 exec_prefix="$glib_save_exec_prefix"
422 datarootdir="$glib_save_datarootdir"
423 AC_DEFINE_UNQUOTED($1, "$localedir",
424 [Define the location where the catalogs will be installed])
425 ])
426
427 dnl
428 dnl Now the definitions that aclocal will find
429 dnl
430 ifdef(glib_configure_in,[],[
431 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
432 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
433 ])dnl
434
435 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
436 #
437 # Create a temporary file with TEST-FILE as its contents and pass the
438 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
439 # 0 and perform ACTION-IF-FAIL for any other exit status.
440 AC_DEFUN([GLIB_RUN_PROG],
441 [cat >conftest.foo <<_ACEOF
442 $2
443 _ACEOF
444 if AC_RUN_LOG([$1 conftest.foo]); then
445 m4_ifval([$3], [$3], [:])
446 m4_ifvaln([$4], [else $4])dnl
447 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
448 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
449 fi])
450
451
452 # gnome-common.m4
453 #
454
455 dnl GNOME_COMMON_INIT
456
457 AC_DEFUN([GNOME_COMMON_INIT],
458 [
459 dnl this macro should come after AC_CONFIG_MACRO_DIR
460 AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
461
462 dnl ensure that when the Automake generated makefile calls aclocal,
463 dnl it honours the $ACLOCAL_FLAGS environment variable
464 ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
465 if test -n "$ac_macro_dir"; then
466 ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
467 fi
468
469 AC_SUBST([ACLOCAL_AMFLAGS])
470 ])
471
472 AC_DEFUN([GNOME_DEBUG_CHECK],
473 [
474 AC_ARG_ENABLE([debug],
475 AC_HELP_STRING([--enable-debug],
476 [turn on debugging]),,
477 [enable_debug=no])
478
479 if test x$enable_debug = xyes ; then
480 AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
481 [Enable additional debugging at the expense of performance and size])
482 fi
483 ])
484
485 dnl GNOME_MAINTAINER_MODE_DEFINES ()
486 dnl define DISABLE_DEPRECATED
487 dnl
488 AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
489 [
490 AC_REQUIRE([AM_MAINTAINER_MODE])
491
492 if test $USE_MAINTAINER_MODE = yes; then
493 DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED"
494 else
495 DISABLE_DEPRECATED=""
496 fi
497 AC_SUBST(DISABLE_DEPRECATED)
498 ])
499
500 dnl GNOME_COMPILE_WARNINGS
501 dnl Turn on many useful compiler warnings
502 dnl For now, only works on GCC
503 AC_DEFUN([GNOME_COMPILE_WARNINGS],[
504 dnl ******************************
505 dnl More compiler warnings
506 dnl ******************************
507
508 AC_ARG_ENABLE(compile-warnings,
509 AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
510 [Turn on compiler warnings]),,
511 [enable_compile_warnings="m4_default([$1],[yes])"])
512
513 warnCFLAGS=
514 if test "x$GCC" != xyes; then
515 enable_compile_warnings=no
516 fi
517
518 warning_flags=
519 realsave_CFLAGS="$CFLAGS"
520
521 case "$enable_compile_warnings" in
522 no)
523 warning_flags=
524 ;;
525 minimum)
526 warning_flags="-Wall"
527 ;;
528 yes)
529 warning_flags="-Wall -Wmissing-prototypes"
530 ;;
531 maximum|error)
532 warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
533 CFLAGS="$warning_flags $CFLAGS"
534 for option in -Wno-sign-compare; do
535 SAVE_CFLAGS="$CFLAGS"
536 CFLAGS="$CFLAGS $option"
537 AC_MSG_CHECKING([whether gcc understands $option])
538 AC_TRY_COMPILE([], [],
539 has_option=yes,
540 has_option=no,)
541 CFLAGS="$SAVE_CFLAGS"
542 AC_MSG_RESULT($has_option)
543 if test $has_option = yes; then
544 warning_flags="$warning_flags $option"
545 fi
546 unset has_option
547 unset SAVE_CFLAGS
548 done
549 unset option
550 if test "$enable_compile_warnings" = "error" ; then
551 warning_flags="$warning_flags -Werror"
552 fi
553 ;;
554 *)
555 AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
556 ;;
557 esac
558 CFLAGS="$realsave_CFLAGS"
559 AC_MSG_CHECKING(what warning flags to pass to the C compiler)
560 AC_MSG_RESULT($warning_flags)
561
562 AC_ARG_ENABLE(iso-c,
563 AC_HELP_STRING([--enable-iso-c],
564 [Try to warn if code is not ISO C ]),,
565 [enable_iso_c=no])
566
567 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
568 complCFLAGS=
569 if test "x$enable_iso_c" != "xno"; then
570 if test "x$GCC" = "xyes"; then
571 case " $CFLAGS " in
572 *[\ \ ]-ansi[\ \ ]*) ;;
573 *) complCFLAGS="$complCFLAGS -ansi" ;;
574 esac
575 case " $CFLAGS " in
576 *[\ \ ]-pedantic[\ \ ]*) ;;
577 *) complCFLAGS="$complCFLAGS -pedantic" ;;
578 esac
579 fi
580 fi
581 AC_MSG_RESULT($complCFLAGS)
582
583 WARN_CFLAGS="$warning_flags $complCFLAGS"
584 AC_SUBST(WARN_CFLAGS)
585 ])
586
587 dnl For C++, do basically the same thing.
588
589 AC_DEFUN([GNOME_CXX_WARNINGS],[
590 AC_ARG_ENABLE(cxx-warnings,
591 AC_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
592 [Turn on compiler warnings.]),,
593 [enable_cxx_warnings="m4_default([$1],[minimum])"])
594
595 AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
596 warnCXXFLAGS=
597 if test "x$GXX" != xyes; then
598 enable_cxx_warnings=no
599 fi
600 if test "x$enable_cxx_warnings" != "xno"; then
601 if test "x$GXX" = "xyes"; then
602 case " $CXXFLAGS " in
603 *[\ \ ]-Wall[\ \ ]*) ;;
604 *) warnCXXFLAGS="-Wall -Wno-unused" ;;
605 esac
606
607 ## -W is not all that useful. And it cannot be controlled
608 ## with individual -Wno-xxx flags, unlike -Wall
609 if test "x$enable_cxx_warnings" = "xyes"; then
610 warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
611 fi
612 fi
613 fi
614 AC_MSG_RESULT($warnCXXFLAGS)
615
616 AC_ARG_ENABLE(iso-cxx,
617 AC_HELP_STRING([--enable-iso-cxx],
618 [Try to warn if code is not ISO C++ ]),,
619 [enable_iso_cxx=no])
620
621 AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
622 complCXXFLAGS=
623 if test "x$enable_iso_cxx" != "xno"; then
624 if test "x$GXX" = "xyes"; then
625 case " $CXXFLAGS " in
626 *[\ \ ]-ansi[\ \ ]*) ;;
627 *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
628 esac
629
630 case " $CXXFLAGS " in
631 *[\ \ ]-pedantic[\ \ ]*) ;;
632 *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
633 esac
634 fi
635 fi
636 AC_MSG_RESULT($complCXXFLAGS)
637
638 WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
639 AC_SUBST(WARN_CXXFLAGS)
640 ])
641
642 dnl Do not call GNOME_DOC_DEFINES directly. It is split out from
643 dnl GNOME_DOC_INIT to allow gnome-doc-utils to bootstrap off itself.
644 AC_DEFUN([GNOME_DOC_DEFINES],
645 [
646 AC_ARG_WITH([help-dir],
647 AC_HELP_STRING([--with-help-dir=DIR], [path to help docs]),,
648 [with_help_dir='${datadir}/gnome/help'])
649 HELP_DIR="$with_help_dir"
650 AC_SUBST(HELP_DIR)
651
652 AC_ARG_WITH([omf-dir],
653 AC_HELP_STRING([--with-omf-dir=DIR], [path to OMF files]),,
654 [with_omf_dir='${datadir}/omf'])
655 OMF_DIR="$with_omf_dir"
656 AC_SUBST(OMF_DIR)
657
658 AC_ARG_WITH([help-formats],
659 AC_HELP_STRING([--with-help-formats=FORMATS], [list of formats]),,
660 [with_help_formats=''])
661 DOC_USER_FORMATS="$with_help_formats"
662 AC_SUBST(DOC_USER_FORMATS)
663
664 AC_ARG_ENABLE([scrollkeeper],
665 [AC_HELP_STRING([--disable-scrollkeeper],
666 [do not make updates to the scrollkeeper database])],,
667 enable_scrollkeeper=yes)
668 AM_CONDITIONAL([ENABLE_SK],[test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"])
669
670 AM_CONDITIONAL([HAVE_GNOME_DOC_UTILS],[test "$gdu_cv_have_gdu" = "yes"])
671 ])
672
673 # GNOME_DOC_INIT ([MINIMUM-VERSION],[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
674 #
675 AC_DEFUN([GNOME_DOC_INIT],
676 [
677 ifelse([$1],,[gdu_cv_version_required=0.3.2],[gdu_cv_version_required=$1])
678
679 PKG_CHECK_EXISTS([gnome-doc-utils >= $gdu_cv_version_required],
680 [gdu_cv_have_gdu=yes],[gdu_cv_have_gdu=no])
681
682 if test "$gdu_cv_have_gdu" = "yes"; then
683 ifelse([$2],,[:],[$2])
684 else
685 ifelse([$3],,[AC_MSG_ERROR([gnome-doc-utils >= $gdu_cv_version_required not found])],[$3])
686 fi
687
688 GNOME_DOC_DEFINES
689 ])
690
691
692 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
693 # serial 36 IT_PROG_INTLTOOL
694 AC_DEFUN([IT_PROG_INTLTOOL],
695 [AC_PREREQ([2.50])dnl
696
697 case "$am__api_version" in
698 1.[01234])
699 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
700 ;;
701 *)
702 ;;
703 esac
704
705 if test -n "$1"; then
706 AC_MSG_CHECKING([for intltool >= $1])
707
708 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
709 INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
710 [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
711 ]
712 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
713 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
714 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
715 fi
716
717 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
718 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
719 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
720 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
721 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
722 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
723 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
724 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
725 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
726 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
727 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
728 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
729 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
730 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
731 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
732 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
733 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
734 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
735 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
736
737 AC_SUBST(INTLTOOL_DESKTOP_RULE)
738 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
739 AC_SUBST(INTLTOOL_KEYS_RULE)
740 AC_SUBST(INTLTOOL_PROP_RULE)
741 AC_SUBST(INTLTOOL_OAF_RULE)
742 AC_SUBST(INTLTOOL_PONG_RULE)
743 AC_SUBST(INTLTOOL_SERVER_RULE)
744 AC_SUBST(INTLTOOL_SHEET_RULE)
745 AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
746 AC_SUBST(INTLTOOL_UI_RULE)
747 AC_SUBST(INTLTOOL_XAM_RULE)
748 AC_SUBST(INTLTOOL_KBD_RULE)
749 AC_SUBST(INTLTOOL_XML_RULE)
750 AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
751 AC_SUBST(INTLTOOL_CAVES_RULE)
752 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
753 AC_SUBST(INTLTOOL_THEME_RULE)
754 AC_SUBST(INTLTOOL_SERVICE_RULE)
755 AC_SUBST(INTLTOOL_POLICY_RULE)
756
757 # Use the tools built into the package, not the ones that are installed.
758 AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
759 AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
760 AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
761
762 AC_PATH_PROG(INTLTOOL_PERL, perl)
763 if test -z "$INTLTOOL_PERL"; then
764 AC_MSG_ERROR([perl not found; required for intltool])
765 fi
766 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
767 AC_MSG_ERROR([perl 5.x required for intltool])
768 fi
769 if test "x$2" != "xno-xml"; then
770 AC_MSG_CHECKING([for XML::Parser])
771 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
772 AC_MSG_RESULT([ok])
773 else
774 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
775 fi
776 fi
777
778 # Substitute ALL_LINGUAS so we can use it in po/Makefile
779 AC_SUBST(ALL_LINGUAS)
780
781 # Set DATADIRNAME correctly if it is not set yet
782 # (copied from glib-gettext.m4)
783 if test -z "$DATADIRNAME"; then
784 AC_LINK_IFELSE(
785 [AC_LANG_PROGRAM([[]],
786 [[extern int _nl_msg_cat_cntr;
787 return _nl_msg_cat_cntr]])],
788 [DATADIRNAME=share],
789 [case $host in
790 *-*-solaris*)
791 dnl On Solaris, if bind_textdomain_codeset is in libc,
792 dnl GNU format message catalog is always supported,
793 dnl since both are added to the libc all together.
794 dnl Hence, we'd like to go with DATADIRNAME=share
795 dnl in this case.
796 AC_CHECK_FUNC(bind_textdomain_codeset,
797 [DATADIRNAME=share], [DATADIRNAME=lib])
798 ;;
799 *)
800 [DATADIRNAME=lib]
801 ;;
802 esac])
803 fi
804 AC_SUBST(DATADIRNAME)
805
806 IT_PO_SUBDIR([po])
807
808 dnl The following is very similar to
809 dnl
810 dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
811 dnl
812 dnl with the following slight differences:
813 dnl - the *.in files are in ac_aux_dir,
814 dnl - if the file haven't changed upon reconfigure, it's not touched,
815 dnl - the evaluation of the third parameter enables a hack which computes
816 dnl the actual value of $libdir,
817 dnl - the user sees "executing intltool commands", instead of
818 dnl "creating intltool-extract" and such.
819 dnl
820 dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
821 dnl a reason for it.
822
823 AC_CONFIG_COMMANDS([intltool], [
824
825 for file in intltool-extract intltool-merge intltool-update; do
826 sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
827 -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
828 -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
829 < ${ac_aux_dir}/${file}.in > ${file}.out
830 if cmp -s ${file} ${file}.out 2>/dev/null; then
831 rm -f ${file}.out
832 else
833 mv -f ${file}.out ${file}
834 fi
835 chmod ugo+x ${file}
836 chmod u+w ${file}
837 done
838
839 ],
840 [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
841 prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
842 INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
843
844 ])
845
846
847 # IT_PO_SUBDIR(DIRNAME)
848 # ---------------------
849 # All po subdirs have to be declared with this macro; the subdir "po" is
850 # declared by IT_PROG_INTLTOOL.
851 #
852 AC_DEFUN([IT_PO_SUBDIR],
853 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
854 dnl
855 dnl The following CONFIG_COMMANDS should be exetuted at the very end
856 dnl of config.status.
857 AC_CONFIG_COMMANDS_PRE([
858 AC_CONFIG_COMMANDS([$1/stamp-it], [
859 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
860 >"$1/stamp-it.tmp"
861 [sed '/^#/d
862 s/^[[].*] *//
863 /^[ ]*$/d
864 '"s|^| $ac_top_srcdir/|" \
865 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
866 ]
867 if test ! -f "$1/Makefile"; then
868 AC_MSG_ERROR([$1/Makefile is not ready.])
869 fi
870 mv "$1/Makefile" "$1/Makefile.tmp"
871 [sed '/^POTFILES =/,/[^\\]$/ {
872 /^POTFILES =/!d
873 r $1/POTFILES
874 }
875 ' "$1/Makefile.tmp" >"$1/Makefile"]
876 rm -f "$1/Makefile.tmp"
877 mv "$1/stamp-it.tmp" "$1/stamp-it"
878 ])
879 ])dnl
880 ])
881
882
883 # deprecated macros
884 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
885 # A hint is needed for aclocal from Automake <= 1.9.4:
886 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
887
888
889 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
890
891 # serial 51 AC_PROG_LIBTOOL
892
893
894 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
895 # -----------------------------------------------------------
896 # If this macro is not defined by Autoconf, define it here.
897 m4_ifdef([AC_PROVIDE_IFELSE],
898 [],
899 [m4_define([AC_PROVIDE_IFELSE],
900 [m4_ifdef([AC_PROVIDE_$1],
901 [$2], [$3])])])
902
903
904 # AC_PROG_LIBTOOL
905 # ---------------
906 AC_DEFUN([AC_PROG_LIBTOOL],
907 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
908 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
909 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
910 AC_PROVIDE_IFELSE([AC_PROG_CXX],
911 [AC_LIBTOOL_CXX],
912 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
913 ])])
914 dnl And a similar setup for Fortran 77 support
915 AC_PROVIDE_IFELSE([AC_PROG_F77],
916 [AC_LIBTOOL_F77],
917 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
918 ])])
919
920 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
921 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
922 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
923 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
924 [AC_LIBTOOL_GCJ],
925 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
926 [AC_LIBTOOL_GCJ],
927 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
928 [AC_LIBTOOL_GCJ],
929 [ifdef([AC_PROG_GCJ],
930 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
931 ifdef([A][M_PROG_GCJ],
932 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
933 ifdef([LT_AC_PROG_GCJ],
934 [define([LT_AC_PROG_GCJ],
935 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
936 ])])# AC_PROG_LIBTOOL
937
938
939 # _AC_PROG_LIBTOOL
940 # ----------------
941 AC_DEFUN([_AC_PROG_LIBTOOL],
942 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
943 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
944 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
945 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
946
947 # This can be used to rebuild libtool when needed
948 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
949
950 # Always use our own libtool.
951 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
952 AC_SUBST(LIBTOOL)dnl
953
954 # Prevent multiple expansion
955 define([AC_PROG_LIBTOOL], [])
956 ])# _AC_PROG_LIBTOOL
957
958
959 # AC_LIBTOOL_SETUP
960 # ----------------
961 AC_DEFUN([AC_LIBTOOL_SETUP],
962 [AC_PREREQ(2.50)dnl
963 AC_REQUIRE([AC_ENABLE_SHARED])dnl
964 AC_REQUIRE([AC_ENABLE_STATIC])dnl
965 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
966 AC_REQUIRE([AC_CANONICAL_HOST])dnl
967 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
968 AC_REQUIRE([AC_PROG_CC])dnl
969 AC_REQUIRE([AC_PROG_LD])dnl
970 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
971 AC_REQUIRE([AC_PROG_NM])dnl
972
973 AC_REQUIRE([AC_PROG_LN_S])dnl
974 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
975 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
976 AC_REQUIRE([AC_OBJEXT])dnl
977 AC_REQUIRE([AC_EXEEXT])dnl
978 dnl
979
980 AC_LIBTOOL_SYS_MAX_CMD_LEN
981 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
982 AC_LIBTOOL_OBJDIR
983
984 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
985 _LT_AC_PROG_ECHO_BACKSLASH
986
987 case $host_os in
988 aix3*)
989 # AIX sometimes has problems with the GCC collect2 program. For some
990 # reason, if we set the COLLECT_NAMES environment variable, the problems
991 # vanish in a puff of smoke.
992 if test "X${COLLECT_NAMES+set}" != Xset; then
993 COLLECT_NAMES=
994 export COLLECT_NAMES
995 fi
996 ;;
997 esac
998
999 # Sed substitution that helps us do robust quoting. It backslashifies
1000 # metacharacters that are still active within double-quoted strings.
1001 Xsed='sed -e 1s/^X//'
1002 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1003
1004 # Same as above, but do not quote variable references.
1005 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1006
1007 # Sed substitution to delay expansion of an escaped shell variable in a
1008 # double_quote_subst'ed string.
1009 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1010
1011 # Sed substitution to avoid accidental globbing in evaled expressions
1012 no_glob_subst='s/\*/\\\*/g'
1013
1014 # Constants:
1015 rm="rm -f"
1016
1017 # Global variables:
1018 default_ofile=libtool
1019 can_build_shared=yes
1020
1021 # All known linkers require a `.a' archive for static linking (except MSVC,
1022 # which needs '.lib').
1023 libext=a
1024 ltmain="$ac_aux_dir/ltmain.sh"
1025 ofile="$default_ofile"
1026 with_gnu_ld="$lt_cv_prog_gnu_ld"
1027
1028 AC_CHECK_TOOL(AR, ar, false)
1029 AC_CHECK_TOOL(RANLIB, ranlib, :)
1030 AC_CHECK_TOOL(STRIP, strip, :)
1031
1032 old_CC="$CC"
1033 old_CFLAGS="$CFLAGS"
1034
1035 # Set sane defaults for various variables
1036 test -z "$AR" && AR=ar
1037 test -z "$AR_FLAGS" && AR_FLAGS=cru
1038 test -z "$AS" && AS=as
1039 test -z "$CC" && CC=cc
1040 test -z "$LTCC" && LTCC=$CC
1041 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1042 test -z "$DLLTOOL" && DLLTOOL=dlltool
1043 test -z "$LD" && LD=ld
1044 test -z "$LN_S" && LN_S="ln -s"
1045 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1046 test -z "$NM" && NM=nm
1047 test -z "$SED" && SED=sed
1048 test -z "$OBJDUMP" && OBJDUMP=objdump
1049 test -z "$RANLIB" && RANLIB=:
1050 test -z "$STRIP" && STRIP=:
1051 test -z "$ac_objext" && ac_objext=o
1052
1053 # Determine commands to create old-style static archives.
1054 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1055 old_postinstall_cmds='chmod 644 $oldlib'
1056 old_postuninstall_cmds=
1057
1058 if test -n "$RANLIB"; then
1059 case $host_os in
1060 openbsd*)
1061 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1062 ;;
1063 *)
1064 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1065 ;;
1066 esac
1067 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1068 fi
1069
1070 _LT_CC_BASENAME([$compiler])
1071
1072 # Only perform the check for file, if the check method requires it
1073 case $deplibs_check_method in
1074 file_magic*)
1075 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1076 AC_PATH_MAGIC
1077 fi
1078 ;;
1079 esac
1080
1081 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1082 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1083 enable_win32_dll=yes, enable_win32_dll=no)
1084
1085 AC_ARG_ENABLE([libtool-lock],
1086 [AC_HELP_STRING([--disable-libtool-lock],
1087 [avoid locking (might break parallel builds)])])
1088 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1089
1090 AC_ARG_WITH([pic],
1091 [AC_HELP_STRING([--with-pic],
1092 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1093 [pic_mode="$withval"],
1094 [pic_mode=default])
1095 test -z "$pic_mode" && pic_mode=default
1096
1097 # Use C for the default configuration in the libtool script
1098 tagname=
1099 AC_LIBTOOL_LANG_C_CONFIG
1100 _LT_AC_TAGCONFIG
1101 ])# AC_LIBTOOL_SETUP
1102
1103
1104 # _LT_AC_SYS_COMPILER
1105 # -------------------
1106 AC_DEFUN([_LT_AC_SYS_COMPILER],
1107 [AC_REQUIRE([AC_PROG_CC])dnl
1108
1109 # If no C compiler was specified, use CC.
1110 LTCC=${LTCC-"$CC"}
1111
1112 # If no C compiler flags were specified, use CFLAGS.
1113 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1114
1115 # Allow CC to be a program name with arguments.
1116 compiler=$CC
1117 ])# _LT_AC_SYS_COMPILER
1118
1119
1120 # _LT_CC_BASENAME(CC)
1121 # -------------------
1122 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1123 AC_DEFUN([_LT_CC_BASENAME],
1124 [for cc_temp in $1""; do
1125 case $cc_temp in
1126 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1127 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1128 \-*) ;;
1129 *) break;;
1130 esac
1131 done
1132 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1133 ])
1134
1135
1136 # _LT_COMPILER_BOILERPLATE
1137 # ------------------------
1138 # Check for compiler boilerplate output or warnings with
1139 # the simple compiler test code.
1140 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1141 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1142 ac_outfile=conftest.$ac_objext
1143 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1144 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1145 _lt_compiler_boilerplate=`cat conftest.err`
1146 $rm conftest*
1147 ])# _LT_COMPILER_BOILERPLATE
1148
1149
1150 # _LT_LINKER_BOILERPLATE
1151 # ----------------------
1152 # Check for linker boilerplate output or warnings with
1153 # the simple link test code.
1154 AC_DEFUN([_LT_LINKER_BOILERPLATE],
1155 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1156 ac_outfile=conftest.$ac_objext
1157 echo "$lt_simple_link_test_code" >conftest.$ac_ext
1158 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1159 _lt_linker_boilerplate=`cat conftest.err`
1160 $rm conftest*
1161 ])# _LT_LINKER_BOILERPLATE
1162
1163
1164 # _LT_AC_SYS_LIBPATH_AIX
1165 # ----------------------
1166 # Links a minimal program and checks the executable
1167 # for the system default hardcoded library path. In most cases,
1168 # this is /usr/lib:/lib, but when the MPI compilers are used
1169 # the location of the communication and MPI libs are included too.
1170 # If we don't find anything, use the default library path according
1171 # to the aix ld manual.
1172 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1173 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1174 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1175 lt_aix_libpath_sed='
1176 /Import File Strings/,/^$/ {
1177 /^0/ {
1178 s/^0 *\(.*\)$/\1/
1179 p
1180 }
1181 }'
1182 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1183 # Check for a 64-bit object if we didn't find anything.
1184 if test -z "$aix_libpath"; then
1185 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1186 fi],[])
1187 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1188 ])# _LT_AC_SYS_LIBPATH_AIX
1189
1190
1191 # _LT_AC_SHELL_INIT(ARG)
1192 # ----------------------
1193 AC_DEFUN([_LT_AC_SHELL_INIT],
1194 [ifdef([AC_DIVERSION_NOTICE],
1195 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1196 [AC_DIVERT_PUSH(NOTICE)])
1197 $1
1198 AC_DIVERT_POP
1199 ])# _LT_AC_SHELL_INIT
1200
1201
1202 # _LT_AC_PROG_ECHO_BACKSLASH
1203 # --------------------------
1204 # Add some code to the start of the generated configure script which
1205 # will find an echo command which doesn't interpret backslashes.
1206 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1207 [_LT_AC_SHELL_INIT([
1208 # Check that we are running under the correct shell.
1209 SHELL=${CONFIG_SHELL-/bin/sh}
1210
1211 case X$ECHO in
1212 X*--fallback-echo)
1213 # Remove one level of quotation (which was required for Make).
1214 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1215 ;;
1216 esac
1217
1218 echo=${ECHO-echo}
1219 if test "X[$]1" = X--no-reexec; then
1220 # Discard the --no-reexec flag, and continue.
1221 shift
1222 elif test "X[$]1" = X--fallback-echo; then
1223 # Avoid inline document here, it may be left over
1224 :
1225 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1226 # Yippee, $echo works!
1227 :
1228 else
1229 # Restart under the correct shell.
1230 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1231 fi
1232
1233 if test "X[$]1" = X--fallback-echo; then
1234 # used as fallback echo
1235 shift
1236 cat <<EOF
1237 [$]*
1238 EOF
1239 exit 0
1240 fi
1241
1242 # The HP-UX ksh and POSIX shell print the target directory to stdout
1243 # if CDPATH is set.
1244 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1245
1246 if test -z "$ECHO"; then
1247 if test "X${echo_test_string+set}" != Xset; then
1248 # find a string as large as possible, as long as the shell can cope with it
1249 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1250 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1251 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1252 echo_test_string=`eval $cmd` &&
1253 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1254 then
1255 break
1256 fi
1257 done
1258 fi
1259
1260 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1261 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1262 test "X$echo_testing_string" = "X$echo_test_string"; then
1263 :
1264 else
1265 # The Solaris, AIX, and Digital Unix default echo programs unquote
1266 # backslashes. This makes it impossible to quote backslashes using
1267 # echo "$something" | sed 's/\\/\\\\/g'
1268 #
1269 # So, first we look for a working echo in the user's PATH.
1270
1271 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1272 for dir in $PATH /usr/ucb; do
1273 IFS="$lt_save_ifs"
1274 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1275 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1276 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1277 test "X$echo_testing_string" = "X$echo_test_string"; then
1278 echo="$dir/echo"
1279 break
1280 fi
1281 done
1282 IFS="$lt_save_ifs"
1283
1284 if test "X$echo" = Xecho; then
1285 # We didn't find a better echo, so look for alternatives.
1286 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1287 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1288 test "X$echo_testing_string" = "X$echo_test_string"; then
1289 # This shell has a builtin print -r that does the trick.
1290 echo='print -r'
1291 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1292 test "X$CONFIG_SHELL" != X/bin/ksh; then
1293 # If we have ksh, try running configure again with it.
1294 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1295 export ORIGINAL_CONFIG_SHELL
1296 CONFIG_SHELL=/bin/ksh
1297 export CONFIG_SHELL
1298 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1299 else
1300 # Try using printf.
1301 echo='printf %s\n'
1302 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1303 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1304 test "X$echo_testing_string" = "X$echo_test_string"; then
1305 # Cool, printf works
1306 :
1307 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1308 test "X$echo_testing_string" = 'X\t' &&
1309 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1310 test "X$echo_testing_string" = "X$echo_test_string"; then
1311 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1312 export CONFIG_SHELL
1313 SHELL="$CONFIG_SHELL"
1314 export SHELL
1315 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1316 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1317 test "X$echo_testing_string" = 'X\t' &&
1318 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1319 test "X$echo_testing_string" = "X$echo_test_string"; then
1320 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1321 else
1322 # maybe with a smaller string...
1323 prev=:
1324
1325 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1326 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1327 then
1328 break
1329 fi
1330 prev="$cmd"
1331 done
1332
1333 if test "$prev" != 'sed 50q "[$]0"'; then
1334 echo_test_string=`eval $prev`
1335 export echo_test_string
1336 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1337 else
1338 # Oops. We lost completely, so just stick with echo.
1339 echo=echo
1340 fi
1341 fi
1342 fi
1343 fi
1344 fi
1345 fi
1346
1347 # Copy echo and quote the copy suitably for passing to libtool from
1348 # the Makefile, instead of quoting the original, which is used later.
1349 ECHO=$echo
1350 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1351 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1352 fi
1353
1354 AC_SUBST(ECHO)
1355 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1356
1357
1358 # _LT_AC_LOCK
1359 # -----------
1360 AC_DEFUN([_LT_AC_LOCK],
1361 [AC_ARG_ENABLE([libtool-lock],
1362 [AC_HELP_STRING([--disable-libtool-lock],
1363 [avoid locking (might break parallel builds)])])
1364 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1365
1366 # Some flags need to be propagated to the compiler or linker for good
1367 # libtool support.
1368 case $host in
1369 ia64-*-hpux*)
1370 # Find out which ABI we are using.
1371 echo 'int i;' > conftest.$ac_ext
1372 if AC_TRY_EVAL(ac_compile); then
1373 case `/usr/bin/file conftest.$ac_objext` in
1374 *ELF-32*)
1375 HPUX_IA64_MODE="32"
1376 ;;
1377 *ELF-64*)
1378 HPUX_IA64_MODE="64"
1379 ;;
1380 esac
1381 fi
1382 rm -rf conftest*
1383 ;;
1384 *-*-irix6*)
1385 # Find out which ABI we are using.
1386 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1387 if AC_TRY_EVAL(ac_compile); then
1388 if test "$lt_cv_prog_gnu_ld" = yes; then
1389 case `/usr/bin/file conftest.$ac_objext` in
1390 *32-bit*)
1391 LD="${LD-ld} -melf32bsmip"
1392 ;;
1393 *N32*)
1394 LD="${LD-ld} -melf32bmipn32"
1395 ;;
1396 *64-bit*)
1397 LD="${LD-ld} -melf64bmip"
1398 ;;
1399 esac
1400 else
1401 case `/usr/bin/file conftest.$ac_objext` in
1402 *32-bit*)
1403 LD="${LD-ld} -32"
1404 ;;
1405 *N32*)
1406 LD="${LD-ld} -n32"
1407 ;;
1408 *64-bit*)
1409 LD="${LD-ld} -64"
1410 ;;
1411 esac
1412 fi
1413 fi
1414 rm -rf conftest*
1415 ;;
1416
1417 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1418 s390*-*linux*|sparc*-*linux*)
1419 # Find out which ABI we are using.
1420 echo 'int i;' > conftest.$ac_ext
1421 if AC_TRY_EVAL(ac_compile); then
1422 case `/usr/bin/file conftest.o` in
1423 *32-bit*)
1424 case $host in
1425 x86_64-*kfreebsd*-gnu)
1426 LD="${LD-ld} -m elf_i386_fbsd"
1427 ;;
1428 x86_64-*linux*)
1429 LD="${LD-ld} -m elf_i386"
1430 ;;
1431 ppc64-*linux*|powerpc64-*linux*)
1432 LD="${LD-ld} -m elf32ppclinux"
1433 ;;
1434 s390x-*linux*)
1435 LD="${LD-ld} -m elf_s390"
1436 ;;
1437 sparc64-*linux*)
1438 LD="${LD-ld} -m elf32_sparc"
1439 ;;
1440 esac
1441 ;;
1442 *64-bit*)
1443 libsuff=64
1444 case $host in
1445 x86_64-*kfreebsd*-gnu)
1446 LD="${LD-ld} -m elf_x86_64_fbsd"
1447 ;;
1448 x86_64-*linux*)
1449 LD="${LD-ld} -m elf_x86_64"
1450 ;;
1451 ppc*-*linux*|powerpc*-*linux*)
1452 LD="${LD-ld} -m elf64ppc"
1453 ;;
1454 s390*-*linux*)
1455 LD="${LD-ld} -m elf64_s390"
1456 ;;
1457 sparc*-*linux*)
1458 LD="${LD-ld} -m elf64_sparc"
1459 ;;
1460 esac
1461 ;;
1462 esac
1463 fi
1464 rm -rf conftest*
1465 ;;
1466
1467 *-*-sco3.2v5*)
1468 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1469 SAVE_CFLAGS="$CFLAGS"
1470 CFLAGS="$CFLAGS -belf"
1471 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1472 [AC_LANG_PUSH(C)
1473 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1474 AC_LANG_POP])
1475 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1476 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1477 CFLAGS="$SAVE_CFLAGS"
1478 fi
1479 ;;
1480 sparc*-*solaris*)
1481 # Find out which ABI we are using.
1482 echo 'int i;' > conftest.$ac_ext
1483 if AC_TRY_EVAL(ac_compile); then
1484 case `/usr/bin/file conftest.o` in
1485 *64-bit*)
1486 case $lt_cv_prog_gnu_ld in
1487 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1488 *) LD="${LD-ld} -64" ;;
1489 esac
1490 ;;
1491 esac
1492 fi
1493 rm -rf conftest*
1494 ;;
1495
1496 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1497 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1498 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1499 AC_CHECK_TOOL(AS, as, false)
1500 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1501 ;;
1502 ])
1503 esac
1504
1505 need_locks="$enable_libtool_lock"
1506
1507 ])# _LT_AC_LOCK
1508
1509
1510 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1511 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1512 # ----------------------------------------------------------------
1513 # Check whether the given compiler option works
1514 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1515 [AC_REQUIRE([LT_AC_PROG_SED])
1516 AC_CACHE_CHECK([$1], [$2],
1517 [$2=no
1518 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1519 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1520 lt_compiler_flag="$3"
1521 # Insert the option either (1) after the last *FLAGS variable, or
1522 # (2) before a word containing "conftest.", or (3) at the end.
1523 # Note that $ac_compile itself does not contain backslashes and begins
1524 # with a dollar sign (not a hyphen), so the echo should work correctly.
1525 # The option is referenced via a variable to avoid confusing sed.
1526 lt_compile=`echo "$ac_compile" | $SED \
1527 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1528 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1529 -e 's:$: $lt_compiler_flag:'`
1530 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1531 (eval "$lt_compile" 2>conftest.err)
1532 ac_status=$?
1533 cat conftest.err >&AS_MESSAGE_LOG_FD
1534 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1535 if (exit $ac_status) && test -s "$ac_outfile"; then
1536 # The compiler can only warn and ignore the option if not recognized
1537 # So say no if there are warnings other than the usual output.
1538 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1539 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1540 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1541 $2=yes
1542 fi
1543 fi
1544 $rm conftest*
1545 ])
1546
1547 if test x"[$]$2" = xyes; then
1548 ifelse([$5], , :, [$5])
1549 else
1550 ifelse([$6], , :, [$6])
1551 fi
1552 ])# AC_LIBTOOL_COMPILER_OPTION
1553
1554
1555 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1556 # [ACTION-SUCCESS], [ACTION-FAILURE])
1557 # ------------------------------------------------------------
1558 # Check whether the given compiler option works
1559 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1560 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1561 AC_CACHE_CHECK([$1], [$2],
1562 [$2=no
1563 save_LDFLAGS="$LDFLAGS"
1564 LDFLAGS="$LDFLAGS $3"
1565 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1566 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1567 # The linker can only warn and ignore the option if not recognized
1568 # So say no if there are warnings
1569 if test -s conftest.err; then
1570 # Append any errors to the config.log.
1571 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1572 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1573 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1574 if diff conftest.exp conftest.er2 >/dev/null; then
1575 $2=yes
1576 fi
1577 else
1578 $2=yes
1579 fi
1580 fi
1581 $rm conftest*
1582 LDFLAGS="$save_LDFLAGS"
1583 ])
1584
1585 if test x"[$]$2" = xyes; then
1586 ifelse([$4], , :, [$4])
1587 else
1588 ifelse([$5], , :, [$5])
1589 fi
1590 ])# AC_LIBTOOL_LINKER_OPTION
1591
1592
1593 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1594 # --------------------------
1595 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1596 [# find the maximum length of command line arguments
1597 AC_MSG_CHECKING([the maximum length of command line arguments])
1598 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1599 i=0
1600 teststring="ABCD"
1601
1602 case $build_os in
1603 msdosdjgpp*)
1604 # On DJGPP, this test can blow up pretty badly due to problems in libc
1605 # (any single argument exceeding 2000 bytes causes a buffer overrun
1606 # during glob expansion). Even if it were fixed, the result of this
1607 # check would be larger than it should be.
1608 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1609 ;;
1610
1611 gnu*)
1612 # Under GNU Hurd, this test is not required because there is
1613 # no limit to the length of command line arguments.
1614 # Libtool will interpret -1 as no limit whatsoever
1615 lt_cv_sys_max_cmd_len=-1;
1616 ;;
1617
1618 cygwin* | mingw*)
1619 # On Win9x/ME, this test blows up -- it succeeds, but takes
1620 # about 5 minutes as the teststring grows exponentially.
1621 # Worse, since 9x/ME are not pre-emptively multitasking,
1622 # you end up with a "frozen" computer, even though with patience
1623 # the test eventually succeeds (with a max line length of 256k).
1624 # Instead, let's just punt: use the minimum linelength reported by
1625 # all of the supported platforms: 8192 (on NT/2K/XP).
1626 lt_cv_sys_max_cmd_len=8192;
1627 ;;
1628
1629 amigaos*)
1630 # On AmigaOS with pdksh, this test takes hours, literally.
1631 # So we just punt and use a minimum line length of 8192.
1632 lt_cv_sys_max_cmd_len=8192;
1633 ;;
1634
1635 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1636 # This has been around since 386BSD, at least. Likely further.
1637 if test -x /sbin/sysctl; then
1638 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1639 elif test -x /usr/sbin/sysctl; then
1640 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1641 else
1642 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1643 fi
1644 # And add a safety zone
1645 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1646 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1647 ;;
1648
1649 interix*)
1650 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1651 lt_cv_sys_max_cmd_len=196608
1652 ;;
1653
1654 osf*)
1655 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1656 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1657 # nice to cause kernel panics so lets avoid the loop below.
1658 # First set a reasonable default.
1659 lt_cv_sys_max_cmd_len=16384
1660 #
1661 if test -x /sbin/sysconfig; then
1662 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1663 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1664 esac
1665 fi
1666 ;;
1667 sco3.2v5*)
1668 lt_cv_sys_max_cmd_len=102400
1669 ;;
1670 sysv5* | sco5v6* | sysv4.2uw2*)
1671 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1672 if test -n "$kargmax"; then
1673 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1674 else
1675 lt_cv_sys_max_cmd_len=32768
1676 fi
1677 ;;
1678 *)
1679 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1680 if test -n "$lt_cv_sys_max_cmd_len"; then
1681 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1682 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1683 else
1684 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1685 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1686 = "XX$teststring") >/dev/null 2>&1 &&
1687 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1688 lt_cv_sys_max_cmd_len=$new_result &&
1689 test $i != 17 # 1/2 MB should be enough
1690 do
1691 i=`expr $i + 1`
1692 teststring=$teststring$teststring
1693 done
1694 teststring=
1695 # Add a significant safety factor because C++ compilers can tack on massive
1696 # amounts of additional arguments before passing them to the linker.
1697 # It appears as though 1/2 is a usable value.
1698 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1699 fi
1700 ;;
1701 esac
1702 ])
1703 if test -n $lt_cv_sys_max_cmd_len ; then
1704 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1705 else
1706 AC_MSG_RESULT(none)
1707 fi
1708 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1709
1710
1711 # _LT_AC_CHECK_DLFCN
1712 # ------------------
1713 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1714 [AC_CHECK_HEADERS(dlfcn.h)dnl
1715 ])# _LT_AC_CHECK_DLFCN
1716
1717
1718 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1719 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1720 # ---------------------------------------------------------------------
1721 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1722 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1723 if test "$cross_compiling" = yes; then :
1724 [$4]
1725 else
1726 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1727 lt_status=$lt_dlunknown
1728 cat > conftest.$ac_ext <<EOF
1729 [#line __oline__ "configure"
1730 #include "confdefs.h"
1731
1732 #if HAVE_DLFCN_H
1733 #include <dlfcn.h>
1734 #endif
1735
1736 #include <stdio.h>
1737
1738 #ifdef RTLD_GLOBAL
1739 # define LT_DLGLOBAL RTLD_GLOBAL
1740 #else
1741 # ifdef DL_GLOBAL
1742 # define LT_DLGLOBAL DL_GLOBAL
1743 # else
1744 # define LT_DLGLOBAL 0
1745 # endif
1746 #endif
1747
1748 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1749 find out it does not work in some platform. */
1750 #ifndef LT_DLLAZY_OR_NOW
1751 # ifdef RTLD_LAZY
1752 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1753 # else
1754 # ifdef DL_LAZY
1755 # define LT_DLLAZY_OR_NOW DL_LAZY
1756 # else
1757 # ifdef RTLD_NOW
1758 # define LT_DLLAZY_OR_NOW RTLD_NOW
1759 # else
1760 # ifdef DL_NOW
1761 # define LT_DLLAZY_OR_NOW DL_NOW
1762 # else
1763 # define LT_DLLAZY_OR_NOW 0
1764 # endif
1765 # endif
1766 # endif
1767 # endif
1768 #endif
1769
1770 #ifdef __cplusplus
1771 extern "C" void exit (int);
1772 #endif
1773
1774 void fnord() { int i=42;}
1775 int main ()
1776 {
1777 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1778 int status = $lt_dlunknown;
1779
1780 if (self)
1781 {
1782 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1783 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1784 /* dlclose (self); */
1785 }
1786 else
1787 puts (dlerror ());
1788
1789 exit (status);
1790 }]
1791 EOF
1792 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1793 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1794 lt_status=$?
1795 case x$lt_status in
1796 x$lt_dlno_uscore) $1 ;;
1797 x$lt_dlneed_uscore) $2 ;;
1798 x$lt_dlunknown|x*) $3 ;;
1799 esac
1800 else :
1801 # compilation failed
1802 $3
1803 fi
1804 fi
1805 rm -fr conftest*
1806 ])# _LT_AC_TRY_DLOPEN_SELF
1807
1808
1809 # AC_LIBTOOL_DLOPEN_SELF
1810 # ----------------------
1811 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1812 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1813 if test "x$enable_dlopen" != xyes; then
1814 enable_dlopen=unknown
1815 enable_dlopen_self=unknown
1816 enable_dlopen_self_static=unknown
1817 else
1818 lt_cv_dlopen=no
1819 lt_cv_dlopen_libs=
1820
1821 case $host_os in
1822 beos*)
1823 lt_cv_dlopen="load_add_on"
1824 lt_cv_dlopen_libs=
1825 lt_cv_dlopen_self=yes
1826 ;;
1827
1828 mingw* | pw32*)
1829 lt_cv_dlopen="LoadLibrary"
1830 lt_cv_dlopen_libs=
1831 ;;
1832
1833 cygwin*)
1834 lt_cv_dlopen="dlopen"
1835 lt_cv_dlopen_libs=
1836 ;;
1837
1838 darwin*)
1839 # if libdl is installed we need to link against it
1840 AC_CHECK_LIB([dl], [dlopen],
1841 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1842 lt_cv_dlopen="dyld"
1843 lt_cv_dlopen_libs=
1844 lt_cv_dlopen_self=yes
1845 ])
1846 ;;
1847
1848 *)
1849 AC_CHECK_FUNC([shl_load],
1850 [lt_cv_dlopen="shl_load"],
1851 [AC_CHECK_LIB([dld], [shl_load],
1852 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1853 [AC_CHECK_FUNC([dlopen],
1854 [lt_cv_dlopen="dlopen"],
1855 [AC_CHECK_LIB([dl], [dlopen],
1856 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1857 [AC_CHECK_LIB([svld], [dlopen],
1858 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1859 [AC_CHECK_LIB([dld], [dld_link],
1860 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1861 ])
1862 ])
1863 ])
1864 ])
1865 ])
1866 ;;
1867 esac
1868
1869 if test "x$lt_cv_dlopen" != xno; then
1870 enable_dlopen=yes
1871 else
1872 enable_dlopen=no
1873 fi
1874
1875 case $lt_cv_dlopen in
1876 dlopen)
1877 save_CPPFLAGS="$CPPFLAGS"
1878 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1879
1880 save_LDFLAGS="$LDFLAGS"
1881 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1882
1883 save_LIBS="$LIBS"
1884 LIBS="$lt_cv_dlopen_libs $LIBS"
1885
1886 AC_CACHE_CHECK([whether a program can dlopen itself],
1887 lt_cv_dlopen_self, [dnl
1888 _LT_AC_TRY_DLOPEN_SELF(
1889 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1890 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1891 ])
1892
1893 if test "x$lt_cv_dlopen_self" = xyes; then
1894 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1895 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1896 lt_cv_dlopen_self_static, [dnl
1897 _LT_AC_TRY_DLOPEN_SELF(
1898 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1899 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1900 ])
1901 fi
1902
1903 CPPFLAGS="$save_CPPFLAGS"
1904 LDFLAGS="$save_LDFLAGS"
1905 LIBS="$save_LIBS"
1906 ;;
1907 esac
1908
1909 case $lt_cv_dlopen_self in
1910 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1911 *) enable_dlopen_self=unknown ;;
1912 esac
1913
1914 case $lt_cv_dlopen_self_static in
1915 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1916 *) enable_dlopen_self_static=unknown ;;
1917 esac
1918 fi
1919 ])# AC_LIBTOOL_DLOPEN_SELF
1920
1921
1922 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1923 # ---------------------------------
1924 # Check to see if options -c and -o are simultaneously supported by compiler
1925 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1926 [AC_REQUIRE([LT_AC_PROG_SED])dnl
1927 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1928 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1929 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1930 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1931 $rm -r conftest 2>/dev/null
1932 mkdir conftest
1933 cd conftest
1934 mkdir out
1935 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1936
1937 lt_compiler_flag="-o out/conftest2.$ac_objext"
1938 # Insert the option either (1) after the last *FLAGS variable, or
1939 # (2) before a word containing "conftest.", or (3) at the end.
1940 # Note that $ac_compile itself does not contain backslashes and begins
1941 # with a dollar sign (not a hyphen), so the echo should work correctly.
1942 lt_compile=`echo "$ac_compile" | $SED \
1943 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1944 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1945 -e 's:$: $lt_compiler_flag:'`
1946 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1947 (eval "$lt_compile" 2>out/conftest.err)
1948 ac_status=$?
1949 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1950 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1951 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1952 then
1953 # The compiler can only warn and ignore the option if not recognized
1954 # So say no if there are warnings
1955 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1956 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1957 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1958 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1959 fi
1960 fi
1961 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1962 $rm conftest*
1963 # SGI C++ compiler will create directory out/ii_files/ for
1964 # template instantiation
1965 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1966 $rm out/* && rmdir out
1967 cd ..
1968 rmdir conftest
1969 $rm conftest*
1970 ])
1971 ])# AC_LIBTOOL_PROG_CC_C_O
1972
1973
1974 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1975 # -----------------------------------------
1976 # Check to see if we can do hard links to lock some files if needed
1977 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1978 [AC_REQUIRE([_LT_AC_LOCK])dnl
1979
1980 hard_links="nottested"
1981 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1982 # do not overwrite the value of need_locks provided by the user
1983 AC_MSG_CHECKING([if we can lock with hard links])
1984 hard_links=yes
1985 $rm conftest*
1986 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1987 touch conftest.a
1988 ln conftest.a conftest.b 2>&5 || hard_links=no
1989 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1990 AC_MSG_RESULT([$hard_links])
1991 if test "$hard_links" = no; then
1992 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1993 need_locks=warn
1994 fi
1995 else
1996 need_locks=no
1997 fi
1998 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1999
2000
2001 # AC_LIBTOOL_OBJDIR
2002 # -----------------
2003 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2004 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2005 [rm -f .libs 2>/dev/null
2006 mkdir .libs 2>/dev/null
2007 if test -d .libs; then
2008 lt_cv_objdir=.libs
2009 else
2010 # MS-DOS does not allow filenames that begin with a dot.
2011 lt_cv_objdir=_libs
2012 fi
2013 rmdir .libs 2>/dev/null])
2014 objdir=$lt_cv_objdir
2015 ])# AC_LIBTOOL_OBJDIR
2016
2017
2018 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2019 # ----------------------------------------------
2020 # Check hardcoding attributes.
2021 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2022 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2023 _LT_AC_TAGVAR(hardcode_action, $1)=
2024 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2025 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2026 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2027
2028 # We can hardcode non-existant directories.
2029 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2030 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2031 # have to relink, otherwise we might link with an installed library
2032 # when we should be linking with a yet-to-be-installed one
2033 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2034 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2035 # Linking always hardcodes the temporary library directory.
2036 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2037 else
2038 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2039 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2040 fi
2041 else
2042 # We cannot hardcode anything, or else we can only hardcode existing
2043 # directories.
2044 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2045 fi
2046 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2047
2048 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2049 # Fast installation is not supported
2050 enable_fast_install=no
2051 elif test "$shlibpath_overrides_runpath" = yes ||
2052 test "$enable_shared" = no; then
2053 # Fast installation is not necessary
2054 enable_fast_install=needless
2055 fi
2056 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2057
2058
2059 # AC_LIBTOOL_SYS_LIB_STRIP
2060 # ------------------------
2061 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2062 [striplib=
2063 old_striplib=
2064 AC_MSG_CHECKING([whether stripping libraries is possible])
2065 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2066 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2067 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2068 AC_MSG_RESULT([yes])
2069 else
2070 # FIXME - insert some real tests, host_os isn't really good enough
2071 case $host_os in
2072 darwin*)
2073 if test -n "$STRIP" ; then
2074 striplib="$STRIP -x"
2075 old_striplib="$STRIP -S"
2076 AC_MSG_RESULT([yes])
2077 else
2078 AC_MSG_RESULT([no])
2079 fi
2080 ;;
2081 *)
2082 AC_MSG_RESULT([no])
2083 ;;
2084 esac
2085 fi
2086 ])# AC_LIBTOOL_SYS_LIB_STRIP
2087
2088
2089 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2090 # -----------------------------
2091 # PORTME Fill in your ld.so characteristics
2092 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2093 [AC_REQUIRE([LT_AC_PROG_SED])dnl
2094 AC_MSG_CHECKING([dynamic linker characteristics])
2095 library_names_spec=
2096 libname_spec='lib$name'
2097 soname_spec=
2098 shrext_cmds=".so"
2099 postinstall_cmds=
2100 postuninstall_cmds=
2101 finish_cmds=
2102 finish_eval=
2103 shlibpath_var=
2104 shlibpath_overrides_runpath=unknown
2105 version_type=none
2106 dynamic_linker="$host_os ld.so"
2107 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2108 m4_if($1,[],[
2109 if test "$GCC" = yes; then
2110 case $host_os in
2111 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2112 *) lt_awk_arg="/^libraries:/" ;;
2113 esac
2114 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2115 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
2116 # if the path contains ";" then we assume it to be the separator
2117 # otherwise default to the standard path separator (i.e. ":") - it is
2118 # assumed that no part of a normal pathname contains ";" but that should
2119 # okay in the real world where ";" in dirpaths is itself problematic.
2120 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2121 else
2122 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2123 fi
2124 # Ok, now we have the path, separated by spaces, we can step through it
2125 # and add multilib dir if necessary.
2126 lt_tmp_lt_search_path_spec=
2127 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2128 for lt_sys_path in $lt_search_path_spec; do
2129 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2130 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2131 else
2132 test -d "$lt_sys_path" && \
2133 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2134 fi
2135 done
2136 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
2137 BEGIN {RS=" "; FS="/|\n";} {
2138 lt_foo="";
2139 lt_count=0;
2140 for (lt_i = NF; lt_i > 0; lt_i--) {
2141 if ($lt_i != "" && $lt_i != ".") {
2142 if ($lt_i == "..") {
2143 lt_count++;
2144 } else {
2145 if (lt_count == 0) {
2146 lt_foo="/" $lt_i lt_foo;
2147 } else {
2148 lt_count--;
2149 }
2150 }
2151 }
2152 }
2153 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2154 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2155 }'`
2156 sys_lib_search_path_spec=`echo $lt_search_path_spec`
2157 else
2158 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2159 fi])
2160 need_lib_prefix=unknown
2161 hardcode_into_libs=no
2162
2163 # when you set need_version to no, make sure it does not cause -set_version
2164 # flags to be left without arguments
2165 need_version=unknown
2166
2167 case $host_os in
2168 aix3*)
2169 version_type=linux
2170 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2171 shlibpath_var=LIBPATH
2172
2173 # AIX 3 has no versioning support, so we append a major version to the name.
2174 soname_spec='${libname}${release}${shared_ext}$major'
2175 ;;
2176
2177 aix4* | aix5*)
2178 version_type=linux
2179 need_lib_prefix=no
2180 need_version=no
2181 hardcode_into_libs=yes
2182 if test "$host_cpu" = ia64; then
2183 # AIX 5 supports IA64
2184 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2185 shlibpath_var=LD_LIBRARY_PATH
2186 else
2187 # With GCC up to 2.95.x, collect2 would create an import file
2188 # for dependence libraries. The import file would start with
2189 # the line `#! .'. This would cause the generated library to
2190 # depend on `.', always an invalid library. This was fixed in
2191 # development snapshots of GCC prior to 3.0.
2192 case $host_os in
2193 aix4 | aix4.[[01]] | aix4.[[01]].*)
2194 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2195 echo ' yes '
2196 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2197 :
2198 else
2199 can_build_shared=no
2200 fi
2201 ;;
2202 esac
2203 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2204 # soname into executable. Probably we can add versioning support to
2205 # collect2, so additional links can be useful in future.
2206 if test "$aix_use_runtimelinking" = yes; then
2207 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2208 # instead of lib<name>.a to let people know that these are not
2209 # typical AIX shared libraries.
2210 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2211 else
2212 # We preserve .a as extension for shared libraries through AIX4.2
2213 # and later when we are not doing run time linking.
2214 library_names_spec='${libname}${release}.a $libname.a'
2215 soname_spec='${libname}${release}${shared_ext}$major'
2216 fi
2217 shlibpath_var=LIBPATH
2218 fi
2219 ;;
2220
2221 amigaos*)
2222 library_names_spec='$libname.ixlibrary $libname.a'
2223 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2224 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2225 ;;
2226
2227 beos*)
2228 library_names_spec='${libname}${shared_ext}'
2229 dynamic_linker="$host_os ld.so"
2230 shlibpath_var=LIBRARY_PATH
2231 ;;
2232
2233 bsdi[[45]]*)
2234 version_type=linux
2235 need_version=no
2236 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2237 soname_spec='${libname}${release}${shared_ext}$major'
2238 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2239 shlibpath_var=LD_LIBRARY_PATH
2240 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2241 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2242 # the default ld.so.conf also contains /usr/contrib/lib and
2243 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2244 # libtool to hard-code these into programs
2245 ;;
2246
2247 cygwin* | mingw* | pw32*)
2248 version_type=windows
2249 shrext_cmds=".dll"
2250 need_version=no
2251 need_lib_prefix=no
2252
2253 case $GCC,$host_os in
2254 yes,cygwin* | yes,mingw* | yes,pw32*)
2255 library_names_spec='$libname.dll.a'
2256 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2257 postinstall_cmds='base_file=`basename \${file}`~
2258 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2259 dldir=$destdir/`dirname \$dlpath`~
2260 test -d \$dldir || mkdir -p \$dldir~
2261 $install_prog $dir/$dlname \$dldir/$dlname~
2262 chmod a+x \$dldir/$dlname'
2263 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2264 dlpath=$dir/\$dldll~
2265 $rm \$dlpath'
2266 shlibpath_overrides_runpath=yes
2267
2268 case $host_os in
2269 cygwin*)
2270 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2271 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2272 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2273 ;;
2274 mingw*)
2275 # MinGW DLLs use traditional 'lib' prefix
2276 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2277 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2278 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2279 # It is most probably a Windows format PATH printed by
2280 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2281 # path with ; separators, and with drive letters. We can handle the
2282 # drive letters (cygwin fileutils understands them), so leave them,
2283 # especially as we might pass files found there to a mingw objdump,
2284 # which wouldn't understand a cygwinified path. Ahh.
2285 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2286 else
2287 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2288 fi
2289 ;;
2290 pw32*)
2291 # pw32 DLLs use 'pw' prefix rather than 'lib'
2292 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2293 ;;
2294 esac
2295 ;;
2296
2297 *)
2298 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2299 ;;
2300 esac
2301 dynamic_linker='Win32 ld.exe'
2302 # FIXME: first we should search . and the directory the executable is in
2303 shlibpath_var=PATH
2304 ;;
2305
2306 darwin* | rhapsody*)
2307 dynamic_linker="$host_os dyld"
2308 version_type=darwin
2309 need_lib_prefix=no
2310 need_version=no
2311 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2312 soname_spec='${libname}${release}${major}$shared_ext'
2313 shlibpath_overrides_runpath=yes
2314 shlibpath_var=DYLD_LIBRARY_PATH
2315 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2316 m4_if([$1], [],[
2317 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2318 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2319 ;;
2320
2321 dgux*)
2322 version_type=linux
2323 need_lib_prefix=no
2324 need_version=no
2325 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2326 soname_spec='${libname}${release}${shared_ext}$major'
2327 shlibpath_var=LD_LIBRARY_PATH
2328 ;;
2329
2330 freebsd1*)
2331 dynamic_linker=no
2332 ;;
2333
2334 freebsd* | dragonfly*)
2335 # DragonFly does not have aout. When/if they implement a new
2336 # versioning mechanism, adjust this.
2337 if test -x /usr/bin/objformat; then
2338 objformat=`/usr/bin/objformat`
2339 else
2340 case $host_os in
2341 freebsd[[123]]*) objformat=aout ;;
2342 *) objformat=elf ;;
2343 esac
2344 fi
2345 version_type=freebsd-$objformat
2346 case $version_type in
2347 freebsd-elf*)
2348 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2349 need_version=no
2350 need_lib_prefix=no
2351 ;;
2352 freebsd-*)
2353 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2354 need_version=yes
2355 ;;
2356 esac
2357 shlibpath_var=LD_LIBRARY_PATH
2358 case $host_os in
2359 freebsd2*)
2360 shlibpath_overrides_runpath=yes
2361 ;;
2362 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2363 shlibpath_overrides_runpath=yes
2364 hardcode_into_libs=yes
2365 ;;
2366 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2367 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2368 shlibpath_overrides_runpath=no
2369 hardcode_into_libs=yes
2370 ;;
2371 *) # from 4.6 on, and DragonFly
2372 shlibpath_overrides_runpath=yes
2373 hardcode_into_libs=yes
2374 ;;
2375 esac
2376 ;;
2377
2378 gnu*)
2379 version_type=linux
2380 need_lib_prefix=no
2381 need_version=no
2382 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2383 soname_spec='${libname}${release}${shared_ext}$major'
2384 shlibpath_var=LD_LIBRARY_PATH
2385 hardcode_into_libs=yes
2386 ;;
2387
2388 hpux9* | hpux10* | hpux11*)
2389 # Give a soname corresponding to the major version so that dld.sl refuses to
2390 # link against other versions.
2391 version_type=sunos
2392 need_lib_prefix=no
2393 need_version=no
2394 case $host_cpu in
2395 ia64*)
2396 shrext_cmds='.so'
2397 hardcode_into_libs=yes
2398 dynamic_linker="$host_os dld.so"
2399 shlibpath_var=LD_LIBRARY_PATH
2400 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2401 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2402 soname_spec='${libname}${release}${shared_ext}$major'
2403 if test "X$HPUX_IA64_MODE" = X32; then
2404 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2405 else
2406 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2407 fi
2408 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2409 ;;
2410 hppa*64*)
2411 shrext_cmds='.sl'
2412 hardcode_into_libs=yes
2413 dynamic_linker="$host_os dld.sl"
2414 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2415 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2416 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2417 soname_spec='${libname}${release}${shared_ext}$major'
2418 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2419 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2420 ;;
2421 *)
2422 shrext_cmds='.sl'
2423 dynamic_linker="$host_os dld.sl"
2424 shlibpath_var=SHLIB_PATH
2425 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2426 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2427 soname_spec='${libname}${release}${shared_ext}$major'
2428 ;;
2429 esac
2430 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2431 postinstall_cmds='chmod 555 $lib'
2432 ;;
2433
2434 interix[[3-9]]*)
2435 version_type=linux
2436 need_lib_prefix=no
2437 need_version=no
2438 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2439 soname_spec='${libname}${release}${shared_ext}$major'
2440 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2441 shlibpath_var=LD_LIBRARY_PATH
2442 shlibpath_overrides_runpath=no
2443 hardcode_into_libs=yes
2444 ;;
2445
2446 irix5* | irix6* | nonstopux*)
2447 case $host_os in
2448 nonstopux*) version_type=nonstopux ;;
2449 *)
2450 if test "$lt_cv_prog_gnu_ld" = yes; then
2451 version_type=linux
2452 else
2453 version_type=irix
2454 fi ;;
2455 esac
2456 need_lib_prefix=no
2457 need_version=no
2458 soname_spec='${libname}${release}${shared_ext}$major'
2459 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2460 case $host_os in
2461 irix5* | nonstopux*)
2462 libsuff= shlibsuff=
2463 ;;
2464 *)
2465 case $LD in # libtool.m4 will add one of these switches to LD
2466 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2467 libsuff= shlibsuff= libmagic=32-bit;;
2468 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2469 libsuff=32 shlibsuff=N32 libmagic=N32;;
2470 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2471 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2472 *) libsuff= shlibsuff= libmagic=never-match;;
2473 esac
2474 ;;
2475 esac
2476 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2477 shlibpath_overrides_runpath=no
2478 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2479 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2480 hardcode_into_libs=yes
2481 ;;
2482
2483 # No shared lib support for Linux oldld, aout, or coff.
2484 linux*oldld* | linux*aout* | linux*coff*)
2485 dynamic_linker=no
2486 ;;
2487
2488 # This must be Linux ELF.
2489 linux* | k*bsd*-gnu)
2490 version_type=linux
2491 need_lib_prefix=no
2492 need_version=no
2493 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2494 soname_spec='${libname}${release}${shared_ext}$major'
2495 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2496 shlibpath_var=LD_LIBRARY_PATH
2497 shlibpath_overrides_runpath=no
2498 # This implies no fast_install, which is unacceptable.
2499 # Some rework will be needed to allow for fast_install
2500 # before this can be enabled.
2501 hardcode_into_libs=yes
2502 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2503 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2504
2505 # Append ld.so.conf contents to the search path
2506 if test -f /etc/ld.so.conf; then
2507 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2508 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2509 fi
2510
2511 # We used to test for /lib/ld.so.1 and disable shared libraries on
2512 # powerpc, because MkLinux only supported shared libraries with the
2513 # GNU dynamic linker. Since this was broken with cross compilers,
2514 # most powerpc-linux boxes support dynamic linking these days and
2515 # people can always --disable-shared, the test was removed, and we
2516 # assume the GNU/Linux dynamic linker is in use.
2517 dynamic_linker='GNU/Linux ld.so'
2518 ;;
2519
2520 netbsd*)
2521 version_type=sunos
2522 need_lib_prefix=no
2523 need_version=no
2524 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2525 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2526 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2527 dynamic_linker='NetBSD (a.out) ld.so'
2528 else
2529 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2530 soname_spec='${libname}${release}${shared_ext}$major'
2531 dynamic_linker='NetBSD ld.elf_so'
2532 fi
2533 shlibpath_var=LD_LIBRARY_PATH
2534 shlibpath_overrides_runpath=yes
2535 hardcode_into_libs=yes
2536 ;;
2537
2538 newsos6)
2539 version_type=linux
2540 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2541 shlibpath_var=LD_LIBRARY_PATH
2542 shlibpath_overrides_runpath=yes
2543 ;;
2544
2545 nto-qnx*)
2546 version_type=linux
2547 need_lib_prefix=no
2548 need_version=no
2549 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2550 soname_spec='${libname}${release}${shared_ext}$major'
2551 shlibpath_var=LD_LIBRARY_PATH
2552 shlibpath_overrides_runpath=yes
2553 ;;
2554
2555 openbsd*)
2556 version_type=sunos
2557 sys_lib_dlsearch_path_spec="/usr/lib"
2558 need_lib_prefix=no
2559 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2560 case $host_os in
2561 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2562 *) need_version=no ;;
2563 esac
2564 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2565 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2566 shlibpath_var=LD_LIBRARY_PATH
2567 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2568 case $host_os in
2569 openbsd2.[[89]] | openbsd2.[[89]].*)
2570 shlibpath_overrides_runpath=no
2571 ;;
2572 *)
2573 shlibpath_overrides_runpath=yes
2574 ;;
2575 esac
2576 else
2577 shlibpath_overrides_runpath=yes
2578 fi
2579 ;;
2580
2581 os2*)
2582 libname_spec='$name'
2583 shrext_cmds=".dll"
2584 need_lib_prefix=no
2585 library_names_spec='$libname${shared_ext} $libname.a'
2586 dynamic_linker='OS/2 ld.exe'
2587 shlibpath_var=LIBPATH
2588 ;;
2589
2590 osf3* | osf4* | osf5*)
2591 version_type=osf
2592 need_lib_prefix=no
2593 need_version=no
2594 soname_spec='${libname}${release}${shared_ext}$major'
2595 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2596 shlibpath_var=LD_LIBRARY_PATH
2597 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2598 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2599 ;;
2600
2601 rdos*)
2602 dynamic_linker=no
2603 ;;
2604
2605 solaris*)
2606 version_type=linux
2607 need_lib_prefix=no
2608 need_version=no
2609 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2610 soname_spec='${libname}${release}${shared_ext}$major'
2611 shlibpath_var=LD_LIBRARY_PATH
2612 shlibpath_overrides_runpath=yes
2613 hardcode_into_libs=yes
2614 # ldd complains unless libraries are executable
2615 postinstall_cmds='chmod +x $lib'
2616 ;;
2617
2618 sunos4*)
2619 version_type=sunos
2620 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2621 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2622 shlibpath_var=LD_LIBRARY_PATH
2623 shlibpath_overrides_runpath=yes
2624 if test "$with_gnu_ld" = yes; then
2625 need_lib_prefix=no
2626 fi
2627 need_version=yes
2628 ;;
2629
2630 sysv4 | sysv4.3*)
2631 version_type=linux
2632 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2633 soname_spec='${libname}${release}${shared_ext}$major'
2634 shlibpath_var=LD_LIBRARY_PATH
2635 case $host_vendor in
2636 sni)
2637 shlibpath_overrides_runpath=no
2638 need_lib_prefix=no
2639 export_dynamic_flag_spec='${wl}-Blargedynsym'
2640 runpath_var=LD_RUN_PATH
2641 ;;
2642 siemens)
2643 need_lib_prefix=no
2644 ;;
2645 motorola)
2646 need_lib_prefix=no
2647 need_version=no
2648 shlibpath_overrides_runpath=no
2649 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2650 ;;
2651 esac
2652 ;;
2653
2654 sysv4*MP*)
2655 if test -d /usr/nec ;then
2656 version_type=linux
2657 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2658 soname_spec='$libname${shared_ext}.$major'
2659 shlibpath_var=LD_LIBRARY_PATH
2660 fi
2661 ;;
2662
2663 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2664 version_type=freebsd-elf
2665 need_lib_prefix=no
2666 need_version=no
2667 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2668 soname_spec='${libname}${release}${shared_ext}$major'
2669 shlibpath_var=LD_LIBRARY_PATH
2670 hardcode_into_libs=yes
2671 if test "$with_gnu_ld" = yes; then
2672 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2673 shlibpath_overrides_runpath=no
2674 else
2675 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2676 shlibpath_overrides_runpath=yes
2677 case $host_os in
2678 sco3.2v5*)
2679 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2680 ;;
2681 esac
2682 fi
2683 sys_lib_dlsearch_path_spec='/usr/lib'
2684 ;;
2685
2686 uts4*)
2687 version_type=linux
2688 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2689 soname_spec='${libname}${release}${shared_ext}$major'
2690 shlibpath_var=LD_LIBRARY_PATH
2691 ;;
2692
2693 *)
2694 dynamic_linker=no
2695 ;;
2696 esac
2697 AC_MSG_RESULT([$dynamic_linker])
2698 test "$dynamic_linker" = no && can_build_shared=no
2699
2700 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2701 if test "$GCC" = yes; then
2702 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2703 fi
2704 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2705
2706
2707 # _LT_AC_TAGCONFIG
2708 # ----------------
2709 AC_DEFUN([_LT_AC_TAGCONFIG],
2710 [AC_REQUIRE([LT_AC_PROG_SED])dnl
2711 AC_ARG_WITH([tags],
2712 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2713 [include additional configurations @<:@automatic@:>@])],
2714 [tagnames="$withval"])
2715
2716 if test -f "$ltmain" && test -n "$tagnames"; then
2717 if test ! -f "${ofile}"; then
2718 AC_MSG_WARN([output file `$ofile' does not exist])
2719 fi
2720
2721 if test -z "$LTCC"; then
2722 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2723 if test -z "$LTCC"; then
2724 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2725 else
2726 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2727 fi
2728 fi
2729 if test -z "$LTCFLAGS"; then
2730 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2731 fi
2732
2733 # Extract list of available tagged configurations in $ofile.
2734 # Note that this assumes the entire list is on one line.
2735 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2736
2737 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2738 for tagname in $tagnames; do
2739 IFS="$lt_save_ifs"
2740 # Check whether tagname contains only valid characters
2741 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2742 "") ;;
2743 *) AC_MSG_ERROR([invalid tag name: $tagname])
2744 ;;
2745 esac
2746
2747 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2748 then
2749 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2750 fi
2751
2752 # Update the list of available tags.
2753 if test -n "$tagname"; then
2754 echo appending configuration tag \"$tagname\" to $ofile
2755
2756 case $tagname in
2757 CXX)
2758 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2759 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2760 (test "X$CXX" != "Xg++"))) ; then
2761 AC_LIBTOOL_LANG_CXX_CONFIG
2762 else
2763 tagname=""
2764 fi
2765 ;;
2766
2767 F77)
2768 if test -n "$F77" && test "X$F77" != "Xno"; then
2769 AC_LIBTOOL_LANG_F77_CONFIG
2770 else
2771 tagname=""
2772 fi
2773 ;;
2774
2775 GCJ)
2776 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2777 AC_LIBTOOL_LANG_GCJ_CONFIG
2778 else
2779 tagname=""
2780 fi
2781 ;;
2782
2783 RC)
2784 AC_LIBTOOL_LANG_RC_CONFIG
2785 ;;
2786
2787 *)
2788 AC_MSG_ERROR([Unsupported tag name: $tagname])
2789 ;;
2790 esac
2791
2792 # Append the new tag name to the list of available tags.
2793 if test -n "$tagname" ; then
2794 available_tags="$available_tags $tagname"
2795 fi
2796 fi
2797 done
2798 IFS="$lt_save_ifs"
2799
2800 # Now substitute the updated list of available tags.
2801 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2802 mv "${ofile}T" "$ofile"
2803 chmod +x "$ofile"
2804 else
2805 rm -f "${ofile}T"
2806 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2807 fi
2808 fi
2809 ])# _LT_AC_TAGCONFIG
2810
2811
2812 # AC_LIBTOOL_DLOPEN
2813 # -----------------
2814 # enable checks for dlopen support
2815 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2816 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2817 ])# AC_LIBTOOL_DLOPEN
2818
2819
2820 # AC_LIBTOOL_WIN32_DLL
2821 # --------------------
2822 # declare package support for building win32 DLLs
2823 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2824 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2825 ])# AC_LIBTOOL_WIN32_DLL
2826
2827
2828 # AC_ENABLE_SHARED([DEFAULT])
2829 # ---------------------------
2830 # implement the --enable-shared flag
2831 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2832 AC_DEFUN([AC_ENABLE_SHARED],
2833 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2834 AC_ARG_ENABLE([shared],
2835 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2836 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2837 [p=${PACKAGE-default}
2838 case $enableval in
2839 yes) enable_shared=yes ;;
2840 no) enable_shared=no ;;
2841 *)
2842 enable_shared=no
2843 # Look at the argument we got. We use all the common list separators.
2844 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2845 for pkg in $enableval; do
2846 IFS="$lt_save_ifs"
2847 if test "X$pkg" = "X$p"; then
2848 enable_shared=yes
2849 fi
2850 done
2851 IFS="$lt_save_ifs"
2852 ;;
2853 esac],
2854 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2855 ])# AC_ENABLE_SHARED
2856
2857
2858 # AC_DISABLE_SHARED
2859 # -----------------
2860 # set the default shared flag to --disable-shared
2861 AC_DEFUN([AC_DISABLE_SHARED],
2862 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2863 AC_ENABLE_SHARED(no)
2864 ])# AC_DISABLE_SHARED
2865
2866
2867 # AC_ENABLE_STATIC([DEFAULT])
2868 # ---------------------------
2869 # implement the --enable-static flag
2870 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2871 AC_DEFUN([AC_ENABLE_STATIC],
2872 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2873 AC_ARG_ENABLE([static],
2874 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2875 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2876 [p=${PACKAGE-default}
2877 case $enableval in
2878 yes) enable_static=yes ;;
2879 no) enable_static=no ;;
2880 *)
2881 enable_static=no
2882 # Look at the argument we got. We use all the common list separators.
2883 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2884 for pkg in $enableval; do
2885 IFS="$lt_save_ifs"
2886 if test "X$pkg" = "X$p"; then
2887 enable_static=yes
2888 fi
2889 done
2890 IFS="$lt_save_ifs"
2891 ;;
2892 esac],
2893 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2894 ])# AC_ENABLE_STATIC
2895
2896
2897 # AC_DISABLE_STATIC
2898 # -----------------
2899 # set the default static flag to --disable-static
2900 AC_DEFUN([AC_DISABLE_STATIC],
2901 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2902 AC_ENABLE_STATIC(no)
2903 ])# AC_DISABLE_STATIC
2904
2905
2906 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2907 # ---------------------------------
2908 # implement the --enable-fast-install flag
2909 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2910 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2911 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2912 AC_ARG_ENABLE([fast-install],
2913 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2914 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2915 [p=${PACKAGE-default}
2916 case $enableval in
2917 yes) enable_fast_install=yes ;;
2918 no) enable_fast_install=no ;;
2919 *)
2920 enable_fast_install=no
2921 # Look at the argument we got. We use all the common list separators.
2922 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2923 for pkg in $enableval; do
2924 IFS="$lt_save_ifs"
2925 if test "X$pkg" = "X$p"; then
2926 enable_fast_install=yes
2927 fi
2928 done
2929 IFS="$lt_save_ifs"
2930 ;;
2931 esac],
2932 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2933 ])# AC_ENABLE_FAST_INSTALL
2934
2935
2936 # AC_DISABLE_FAST_INSTALL
2937 # -----------------------
2938 # set the default to --disable-fast-install
2939 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2940 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2941 AC_ENABLE_FAST_INSTALL(no)
2942 ])# AC_DISABLE_FAST_INSTALL
2943
2944
2945 # AC_LIBTOOL_PICMODE([MODE])
2946 # --------------------------
2947 # implement the --with-pic flag
2948 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2949 AC_DEFUN([AC_LIBTOOL_PICMODE],
2950 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2951 pic_mode=ifelse($#,1,$1,default)
2952 ])# AC_LIBTOOL_PICMODE
2953
2954
2955 # AC_PROG_EGREP
2956 # -------------
2957 # This is predefined starting with Autoconf 2.54, so this conditional
2958 # definition can be removed once we require Autoconf 2.54 or later.
2959 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2960 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2961 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2962 then ac_cv_prog_egrep='grep -E'
2963 else ac_cv_prog_egrep='egrep'
2964 fi])
2965 EGREP=$ac_cv_prog_egrep
2966 AC_SUBST([EGREP])
2967 ])])
2968
2969
2970 # AC_PATH_TOOL_PREFIX
2971 # -------------------
2972 # find a file program which can recognize shared library
2973 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2974 [AC_REQUIRE([AC_PROG_EGREP])dnl
2975 AC_MSG_CHECKING([for $1])
2976 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2977 [case $MAGIC_CMD in
2978 [[\\/*] | ?:[\\/]*])
2979 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2980 ;;
2981 *)
2982 lt_save_MAGIC_CMD="$MAGIC_CMD"
2983 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2984 dnl $ac_dummy forces splitting on constant user-supplied paths.
2985 dnl POSIX.2 word splitting is done only on the output of word expansions,
2986 dnl not every word. This closes a longstanding sh security hole.
2987 ac_dummy="ifelse([$2], , $PATH, [$2])"
2988 for ac_dir in $ac_dummy; do
2989 IFS="$lt_save_ifs"
2990 test -z "$ac_dir" && ac_dir=.
2991 if test -f $ac_dir/$1; then
2992 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2993 if test -n "$file_magic_test_file"; then
2994 case $deplibs_check_method in
2995 "file_magic "*)
2996 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2997 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2998 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2999 $EGREP "$file_magic_regex" > /dev/null; then
3000 :
3001 else
3002 cat <<EOF 1>&2
3003
3004 *** Warning: the command libtool uses to detect shared libraries,
3005 *** $file_magic_cmd, produces output that libtool cannot recognize.
3006 *** The result is that libtool may fail to recognize shared libraries
3007 *** as such. This will affect the creation of libtool libraries that
3008 *** depend on shared libraries, but programs linked with such libtool
3009 *** libraries will work regardless of this problem. Nevertheless, you
3010 *** may want to report the problem to your system manager and/or to
3011 *** bug-libtool@gnu.org
3012
3013 EOF
3014 fi ;;
3015 esac
3016 fi
3017 break
3018 fi
3019 done
3020 IFS="$lt_save_ifs"
3021 MAGIC_CMD="$lt_save_MAGIC_CMD"
3022 ;;
3023 esac])
3024 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3025 if test -n "$MAGIC_CMD"; then
3026 AC_MSG_RESULT($MAGIC_CMD)
3027 else
3028 AC_MSG_RESULT(no)
3029 fi
3030 ])# AC_PATH_TOOL_PREFIX
3031
3032
3033 # AC_PATH_MAGIC
3034 # -------------
3035 # find a file program which can recognize a shared library
3036 AC_DEFUN([AC_PATH_MAGIC],
3037 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3038 if test -z "$lt_cv_path_MAGIC_CMD"; then
3039 if test -n "$ac_tool_prefix"; then
3040 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3041 else
3042 MAGIC_CMD=:
3043 fi
3044 fi
3045 ])# AC_PATH_MAGIC
3046
3047
3048 # AC_PROG_LD
3049 # ----------
3050 # find the pathname to the GNU or non-GNU linker
3051 AC_DEFUN([AC_PROG_LD],
3052 [AC_ARG_WITH([gnu-ld],
3053 [AC_HELP_STRING([--with-gnu-ld],
3054 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3055 [test "$withval" = no || with_gnu_ld=yes],
3056 [with_gnu_ld=no])
3057 AC_REQUIRE([LT_AC_PROG_SED])dnl
3058 AC_REQUIRE([AC_PROG_CC])dnl
3059 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3060 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3061 ac_prog=ld
3062 if test "$GCC" = yes; then
3063 # Check if gcc -print-prog-name=ld gives a path.
3064 AC_MSG_CHECKING([for ld used by $CC])
3065 case $host in
3066 *-*-mingw*)
3067 # gcc leaves a trailing carriage return which upsets mingw
3068 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3069 *)
3070 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3071 esac
3072 case $ac_prog in
3073 # Accept absolute paths.
3074 [[\\/]]* | ?:[[\\/]]*)
3075 re_direlt='/[[^/]][[^/]]*/\.\./'
3076 # Canonicalize the pathname of ld
3077 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3078 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3079 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3080 done
3081 test -z "$LD" && LD="$ac_prog"
3082 ;;
3083 "")
3084 # If it fails, then pretend we aren't using GCC.
3085 ac_prog=ld
3086 ;;
3087 *)
3088 # If it is relative, then search for the first ld in PATH.
3089 with_gnu_ld=unknown
3090 ;;
3091 esac
3092 elif test "$with_gnu_ld" = yes; then
3093 AC_MSG_CHECKING([for GNU ld])
3094 else
3095 AC_MSG_CHECKING([for non-GNU ld])
3096 fi
3097 AC_CACHE_VAL(lt_cv_path_LD,
3098 [if test -z "$LD"; then
3099 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3100 for ac_dir in $PATH; do
3101 IFS="$lt_save_ifs"
3102 test -z "$ac_dir" && ac_dir=.
3103 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3104 lt_cv_path_LD="$ac_dir/$ac_prog"
3105 # Check to see if the program is GNU ld. I'd rather use --version,
3106 # but apparently some variants of GNU ld only accept -v.
3107 # Break only if it was the GNU/non-GNU ld that we prefer.
3108 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3109 *GNU* | *'with BFD'*)
3110 test "$with_gnu_ld" != no && break
3111 ;;
3112 *)
3113 test "$with_gnu_ld" != yes && break
3114 ;;
3115 esac
3116 fi
3117 done
3118 IFS="$lt_save_ifs"
3119 else
3120 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3121 fi])
3122 LD="$lt_cv_path_LD"
3123 if test -n "$LD"; then
3124 AC_MSG_RESULT($LD)
3125 else
3126 AC_MSG_RESULT(no)
3127 fi
3128 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3129 AC_PROG_LD_GNU
3130 ])# AC_PROG_LD
3131
3132
3133 # AC_PROG_LD_GNU
3134 # --------------
3135 AC_DEFUN([AC_PROG_LD_GNU],
3136 [AC_REQUIRE([AC_PROG_EGREP])dnl
3137 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3138 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3139 case `$LD -v 2>&1 </dev/null` in
3140 *GNU* | *'with BFD'*)
3141 lt_cv_prog_gnu_ld=yes
3142 ;;
3143 *)
3144 lt_cv_prog_gnu_ld=no
3145 ;;
3146 esac])
3147 with_gnu_ld=$lt_cv_prog_gnu_ld
3148 ])# AC_PROG_LD_GNU
3149
3150
3151 # AC_PROG_LD_RELOAD_FLAG
3152 # ----------------------
3153 # find reload flag for linker
3154 # -- PORTME Some linkers may need a different reload flag.
3155 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3156 [AC_CACHE_CHECK([for $LD option to reload object files],
3157 lt_cv_ld_reload_flag,
3158 [lt_cv_ld_reload_flag='-r'])
3159 reload_flag=$lt_cv_ld_reload_flag
3160 case $reload_flag in
3161 "" | " "*) ;;
3162 *) reload_flag=" $reload_flag" ;;
3163 esac
3164 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3165 case $host_os in
3166 darwin*)
3167 if test "$GCC" = yes; then
3168 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3169 else
3170 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3171 fi
3172 ;;
3173 esac
3174 ])# AC_PROG_LD_RELOAD_FLAG
3175
3176
3177 # AC_DEPLIBS_CHECK_METHOD
3178 # -----------------------
3179 # how to check for library dependencies
3180 # -- PORTME fill in with the dynamic library characteristics
3181 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3182 [AC_CACHE_CHECK([how to recognize dependent libraries],
3183 lt_cv_deplibs_check_method,
3184 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3185 lt_cv_file_magic_test_file=
3186 lt_cv_deplibs_check_method='unknown'
3187 # Need to set the preceding variable on all platforms that support
3188 # interlibrary dependencies.
3189 # 'none' -- dependencies not supported.
3190 # `unknown' -- same as none, but documents that we really don't know.
3191 # 'pass_all' -- all dependencies passed with no checks.
3192 # 'test_compile' -- check by making test program.
3193 # 'file_magic [[regex]]' -- check by looking for files in library path
3194 # which responds to the $file_magic_cmd with a given extended regex.
3195 # If you have `file' or equivalent on your system and you're not sure
3196 # whether `pass_all' will *always* work, you probably want this one.
3197
3198 case $host_os in
3199 aix4* | aix5*)
3200 lt_cv_deplibs_check_method=pass_all
3201 ;;
3202
3203 beos*)
3204 lt_cv_deplibs_check_method=pass_all
3205 ;;
3206
3207 bsdi[[45]]*)
3208 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3209 lt_cv_file_magic_cmd='/usr/bin/file -L'
3210 lt_cv_file_magic_test_file=/shlib/libc.so
3211 ;;
3212
3213 cygwin*)
3214 # func_win32_libid is a shell function defined in ltmain.sh
3215 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3216 lt_cv_file_magic_cmd='func_win32_libid'
3217 ;;
3218
3219 mingw* | pw32*)
3220 # Base MSYS/MinGW do not provide the 'file' command needed by
3221 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3222 # unless we find 'file', for example because we are cross-compiling.
3223 if ( file / ) >/dev/null 2>&1; then
3224 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3225 lt_cv_file_magic_cmd='func_win32_libid'
3226 else
3227 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3228 lt_cv_file_magic_cmd='$OBJDUMP -f'
3229 fi
3230 ;;
3231
3232 darwin* | rhapsody*)
3233 lt_cv_deplibs_check_method=pass_all
3234 ;;
3235
3236 freebsd* | dragonfly*)
3237 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3238 case $host_cpu in
3239 i*86 )
3240 # Not sure whether the presence of OpenBSD here was a mistake.
3241 # Let's accept both of them until this is cleared up.
3242 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3243 lt_cv_file_magic_cmd=/usr/bin/file
3244 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3245 ;;
3246 esac
3247 else
3248 lt_cv_deplibs_check_method=pass_all
3249 fi
3250 ;;
3251
3252 gnu*)
3253 lt_cv_deplibs_check_method=pass_all
3254 ;;
3255
3256 hpux10.20* | hpux11*)
3257 lt_cv_file_magic_cmd=/usr/bin/file
3258 case $host_cpu in
3259 ia64*)
3260 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3261 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3262 ;;
3263 hppa*64*)
3264 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3265 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3266 ;;
3267 *)
3268 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3269 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3270 ;;
3271 esac
3272 ;;
3273
3274 interix[[3-9]]*)
3275 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3276 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3277 ;;
3278
3279 irix5* | irix6* | nonstopux*)
3280 case $LD in
3281 *-32|*"-32 ") libmagic=32-bit;;
3282 *-n32|*"-n32 ") libmagic=N32;;
3283 *-64|*"-64 ") libmagic=64-bit;;
3284 *) libmagic=never-match;;
3285 esac
3286 lt_cv_deplibs_check_method=pass_all
3287 ;;
3288
3289 # This must be Linux ELF.
3290 linux* | k*bsd*-gnu)
3291 lt_cv_deplibs_check_method=pass_all
3292 ;;
3293
3294 netbsd*)
3295 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3296 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3297 else
3298 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3299 fi
3300 ;;
3301
3302 newos6*)
3303 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3304 lt_cv_file_magic_cmd=/usr/bin/file
3305 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3306 ;;
3307
3308 nto-qnx*)
3309 lt_cv_deplibs_check_method=unknown
3310 ;;
3311
3312 openbsd*)
3313 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3314 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3315 else
3316 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3317 fi
3318 ;;
3319
3320 osf3* | osf4* | osf5*)
3321 lt_cv_deplibs_check_method=pass_all
3322 ;;
3323
3324 rdos*)
3325 lt_cv_deplibs_check_method=pass_all
3326 ;;
3327
3328 solaris*)
3329 lt_cv_deplibs_check_method=pass_all
3330 ;;
3331
3332 sysv4 | sysv4.3*)
3333 case $host_vendor in
3334 motorola)
3335 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]]'
3336 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3337 ;;
3338 ncr)
3339 lt_cv_deplibs_check_method=pass_all
3340 ;;
3341 sequent)
3342 lt_cv_file_magic_cmd='/bin/file'
3343 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3344 ;;
3345 sni)
3346 lt_cv_file_magic_cmd='/bin/file'
3347 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3348 lt_cv_file_magic_test_file=/lib/libc.so
3349 ;;
3350 siemens)
3351 lt_cv_deplibs_check_method=pass_all
3352 ;;
3353 pc)
3354 lt_cv_deplibs_check_method=pass_all
3355 ;;
3356 esac
3357 ;;
3358
3359 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3360 lt_cv_deplibs_check_method=pass_all
3361 ;;
3362 esac
3363 ])
3364 file_magic_cmd=$lt_cv_file_magic_cmd
3365 deplibs_check_method=$lt_cv_deplibs_check_method
3366 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3367 ])# AC_DEPLIBS_CHECK_METHOD
3368
3369
3370 # AC_PROG_NM
3371 # ----------
3372 # find the pathname to a BSD-compatible name lister
3373 AC_DEFUN([AC_PROG_NM],
3374 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3375 [if test -n "$NM"; then
3376 # Let the user override the test.
3377 lt_cv_path_NM="$NM"
3378 else
3379 lt_nm_to_check="${ac_tool_prefix}nm"
3380 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3381 lt_nm_to_check="$lt_nm_to_check nm"
3382 fi
3383 for lt_tmp_nm in $lt_nm_to_check; do
3384 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3385 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3386 IFS="$lt_save_ifs"
3387 test -z "$ac_dir" && ac_dir=.
3388 tmp_nm="$ac_dir/$lt_tmp_nm"
3389 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3390 # Check to see if the nm accepts a BSD-compat flag.
3391 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3392 # nm: unknown option "B" ignored
3393 # Tru64's nm complains that /dev/null is an invalid object file
3394 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3395 */dev/null* | *'Invalid file or object type'*)
3396 lt_cv_path_NM="$tmp_nm -B"
3397 break
3398 ;;
3399 *)
3400 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3401 */dev/null*)
3402 lt_cv_path_NM="$tmp_nm -p"
3403 break
3404 ;;
3405 *)
3406 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3407 continue # so that we can try to find one that supports BSD flags
3408 ;;
3409 esac
3410 ;;
3411 esac
3412 fi
3413 done
3414 IFS="$lt_save_ifs"
3415 done
3416 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3417 fi])
3418 NM="$lt_cv_path_NM"
3419 ])# AC_PROG_NM
3420
3421
3422 # AC_CHECK_LIBM
3423 # -------------
3424 # check for math library
3425 AC_DEFUN([AC_CHECK_LIBM],
3426 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3427 LIBM=
3428 case $host in
3429 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3430 # These system don't have libm, or don't need it
3431 ;;
3432 *-ncr-sysv4.3*)
3433 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3434 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3435 ;;
3436 *)
3437 AC_CHECK_LIB(m, cos, LIBM="-lm")
3438 ;;
3439 esac
3440 ])# AC_CHECK_LIBM
3441
3442
3443 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3444 # -----------------------------------
3445 # sets LIBLTDL to the link flags for the libltdl convenience library and
3446 # LTDLINCL to the include flags for the libltdl header and adds
3447 # --enable-ltdl-convenience to the configure arguments. Note that
3448 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3449 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3450 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3451 # (note the single quotes!). If your package is not flat and you're not
3452 # using automake, define top_builddir and top_srcdir appropriately in
3453 # the Makefiles.
3454 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3455 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3456 case $enable_ltdl_convenience in
3457 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3458 "") enable_ltdl_convenience=yes
3459 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3460 esac
3461 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3462 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3463 # For backwards non-gettext consistent compatibility...
3464 INCLTDL="$LTDLINCL"
3465 ])# AC_LIBLTDL_CONVENIENCE
3466
3467
3468 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3469 # -----------------------------------
3470 # sets LIBLTDL to the link flags for the libltdl installable library and
3471 # LTDLINCL to the include flags for the libltdl header and adds
3472 # --enable-ltdl-install to the configure arguments. Note that
3473 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3474 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3475 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3476 # '${top_srcdir}/' (note the single quotes!). If your package is not
3477 # flat and you're not using automake, define top_builddir and top_srcdir
3478 # appropriately in the Makefiles.
3479 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3480 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3481 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3482 AC_CHECK_LIB(ltdl, lt_dlinit,
3483 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3484 [if test x"$enable_ltdl_install" = xno; then
3485 AC_MSG_WARN([libltdl not installed, but installation disabled])
3486 else
3487 enable_ltdl_install=yes
3488 fi
3489 ])
3490 if test x"$enable_ltdl_install" = x"yes"; then
3491 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3492 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3493 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3494 else
3495 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3496 LIBLTDL="-lltdl"
3497 LTDLINCL=
3498 fi
3499 # For backwards non-gettext consistent compatibility...
3500 INCLTDL="$LTDLINCL"
3501 ])# AC_LIBLTDL_INSTALLABLE
3502
3503
3504 # AC_LIBTOOL_CXX
3505 # --------------
3506 # enable support for C++ libraries
3507 AC_DEFUN([AC_LIBTOOL_CXX],
3508 [AC_REQUIRE([_LT_AC_LANG_CXX])
3509 ])# AC_LIBTOOL_CXX
3510
3511
3512 # _LT_AC_LANG_CXX
3513 # ---------------
3514 AC_DEFUN([_LT_AC_LANG_CXX],
3515 [AC_REQUIRE([AC_PROG_CXX])
3516 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3517 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3518 ])# _LT_AC_LANG_CXX
3519
3520 # _LT_AC_PROG_CXXCPP
3521 # ------------------
3522 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3523 [
3524 AC_REQUIRE([AC_PROG_CXX])
3525 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3526 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3527 (test "X$CXX" != "Xg++"))) ; then
3528 AC_PROG_CXXCPP
3529 fi
3530 ])# _LT_AC_PROG_CXXCPP
3531
3532 # AC_LIBTOOL_F77
3533 # --------------
3534 # enable support for Fortran 77 libraries
3535 AC_DEFUN([AC_LIBTOOL_F77],
3536 [AC_REQUIRE([_LT_AC_LANG_F77])
3537 ])# AC_LIBTOOL_F77
3538
3539
3540 # _LT_AC_LANG_F77
3541 # ---------------
3542 AC_DEFUN([_LT_AC_LANG_F77],
3543 [AC_REQUIRE([AC_PROG_F77])
3544 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3545 ])# _LT_AC_LANG_F77
3546
3547
3548 # AC_LIBTOOL_GCJ
3549 # --------------
3550 # enable support for GCJ libraries
3551 AC_DEFUN([AC_LIBTOOL_GCJ],
3552 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3553 ])# AC_LIBTOOL_GCJ
3554
3555
3556 # _LT_AC_LANG_GCJ
3557 # ---------------
3558 AC_DEFUN([_LT_AC_LANG_GCJ],
3559 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3560 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3561 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3562 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3563 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3564 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3565 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3566 ])# _LT_AC_LANG_GCJ
3567
3568
3569 # AC_LIBTOOL_RC
3570 # -------------
3571 # enable support for Windows resource files
3572 AC_DEFUN([AC_LIBTOOL_RC],
3573 [AC_REQUIRE([LT_AC_PROG_RC])
3574 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3575 ])# AC_LIBTOOL_RC
3576
3577
3578 # AC_LIBTOOL_LANG_C_CONFIG
3579 # ------------------------
3580 # Ensure that the configuration vars for the C compiler are
3581 # suitably defined. Those variables are subsequently used by
3582 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3583 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3584 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3585 [lt_save_CC="$CC"
3586 AC_LANG_PUSH(C)
3587
3588 # Source file extension for C test sources.
3589 ac_ext=c
3590
3591 # Object file extension for compiled C test sources.
3592 objext=o
3593 _LT_AC_TAGVAR(objext, $1)=$objext
3594
3595 # Code to be used in simple compile tests
3596 lt_simple_compile_test_code="int some_variable = 0;"
3597
3598 # Code to be used in simple link tests
3599 lt_simple_link_test_code='int main(){return(0);}'
3600
3601 _LT_AC_SYS_COMPILER
3602
3603 # save warnings/boilerplate of simple test code
3604 _LT_COMPILER_BOILERPLATE
3605 _LT_LINKER_BOILERPLATE
3606
3607 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3608 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3609 AC_LIBTOOL_PROG_CC_C_O($1)
3610 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3611 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3612 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3613 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3614 AC_LIBTOOL_SYS_LIB_STRIP
3615 AC_LIBTOOL_DLOPEN_SELF
3616
3617 # Report which library types will actually be built
3618 AC_MSG_CHECKING([if libtool supports shared libraries])
3619 AC_MSG_RESULT([$can_build_shared])
3620
3621 AC_MSG_CHECKING([whether to build shared libraries])
3622 test "$can_build_shared" = "no" && enable_shared=no
3623
3624 # On AIX, shared libraries and static libraries use the same namespace, and
3625 # are all built from PIC.
3626 case $host_os in
3627 aix3*)
3628 test "$enable_shared" = yes && enable_static=no
3629 if test -n "$RANLIB"; then
3630 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3631 postinstall_cmds='$RANLIB $lib'
3632 fi
3633 ;;
3634
3635 aix4* | aix5*)
3636 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3637 test "$enable_shared" = yes && enable_static=no
3638 fi
3639 ;;
3640 esac
3641 AC_MSG_RESULT([$enable_shared])
3642
3643 AC_MSG_CHECKING([whether to build static libraries])
3644 # Make sure either enable_shared or enable_static is yes.
3645 test "$enable_shared" = yes || enable_static=yes
3646 AC_MSG_RESULT([$enable_static])
3647
3648 AC_LIBTOOL_CONFIG($1)
3649
3650 AC_LANG_POP
3651 CC="$lt_save_CC"
3652 ])# AC_LIBTOOL_LANG_C_CONFIG
3653
3654
3655 # AC_LIBTOOL_LANG_CXX_CONFIG
3656 # --------------------------
3657 # Ensure that the configuration vars for the C compiler are
3658 # suitably defined. Those variables are subsequently used by
3659 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3660 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3661 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3662 [AC_LANG_PUSH(C++)
3663 AC_REQUIRE([AC_PROG_CXX])
3664 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3665
3666 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3667 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3668 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3669 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3670 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3671 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3672 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3673 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3674 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3675 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3676 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3677 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3678 _LT_AC_TAGVAR(module_cmds, $1)=
3679 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3680 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3681 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3682 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3683 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3684 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3685
3686 # Dependencies to place before and after the object being linked:
3687 _LT_AC_TAGVAR(predep_objects, $1)=
3688 _LT_AC_TAGVAR(postdep_objects, $1)=
3689 _LT_AC_TAGVAR(predeps, $1)=
3690 _LT_AC_TAGVAR(postdeps, $1)=
3691 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3692
3693 # Source file extension for C++ test sources.
3694 ac_ext=cpp
3695
3696 # Object file extension for compiled C++ test sources.
3697 objext=o
3698 _LT_AC_TAGVAR(objext, $1)=$objext
3699
3700 # Code to be used in simple compile tests
3701 lt_simple_compile_test_code="int some_variable = 0;"
3702
3703 # Code to be used in simple link tests
3704 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
3705
3706 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3707 _LT_AC_SYS_COMPILER
3708
3709 # save warnings/boilerplate of simple test code
3710 _LT_COMPILER_BOILERPLATE
3711 _LT_LINKER_BOILERPLATE
3712
3713 # Allow CC to be a program name with arguments.
3714 lt_save_CC=$CC
3715 lt_save_LD=$LD
3716 lt_save_GCC=$GCC
3717 GCC=$GXX
3718 lt_save_with_gnu_ld=$with_gnu_ld
3719 lt_save_path_LD=$lt_cv_path_LD
3720 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3721 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3722 else
3723 $as_unset lt_cv_prog_gnu_ld
3724 fi
3725 if test -n "${lt_cv_path_LDCXX+set}"; then
3726 lt_cv_path_LD=$lt_cv_path_LDCXX
3727 else
3728 $as_unset lt_cv_path_LD
3729 fi
3730 test -z "${LDCXX+set}" || LD=$LDCXX
3731 CC=${CXX-"c++"}
3732 compiler=$CC
3733 _LT_AC_TAGVAR(compiler, $1)=$CC
3734 _LT_CC_BASENAME([$compiler])
3735
3736 # We don't want -fno-exception wen compiling C++ code, so set the
3737 # no_builtin_flag separately
3738 if test "$GXX" = yes; then
3739 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3740 else
3741 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3742 fi
3743
3744 if test "$GXX" = yes; then
3745 # Set up default GNU C++ configuration
3746
3747 AC_PROG_LD
3748
3749 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3750 # archiving commands below assume that GNU ld is being used.
3751 if test "$with_gnu_ld" = yes; then
3752 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3753 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3754
3755 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3756 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3757
3758 # If archive_cmds runs LD, not CC, wlarc should be empty
3759 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3760 # investigate it a little bit more. (MM)
3761 wlarc='${wl}'
3762
3763 # ancient GNU ld didn't support --whole-archive et. al.
3764 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3765 grep 'no-whole-archive' > /dev/null; then
3766 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3767 else
3768 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3769 fi
3770 else
3771 with_gnu_ld=no
3772 wlarc=
3773
3774 # A generic and very simple default shared library creation
3775 # command for GNU C++ for the case where it uses the native
3776 # linker, instead of GNU ld. If possible, this setting should
3777 # overridden to take advantage of the native linker features on
3778 # the platform it is being used on.
3779 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3780 fi
3781
3782 # Commands to make compiler produce verbose output that lists
3783 # what "hidden" libraries, object files and flags are used when
3784 # linking a shared library.
3785 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3786
3787 else
3788 GXX=no
3789 with_gnu_ld=no
3790 wlarc=
3791 fi
3792
3793 # PORTME: fill in a description of your system's C++ link characteristics
3794 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3795 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3796 case $host_os in
3797 aix3*)
3798 # FIXME: insert proper C++ library support
3799 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3800 ;;
3801 aix4* | aix5*)
3802 if test "$host_cpu" = ia64; then
3803 # On IA64, the linker does run time linking by default, so we don't
3804 # have to do anything special.
3805 aix_use_runtimelinking=no
3806 exp_sym_flag='-Bexport'
3807 no_entry_flag=""
3808 else
3809 aix_use_runtimelinking=no
3810
3811 # Test if we are trying to use run time linking or normal
3812 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3813 # need to do runtime linking.
3814 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3815 for ld_flag in $LDFLAGS; do
3816 case $ld_flag in
3817 *-brtl*)
3818 aix_use_runtimelinking=yes
3819 break
3820 ;;
3821 esac
3822 done
3823 ;;
3824 esac
3825
3826 exp_sym_flag='-bexport'
3827 no_entry_flag='-bnoentry'
3828 fi
3829
3830 # When large executables or shared objects are built, AIX ld can
3831 # have problems creating the table of contents. If linking a library
3832 # or program results in "error TOC overflow" add -mminimal-toc to
3833 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3834 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3835
3836 _LT_AC_TAGVAR(archive_cmds, $1)=''
3837 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3838 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3839 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3840
3841 if test "$GXX" = yes; then
3842 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3843 # We only want to do this on AIX 4.2 and lower, the check
3844 # below for broken collect2 doesn't work under 4.3+
3845 collect2name=`${CC} -print-prog-name=collect2`
3846 if test -f "$collect2name" && \
3847 strings "$collect2name" | grep resolve_lib_name >/dev/null
3848 then
3849 # We have reworked collect2
3850 :
3851 else
3852 # We have old collect2
3853 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3854 # It fails to find uninstalled libraries when the uninstalled
3855 # path is not listed in the libpath. Setting hardcode_minus_L
3856 # to unsupported forces relinking
3857 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3858 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3859 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3860 fi
3861 ;;
3862 esac
3863 shared_flag='-shared'
3864 if test "$aix_use_runtimelinking" = yes; then
3865 shared_flag="$shared_flag "'${wl}-G'
3866 fi
3867 else
3868 # not using gcc
3869 if test "$host_cpu" = ia64; then
3870 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3871 # chokes on -Wl,-G. The following line is correct:
3872 shared_flag='-G'
3873 else
3874 if test "$aix_use_runtimelinking" = yes; then
3875 shared_flag='${wl}-G'
3876 else
3877 shared_flag='${wl}-bM:SRE'
3878 fi
3879 fi
3880 fi
3881
3882 # It seems that -bexpall does not export symbols beginning with
3883 # underscore (_), so it is better to generate a list of symbols to export.
3884 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3885 if test "$aix_use_runtimelinking" = yes; then
3886 # Warning - without using the other runtime loading flags (-brtl),
3887 # -berok will link without error, but may produce a broken library.
3888 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3889 # Determine the default libpath from the value encoded in an empty executable.
3890 _LT_AC_SYS_LIBPATH_AIX
3891 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3892
3893 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3894 else
3895 if test "$host_cpu" = ia64; then
3896 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3897 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3898 _LT_AC_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"
3899 else
3900 # Determine the default libpath from the value encoded in an empty executable.
3901 _LT_AC_SYS_LIBPATH_AIX
3902 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3903 # Warning - without using the other run time loading flags,
3904 # -berok will link without error, but may produce a broken library.
3905 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3906 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3907 # Exported symbols can be pulled into shared objects from archives
3908 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3909 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3910 # This is similar to how AIX traditionally builds its shared libraries.
3911 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3912 fi
3913 fi
3914 ;;
3915
3916 beos*)
3917 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3918 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3919 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3920 # support --undefined. This deserves some investigation. FIXME
3921 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3922 else
3923 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3924 fi
3925 ;;
3926
3927 chorus*)
3928 case $cc_basename in
3929 *)
3930 # FIXME: insert proper C++ library support
3931 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3932 ;;
3933 esac
3934 ;;
3935
3936 cygwin* | mingw* | pw32*)
3937 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3938 # as there is no search path for DLLs.
3939 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3940 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3941 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3942 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3943
3944 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3945 _LT_AC_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'
3946 # If the export-symbols file already is a .def file (1st line
3947 # is EXPORTS), use it as is; otherwise, prepend...
3948 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3949 cp $export_symbols $output_objdir/$soname.def;
3950 else
3951 echo EXPORTS > $output_objdir/$soname.def;
3952 cat $export_symbols >> $output_objdir/$soname.def;
3953 fi~
3954 $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'
3955 else
3956 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3957 fi
3958 ;;
3959 darwin* | rhapsody*)
3960 case $host_os in
3961 rhapsody* | darwin1.[[012]])
3962 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3963 ;;
3964 *) # Darwin 1.3 on
3965 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3966 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3967 else
3968 case ${MACOSX_DEPLOYMENT_TARGET} in
3969 10.[[012]])
3970 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3971 ;;
3972 10.*)
3973 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3974 ;;
3975 esac
3976 fi
3977 ;;
3978 esac
3979 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3980 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3981 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3982 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3983 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3984 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3985
3986 if test "$GXX" = yes ; then
3987 lt_int_apple_cc_single_mod=no
3988 output_verbose_link_cmd='echo'
3989 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3990 lt_int_apple_cc_single_mod=yes
3991 fi
3992 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3993 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3994 else
3995 _LT_AC_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'
3996 fi
3997 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3998 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3999 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4000 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4001 else
4002 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4003 fi
4004 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4005 else
4006 case $cc_basename in
4007 xlc*)
4008 output_verbose_link_cmd='echo'
4009 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
4010 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4011 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4012 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4013 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4014 ;;
4015 *)
4016 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4017 ;;
4018 esac
4019 fi
4020 ;;
4021
4022 dgux*)
4023 case $cc_basename in
4024 ec++*)
4025 # FIXME: insert proper C++ library support
4026 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4027 ;;
4028 ghcx*)
4029 # Green Hills C++ Compiler
4030 # FIXME: insert proper C++ library support
4031 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4032 ;;
4033 *)
4034 # FIXME: insert proper C++ library support
4035 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4036 ;;
4037 esac
4038 ;;
4039 freebsd[[12]]*)
4040 # C++ shared libraries reported to be fairly broken before switch to ELF
4041 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4042 ;;
4043 freebsd-elf*)
4044 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4045 ;;
4046 freebsd* | dragonfly*)
4047 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4048 # conventions
4049 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4050 ;;
4051 gnu*)
4052 ;;
4053 hpux9*)
4054 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4055 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4056 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4057 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4058 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4059 # but as the default
4060 # location of the library.
4061
4062 case $cc_basename in
4063 CC*)
4064 # FIXME: insert proper C++ library support
4065 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4066 ;;
4067 aCC*)
4068 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4069 # Commands to make compiler produce verbose output that lists
4070 # what "hidden" libraries, object files and flags are used when
4071 # linking a shared library.
4072 #
4073 # There doesn't appear to be a way to prevent this compiler from
4074 # explicitly linking system object files so we need to strip them
4075 # from the output so that they don't get included in the library
4076 # dependencies.
4077 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4078 ;;
4079 *)
4080 if test "$GXX" = yes; then
4081 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4082 else
4083 # FIXME: insert proper C++ library support
4084 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4085 fi
4086 ;;
4087 esac
4088 ;;
4089 hpux10*|hpux11*)
4090 if test $with_gnu_ld = no; then
4091 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4092 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4093
4094 case $host_cpu in
4095 hppa*64*|ia64*) ;;
4096 *)
4097 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4098 ;;
4099 esac
4100 fi
4101 case $host_cpu in
4102 hppa*64*|ia64*)
4103 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4104 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4105 ;;
4106 *)
4107 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4108 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4109 # but as the default
4110 # location of the library.
4111 ;;
4112 esac
4113
4114 case $cc_basename in
4115 CC*)
4116 # FIXME: insert proper C++ library support
4117 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4118 ;;
4119 aCC*)
4120 case $host_cpu in
4121 hppa*64*)
4122 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4123 ;;
4124 ia64*)
4125 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4126 ;;
4127 *)
4128 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4129 ;;
4130 esac
4131 # Commands to make compiler produce verbose output that lists
4132 # what "hidden" libraries, object files and flags are used when
4133 # linking a shared library.
4134 #
4135 # There doesn't appear to be a way to prevent this compiler from
4136 # explicitly linking system object files so we need to strip them
4137 # from the output so that they don't get included in the library
4138 # dependencies.
4139 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4140 ;;
4141 *)
4142 if test "$GXX" = yes; then
4143 if test $with_gnu_ld = no; then
4144 case $host_cpu in
4145 hppa*64*)
4146 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4147 ;;
4148 ia64*)
4149 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4150 ;;
4151 *)
4152 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4153 ;;
4154 esac
4155 fi
4156 else
4157 # FIXME: insert proper C++ library support
4158 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4159 fi
4160 ;;
4161 esac
4162 ;;
4163 interix[[3-9]]*)
4164 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4165 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4166 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4167 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4168 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4169 # Instead, shared libraries are loaded at an image base (0x10000000 by
4170 # default) and relocated if they conflict, which is a slow very memory
4171 # consuming and fragmenting process. To avoid this, we pick a random,
4172 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4173 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4174 _LT_AC_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'
4175 _LT_AC_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'
4176 ;;
4177 irix5* | irix6*)
4178 case $cc_basename in
4179 CC*)
4180 # SGI C++
4181 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4182
4183 # Archives containing C++ object files must be created using
4184 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4185 # necessary to make sure instantiated templates are included
4186 # in the archive.
4187 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4188 ;;
4189 *)
4190 if test "$GXX" = yes; then
4191 if test "$with_gnu_ld" = no; then
4192 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4193 else
4194 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4195 fi
4196 fi
4197 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4198 ;;
4199 esac
4200 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4201 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4202 ;;
4203 linux* | k*bsd*-gnu)
4204 case $cc_basename in
4205 KCC*)
4206 # Kuck and Associates, Inc. (KAI) C++ Compiler
4207
4208 # KCC will only create a shared library if the output file
4209 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4210 # to its proper name (with version) after linking.
4211 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4212 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4213 # Commands to make compiler produce verbose output that lists
4214 # what "hidden" libraries, object files and flags are used when
4215 # linking a shared library.
4216 #
4217 # There doesn't appear to be a way to prevent this compiler from
4218 # explicitly linking system object files so we need to strip them
4219 # from the output so that they don't get included in the library
4220 # dependencies.
4221 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4222
4223 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4224 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4225
4226 # Archives containing C++ object files must be created using
4227 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4228 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4229 ;;
4230 icpc*)
4231 # Intel C++
4232 with_gnu_ld=yes
4233 # version 8.0 and above of icpc choke on multiply defined symbols
4234 # if we add $predep_objects and $postdep_objects, however 7.1 and
4235 # earlier do not add the objects themselves.
4236 case `$CC -V 2>&1` in
4237 *"Version 7."*)
4238 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4239 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4240 ;;
4241 *) # Version 8.0 or newer
4242 tmp_idyn=
4243 case $host_cpu in
4244 ia64*) tmp_idyn=' -i_dynamic';;
4245 esac
4246 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4247 _LT_AC_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'
4248 ;;
4249 esac
4250 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4251 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4252 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4253 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4254 ;;
4255 pgCC*)
4256 # Portland Group C++ compiler
4257 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4258 _LT_AC_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'
4259
4260 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4261 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4262 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4263 ;;
4264 cxx*)
4265 # Compaq C++
4266 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4267 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4268
4269 runpath_var=LD_RUN_PATH
4270 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4271 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4272
4273 # Commands to make compiler produce verbose output that lists
4274 # what "hidden" libraries, object files and flags are used when
4275 # linking a shared library.
4276 #
4277 # There doesn't appear to be a way to prevent this compiler from
4278 # explicitly linking system object files so we need to strip them
4279 # from the output so that they don't get included in the library
4280 # dependencies.
4281 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4282 ;;
4283 *)
4284 case `$CC -V 2>&1 | sed 5q` in
4285 *Sun\ C*)
4286 # Sun C++ 5.9
4287 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4288 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4289 _LT_AC_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'
4290 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4291 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4292
4293 # Not sure whether something based on
4294 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
4295 # would be better.
4296 output_verbose_link_cmd='echo'
4297
4298 # Archives containing C++ object files must be created using
4299 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4300 # necessary to make sure instantiated templates are included
4301 # in the archive.
4302 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4303 ;;
4304 esac
4305 ;;
4306 esac
4307 ;;
4308 lynxos*)
4309 # FIXME: insert proper C++ library support
4310 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4311 ;;
4312 m88k*)
4313 # FIXME: insert proper C++ library support
4314 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4315 ;;
4316 mvs*)
4317 case $cc_basename in
4318 cxx*)
4319 # FIXME: insert proper C++ library support
4320 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4321 ;;
4322 *)
4323 # FIXME: insert proper C++ library support
4324 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4325 ;;
4326 esac
4327 ;;
4328 netbsd*)
4329 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4330 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4331 wlarc=
4332 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4333 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4334 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4335 fi
4336 # Workaround some broken pre-1.5 toolchains
4337 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4338 ;;
4339 openbsd2*)
4340 # C++ shared libraries are fairly broken
4341 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4342 ;;
4343 openbsd*)
4344 if test -f /usr/libexec/ld.so; then
4345 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4346 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4347 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4348 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4349 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4350 _LT_AC_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'
4351 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4352 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4353 fi
4354 output_verbose_link_cmd='echo'
4355 else
4356 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4357 fi
4358 ;;
4359 osf3*)
4360 case $cc_basename in
4361 KCC*)
4362 # Kuck and Associates, Inc. (KAI) C++ Compiler
4363
4364 # KCC will only create a shared library if the output file
4365 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4366 # to its proper name (with version) after linking.
4367 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4368
4369 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4370 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4371
4372 # Archives containing C++ object files must be created using
4373 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4374 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4375
4376 ;;
4377 RCC*)
4378 # Rational C++ 2.4.1
4379 # FIXME: insert proper C++ library support
4380 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4381 ;;
4382 cxx*)
4383 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4384 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4385
4386 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4387 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4388
4389 # Commands to make compiler produce verbose output that lists
4390 # what "hidden" libraries, object files and flags are used when
4391 # linking a shared library.
4392 #
4393 # There doesn't appear to be a way to prevent this compiler from
4394 # explicitly linking system object files so we need to strip them
4395 # from the output so that they don't get included in the library
4396 # dependencies.
4397 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4398 ;;
4399 *)
4400 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4401 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4402 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4403
4404 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4405 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4406
4407 # Commands to make compiler produce verbose output that lists
4408 # what "hidden" libraries, object files and flags are used when
4409 # linking a shared library.
4410 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4411
4412 else
4413 # FIXME: insert proper C++ library support
4414 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4415 fi
4416 ;;
4417 esac
4418 ;;
4419 osf4* | osf5*)
4420 case $cc_basename in
4421 KCC*)
4422 # Kuck and Associates, Inc. (KAI) C++ Compiler
4423
4424 # KCC will only create a shared library if the output file
4425 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4426 # to its proper name (with version) after linking.
4427 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4428
4429 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4430 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4431
4432 # Archives containing C++ object files must be created using
4433 # the KAI C++ compiler.
4434 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4435 ;;
4436 RCC*)
4437 # Rational C++ 2.4.1
4438 # FIXME: insert proper C++ library support
4439 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4440 ;;
4441 cxx*)
4442 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4443 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4444 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4445 echo "-hidden">> $lib.exp~
4446 $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~
4447 $rm $lib.exp'
4448
4449 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4450 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4451
4452 # Commands to make compiler produce verbose output that lists
4453 # what "hidden" libraries, object files and flags are used when
4454 # linking a shared library.
4455 #
4456 # There doesn't appear to be a way to prevent this compiler from
4457 # explicitly linking system object files so we need to strip them
4458 # from the output so that they don't get included in the library
4459 # dependencies.
4460 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4461 ;;
4462 *)
4463 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4464 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4465 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4466
4467 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4468 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4469
4470 # Commands to make compiler produce verbose output that lists
4471 # what "hidden" libraries, object files and flags are used when
4472 # linking a shared library.
4473 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4474
4475 else
4476 # FIXME: insert proper C++ library support
4477 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4478 fi
4479 ;;
4480 esac
4481 ;;
4482 psos*)
4483 # FIXME: insert proper C++ library support
4484 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4485 ;;
4486 sunos4*)
4487 case $cc_basename in
4488 CC*)
4489 # Sun C++ 4.x
4490 # FIXME: insert proper C++ library support
4491 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4492 ;;
4493 lcc*)
4494 # Lucid
4495 # FIXME: insert proper C++ library support
4496 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4497 ;;
4498 *)
4499 # FIXME: insert proper C++ library support
4500 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4501 ;;
4502 esac
4503 ;;
4504 solaris*)
4505 case $cc_basename in
4506 CC*)
4507 # Sun C++ 4.2, 5.x and Centerline C++
4508 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4509 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4510 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4511 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4512 $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'
4513
4514 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4515 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4516 case $host_os in
4517 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4518 *)
4519 # The compiler driver will combine and reorder linker options,
4520 # but understands `-z linker_flag'.
4521 # Supported since Solaris 2.6 (maybe 2.5.1?)
4522 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4523 ;;
4524 esac
4525 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4526
4527 output_verbose_link_cmd='echo'
4528
4529 # Archives containing C++ object files must be created using
4530 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4531 # necessary to make sure instantiated templates are included
4532 # in the archive.
4533 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4534 ;;
4535 gcx*)
4536 # Green Hills C++ Compiler
4537 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4538
4539 # The C++ compiler must be used to create the archive.
4540 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4541 ;;
4542 *)
4543 # GNU C++ compiler with Solaris linker
4544 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4545 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4546 if $CC --version | grep -v '^2\.7' > /dev/null; then
4547 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4548 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4549 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4550
4551 # Commands to make compiler produce verbose output that lists
4552 # what "hidden" libraries, object files and flags are used when
4553 # linking a shared library.
4554 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4555 else
4556 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4557 # platform.
4558 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4559 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4560 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4561
4562 # Commands to make compiler produce verbose output that lists
4563 # what "hidden" libraries, object files and flags are used when
4564 # linking a shared library.
4565 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4566 fi
4567
4568 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4569 case $host_os in
4570 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4571 *)
4572 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4573 ;;
4574 esac
4575 fi
4576 ;;
4577 esac
4578 ;;
4579 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4580 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4581 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4582 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4583 runpath_var='LD_RUN_PATH'
4584
4585 case $cc_basename in
4586 CC*)
4587 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4588 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4589 ;;
4590 *)
4591 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4592 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4593 ;;
4594 esac
4595 ;;
4596 sysv5* | sco3.2v5* | sco5v6*)
4597 # Note: We can NOT use -z defs as we might desire, because we do not
4598 # link with -lc, and that would cause any symbols used from libc to
4599 # always be unresolved, which means just about no library would
4600 # ever link correctly. If we're not using GNU ld we use -z text
4601 # though, which does catch some bad symbols but isn't as heavy-handed
4602 # as -z defs.
4603 # For security reasons, it is highly recommended that you always
4604 # use absolute paths for naming shared libraries, and exclude the
4605 # DT_RUNPATH tag from executables and libraries. But doing so
4606 # requires that you compile everything twice, which is a pain.
4607 # So that behaviour is only enabled if SCOABSPATH is set to a
4608 # non-empty value in the environment. Most likely only useful for
4609 # creating official distributions of packages.
4610 # This is a hack until libtool officially supports absolute path
4611 # names for shared libraries.
4612 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4613 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4614 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4615 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4616 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4617 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4618 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4619 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4620 runpath_var='LD_RUN_PATH'
4621
4622 case $cc_basename in
4623 CC*)
4624 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4625 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4626 ;;
4627 *)
4628 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4629 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4630 ;;
4631 esac
4632 ;;
4633 tandem*)
4634 case $cc_basename in
4635 NCC*)
4636 # NonStop-UX NCC 3.20
4637 # FIXME: insert proper C++ library support
4638 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4639 ;;
4640 *)
4641 # FIXME: insert proper C++ library support
4642 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4643 ;;
4644 esac
4645 ;;
4646 vxworks*)
4647 # FIXME: insert proper C++ library support
4648 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4649 ;;
4650 *)
4651 # FIXME: insert proper C++ library support
4652 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4653 ;;
4654 esac
4655 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4656 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4657
4658 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4659 _LT_AC_TAGVAR(LD, $1)="$LD"
4660
4661 AC_LIBTOOL_POSTDEP_PREDEP($1)
4662 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4663 AC_LIBTOOL_PROG_CC_C_O($1)
4664 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4665 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4666 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4667 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4668
4669 AC_LIBTOOL_CONFIG($1)
4670
4671 AC_LANG_POP
4672 CC=$lt_save_CC
4673 LDCXX=$LD
4674 LD=$lt_save_LD
4675 GCC=$lt_save_GCC
4676 with_gnu_ldcxx=$with_gnu_ld
4677 with_gnu_ld=$lt_save_with_gnu_ld
4678 lt_cv_path_LDCXX=$lt_cv_path_LD
4679 lt_cv_path_LD=$lt_save_path_LD
4680 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4681 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4682 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4683
4684 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4685 # ------------------------------------
4686 # Figure out "hidden" library dependencies from verbose
4687 # compiler output when linking a shared library.
4688 # Parse the compiler output and extract the necessary
4689 # objects, libraries and library flags.
4690 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4691 dnl we can't use the lt_simple_compile_test_code here,
4692 dnl because it contains code intended for an executable,
4693 dnl not a library. It's possible we should let each
4694 dnl tag define a new lt_????_link_test_code variable,
4695 dnl but it's only used here...
4696 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4697 int a;
4698 void foo (void) { a = 0; }
4699 EOF
4700 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4701 class Foo
4702 {
4703 public:
4704 Foo (void) { a = 0; }
4705 private:
4706 int a;
4707 };
4708 EOF
4709 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4710 subroutine foo
4711 implicit none
4712 integer*4 a
4713 a=0
4714 return
4715 end
4716 EOF
4717 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4718 public class foo {
4719 private int a;
4720 public void bar (void) {
4721 a = 0;
4722 }
4723 };
4724 EOF
4725 ])
4726 dnl Parse the compiler output and extract the necessary
4727 dnl objects, libraries and library flags.
4728 if AC_TRY_EVAL(ac_compile); then
4729 # Parse the compiler output and extract the necessary
4730 # objects, libraries and library flags.
4731
4732 # Sentinel used to keep track of whether or not we are before
4733 # the conftest object file.
4734 pre_test_object_deps_done=no
4735
4736 # The `*' in the case matches for architectures that use `case' in
4737 # $output_verbose_cmd can trigger glob expansion during the loop
4738 # eval without this substitution.
4739 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4740
4741 for p in `eval $output_verbose_link_cmd`; do
4742 case $p in
4743
4744 -L* | -R* | -l*)
4745 # Some compilers place space between "-{L,R}" and the path.
4746 # Remove the space.
4747 if test $p = "-L" \
4748 || test $p = "-R"; then
4749 prev=$p
4750 continue
4751 else
4752 prev=
4753 fi
4754
4755 if test "$pre_test_object_deps_done" = no; then
4756 case $p in
4757 -L* | -R*)
4758 # Internal compiler library paths should come after those
4759 # provided the user. The postdeps already come after the
4760 # user supplied libs so there is no need to process them.
4761 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4762 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4763 else
4764 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4765 fi
4766 ;;
4767 # The "-l" case would never come before the object being
4768 # linked, so don't bother handling this case.
4769 esac
4770 else
4771 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4772 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4773 else
4774 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4775 fi
4776 fi
4777 ;;
4778
4779 *.$objext)
4780 # This assumes that the test object file only shows up
4781 # once in the compiler output.
4782 if test "$p" = "conftest.$objext"; then
4783 pre_test_object_deps_done=yes
4784 continue
4785 fi
4786
4787 if test "$pre_test_object_deps_done" = no; then
4788 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4789 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4790 else
4791 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4792 fi
4793 else
4794 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4795 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4796 else
4797 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4798 fi
4799 fi
4800 ;;
4801
4802 *) ;; # Ignore the rest.
4803
4804 esac
4805 done
4806
4807 # Clean up.
4808 rm -f a.out a.exe
4809 else
4810 echo "libtool.m4: error: problem compiling $1 test program"
4811 fi
4812
4813 $rm -f confest.$objext
4814
4815 # PORTME: override above test on systems where it is broken
4816 ifelse([$1],[CXX],
4817 [case $host_os in
4818 interix[[3-9]]*)
4819 # Interix 3.5 installs completely hosed .la files for C++, so rather than
4820 # hack all around it, let's just trust "g++" to DTRT.
4821 _LT_AC_TAGVAR(predep_objects,$1)=
4822 _LT_AC_TAGVAR(postdep_objects,$1)=
4823 _LT_AC_TAGVAR(postdeps,$1)=
4824 ;;
4825
4826 linux*)
4827 case `$CC -V 2>&1 | sed 5q` in
4828 *Sun\ C*)
4829 # Sun C++ 5.9
4830 #
4831 # The more standards-conforming stlport4 library is
4832 # incompatible with the Cstd library. Avoid specifying
4833 # it if it's in CXXFLAGS. Ignore libCrun as
4834 # -library=stlport4 depends on it.
4835 case " $CXX $CXXFLAGS " in
4836 *" -library=stlport4 "*)
4837 solaris_use_stlport4=yes
4838 ;;
4839 esac
4840 if test "$solaris_use_stlport4" != yes; then
4841 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4842 fi
4843 ;;
4844 esac
4845 ;;
4846
4847 solaris*)
4848 case $cc_basename in
4849 CC*)
4850 # The more standards-conforming stlport4 library is
4851 # incompatible with the Cstd library. Avoid specifying
4852 # it if it's in CXXFLAGS. Ignore libCrun as
4853 # -library=stlport4 depends on it.
4854 case " $CXX $CXXFLAGS " in
4855 *" -library=stlport4 "*)
4856 solaris_use_stlport4=yes
4857 ;;
4858 esac
4859
4860 # Adding this requires a known-good setup of shared libraries for
4861 # Sun compiler versions before 5.6, else PIC objects from an old
4862 # archive will be linked into the output, leading to subtle bugs.
4863 if test "$solaris_use_stlport4" != yes; then
4864 _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4865 fi
4866 ;;
4867 esac
4868 ;;
4869 esac
4870 ])
4871
4872 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4873 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4874 esac
4875 ])# AC_LIBTOOL_POSTDEP_PREDEP
4876
4877 # AC_LIBTOOL_LANG_F77_CONFIG
4878 # --------------------------
4879 # Ensure that the configuration vars for the C compiler are
4880 # suitably defined. Those variables are subsequently used by
4881 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4882 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4883 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4884 [AC_REQUIRE([AC_PROG_F77])
4885 AC_LANG_PUSH(Fortran 77)
4886
4887 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4888 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4889 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4890 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4891 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4892 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4893 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4894 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4895 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4896 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4897 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4898 _LT_AC_TAGVAR(module_cmds, $1)=
4899 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4900 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4901 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4902 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4903 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4904 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4905
4906 # Source file extension for f77 test sources.
4907 ac_ext=f
4908
4909 # Object file extension for compiled f77 test sources.
4910 objext=o
4911 _LT_AC_TAGVAR(objext, $1)=$objext
4912
4913 # Code to be used in simple compile tests
4914 lt_simple_compile_test_code="\
4915 subroutine t
4916 return
4917 end
4918 "
4919
4920 # Code to be used in simple link tests
4921 lt_simple_link_test_code="\
4922 program t
4923 end
4924 "
4925
4926 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4927 _LT_AC_SYS_COMPILER
4928
4929 # save warnings/boilerplate of simple test code
4930 _LT_COMPILER_BOILERPLATE
4931 _LT_LINKER_BOILERPLATE
4932
4933 # Allow CC to be a program name with arguments.
4934 lt_save_CC="$CC"
4935 CC=${F77-"f77"}
4936 compiler=$CC
4937 _LT_AC_TAGVAR(compiler, $1)=$CC
4938 _LT_CC_BASENAME([$compiler])
4939
4940 AC_MSG_CHECKING([if libtool supports shared libraries])
4941 AC_MSG_RESULT([$can_build_shared])
4942
4943 AC_MSG_CHECKING([whether to build shared libraries])
4944 test "$can_build_shared" = "no" && enable_shared=no
4945
4946 # On AIX, shared libraries and static libraries use the same namespace, and
4947 # are all built from PIC.
4948 case $host_os in
4949 aix3*)
4950 test "$enable_shared" = yes && enable_static=no
4951 if test -n "$RANLIB"; then
4952 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4953 postinstall_cmds='$RANLIB $lib'
4954 fi
4955 ;;
4956 aix4* | aix5*)
4957 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4958 test "$enable_shared" = yes && enable_static=no
4959 fi
4960 ;;
4961 esac
4962 AC_MSG_RESULT([$enable_shared])
4963
4964 AC_MSG_CHECKING([whether to build static libraries])
4965 # Make sure either enable_shared or enable_static is yes.
4966 test "$enable_shared" = yes || enable_static=yes
4967 AC_MSG_RESULT([$enable_static])
4968
4969 _LT_AC_TAGVAR(GCC, $1)="$G77"
4970 _LT_AC_TAGVAR(LD, $1)="$LD"
4971
4972 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4973 AC_LIBTOOL_PROG_CC_C_O($1)
4974 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4975 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4976 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4977 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4978
4979 AC_LIBTOOL_CONFIG($1)
4980
4981 AC_LANG_POP
4982 CC="$lt_save_CC"
4983 ])# AC_LIBTOOL_LANG_F77_CONFIG
4984
4985
4986 # AC_LIBTOOL_LANG_GCJ_CONFIG
4987 # --------------------------
4988 # Ensure that the configuration vars for the C compiler are
4989 # suitably defined. Those variables are subsequently used by
4990 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4991 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4992 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4993 [AC_LANG_SAVE
4994
4995 # Source file extension for Java test sources.
4996 ac_ext=java
4997
4998 # Object file extension for compiled Java test sources.
4999 objext=o
5000 _LT_AC_TAGVAR(objext, $1)=$objext
5001
5002 # Code to be used in simple compile tests
5003 lt_simple_compile_test_code="class foo {}"
5004
5005 # Code to be used in simple link tests
5006 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
5007
5008 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5009 _LT_AC_SYS_COMPILER
5010
5011 # save warnings/boilerplate of simple test code
5012 _LT_COMPILER_BOILERPLATE
5013 _LT_LINKER_BOILERPLATE
5014
5015 # Allow CC to be a program name with arguments.
5016 lt_save_CC="$CC"
5017 CC=${GCJ-"gcj"}
5018 compiler=$CC
5019 _LT_AC_TAGVAR(compiler, $1)=$CC
5020 _LT_CC_BASENAME([$compiler])
5021
5022 # GCJ did not exist at the time GCC didn't implicitly link libc in.
5023 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5024
5025 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5026
5027 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5028 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5029 AC_LIBTOOL_PROG_CC_C_O($1)
5030 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5031 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5032 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5033 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5034
5035 AC_LIBTOOL_CONFIG($1)
5036
5037 AC_LANG_RESTORE
5038 CC="$lt_save_CC"
5039 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
5040
5041
5042 # AC_LIBTOOL_LANG_RC_CONFIG
5043 # -------------------------
5044 # Ensure that the configuration vars for the Windows resource compiler are
5045 # suitably defined. Those variables are subsequently used by
5046 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5047 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5048 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5049 [AC_LANG_SAVE
5050
5051 # Source file extension for RC test sources.
5052 ac_ext=rc
5053
5054 # Object file extension for compiled RC test sources.
5055 objext=o
5056 _LT_AC_TAGVAR(objext, $1)=$objext
5057
5058 # Code to be used in simple compile tests
5059 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
5060
5061 # Code to be used in simple link tests
5062 lt_simple_link_test_code="$lt_simple_compile_test_code"
5063
5064 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5065 _LT_AC_SYS_COMPILER
5066
5067 # save warnings/boilerplate of simple test code
5068 _LT_COMPILER_BOILERPLATE
5069 _LT_LINKER_BOILERPLATE
5070
5071 # Allow CC to be a program name with arguments.
5072 lt_save_CC="$CC"
5073 CC=${RC-"windres"}
5074 compiler=$CC
5075 _LT_AC_TAGVAR(compiler, $1)=$CC
5076 _LT_CC_BASENAME([$compiler])
5077 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5078
5079 AC_LIBTOOL_CONFIG($1)
5080
5081 AC_LANG_RESTORE
5082 CC="$lt_save_CC"
5083 ])# AC_LIBTOOL_LANG_RC_CONFIG
5084
5085
5086 # AC_LIBTOOL_CONFIG([TAGNAME])
5087 # ----------------------------
5088 # If TAGNAME is not passed, then create an initial libtool script
5089 # with a default configuration from the untagged config vars. Otherwise
5090 # add code to config.status for appending the configuration named by
5091 # TAGNAME from the matching tagged config vars.
5092 AC_DEFUN([AC_LIBTOOL_CONFIG],
5093 [# The else clause should only fire when bootstrapping the
5094 # libtool distribution, otherwise you forgot to ship ltmain.sh
5095 # with your package, and you will get complaints that there are
5096 # no rules to generate ltmain.sh.
5097 if test -f "$ltmain"; then
5098 # See if we are running on zsh, and set the options which allow our commands through
5099 # without removal of \ escapes.
5100 if test -n "${ZSH_VERSION+set}" ; then
5101 setopt NO_GLOB_SUBST
5102 fi
5103 # Now quote all the things that may contain metacharacters while being
5104 # careful not to overquote the AC_SUBSTed values. We take copies of the
5105 # variables and quote the copies for generation of the libtool script.
5106 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5107 SED SHELL STRIP \
5108 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5109 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5110 deplibs_check_method reload_flag reload_cmds need_locks \
5111 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5112 lt_cv_sys_global_symbol_to_c_name_address \
5113 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5114 old_postinstall_cmds old_postuninstall_cmds \
5115 _LT_AC_TAGVAR(compiler, $1) \
5116 _LT_AC_TAGVAR(CC, $1) \
5117 _LT_AC_TAGVAR(LD, $1) \
5118 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5119 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5120 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5121 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5122 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5123 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5124 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5125 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5126 _LT_AC_TAGVAR(old_archive_cmds, $1) \
5127 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5128 _LT_AC_TAGVAR(predep_objects, $1) \
5129 _LT_AC_TAGVAR(postdep_objects, $1) \
5130 _LT_AC_TAGVAR(predeps, $1) \
5131 _LT_AC_TAGVAR(postdeps, $1) \
5132 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5133 _LT_AC_TAGVAR(archive_cmds, $1) \
5134 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5135 _LT_AC_TAGVAR(postinstall_cmds, $1) \
5136 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5137 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5138 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5139 _LT_AC_TAGVAR(no_undefined_flag, $1) \
5140 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5141 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5142 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5143 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5144 _LT_AC_TAGVAR(hardcode_automatic, $1) \
5145 _LT_AC_TAGVAR(module_cmds, $1) \
5146 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5147 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5148 _LT_AC_TAGVAR(fix_srcfile_path, $1) \
5149 _LT_AC_TAGVAR(exclude_expsyms, $1) \
5150 _LT_AC_TAGVAR(include_expsyms, $1); do
5151
5152 case $var in
5153 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5154 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5155 _LT_AC_TAGVAR(archive_cmds, $1) | \
5156 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5157 _LT_AC_TAGVAR(module_cmds, $1) | \
5158 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5159 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5160 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5161 extract_expsyms_cmds | reload_cmds | finish_cmds | \
5162 postinstall_cmds | postuninstall_cmds | \
5163 old_postinstall_cmds | old_postuninstall_cmds | \
5164 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5165 # Double-quote double-evaled strings.
5166 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5167 ;;
5168 *)
5169 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5170 ;;
5171 esac
5172 done
5173
5174 case $lt_echo in
5175 *'\[$]0 --fallback-echo"')
5176 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5177 ;;
5178 esac
5179
5180 ifelse([$1], [],
5181 [cfgfile="${ofile}T"
5182 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5183 $rm -f "$cfgfile"
5184 AC_MSG_NOTICE([creating $ofile])],
5185 [cfgfile="$ofile"])
5186
5187 cat <<__EOF__ >> "$cfgfile"
5188 ifelse([$1], [],
5189 [#! $SHELL
5190
5191 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5192 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5193 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5194 #
5195 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
5196 # Free Software Foundation, Inc.
5197 #
5198 # This file is part of GNU Libtool:
5199 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5200 #
5201 # This program is free software; you can redistribute it and/or modify
5202 # it under the terms of the GNU General Public License as published by
5203 # the Free Software Foundation; either version 2 of the License, or
5204 # (at your option) any later version.
5205 #
5206 # This program is distributed in the hope that it will be useful, but
5207 # WITHOUT ANY WARRANTY; without even the implied warranty of
5208 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5209 # General Public License for more details.
5210 #
5211 # You should have received a copy of the GNU General Public License
5212 # along with this program; if not, write to the Free Software
5213 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5214 #
5215 # As a special exception to the GNU General Public License, if you
5216 # distribute this file as part of a program that contains a
5217 # configuration script generated by Autoconf, you may include it under
5218 # the same distribution terms that you use for the rest of that program.
5219
5220 # A sed program that does not truncate output.
5221 SED=$lt_SED
5222
5223 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5224 Xsed="$SED -e 1s/^X//"
5225
5226 # The HP-UX ksh and POSIX shell print the target directory to stdout
5227 # if CDPATH is set.
5228 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5229
5230 # The names of the tagged configurations supported by this script.
5231 available_tags=
5232
5233 # ### BEGIN LIBTOOL CONFIG],
5234 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5235
5236 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5237
5238 # Shell to use when invoking shell scripts.
5239 SHELL=$lt_SHELL
5240
5241 # Whether or not to build shared libraries.
5242 build_libtool_libs=$enable_shared
5243
5244 # Whether or not to build static libraries.
5245 build_old_libs=$enable_static
5246
5247 # Whether or not to add -lc for building shared libraries.
5248 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5249
5250 # Whether or not to disallow shared libs when runtime libs are static
5251 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5252
5253 # Whether or not to optimize for fast installation.
5254 fast_install=$enable_fast_install
5255
5256 # The host system.
5257 host_alias=$host_alias
5258 host=$host
5259 host_os=$host_os
5260
5261 # The build system.
5262 build_alias=$build_alias
5263 build=$build
5264 build_os=$build_os
5265
5266 # An echo program that does not interpret backslashes.
5267 echo=$lt_echo
5268
5269 # The archiver.
5270 AR=$lt_AR
5271 AR_FLAGS=$lt_AR_FLAGS
5272
5273 # A C compiler.
5274 LTCC=$lt_LTCC
5275
5276 # LTCC compiler flags.
5277 LTCFLAGS=$lt_LTCFLAGS
5278
5279 # A language-specific compiler.
5280 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5281
5282 # Is the compiler the GNU C compiler?
5283 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5284
5285 # An ERE matcher.
5286 EGREP=$lt_EGREP
5287
5288 # The linker used to build libraries.
5289 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5290
5291 # Whether we need hard or soft links.
5292 LN_S=$lt_LN_S
5293
5294 # A BSD-compatible nm program.
5295 NM=$lt_NM
5296
5297 # A symbol stripping program
5298 STRIP=$lt_STRIP
5299
5300 # Used to examine libraries when file_magic_cmd begins "file"
5301 MAGIC_CMD=$MAGIC_CMD
5302
5303 # Used on cygwin: DLL creation program.
5304 DLLTOOL="$DLLTOOL"
5305
5306 # Used on cygwin: object dumper.
5307 OBJDUMP="$OBJDUMP"
5308
5309 # Used on cygwin: assembler.
5310 AS="$AS"
5311
5312 # The name of the directory that contains temporary libtool files.
5313 objdir=$objdir
5314
5315 # How to create reloadable object files.
5316 reload_flag=$lt_reload_flag
5317 reload_cmds=$lt_reload_cmds
5318
5319 # How to pass a linker flag through the compiler.
5320 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5321
5322 # Object file suffix (normally "o").
5323 objext="$ac_objext"
5324
5325 # Old archive suffix (normally "a").
5326 libext="$libext"
5327
5328 # Shared library suffix (normally ".so").
5329 shrext_cmds='$shrext_cmds'
5330
5331 # Executable file suffix (normally "").
5332 exeext="$exeext"
5333
5334 # Additional compiler flags for building library objects.
5335 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5336 pic_mode=$pic_mode
5337
5338 # What is the maximum length of a command?
5339 max_cmd_len=$lt_cv_sys_max_cmd_len
5340
5341 # Does compiler simultaneously support -c and -o options?
5342 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5343
5344 # Must we lock files when doing compilation?
5345 need_locks=$lt_need_locks
5346
5347 # Do we need the lib prefix for modules?
5348 need_lib_prefix=$need_lib_prefix
5349
5350 # Do we need a version for libraries?
5351 need_version=$need_version
5352
5353 # Whether dlopen is supported.
5354 dlopen_support=$enable_dlopen
5355
5356 # Whether dlopen of programs is supported.
5357 dlopen_self=$enable_dlopen_self
5358
5359 # Whether dlopen of statically linked programs is supported.
5360 dlopen_self_static=$enable_dlopen_self_static
5361
5362 # Compiler flag to prevent dynamic linking.
5363 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5364
5365 # Compiler flag to turn off builtin functions.
5366 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5367
5368 # Compiler flag to allow reflexive dlopens.
5369 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5370
5371 # Compiler flag to generate shared objects directly from archives.
5372 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5373
5374 # Compiler flag to generate thread-safe objects.
5375 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5376
5377 # Library versioning type.
5378 version_type=$version_type
5379
5380 # Format of library name prefix.
5381 libname_spec=$lt_libname_spec
5382
5383 # List of archive names. First name is the real one, the rest are links.
5384 # The last name is the one that the linker finds with -lNAME.
5385 library_names_spec=$lt_library_names_spec
5386
5387 # The coded name of the library, if different from the real name.
5388 soname_spec=$lt_soname_spec
5389
5390 # Commands used to build and install an old-style archive.
5391 RANLIB=$lt_RANLIB
5392 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5393 old_postinstall_cmds=$lt_old_postinstall_cmds
5394 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5395
5396 # Create an old-style archive from a shared archive.
5397 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5398
5399 # Create a temporary old-style archive to link instead of a shared archive.
5400 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5401
5402 # Commands used to build and install a shared archive.
5403 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5404 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5405 postinstall_cmds=$lt_postinstall_cmds
5406 postuninstall_cmds=$lt_postuninstall_cmds
5407
5408 # Commands used to build a loadable module (assumed same as above if empty)
5409 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5410 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5411
5412 # Commands to strip libraries.
5413 old_striplib=$lt_old_striplib
5414 striplib=$lt_striplib
5415
5416 # Dependencies to place before the objects being linked to create a
5417 # shared library.
5418 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5419
5420 # Dependencies to place after the objects being linked to create a
5421 # shared library.
5422 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5423
5424 # Dependencies to place before the objects being linked to create a
5425 # shared library.
5426 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5427
5428 # Dependencies to place after the objects being linked to create a
5429 # shared library.
5430 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5431
5432 # The library search path used internally by the compiler when linking
5433 # a shared library.
5434 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5435
5436 # Method to check whether dependent libraries are shared objects.
5437 deplibs_check_method=$lt_deplibs_check_method
5438
5439 # Command to use when deplibs_check_method == file_magic.
5440 file_magic_cmd=$lt_file_magic_cmd
5441
5442 # Flag that allows shared libraries with undefined symbols to be built.
5443 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5444
5445 # Flag that forces no undefined symbols.
5446 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5447
5448 # Commands used to finish a libtool library installation in a directory.
5449 finish_cmds=$lt_finish_cmds
5450
5451 # Same as above, but a single script fragment to be evaled but not shown.
5452 finish_eval=$lt_finish_eval
5453
5454 # Take the output of nm and produce a listing of raw symbols and C names.
5455 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5456
5457 # Transform the output of nm in a proper C declaration
5458 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5459
5460 # Transform the output of nm in a C name address pair
5461 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5462
5463 # This is the shared library runtime path variable.
5464 runpath_var=$runpath_var
5465
5466 # This is the shared library path variable.
5467 shlibpath_var=$shlibpath_var
5468
5469 # Is shlibpath searched before the hard-coded library search path?
5470 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5471
5472 # How to hardcode a shared library path into an executable.
5473 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5474
5475 # Whether we should hardcode library paths into libraries.
5476 hardcode_into_libs=$hardcode_into_libs
5477
5478 # Flag to hardcode \$libdir into a binary during linking.
5479 # This must work even if \$libdir does not exist.
5480 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5481
5482 # If ld is used when linking, flag to hardcode \$libdir into
5483 # a binary during linking. This must work even if \$libdir does
5484 # not exist.
5485 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5486
5487 # Whether we need a single -rpath flag with a separated argument.
5488 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5489
5490 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5491 # resulting binary.
5492 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5493
5494 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5495 # resulting binary.
5496 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5497
5498 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5499 # the resulting binary.
5500 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5501
5502 # Set to yes if building a shared library automatically hardcodes DIR into the library
5503 # and all subsequent libraries and executables linked against it.
5504 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5505
5506 # Variables whose values should be saved in libtool wrapper scripts and
5507 # restored at relink time.
5508 variables_saved_for_relink="$variables_saved_for_relink"
5509
5510 # Whether libtool must link a program against all its dependency libraries.
5511 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5512
5513 # Compile-time system search path for libraries
5514 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5515
5516 # Run-time system search path for libraries
5517 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5518
5519 # Fix the shell variable \$srcfile for the compiler.
5520 fix_srcfile_path=$lt_fix_srcfile_path
5521
5522 # Set to yes if exported symbols are required.
5523 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5524
5525 # The commands to list exported symbols.
5526 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5527
5528 # The commands to extract the exported symbol list from a shared archive.
5529 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5530
5531 # Symbols that should not be listed in the preloaded symbols.
5532 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5533
5534 # Symbols that must always be exported.
5535 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5536
5537 ifelse([$1],[],
5538 [# ### END LIBTOOL CONFIG],
5539 [# ### END LIBTOOL TAG CONFIG: $tagname])
5540
5541 __EOF__
5542
5543 ifelse([$1],[], [
5544 case $host_os in
5545 aix3*)
5546 cat <<\EOF >> "$cfgfile"
5547
5548 # AIX sometimes has problems with the GCC collect2 program. For some
5549 # reason, if we set the COLLECT_NAMES environment variable, the problems
5550 # vanish in a puff of smoke.
5551 if test "X${COLLECT_NAMES+set}" != Xset; then
5552 COLLECT_NAMES=
5553 export COLLECT_NAMES
5554 fi
5555 EOF
5556 ;;
5557 esac
5558
5559 # We use sed instead of cat because bash on DJGPP gets confused if
5560 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5561 # text mode, it properly converts lines to CR/LF. This bash problem
5562 # is reportedly fixed, but why not run on old versions too?
5563 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5564
5565 mv -f "$cfgfile" "$ofile" || \
5566 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5567 chmod +x "$ofile"
5568 ])
5569 else
5570 # If there is no Makefile yet, we rely on a make rule to execute
5571 # `config.status --recheck' to rerun these tests and create the
5572 # libtool script then.
5573 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5574 if test -f "$ltmain_in"; then
5575 test -f Makefile && make "$ltmain"
5576 fi
5577 fi
5578 ])# AC_LIBTOOL_CONFIG
5579
5580
5581 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5582 # -------------------------------------------
5583 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5584 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5585
5586 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5587
5588 if test "$GCC" = yes; then
5589 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5590
5591 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5592 lt_cv_prog_compiler_rtti_exceptions,
5593 [-fno-rtti -fno-exceptions], [],
5594 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5595 fi
5596 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5597
5598
5599 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5600 # ---------------------------------
5601 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5602 [AC_REQUIRE([AC_CANONICAL_HOST])
5603 AC_REQUIRE([LT_AC_PROG_SED])
5604 AC_REQUIRE([AC_PROG_NM])
5605 AC_REQUIRE([AC_OBJEXT])
5606 # Check for command to grab the raw symbol name followed by C symbol from nm.
5607 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5608 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5609 [
5610 # These are sane defaults that work on at least a few old systems.
5611 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5612
5613 # Character class describing NM global symbol codes.
5614 symcode='[[BCDEGRST]]'
5615
5616 # Regexp to match symbols that can be accessed directly from C.
5617 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5618
5619 # Transform an extracted symbol line into a proper C declaration
5620 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5621
5622 # Transform an extracted symbol line into symbol name and symbol address
5623 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5624
5625 # Define system-specific variables.
5626 case $host_os in
5627 aix*)
5628 symcode='[[BCDT]]'
5629 ;;
5630 cygwin* | mingw* | pw32*)
5631 symcode='[[ABCDGISTW]]'
5632 ;;
5633 hpux*) # Its linker distinguishes data from code symbols
5634 if test "$host_cpu" = ia64; then
5635 symcode='[[ABCDEGRST]]'
5636 fi
5637 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5638 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5639 ;;
5640 linux* | k*bsd*-gnu)
5641 if test "$host_cpu" = ia64; then
5642 symcode='[[ABCDGIRSTW]]'
5643 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5644 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
5645 fi
5646 ;;
5647 irix* | nonstopux*)
5648 symcode='[[BCDEGRST]]'
5649 ;;
5650 osf*)
5651 symcode='[[BCDEGQRST]]'
5652 ;;
5653 solaris*)
5654 symcode='[[BDRT]]'
5655 ;;
5656 sco3.2v5*)
5657 symcode='[[DT]]'
5658 ;;
5659 sysv4.2uw2*)
5660 symcode='[[DT]]'
5661 ;;
5662 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5663 symcode='[[ABDT]]'
5664 ;;
5665 sysv4)
5666 symcode='[[DFNSTU]]'
5667 ;;
5668 esac
5669
5670 # Handle CRLF in mingw tool chain
5671 opt_cr=
5672 case $build_os in
5673 mingw*)
5674 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5675 ;;
5676 esac
5677
5678 # If we're using GNU nm, then use its standard symbol codes.
5679 case `$NM -V 2>&1` in
5680 *GNU* | *'with BFD'*)
5681 symcode='[[ABCDGIRSTW]]' ;;
5682 esac
5683
5684 # Try without a prefix undercore, then with it.
5685 for ac_symprfx in "" "_"; do
5686
5687 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5688 symxfrm="\\1 $ac_symprfx\\2 \\2"
5689
5690 # Write the raw and C identifiers.
5691 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5692
5693 # Check to see that the pipe works correctly.
5694 pipe_works=no
5695
5696 rm -f conftest*
5697 cat > conftest.$ac_ext <<EOF
5698 #ifdef __cplusplus
5699 extern "C" {
5700 #endif
5701 char nm_test_var;
5702 void nm_test_func(){}
5703 #ifdef __cplusplus
5704 }
5705 #endif
5706 int main(){nm_test_var='a';nm_test_func();return(0);}
5707 EOF
5708
5709 if AC_TRY_EVAL(ac_compile); then
5710 # Now try to grab the symbols.
5711 nlist=conftest.nm
5712 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5713 # Try sorting and uniquifying the output.
5714 if sort "$nlist" | uniq > "$nlist"T; then
5715 mv -f "$nlist"T "$nlist"
5716 else
5717 rm -f "$nlist"T
5718 fi
5719
5720 # Make sure that we snagged all the symbols we need.
5721 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5722 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5723 cat <<EOF > conftest.$ac_ext
5724 #ifdef __cplusplus
5725 extern "C" {
5726 #endif
5727
5728 EOF
5729 # Now generate the symbol file.
5730 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5731
5732 cat <<EOF >> conftest.$ac_ext
5733 #if defined (__STDC__) && __STDC__
5734 # define lt_ptr_t void *
5735 #else
5736 # define lt_ptr_t char *
5737 # define const
5738 #endif
5739
5740 /* The mapping between symbol names and symbols. */
5741 const struct {
5742 const char *name;
5743 lt_ptr_t address;
5744 }
5745 lt_preloaded_symbols[[]] =
5746 {
5747 EOF
5748 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5749 cat <<\EOF >> conftest.$ac_ext
5750 {0, (lt_ptr_t) 0}
5751 };
5752
5753 #ifdef __cplusplus
5754 }
5755 #endif
5756 EOF
5757 # Now try linking the two files.
5758 mv conftest.$ac_objext conftstm.$ac_objext
5759 lt_save_LIBS="$LIBS"
5760 lt_save_CFLAGS="$CFLAGS"
5761 LIBS="conftstm.$ac_objext"
5762 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5763 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5764 pipe_works=yes
5765 fi
5766 LIBS="$lt_save_LIBS"
5767 CFLAGS="$lt_save_CFLAGS"
5768 else
5769 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5770 fi
5771 else
5772 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5773 fi
5774 else
5775 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5776 fi
5777 else
5778 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5779 cat conftest.$ac_ext >&5
5780 fi
5781 rm -f conftest* conftst*
5782
5783 # Do not use the global_symbol_pipe unless it works.
5784 if test "$pipe_works" = yes; then
5785 break
5786 else
5787 lt_cv_sys_global_symbol_pipe=
5788 fi
5789 done
5790 ])
5791 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5792 lt_cv_sys_global_symbol_to_cdecl=
5793 fi
5794 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5795 AC_MSG_RESULT(failed)
5796 else
5797 AC_MSG_RESULT(ok)
5798 fi
5799 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5800
5801
5802 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5803 # ---------------------------------------
5804 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5805 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5806 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5807 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5808
5809 AC_MSG_CHECKING([for $compiler option to produce PIC])
5810 ifelse([$1],[CXX],[
5811 # C++ specific cases for pic, static, wl, etc.
5812 if test "$GXX" = yes; then
5813 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5814 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5815
5816 case $host_os in
5817 aix*)
5818 # All AIX code is PIC.
5819 if test "$host_cpu" = ia64; then
5820 # AIX 5 now supports IA64 processor
5821 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5822 fi
5823 ;;
5824 amigaos*)
5825 # FIXME: we need at least 68020 code to build shared libraries, but
5826 # adding the `-m68020' flag to GCC prevents building anything better,
5827 # like `-m68040'.
5828 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5829 ;;
5830 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5831 # PIC is the default for these OSes.
5832 ;;
5833 mingw* | cygwin* | os2* | pw32*)
5834 # This hack is so that the source file can tell whether it is being
5835 # built for inclusion in a dll (and should export symbols for example).
5836 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5837 # (--disable-auto-import) libraries
5838 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5839 ;;
5840 darwin* | rhapsody*)
5841 # PIC is the default on this platform
5842 # Common symbols not allowed in MH_DYLIB files
5843 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5844 ;;
5845 *djgpp*)
5846 # DJGPP does not support shared libraries at all
5847 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5848 ;;
5849 interix[[3-9]]*)
5850 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5851 # Instead, we relocate shared libraries at runtime.
5852 ;;
5853 sysv4*MP*)
5854 if test -d /usr/nec; then
5855 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5856 fi
5857 ;;
5858 hpux*)
5859 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5860 # not for PA HP-UX.
5861 case $host_cpu in
5862 hppa*64*|ia64*)
5863 ;;
5864 *)
5865 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5866 ;;
5867 esac
5868 ;;
5869 *)
5870 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5871 ;;
5872 esac
5873 else
5874 case $host_os in
5875 aix4* | aix5*)
5876 # All AIX code is PIC.
5877 if test "$host_cpu" = ia64; then
5878 # AIX 5 now supports IA64 processor
5879 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5880 else
5881 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5882 fi
5883 ;;
5884 chorus*)
5885 case $cc_basename in
5886 cxch68*)
5887 # Green Hills C++ Compiler
5888 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5889 ;;
5890 esac
5891 ;;
5892 darwin*)
5893 # PIC is the default on this platform
5894 # Common symbols not allowed in MH_DYLIB files
5895 case $cc_basename in
5896 xlc*)
5897 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5898 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5899 ;;
5900 esac
5901 ;;
5902 dgux*)
5903 case $cc_basename in
5904 ec++*)
5905 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5906 ;;
5907 ghcx*)
5908 # Green Hills C++ Compiler
5909 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5910 ;;
5911 *)
5912 ;;
5913 esac
5914 ;;
5915 freebsd* | dragonfly*)
5916 # FreeBSD uses GNU C++
5917 ;;
5918 hpux9* | hpux10* | hpux11*)
5919 case $cc_basename in
5920 CC*)
5921 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5922 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5923 if test "$host_cpu" != ia64; then
5924 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5925 fi
5926 ;;
5927 aCC*)
5928 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5929 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5930 case $host_cpu in
5931 hppa*64*|ia64*)
5932 # +Z the default
5933 ;;
5934 *)
5935 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5936 ;;
5937 esac
5938 ;;
5939 *)
5940 ;;
5941 esac
5942 ;;
5943 interix*)
5944 # This is c89, which is MS Visual C++ (no shared libs)
5945 # Anyone wants to do a port?
5946 ;;
5947 irix5* | irix6* | nonstopux*)
5948 case $cc_basename in
5949 CC*)
5950 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5951 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5952 # CC pic flag -KPIC is the default.
5953 ;;
5954 *)
5955 ;;
5956 esac
5957 ;;
5958 linux* | k*bsd*-gnu)
5959 case $cc_basename in
5960 KCC*)
5961 # KAI C++ Compiler
5962 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5963 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5964 ;;
5965 icpc* | ecpc*)
5966 # Intel C++
5967 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5968 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5969 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5970 ;;
5971 pgCC*)
5972 # Portland Group C++ compiler.
5973 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5974 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5975 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5976 ;;
5977 cxx*)
5978 # Compaq C++
5979 # Make sure the PIC flag is empty. It appears that all Alpha
5980 # Linux and Compaq Tru64 Unix objects are PIC.
5981 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5982 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5983 ;;
5984 *)
5985 case `$CC -V 2>&1 | sed 5q` in
5986 *Sun\ C*)
5987 # Sun C++ 5.9
5988 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5989 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5990 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5991 ;;
5992 esac
5993 ;;
5994 esac
5995 ;;
5996 lynxos*)
5997 ;;
5998 m88k*)
5999 ;;
6000 mvs*)
6001 case $cc_basename in
6002 cxx*)
6003 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6004 ;;
6005 *)
6006 ;;
6007 esac
6008 ;;
6009 netbsd*)
6010 ;;
6011 osf3* | osf4* | osf5*)
6012 case $cc_basename in
6013 KCC*)
6014 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6015 ;;
6016 RCC*)
6017 # Rational C++ 2.4.1
6018 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6019 ;;
6020 cxx*)
6021 # Digital/Compaq C++
6022 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6023 # Make sure the PIC flag is empty. It appears that all Alpha
6024 # Linux and Compaq Tru64 Unix objects are PIC.
6025 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6026 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6027 ;;
6028 *)
6029 ;;
6030 esac
6031 ;;
6032 psos*)
6033 ;;
6034 solaris*)
6035 case $cc_basename in
6036 CC*)
6037 # Sun C++ 4.2, 5.x and Centerline C++
6038 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6039 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6040 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6041 ;;
6042 gcx*)
6043 # Green Hills C++ Compiler
6044 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6045 ;;
6046 *)
6047 ;;
6048 esac
6049 ;;
6050 sunos4*)
6051 case $cc_basename in
6052 CC*)
6053 # Sun C++ 4.x
6054 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6055 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6056 ;;
6057 lcc*)
6058 # Lucid
6059 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6060 ;;
6061 *)
6062 ;;
6063 esac
6064 ;;
6065 tandem*)
6066 case $cc_basename in
6067 NCC*)
6068 # NonStop-UX NCC 3.20
6069 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6070 ;;
6071 *)
6072 ;;
6073 esac
6074 ;;
6075 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6076 case $cc_basename in
6077 CC*)
6078 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6079 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6080 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6081 ;;
6082 esac
6083 ;;
6084 vxworks*)
6085 ;;
6086 *)
6087 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6088 ;;
6089 esac
6090 fi
6091 ],
6092 [
6093 if test "$GCC" = yes; then
6094 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6095 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6096
6097 case $host_os in
6098 aix*)
6099 # All AIX code is PIC.
6100 if test "$host_cpu" = ia64; then
6101 # AIX 5 now supports IA64 processor
6102 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6103 fi
6104 ;;
6105
6106 amigaos*)
6107 # FIXME: we need at least 68020 code to build shared libraries, but
6108 # adding the `-m68020' flag to GCC prevents building anything better,
6109 # like `-m68040'.
6110 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6111 ;;
6112
6113 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6114 # PIC is the default for these OSes.
6115 ;;
6116
6117 mingw* | cygwin* | pw32* | os2*)
6118 # This hack is so that the source file can tell whether it is being
6119 # built for inclusion in a dll (and should export symbols for example).
6120 # Although the cygwin gcc ignores -fPIC, still need this for old-style
6121 # (--disable-auto-import) libraries
6122 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6123 ;;
6124
6125 darwin* | rhapsody*)
6126 # PIC is the default on this platform
6127 # Common symbols not allowed in MH_DYLIB files
6128 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6129 ;;
6130
6131 interix[[3-9]]*)
6132 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6133 # Instead, we relocate shared libraries at runtime.
6134 ;;
6135
6136 msdosdjgpp*)
6137 # Just because we use GCC doesn't mean we suddenly get shared libraries
6138 # on systems that don't support them.
6139 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6140 enable_shared=no
6141 ;;
6142
6143 sysv4*MP*)
6144 if test -d /usr/nec; then
6145 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6146 fi
6147 ;;
6148
6149 hpux*)
6150 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6151 # not for PA HP-UX.
6152 case $host_cpu in
6153 hppa*64*|ia64*)
6154 # +Z the default
6155 ;;
6156 *)
6157 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6158 ;;
6159 esac
6160 ;;
6161
6162 *)
6163 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6164 ;;
6165 esac
6166 else
6167 # PORTME Check for flag to pass linker flags through the system compiler.
6168 case $host_os in
6169 aix*)
6170 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6171 if test "$host_cpu" = ia64; then
6172 # AIX 5 now supports IA64 processor
6173 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6174 else
6175 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6176 fi
6177 ;;
6178 darwin*)
6179 # PIC is the default on this platform
6180 # Common symbols not allowed in MH_DYLIB files
6181 case $cc_basename in
6182 xlc*)
6183 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6184 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6185 ;;
6186 esac
6187 ;;
6188
6189 mingw* | cygwin* | pw32* | os2*)
6190 # This hack is so that the source file can tell whether it is being
6191 # built for inclusion in a dll (and should export symbols for example).
6192 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6193 ;;
6194
6195 hpux9* | hpux10* | hpux11*)
6196 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6197 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6198 # not for PA HP-UX.
6199 case $host_cpu in
6200 hppa*64*|ia64*)
6201 # +Z the default
6202 ;;
6203 *)
6204 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6205 ;;
6206 esac
6207 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6208 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6209 ;;
6210
6211 irix5* | irix6* | nonstopux*)
6212 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6213 # PIC (with -KPIC) is the default.
6214 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6215 ;;
6216
6217 newsos6)
6218 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6219 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6220 ;;
6221
6222 linux* | k*bsd*-gnu)
6223 case $cc_basename in
6224 icc* | ecc*)
6225 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6226 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6227 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6228 ;;
6229 pgcc* | pgf77* | pgf90* | pgf95*)
6230 # Portland Group compilers (*not* the Pentium gcc compiler,
6231 # which looks to be a dead project)
6232 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6233 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6234 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6235 ;;
6236 ccc*)
6237 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6238 # All Alpha code is PIC.
6239 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6240 ;;
6241 *)
6242 case `$CC -V 2>&1 | sed 5q` in
6243 *Sun\ C*)
6244 # Sun C 5.9
6245 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6246 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6247 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6248 ;;
6249 *Sun\ F*)
6250 # Sun Fortran 8.3 passes all unrecognized flags to the linker
6251 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6252 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6253 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
6254 ;;
6255 esac
6256 ;;
6257 esac
6258 ;;
6259
6260 osf3* | osf4* | osf5*)
6261 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6262 # All OSF/1 code is PIC.
6263 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6264 ;;
6265
6266 rdos*)
6267 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6268 ;;
6269
6270 solaris*)
6271 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6272 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6273 case $cc_basename in
6274 f77* | f90* | f95*)
6275 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6276 *)
6277 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6278 esac
6279 ;;
6280
6281 sunos4*)
6282 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6283 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6284 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6285 ;;
6286
6287 sysv4 | sysv4.2uw2* | sysv4.3*)
6288 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6289 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6290 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6291 ;;
6292
6293 sysv4*MP*)
6294 if test -d /usr/nec ;then
6295 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6296 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6297 fi
6298 ;;
6299
6300 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6301 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6302 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6303 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6304 ;;
6305
6306 unicos*)
6307 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6308 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6309 ;;
6310
6311 uts4*)
6312 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6313 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6314 ;;
6315
6316 *)
6317 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6318 ;;
6319 esac
6320 fi
6321 ])
6322 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6323
6324 #
6325 # Check to make sure the PIC flag actually works.
6326 #
6327 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6328 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6329 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6330 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6331 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6332 "" | " "*) ;;
6333 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6334 esac],
6335 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6336 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6337 fi
6338 case $host_os in
6339 # For platforms which do not support PIC, -DPIC is meaningless:
6340 *djgpp*)
6341 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6342 ;;
6343 *)
6344 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6345 ;;
6346 esac
6347
6348 #
6349 # Check to make sure the static flag actually works.
6350 #
6351 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6352 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6353 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6354 $lt_tmp_static_flag,
6355 [],
6356 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6357 ])
6358
6359
6360 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6361 # ------------------------------------
6362 # See if the linker supports building shared libraries.
6363 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6364 [AC_REQUIRE([LT_AC_PROG_SED])dnl
6365 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6366 ifelse([$1],[CXX],[
6367 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6368 case $host_os in
6369 aix4* | aix5*)
6370 # If we're using GNU nm, then we don't want the "-C" option.
6371 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6372 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6373 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6374 else
6375 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6376 fi
6377 ;;
6378 pw32*)
6379 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6380 ;;
6381 cygwin* | mingw*)
6382 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6383 ;;
6384 *)
6385 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6386 ;;
6387 esac
6388 ],[
6389 runpath_var=
6390 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6391 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6392 _LT_AC_TAGVAR(archive_cmds, $1)=
6393 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6394 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6395 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6396 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6397 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6398 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6399 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6400 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6401 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6402 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6403 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6404 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6405 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6406 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6407 _LT_AC_TAGVAR(module_cmds, $1)=
6408 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6409 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6410 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6411 # include_expsyms should be a list of space-separated symbols to be *always*
6412 # included in the symbol list
6413 _LT_AC_TAGVAR(include_expsyms, $1)=
6414 # exclude_expsyms can be an extended regexp of symbols to exclude
6415 # it will be wrapped by ` (' and `)$', so one must not match beginning or
6416 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6417 # as well as any symbol that contains `d'.
6418 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6419 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6420 # platforms (ab)use it in PIC code, but their linkers get confused if
6421 # the symbol is explicitly referenced. Since portable code cannot
6422 # rely on this symbol name, it's probably fine to never include it in
6423 # preloaded symbol tables.
6424 extract_expsyms_cmds=
6425 # Just being paranoid about ensuring that cc_basename is set.
6426 _LT_CC_BASENAME([$compiler])
6427 case $host_os in
6428 cygwin* | mingw* | pw32*)
6429 # FIXME: the MSVC++ port hasn't been tested in a loooong time
6430 # When not using gcc, we currently assume that we are using
6431 # Microsoft Visual C++.
6432 if test "$GCC" != yes; then
6433 with_gnu_ld=no
6434 fi
6435 ;;
6436 interix*)
6437 # we just hope/assume this is gcc and not c89 (= MSVC++)
6438 with_gnu_ld=yes
6439 ;;
6440 openbsd*)
6441 with_gnu_ld=no
6442 ;;
6443 esac
6444
6445 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6446 if test "$with_gnu_ld" = yes; then
6447 # If archive_cmds runs LD, not CC, wlarc should be empty
6448 wlarc='${wl}'
6449
6450 # Set some defaults for GNU ld with shared library support. These
6451 # are reset later if shared libraries are not supported. Putting them
6452 # here allows them to be overridden if necessary.
6453 runpath_var=LD_RUN_PATH
6454 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6455 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6456 # ancient GNU ld didn't support --whole-archive et. al.
6457 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6458 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6459 else
6460 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6461 fi
6462 supports_anon_versioning=no
6463 case `$LD -v 2>/dev/null` in
6464 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6465 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6466 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6467 *\ 2.11.*) ;; # other 2.11 versions
6468 *) supports_anon_versioning=yes ;;
6469 esac
6470
6471 # See if GNU ld supports shared libraries.
6472 case $host_os in
6473 aix3* | aix4* | aix5*)
6474 # On AIX/PPC, the GNU linker is very broken
6475 if test "$host_cpu" != ia64; then
6476 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6477 cat <<EOF 1>&2
6478
6479 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6480 *** to be unable to reliably create shared libraries on AIX.
6481 *** Therefore, libtool is disabling shared libraries support. If you
6482 *** really care for shared libraries, you may want to modify your PATH
6483 *** so that a non-GNU linker is found, and then restart.
6484
6485 EOF
6486 fi
6487 ;;
6488
6489 amigaos*)
6490 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6491 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6492 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6493
6494 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6495 # that the semantics of dynamic libraries on AmigaOS, at least up
6496 # to version 4, is to share data among multiple programs linked
6497 # with the same dynamic library. Since this doesn't match the
6498 # behavior of shared libraries on other platforms, we can't use
6499 # them.
6500 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6501 ;;
6502
6503 beos*)
6504 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6505 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6506 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6507 # support --undefined. This deserves some investigation. FIXME
6508 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6509 else
6510 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6511 fi
6512 ;;
6513
6514 cygwin* | mingw* | pw32*)
6515 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6516 # as there is no search path for DLLs.
6517 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6518 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6519 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6520 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6521 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6522
6523 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6524 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6525 # If the export-symbols file already is a .def file (1st line
6526 # is EXPORTS), use it as is; otherwise, prepend...
6527 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6528 cp $export_symbols $output_objdir/$soname.def;
6529 else
6530 echo EXPORTS > $output_objdir/$soname.def;
6531 cat $export_symbols >> $output_objdir/$soname.def;
6532 fi~
6533 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6534 else
6535 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6536 fi
6537 ;;
6538
6539 interix[[3-9]]*)
6540 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6541 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6542 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6543 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6544 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6545 # Instead, shared libraries are loaded at an image base (0x10000000 by
6546 # default) and relocated if they conflict, which is a slow very memory
6547 # consuming and fragmenting process. To avoid this, we pick a random,
6548 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6549 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6550 _LT_AC_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'
6551 _LT_AC_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'
6552 ;;
6553
6554 gnu* | linux* | k*bsd*-gnu)
6555 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6556 tmp_addflag=
6557 case $cc_basename,$host_cpu in
6558 pgcc*) # Portland Group C compiler
6559 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6560 tmp_addflag=' $pic_flag'
6561 ;;
6562 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6563 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6564 tmp_addflag=' $pic_flag -Mnomain' ;;
6565 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6566 tmp_addflag=' -i_dynamic' ;;
6567 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6568 tmp_addflag=' -i_dynamic -nofor_main' ;;
6569 ifc* | ifort*) # Intel Fortran compiler
6570 tmp_addflag=' -nofor_main' ;;
6571 esac
6572 case `$CC -V 2>&1 | sed 5q` in
6573 *Sun\ C*) # Sun C 5.9
6574 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
6575 tmp_sharedflag='-G' ;;
6576 *Sun\ F*) # Sun Fortran 8.3
6577 tmp_sharedflag='-G' ;;
6578 *)
6579 tmp_sharedflag='-shared' ;;
6580 esac
6581 _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6582
6583 if test $supports_anon_versioning = yes; then
6584 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6585 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6586 $echo "local: *; };" >> $output_objdir/$libname.ver~
6587 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6588 fi
6589 else
6590 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6591 fi
6592 ;;
6593
6594 netbsd*)
6595 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6596 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6597 wlarc=
6598 else
6599 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6600 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6601 fi
6602 ;;
6603
6604 solaris*)
6605 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6606 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6607 cat <<EOF 1>&2
6608
6609 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6610 *** create shared libraries on Solaris systems. Therefore, libtool
6611 *** is disabling shared libraries support. We urge you to upgrade GNU
6612 *** binutils to release 2.9.1 or newer. Another option is to modify
6613 *** your PATH or compiler configuration so that the native linker is
6614 *** used, and then restart.
6615
6616 EOF
6617 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6618 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6619 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6620 else
6621 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6622 fi
6623 ;;
6624
6625 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6626 case `$LD -v 2>&1` in
6627 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6628 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6629 cat <<_LT_EOF 1>&2
6630
6631 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6632 *** reliably create shared libraries on SCO systems. Therefore, libtool
6633 *** is disabling shared libraries support. We urge you to upgrade GNU
6634 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6635 *** your PATH or compiler configuration so that the native linker is
6636 *** used, and then restart.
6637
6638 _LT_EOF
6639 ;;
6640 *)
6641 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6642 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6643 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6644 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6645 else
6646 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6647 fi
6648 ;;
6649 esac
6650 ;;
6651
6652 sunos4*)
6653 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6654 wlarc=
6655 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6656 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6657 ;;
6658
6659 *)
6660 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6661 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6662 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6663 else
6664 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6665 fi
6666 ;;
6667 esac
6668
6669 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6670 runpath_var=
6671 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6672 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6673 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6674 fi
6675 else
6676 # PORTME fill in a description of your system's linker (not GNU ld)
6677 case $host_os in
6678 aix3*)
6679 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6680 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6681 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6682 # Note: this linker hardcodes the directories in LIBPATH if there
6683 # are no directories specified by -L.
6684 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6685 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6686 # Neither direct hardcoding nor static linking is supported with a
6687 # broken collect2.
6688 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6689 fi
6690 ;;
6691
6692 aix4* | aix5*)
6693 if test "$host_cpu" = ia64; then
6694 # On IA64, the linker does run time linking by default, so we don't
6695 # have to do anything special.
6696 aix_use_runtimelinking=no
6697 exp_sym_flag='-Bexport'
6698 no_entry_flag=""
6699 else
6700 # If we're using GNU nm, then we don't want the "-C" option.
6701 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6702 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6703 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6704 else
6705 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6706 fi
6707 aix_use_runtimelinking=no
6708
6709 # Test if we are trying to use run time linking or normal
6710 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6711 # need to do runtime linking.
6712 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6713 for ld_flag in $LDFLAGS; do
6714 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6715 aix_use_runtimelinking=yes
6716 break
6717 fi
6718 done
6719 ;;
6720 esac
6721
6722 exp_sym_flag='-bexport'
6723 no_entry_flag='-bnoentry'
6724 fi
6725
6726 # When large executables or shared objects are built, AIX ld can
6727 # have problems creating the table of contents. If linking a library
6728 # or program results in "error TOC overflow" add -mminimal-toc to
6729 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6730 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6731
6732 _LT_AC_TAGVAR(archive_cmds, $1)=''
6733 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6734 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6735 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6736
6737 if test "$GCC" = yes; then
6738 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6739 # We only want to do this on AIX 4.2 and lower, the check
6740 # below for broken collect2 doesn't work under 4.3+
6741 collect2name=`${CC} -print-prog-name=collect2`
6742 if test -f "$collect2name" && \
6743 strings "$collect2name" | grep resolve_lib_name >/dev/null
6744 then
6745 # We have reworked collect2
6746 :
6747 else
6748 # We have old collect2
6749 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6750 # It fails to find uninstalled libraries when the uninstalled
6751 # path is not listed in the libpath. Setting hardcode_minus_L
6752 # to unsupported forces relinking
6753 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6754 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6755 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6756 fi
6757 ;;
6758 esac
6759 shared_flag='-shared'
6760 if test "$aix_use_runtimelinking" = yes; then
6761 shared_flag="$shared_flag "'${wl}-G'
6762 fi
6763 else
6764 # not using gcc
6765 if test "$host_cpu" = ia64; then
6766 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6767 # chokes on -Wl,-G. The following line is correct:
6768 shared_flag='-G'
6769 else
6770 if test "$aix_use_runtimelinking" = yes; then
6771 shared_flag='${wl}-G'
6772 else
6773 shared_flag='${wl}-bM:SRE'
6774 fi
6775 fi
6776 fi
6777
6778 # It seems that -bexpall does not export symbols beginning with
6779 # underscore (_), so it is better to generate a list of symbols to export.
6780 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6781 if test "$aix_use_runtimelinking" = yes; then
6782 # Warning - without using the other runtime loading flags (-brtl),
6783 # -berok will link without error, but may produce a broken library.
6784 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6785 # Determine the default libpath from the value encoded in an empty executable.
6786 _LT_AC_SYS_LIBPATH_AIX
6787 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6788 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6789 else
6790 if test "$host_cpu" = ia64; then
6791 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6792 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6793 _LT_AC_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"
6794 else
6795 # Determine the default libpath from the value encoded in an empty executable.
6796 _LT_AC_SYS_LIBPATH_AIX
6797 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6798 # Warning - without using the other run time loading flags,
6799 # -berok will link without error, but may produce a broken library.
6800 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6801 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6802 # Exported symbols can be pulled into shared objects from archives
6803 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6804 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6805 # This is similar to how AIX traditionally builds its shared libraries.
6806 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6807 fi
6808 fi
6809 ;;
6810
6811 amigaos*)
6812 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6813 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6814 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6815 # see comment about different semantics on the GNU ld section
6816 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6817 ;;
6818
6819 bsdi[[45]]*)
6820 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6821 ;;
6822
6823 cygwin* | mingw* | pw32*)
6824 # When not using gcc, we currently assume that we are using
6825 # Microsoft Visual C++.
6826 # hardcode_libdir_flag_spec is actually meaningless, as there is
6827 # no search path for DLLs.
6828 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6829 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6830 # Tell ltmain to make .lib files, not .a files.
6831 libext=lib
6832 # Tell ltmain to make .dll files, not .so files.
6833 shrext_cmds=".dll"
6834 # FIXME: Setting linknames here is a bad hack.
6835 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6836 # The linker will automatically build a .lib file if we build a DLL.
6837 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6838 # FIXME: Should let the user specify the lib program.
6839 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6840 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6841 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6842 ;;
6843
6844 darwin* | rhapsody*)
6845 case $host_os in
6846 rhapsody* | darwin1.[[012]])
6847 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6848 ;;
6849 *) # Darwin 1.3 on
6850 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6851 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6852 else
6853 case ${MACOSX_DEPLOYMENT_TARGET} in
6854 10.[[012]])
6855 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6856 ;;
6857 10.*)
6858 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6859 ;;
6860 esac
6861 fi
6862 ;;
6863 esac
6864 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6865 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6866 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6867 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6868 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6869 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6870 if test "$GCC" = yes ; then
6871 output_verbose_link_cmd='echo'
6872 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6873 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6874 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6875 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6876 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6877 else
6878 case $cc_basename in
6879 xlc*)
6880 output_verbose_link_cmd='echo'
6881 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6882 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6883 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6884 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6885 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6886 ;;
6887 *)
6888 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6889 ;;
6890 esac
6891 fi
6892 ;;
6893
6894 dgux*)
6895 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6896 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6897 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6898 ;;
6899
6900 freebsd1*)
6901 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6902 ;;
6903
6904 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6905 # support. Future versions do this automatically, but an explicit c++rt0.o
6906 # does not break anything, and helps significantly (at the cost of a little
6907 # extra space).
6908 freebsd2.2*)
6909 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6910 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6911 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6912 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6913 ;;
6914
6915 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6916 freebsd2*)
6917 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6918 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6919 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6920 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6921 ;;
6922
6923 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6924 freebsd* | dragonfly*)
6925 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6926 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6927 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6928 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6929 ;;
6930
6931 hpux9*)
6932 if test "$GCC" = yes; then
6933 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6934 else
6935 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6936 fi
6937 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6938 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6939 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6940
6941 # hardcode_minus_L: Not really in the search PATH,
6942 # but as the default location of the library.
6943 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6944 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6945 ;;
6946
6947 hpux10*)
6948 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6949 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6950 else
6951 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6952 fi
6953 if test "$with_gnu_ld" = no; then
6954 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6955 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6956
6957 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6958 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6959
6960 # hardcode_minus_L: Not really in the search PATH,
6961 # but as the default location of the library.
6962 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6963 fi
6964 ;;
6965
6966 hpux11*)
6967 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6968 case $host_cpu in
6969 hppa*64*)
6970 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6971 ;;
6972 ia64*)
6973 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6974 ;;
6975 *)
6976 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6977 ;;
6978 esac
6979 else
6980 case $host_cpu in
6981 hppa*64*)
6982 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6983 ;;
6984 ia64*)
6985 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6986 ;;
6987 *)
6988 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6989 ;;
6990 esac
6991 fi
6992 if test "$with_gnu_ld" = no; then
6993 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6994 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6995
6996 case $host_cpu in
6997 hppa*64*|ia64*)
6998 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6999 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7000 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7001 ;;
7002 *)
7003 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7004 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7005
7006 # hardcode_minus_L: Not really in the search PATH,
7007 # but as the default location of the library.
7008 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7009 ;;
7010 esac
7011 fi
7012 ;;
7013
7014 irix5* | irix6* | nonstopux*)
7015 if test "$GCC" = yes; then
7016 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7017 else
7018 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7019 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7020 fi
7021 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7022 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7023 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7024 ;;
7025
7026 netbsd*)
7027 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7028 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7029 else
7030 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7031 fi
7032 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7033 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7034 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7035 ;;
7036
7037 newsos6)
7038 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7039 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7040 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7041 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7042 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7043 ;;
7044
7045 openbsd*)
7046 if test -f /usr/libexec/ld.so; then
7047 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7048 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7049 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7050 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7051 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7052 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7053 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7054 else
7055 case $host_os in
7056 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7057 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7058 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7059 ;;
7060 *)
7061 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7062 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7063 ;;
7064 esac
7065 fi
7066 else
7067 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7068 fi
7069 ;;
7070
7071 os2*)
7072 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7073 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7074 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7075 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
7076 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7077 ;;
7078
7079 osf3*)
7080 if test "$GCC" = yes; then
7081 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7082 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7083 else
7084 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7085 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7086 fi
7087 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7088 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7089 ;;
7090
7091 osf4* | osf5*) # as osf3* with the addition of -msym flag
7092 if test "$GCC" = yes; then
7093 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7094 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7095 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7096 else
7097 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7098 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7099 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7100 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7101
7102 # Both c and cxx compiler support -rpath directly
7103 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7104 fi
7105 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7106 ;;
7107
7108 solaris*)
7109 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7110 if test "$GCC" = yes; then
7111 wlarc='${wl}'
7112 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7113 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7114 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7115 else
7116 wlarc=''
7117 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7118 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7119 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7120 fi
7121 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7122 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7123 case $host_os in
7124 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7125 *)
7126 # The compiler driver will combine and reorder linker options,
7127 # but understands `-z linker_flag'. GCC discards it without `$wl',
7128 # but is careful enough not to reorder.
7129 # Supported since Solaris 2.6 (maybe 2.5.1?)
7130 if test "$GCC" = yes; then
7131 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7132 else
7133 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7134 fi
7135 ;;
7136 esac
7137 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7138 ;;
7139
7140 sunos4*)
7141 if test "x$host_vendor" = xsequent; then
7142 # Use $CC to link under sequent, because it throws in some extra .o
7143 # files that make .init and .fini sections work.
7144 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7145 else
7146 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7147 fi
7148 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7149 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7150 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7151 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7152 ;;
7153
7154 sysv4)
7155 case $host_vendor in
7156 sni)
7157 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7158 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7159 ;;
7160 siemens)
7161 ## LD is ld it makes a PLAMLIB
7162 ## CC just makes a GrossModule.
7163 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7164 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7165 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7166 ;;
7167 motorola)
7168 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7169 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7170 ;;
7171 esac
7172 runpath_var='LD_RUN_PATH'
7173 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7174 ;;
7175
7176 sysv4.3*)
7177 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7178 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7179 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7180 ;;
7181
7182 sysv4*MP*)
7183 if test -d /usr/nec; then
7184 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7185 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7186 runpath_var=LD_RUN_PATH
7187 hardcode_runpath_var=yes
7188 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7189 fi
7190 ;;
7191
7192 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7193 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7194 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7195 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7196 runpath_var='LD_RUN_PATH'
7197
7198 if test "$GCC" = yes; then
7199 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7200 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7201 else
7202 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7203 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7204 fi
7205 ;;
7206
7207 sysv5* | sco3.2v5* | sco5v6*)
7208 # Note: We can NOT use -z defs as we might desire, because we do not
7209 # link with -lc, and that would cause any symbols used from libc to
7210 # always be unresolved, which means just about no library would
7211 # ever link correctly. If we're not using GNU ld we use -z text
7212 # though, which does catch some bad symbols but isn't as heavy-handed
7213 # as -z defs.
7214 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7215 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7216 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7217 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7218 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7219 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7220 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7221 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7222 runpath_var='LD_RUN_PATH'
7223
7224 if test "$GCC" = yes; then
7225 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7226 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7227 else
7228 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7229 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7230 fi
7231 ;;
7232
7233 uts4*)
7234 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7235 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7236 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7237 ;;
7238
7239 *)
7240 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7241 ;;
7242 esac
7243 fi
7244 ])
7245 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7246 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7247
7248 #
7249 # Do we need to explicitly link libc?
7250 #
7251 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7252 x|xyes)
7253 # Assume -lc should be added
7254 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7255
7256 if test "$enable_shared" = yes && test "$GCC" = yes; then
7257 case $_LT_AC_TAGVAR(archive_cmds, $1) in
7258 *'~'*)
7259 # FIXME: we may have to deal with multi-command sequences.
7260 ;;
7261 '$CC '*)
7262 # Test whether the compiler implicitly links with -lc since on some
7263 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7264 # to ld, don't add -lc before -lgcc.
7265 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7266 $rm conftest*
7267 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7268
7269 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7270 soname=conftest
7271 lib=conftest
7272 libobjs=conftest.$ac_objext
7273 deplibs=
7274 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7275 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7276 compiler_flags=-v
7277 linker_flags=-v
7278 verstring=
7279 output_objdir=.
7280 libname=conftest
7281 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7282 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7283 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7284 then
7285 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7286 else
7287 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7288 fi
7289 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7290 else
7291 cat conftest.err 1>&5
7292 fi
7293 $rm conftest*
7294 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7295 ;;
7296 esac
7297 fi
7298 ;;
7299 esac
7300 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7301
7302
7303 # _LT_AC_FILE_LTDLL_C
7304 # -------------------
7305 # Be careful that the start marker always follows a newline.
7306 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7307 # /* ltdll.c starts here */
7308 # #define WIN32_LEAN_AND_MEAN
7309 # #include <windows.h>
7310 # #undef WIN32_LEAN_AND_MEAN
7311 # #include <stdio.h>
7312 #
7313 # #ifndef __CYGWIN__
7314 # # ifdef __CYGWIN32__
7315 # # define __CYGWIN__ __CYGWIN32__
7316 # # endif
7317 # #endif
7318 #
7319 # #ifdef __cplusplus
7320 # extern "C" {
7321 # #endif
7322 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7323 # #ifdef __cplusplus
7324 # }
7325 # #endif
7326 #
7327 # #ifdef __CYGWIN__
7328 # #include <cygwin/cygwin_dll.h>
7329 # DECLARE_CYGWIN_DLL( DllMain );
7330 # #endif
7331 # HINSTANCE __hDllInstance_base;
7332 #
7333 # BOOL APIENTRY
7334 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7335 # {
7336 # __hDllInstance_base = hInst;
7337 # return TRUE;
7338 # }
7339 # /* ltdll.c ends here */
7340 ])# _LT_AC_FILE_LTDLL_C
7341
7342
7343 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7344 # ---------------------------------
7345 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7346
7347
7348 # old names
7349 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7350 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7351 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7352 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7353 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7354 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7355 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7356
7357 # This is just to silence aclocal about the macro not being used
7358 ifelse([AC_DISABLE_FAST_INSTALL])
7359
7360 AC_DEFUN([LT_AC_PROG_GCJ],
7361 [AC_CHECK_TOOL(GCJ, gcj, no)
7362 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7363 AC_SUBST(GCJFLAGS)
7364 ])
7365
7366 AC_DEFUN([LT_AC_PROG_RC],
7367 [AC_CHECK_TOOL(RC, windres, no)
7368 ])
7369
7370
7371 # Cheap backport of AS_EXECUTABLE_P and required macros
7372 # from Autoconf 2.59; we should not use $as_executable_p directly.
7373
7374 # _AS_TEST_PREPARE
7375 # ----------------
7376 m4_ifndef([_AS_TEST_PREPARE],
7377 [m4_defun([_AS_TEST_PREPARE],
7378 [if test -x / >/dev/null 2>&1; then
7379 as_executable_p='test -x'
7380 else
7381 as_executable_p='test -f'
7382 fi
7383 ])])# _AS_TEST_PREPARE
7384
7385 # AS_EXECUTABLE_P
7386 # ---------------
7387 # Check whether a file is executable.
7388 m4_ifndef([AS_EXECUTABLE_P],
7389 [m4_defun([AS_EXECUTABLE_P],
7390 [AS_REQUIRE([_AS_TEST_PREPARE])dnl
7391 $as_executable_p $1[]dnl
7392 ])])# AS_EXECUTABLE_P
7393
7394 # NOTE: This macro has been submitted for inclusion into #
7395 # GNU Autoconf as AC_PROG_SED. When it is available in #
7396 # a released version of Autoconf we should remove this #
7397 # macro and use it instead. #
7398 # LT_AC_PROG_SED
7399 # --------------
7400 # Check for a fully-functional sed program, that truncates
7401 # as few characters as possible. Prefer GNU sed if found.
7402 AC_DEFUN([LT_AC_PROG_SED],
7403 [AC_MSG_CHECKING([for a sed that does not truncate output])
7404 AC_CACHE_VAL(lt_cv_path_SED,
7405 [# Loop through the user's path and test for sed and gsed.
7406 # Then use that list of sed's as ones to test for truncation.
7407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7408 for as_dir in $PATH
7409 do
7410 IFS=$as_save_IFS
7411 test -z "$as_dir" && as_dir=.
7412 for lt_ac_prog in sed gsed; do
7413 for ac_exec_ext in '' $ac_executable_extensions; do
7414 if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
7415 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7416 fi
7417 done
7418 done
7419 done
7420 IFS=$as_save_IFS
7421 lt_ac_max=0
7422 lt_ac_count=0
7423 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7424 # along with /bin/sed that truncates output.
7425 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7426 test ! -f $lt_ac_sed && continue
7427 cat /dev/null > conftest.in
7428 lt_ac_count=0
7429 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7430 # Check for GNU sed and select it if it is found.
7431 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7432 lt_cv_path_SED=$lt_ac_sed
7433 break
7434 fi
7435 while true; do
7436 cat conftest.in conftest.in >conftest.tmp
7437 mv conftest.tmp conftest.in
7438 cp conftest.in conftest.nl
7439 echo >>conftest.nl
7440 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7441 cmp -s conftest.out conftest.nl || break
7442 # 10000 chars as input seems more than enough
7443 test $lt_ac_count -gt 10 && break
7444 lt_ac_count=`expr $lt_ac_count + 1`
7445 if test $lt_ac_count -gt $lt_ac_max; then
7446 lt_ac_max=$lt_ac_count
7447 lt_cv_path_SED=$lt_ac_sed
7448 fi
7449 done
7450 done
7451 ])
7452 SED=$lt_cv_path_SED
7453 AC_SUBST([SED])
7454 AC_MSG_RESULT([$SED])
7455 ])
7456
7457 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
7458 #
7459 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7460 #
7461 # This program is free software; you can redistribute it and/or modify
7462 # it under the terms of the GNU General Public License as published by
7463 # the Free Software Foundation; either version 2 of the License, or
7464 # (at your option) any later version.
7465 #
7466 # This program is distributed in the hope that it will be useful, but
7467 # WITHOUT ANY WARRANTY; without even the implied warranty of
7468 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7469 # General Public License for more details.
7470 #
7471 # You should have received a copy of the GNU General Public License
7472 # along with this program; if not, write to the Free Software
7473 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7474 #
7475 # As a special exception to the GNU General Public License, if you
7476 # distribute this file as part of a program that contains a
7477 # configuration script generated by Autoconf, you may include it under
7478 # the same distribution terms that you use for the rest of that program.
7479
7480 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
7481 # ----------------------------------
7482 AC_DEFUN([PKG_PROG_PKG_CONFIG],
7483 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7484 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7485 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
7486 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7487 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
7488 fi
7489 if test -n "$PKG_CONFIG"; then
7490 _pkg_min_version=m4_default([$1], [0.9.0])
7491 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
7492 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7493 AC_MSG_RESULT([yes])
7494 else
7495 AC_MSG_RESULT([no])
7496 PKG_CONFIG=""
7497 fi
7498
7499 fi[]dnl
7500 ])# PKG_PROG_PKG_CONFIG
7501
7502 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
7503 #
7504 # Check to see whether a particular set of modules exists. Similar
7505 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
7506 #
7507 #
7508 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
7509 # this or PKG_CHECK_MODULES is called, or make sure to call
7510 # PKG_CHECK_EXISTS manually
7511 # --------------------------------------------------------------
7512 AC_DEFUN([PKG_CHECK_EXISTS],
7513 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7514 if test -n "$PKG_CONFIG" && \
7515 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
7516 m4_ifval([$2], [$2], [:])
7517 m4_ifvaln([$3], [else
7518 $3])dnl
7519 fi])
7520
7521
7522 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
7523 # ---------------------------------------------
7524 m4_define([_PKG_CONFIG],
7525 [if test -n "$PKG_CONFIG"; then
7526 if test -n "$$1"; then
7527 pkg_cv_[]$1="$$1"
7528 else
7529 PKG_CHECK_EXISTS([$3],
7530 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
7531 [pkg_failed=yes])
7532 fi
7533 else
7534 pkg_failed=untried
7535 fi[]dnl
7536 ])# _PKG_CONFIG
7537
7538 # _PKG_SHORT_ERRORS_SUPPORTED
7539 # -----------------------------
7540 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
7541 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
7542 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7543 _pkg_short_errors_supported=yes
7544 else
7545 _pkg_short_errors_supported=no
7546 fi[]dnl
7547 ])# _PKG_SHORT_ERRORS_SUPPORTED
7548
7549
7550 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
7551 # [ACTION-IF-NOT-FOUND])
7552 #
7553 #
7554 # Note that if there is a possibility the first call to
7555 # PKG_CHECK_MODULES might not happen, you should be sure to include an
7556 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
7557 #
7558 #
7559 # --------------------------------------------------------------
7560 AC_DEFUN([PKG_CHECK_MODULES],
7561 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
7562 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
7563 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
7564
7565 pkg_failed=no
7566 AC_MSG_CHECKING([for $1])
7567
7568 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
7569 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
7570
7571 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
7572 and $1[]_LIBS to avoid the need to call pkg-config.
7573 See the pkg-config man page for more details.])
7574
7575 if test $pkg_failed = yes; then
7576 _PKG_SHORT_ERRORS_SUPPORTED
7577 if test $_pkg_short_errors_supported = yes; then
7578 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
7579 else
7580 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
7581 fi
7582 # Put the nasty error message in config.log where it belongs
7583 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
7584
7585 ifelse([$4], , [AC_MSG_ERROR(dnl
7586 [Package requirements ($2) were not met:
7587
7588 $$1_PKG_ERRORS
7589
7590 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7591 installed software in a non-standard prefix.
7592
7593 _PKG_TEXT
7594 ])],
7595 [AC_MSG_RESULT([no])
7596 $4])
7597 elif test $pkg_failed = untried; then
7598 ifelse([$4], , [AC_MSG_FAILURE(dnl
7599 [The pkg-config script could not be found or is too old. Make sure it
7600 is in your PATH or set the PKG_CONFIG environment variable to the full
7601 path to pkg-config.
7602
7603 _PKG_TEXT
7604
7605 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
7606 [$4])
7607 else
7608 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
7609 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
7610 AC_MSG_RESULT([yes])
7611 ifelse([$3], , :, [$3])
7612 fi[]dnl
7613 ])# PKG_CHECK_MODULES
7614
7615 # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
7616 #
7617 # This file is free software; the Free Software Foundation
7618 # gives unlimited permission to copy and/or distribute it,
7619 # with or without modifications, as long as this notice is preserved.
7620
7621 # AM_AUTOMAKE_VERSION(VERSION)
7622 # ----------------------------
7623 # Automake X.Y traces this macro to ensure aclocal.m4 has been
7624 # generated from the m4 files accompanying Automake X.Y.
7625 # (This private macro should not be called outside this file.)
7626 AC_DEFUN([AM_AUTOMAKE_VERSION],
7627 [am__api_version='1.10'
7628 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
7629 dnl require some minimum version. Point them to the right macro.
7630 m4_if([$1], [1.10], [],
7631 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
7632 ])
7633
7634 # _AM_AUTOCONF_VERSION(VERSION)
7635 # -----------------------------
7636 # aclocal traces this macro to find the Autoconf version.
7637 # This is a private macro too. Using m4_define simplifies
7638 # the logic in aclocal, which can simply ignore this definition.
7639 m4_define([_AM_AUTOCONF_VERSION], [])
7640
7641 # AM_SET_CURRENT_AUTOMAKE_VERSION
7642 # -------------------------------
7643 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
7644 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
7645 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
7646 [AM_AUTOMAKE_VERSION([1.10])dnl
7647 _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
7648
7649 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
7650
7651 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7652 #
7653 # This file is free software; the Free Software Foundation
7654 # gives unlimited permission to copy and/or distribute it,
7655 # with or without modifications, as long as this notice is preserved.
7656
7657 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
7658 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
7659 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
7660 #
7661 # Of course, Automake must honor this variable whenever it calls a
7662 # tool from the auxiliary directory. The problem is that $srcdir (and
7663 # therefore $ac_aux_dir as well) can be either absolute or relative,
7664 # depending on how configure is run. This is pretty annoying, since
7665 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
7666 # source directory, any form will work fine, but in subdirectories a
7667 # relative path needs to be adjusted first.
7668 #
7669 # $ac_aux_dir/missing
7670 # fails when called from a subdirectory if $ac_aux_dir is relative
7671 # $top_srcdir/$ac_aux_dir/missing
7672 # fails if $ac_aux_dir is absolute,
7673 # fails when called from a subdirectory in a VPATH build with
7674 # a relative $ac_aux_dir
7675 #
7676 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
7677 # are both prefixed by $srcdir. In an in-source build this is usually
7678 # harmless because $srcdir is `.', but things will broke when you
7679 # start a VPATH build or use an absolute $srcdir.
7680 #
7681 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
7682 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
7683 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
7684 # and then we would define $MISSING as
7685 # MISSING="\${SHELL} $am_aux_dir/missing"
7686 # This will work as long as MISSING is not called from configure, because
7687 # unfortunately $(top_srcdir) has no meaning in configure.
7688 # However there are other variables, like CC, which are often used in
7689 # configure, and could therefore not use this "fixed" $ac_aux_dir.
7690 #
7691 # Another solution, used here, is to always expand $ac_aux_dir to an
7692 # absolute PATH. The drawback is that using absolute paths prevent a
7693 # configured tree to be moved without reconfiguration.
7694
7695 AC_DEFUN([AM_AUX_DIR_EXPAND],
7696 [dnl Rely on autoconf to set up CDPATH properly.
7697 AC_PREREQ([2.50])dnl
7698 # expand $ac_aux_dir to an absolute path
7699 am_aux_dir=`cd $ac_aux_dir && pwd`
7700 ])
7701
7702 # AM_CONDITIONAL -*- Autoconf -*-
7703
7704 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
7705 # Free Software Foundation, Inc.
7706 #
7707 # This file is free software; the Free Software Foundation
7708 # gives unlimited permission to copy and/or distribute it,
7709 # with or without modifications, as long as this notice is preserved.
7710
7711 # serial 8
7712
7713 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
7714 # -------------------------------------
7715 # Define a conditional.
7716 AC_DEFUN([AM_CONDITIONAL],
7717 [AC_PREREQ(2.52)dnl
7718 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
7719 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
7720 AC_SUBST([$1_TRUE])dnl
7721 AC_SUBST([$1_FALSE])dnl
7722 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
7723 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
7724 if $2; then
7725 $1_TRUE=
7726 $1_FALSE='#'
7727 else
7728 $1_TRUE='#'
7729 $1_FALSE=
7730 fi
7731 AC_CONFIG_COMMANDS_PRE(
7732 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
7733 AC_MSG_ERROR([[conditional "$1" was never defined.
7734 Usually this means the macro was only invoked conditionally.]])
7735 fi])])
7736
7737 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7738 # Free Software Foundation, Inc.
7739 #
7740 # This file is free software; the Free Software Foundation
7741 # gives unlimited permission to copy and/or distribute it,
7742 # with or without modifications, as long as this notice is preserved.
7743
7744 # serial 9
7745
7746 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
7747 # written in clear, in which case automake, when reading aclocal.m4,
7748 # will think it sees a *use*, and therefore will trigger all it's
7749 # C support machinery. Also note that it means that autoscan, seeing
7750 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
7751
7752
7753 # _AM_DEPENDENCIES(NAME)
7754 # ----------------------
7755 # See how the compiler implements dependency checking.
7756 # NAME is "CC", "CXX", "GCJ", or "OBJC".
7757 # We try a few techniques and use that to set a single cache variable.
7758 #
7759 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
7760 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
7761 # dependency, and given that the user is not expected to run this macro,
7762 # just rely on AC_PROG_CC.
7763 AC_DEFUN([_AM_DEPENDENCIES],
7764 [AC_REQUIRE([AM_SET_DEPDIR])dnl
7765 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
7766 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
7767 AC_REQUIRE([AM_DEP_TRACK])dnl
7768
7769 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
7770 [$1], CXX, [depcc="$CXX" am_compiler_list=],
7771 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
7772 [$1], UPC, [depcc="$UPC" am_compiler_list=],
7773 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
7774 [depcc="$$1" am_compiler_list=])
7775
7776 AC_CACHE_CHECK([dependency style of $depcc],
7777 [am_cv_$1_dependencies_compiler_type],
7778 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7779 # We make a subdir and do the tests there. Otherwise we can end up
7780 # making bogus files that we don't know about and never remove. For
7781 # instance it was reported that on HP-UX the gcc test will end up
7782 # making a dummy file named `D' -- because `-MD' means `put the output
7783 # in D'.
7784 mkdir conftest.dir
7785 # Copy depcomp to subdir because otherwise we won't find it if we're
7786 # using a relative directory.
7787 cp "$am_depcomp" conftest.dir
7788 cd conftest.dir
7789 # We will build objects and dependencies in a subdirectory because
7790 # it helps to detect inapplicable dependency modes. For instance
7791 # both Tru64's cc and ICC support -MD to output dependencies as a
7792 # side effect of compilation, but ICC will put the dependencies in
7793 # the current directory while Tru64 will put them in the object
7794 # directory.
7795 mkdir sub
7796
7797 am_cv_$1_dependencies_compiler_type=none
7798 if test "$am_compiler_list" = ""; then
7799 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
7800 fi
7801 for depmode in $am_compiler_list; do
7802 # Setup a source with many dependencies, because some compilers
7803 # like to wrap large dependency lists on column 80 (with \), and
7804 # we should not choose a depcomp mode which is confused by this.
7805 #
7806 # We need to recreate these files for each test, as the compiler may
7807 # overwrite some of them when testing with obscure command lines.
7808 # This happens at least with the AIX C compiler.
7809 : > sub/conftest.c
7810 for i in 1 2 3 4 5 6; do
7811 echo '#include "conftst'$i'.h"' >> sub/conftest.c
7812 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7813 # Solaris 8's {/usr,}/bin/sh.
7814 touch sub/conftst$i.h
7815 done
7816 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7817
7818 case $depmode in
7819 nosideeffect)
7820 # after this tag, mechanisms are not by side-effect, so they'll
7821 # only be used when explicitly requested
7822 if test "x$enable_dependency_tracking" = xyes; then
7823 continue
7824 else
7825 break
7826 fi
7827 ;;
7828 none) break ;;
7829 esac
7830 # We check with `-c' and `-o' for the sake of the "dashmstdout"
7831 # mode. It turns out that the SunPro C++ compiler does not properly
7832 # handle `-M -o', and we need to detect this.
7833 if depmode=$depmode \
7834 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7835 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7836 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7837 >/dev/null 2>conftest.err &&
7838 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
7839 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7840 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7841 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7842 # icc doesn't choke on unknown options, it will just issue warnings
7843 # or remarks (even with -Werror). So we grep stderr for any message
7844 # that says an option was ignored or not supported.
7845 # When given -MP, icc 7.0 and 7.1 complain thusly:
7846 # icc: Command line warning: ignoring option '-M'; no argument required
7847 # The diagnosis changed in icc 8.0:
7848 # icc: Command line remark: option '-MP' not supported
7849 if (grep 'ignoring option' conftest.err ||
7850 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7851 am_cv_$1_dependencies_compiler_type=$depmode
7852 break
7853 fi
7854 fi
7855 done
7856
7857 cd ..
7858 rm -rf conftest.dir
7859 else
7860 am_cv_$1_dependencies_compiler_type=none
7861 fi
7862 ])
7863 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7864 AM_CONDITIONAL([am__fastdep$1], [
7865 test "x$enable_dependency_tracking" != xno \
7866 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7867 ])
7868
7869
7870 # AM_SET_DEPDIR
7871 # -------------
7872 # Choose a directory name for dependency files.
7873 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
7874 AC_DEFUN([AM_SET_DEPDIR],
7875 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7876 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7877 ])
7878
7879
7880 # AM_DEP_TRACK
7881 # ------------
7882 AC_DEFUN([AM_DEP_TRACK],
7883 [AC_ARG_ENABLE(dependency-tracking,
7884 [ --disable-dependency-tracking speeds up one-time build
7885 --enable-dependency-tracking do not reject slow dependency extractors])
7886 if test "x$enable_dependency_tracking" != xno; then
7887 am_depcomp="$ac_aux_dir/depcomp"
7888 AMDEPBACKSLASH='\'
7889 fi
7890 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7891 AC_SUBST([AMDEPBACKSLASH])dnl
7892 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
7893 ])
7894
7895 # Generate code to set up dependency tracking. -*- Autoconf -*-
7896
7897 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
7898 # Free Software Foundation, Inc.
7899 #
7900 # This file is free software; the Free Software Foundation
7901 # gives unlimited permission to copy and/or distribute it,
7902 # with or without modifications, as long as this notice is preserved.
7903
7904 #serial 3
7905
7906 # _AM_OUTPUT_DEPENDENCY_COMMANDS
7907 # ------------------------------
7908 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7909 [for mf in $CONFIG_FILES; do
7910 # Strip MF so we end up with the name of the file.
7911 mf=`echo "$mf" | sed -e 's/:.*$//'`
7912 # Check whether this is an Automake generated Makefile or not.
7913 # We used to match only the files named `Makefile.in', but
7914 # some people rename them; so instead we look at the file content.
7915 # Grep'ing the first line is not enough: some people post-process
7916 # each Makefile.in and add a new line on top of each file to say so.
7917 # Grep'ing the whole file is not good either: AIX grep has a line
7918 # limit of 2048, but all sed's we know have understand at least 4000.
7919 if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
7920 dirpart=`AS_DIRNAME("$mf")`
7921 else
7922 continue
7923 fi
7924 # Extract the definition of DEPDIR, am__include, and am__quote
7925 # from the Makefile without running `make'.
7926 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7927 test -z "$DEPDIR" && continue
7928 am__include=`sed -n 's/^am__include = //p' < "$mf"`
7929 test -z "am__include" && continue
7930 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
7931 # When using ansi2knr, U may be empty or an underscore; expand it
7932 U=`sed -n 's/^U = //p' < "$mf"`
7933 # Find all dependency output files, they are included files with
7934 # $(DEPDIR) in their names. We invoke sed twice because it is the
7935 # simplest approach to changing $(DEPDIR) to its actual value in the
7936 # expansion.
7937 for file in `sed -n "
7938 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
7939 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7940 # Make sure the directory exists.
7941 test -f "$dirpart/$file" && continue
7942 fdir=`AS_DIRNAME(["$file"])`
7943 AS_MKDIR_P([$dirpart/$fdir])
7944 # echo "creating $dirpart/$file"
7945 echo '# dummy' > "$dirpart/$file"
7946 done
7947 done
7948 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7949
7950
7951 # AM_OUTPUT_DEPENDENCY_COMMANDS
7952 # -----------------------------
7953 # This macro should only be invoked once -- use via AC_REQUIRE.
7954 #
7955 # This code is only required when automatic dependency tracking
7956 # is enabled. FIXME. This creates each `.P' file that we will
7957 # need in order to bootstrap the dependency handling code.
7958 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7959 [AC_CONFIG_COMMANDS([depfiles],
7960 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7961 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7962 ])
7963
7964 # Do all the work for Automake. -*- Autoconf -*-
7965
7966 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
7967 # 2005, 2006 Free Software Foundation, Inc.
7968 #
7969 # This file is free software; the Free Software Foundation
7970 # gives unlimited permission to copy and/or distribute it,
7971 # with or without modifications, as long as this notice is preserved.
7972
7973 # serial 12
7974
7975 # This macro actually does too much. Some checks are only needed if
7976 # your package does certain things. But this isn't really a big deal.
7977
7978 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7979 # AM_INIT_AUTOMAKE([OPTIONS])
7980 # -----------------------------------------------
7981 # The call with PACKAGE and VERSION arguments is the old style
7982 # call (pre autoconf-2.50), which is being phased out. PACKAGE
7983 # and VERSION should now be passed to AC_INIT and removed from
7984 # the call to AM_INIT_AUTOMAKE.
7985 # We support both call styles for the transition. After
7986 # the next Automake release, Autoconf can make the AC_INIT
7987 # arguments mandatory, and then we can depend on a new Autoconf
7988 # release and drop the old call support.
7989 AC_DEFUN([AM_INIT_AUTOMAKE],
7990 [AC_PREREQ([2.60])dnl
7991 dnl Autoconf wants to disallow AM_ names. We explicitly allow
7992 dnl the ones we care about.
7993 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7994 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7995 AC_REQUIRE([AC_PROG_INSTALL])dnl
7996 if test "`cd $srcdir && pwd`" != "`pwd`"; then
7997 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
7998 # is not polluted with repeated "-I."
7999 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
8000 # test to see if srcdir already configured
8001 if test -f $srcdir/config.status; then
8002 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
8003 fi
8004 fi
8005
8006 # test whether we have cygpath
8007 if test -z "$CYGPATH_W"; then
8008 if (cygpath --version) >/dev/null 2>/dev/null; then
8009 CYGPATH_W='cygpath -w'
8010 else
8011 CYGPATH_W=echo
8012 fi
8013 fi
8014 AC_SUBST([CYGPATH_W])
8015
8016 # Define the identity of the package.
8017 dnl Distinguish between old-style and new-style calls.
8018 m4_ifval([$2],
8019 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
8020 AC_SUBST([PACKAGE], [$1])dnl
8021 AC_SUBST([VERSION], [$2])],
8022 [_AM_SET_OPTIONS([$1])dnl
8023 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
8024 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
8025 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
8026 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
8027 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
8028
8029 _AM_IF_OPTION([no-define],,
8030 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
8031 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
8032
8033 # Some tools Automake needs.
8034 AC_REQUIRE([AM_SANITY_CHECK])dnl
8035 AC_REQUIRE([AC_ARG_PROGRAM])dnl
8036 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
8037 AM_MISSING_PROG(AUTOCONF, autoconf)
8038 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
8039 AM_MISSING_PROG(AUTOHEADER, autoheader)
8040 AM_MISSING_PROG(MAKEINFO, makeinfo)
8041 AM_PROG_INSTALL_SH
8042 AM_PROG_INSTALL_STRIP
8043 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
8044 # We need awk for the "check" target. The system "awk" is bad on
8045 # some platforms.
8046 AC_REQUIRE([AC_PROG_AWK])dnl
8047 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
8048 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8049 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
8050 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
8051 [_AM_PROG_TAR([v7])])])
8052 _AM_IF_OPTION([no-dependencies],,
8053 [AC_PROVIDE_IFELSE([AC_PROG_CC],
8054 [_AM_DEPENDENCIES(CC)],
8055 [define([AC_PROG_CC],
8056 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
8057 AC_PROVIDE_IFELSE([AC_PROG_CXX],
8058 [_AM_DEPENDENCIES(CXX)],
8059 [define([AC_PROG_CXX],
8060 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
8061 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
8062 [_AM_DEPENDENCIES(OBJC)],
8063 [define([AC_PROG_OBJC],
8064 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
8065 ])
8066 ])
8067
8068
8069 # When config.status generates a header, we must update the stamp-h file.
8070 # This file resides in the same directory as the config header
8071 # that is generated. The stamp files are numbered to have different names.
8072
8073 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
8074 # loop where config.status creates the headers, so we can generate
8075 # our stamp files there.
8076 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
8077 [# Compute $1's index in $config_headers.
8078 _am_stamp_count=1
8079 for _am_header in $config_headers :; do
8080 case $_am_header in
8081 $1 | $1:* )
8082 break ;;
8083 * )
8084 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
8085 esac
8086 done
8087 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
8088
8089 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8090 #
8091 # This file is free software; the Free Software Foundation
8092 # gives unlimited permission to copy and/or distribute it,
8093 # with or without modifications, as long as this notice is preserved.
8094
8095 # AM_PROG_INSTALL_SH
8096 # ------------------
8097 # Define $install_sh.
8098 AC_DEFUN([AM_PROG_INSTALL_SH],
8099 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8100 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
8101 AC_SUBST(install_sh)])
8102
8103 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
8104 #
8105 # This file is free software; the Free Software Foundation
8106 # gives unlimited permission to copy and/or distribute it,
8107 # with or without modifications, as long as this notice is preserved.
8108
8109 # serial 2
8110
8111 # Check whether the underlying file-system supports filenames
8112 # with a leading dot. For instance MS-DOS doesn't.
8113 AC_DEFUN([AM_SET_LEADING_DOT],
8114 [rm -rf .tst 2>/dev/null
8115 mkdir .tst 2>/dev/null
8116 if test -d .tst; then
8117 am__leading_dot=.
8118 else
8119 am__leading_dot=_
8120 fi
8121 rmdir .tst 2>/dev/null
8122 AC_SUBST([am__leading_dot])])
8123
8124 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
8125 # From Jim Meyering
8126
8127 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
8128 # Free Software Foundation, Inc.
8129 #
8130 # This file is free software; the Free Software Foundation
8131 # gives unlimited permission to copy and/or distribute it,
8132 # with or without modifications, as long as this notice is preserved.
8133
8134 # serial 4
8135
8136 AC_DEFUN([AM_MAINTAINER_MODE],
8137 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
8138 dnl maintainer-mode is disabled by default
8139 AC_ARG_ENABLE(maintainer-mode,
8140 [ --enable-maintainer-mode enable make rules and dependencies not useful
8141 (and sometimes confusing) to the casual installer],
8142 USE_MAINTAINER_MODE=$enableval,
8143 USE_MAINTAINER_MODE=no)
8144 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8145 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
8146 MAINT=$MAINTAINER_MODE_TRUE
8147 AC_SUBST(MAINT)dnl
8148 ]
8149 )
8150
8151 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8152
8153 # Check to see how 'make' treats includes. -*- Autoconf -*-
8154
8155 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
8156 #
8157 # This file is free software; the Free Software Foundation
8158 # gives unlimited permission to copy and/or distribute it,
8159 # with or without modifications, as long as this notice is preserved.
8160
8161 # serial 3
8162
8163 # AM_MAKE_INCLUDE()
8164 # -----------------
8165 # Check to see how make treats includes.
8166 AC_DEFUN([AM_MAKE_INCLUDE],
8167 [am_make=${MAKE-make}
8168 cat > confinc << 'END'
8169 am__doit:
8170 @echo done
8171 .PHONY: am__doit
8172 END
8173 # If we don't find an include directive, just comment out the code.
8174 AC_MSG_CHECKING([for style of include used by $am_make])
8175 am__include="#"
8176 am__quote=
8177 _am_result=none
8178 # First try GNU make style include.
8179 echo "include confinc" > confmf
8180 # We grep out `Entering directory' and `Leaving directory'
8181 # messages which can occur if `w' ends up in MAKEFLAGS.
8182 # In particular we don't look at `^make:' because GNU make might
8183 # be invoked under some other name (usually "gmake"), in which
8184 # case it prints its new name instead of `make'.
8185 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
8186 am__include=include
8187 am__quote=
8188 _am_result=GNU
8189 fi
8190 # Now try BSD make style include.
8191 if test "$am__include" = "#"; then
8192 echo '.include "confinc"' > confmf
8193 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
8194 am__include=.include
8195 am__quote="\""
8196 _am_result=BSD
8197 fi
8198 fi
8199 AC_SUBST([am__include])
8200 AC_SUBST([am__quote])
8201 AC_MSG_RESULT([$_am_result])
8202 rm -f confinc confmf
8203 ])
8204
8205 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
8206
8207 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
8208 # Free Software Foundation, Inc.
8209 #
8210 # This file is free software; the Free Software Foundation
8211 # gives unlimited permission to copy and/or distribute it,
8212 # with or without modifications, as long as this notice is preserved.
8213
8214 # serial 5
8215
8216 # AM_MISSING_PROG(NAME, PROGRAM)
8217 # ------------------------------
8218 AC_DEFUN([AM_MISSING_PROG],
8219 [AC_REQUIRE([AM_MISSING_HAS_RUN])
8220 $1=${$1-"${am_missing_run}$2"}
8221 AC_SUBST($1)])
8222
8223
8224 # AM_MISSING_HAS_RUN
8225 # ------------------
8226 # Define MISSING if not defined so far and test if it supports --run.
8227 # If it does, set am_missing_run to use it, otherwise, to nothing.
8228 AC_DEFUN([AM_MISSING_HAS_RUN],
8229 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8230 AC_REQUIRE_AUX_FILE([missing])dnl
8231 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
8232 # Use eval to expand $SHELL
8233 if eval "$MISSING --run true"; then
8234 am_missing_run="$MISSING --run "
8235 else
8236 am_missing_run=
8237 AC_MSG_WARN([`missing' script is too old or missing])
8238 fi
8239 ])
8240
8241 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
8242 #
8243 # This file is free software; the Free Software Foundation
8244 # gives unlimited permission to copy and/or distribute it,
8245 # with or without modifications, as long as this notice is preserved.
8246
8247 # AM_PROG_MKDIR_P
8248 # ---------------
8249 # Check for `mkdir -p'.
8250 AC_DEFUN([AM_PROG_MKDIR_P],
8251 [AC_PREREQ([2.60])dnl
8252 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
8253 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
8254 dnl while keeping a definition of mkdir_p for backward compatibility.
8255 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8256 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8257 dnl Makefile.ins that do not define MKDIR_P, so we do our own
8258 dnl adjustment using top_builddir (which is defined more often than
8259 dnl MKDIR_P).
8260 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8261 case $mkdir_p in
8262 [[\\/$]]* | ?:[[\\/]]*) ;;
8263 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8264 esac
8265 ])
8266
8267 # Helper functions for option handling. -*- Autoconf -*-
8268
8269 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
8270 #
8271 # This file is free software; the Free Software Foundation
8272 # gives unlimited permission to copy and/or distribute it,
8273 # with or without modifications, as long as this notice is preserved.
8274
8275 # serial 3
8276
8277 # _AM_MANGLE_OPTION(NAME)
8278 # -----------------------
8279 AC_DEFUN([_AM_MANGLE_OPTION],
8280 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8281
8282 # _AM_SET_OPTION(NAME)
8283 # ------------------------------
8284 # Set option NAME. Presently that only means defining a flag for this option.
8285 AC_DEFUN([_AM_SET_OPTION],
8286 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8287
8288 # _AM_SET_OPTIONS(OPTIONS)
8289 # ----------------------------------
8290 # OPTIONS is a space-separated list of Automake options.
8291 AC_DEFUN([_AM_SET_OPTIONS],
8292 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8293
8294 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8295 # -------------------------------------------
8296 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8297 AC_DEFUN([_AM_IF_OPTION],
8298 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8299
8300 # Check to make sure that the build environment is sane. -*- Autoconf -*-
8301
8302 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
8303 # Free Software Foundation, Inc.
8304 #
8305 # This file is free software; the Free Software Foundation
8306 # gives unlimited permission to copy and/or distribute it,
8307 # with or without modifications, as long as this notice is preserved.
8308
8309 # serial 4
8310
8311 # AM_SANITY_CHECK
8312 # ---------------
8313 AC_DEFUN([AM_SANITY_CHECK],
8314 [AC_MSG_CHECKING([whether build environment is sane])
8315 # Just in case
8316 sleep 1
8317 echo timestamp > conftest.file
8318 # Do `set' in a subshell so we don't clobber the current shell's
8319 # arguments. Must try -L first in case configure is actually a
8320 # symlink; some systems play weird games with the mod time of symlinks
8321 # (eg FreeBSD returns the mod time of the symlink's containing
8322 # directory).
8323 if (
8324 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
8325 if test "$[*]" = "X"; then
8326 # -L didn't work.
8327 set X `ls -t $srcdir/configure conftest.file`
8328 fi
8329 rm -f conftest.file
8330 if test "$[*]" != "X $srcdir/configure conftest.file" \
8331 && test "$[*]" != "X conftest.file $srcdir/configure"; then
8332
8333 # If neither matched, then we have a broken ls. This can happen
8334 # if, for instance, CONFIG_SHELL is bash and it inherits a
8335 # broken ls alias from the environment. This has actually
8336 # happened. Such a system could not be considered "sane".
8337 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
8338 alias in your environment])
8339 fi
8340
8341 test "$[2]" = conftest.file
8342 )
8343 then
8344 # Ok.
8345 :
8346 else
8347 AC_MSG_ERROR([newly created file is older than distributed files!
8348 Check your system clock])
8349 fi
8350 AC_MSG_RESULT(yes)])
8351
8352 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8353 #
8354 # This file is free software; the Free Software Foundation
8355 # gives unlimited permission to copy and/or distribute it,
8356 # with or without modifications, as long as this notice is preserved.
8357
8358 # AM_PROG_INSTALL_STRIP
8359 # ---------------------
8360 # One issue with vendor `install' (even GNU) is that you can't
8361 # specify the program used to strip binaries. This is especially
8362 # annoying in cross-compiling environments, where the build's strip
8363 # is unlikely to handle the host's binaries.
8364 # Fortunately install-sh will honor a STRIPPROG variable, so we
8365 # always use install-sh in `make install-strip', and initialize
8366 # STRIPPROG with the value of the STRIP variable (set by the user).
8367 AC_DEFUN([AM_PROG_INSTALL_STRIP],
8368 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8369 # Installed binaries are usually stripped using `strip' when the user
8370 # run `make install-strip'. However `strip' might not be the right
8371 # tool to use in cross-compilation environments, therefore Automake
8372 # will honor the `STRIP' environment variable to overrule this program.
8373 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
8374 if test "$cross_compiling" != no; then
8375 AC_CHECK_TOOL([STRIP], [strip], :)
8376 fi
8377 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
8378 AC_SUBST([INSTALL_STRIP_PROGRAM])])
8379
8380 # Copyright (C) 2006 Free Software Foundation, Inc.
8381 #
8382 # This file is free software; the Free Software Foundation
8383 # gives unlimited permission to copy and/or distribute it,
8384 # with or without modifications, as long as this notice is preserved.
8385
8386 # _AM_SUBST_NOTMAKE(VARIABLE)
8387 # ---------------------------
8388 # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
8389 # This macro is traced by Automake.
8390 AC_DEFUN([_AM_SUBST_NOTMAKE])
8391
8392 # Check how to create a tarball. -*- Autoconf -*-
8393
8394 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
8395 #
8396 # This file is free software; the Free Software Foundation
8397 # gives unlimited permission to copy and/or distribute it,
8398 # with or without modifications, as long as this notice is preserved.
8399
8400 # serial 2
8401
8402 # _AM_PROG_TAR(FORMAT)
8403 # --------------------
8404 # Check how to create a tarball in format FORMAT.
8405 # FORMAT should be one of `v7', `ustar', or `pax'.
8406 #
8407 # Substitute a variable $(am__tar) that is a command
8408 # writing to stdout a FORMAT-tarball containing the directory
8409 # $tardir.
8410 # tardir=directory && $(am__tar) > result.tar
8411 #
8412 # Substitute a variable $(am__untar) that extract such
8413 # a tarball read from stdin.
8414 # $(am__untar) < result.tar
8415 AC_DEFUN([_AM_PROG_TAR],
8416 [# Always define AMTAR for backward compatibility.
8417 AM_MISSING_PROG([AMTAR], [tar])
8418 m4_if([$1], [v7],
8419 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
8420 [m4_case([$1], [ustar],, [pax],,
8421 [m4_fatal([Unknown tar format])])
8422 AC_MSG_CHECKING([how to create a $1 tar archive])
8423 # Loop over all known methods to create a tar archive until one works.
8424 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
8425 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
8426 # Do not fold the above two line into one, because Tru64 sh and
8427 # Solaris sh will not grok spaces in the rhs of `-'.
8428 for _am_tool in $_am_tools
8429 do
8430 case $_am_tool in
8431 gnutar)
8432 for _am_tar in tar gnutar gtar;
8433 do
8434 AM_RUN_LOG([$_am_tar --version]) && break
8435 done
8436 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
8437 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
8438 am__untar="$_am_tar -xf -"
8439 ;;
8440 plaintar)
8441 # Must skip GNU tar: if it does not support --format= it doesn't create
8442 # ustar tarball either.
8443 (tar --version) >/dev/null 2>&1 && continue
8444 am__tar='tar chf - "$$tardir"'
8445 am__tar_='tar chf - "$tardir"'
8446 am__untar='tar xf -'
8447 ;;
8448 pax)
8449 am__tar='pax -L -x $1 -w "$$tardir"'
8450 am__tar_='pax -L -x $1 -w "$tardir"'
8451 am__untar='pax -r'
8452 ;;
8453 cpio)
8454 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
8455 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
8456 am__untar='cpio -i -H $1 -d'
8457 ;;
8458 none)
8459 am__tar=false
8460 am__tar_=false
8461 am__untar=false
8462 ;;
8463 esac
8464
8465 # If the value was cached, stop now. We just wanted to have am__tar
8466 # and am__untar set.
8467 test -n "${am_cv_prog_tar_$1}" && break
8468
8469 # tar/untar a dummy directory, and stop if the command works
8470 rm -rf conftest.dir
8471 mkdir conftest.dir
8472 echo GrepMe > conftest.dir/file
8473 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
8474 rm -rf conftest.dir
8475 if test -s conftest.tar; then
8476 AM_RUN_LOG([$am__untar <conftest.tar])
8477 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
8478 fi
8479 done
8480 rm -rf conftest.dir
8481
8482 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
8483 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
8484 AC_SUBST([am__tar])
8485 AC_SUBST([am__untar])
8486 ]) # _AM_PROG_TAR
8487
0 #!/bin/sh
1 # Run this to generate all the initial makefiles, etc.
2
3 srcdir=`dirname $0`
4 test -z "$srcdir" && srcdir=.
5
6 PKG_NAME="PolicyKit-gnome"
7
8 (test -f $srcdir/src/Makefile.am) || {
9 echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
10 echo " top-level $PKG_NAME directory"
11 exit 1
12 }
13
14 which gnome-autogen.sh || {
15 echo "You need to install gnome-common from the GNOME SVN repository"
16 exit 1
17 }
18
19 REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
4 # Inc.
5
6 timestamp='2006-07-02'
7
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21 # 02110-1301, USA.
22 #
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
27
28
29 # Originally written by Per Bothner <per@bothner.com>.
30 # Please send patches to <config-patches@gnu.org>. Submit a context
31 # diff and a properly formatted ChangeLog entry.
32 #
33 # This script attempts to guess a canonical system name similar to
34 # config.sub. If it succeeds, it prints the system name on stdout, and
35 # exits with 0. Otherwise, it exits with 1.
36 #
37 # The plan is that this can be called by configure scripts if you
38 # don't specify an explicit build system type.
39
40 me=`echo "$0" | sed -e 's,.*/,,'`
41
42 usage="\
43 Usage: $0 [OPTION]
44
45 Output the configuration name of the system \`$me' is run on.
46
47 Operation modes:
48 -h, --help print this help, then exit
49 -t, --time-stamp print date of last modification, then exit
50 -v, --version print version number, then exit
51
52 Report bugs and patches to <config-patches@gnu.org>."
53
54 version="\
55 GNU config.guess ($timestamp)
56
57 Originally written by Per Bothner.
58 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
59 Free Software Foundation, Inc.
60
61 This is free software; see the source for copying conditions. There is NO
62 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
63
64 help="
65 Try \`$me --help' for more information."
66
67 # Parse command line
68 while test $# -gt 0 ; do
69 case $1 in
70 --time-stamp | --time* | -t )
71 echo "$timestamp" ; exit ;;
72 --version | -v )
73 echo "$version" ; exit ;;
74 --help | --h* | -h )
75 echo "$usage"; exit ;;
76 -- ) # Stop option processing
77 shift; break ;;
78 - ) # Use stdin as input.
79 break ;;
80 -* )
81 echo "$me: invalid option $1$help" >&2
82 exit 1 ;;
83 * )
84 break ;;
85 esac
86 done
87
88 if test $# != 0; then
89 echo "$me: too many arguments$help" >&2
90 exit 1
91 fi
92
93 trap 'exit 1' 1 2 15
94
95 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
96 # compiler to aid in system detection is discouraged as it requires
97 # temporary files to be created and, as you can see below, it is a
98 # headache to deal with in a portable fashion.
99
100 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
101 # use `HOST_CC' if defined, but it is deprecated.
102
103 # Portable tmp directory creation inspired by the Autoconf team.
104
105 set_cc_for_build='
106 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
107 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
108 : ${TMPDIR=/tmp} ;
109 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
110 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
111 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
112 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
113 dummy=$tmp/dummy ;
114 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
115 case $CC_FOR_BUILD,$HOST_CC,$CC in
116 ,,) echo "int x;" > $dummy.c ;
117 for c in cc gcc c89 c99 ; do
118 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
119 CC_FOR_BUILD="$c"; break ;
120 fi ;
121 done ;
122 if test x"$CC_FOR_BUILD" = x ; then
123 CC_FOR_BUILD=no_compiler_found ;
124 fi
125 ;;
126 ,,*) CC_FOR_BUILD=$CC ;;
127 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
128 esac ; set_cc_for_build= ;'
129
130 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
131 # (ghazi@noc.rutgers.edu 1994-08-24)
132 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
133 PATH=$PATH:/.attbin ; export PATH
134 fi
135
136 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
137 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
139 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140
141 # Note: order is significant - the case branches are not exclusive.
142
143 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
144 *:NetBSD:*:*)
145 # NetBSD (nbsd) targets should (where applicable) match one or
146 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
147 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
148 # switched to ELF, *-*-netbsd* would select the old
149 # object file format. This provides both forward
150 # compatibility and a consistent mechanism for selecting the
151 # object file format.
152 #
153 # Note: NetBSD doesn't particularly care about the vendor
154 # portion of the name. We always set it to "unknown".
155 sysctl="sysctl -n hw.machine_arch"
156 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
157 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
158 case "${UNAME_MACHINE_ARCH}" in
159 armeb) machine=armeb-unknown ;;
160 arm*) machine=arm-unknown ;;
161 sh3el) machine=shl-unknown ;;
162 sh3eb) machine=sh-unknown ;;
163 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
164 esac
165 # The Operating System including object format, if it has switched
166 # to ELF recently, or will in the future.
167 case "${UNAME_MACHINE_ARCH}" in
168 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
169 eval $set_cc_for_build
170 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
171 | grep __ELF__ >/dev/null
172 then
173 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
174 # Return netbsd for either. FIX?
175 os=netbsd
176 else
177 os=netbsdelf
178 fi
179 ;;
180 *)
181 os=netbsd
182 ;;
183 esac
184 # The OS release
185 # Debian GNU/NetBSD machines have a different userland, and
186 # thus, need a distinct triplet. However, they do not need
187 # kernel version information, so it can be replaced with a
188 # suitable tag, in the style of linux-gnu.
189 case "${UNAME_VERSION}" in
190 Debian*)
191 release='-gnu'
192 ;;
193 *)
194 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
195 ;;
196 esac
197 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
198 # contains redundant information, the shorter form:
199 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
200 echo "${machine}-${os}${release}"
201 exit ;;
202 *:OpenBSD:*:*)
203 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
204 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
205 exit ;;
206 *:ekkoBSD:*:*)
207 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
208 exit ;;
209 *:SolidBSD:*:*)
210 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
211 exit ;;
212 macppc:MirBSD:*:*)
213 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
214 exit ;;
215 *:MirBSD:*:*)
216 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
217 exit ;;
218 alpha:OSF1:*:*)
219 case $UNAME_RELEASE in
220 *4.0)
221 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
222 ;;
223 *5.*)
224 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
225 ;;
226 esac
227 # According to Compaq, /usr/sbin/psrinfo has been available on
228 # OSF/1 and Tru64 systems produced since 1995. I hope that
229 # covers most systems running today. This code pipes the CPU
230 # types through head -n 1, so we only detect the type of CPU 0.
231 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
232 case "$ALPHA_CPU_TYPE" in
233 "EV4 (21064)")
234 UNAME_MACHINE="alpha" ;;
235 "EV4.5 (21064)")
236 UNAME_MACHINE="alpha" ;;
237 "LCA4 (21066/21068)")
238 UNAME_MACHINE="alpha" ;;
239 "EV5 (21164)")
240 UNAME_MACHINE="alphaev5" ;;
241 "EV5.6 (21164A)")
242 UNAME_MACHINE="alphaev56" ;;
243 "EV5.6 (21164PC)")
244 UNAME_MACHINE="alphapca56" ;;
245 "EV5.7 (21164PC)")
246 UNAME_MACHINE="alphapca57" ;;
247 "EV6 (21264)")
248 UNAME_MACHINE="alphaev6" ;;
249 "EV6.7 (21264A)")
250 UNAME_MACHINE="alphaev67" ;;
251 "EV6.8CB (21264C)")
252 UNAME_MACHINE="alphaev68" ;;
253 "EV6.8AL (21264B)")
254 UNAME_MACHINE="alphaev68" ;;
255 "EV6.8CX (21264D)")
256 UNAME_MACHINE="alphaev68" ;;
257 "EV6.9A (21264/EV69A)")
258 UNAME_MACHINE="alphaev69" ;;
259 "EV7 (21364)")
260 UNAME_MACHINE="alphaev7" ;;
261 "EV7.9 (21364A)")
262 UNAME_MACHINE="alphaev79" ;;
263 esac
264 # A Pn.n version is a patched version.
265 # A Vn.n version is a released version.
266 # A Tn.n version is a released field test version.
267 # A Xn.n version is an unreleased experimental baselevel.
268 # 1.2 uses "1.2" for uname -r.
269 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
270 exit ;;
271 Alpha\ *:Windows_NT*:*)
272 # How do we know it's Interix rather than the generic POSIX subsystem?
273 # Should we change UNAME_MACHINE based on the output of uname instead
274 # of the specific Alpha model?
275 echo alpha-pc-interix
276 exit ;;
277 21064:Windows_NT:50:3)
278 echo alpha-dec-winnt3.5
279 exit ;;
280 Amiga*:UNIX_System_V:4.0:*)
281 echo m68k-unknown-sysv4
282 exit ;;
283 *:[Aa]miga[Oo][Ss]:*:*)
284 echo ${UNAME_MACHINE}-unknown-amigaos
285 exit ;;
286 *:[Mm]orph[Oo][Ss]:*:*)
287 echo ${UNAME_MACHINE}-unknown-morphos
288 exit ;;
289 *:OS/390:*:*)
290 echo i370-ibm-openedition
291 exit ;;
292 *:z/VM:*:*)
293 echo s390-ibm-zvmoe
294 exit ;;
295 *:OS400:*:*)
296 echo powerpc-ibm-os400
297 exit ;;
298 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
299 echo arm-acorn-riscix${UNAME_RELEASE}
300 exit ;;
301 arm:riscos:*:*|arm:RISCOS:*:*)
302 echo arm-unknown-riscos
303 exit ;;
304 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
305 echo hppa1.1-hitachi-hiuxmpp
306 exit ;;
307 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
308 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
309 if test "`(/bin/universe) 2>/dev/null`" = att ; then
310 echo pyramid-pyramid-sysv3
311 else
312 echo pyramid-pyramid-bsd
313 fi
314 exit ;;
315 NILE*:*:*:dcosx)
316 echo pyramid-pyramid-svr4
317 exit ;;
318 DRS?6000:unix:4.0:6*)
319 echo sparc-icl-nx6
320 exit ;;
321 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
322 case `/usr/bin/uname -p` in
323 sparc) echo sparc-icl-nx7; exit ;;
324 esac ;;
325 sun4H:SunOS:5.*:*)
326 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
327 exit ;;
328 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
329 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
330 exit ;;
331 i86pc:SunOS:5.*:*)
332 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
333 exit ;;
334 sun4*:SunOS:6*:*)
335 # According to config.sub, this is the proper way to canonicalize
336 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
337 # it's likely to be more like Solaris than SunOS4.
338 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
339 exit ;;
340 sun4*:SunOS:*:*)
341 case "`/usr/bin/arch -k`" in
342 Series*|S4*)
343 UNAME_RELEASE=`uname -v`
344 ;;
345 esac
346 # Japanese Language versions have a version number like `4.1.3-JL'.
347 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
348 exit ;;
349 sun3*:SunOS:*:*)
350 echo m68k-sun-sunos${UNAME_RELEASE}
351 exit ;;
352 sun*:*:4.2BSD:*)
353 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
354 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
355 case "`/bin/arch`" in
356 sun3)
357 echo m68k-sun-sunos${UNAME_RELEASE}
358 ;;
359 sun4)
360 echo sparc-sun-sunos${UNAME_RELEASE}
361 ;;
362 esac
363 exit ;;
364 aushp:SunOS:*:*)
365 echo sparc-auspex-sunos${UNAME_RELEASE}
366 exit ;;
367 # The situation for MiNT is a little confusing. The machine name
368 # can be virtually everything (everything which is not
369 # "atarist" or "atariste" at least should have a processor
370 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
371 # to the lowercase version "mint" (or "freemint"). Finally
372 # the system name "TOS" denotes a system which is actually not
373 # MiNT. But MiNT is downward compatible to TOS, so this should
374 # be no problem.
375 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
376 echo m68k-atari-mint${UNAME_RELEASE}
377 exit ;;
378 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
379 echo m68k-atari-mint${UNAME_RELEASE}
380 exit ;;
381 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
382 echo m68k-atari-mint${UNAME_RELEASE}
383 exit ;;
384 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
385 echo m68k-milan-mint${UNAME_RELEASE}
386 exit ;;
387 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
388 echo m68k-hades-mint${UNAME_RELEASE}
389 exit ;;
390 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
391 echo m68k-unknown-mint${UNAME_RELEASE}
392 exit ;;
393 m68k:machten:*:*)
394 echo m68k-apple-machten${UNAME_RELEASE}
395 exit ;;
396 powerpc:machten:*:*)
397 echo powerpc-apple-machten${UNAME_RELEASE}
398 exit ;;
399 RISC*:Mach:*:*)
400 echo mips-dec-mach_bsd4.3
401 exit ;;
402 RISC*:ULTRIX:*:*)
403 echo mips-dec-ultrix${UNAME_RELEASE}
404 exit ;;
405 VAX*:ULTRIX*:*:*)
406 echo vax-dec-ultrix${UNAME_RELEASE}
407 exit ;;
408 2020:CLIX:*:* | 2430:CLIX:*:*)
409 echo clipper-intergraph-clix${UNAME_RELEASE}
410 exit ;;
411 mips:*:*:UMIPS | mips:*:*:RISCos)
412 eval $set_cc_for_build
413 sed 's/^ //' << EOF >$dummy.c
414 #ifdef __cplusplus
415 #include <stdio.h> /* for printf() prototype */
416 int main (int argc, char *argv[]) {
417 #else
418 int main (argc, argv) int argc; char *argv[]; {
419 #endif
420 #if defined (host_mips) && defined (MIPSEB)
421 #if defined (SYSTYPE_SYSV)
422 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
423 #endif
424 #if defined (SYSTYPE_SVR4)
425 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
426 #endif
427 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
428 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
429 #endif
430 #endif
431 exit (-1);
432 }
433 EOF
434 $CC_FOR_BUILD -o $dummy $dummy.c &&
435 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
436 SYSTEM_NAME=`$dummy $dummyarg` &&
437 { echo "$SYSTEM_NAME"; exit; }
438 echo mips-mips-riscos${UNAME_RELEASE}
439 exit ;;
440 Motorola:PowerMAX_OS:*:*)
441 echo powerpc-motorola-powermax
442 exit ;;
443 Motorola:*:4.3:PL8-*)
444 echo powerpc-harris-powermax
445 exit ;;
446 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
447 echo powerpc-harris-powermax
448 exit ;;
449 Night_Hawk:Power_UNIX:*:*)
450 echo powerpc-harris-powerunix
451 exit ;;
452 m88k:CX/UX:7*:*)
453 echo m88k-harris-cxux7
454 exit ;;
455 m88k:*:4*:R4*)
456 echo m88k-motorola-sysv4
457 exit ;;
458 m88k:*:3*:R3*)
459 echo m88k-motorola-sysv3
460 exit ;;
461 AViiON:dgux:*:*)
462 # DG/UX returns AViiON for all architectures
463 UNAME_PROCESSOR=`/usr/bin/uname -p`
464 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
465 then
466 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
467 [ ${TARGET_BINARY_INTERFACE}x = x ]
468 then
469 echo m88k-dg-dgux${UNAME_RELEASE}
470 else
471 echo m88k-dg-dguxbcs${UNAME_RELEASE}
472 fi
473 else
474 echo i586-dg-dgux${UNAME_RELEASE}
475 fi
476 exit ;;
477 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
478 echo m88k-dolphin-sysv3
479 exit ;;
480 M88*:*:R3*:*)
481 # Delta 88k system running SVR3
482 echo m88k-motorola-sysv3
483 exit ;;
484 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
485 echo m88k-tektronix-sysv3
486 exit ;;
487 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
488 echo m68k-tektronix-bsd
489 exit ;;
490 *:IRIX*:*:*)
491 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
492 exit ;;
493 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
494 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
495 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
496 i*86:AIX:*:*)
497 echo i386-ibm-aix
498 exit ;;
499 ia64:AIX:*:*)
500 if [ -x /usr/bin/oslevel ] ; then
501 IBM_REV=`/usr/bin/oslevel`
502 else
503 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
504 fi
505 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
506 exit ;;
507 *:AIX:2:3)
508 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
509 eval $set_cc_for_build
510 sed 's/^ //' << EOF >$dummy.c
511 #include <sys/systemcfg.h>
512
513 main()
514 {
515 if (!__power_pc())
516 exit(1);
517 puts("powerpc-ibm-aix3.2.5");
518 exit(0);
519 }
520 EOF
521 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
522 then
523 echo "$SYSTEM_NAME"
524 else
525 echo rs6000-ibm-aix3.2.5
526 fi
527 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
528 echo rs6000-ibm-aix3.2.4
529 else
530 echo rs6000-ibm-aix3.2
531 fi
532 exit ;;
533 *:AIX:*:[45])
534 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
535 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
536 IBM_ARCH=rs6000
537 else
538 IBM_ARCH=powerpc
539 fi
540 if [ -x /usr/bin/oslevel ] ; then
541 IBM_REV=`/usr/bin/oslevel`
542 else
543 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
544 fi
545 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
546 exit ;;
547 *:AIX:*:*)
548 echo rs6000-ibm-aix
549 exit ;;
550 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
551 echo romp-ibm-bsd4.4
552 exit ;;
553 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
554 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
555 exit ;; # report: romp-ibm BSD 4.3
556 *:BOSX:*:*)
557 echo rs6000-bull-bosx
558 exit ;;
559 DPX/2?00:B.O.S.:*:*)
560 echo m68k-bull-sysv3
561 exit ;;
562 9000/[34]??:4.3bsd:1.*:*)
563 echo m68k-hp-bsd
564 exit ;;
565 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
566 echo m68k-hp-bsd4.4
567 exit ;;
568 9000/[34678]??:HP-UX:*:*)
569 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
570 case "${UNAME_MACHINE}" in
571 9000/31? ) HP_ARCH=m68000 ;;
572 9000/[34]?? ) HP_ARCH=m68k ;;
573 9000/[678][0-9][0-9])
574 if [ -x /usr/bin/getconf ]; then
575 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
576 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
577 case "${sc_cpu_version}" in
578 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
579 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
580 532) # CPU_PA_RISC2_0
581 case "${sc_kernel_bits}" in
582 32) HP_ARCH="hppa2.0n" ;;
583 64) HP_ARCH="hppa2.0w" ;;
584 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
585 esac ;;
586 esac
587 fi
588 if [ "${HP_ARCH}" = "" ]; then
589 eval $set_cc_for_build
590 sed 's/^ //' << EOF >$dummy.c
591
592 #define _HPUX_SOURCE
593 #include <stdlib.h>
594 #include <unistd.h>
595
596 int main ()
597 {
598 #if defined(_SC_KERNEL_BITS)
599 long bits = sysconf(_SC_KERNEL_BITS);
600 #endif
601 long cpu = sysconf (_SC_CPU_VERSION);
602
603 switch (cpu)
604 {
605 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
606 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
607 case CPU_PA_RISC2_0:
608 #if defined(_SC_KERNEL_BITS)
609 switch (bits)
610 {
611 case 64: puts ("hppa2.0w"); break;
612 case 32: puts ("hppa2.0n"); break;
613 default: puts ("hppa2.0"); break;
614 } break;
615 #else /* !defined(_SC_KERNEL_BITS) */
616 puts ("hppa2.0"); break;
617 #endif
618 default: puts ("hppa1.0"); break;
619 }
620 exit (0);
621 }
622 EOF
623 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
624 test -z "$HP_ARCH" && HP_ARCH=hppa
625 fi ;;
626 esac
627 if [ ${HP_ARCH} = "hppa2.0w" ]
628 then
629 eval $set_cc_for_build
630
631 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
632 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
633 # generating 64-bit code. GNU and HP use different nomenclature:
634 #
635 # $ CC_FOR_BUILD=cc ./config.guess
636 # => hppa2.0w-hp-hpux11.23
637 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
638 # => hppa64-hp-hpux11.23
639
640 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
641 grep __LP64__ >/dev/null
642 then
643 HP_ARCH="hppa2.0w"
644 else
645 HP_ARCH="hppa64"
646 fi
647 fi
648 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
649 exit ;;
650 ia64:HP-UX:*:*)
651 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
652 echo ia64-hp-hpux${HPUX_REV}
653 exit ;;
654 3050*:HI-UX:*:*)
655 eval $set_cc_for_build
656 sed 's/^ //' << EOF >$dummy.c
657 #include <unistd.h>
658 int
659 main ()
660 {
661 long cpu = sysconf (_SC_CPU_VERSION);
662 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
663 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
664 results, however. */
665 if (CPU_IS_PA_RISC (cpu))
666 {
667 switch (cpu)
668 {
669 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
670 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
671 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
672 default: puts ("hppa-hitachi-hiuxwe2"); break;
673 }
674 }
675 else if (CPU_IS_HP_MC68K (cpu))
676 puts ("m68k-hitachi-hiuxwe2");
677 else puts ("unknown-hitachi-hiuxwe2");
678 exit (0);
679 }
680 EOF
681 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
682 { echo "$SYSTEM_NAME"; exit; }
683 echo unknown-hitachi-hiuxwe2
684 exit ;;
685 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
686 echo hppa1.1-hp-bsd
687 exit ;;
688 9000/8??:4.3bsd:*:*)
689 echo hppa1.0-hp-bsd
690 exit ;;
691 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
692 echo hppa1.0-hp-mpeix
693 exit ;;
694 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
695 echo hppa1.1-hp-osf
696 exit ;;
697 hp8??:OSF1:*:*)
698 echo hppa1.0-hp-osf
699 exit ;;
700 i*86:OSF1:*:*)
701 if [ -x /usr/sbin/sysversion ] ; then
702 echo ${UNAME_MACHINE}-unknown-osf1mk
703 else
704 echo ${UNAME_MACHINE}-unknown-osf1
705 fi
706 exit ;;
707 parisc*:Lites*:*:*)
708 echo hppa1.1-hp-lites
709 exit ;;
710 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
711 echo c1-convex-bsd
712 exit ;;
713 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
714 if getsysinfo -f scalar_acc
715 then echo c32-convex-bsd
716 else echo c2-convex-bsd
717 fi
718 exit ;;
719 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
720 echo c34-convex-bsd
721 exit ;;
722 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
723 echo c38-convex-bsd
724 exit ;;
725 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
726 echo c4-convex-bsd
727 exit ;;
728 CRAY*Y-MP:*:*:*)
729 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
730 exit ;;
731 CRAY*[A-Z]90:*:*:*)
732 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
733 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
734 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
735 -e 's/\.[^.]*$/.X/'
736 exit ;;
737 CRAY*TS:*:*:*)
738 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
739 exit ;;
740 CRAY*T3E:*:*:*)
741 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
742 exit ;;
743 CRAY*SV1:*:*:*)
744 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
745 exit ;;
746 *:UNICOS/mp:*:*)
747 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
748 exit ;;
749 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
750 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
751 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
752 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
753 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
754 exit ;;
755 5000:UNIX_System_V:4.*:*)
756 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
757 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
758 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
759 exit ;;
760 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
761 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
762 exit ;;
763 sparc*:BSD/OS:*:*)
764 echo sparc-unknown-bsdi${UNAME_RELEASE}
765 exit ;;
766 *:BSD/OS:*:*)
767 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
768 exit ;;
769 *:FreeBSD:*:*)
770 case ${UNAME_MACHINE} in
771 pc98)
772 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
773 amd64)
774 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
775 *)
776 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
777 esac
778 exit ;;
779 i*:CYGWIN*:*)
780 echo ${UNAME_MACHINE}-pc-cygwin
781 exit ;;
782 i*:MINGW*:*)
783 echo ${UNAME_MACHINE}-pc-mingw32
784 exit ;;
785 i*:windows32*:*)
786 # uname -m includes "-pc" on this system.
787 echo ${UNAME_MACHINE}-mingw32
788 exit ;;
789 i*:PW*:*)
790 echo ${UNAME_MACHINE}-pc-pw32
791 exit ;;
792 x86:Interix*:[3456]*)
793 echo i586-pc-interix${UNAME_RELEASE}
794 exit ;;
795 EM64T:Interix*:[3456]*)
796 echo x86_64-unknown-interix${UNAME_RELEASE}
797 exit ;;
798 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
799 echo i${UNAME_MACHINE}-pc-mks
800 exit ;;
801 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
802 # How do we know it's Interix rather than the generic POSIX subsystem?
803 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
804 # UNAME_MACHINE based on the output of uname instead of i386?
805 echo i586-pc-interix
806 exit ;;
807 i*:UWIN*:*)
808 echo ${UNAME_MACHINE}-pc-uwin
809 exit ;;
810 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
811 echo x86_64-unknown-cygwin
812 exit ;;
813 p*:CYGWIN*:*)
814 echo powerpcle-unknown-cygwin
815 exit ;;
816 prep*:SunOS:5.*:*)
817 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
818 exit ;;
819 *:GNU:*:*)
820 # the GNU system
821 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
822 exit ;;
823 *:GNU/*:*:*)
824 # other systems with GNU libc and userland
825 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
826 exit ;;
827 i*86:Minix:*:*)
828 echo ${UNAME_MACHINE}-pc-minix
829 exit ;;
830 arm*:Linux:*:*)
831 echo ${UNAME_MACHINE}-unknown-linux-gnu
832 exit ;;
833 avr32*:Linux:*:*)
834 echo ${UNAME_MACHINE}-unknown-linux-gnu
835 exit ;;
836 cris:Linux:*:*)
837 echo cris-axis-linux-gnu
838 exit ;;
839 crisv32:Linux:*:*)
840 echo crisv32-axis-linux-gnu
841 exit ;;
842 frv:Linux:*:*)
843 echo frv-unknown-linux-gnu
844 exit ;;
845 ia64:Linux:*:*)
846 echo ${UNAME_MACHINE}-unknown-linux-gnu
847 exit ;;
848 m32r*:Linux:*:*)
849 echo ${UNAME_MACHINE}-unknown-linux-gnu
850 exit ;;
851 m68*:Linux:*:*)
852 echo ${UNAME_MACHINE}-unknown-linux-gnu
853 exit ;;
854 mips:Linux:*:*)
855 eval $set_cc_for_build
856 sed 's/^ //' << EOF >$dummy.c
857 #undef CPU
858 #undef mips
859 #undef mipsel
860 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
861 CPU=mipsel
862 #else
863 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
864 CPU=mips
865 #else
866 CPU=
867 #endif
868 #endif
869 EOF
870 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
871 /^CPU/{
872 s: ::g
873 p
874 }'`"
875 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
876 ;;
877 mips64:Linux:*:*)
878 eval $set_cc_for_build
879 sed 's/^ //' << EOF >$dummy.c
880 #undef CPU
881 #undef mips64
882 #undef mips64el
883 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
884 CPU=mips64el
885 #else
886 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
887 CPU=mips64
888 #else
889 CPU=
890 #endif
891 #endif
892 EOF
893 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
894 /^CPU/{
895 s: ::g
896 p
897 }'`"
898 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
899 ;;
900 or32:Linux:*:*)
901 echo or32-unknown-linux-gnu
902 exit ;;
903 ppc:Linux:*:*)
904 echo powerpc-unknown-linux-gnu
905 exit ;;
906 ppc64:Linux:*:*)
907 echo powerpc64-unknown-linux-gnu
908 exit ;;
909 alpha:Linux:*:*)
910 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
911 EV5) UNAME_MACHINE=alphaev5 ;;
912 EV56) UNAME_MACHINE=alphaev56 ;;
913 PCA56) UNAME_MACHINE=alphapca56 ;;
914 PCA57) UNAME_MACHINE=alphapca56 ;;
915 EV6) UNAME_MACHINE=alphaev6 ;;
916 EV67) UNAME_MACHINE=alphaev67 ;;
917 EV68*) UNAME_MACHINE=alphaev68 ;;
918 esac
919 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
920 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
921 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
922 exit ;;
923 parisc:Linux:*:* | hppa:Linux:*:*)
924 # Look for CPU level
925 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
926 PA7*) echo hppa1.1-unknown-linux-gnu ;;
927 PA8*) echo hppa2.0-unknown-linux-gnu ;;
928 *) echo hppa-unknown-linux-gnu ;;
929 esac
930 exit ;;
931 parisc64:Linux:*:* | hppa64:Linux:*:*)
932 echo hppa64-unknown-linux-gnu
933 exit ;;
934 s390:Linux:*:* | s390x:Linux:*:*)
935 echo ${UNAME_MACHINE}-ibm-linux
936 exit ;;
937 sh64*:Linux:*:*)
938 echo ${UNAME_MACHINE}-unknown-linux-gnu
939 exit ;;
940 sh*:Linux:*:*)
941 echo ${UNAME_MACHINE}-unknown-linux-gnu
942 exit ;;
943 sparc:Linux:*:* | sparc64:Linux:*:*)
944 echo ${UNAME_MACHINE}-unknown-linux-gnu
945 exit ;;
946 vax:Linux:*:*)
947 echo ${UNAME_MACHINE}-dec-linux-gnu
948 exit ;;
949 x86_64:Linux:*:*)
950 echo x86_64-unknown-linux-gnu
951 exit ;;
952 i*86:Linux:*:*)
953 # The BFD linker knows what the default object file format is, so
954 # first see if it will tell us. cd to the root directory to prevent
955 # problems with other programs or directories called `ld' in the path.
956 # Set LC_ALL=C to ensure ld outputs messages in English.
957 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
958 | sed -ne '/supported targets:/!d
959 s/[ ][ ]*/ /g
960 s/.*supported targets: *//
961 s/ .*//
962 p'`
963 case "$ld_supported_targets" in
964 elf32-i386)
965 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
966 ;;
967 a.out-i386-linux)
968 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
969 exit ;;
970 coff-i386)
971 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
972 exit ;;
973 "")
974 # Either a pre-BFD a.out linker (linux-gnuoldld) or
975 # one that does not give us useful --help.
976 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
977 exit ;;
978 esac
979 # Determine whether the default compiler is a.out or elf
980 eval $set_cc_for_build
981 sed 's/^ //' << EOF >$dummy.c
982 #include <features.h>
983 #ifdef __ELF__
984 # ifdef __GLIBC__
985 # if __GLIBC__ >= 2
986 LIBC=gnu
987 # else
988 LIBC=gnulibc1
989 # endif
990 # else
991 LIBC=gnulibc1
992 # endif
993 #else
994 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
995 LIBC=gnu
996 #else
997 LIBC=gnuaout
998 #endif
999 #endif
1000 #ifdef __dietlibc__
1001 LIBC=dietlibc
1002 #endif
1003 EOF
1004 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1005 /^LIBC/{
1006 s: ::g
1007 p
1008 }'`"
1009 test x"${LIBC}" != x && {
1010 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1011 exit
1012 }
1013 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1014 ;;
1015 i*86:DYNIX/ptx:4*:*)
1016 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1017 # earlier versions are messed up and put the nodename in both
1018 # sysname and nodename.
1019 echo i386-sequent-sysv4
1020 exit ;;
1021 i*86:UNIX_SV:4.2MP:2.*)
1022 # Unixware is an offshoot of SVR4, but it has its own version
1023 # number series starting with 2...
1024 # I am not positive that other SVR4 systems won't match this,
1025 # I just have to hope. -- rms.
1026 # Use sysv4.2uw... so that sysv4* matches it.
1027 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1028 exit ;;
1029 i*86:OS/2:*:*)
1030 # If we were able to find `uname', then EMX Unix compatibility
1031 # is probably installed.
1032 echo ${UNAME_MACHINE}-pc-os2-emx
1033 exit ;;
1034 i*86:XTS-300:*:STOP)
1035 echo ${UNAME_MACHINE}-unknown-stop
1036 exit ;;
1037 i*86:atheos:*:*)
1038 echo ${UNAME_MACHINE}-unknown-atheos
1039 exit ;;
1040 i*86:syllable:*:*)
1041 echo ${UNAME_MACHINE}-pc-syllable
1042 exit ;;
1043 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1044 echo i386-unknown-lynxos${UNAME_RELEASE}
1045 exit ;;
1046 i*86:*DOS:*:*)
1047 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1048 exit ;;
1049 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1050 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1051 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1052 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1053 else
1054 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1055 fi
1056 exit ;;
1057 i*86:*:5:[678]*)
1058 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1059 case `/bin/uname -X | grep "^Machine"` in
1060 *486*) UNAME_MACHINE=i486 ;;
1061 *Pentium) UNAME_MACHINE=i586 ;;
1062 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1063 esac
1064 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1065 exit ;;
1066 i*86:*:3.2:*)
1067 if test -f /usr/options/cb.name; then
1068 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1069 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1070 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1071 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1072 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1073 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1074 && UNAME_MACHINE=i586
1075 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1076 && UNAME_MACHINE=i686
1077 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1078 && UNAME_MACHINE=i686
1079 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1080 else
1081 echo ${UNAME_MACHINE}-pc-sysv32
1082 fi
1083 exit ;;
1084 pc:*:*:*)
1085 # Left here for compatibility:
1086 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1087 # the processor, so we play safe by assuming i386.
1088 echo i386-pc-msdosdjgpp
1089 exit ;;
1090 Intel:Mach:3*:*)
1091 echo i386-pc-mach3
1092 exit ;;
1093 paragon:*:*:*)
1094 echo i860-intel-osf1
1095 exit ;;
1096 i860:*:4.*:*) # i860-SVR4
1097 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1098 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1099 else # Add other i860-SVR4 vendors below as they are discovered.
1100 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1101 fi
1102 exit ;;
1103 mini*:CTIX:SYS*5:*)
1104 # "miniframe"
1105 echo m68010-convergent-sysv
1106 exit ;;
1107 mc68k:UNIX:SYSTEM5:3.51m)
1108 echo m68k-convergent-sysv
1109 exit ;;
1110 M680?0:D-NIX:5.3:*)
1111 echo m68k-diab-dnix
1112 exit ;;
1113 M68*:*:R3V[5678]*:*)
1114 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1115 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1116 OS_REL=''
1117 test -r /etc/.relid \
1118 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1119 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1120 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1121 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1122 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1123 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1124 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1125 && { echo i486-ncr-sysv4; exit; } ;;
1126 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1127 echo m68k-unknown-lynxos${UNAME_RELEASE}
1128 exit ;;
1129 mc68030:UNIX_System_V:4.*:*)
1130 echo m68k-atari-sysv4
1131 exit ;;
1132 TSUNAMI:LynxOS:2.*:*)
1133 echo sparc-unknown-lynxos${UNAME_RELEASE}
1134 exit ;;
1135 rs6000:LynxOS:2.*:*)
1136 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1137 exit ;;
1138 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1139 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1140 exit ;;
1141 SM[BE]S:UNIX_SV:*:*)
1142 echo mips-dde-sysv${UNAME_RELEASE}
1143 exit ;;
1144 RM*:ReliantUNIX-*:*:*)
1145 echo mips-sni-sysv4
1146 exit ;;
1147 RM*:SINIX-*:*:*)
1148 echo mips-sni-sysv4
1149 exit ;;
1150 *:SINIX-*:*:*)
1151 if uname -p 2>/dev/null >/dev/null ; then
1152 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1153 echo ${UNAME_MACHINE}-sni-sysv4
1154 else
1155 echo ns32k-sni-sysv
1156 fi
1157 exit ;;
1158 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1159 # says <Richard.M.Bartel@ccMail.Census.GOV>
1160 echo i586-unisys-sysv4
1161 exit ;;
1162 *:UNIX_System_V:4*:FTX*)
1163 # From Gerald Hewes <hewes@openmarket.com>.
1164 # How about differentiating between stratus architectures? -djm
1165 echo hppa1.1-stratus-sysv4
1166 exit ;;
1167 *:*:*:FTX*)
1168 # From seanf@swdc.stratus.com.
1169 echo i860-stratus-sysv4
1170 exit ;;
1171 i*86:VOS:*:*)
1172 # From Paul.Green@stratus.com.
1173 echo ${UNAME_MACHINE}-stratus-vos
1174 exit ;;
1175 *:VOS:*:*)
1176 # From Paul.Green@stratus.com.
1177 echo hppa1.1-stratus-vos
1178 exit ;;
1179 mc68*:A/UX:*:*)
1180 echo m68k-apple-aux${UNAME_RELEASE}
1181 exit ;;
1182 news*:NEWS-OS:6*:*)
1183 echo mips-sony-newsos6
1184 exit ;;
1185 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1186 if [ -d /usr/nec ]; then
1187 echo mips-nec-sysv${UNAME_RELEASE}
1188 else
1189 echo mips-unknown-sysv${UNAME_RELEASE}
1190 fi
1191 exit ;;
1192 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1193 echo powerpc-be-beos
1194 exit ;;
1195 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1196 echo powerpc-apple-beos
1197 exit ;;
1198 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1199 echo i586-pc-beos
1200 exit ;;
1201 SX-4:SUPER-UX:*:*)
1202 echo sx4-nec-superux${UNAME_RELEASE}
1203 exit ;;
1204 SX-5:SUPER-UX:*:*)
1205 echo sx5-nec-superux${UNAME_RELEASE}
1206 exit ;;
1207 SX-6:SUPER-UX:*:*)
1208 echo sx6-nec-superux${UNAME_RELEASE}
1209 exit ;;
1210 Power*:Rhapsody:*:*)
1211 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1212 exit ;;
1213 *:Rhapsody:*:*)
1214 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1215 exit ;;
1216 *:Darwin:*:*)
1217 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1218 case $UNAME_PROCESSOR in
1219 unknown) UNAME_PROCESSOR=powerpc ;;
1220 esac
1221 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1222 exit ;;
1223 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1224 UNAME_PROCESSOR=`uname -p`
1225 if test "$UNAME_PROCESSOR" = "x86"; then
1226 UNAME_PROCESSOR=i386
1227 UNAME_MACHINE=pc
1228 fi
1229 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1230 exit ;;
1231 *:QNX:*:4*)
1232 echo i386-pc-qnx
1233 exit ;;
1234 NSE-?:NONSTOP_KERNEL:*:*)
1235 echo nse-tandem-nsk${UNAME_RELEASE}
1236 exit ;;
1237 NSR-?:NONSTOP_KERNEL:*:*)
1238 echo nsr-tandem-nsk${UNAME_RELEASE}
1239 exit ;;
1240 *:NonStop-UX:*:*)
1241 echo mips-compaq-nonstopux
1242 exit ;;
1243 BS2000:POSIX*:*:*)
1244 echo bs2000-siemens-sysv
1245 exit ;;
1246 DS/*:UNIX_System_V:*:*)
1247 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1248 exit ;;
1249 *:Plan9:*:*)
1250 # "uname -m" is not consistent, so use $cputype instead. 386
1251 # is converted to i386 for consistency with other x86
1252 # operating systems.
1253 if test "$cputype" = "386"; then
1254 UNAME_MACHINE=i386
1255 else
1256 UNAME_MACHINE="$cputype"
1257 fi
1258 echo ${UNAME_MACHINE}-unknown-plan9
1259 exit ;;
1260 *:TOPS-10:*:*)
1261 echo pdp10-unknown-tops10
1262 exit ;;
1263 *:TENEX:*:*)
1264 echo pdp10-unknown-tenex
1265 exit ;;
1266 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1267 echo pdp10-dec-tops20
1268 exit ;;
1269 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1270 echo pdp10-xkl-tops20
1271 exit ;;
1272 *:TOPS-20:*:*)
1273 echo pdp10-unknown-tops20
1274 exit ;;
1275 *:ITS:*:*)
1276 echo pdp10-unknown-its
1277 exit ;;
1278 SEI:*:*:SEIUX)
1279 echo mips-sei-seiux${UNAME_RELEASE}
1280 exit ;;
1281 *:DragonFly:*:*)
1282 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1283 exit ;;
1284 *:*VMS:*:*)
1285 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1286 case "${UNAME_MACHINE}" in
1287 A*) echo alpha-dec-vms ; exit ;;
1288 I*) echo ia64-dec-vms ; exit ;;
1289 V*) echo vax-dec-vms ; exit ;;
1290 esac ;;
1291 *:XENIX:*:SysV)
1292 echo i386-pc-xenix
1293 exit ;;
1294 i*86:skyos:*:*)
1295 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1296 exit ;;
1297 i*86:rdos:*:*)
1298 echo ${UNAME_MACHINE}-pc-rdos
1299 exit ;;
1300 esac
1301
1302 #echo '(No uname command or uname output not recognized.)' 1>&2
1303 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1304
1305 eval $set_cc_for_build
1306 cat >$dummy.c <<EOF
1307 #ifdef _SEQUENT_
1308 # include <sys/types.h>
1309 # include <sys/utsname.h>
1310 #endif
1311 main ()
1312 {
1313 #if defined (sony)
1314 #if defined (MIPSEB)
1315 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1316 I don't know.... */
1317 printf ("mips-sony-bsd\n"); exit (0);
1318 #else
1319 #include <sys/param.h>
1320 printf ("m68k-sony-newsos%s\n",
1321 #ifdef NEWSOS4
1322 "4"
1323 #else
1324 ""
1325 #endif
1326 ); exit (0);
1327 #endif
1328 #endif
1329
1330 #if defined (__arm) && defined (__acorn) && defined (__unix)
1331 printf ("arm-acorn-riscix\n"); exit (0);
1332 #endif
1333
1334 #if defined (hp300) && !defined (hpux)
1335 printf ("m68k-hp-bsd\n"); exit (0);
1336 #endif
1337
1338 #if defined (NeXT)
1339 #if !defined (__ARCHITECTURE__)
1340 #define __ARCHITECTURE__ "m68k"
1341 #endif
1342 int version;
1343 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1344 if (version < 4)
1345 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1346 else
1347 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1348 exit (0);
1349 #endif
1350
1351 #if defined (MULTIMAX) || defined (n16)
1352 #if defined (UMAXV)
1353 printf ("ns32k-encore-sysv\n"); exit (0);
1354 #else
1355 #if defined (CMU)
1356 printf ("ns32k-encore-mach\n"); exit (0);
1357 #else
1358 printf ("ns32k-encore-bsd\n"); exit (0);
1359 #endif
1360 #endif
1361 #endif
1362
1363 #if defined (__386BSD__)
1364 printf ("i386-pc-bsd\n"); exit (0);
1365 #endif
1366
1367 #if defined (sequent)
1368 #if defined (i386)
1369 printf ("i386-sequent-dynix\n"); exit (0);
1370 #endif
1371 #if defined (ns32000)
1372 printf ("ns32k-sequent-dynix\n"); exit (0);
1373 #endif
1374 #endif
1375
1376 #if defined (_SEQUENT_)
1377 struct utsname un;
1378
1379 uname(&un);
1380
1381 if (strncmp(un.version, "V2", 2) == 0) {
1382 printf ("i386-sequent-ptx2\n"); exit (0);
1383 }
1384 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1385 printf ("i386-sequent-ptx1\n"); exit (0);
1386 }
1387 printf ("i386-sequent-ptx\n"); exit (0);
1388
1389 #endif
1390
1391 #if defined (vax)
1392 # if !defined (ultrix)
1393 # include <sys/param.h>
1394 # if defined (BSD)
1395 # if BSD == 43
1396 printf ("vax-dec-bsd4.3\n"); exit (0);
1397 # else
1398 # if BSD == 199006
1399 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1400 # else
1401 printf ("vax-dec-bsd\n"); exit (0);
1402 # endif
1403 # endif
1404 # else
1405 printf ("vax-dec-bsd\n"); exit (0);
1406 # endif
1407 # else
1408 printf ("vax-dec-ultrix\n"); exit (0);
1409 # endif
1410 #endif
1411
1412 #if defined (alliant) && defined (i860)
1413 printf ("i860-alliant-bsd\n"); exit (0);
1414 #endif
1415
1416 exit (1);
1417 }
1418 EOF
1419
1420 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1421 { echo "$SYSTEM_NAME"; exit; }
1422
1423 # Apollos put the system type in the environment.
1424
1425 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1426
1427 # Convex versions that predate uname can use getsysinfo(1)
1428
1429 if [ -x /usr/convex/getsysinfo ]
1430 then
1431 case `getsysinfo -f cpu_type` in
1432 c1*)
1433 echo c1-convex-bsd
1434 exit ;;
1435 c2*)
1436 if getsysinfo -f scalar_acc
1437 then echo c32-convex-bsd
1438 else echo c2-convex-bsd
1439 fi
1440 exit ;;
1441 c34*)
1442 echo c34-convex-bsd
1443 exit ;;
1444 c38*)
1445 echo c38-convex-bsd
1446 exit ;;
1447 c4*)
1448 echo c4-convex-bsd
1449 exit ;;
1450 esac
1451 fi
1452
1453 cat >&2 <<EOF
1454 $0: unable to guess system type
1455
1456 This script, last modified $timestamp, has failed to recognize
1457 the operating system you are using. It is advised that you
1458 download the most up to date version of the config scripts from
1459
1460 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1461 and
1462 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1463
1464 If the version you run ($0) is already up to date, please
1465 send the following data and any information you think might be
1466 pertinent to <config-patches@gnu.org> in order to provide the needed
1467 information to handle your system.
1468
1469 config.guess timestamp = $timestamp
1470
1471 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1472 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1473 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1474 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1475
1476 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1477 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1478
1479 hostinfo = `(hostinfo) 2>/dev/null`
1480 /bin/universe = `(/bin/universe) 2>/dev/null`
1481 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1482 /bin/arch = `(/bin/arch) 2>/dev/null`
1483 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1484 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1485
1486 UNAME_MACHINE = ${UNAME_MACHINE}
1487 UNAME_RELEASE = ${UNAME_RELEASE}
1488 UNAME_SYSTEM = ${UNAME_SYSTEM}
1489 UNAME_VERSION = ${UNAME_VERSION}
1490 EOF
1491
1492 exit 1
1493
1494 # Local variables:
1495 # eval: (add-hook 'write-file-hooks 'time-stamp)
1496 # time-stamp-start: "timestamp='"
1497 # time-stamp-format: "%:y-%02m-%02d"
1498 # time-stamp-end: "'"
1499 # End:
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* always defined to indicate that i18n is enabled */
3 #undef ENABLE_NLS
4
5 /* gettext domain */
6 #undef GETTEXT_PACKAGE
7
8 /* Enable additional debugging at the expense of performance and size */
9 #undef GNOME_ENABLE_DEBUG
10
11 /* Define to 1 if you have the `bind_textdomain_codeset' function. */
12 #undef HAVE_BIND_TEXTDOMAIN_CODESET
13
14 /* Define to 1 if you have the `dcgettext' function. */
15 #undef HAVE_DCGETTEXT
16
17 /* Define to 1 if you have the <dlfcn.h> header file. */
18 #undef HAVE_DLFCN_H
19
20 /* Define if the GNU gettext() function is already present or preinstalled. */
21 #undef HAVE_GETTEXT
22
23 /* Define to 1 if you have the <inttypes.h> header file. */
24 #undef HAVE_INTTYPES_H
25
26 /* Define if your <locale.h> file defines LC_MESSAGES. */
27 #undef HAVE_LC_MESSAGES
28
29 /* Define to 1 if you have the <locale.h> header file. */
30 #undef HAVE_LOCALE_H
31
32 /* Define to 1 if you have the <memory.h> header file. */
33 #undef HAVE_MEMORY_H
34
35 /* Define to 1 if you have the <stdint.h> header file. */
36 #undef HAVE_STDINT_H
37
38 /* Define to 1 if you have the <stdlib.h> header file. */
39 #undef HAVE_STDLIB_H
40
41 /* Define to 1 if you have the <strings.h> header file. */
42 #undef HAVE_STRINGS_H
43
44 /* Define to 1 if you have the <string.h> header file. */
45 #undef HAVE_STRING_H
46
47 /* Define to 1 if you have the <sys/stat.h> header file. */
48 #undef HAVE_SYS_STAT_H
49
50 /* Define to 1 if you have the <sys/types.h> header file. */
51 #undef HAVE_SYS_TYPES_H
52
53 /* Define to 1 if you have the <unistd.h> header file. */
54 #undef HAVE_UNISTD_H
55
56 /* Name of package */
57 #undef PACKAGE
58
59 /* Define to the address where bug reports for this package should be sent. */
60 #undef PACKAGE_BUGREPORT
61
62 /* Define to the full name of this package. */
63 #undef PACKAGE_NAME
64
65 /* Define to the full name and version of this package. */
66 #undef PACKAGE_STRING
67
68 /* Define to the one symbol short name of this package. */
69 #undef PACKAGE_TARNAME
70
71 /* Define to the version of this package. */
72 #undef PACKAGE_VERSION
73
74 /* Define to 1 if you have the ANSI C header files. */
75 #undef STDC_HEADERS
76
77 /* Version number of package */
78 #undef VERSION
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
4 # Inc.
5
6 timestamp='2006-09-20'
7
8 # This file is (in principle) common to ALL GNU software.
9 # The presence of a machine in this file suggests that SOME GNU software
10 # can handle that machine. It does not imply ALL GNU software can.
11 #
12 # This file is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
15 # (at your option) any later version.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write to the Free Software
24 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
25 # 02110-1301, USA.
26 #
27 # As a special exception to the GNU General Public License, if you
28 # distribute this file as part of a program that contains a
29 # configuration script generated by Autoconf, you may include it under
30 # the same distribution terms that you use for the rest of that program.
31
32
33 # Please send patches to <config-patches@gnu.org>. Submit a context
34 # diff and a properly formatted ChangeLog entry.
35 #
36 # Configuration subroutine to validate and canonicalize a configuration type.
37 # Supply the specified configuration type as an argument.
38 # If it is invalid, we print an error message on stderr and exit with code 1.
39 # Otherwise, we print the canonical config type on stdout and succeed.
40
41 # This file is supposed to be the same for all GNU packages
42 # and recognize all the CPU types, system types and aliases
43 # that are meaningful with *any* GNU software.
44 # Each package is responsible for reporting which valid configurations
45 # it does not support. The user should be able to distinguish
46 # a failure to support a valid configuration from a meaningless
47 # configuration.
48
49 # The goal of this file is to map all the various variations of a given
50 # machine specification into a single specification in the form:
51 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
52 # or in some cases, the newer four-part form:
53 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
54 # It is wrong to echo any other type of specification.
55
56 me=`echo "$0" | sed -e 's,.*/,,'`
57
58 usage="\
59 Usage: $0 [OPTION] CPU-MFR-OPSYS
60 $0 [OPTION] ALIAS
61
62 Canonicalize a configuration name.
63
64 Operation modes:
65 -h, --help print this help, then exit
66 -t, --time-stamp print date of last modification, then exit
67 -v, --version print version number, then exit
68
69 Report bugs and patches to <config-patches@gnu.org>."
70
71 version="\
72 GNU config.sub ($timestamp)
73
74 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
75 Free Software Foundation, Inc.
76
77 This is free software; see the source for copying conditions. There is NO
78 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
79
80 help="
81 Try \`$me --help' for more information."
82
83 # Parse command line
84 while test $# -gt 0 ; do
85 case $1 in
86 --time-stamp | --time* | -t )
87 echo "$timestamp" ; exit ;;
88 --version | -v )
89 echo "$version" ; exit ;;
90 --help | --h* | -h )
91 echo "$usage"; exit ;;
92 -- ) # Stop option processing
93 shift; break ;;
94 - ) # Use stdin as input.
95 break ;;
96 -* )
97 echo "$me: invalid option $1$help"
98 exit 1 ;;
99
100 *local*)
101 # First pass through any local machine types.
102 echo $1
103 exit ;;
104
105 * )
106 break ;;
107 esac
108 done
109
110 case $# in
111 0) echo "$me: missing argument$help" >&2
112 exit 1;;
113 1) ;;
114 *) echo "$me: too many arguments$help" >&2
115 exit 1;;
116 esac
117
118 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
119 # Here we must recognize all the valid KERNEL-OS combinations.
120 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
121 case $maybe_os in
122 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
123 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
124 storm-chaos* | os2-emx* | rtmk-nova*)
125 os=-$maybe_os
126 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
127 ;;
128 *)
129 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
130 if [ $basic_machine != $1 ]
131 then os=`echo $1 | sed 's/.*-/-/'`
132 else os=; fi
133 ;;
134 esac
135
136 ### Let's recognize common machines as not being operating systems so
137 ### that things like config.sub decstation-3100 work. We also
138 ### recognize some manufacturers as not being operating systems, so we
139 ### can provide default operating systems below.
140 case $os in
141 -sun*os*)
142 # Prevent following clause from handling this invalid input.
143 ;;
144 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
145 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
146 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
147 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
148 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
149 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
150 -apple | -axis | -knuth | -cray)
151 os=
152 basic_machine=$1
153 ;;
154 -sim | -cisco | -oki | -wec | -winbond)
155 os=
156 basic_machine=$1
157 ;;
158 -scout)
159 ;;
160 -wrs)
161 os=-vxworks
162 basic_machine=$1
163 ;;
164 -chorusos*)
165 os=-chorusos
166 basic_machine=$1
167 ;;
168 -chorusrdb)
169 os=-chorusrdb
170 basic_machine=$1
171 ;;
172 -hiux*)
173 os=-hiuxwe2
174 ;;
175 -sco6)
176 os=-sco5v6
177 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
178 ;;
179 -sco5)
180 os=-sco3.2v5
181 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
182 ;;
183 -sco4)
184 os=-sco3.2v4
185 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
186 ;;
187 -sco3.2.[4-9]*)
188 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
189 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
190 ;;
191 -sco3.2v[4-9]*)
192 # Don't forget version if it is 3.2v4 or newer.
193 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
194 ;;
195 -sco5v6*)
196 # Don't forget version if it is 3.2v4 or newer.
197 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
198 ;;
199 -sco*)
200 os=-sco3.2v2
201 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
202 ;;
203 -udk*)
204 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
205 ;;
206 -isc)
207 os=-isc2.2
208 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
209 ;;
210 -clix*)
211 basic_machine=clipper-intergraph
212 ;;
213 -isc*)
214 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
215 ;;
216 -lynx*)
217 os=-lynxos
218 ;;
219 -ptx*)
220 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
221 ;;
222 -windowsnt*)
223 os=`echo $os | sed -e 's/windowsnt/winnt/'`
224 ;;
225 -psos*)
226 os=-psos
227 ;;
228 -mint | -mint[0-9]*)
229 basic_machine=m68k-atari
230 os=-mint
231 ;;
232 esac
233
234 # Decode aliases for certain CPU-COMPANY combinations.
235 case $basic_machine in
236 # Recognize the basic CPU types without company name.
237 # Some are omitted here because they have special meanings below.
238 1750a | 580 \
239 | a29k \
240 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
241 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
242 | am33_2.0 \
243 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
244 | bfin \
245 | c4x | clipper \
246 | d10v | d30v | dlx | dsp16xx \
247 | fr30 | frv \
248 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
249 | i370 | i860 | i960 | ia64 \
250 | ip2k | iq2000 \
251 | m32c | m32r | m32rle | m68000 | m68k | m88k \
252 | maxq | mb | microblaze | mcore \
253 | mips | mipsbe | mipseb | mipsel | mipsle \
254 | mips16 \
255 | mips64 | mips64el \
256 | mips64vr | mips64vrel \
257 | mips64orion | mips64orionel \
258 | mips64vr4100 | mips64vr4100el \
259 | mips64vr4300 | mips64vr4300el \
260 | mips64vr5000 | mips64vr5000el \
261 | mips64vr5900 | mips64vr5900el \
262 | mipsisa32 | mipsisa32el \
263 | mipsisa32r2 | mipsisa32r2el \
264 | mipsisa64 | mipsisa64el \
265 | mipsisa64r2 | mipsisa64r2el \
266 | mipsisa64sb1 | mipsisa64sb1el \
267 | mipsisa64sr71k | mipsisa64sr71kel \
268 | mipstx39 | mipstx39el \
269 | mn10200 | mn10300 \
270 | mt \
271 | msp430 \
272 | nios | nios2 \
273 | ns16k | ns32k \
274 | or32 \
275 | pdp10 | pdp11 | pj | pjl \
276 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
277 | pyramid \
278 | score \
279 | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
280 | sh64 | sh64le \
281 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
282 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
283 | spu | strongarm \
284 | tahoe | thumb | tic4x | tic80 | tron \
285 | v850 | v850e \
286 | we32k \
287 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
288 | z8k)
289 basic_machine=$basic_machine-unknown
290 ;;
291 m6811 | m68hc11 | m6812 | m68hc12)
292 # Motorola 68HC11/12.
293 basic_machine=$basic_machine-unknown
294 os=-none
295 ;;
296 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
297 ;;
298 ms1)
299 basic_machine=mt-unknown
300 ;;
301
302 # We use `pc' rather than `unknown'
303 # because (1) that's what they normally are, and
304 # (2) the word "unknown" tends to confuse beginning users.
305 i*86 | x86_64)
306 basic_machine=$basic_machine-pc
307 ;;
308 # Object if more than one company name word.
309 *-*-*)
310 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
311 exit 1
312 ;;
313 # Recognize the basic CPU types with company name.
314 580-* \
315 | a29k-* \
316 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
317 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
318 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
319 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
320 | avr-* | avr32-* \
321 | bfin-* | bs2000-* \
322 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
323 | clipper-* | craynv-* | cydra-* \
324 | d10v-* | d30v-* | dlx-* \
325 | elxsi-* \
326 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
327 | h8300-* | h8500-* \
328 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
329 | i*86-* | i860-* | i960-* | ia64-* \
330 | ip2k-* | iq2000-* \
331 | m32c-* | m32r-* | m32rle-* \
332 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
333 | m88110-* | m88k-* | maxq-* | mcore-* \
334 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
335 | mips16-* \
336 | mips64-* | mips64el-* \
337 | mips64vr-* | mips64vrel-* \
338 | mips64orion-* | mips64orionel-* \
339 | mips64vr4100-* | mips64vr4100el-* \
340 | mips64vr4300-* | mips64vr4300el-* \
341 | mips64vr5000-* | mips64vr5000el-* \
342 | mips64vr5900-* | mips64vr5900el-* \
343 | mipsisa32-* | mipsisa32el-* \
344 | mipsisa32r2-* | mipsisa32r2el-* \
345 | mipsisa64-* | mipsisa64el-* \
346 | mipsisa64r2-* | mipsisa64r2el-* \
347 | mipsisa64sb1-* | mipsisa64sb1el-* \
348 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
349 | mipstx39-* | mipstx39el-* \
350 | mmix-* \
351 | mt-* \
352 | msp430-* \
353 | nios-* | nios2-* \
354 | none-* | np1-* | ns16k-* | ns32k-* \
355 | orion-* \
356 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
357 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
358 | pyramid-* \
359 | romp-* | rs6000-* \
360 | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
361 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
362 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
363 | sparclite-* \
364 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
365 | tahoe-* | thumb-* \
366 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
367 | tron-* \
368 | v850-* | v850e-* | vax-* \
369 | we32k-* \
370 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
371 | xstormy16-* | xtensa-* \
372 | ymp-* \
373 | z8k-*)
374 ;;
375 # Recognize the various machine names and aliases which stand
376 # for a CPU type and a company and sometimes even an OS.
377 386bsd)
378 basic_machine=i386-unknown
379 os=-bsd
380 ;;
381 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
382 basic_machine=m68000-att
383 ;;
384 3b*)
385 basic_machine=we32k-att
386 ;;
387 a29khif)
388 basic_machine=a29k-amd
389 os=-udi
390 ;;
391 abacus)
392 basic_machine=abacus-unknown
393 ;;
394 adobe68k)
395 basic_machine=m68010-adobe
396 os=-scout
397 ;;
398 alliant | fx80)
399 basic_machine=fx80-alliant
400 ;;
401 altos | altos3068)
402 basic_machine=m68k-altos
403 ;;
404 am29k)
405 basic_machine=a29k-none
406 os=-bsd
407 ;;
408 amd64)
409 basic_machine=x86_64-pc
410 ;;
411 amd64-*)
412 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
413 ;;
414 amdahl)
415 basic_machine=580-amdahl
416 os=-sysv
417 ;;
418 amiga | amiga-*)
419 basic_machine=m68k-unknown
420 ;;
421 amigaos | amigados)
422 basic_machine=m68k-unknown
423 os=-amigaos
424 ;;
425 amigaunix | amix)
426 basic_machine=m68k-unknown
427 os=-sysv4
428 ;;
429 apollo68)
430 basic_machine=m68k-apollo
431 os=-sysv
432 ;;
433 apollo68bsd)
434 basic_machine=m68k-apollo
435 os=-bsd
436 ;;
437 aux)
438 basic_machine=m68k-apple
439 os=-aux
440 ;;
441 balance)
442 basic_machine=ns32k-sequent
443 os=-dynix
444 ;;
445 c90)
446 basic_machine=c90-cray
447 os=-unicos
448 ;;
449 convex-c1)
450 basic_machine=c1-convex
451 os=-bsd
452 ;;
453 convex-c2)
454 basic_machine=c2-convex
455 os=-bsd
456 ;;
457 convex-c32)
458 basic_machine=c32-convex
459 os=-bsd
460 ;;
461 convex-c34)
462 basic_machine=c34-convex
463 os=-bsd
464 ;;
465 convex-c38)
466 basic_machine=c38-convex
467 os=-bsd
468 ;;
469 cray | j90)
470 basic_machine=j90-cray
471 os=-unicos
472 ;;
473 craynv)
474 basic_machine=craynv-cray
475 os=-unicosmp
476 ;;
477 cr16c)
478 basic_machine=cr16c-unknown
479 os=-elf
480 ;;
481 crds | unos)
482 basic_machine=m68k-crds
483 ;;
484 crisv32 | crisv32-* | etraxfs*)
485 basic_machine=crisv32-axis
486 ;;
487 cris | cris-* | etrax*)
488 basic_machine=cris-axis
489 ;;
490 crx)
491 basic_machine=crx-unknown
492 os=-elf
493 ;;
494 da30 | da30-*)
495 basic_machine=m68k-da30
496 ;;
497 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
498 basic_machine=mips-dec
499 ;;
500 decsystem10* | dec10*)
501 basic_machine=pdp10-dec
502 os=-tops10
503 ;;
504 decsystem20* | dec20*)
505 basic_machine=pdp10-dec
506 os=-tops20
507 ;;
508 delta | 3300 | motorola-3300 | motorola-delta \
509 | 3300-motorola | delta-motorola)
510 basic_machine=m68k-motorola
511 ;;
512 delta88)
513 basic_machine=m88k-motorola
514 os=-sysv3
515 ;;
516 djgpp)
517 basic_machine=i586-pc
518 os=-msdosdjgpp
519 ;;
520 dpx20 | dpx20-*)
521 basic_machine=rs6000-bull
522 os=-bosx
523 ;;
524 dpx2* | dpx2*-bull)
525 basic_machine=m68k-bull
526 os=-sysv3
527 ;;
528 ebmon29k)
529 basic_machine=a29k-amd
530 os=-ebmon
531 ;;
532 elxsi)
533 basic_machine=elxsi-elxsi
534 os=-bsd
535 ;;
536 encore | umax | mmax)
537 basic_machine=ns32k-encore
538 ;;
539 es1800 | OSE68k | ose68k | ose | OSE)
540 basic_machine=m68k-ericsson
541 os=-ose
542 ;;
543 fx2800)
544 basic_machine=i860-alliant
545 ;;
546 genix)
547 basic_machine=ns32k-ns
548 ;;
549 gmicro)
550 basic_machine=tron-gmicro
551 os=-sysv
552 ;;
553 go32)
554 basic_machine=i386-pc
555 os=-go32
556 ;;
557 h3050r* | hiux*)
558 basic_machine=hppa1.1-hitachi
559 os=-hiuxwe2
560 ;;
561 h8300hms)
562 basic_machine=h8300-hitachi
563 os=-hms
564 ;;
565 h8300xray)
566 basic_machine=h8300-hitachi
567 os=-xray
568 ;;
569 h8500hms)
570 basic_machine=h8500-hitachi
571 os=-hms
572 ;;
573 harris)
574 basic_machine=m88k-harris
575 os=-sysv3
576 ;;
577 hp300-*)
578 basic_machine=m68k-hp
579 ;;
580 hp300bsd)
581 basic_machine=m68k-hp
582 os=-bsd
583 ;;
584 hp300hpux)
585 basic_machine=m68k-hp
586 os=-hpux
587 ;;
588 hp3k9[0-9][0-9] | hp9[0-9][0-9])
589 basic_machine=hppa1.0-hp
590 ;;
591 hp9k2[0-9][0-9] | hp9k31[0-9])
592 basic_machine=m68000-hp
593 ;;
594 hp9k3[2-9][0-9])
595 basic_machine=m68k-hp
596 ;;
597 hp9k6[0-9][0-9] | hp6[0-9][0-9])
598 basic_machine=hppa1.0-hp
599 ;;
600 hp9k7[0-79][0-9] | hp7[0-79][0-9])
601 basic_machine=hppa1.1-hp
602 ;;
603 hp9k78[0-9] | hp78[0-9])
604 # FIXME: really hppa2.0-hp
605 basic_machine=hppa1.1-hp
606 ;;
607 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
608 # FIXME: really hppa2.0-hp
609 basic_machine=hppa1.1-hp
610 ;;
611 hp9k8[0-9][13679] | hp8[0-9][13679])
612 basic_machine=hppa1.1-hp
613 ;;
614 hp9k8[0-9][0-9] | hp8[0-9][0-9])
615 basic_machine=hppa1.0-hp
616 ;;
617 hppa-next)
618 os=-nextstep3
619 ;;
620 hppaosf)
621 basic_machine=hppa1.1-hp
622 os=-osf
623 ;;
624 hppro)
625 basic_machine=hppa1.1-hp
626 os=-proelf
627 ;;
628 i370-ibm* | ibm*)
629 basic_machine=i370-ibm
630 ;;
631 # I'm not sure what "Sysv32" means. Should this be sysv3.2?
632 i*86v32)
633 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
634 os=-sysv32
635 ;;
636 i*86v4*)
637 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
638 os=-sysv4
639 ;;
640 i*86v)
641 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
642 os=-sysv
643 ;;
644 i*86sol2)
645 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
646 os=-solaris2
647 ;;
648 i386mach)
649 basic_machine=i386-mach
650 os=-mach
651 ;;
652 i386-vsta | vsta)
653 basic_machine=i386-unknown
654 os=-vsta
655 ;;
656 iris | iris4d)
657 basic_machine=mips-sgi
658 case $os in
659 -irix*)
660 ;;
661 *)
662 os=-irix4
663 ;;
664 esac
665 ;;
666 isi68 | isi)
667 basic_machine=m68k-isi
668 os=-sysv
669 ;;
670 m88k-omron*)
671 basic_machine=m88k-omron
672 ;;
673 magnum | m3230)
674 basic_machine=mips-mips
675 os=-sysv
676 ;;
677 merlin)
678 basic_machine=ns32k-utek
679 os=-sysv
680 ;;
681 mingw32)
682 basic_machine=i386-pc
683 os=-mingw32
684 ;;
685 miniframe)
686 basic_machine=m68000-convergent
687 ;;
688 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
689 basic_machine=m68k-atari
690 os=-mint
691 ;;
692 mips3*-*)
693 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
694 ;;
695 mips3*)
696 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
697 ;;
698 monitor)
699 basic_machine=m68k-rom68k
700 os=-coff
701 ;;
702 morphos)
703 basic_machine=powerpc-unknown
704 os=-morphos
705 ;;
706 msdos)
707 basic_machine=i386-pc
708 os=-msdos
709 ;;
710 ms1-*)
711 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
712 ;;
713 mvs)
714 basic_machine=i370-ibm
715 os=-mvs
716 ;;
717 ncr3000)
718 basic_machine=i486-ncr
719 os=-sysv4
720 ;;
721 netbsd386)
722 basic_machine=i386-unknown
723 os=-netbsd
724 ;;
725 netwinder)
726 basic_machine=armv4l-rebel
727 os=-linux
728 ;;
729 news | news700 | news800 | news900)
730 basic_machine=m68k-sony
731 os=-newsos
732 ;;
733 news1000)
734 basic_machine=m68030-sony
735 os=-newsos
736 ;;
737 news-3600 | risc-news)
738 basic_machine=mips-sony
739 os=-newsos
740 ;;
741 necv70)
742 basic_machine=v70-nec
743 os=-sysv
744 ;;
745 next | m*-next )
746 basic_machine=m68k-next
747 case $os in
748 -nextstep* )
749 ;;
750 -ns2*)
751 os=-nextstep2
752 ;;
753 *)
754 os=-nextstep3
755 ;;
756 esac
757 ;;
758 nh3000)
759 basic_machine=m68k-harris
760 os=-cxux
761 ;;
762 nh[45]000)
763 basic_machine=m88k-harris
764 os=-cxux
765 ;;
766 nindy960)
767 basic_machine=i960-intel
768 os=-nindy
769 ;;
770 mon960)
771 basic_machine=i960-intel
772 os=-mon960
773 ;;
774 nonstopux)
775 basic_machine=mips-compaq
776 os=-nonstopux
777 ;;
778 np1)
779 basic_machine=np1-gould
780 ;;
781 nsr-tandem)
782 basic_machine=nsr-tandem
783 ;;
784 op50n-* | op60c-*)
785 basic_machine=hppa1.1-oki
786 os=-proelf
787 ;;
788 openrisc | openrisc-*)
789 basic_machine=or32-unknown
790 ;;
791 os400)
792 basic_machine=powerpc-ibm
793 os=-os400
794 ;;
795 OSE68000 | ose68000)
796 basic_machine=m68000-ericsson
797 os=-ose
798 ;;
799 os68k)
800 basic_machine=m68k-none
801 os=-os68k
802 ;;
803 pa-hitachi)
804 basic_machine=hppa1.1-hitachi
805 os=-hiuxwe2
806 ;;
807 paragon)
808 basic_machine=i860-intel
809 os=-osf
810 ;;
811 pbd)
812 basic_machine=sparc-tti
813 ;;
814 pbb)
815 basic_machine=m68k-tti
816 ;;
817 pc532 | pc532-*)
818 basic_machine=ns32k-pc532
819 ;;
820 pc98)
821 basic_machine=i386-pc
822 ;;
823 pc98-*)
824 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
825 ;;
826 pentium | p5 | k5 | k6 | nexgen | viac3)
827 basic_machine=i586-pc
828 ;;
829 pentiumpro | p6 | 6x86 | athlon | athlon_*)
830 basic_machine=i686-pc
831 ;;
832 pentiumii | pentium2 | pentiumiii | pentium3)
833 basic_machine=i686-pc
834 ;;
835 pentium4)
836 basic_machine=i786-pc
837 ;;
838 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
839 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
840 ;;
841 pentiumpro-* | p6-* | 6x86-* | athlon-*)
842 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
843 ;;
844 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
845 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
846 ;;
847 pentium4-*)
848 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
849 ;;
850 pn)
851 basic_machine=pn-gould
852 ;;
853 power) basic_machine=power-ibm
854 ;;
855 ppc) basic_machine=powerpc-unknown
856 ;;
857 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
858 ;;
859 ppcle | powerpclittle | ppc-le | powerpc-little)
860 basic_machine=powerpcle-unknown
861 ;;
862 ppcle-* | powerpclittle-*)
863 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
864 ;;
865 ppc64) basic_machine=powerpc64-unknown
866 ;;
867 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
868 ;;
869 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
870 basic_machine=powerpc64le-unknown
871 ;;
872 ppc64le-* | powerpc64little-*)
873 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
874 ;;
875 ps2)
876 basic_machine=i386-ibm
877 ;;
878 pw32)
879 basic_machine=i586-unknown
880 os=-pw32
881 ;;
882 rdos)
883 basic_machine=i386-pc
884 os=-rdos
885 ;;
886 rom68k)
887 basic_machine=m68k-rom68k
888 os=-coff
889 ;;
890 rm[46]00)
891 basic_machine=mips-siemens
892 ;;
893 rtpc | rtpc-*)
894 basic_machine=romp-ibm
895 ;;
896 s390 | s390-*)
897 basic_machine=s390-ibm
898 ;;
899 s390x | s390x-*)
900 basic_machine=s390x-ibm
901 ;;
902 sa29200)
903 basic_machine=a29k-amd
904 os=-udi
905 ;;
906 sb1)
907 basic_machine=mipsisa64sb1-unknown
908 ;;
909 sb1el)
910 basic_machine=mipsisa64sb1el-unknown
911 ;;
912 sde)
913 basic_machine=mipsisa32-sde
914 os=-elf
915 ;;
916 sei)
917 basic_machine=mips-sei
918 os=-seiux
919 ;;
920 sequent)
921 basic_machine=i386-sequent
922 ;;
923 sh)
924 basic_machine=sh-hitachi
925 os=-hms
926 ;;
927 sh64)
928 basic_machine=sh64-unknown
929 ;;
930 sparclite-wrs | simso-wrs)
931 basic_machine=sparclite-wrs
932 os=-vxworks
933 ;;
934 sps7)
935 basic_machine=m68k-bull
936 os=-sysv2
937 ;;
938 spur)
939 basic_machine=spur-unknown
940 ;;
941 st2000)
942 basic_machine=m68k-tandem
943 ;;
944 stratus)
945 basic_machine=i860-stratus
946 os=-sysv4
947 ;;
948 sun2)
949 basic_machine=m68000-sun
950 ;;
951 sun2os3)
952 basic_machine=m68000-sun
953 os=-sunos3
954 ;;
955 sun2os4)
956 basic_machine=m68000-sun
957 os=-sunos4
958 ;;
959 sun3os3)
960 basic_machine=m68k-sun
961 os=-sunos3
962 ;;
963 sun3os4)
964 basic_machine=m68k-sun
965 os=-sunos4
966 ;;
967 sun4os3)
968 basic_machine=sparc-sun
969 os=-sunos3
970 ;;
971 sun4os4)
972 basic_machine=sparc-sun
973 os=-sunos4
974 ;;
975 sun4sol2)
976 basic_machine=sparc-sun
977 os=-solaris2
978 ;;
979 sun3 | sun3-*)
980 basic_machine=m68k-sun
981 ;;
982 sun4)
983 basic_machine=sparc-sun
984 ;;
985 sun386 | sun386i | roadrunner)
986 basic_machine=i386-sun
987 ;;
988 sv1)
989 basic_machine=sv1-cray
990 os=-unicos
991 ;;
992 symmetry)
993 basic_machine=i386-sequent
994 os=-dynix
995 ;;
996 t3e)
997 basic_machine=alphaev5-cray
998 os=-unicos
999 ;;
1000 t90)
1001 basic_machine=t90-cray
1002 os=-unicos
1003 ;;
1004 tic54x | c54x*)
1005 basic_machine=tic54x-unknown
1006 os=-coff
1007 ;;
1008 tic55x | c55x*)
1009 basic_machine=tic55x-unknown
1010 os=-coff
1011 ;;
1012 tic6x | c6x*)
1013 basic_machine=tic6x-unknown
1014 os=-coff
1015 ;;
1016 tx39)
1017 basic_machine=mipstx39-unknown
1018 ;;
1019 tx39el)
1020 basic_machine=mipstx39el-unknown
1021 ;;
1022 toad1)
1023 basic_machine=pdp10-xkl
1024 os=-tops20
1025 ;;
1026 tower | tower-32)
1027 basic_machine=m68k-ncr
1028 ;;
1029 tpf)
1030 basic_machine=s390x-ibm
1031 os=-tpf
1032 ;;
1033 udi29k)
1034 basic_machine=a29k-amd
1035 os=-udi
1036 ;;
1037 ultra3)
1038 basic_machine=a29k-nyu
1039 os=-sym1
1040 ;;
1041 v810 | necv810)
1042 basic_machine=v810-nec
1043 os=-none
1044 ;;
1045 vaxv)
1046 basic_machine=vax-dec
1047 os=-sysv
1048 ;;
1049 vms)
1050 basic_machine=vax-dec
1051 os=-vms
1052 ;;
1053 vpp*|vx|vx-*)
1054 basic_machine=f301-fujitsu
1055 ;;
1056 vxworks960)
1057 basic_machine=i960-wrs
1058 os=-vxworks
1059 ;;
1060 vxworks68)
1061 basic_machine=m68k-wrs
1062 os=-vxworks
1063 ;;
1064 vxworks29k)
1065 basic_machine=a29k-wrs
1066 os=-vxworks
1067 ;;
1068 w65*)
1069 basic_machine=w65-wdc
1070 os=-none
1071 ;;
1072 w89k-*)
1073 basic_machine=hppa1.1-winbond
1074 os=-proelf
1075 ;;
1076 xbox)
1077 basic_machine=i686-pc
1078 os=-mingw32
1079 ;;
1080 xps | xps100)
1081 basic_machine=xps100-honeywell
1082 ;;
1083 ymp)
1084 basic_machine=ymp-cray
1085 os=-unicos
1086 ;;
1087 z8k-*-coff)
1088 basic_machine=z8k-unknown
1089 os=-sim
1090 ;;
1091 none)
1092 basic_machine=none-none
1093 os=-none
1094 ;;
1095
1096 # Here we handle the default manufacturer of certain CPU types. It is in
1097 # some cases the only manufacturer, in others, it is the most popular.
1098 w89k)
1099 basic_machine=hppa1.1-winbond
1100 ;;
1101 op50n)
1102 basic_machine=hppa1.1-oki
1103 ;;
1104 op60c)
1105 basic_machine=hppa1.1-oki
1106 ;;
1107 romp)
1108 basic_machine=romp-ibm
1109 ;;
1110 mmix)
1111 basic_machine=mmix-knuth
1112 ;;
1113 rs6000)
1114 basic_machine=rs6000-ibm
1115 ;;
1116 vax)
1117 basic_machine=vax-dec
1118 ;;
1119 pdp10)
1120 # there are many clones, so DEC is not a safe bet
1121 basic_machine=pdp10-unknown
1122 ;;
1123 pdp11)
1124 basic_machine=pdp11-dec
1125 ;;
1126 we32k)
1127 basic_machine=we32k-att
1128 ;;
1129 sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1130 basic_machine=sh-unknown
1131 ;;
1132 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1133 basic_machine=sparc-sun
1134 ;;
1135 cydra)
1136 basic_machine=cydra-cydrome
1137 ;;
1138 orion)
1139 basic_machine=orion-highlevel
1140 ;;
1141 orion105)
1142 basic_machine=clipper-highlevel
1143 ;;
1144 mac | mpw | mac-mpw)
1145 basic_machine=m68k-apple
1146 ;;
1147 pmac | pmac-mpw)
1148 basic_machine=powerpc-apple
1149 ;;
1150 *-unknown)
1151 # Make sure to match an already-canonicalized machine name.
1152 ;;
1153 *)
1154 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1155 exit 1
1156 ;;
1157 esac
1158
1159 # Here we canonicalize certain aliases for manufacturers.
1160 case $basic_machine in
1161 *-digital*)
1162 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1163 ;;
1164 *-commodore*)
1165 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1166 ;;
1167 *)
1168 ;;
1169 esac
1170
1171 # Decode manufacturer-specific aliases for certain operating systems.
1172
1173 if [ x"$os" != x"" ]
1174 then
1175 case $os in
1176 # First match some system type aliases
1177 # that might get confused with valid system types.
1178 # -solaris* is a basic system type, with this one exception.
1179 -solaris1 | -solaris1.*)
1180 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1181 ;;
1182 -solaris)
1183 os=-solaris2
1184 ;;
1185 -svr4*)
1186 os=-sysv4
1187 ;;
1188 -unixware*)
1189 os=-sysv4.2uw
1190 ;;
1191 -gnu/linux*)
1192 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1193 ;;
1194 # First accept the basic system types.
1195 # The portable systems comes first.
1196 # Each alternative MUST END IN A *, to match a version number.
1197 # -sysv* is not here because it comes later, after sysvr4.
1198 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1199 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1200 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1201 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1202 | -aos* \
1203 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1204 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1205 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1206 | -openbsd* | -solidbsd* \
1207 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1208 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1209 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1210 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1211 | -chorusos* | -chorusrdb* \
1212 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1213 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1214 | -uxpv* | -beos* | -mpeix* | -udk* \
1215 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1216 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1217 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1218 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1219 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1220 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1221 | -skyos* | -haiku* | -rdos* | -toppers*)
1222 # Remember, each alternative MUST END IN *, to match a version number.
1223 ;;
1224 -qnx*)
1225 case $basic_machine in
1226 x86-* | i*86-*)
1227 ;;
1228 *)
1229 os=-nto$os
1230 ;;
1231 esac
1232 ;;
1233 -nto-qnx*)
1234 ;;
1235 -nto*)
1236 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1237 ;;
1238 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1239 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1240 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1241 ;;
1242 -mac*)
1243 os=`echo $os | sed -e 's|mac|macos|'`
1244 ;;
1245 -linux-dietlibc)
1246 os=-linux-dietlibc
1247 ;;
1248 -linux*)
1249 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1250 ;;
1251 -sunos5*)
1252 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1253 ;;
1254 -sunos6*)
1255 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1256 ;;
1257 -opened*)
1258 os=-openedition
1259 ;;
1260 -os400*)
1261 os=-os400
1262 ;;
1263 -wince*)
1264 os=-wince
1265 ;;
1266 -osfrose*)
1267 os=-osfrose
1268 ;;
1269 -osf*)
1270 os=-osf
1271 ;;
1272 -utek*)
1273 os=-bsd
1274 ;;
1275 -dynix*)
1276 os=-bsd
1277 ;;
1278 -acis*)
1279 os=-aos
1280 ;;
1281 -atheos*)
1282 os=-atheos
1283 ;;
1284 -syllable*)
1285 os=-syllable
1286 ;;
1287 -386bsd)
1288 os=-bsd
1289 ;;
1290 -ctix* | -uts*)
1291 os=-sysv
1292 ;;
1293 -nova*)
1294 os=-rtmk-nova
1295 ;;
1296 -ns2 )
1297 os=-nextstep2
1298 ;;
1299 -nsk*)
1300 os=-nsk
1301 ;;
1302 # Preserve the version number of sinix5.
1303 -sinix5.*)
1304 os=`echo $os | sed -e 's|sinix|sysv|'`
1305 ;;
1306 -sinix*)
1307 os=-sysv4
1308 ;;
1309 -tpf*)
1310 os=-tpf
1311 ;;
1312 -triton*)
1313 os=-sysv3
1314 ;;
1315 -oss*)
1316 os=-sysv3
1317 ;;
1318 -svr4)
1319 os=-sysv4
1320 ;;
1321 -svr3)
1322 os=-sysv3
1323 ;;
1324 -sysvr4)
1325 os=-sysv4
1326 ;;
1327 # This must come after -sysvr4.
1328 -sysv*)
1329 ;;
1330 -ose*)
1331 os=-ose
1332 ;;
1333 -es1800*)
1334 os=-ose
1335 ;;
1336 -xenix)
1337 os=-xenix
1338 ;;
1339 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1340 os=-mint
1341 ;;
1342 -aros*)
1343 os=-aros
1344 ;;
1345 -kaos*)
1346 os=-kaos
1347 ;;
1348 -zvmoe)
1349 os=-zvmoe
1350 ;;
1351 -none)
1352 ;;
1353 *)
1354 # Get rid of the `-' at the beginning of $os.
1355 os=`echo $os | sed 's/[^-]*-//'`
1356 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1357 exit 1
1358 ;;
1359 esac
1360 else
1361
1362 # Here we handle the default operating systems that come with various machines.
1363 # The value should be what the vendor currently ships out the door with their
1364 # machine or put another way, the most popular os provided with the machine.
1365
1366 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1367 # "-sun"), then you have to tell the case statement up towards the top
1368 # that MANUFACTURER isn't an operating system. Otherwise, code above
1369 # will signal an error saying that MANUFACTURER isn't an operating
1370 # system, and we'll never get to this point.
1371
1372 case $basic_machine in
1373 score-*)
1374 os=-elf
1375 ;;
1376 spu-*)
1377 os=-elf
1378 ;;
1379 *-acorn)
1380 os=-riscix1.2
1381 ;;
1382 arm*-rebel)
1383 os=-linux
1384 ;;
1385 arm*-semi)
1386 os=-aout
1387 ;;
1388 c4x-* | tic4x-*)
1389 os=-coff
1390 ;;
1391 # This must come before the *-dec entry.
1392 pdp10-*)
1393 os=-tops20
1394 ;;
1395 pdp11-*)
1396 os=-none
1397 ;;
1398 *-dec | vax-*)
1399 os=-ultrix4.2
1400 ;;
1401 m68*-apollo)
1402 os=-domain
1403 ;;
1404 i386-sun)
1405 os=-sunos4.0.2
1406 ;;
1407 m68000-sun)
1408 os=-sunos3
1409 # This also exists in the configure program, but was not the
1410 # default.
1411 # os=-sunos4
1412 ;;
1413 m68*-cisco)
1414 os=-aout
1415 ;;
1416 mips*-cisco)
1417 os=-elf
1418 ;;
1419 mips*-*)
1420 os=-elf
1421 ;;
1422 or32-*)
1423 os=-coff
1424 ;;
1425 *-tti) # must be before sparc entry or we get the wrong os.
1426 os=-sysv3
1427 ;;
1428 sparc-* | *-sun)
1429 os=-sunos4.1.1
1430 ;;
1431 *-be)
1432 os=-beos
1433 ;;
1434 *-haiku)
1435 os=-haiku
1436 ;;
1437 *-ibm)
1438 os=-aix
1439 ;;
1440 *-knuth)
1441 os=-mmixware
1442 ;;
1443 *-wec)
1444 os=-proelf
1445 ;;
1446 *-winbond)
1447 os=-proelf
1448 ;;
1449 *-oki)
1450 os=-proelf
1451 ;;
1452 *-hp)
1453 os=-hpux
1454 ;;
1455 *-hitachi)
1456 os=-hiux
1457 ;;
1458 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1459 os=-sysv
1460 ;;
1461 *-cbm)
1462 os=-amigaos
1463 ;;
1464 *-dg)
1465 os=-dgux
1466 ;;
1467 *-dolphin)
1468 os=-sysv3
1469 ;;
1470 m68k-ccur)
1471 os=-rtu
1472 ;;
1473 m88k-omron*)
1474 os=-luna
1475 ;;
1476 *-next )
1477 os=-nextstep
1478 ;;
1479 *-sequent)
1480 os=-ptx
1481 ;;
1482 *-crds)
1483 os=-unos
1484 ;;
1485 *-ns)
1486 os=-genix
1487 ;;
1488 i370-*)
1489 os=-mvs
1490 ;;
1491 *-next)
1492 os=-nextstep3
1493 ;;
1494 *-gould)
1495 os=-sysv
1496 ;;
1497 *-highlevel)
1498 os=-bsd
1499 ;;
1500 *-encore)
1501 os=-bsd
1502 ;;
1503 *-sgi)
1504 os=-irix
1505 ;;
1506 *-siemens)
1507 os=-sysv4
1508 ;;
1509 *-masscomp)
1510 os=-rtu
1511 ;;
1512 f30[01]-fujitsu | f700-fujitsu)
1513 os=-uxpv
1514 ;;
1515 *-rom68k)
1516 os=-coff
1517 ;;
1518 *-*bug)
1519 os=-coff
1520 ;;
1521 *-apple)
1522 os=-macos
1523 ;;
1524 *-atari*)
1525 os=-mint
1526 ;;
1527 *)
1528 os=-none
1529 ;;
1530 esac
1531 fi
1532
1533 # Here we handle the case where we know the os, and the CPU type, but not the
1534 # manufacturer. We pick the logical manufacturer.
1535 vendor=unknown
1536 case $basic_machine in
1537 *-unknown)
1538 case $os in
1539 -riscix*)
1540 vendor=acorn
1541 ;;
1542 -sunos*)
1543 vendor=sun
1544 ;;
1545 -aix*)
1546 vendor=ibm
1547 ;;
1548 -beos*)
1549 vendor=be
1550 ;;
1551 -hpux*)
1552 vendor=hp
1553 ;;
1554 -mpeix*)
1555 vendor=hp
1556 ;;
1557 -hiux*)
1558 vendor=hitachi
1559 ;;
1560 -unos*)
1561 vendor=crds
1562 ;;
1563 -dgux*)
1564 vendor=dg
1565 ;;
1566 -luna*)
1567 vendor=omron
1568 ;;
1569 -genix*)
1570 vendor=ns
1571 ;;
1572 -mvs* | -opened*)
1573 vendor=ibm
1574 ;;
1575 -os400*)
1576 vendor=ibm
1577 ;;
1578 -ptx*)
1579 vendor=sequent
1580 ;;
1581 -tpf*)
1582 vendor=ibm
1583 ;;
1584 -vxsim* | -vxworks* | -windiss*)
1585 vendor=wrs
1586 ;;
1587 -aux*)
1588 vendor=apple
1589 ;;
1590 -hms*)
1591 vendor=hitachi
1592 ;;
1593 -mpw* | -macos*)
1594 vendor=apple
1595 ;;
1596 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1597 vendor=atari
1598 ;;
1599 -vos*)
1600 vendor=stratus
1601 ;;
1602 esac
1603 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1604 ;;
1605 esac
1606
1607 echo $basic_machine$os
1608 exit
1609
1610 # Local variables:
1611 # eval: (add-hook 'write-file-hooks 'time-stamp)
1612 # time-stamp-start: "timestamp='"
1613 # time-stamp-format: "%:y-%02m-%02d"
1614 # time-stamp-end: "'"
1615 # End:
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.61 for PolicyKit-gnome 0.5.
3 #
4 # Report bugs to <mailto:david@fubar.dk>.
5 #
6 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 ## --------------------- ##
11 ## M4sh Initialization. ##
12 ## --------------------- ##
13
14 # Be more Bourne compatible
15 DUALCASE=1; export DUALCASE # for MKS sh
16 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17 emulate sh
18 NULLCMD=:
19 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
22 setopt NO_GLOB_SUBST
23 else
24 case `(set -o) 2>/dev/null` in
25 *posix*) set -o posix ;;
26 esac
27
28 fi
29
30
31
32
33 # PATH needs CR
34 # Avoid depending upon Character Ranges.
35 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
37 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
38 as_cr_digits='0123456789'
39 as_cr_alnum=$as_cr_Letters$as_cr_digits
40
41 # The user is always right.
42 if test "${PATH_SEPARATOR+set}" != set; then
43 echo "#! /bin/sh" >conf$$.sh
44 echo "exit 0" >>conf$$.sh
45 chmod +x conf$$.sh
46 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
47 PATH_SEPARATOR=';'
48 else
49 PATH_SEPARATOR=:
50 fi
51 rm -f conf$$.sh
52 fi
53
54 # Support unset when possible.
55 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
56 as_unset=unset
57 else
58 as_unset=false
59 fi
60
61
62 # IFS
63 # We need space, tab and new line, in precisely that order. Quoting is
64 # there to prevent editors from complaining about space-tab.
65 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
66 # splitting by setting IFS to empty value.)
67 as_nl='
68 '
69 IFS=" "" $as_nl"
70
71 # Find who we are. Look in the path if we contain no directory separator.
72 case $0 in
73 *[\\/]* ) as_myself=$0 ;;
74 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
75 for as_dir in $PATH
76 do
77 IFS=$as_save_IFS
78 test -z "$as_dir" && as_dir=.
79 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
80 done
81 IFS=$as_save_IFS
82
83 ;;
84 esac
85 # We did not find ourselves, most probably we were run as `sh COMMAND'
86 # in which case we are not to be found in the path.
87 if test "x$as_myself" = x; then
88 as_myself=$0
89 fi
90 if test ! -f "$as_myself"; then
91 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
92 { (exit 1); exit 1; }
93 fi
94
95 # Work around bugs in pre-3.0 UWIN ksh.
96 for as_var in ENV MAIL MAILPATH
97 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
98 done
99 PS1='$ '
100 PS2='> '
101 PS4='+ '
102
103 # NLS nuisances.
104 for as_var in \
105 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
106 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
107 LC_TELEPHONE LC_TIME
108 do
109 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
110 eval $as_var=C; export $as_var
111 else
112 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
113 fi
114 done
115
116 # Required to use basename.
117 if expr a : '\(a\)' >/dev/null 2>&1 &&
118 test "X`expr 00001 : '.*\(...\)'`" = X001; then
119 as_expr=expr
120 else
121 as_expr=false
122 fi
123
124 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
125 as_basename=basename
126 else
127 as_basename=false
128 fi
129
130
131 # Name of the executable.
132 as_me=`$as_basename -- "$0" ||
133 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
134 X"$0" : 'X\(//\)$' \| \
135 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
136 echo X/"$0" |
137 sed '/^.*\/\([^/][^/]*\)\/*$/{
138 s//\1/
139 q
140 }
141 /^X\/\(\/\/\)$/{
142 s//\1/
143 q
144 }
145 /^X\/\(\/\).*/{
146 s//\1/
147 q
148 }
149 s/.*/./; q'`
150
151 # CDPATH.
152 $as_unset CDPATH
153
154
155 if test "x$CONFIG_SHELL" = x; then
156 if (eval ":") 2>/dev/null; then
157 as_have_required=yes
158 else
159 as_have_required=no
160 fi
161
162 if test $as_have_required = yes && (eval ":
163 (as_func_return () {
164 (exit \$1)
165 }
166 as_func_success () {
167 as_func_return 0
168 }
169 as_func_failure () {
170 as_func_return 1
171 }
172 as_func_ret_success () {
173 return 0
174 }
175 as_func_ret_failure () {
176 return 1
177 }
178
179 exitcode=0
180 if as_func_success; then
181 :
182 else
183 exitcode=1
184 echo as_func_success failed.
185 fi
186
187 if as_func_failure; then
188 exitcode=1
189 echo as_func_failure succeeded.
190 fi
191
192 if as_func_ret_success; then
193 :
194 else
195 exitcode=1
196 echo as_func_ret_success failed.
197 fi
198
199 if as_func_ret_failure; then
200 exitcode=1
201 echo as_func_ret_failure succeeded.
202 fi
203
204 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
205 :
206 else
207 exitcode=1
208 echo positional parameters were not saved.
209 fi
210
211 test \$exitcode = 0) || { (exit 1); exit 1; }
212
213 (
214 as_lineno_1=\$LINENO
215 as_lineno_2=\$LINENO
216 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
217 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
218 ") 2> /dev/null; then
219 :
220 else
221 as_candidate_shells=
222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
223 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
224 do
225 IFS=$as_save_IFS
226 test -z "$as_dir" && as_dir=.
227 case $as_dir in
228 /*)
229 for as_base in sh bash ksh sh5; do
230 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
231 done;;
232 esac
233 done
234 IFS=$as_save_IFS
235
236
237 for as_shell in $as_candidate_shells $SHELL; do
238 # Try only shells that exist, to save several forks.
239 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
240 { ("$as_shell") 2> /dev/null <<\_ASEOF
241 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
242 emulate sh
243 NULLCMD=:
244 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
245 # is contrary to our usage. Disable this feature.
246 alias -g '${1+"$@"}'='"$@"'
247 setopt NO_GLOB_SUBST
248 else
249 case `(set -o) 2>/dev/null` in
250 *posix*) set -o posix ;;
251 esac
252
253 fi
254
255
256 :
257 _ASEOF
258 }; then
259 CONFIG_SHELL=$as_shell
260 as_have_required=yes
261 if { "$as_shell" 2> /dev/null <<\_ASEOF
262 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
263 emulate sh
264 NULLCMD=:
265 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
266 # is contrary to our usage. Disable this feature.
267 alias -g '${1+"$@"}'='"$@"'
268 setopt NO_GLOB_SUBST
269 else
270 case `(set -o) 2>/dev/null` in
271 *posix*) set -o posix ;;
272 esac
273
274 fi
275
276
277 :
278 (as_func_return () {
279 (exit $1)
280 }
281 as_func_success () {
282 as_func_return 0
283 }
284 as_func_failure () {
285 as_func_return 1
286 }
287 as_func_ret_success () {
288 return 0
289 }
290 as_func_ret_failure () {
291 return 1
292 }
293
294 exitcode=0
295 if as_func_success; then
296 :
297 else
298 exitcode=1
299 echo as_func_success failed.
300 fi
301
302 if as_func_failure; then
303 exitcode=1
304 echo as_func_failure succeeded.
305 fi
306
307 if as_func_ret_success; then
308 :
309 else
310 exitcode=1
311 echo as_func_ret_success failed.
312 fi
313
314 if as_func_ret_failure; then
315 exitcode=1
316 echo as_func_ret_failure succeeded.
317 fi
318
319 if ( set x; as_func_ret_success y && test x = "$1" ); then
320 :
321 else
322 exitcode=1
323 echo positional parameters were not saved.
324 fi
325
326 test $exitcode = 0) || { (exit 1); exit 1; }
327
328 (
329 as_lineno_1=$LINENO
330 as_lineno_2=$LINENO
331 test "x$as_lineno_1" != "x$as_lineno_2" &&
332 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
333
334 _ASEOF
335 }; then
336 break
337 fi
338
339 fi
340
341 done
342
343 if test "x$CONFIG_SHELL" != x; then
344 for as_var in BASH_ENV ENV
345 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
346 done
347 export CONFIG_SHELL
348 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
349 fi
350
351
352 if test $as_have_required = no; then
353 echo This script requires a shell more modern than all the
354 echo shells that I found on your system. Please install a
355 echo modern shell, or manually run the script under such a
356 echo shell if you do have one.
357 { (exit 1); exit 1; }
358 fi
359
360
361 fi
362
363 fi
364
365
366
367 (eval "as_func_return () {
368 (exit \$1)
369 }
370 as_func_success () {
371 as_func_return 0
372 }
373 as_func_failure () {
374 as_func_return 1
375 }
376 as_func_ret_success () {
377 return 0
378 }
379 as_func_ret_failure () {
380 return 1
381 }
382
383 exitcode=0
384 if as_func_success; then
385 :
386 else
387 exitcode=1
388 echo as_func_success failed.
389 fi
390
391 if as_func_failure; then
392 exitcode=1
393 echo as_func_failure succeeded.
394 fi
395
396 if as_func_ret_success; then
397 :
398 else
399 exitcode=1
400 echo as_func_ret_success failed.
401 fi
402
403 if as_func_ret_failure; then
404 exitcode=1
405 echo as_func_ret_failure succeeded.
406 fi
407
408 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
409 :
410 else
411 exitcode=1
412 echo positional parameters were not saved.
413 fi
414
415 test \$exitcode = 0") || {
416 echo No shell found that supports shell functions.
417 echo Please tell autoconf@gnu.org about your system,
418 echo including any error possibly output before this
419 echo message
420 }
421
422
423
424 as_lineno_1=$LINENO
425 as_lineno_2=$LINENO
426 test "x$as_lineno_1" != "x$as_lineno_2" &&
427 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
428
429 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
430 # uniformly replaced by the line number. The first 'sed' inserts a
431 # line-number line after each line using $LINENO; the second 'sed'
432 # does the real work. The second script uses 'N' to pair each
433 # line-number line with the line containing $LINENO, and appends
434 # trailing '-' during substitution so that $LINENO is not a special
435 # case at line end.
436 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
437 # scripts with optimization help from Paolo Bonzini. Blame Lee
438 # E. McMahon (1931-1989) for sed's syntax. :-)
439 sed -n '
440 p
441 /[$]LINENO/=
442 ' <$as_myself |
443 sed '
444 s/[$]LINENO.*/&-/
445 t lineno
446 b
447 :lineno
448 N
449 :loop
450 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
451 t loop
452 s/-\n.*//
453 ' >$as_me.lineno &&
454 chmod +x "$as_me.lineno" ||
455 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
456 { (exit 1); exit 1; }; }
457
458 # Don't try to exec as it changes $[0], causing all sort of problems
459 # (the dirname of $[0] is not the place where we might find the
460 # original and so on. Autoconf is especially sensitive to this).
461 . "./$as_me.lineno"
462 # Exit status is that of the last command.
463 exit
464 }
465
466
467 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
468 as_dirname=dirname
469 else
470 as_dirname=false
471 fi
472
473 ECHO_C= ECHO_N= ECHO_T=
474 case `echo -n x` in
475 -n*)
476 case `echo 'x\c'` in
477 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
478 *) ECHO_C='\c';;
479 esac;;
480 *)
481 ECHO_N='-n';;
482 esac
483
484 if expr a : '\(a\)' >/dev/null 2>&1 &&
485 test "X`expr 00001 : '.*\(...\)'`" = X001; then
486 as_expr=expr
487 else
488 as_expr=false
489 fi
490
491 rm -f conf$$ conf$$.exe conf$$.file
492 if test -d conf$$.dir; then
493 rm -f conf$$.dir/conf$$.file
494 else
495 rm -f conf$$.dir
496 mkdir conf$$.dir
497 fi
498 echo >conf$$.file
499 if ln -s conf$$.file conf$$ 2>/dev/null; then
500 as_ln_s='ln -s'
501 # ... but there are two gotchas:
502 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
503 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
504 # In both cases, we have to default to `cp -p'.
505 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
506 as_ln_s='cp -p'
507 elif ln conf$$.file conf$$ 2>/dev/null; then
508 as_ln_s=ln
509 else
510 as_ln_s='cp -p'
511 fi
512 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
513 rmdir conf$$.dir 2>/dev/null
514
515 if mkdir -p . 2>/dev/null; then
516 as_mkdir_p=:
517 else
518 test -d ./-p && rmdir ./-p
519 as_mkdir_p=false
520 fi
521
522 if test -x / >/dev/null 2>&1; then
523 as_test_x='test -x'
524 else
525 if ls -dL / >/dev/null 2>&1; then
526 as_ls_L_option=L
527 else
528 as_ls_L_option=
529 fi
530 as_test_x='
531 eval sh -c '\''
532 if test -d "$1"; then
533 test -d "$1/.";
534 else
535 case $1 in
536 -*)set "./$1";;
537 esac;
538 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
539 ???[sx]*):;;*)false;;esac;fi
540 '\'' sh
541 '
542 fi
543 as_executable_p=$as_test_x
544
545 # Sed expression to map a string onto a valid CPP name.
546 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
547
548 # Sed expression to map a string onto a valid variable name.
549 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
550
551
552
553
554 # Check that we are running under the correct shell.
555 SHELL=${CONFIG_SHELL-/bin/sh}
556
557 case X$ECHO in
558 X*--fallback-echo)
559 # Remove one level of quotation (which was required for Make).
560 ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
561 ;;
562 esac
563
564 echo=${ECHO-echo}
565 if test "X$1" = X--no-reexec; then
566 # Discard the --no-reexec flag, and continue.
567 shift
568 elif test "X$1" = X--fallback-echo; then
569 # Avoid inline document here, it may be left over
570 :
571 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
572 # Yippee, $echo works!
573 :
574 else
575 # Restart under the correct shell.
576 exec $SHELL "$0" --no-reexec ${1+"$@"}
577 fi
578
579 if test "X$1" = X--fallback-echo; then
580 # used as fallback echo
581 shift
582 cat <<EOF
583 $*
584 EOF
585 exit 0
586 fi
587
588 # The HP-UX ksh and POSIX shell print the target directory to stdout
589 # if CDPATH is set.
590 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
591
592 if test -z "$ECHO"; then
593 if test "X${echo_test_string+set}" != Xset; then
594 # find a string as large as possible, as long as the shell can cope with it
595 for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
596 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
597 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
598 echo_test_string=`eval $cmd` &&
599 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
600 then
601 break
602 fi
603 done
604 fi
605
606 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
607 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
608 test "X$echo_testing_string" = "X$echo_test_string"; then
609 :
610 else
611 # The Solaris, AIX, and Digital Unix default echo programs unquote
612 # backslashes. This makes it impossible to quote backslashes using
613 # echo "$something" | sed 's/\\/\\\\/g'
614 #
615 # So, first we look for a working echo in the user's PATH.
616
617 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
618 for dir in $PATH /usr/ucb; do
619 IFS="$lt_save_ifs"
620 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
621 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
622 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
623 test "X$echo_testing_string" = "X$echo_test_string"; then
624 echo="$dir/echo"
625 break
626 fi
627 done
628 IFS="$lt_save_ifs"
629
630 if test "X$echo" = Xecho; then
631 # We didn't find a better echo, so look for alternatives.
632 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
633 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
634 test "X$echo_testing_string" = "X$echo_test_string"; then
635 # This shell has a builtin print -r that does the trick.
636 echo='print -r'
637 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
638 test "X$CONFIG_SHELL" != X/bin/ksh; then
639 # If we have ksh, try running configure again with it.
640 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
641 export ORIGINAL_CONFIG_SHELL
642 CONFIG_SHELL=/bin/ksh
643 export CONFIG_SHELL
644 exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
645 else
646 # Try using printf.
647 echo='printf %s\n'
648 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
649 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
650 test "X$echo_testing_string" = "X$echo_test_string"; then
651 # Cool, printf works
652 :
653 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
654 test "X$echo_testing_string" = 'X\t' &&
655 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
656 test "X$echo_testing_string" = "X$echo_test_string"; then
657 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
658 export CONFIG_SHELL
659 SHELL="$CONFIG_SHELL"
660 export SHELL
661 echo="$CONFIG_SHELL $0 --fallback-echo"
662 elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
663 test "X$echo_testing_string" = 'X\t' &&
664 echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
665 test "X$echo_testing_string" = "X$echo_test_string"; then
666 echo="$CONFIG_SHELL $0 --fallback-echo"
667 else
668 # maybe with a smaller string...
669 prev=:
670
671 for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
672 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
673 then
674 break
675 fi
676 prev="$cmd"
677 done
678
679 if test "$prev" != 'sed 50q "$0"'; then
680 echo_test_string=`eval $prev`
681 export echo_test_string
682 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
683 else
684 # Oops. We lost completely, so just stick with echo.
685 echo=echo
686 fi
687 fi
688 fi
689 fi
690 fi
691 fi
692
693 # Copy echo and quote the copy suitably for passing to libtool from
694 # the Makefile, instead of quoting the original, which is used later.
695 ECHO=$echo
696 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
697 ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
698 fi
699
700
701
702
703 tagnames=${tagnames+${tagnames},}CXX
704
705 tagnames=${tagnames+${tagnames},}F77
706
707 exec 7<&0 </dev/null 6>&1
708
709 # Name of the host.
710 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
711 # so uname gets run too.
712 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
713
714 #
715 # Initializations.
716 #
717 ac_default_prefix=/usr/local
718 ac_clean_files=
719 ac_config_libobj_dir=.
720 LIBOBJS=
721 cross_compiling=no
722 subdirs=
723 MFLAGS=
724 MAKEFLAGS=
725 SHELL=${CONFIG_SHELL-/bin/sh}
726
727 # Identity of this package.
728 PACKAGE_NAME='PolicyKit-gnome'
729 PACKAGE_TARNAME='PolicyKit-gnome'
730 PACKAGE_VERSION='0.5'
731 PACKAGE_STRING='PolicyKit-gnome 0.5'
732 PACKAGE_BUGREPORT='mailto:david@fubar.dk'
733
734 ac_unique_file="src"
735 # Factoring default headers for most tests.
736 ac_includes_default="\
737 #include <stdio.h>
738 #ifdef HAVE_SYS_TYPES_H
739 # include <sys/types.h>
740 #endif
741 #ifdef HAVE_SYS_STAT_H
742 # include <sys/stat.h>
743 #endif
744 #ifdef STDC_HEADERS
745 # include <stdlib.h>
746 # include <stddef.h>
747 #else
748 # ifdef HAVE_STDLIB_H
749 # include <stdlib.h>
750 # endif
751 #endif
752 #ifdef HAVE_STRING_H
753 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
754 # include <memory.h>
755 # endif
756 # include <string.h>
757 #endif
758 #ifdef HAVE_STRINGS_H
759 # include <strings.h>
760 #endif
761 #ifdef HAVE_INTTYPES_H
762 # include <inttypes.h>
763 #endif
764 #ifdef HAVE_STDINT_H
765 # include <stdint.h>
766 #endif
767 #ifdef HAVE_UNISTD_H
768 # include <unistd.h>
769 #endif"
770
771 ac_subst_vars='SHELL
772 PATH_SEPARATOR
773 PACKAGE_NAME
774 PACKAGE_TARNAME
775 PACKAGE_VERSION
776 PACKAGE_STRING
777 PACKAGE_BUGREPORT
778 exec_prefix
779 prefix
780 program_transform_name
781 bindir
782 sbindir
783 libexecdir
784 datarootdir
785 datadir
786 sysconfdir
787 sharedstatedir
788 localstatedir
789 includedir
790 oldincludedir
791 docdir
792 infodir
793 htmldir
794 dvidir
795 pdfdir
796 psdir
797 libdir
798 localedir
799 mandir
800 DEFS
801 ECHO_C
802 ECHO_N
803 ECHO_T
804 LIBS
805 build_alias
806 host_alias
807 target_alias
808 INSTALL_PROGRAM
809 INSTALL_SCRIPT
810 INSTALL_DATA
811 am__isrc
812 CYGPATH_W
813 PACKAGE
814 VERSION
815 ACLOCAL
816 AUTOCONF
817 AUTOMAKE
818 AUTOHEADER
819 MAKEINFO
820 install_sh
821 STRIP
822 INSTALL_STRIP_PROGRAM
823 mkdir_p
824 AWK
825 SET_MAKE
826 am__leading_dot
827 AMTAR
828 am__tar
829 am__untar
830 MAINTAINER_MODE_TRUE
831 MAINTAINER_MODE_FALSE
832 MAINT
833 CC
834 CFLAGS
835 LDFLAGS
836 CPPFLAGS
837 ac_ct_CC
838 EXEEXT
839 OBJEXT
840 DEPDIR
841 am__include
842 am__quote
843 AMDEP_TRUE
844 AMDEP_FALSE
845 AMDEPBACKSLASH
846 CCDEPMODE
847 am__fastdepCC_TRUE
848 am__fastdepCC_FALSE
849 CPP
850 GREP
851 EGREP
852 build
853 build_cpu
854 build_vendor
855 build_os
856 host
857 host_cpu
858 host_vendor
859 host_os
860 SED
861 LN_S
862 ECHO
863 AR
864 RANLIB
865 CXX
866 CXXFLAGS
867 ac_ct_CXX
868 CXXDEPMODE
869 am__fastdepCXX_TRUE
870 am__fastdepCXX_FALSE
871 CXXCPP
872 F77
873 FFLAGS
874 ac_ct_F77
875 LIBTOOL
876 ACLOCAL_AMFLAGS
877 PKG_CONFIG
878 HELP_DIR
879 OMF_DIR
880 DOC_USER_FORMATS
881 ENABLE_SK_TRUE
882 ENABLE_SK_FALSE
883 HAVE_GNOME_DOC_UTILS_TRUE
884 HAVE_GNOME_DOC_UTILS_FALSE
885 WARN_CFLAGS
886 DISABLE_DEPRECATED
887 POLKIT_GNOME_CFLAGS
888 POLKIT_GNOME_LIBS
889 POLKIT_POLICY_FILE_VALIDATE
890 INTLTOOL_DESKTOP_RULE
891 INTLTOOL_DIRECTORY_RULE
892 INTLTOOL_KEYS_RULE
893 INTLTOOL_PROP_RULE
894 INTLTOOL_OAF_RULE
895 INTLTOOL_PONG_RULE
896 INTLTOOL_SERVER_RULE
897 INTLTOOL_SHEET_RULE
898 INTLTOOL_SOUNDLIST_RULE
899 INTLTOOL_UI_RULE
900 INTLTOOL_XAM_RULE
901 INTLTOOL_KBD_RULE
902 INTLTOOL_XML_RULE
903 INTLTOOL_XML_NOMERGE_RULE
904 INTLTOOL_CAVES_RULE
905 INTLTOOL_SCHEMAS_RULE
906 INTLTOOL_THEME_RULE
907 INTLTOOL_SERVICE_RULE
908 INTLTOOL_POLICY_RULE
909 INTLTOOL_EXTRACT
910 INTLTOOL_MERGE
911 INTLTOOL_UPDATE
912 INTLTOOL_PERL
913 ALL_LINGUAS
914 DATADIRNAME
915 GETTEXT_PACKAGE
916 USE_NLS
917 MSGFMT
918 MSGFMT_OPTS
919 GMSGFMT
920 XGETTEXT
921 CATALOGS
922 CATOBJEXT
923 GMOFILES
924 INSTOBJEXT
925 INTLLIBS
926 PO_IN_DATADIR_TRUE
927 PO_IN_DATADIR_FALSE
928 POFILES
929 POSUB
930 MKINSTALLDIRS
931 AM_CPPFLAGS
932 AM_CFLAGS
933 AM_CXXFLAGS
934 AM_LDFLAGS
935 LIBOBJS
936 LTLIBOBJS'
937 ac_subst_files=''
938 ac_precious_vars='build_alias
939 host_alias
940 target_alias
941 CC
942 CFLAGS
943 LDFLAGS
944 LIBS
945 CPPFLAGS
946 CPP
947 CXX
948 CXXFLAGS
949 CCC
950 CXXCPP
951 F77
952 FFLAGS
953 PKG_CONFIG
954 POLKIT_GNOME_CFLAGS
955 POLKIT_GNOME_LIBS'
956
957
958 # Initialize some variables set by options.
959 ac_init_help=
960 ac_init_version=false
961 # The variables have the same names as the options, with
962 # dashes changed to underlines.
963 cache_file=/dev/null
964 exec_prefix=NONE
965 no_create=
966 no_recursion=
967 prefix=NONE
968 program_prefix=NONE
969 program_suffix=NONE
970 program_transform_name=s,x,x,
971 silent=
972 site=
973 srcdir=
974 verbose=
975 x_includes=NONE
976 x_libraries=NONE
977
978 # Installation directory options.
979 # These are left unexpanded so users can "make install exec_prefix=/foo"
980 # and all the variables that are supposed to be based on exec_prefix
981 # by default will actually change.
982 # Use braces instead of parens because sh, perl, etc. also accept them.
983 # (The list follows the same order as the GNU Coding Standards.)
984 bindir='${exec_prefix}/bin'
985 sbindir='${exec_prefix}/sbin'
986 libexecdir='${exec_prefix}/libexec'
987 datarootdir='${prefix}/share'
988 datadir='${datarootdir}'
989 sysconfdir='${prefix}/etc'
990 sharedstatedir='${prefix}/com'
991 localstatedir='${prefix}/var'
992 includedir='${prefix}/include'
993 oldincludedir='/usr/include'
994 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
995 infodir='${datarootdir}/info'
996 htmldir='${docdir}'
997 dvidir='${docdir}'
998 pdfdir='${docdir}'
999 psdir='${docdir}'
1000 libdir='${exec_prefix}/lib'
1001 localedir='${datarootdir}/locale'
1002 mandir='${datarootdir}/man'
1003
1004 ac_prev=
1005 ac_dashdash=
1006 for ac_option
1007 do
1008 # If the previous option needs an argument, assign it.
1009 if test -n "$ac_prev"; then
1010 eval $ac_prev=\$ac_option
1011 ac_prev=
1012 continue
1013 fi
1014
1015 case $ac_option in
1016 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1017 *) ac_optarg=yes ;;
1018 esac
1019
1020 # Accept the important Cygnus configure options, so we can diagnose typos.
1021
1022 case $ac_dashdash$ac_option in
1023 --)
1024 ac_dashdash=yes ;;
1025
1026 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1027 ac_prev=bindir ;;
1028 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1029 bindir=$ac_optarg ;;
1030
1031 -build | --build | --buil | --bui | --bu)
1032 ac_prev=build_alias ;;
1033 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1034 build_alias=$ac_optarg ;;
1035
1036 -cache-file | --cache-file | --cache-fil | --cache-fi \
1037 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1038 ac_prev=cache_file ;;
1039 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1040 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1041 cache_file=$ac_optarg ;;
1042
1043 --config-cache | -C)
1044 cache_file=config.cache ;;
1045
1046 -datadir | --datadir | --datadi | --datad)
1047 ac_prev=datadir ;;
1048 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1049 datadir=$ac_optarg ;;
1050
1051 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1052 | --dataroo | --dataro | --datar)
1053 ac_prev=datarootdir ;;
1054 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1055 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1056 datarootdir=$ac_optarg ;;
1057
1058 -disable-* | --disable-*)
1059 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1060 # Reject names that are not valid shell variable names.
1061 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1062 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
1063 { (exit 1); exit 1; }; }
1064 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
1065 eval enable_$ac_feature=no ;;
1066
1067 -docdir | --docdir | --docdi | --doc | --do)
1068 ac_prev=docdir ;;
1069 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1070 docdir=$ac_optarg ;;
1071
1072 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1073 ac_prev=dvidir ;;
1074 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1075 dvidir=$ac_optarg ;;
1076
1077 -enable-* | --enable-*)
1078 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1079 # Reject names that are not valid shell variable names.
1080 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
1082 { (exit 1); exit 1; }; }
1083 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
1084 eval enable_$ac_feature=\$ac_optarg ;;
1085
1086 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1087 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1088 | --exec | --exe | --ex)
1089 ac_prev=exec_prefix ;;
1090 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1091 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1092 | --exec=* | --exe=* | --ex=*)
1093 exec_prefix=$ac_optarg ;;
1094
1095 -gas | --gas | --ga | --g)
1096 # Obsolete; use --with-gas.
1097 with_gas=yes ;;
1098
1099 -help | --help | --hel | --he | -h)
1100 ac_init_help=long ;;
1101 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1102 ac_init_help=recursive ;;
1103 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1104 ac_init_help=short ;;
1105
1106 -host | --host | --hos | --ho)
1107 ac_prev=host_alias ;;
1108 -host=* | --host=* | --hos=* | --ho=*)
1109 host_alias=$ac_optarg ;;
1110
1111 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1112 ac_prev=htmldir ;;
1113 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1114 | --ht=*)
1115 htmldir=$ac_optarg ;;
1116
1117 -includedir | --includedir | --includedi | --included | --include \
1118 | --includ | --inclu | --incl | --inc)
1119 ac_prev=includedir ;;
1120 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1121 | --includ=* | --inclu=* | --incl=* | --inc=*)
1122 includedir=$ac_optarg ;;
1123
1124 -infodir | --infodir | --infodi | --infod | --info | --inf)
1125 ac_prev=infodir ;;
1126 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1127 infodir=$ac_optarg ;;
1128
1129 -libdir | --libdir | --libdi | --libd)
1130 ac_prev=libdir ;;
1131 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1132 libdir=$ac_optarg ;;
1133
1134 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1135 | --libexe | --libex | --libe)
1136 ac_prev=libexecdir ;;
1137 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1138 | --libexe=* | --libex=* | --libe=*)
1139 libexecdir=$ac_optarg ;;
1140
1141 -localedir | --localedir | --localedi | --localed | --locale)
1142 ac_prev=localedir ;;
1143 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1144 localedir=$ac_optarg ;;
1145
1146 -localstatedir | --localstatedir | --localstatedi | --localstated \
1147 | --localstate | --localstat | --localsta | --localst | --locals)
1148 ac_prev=localstatedir ;;
1149 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1150 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1151 localstatedir=$ac_optarg ;;
1152
1153 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1154 ac_prev=mandir ;;
1155 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1156 mandir=$ac_optarg ;;
1157
1158 -nfp | --nfp | --nf)
1159 # Obsolete; use --without-fp.
1160 with_fp=no ;;
1161
1162 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1163 | --no-cr | --no-c | -n)
1164 no_create=yes ;;
1165
1166 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1167 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1168 no_recursion=yes ;;
1169
1170 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1171 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1172 | --oldin | --oldi | --old | --ol | --o)
1173 ac_prev=oldincludedir ;;
1174 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1175 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1176 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1177 oldincludedir=$ac_optarg ;;
1178
1179 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1180 ac_prev=prefix ;;
1181 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1182 prefix=$ac_optarg ;;
1183
1184 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1185 | --program-pre | --program-pr | --program-p)
1186 ac_prev=program_prefix ;;
1187 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1188 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1189 program_prefix=$ac_optarg ;;
1190
1191 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1192 | --program-suf | --program-su | --program-s)
1193 ac_prev=program_suffix ;;
1194 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1195 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1196 program_suffix=$ac_optarg ;;
1197
1198 -program-transform-name | --program-transform-name \
1199 | --program-transform-nam | --program-transform-na \
1200 | --program-transform-n | --program-transform- \
1201 | --program-transform | --program-transfor \
1202 | --program-transfo | --program-transf \
1203 | --program-trans | --program-tran \
1204 | --progr-tra | --program-tr | --program-t)
1205 ac_prev=program_transform_name ;;
1206 -program-transform-name=* | --program-transform-name=* \
1207 | --program-transform-nam=* | --program-transform-na=* \
1208 | --program-transform-n=* | --program-transform-=* \
1209 | --program-transform=* | --program-transfor=* \
1210 | --program-transfo=* | --program-transf=* \
1211 | --program-trans=* | --program-tran=* \
1212 | --progr-tra=* | --program-tr=* | --program-t=*)
1213 program_transform_name=$ac_optarg ;;
1214
1215 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1216 ac_prev=pdfdir ;;
1217 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1218 pdfdir=$ac_optarg ;;
1219
1220 -psdir | --psdir | --psdi | --psd | --ps)
1221 ac_prev=psdir ;;
1222 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1223 psdir=$ac_optarg ;;
1224
1225 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1226 | -silent | --silent | --silen | --sile | --sil)
1227 silent=yes ;;
1228
1229 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1230 ac_prev=sbindir ;;
1231 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1232 | --sbi=* | --sb=*)
1233 sbindir=$ac_optarg ;;
1234
1235 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1236 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1237 | --sharedst | --shareds | --shared | --share | --shar \
1238 | --sha | --sh)
1239 ac_prev=sharedstatedir ;;
1240 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1241 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1242 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1243 | --sha=* | --sh=*)
1244 sharedstatedir=$ac_optarg ;;
1245
1246 -site | --site | --sit)
1247 ac_prev=site ;;
1248 -site=* | --site=* | --sit=*)
1249 site=$ac_optarg ;;
1250
1251 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1252 ac_prev=srcdir ;;
1253 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1254 srcdir=$ac_optarg ;;
1255
1256 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1257 | --syscon | --sysco | --sysc | --sys | --sy)
1258 ac_prev=sysconfdir ;;
1259 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1260 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1261 sysconfdir=$ac_optarg ;;
1262
1263 -target | --target | --targe | --targ | --tar | --ta | --t)
1264 ac_prev=target_alias ;;
1265 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1266 target_alias=$ac_optarg ;;
1267
1268 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1269 verbose=yes ;;
1270
1271 -version | --version | --versio | --versi | --vers | -V)
1272 ac_init_version=: ;;
1273
1274 -with-* | --with-*)
1275 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1276 # Reject names that are not valid shell variable names.
1277 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1278 { echo "$as_me: error: invalid package name: $ac_package" >&2
1279 { (exit 1); exit 1; }; }
1280 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1281 eval with_$ac_package=\$ac_optarg ;;
1282
1283 -without-* | --without-*)
1284 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1285 # Reject names that are not valid shell variable names.
1286 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1287 { echo "$as_me: error: invalid package name: $ac_package" >&2
1288 { (exit 1); exit 1; }; }
1289 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1290 eval with_$ac_package=no ;;
1291
1292 --x)
1293 # Obsolete; use --with-x.
1294 with_x=yes ;;
1295
1296 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1297 | --x-incl | --x-inc | --x-in | --x-i)
1298 ac_prev=x_includes ;;
1299 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1300 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1301 x_includes=$ac_optarg ;;
1302
1303 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1304 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1305 ac_prev=x_libraries ;;
1306 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1307 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1308 x_libraries=$ac_optarg ;;
1309
1310 -*) { echo "$as_me: error: unrecognized option: $ac_option
1311 Try \`$0 --help' for more information." >&2
1312 { (exit 1); exit 1; }; }
1313 ;;
1314
1315 *=*)
1316 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1317 # Reject names that are not valid shell variable names.
1318 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1319 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1320 { (exit 1); exit 1; }; }
1321 eval $ac_envvar=\$ac_optarg
1322 export $ac_envvar ;;
1323
1324 *)
1325 # FIXME: should be removed in autoconf 3.0.
1326 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1327 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1328 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1329 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1330 ;;
1331
1332 esac
1333 done
1334
1335 if test -n "$ac_prev"; then
1336 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1337 { echo "$as_me: error: missing argument to $ac_option" >&2
1338 { (exit 1); exit 1; }; }
1339 fi
1340
1341 # Be sure to have absolute directory names.
1342 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1343 datadir sysconfdir sharedstatedir localstatedir includedir \
1344 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1345 libdir localedir mandir
1346 do
1347 eval ac_val=\$$ac_var
1348 case $ac_val in
1349 [\\/$]* | ?:[\\/]* ) continue;;
1350 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1351 esac
1352 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1353 { (exit 1); exit 1; }; }
1354 done
1355
1356 # There might be people who depend on the old broken behavior: `$host'
1357 # used to hold the argument of --host etc.
1358 # FIXME: To remove some day.
1359 build=$build_alias
1360 host=$host_alias
1361 target=$target_alias
1362
1363 # FIXME: To remove some day.
1364 if test "x$host_alias" != x; then
1365 if test "x$build_alias" = x; then
1366 cross_compiling=maybe
1367 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1368 If a cross compiler is detected then cross compile mode will be used." >&2
1369 elif test "x$build_alias" != "x$host_alias"; then
1370 cross_compiling=yes
1371 fi
1372 fi
1373
1374 ac_tool_prefix=
1375 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1376
1377 test "$silent" = yes && exec 6>/dev/null
1378
1379
1380 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1381 ac_ls_di=`ls -di .` &&
1382 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1383 { echo "$as_me: error: Working directory cannot be determined" >&2
1384 { (exit 1); exit 1; }; }
1385 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1386 { echo "$as_me: error: pwd does not report name of working directory" >&2
1387 { (exit 1); exit 1; }; }
1388
1389
1390 # Find the source files, if location was not specified.
1391 if test -z "$srcdir"; then
1392 ac_srcdir_defaulted=yes
1393 # Try the directory containing this script, then the parent directory.
1394 ac_confdir=`$as_dirname -- "$0" ||
1395 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1396 X"$0" : 'X\(//\)[^/]' \| \
1397 X"$0" : 'X\(//\)$' \| \
1398 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1399 echo X"$0" |
1400 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1401 s//\1/
1402 q
1403 }
1404 /^X\(\/\/\)[^/].*/{
1405 s//\1/
1406 q
1407 }
1408 /^X\(\/\/\)$/{
1409 s//\1/
1410 q
1411 }
1412 /^X\(\/\).*/{
1413 s//\1/
1414 q
1415 }
1416 s/.*/./; q'`
1417 srcdir=$ac_confdir
1418 if test ! -r "$srcdir/$ac_unique_file"; then
1419 srcdir=..
1420 fi
1421 else
1422 ac_srcdir_defaulted=no
1423 fi
1424 if test ! -r "$srcdir/$ac_unique_file"; then
1425 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1426 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1427 { (exit 1); exit 1; }; }
1428 fi
1429 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1430 ac_abs_confdir=`(
1431 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1432 { (exit 1); exit 1; }; }
1433 pwd)`
1434 # When building in place, set srcdir=.
1435 if test "$ac_abs_confdir" = "$ac_pwd"; then
1436 srcdir=.
1437 fi
1438 # Remove unnecessary trailing slashes from srcdir.
1439 # Double slashes in file names in object file debugging info
1440 # mess up M-x gdb in Emacs.
1441 case $srcdir in
1442 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1443 esac
1444 for ac_var in $ac_precious_vars; do
1445 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1446 eval ac_env_${ac_var}_value=\$${ac_var}
1447 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1448 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1449 done
1450
1451 #
1452 # Report the --help message.
1453 #
1454 if test "$ac_init_help" = "long"; then
1455 # Omit some internal or obsolete options to make the list less imposing.
1456 # This message is too long to be a string in the A/UX 3.1 sh.
1457 cat <<_ACEOF
1458 \`configure' configures PolicyKit-gnome 0.5 to adapt to many kinds of systems.
1459
1460 Usage: $0 [OPTION]... [VAR=VALUE]...
1461
1462 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1463 VAR=VALUE. See below for descriptions of some of the useful variables.
1464
1465 Defaults for the options are specified in brackets.
1466
1467 Configuration:
1468 -h, --help display this help and exit
1469 --help=short display options specific to this package
1470 --help=recursive display the short help of all the included packages
1471 -V, --version display version information and exit
1472 -q, --quiet, --silent do not print \`checking...' messages
1473 --cache-file=FILE cache test results in FILE [disabled]
1474 -C, --config-cache alias for \`--cache-file=config.cache'
1475 -n, --no-create do not create output files
1476 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1477
1478 Installation directories:
1479 --prefix=PREFIX install architecture-independent files in PREFIX
1480 [$ac_default_prefix]
1481 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1482 [PREFIX]
1483
1484 By default, \`make install' will install all the files in
1485 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1486 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1487 for instance \`--prefix=\$HOME'.
1488
1489 For better control, use the options below.
1490
1491 Fine tuning of the installation directories:
1492 --bindir=DIR user executables [EPREFIX/bin]
1493 --sbindir=DIR system admin executables [EPREFIX/sbin]
1494 --libexecdir=DIR program executables [EPREFIX/libexec]
1495 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1496 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1497 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1498 --libdir=DIR object code libraries [EPREFIX/lib]
1499 --includedir=DIR C header files [PREFIX/include]
1500 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1501 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1502 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1503 --infodir=DIR info documentation [DATAROOTDIR/info]
1504 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1505 --mandir=DIR man documentation [DATAROOTDIR/man]
1506 --docdir=DIR documentation root [DATAROOTDIR/doc/PolicyKit-gnome]
1507 --htmldir=DIR html documentation [DOCDIR]
1508 --dvidir=DIR dvi documentation [DOCDIR]
1509 --pdfdir=DIR pdf documentation [DOCDIR]
1510 --psdir=DIR ps documentation [DOCDIR]
1511 _ACEOF
1512
1513 cat <<\_ACEOF
1514
1515 Program names:
1516 --program-prefix=PREFIX prepend PREFIX to installed program names
1517 --program-suffix=SUFFIX append SUFFIX to installed program names
1518 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1519
1520 System types:
1521 --build=BUILD configure for building on BUILD [guessed]
1522 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1523 _ACEOF
1524 fi
1525
1526 if test -n "$ac_init_help"; then
1527 case $ac_init_help in
1528 short | recursive ) echo "Configuration of PolicyKit-gnome 0.5:";;
1529 esac
1530 cat <<\_ACEOF
1531
1532 Optional Features:
1533 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1534 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1535 --enable-maintainer-mode enable make rules and dependencies not useful
1536 (and sometimes confusing) to the casual installer
1537 --disable-dependency-tracking speeds up one-time build
1538 --enable-dependency-tracking do not reject slow dependency extractors
1539 --enable-shared[=PKGS] build shared libraries [default=yes]
1540 --enable-static[=PKGS] build static libraries [default=yes]
1541 --enable-fast-install[=PKGS]
1542 optimize for fast installation [default=yes]
1543 --disable-libtool-lock avoid locking (might break parallel builds)
1544 --disable-scrollkeeper do not make updates to the scrollkeeper database
1545 --enable-debug turn on debugging
1546 --enable-compile-warnings=[no/minimum/yes/maximum/error]
1547 Turn on compiler warnings
1548 --enable-iso-c Try to warn if code is not ISO C
1549
1550 Optional Packages:
1551 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1552 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1553 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1554 --with-pic try to use only PIC/non-PIC objects [default=use
1555 both]
1556 --with-tags[=TAGS] include additional configurations [automatic]
1557 --with-help-dir=DIR path to help docs
1558 --with-omf-dir=DIR path to OMF files
1559 --with-help-formats=FORMATS
1560 list of formats
1561
1562 Some influential environment variables:
1563 CC C compiler command
1564 CFLAGS C compiler flags
1565 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1566 nonstandard directory <lib dir>
1567 LIBS libraries to pass to the linker, e.g. -l<library>
1568 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1569 you have headers in a nonstandard directory <include dir>
1570 CPP C preprocessor
1571 CXX C++ compiler command
1572 CXXFLAGS C++ compiler flags
1573 CXXCPP C++ preprocessor
1574 F77 Fortran 77 compiler command
1575 FFLAGS Fortran 77 compiler flags
1576 PKG_CONFIG path to pkg-config utility
1577 POLKIT_GNOME_CFLAGS
1578 C compiler flags for POLKIT_GNOME, overriding pkg-config
1579 POLKIT_GNOME_LIBS
1580 linker flags for POLKIT_GNOME, overriding pkg-config
1581
1582 Use these variables to override the choices made by `configure' or to help
1583 it to find libraries and programs with nonstandard names/locations.
1584
1585 Report bugs to <mailto:david@fubar.dk>.
1586 _ACEOF
1587 ac_status=$?
1588 fi
1589
1590 if test "$ac_init_help" = "recursive"; then
1591 # If there are subdirs, report their specific --help.
1592 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1593 test -d "$ac_dir" || continue
1594 ac_builddir=.
1595
1596 case "$ac_dir" in
1597 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1598 *)
1599 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1600 # A ".." for each directory in $ac_dir_suffix.
1601 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1602 case $ac_top_builddir_sub in
1603 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1604 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1605 esac ;;
1606 esac
1607 ac_abs_top_builddir=$ac_pwd
1608 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1609 # for backward compatibility:
1610 ac_top_builddir=$ac_top_build_prefix
1611
1612 case $srcdir in
1613 .) # We are building in place.
1614 ac_srcdir=.
1615 ac_top_srcdir=$ac_top_builddir_sub
1616 ac_abs_top_srcdir=$ac_pwd ;;
1617 [\\/]* | ?:[\\/]* ) # Absolute name.
1618 ac_srcdir=$srcdir$ac_dir_suffix;
1619 ac_top_srcdir=$srcdir
1620 ac_abs_top_srcdir=$srcdir ;;
1621 *) # Relative name.
1622 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1623 ac_top_srcdir=$ac_top_build_prefix$srcdir
1624 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1625 esac
1626 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1627
1628 cd "$ac_dir" || { ac_status=$?; continue; }
1629 # Check for guested configure.
1630 if test -f "$ac_srcdir/configure.gnu"; then
1631 echo &&
1632 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1633 elif test -f "$ac_srcdir/configure"; then
1634 echo &&
1635 $SHELL "$ac_srcdir/configure" --help=recursive
1636 else
1637 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1638 fi || ac_status=$?
1639 cd "$ac_pwd" || { ac_status=$?; break; }
1640 done
1641 fi
1642
1643 test -n "$ac_init_help" && exit $ac_status
1644 if $ac_init_version; then
1645 cat <<\_ACEOF
1646 PolicyKit-gnome configure 0.5
1647 generated by GNU Autoconf 2.61
1648
1649 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1650 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1651 This configure script is free software; the Free Software Foundation
1652 gives unlimited permission to copy, distribute and modify it.
1653 _ACEOF
1654 exit
1655 fi
1656 cat >config.log <<_ACEOF
1657 This file contains any messages produced by compilers while
1658 running configure, to aid debugging if configure makes a mistake.
1659
1660 It was created by PolicyKit-gnome $as_me 0.5, which was
1661 generated by GNU Autoconf 2.61. Invocation command line was
1662
1663 $ $0 $@
1664
1665 _ACEOF
1666 exec 5>>config.log
1667 {
1668 cat <<_ASUNAME
1669 ## --------- ##
1670 ## Platform. ##
1671 ## --------- ##
1672
1673 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1674 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1675 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1676 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1677 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1678
1679 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1680 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1681
1682 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1683 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1684 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1685 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1686 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1687 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1688 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1689
1690 _ASUNAME
1691
1692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1693 for as_dir in $PATH
1694 do
1695 IFS=$as_save_IFS
1696 test -z "$as_dir" && as_dir=.
1697 echo "PATH: $as_dir"
1698 done
1699 IFS=$as_save_IFS
1700
1701 } >&5
1702
1703 cat >&5 <<_ACEOF
1704
1705
1706 ## ----------- ##
1707 ## Core tests. ##
1708 ## ----------- ##
1709
1710 _ACEOF
1711
1712
1713 # Keep a trace of the command line.
1714 # Strip out --no-create and --no-recursion so they do not pile up.
1715 # Strip out --silent because we don't want to record it for future runs.
1716 # Also quote any args containing shell meta-characters.
1717 # Make two passes to allow for proper duplicate-argument suppression.
1718 ac_configure_args=
1719 ac_configure_args0=
1720 ac_configure_args1=
1721 ac_must_keep_next=false
1722 for ac_pass in 1 2
1723 do
1724 for ac_arg
1725 do
1726 case $ac_arg in
1727 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1728 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1729 | -silent | --silent | --silen | --sile | --sil)
1730 continue ;;
1731 *\'*)
1732 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1733 esac
1734 case $ac_pass in
1735 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1736 2)
1737 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1738 if test $ac_must_keep_next = true; then
1739 ac_must_keep_next=false # Got value, back to normal.
1740 else
1741 case $ac_arg in
1742 *=* | --config-cache | -C | -disable-* | --disable-* \
1743 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1744 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1745 | -with-* | --with-* | -without-* | --without-* | --x)
1746 case "$ac_configure_args0 " in
1747 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1748 esac
1749 ;;
1750 -* ) ac_must_keep_next=true ;;
1751 esac
1752 fi
1753 ac_configure_args="$ac_configure_args '$ac_arg'"
1754 ;;
1755 esac
1756 done
1757 done
1758 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1759 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1760
1761 # When interrupted or exit'd, cleanup temporary files, and complete
1762 # config.log. We remove comments because anyway the quotes in there
1763 # would cause problems or look ugly.
1764 # WARNING: Use '\'' to represent an apostrophe within the trap.
1765 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1766 trap 'exit_status=$?
1767 # Save into config.log some information that might help in debugging.
1768 {
1769 echo
1770
1771 cat <<\_ASBOX
1772 ## ---------------- ##
1773 ## Cache variables. ##
1774 ## ---------------- ##
1775 _ASBOX
1776 echo
1777 # The following way of writing the cache mishandles newlines in values,
1778 (
1779 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1780 eval ac_val=\$$ac_var
1781 case $ac_val in #(
1782 *${as_nl}*)
1783 case $ac_var in #(
1784 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1785 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1786 esac
1787 case $ac_var in #(
1788 _ | IFS | as_nl) ;; #(
1789 *) $as_unset $ac_var ;;
1790 esac ;;
1791 esac
1792 done
1793 (set) 2>&1 |
1794 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1795 *${as_nl}ac_space=\ *)
1796 sed -n \
1797 "s/'\''/'\''\\\\'\'''\''/g;
1798 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1799 ;; #(
1800 *)
1801 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1802 ;;
1803 esac |
1804 sort
1805 )
1806 echo
1807
1808 cat <<\_ASBOX
1809 ## ----------------- ##
1810 ## Output variables. ##
1811 ## ----------------- ##
1812 _ASBOX
1813 echo
1814 for ac_var in $ac_subst_vars
1815 do
1816 eval ac_val=\$$ac_var
1817 case $ac_val in
1818 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1819 esac
1820 echo "$ac_var='\''$ac_val'\''"
1821 done | sort
1822 echo
1823
1824 if test -n "$ac_subst_files"; then
1825 cat <<\_ASBOX
1826 ## ------------------- ##
1827 ## File substitutions. ##
1828 ## ------------------- ##
1829 _ASBOX
1830 echo
1831 for ac_var in $ac_subst_files
1832 do
1833 eval ac_val=\$$ac_var
1834 case $ac_val in
1835 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1836 esac
1837 echo "$ac_var='\''$ac_val'\''"
1838 done | sort
1839 echo
1840 fi
1841
1842 if test -s confdefs.h; then
1843 cat <<\_ASBOX
1844 ## ----------- ##
1845 ## confdefs.h. ##
1846 ## ----------- ##
1847 _ASBOX
1848 echo
1849 cat confdefs.h
1850 echo
1851 fi
1852 test "$ac_signal" != 0 &&
1853 echo "$as_me: caught signal $ac_signal"
1854 echo "$as_me: exit $exit_status"
1855 } >&5
1856 rm -f core *.core core.conftest.* &&
1857 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1858 exit $exit_status
1859 ' 0
1860 for ac_signal in 1 2 13 15; do
1861 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1862 done
1863 ac_signal=0
1864
1865 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1866 rm -f -r conftest* confdefs.h
1867
1868 # Predefined preprocessor variables.
1869
1870 cat >>confdefs.h <<_ACEOF
1871 #define PACKAGE_NAME "$PACKAGE_NAME"
1872 _ACEOF
1873
1874
1875 cat >>confdefs.h <<_ACEOF
1876 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1877 _ACEOF
1878
1879
1880 cat >>confdefs.h <<_ACEOF
1881 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1882 _ACEOF
1883
1884
1885 cat >>confdefs.h <<_ACEOF
1886 #define PACKAGE_STRING "$PACKAGE_STRING"
1887 _ACEOF
1888
1889
1890 cat >>confdefs.h <<_ACEOF
1891 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1892 _ACEOF
1893
1894
1895 # Let the site file select an alternate cache file if it wants to.
1896 # Prefer explicitly selected file to automatically selected ones.
1897 if test -n "$CONFIG_SITE"; then
1898 set x "$CONFIG_SITE"
1899 elif test "x$prefix" != xNONE; then
1900 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1901 else
1902 set x "$ac_default_prefix/share/config.site" \
1903 "$ac_default_prefix/etc/config.site"
1904 fi
1905 shift
1906 for ac_site_file
1907 do
1908 if test -r "$ac_site_file"; then
1909 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1910 echo "$as_me: loading site script $ac_site_file" >&6;}
1911 sed 's/^/| /' "$ac_site_file" >&5
1912 . "$ac_site_file"
1913 fi
1914 done
1915
1916 if test -r "$cache_file"; then
1917 # Some versions of bash will fail to source /dev/null (special
1918 # files actually), so we avoid doing that.
1919 if test -f "$cache_file"; then
1920 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1921 echo "$as_me: loading cache $cache_file" >&6;}
1922 case $cache_file in
1923 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1924 *) . "./$cache_file";;
1925 esac
1926 fi
1927 else
1928 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1929 echo "$as_me: creating cache $cache_file" >&6;}
1930 >$cache_file
1931 fi
1932
1933 # Check that the precious variables saved in the cache have kept the same
1934 # value.
1935 ac_cache_corrupted=false
1936 for ac_var in $ac_precious_vars; do
1937 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1938 eval ac_new_set=\$ac_env_${ac_var}_set
1939 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1940 eval ac_new_val=\$ac_env_${ac_var}_value
1941 case $ac_old_set,$ac_new_set in
1942 set,)
1943 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1944 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1945 ac_cache_corrupted=: ;;
1946 ,set)
1947 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1948 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1949 ac_cache_corrupted=: ;;
1950 ,);;
1951 *)
1952 if test "x$ac_old_val" != "x$ac_new_val"; then
1953 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1954 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1955 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1956 echo "$as_me: former value: $ac_old_val" >&2;}
1957 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1958 echo "$as_me: current value: $ac_new_val" >&2;}
1959 ac_cache_corrupted=:
1960 fi;;
1961 esac
1962 # Pass precious variables to config.status.
1963 if test "$ac_new_set" = set; then
1964 case $ac_new_val in
1965 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1966 *) ac_arg=$ac_var=$ac_new_val ;;
1967 esac
1968 case " $ac_configure_args " in
1969 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1970 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1971 esac
1972 fi
1973 done
1974 if $ac_cache_corrupted; then
1975 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1976 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1977 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1978 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1979 { (exit 1); exit 1; }; }
1980 fi
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006 ac_ext=c
2007 ac_cpp='$CPP $CPPFLAGS'
2008 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2009 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2010 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2011
2012
2013
2014 am__api_version='1.10'
2015
2016 ac_aux_dir=
2017 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2018 if test -f "$ac_dir/install-sh"; then
2019 ac_aux_dir=$ac_dir
2020 ac_install_sh="$ac_aux_dir/install-sh -c"
2021 break
2022 elif test -f "$ac_dir/install.sh"; then
2023 ac_aux_dir=$ac_dir
2024 ac_install_sh="$ac_aux_dir/install.sh -c"
2025 break
2026 elif test -f "$ac_dir/shtool"; then
2027 ac_aux_dir=$ac_dir
2028 ac_install_sh="$ac_aux_dir/shtool install -c"
2029 break
2030 fi
2031 done
2032 if test -z "$ac_aux_dir"; then
2033 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2034 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2035 { (exit 1); exit 1; }; }
2036 fi
2037
2038 # These three variables are undocumented and unsupported,
2039 # and are intended to be withdrawn in a future Autoconf release.
2040 # They can cause serious problems if a builder's source tree is in a directory
2041 # whose full name contains unusual characters.
2042 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2043 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2044 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2045
2046
2047 # Find a good install program. We prefer a C program (faster),
2048 # so one script is as good as another. But avoid the broken or
2049 # incompatible versions:
2050 # SysV /etc/install, /usr/sbin/install
2051 # SunOS /usr/etc/install
2052 # IRIX /sbin/install
2053 # AIX /bin/install
2054 # AmigaOS /C/install, which installs bootblocks on floppy discs
2055 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2056 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2057 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2058 # OS/2's system install, which has a completely different semantic
2059 # ./install, which can be erroneously created by make from ./install.sh.
2060 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2061 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
2062 if test -z "$INSTALL"; then
2063 if test "${ac_cv_path_install+set}" = set; then
2064 echo $ECHO_N "(cached) $ECHO_C" >&6
2065 else
2066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2067 for as_dir in $PATH
2068 do
2069 IFS=$as_save_IFS
2070 test -z "$as_dir" && as_dir=.
2071 # Account for people who put trailing slashes in PATH elements.
2072 case $as_dir/ in
2073 ./ | .// | /cC/* | \
2074 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2075 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2076 /usr/ucb/* ) ;;
2077 *)
2078 # OSF1 and SCO ODT 3.0 have their own names for install.
2079 # Don't use installbsd from OSF since it installs stuff as root
2080 # by default.
2081 for ac_prog in ginstall scoinst install; do
2082 for ac_exec_ext in '' $ac_executable_extensions; do
2083 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2084 if test $ac_prog = install &&
2085 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2086 # AIX install. It has an incompatible calling convention.
2087 :
2088 elif test $ac_prog = install &&
2089 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2090 # program-specific install script used by HP pwplus--don't use.
2091 :
2092 else
2093 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2094 break 3
2095 fi
2096 fi
2097 done
2098 done
2099 ;;
2100 esac
2101 done
2102 IFS=$as_save_IFS
2103
2104
2105 fi
2106 if test "${ac_cv_path_install+set}" = set; then
2107 INSTALL=$ac_cv_path_install
2108 else
2109 # As a last resort, use the slow shell script. Don't cache a
2110 # value for INSTALL within a source directory, because that will
2111 # break other packages using the cache if that directory is
2112 # removed, or if the value is a relative name.
2113 INSTALL=$ac_install_sh
2114 fi
2115 fi
2116 { echo "$as_me:$LINENO: result: $INSTALL" >&5
2117 echo "${ECHO_T}$INSTALL" >&6; }
2118
2119 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2120 # It thinks the first close brace ends the variable substitution.
2121 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2122
2123 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2124
2125 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2126
2127 { echo "$as_me:$LINENO: checking whether build environment is sane" >&5
2128 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
2129 # Just in case
2130 sleep 1
2131 echo timestamp > conftest.file
2132 # Do `set' in a subshell so we don't clobber the current shell's
2133 # arguments. Must try -L first in case configure is actually a
2134 # symlink; some systems play weird games with the mod time of symlinks
2135 # (eg FreeBSD returns the mod time of the symlink's containing
2136 # directory).
2137 if (
2138 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2139 if test "$*" = "X"; then
2140 # -L didn't work.
2141 set X `ls -t $srcdir/configure conftest.file`
2142 fi
2143 rm -f conftest.file
2144 if test "$*" != "X $srcdir/configure conftest.file" \
2145 && test "$*" != "X conftest.file $srcdir/configure"; then
2146
2147 # If neither matched, then we have a broken ls. This can happen
2148 # if, for instance, CONFIG_SHELL is bash and it inherits a
2149 # broken ls alias from the environment. This has actually
2150 # happened. Such a system could not be considered "sane".
2151 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
2152 alias in your environment" >&5
2153 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
2154 alias in your environment" >&2;}
2155 { (exit 1); exit 1; }; }
2156 fi
2157
2158 test "$2" = conftest.file
2159 )
2160 then
2161 # Ok.
2162 :
2163 else
2164 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
2165 Check your system clock" >&5
2166 echo "$as_me: error: newly created file is older than distributed files!
2167 Check your system clock" >&2;}
2168 { (exit 1); exit 1; }; }
2169 fi
2170 { echo "$as_me:$LINENO: result: yes" >&5
2171 echo "${ECHO_T}yes" >&6; }
2172 test "$program_prefix" != NONE &&
2173 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2174 # Use a double $ so make ignores it.
2175 test "$program_suffix" != NONE &&
2176 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2177 # Double any \ or $. echo might interpret backslashes.
2178 # By default was `s,x,x', remove it if useless.
2179 cat <<\_ACEOF >conftest.sed
2180 s/[\\$]/&&/g;s/;s,x,x,$//
2181 _ACEOF
2182 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2183 rm -f conftest.sed
2184
2185 # expand $ac_aux_dir to an absolute path
2186 am_aux_dir=`cd $ac_aux_dir && pwd`
2187
2188 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2189 # Use eval to expand $SHELL
2190 if eval "$MISSING --run true"; then
2191 am_missing_run="$MISSING --run "
2192 else
2193 am_missing_run=
2194 { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
2195 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2196 fi
2197
2198 { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
2199 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
2200 if test -z "$MKDIR_P"; then
2201 if test "${ac_cv_path_mkdir+set}" = set; then
2202 echo $ECHO_N "(cached) $ECHO_C" >&6
2203 else
2204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2205 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2206 do
2207 IFS=$as_save_IFS
2208 test -z "$as_dir" && as_dir=.
2209 for ac_prog in mkdir gmkdir; do
2210 for ac_exec_ext in '' $ac_executable_extensions; do
2211 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2212 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2213 'mkdir (GNU coreutils) '* | \
2214 'mkdir (coreutils) '* | \
2215 'mkdir (fileutils) '4.1*)
2216 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2217 break 3;;
2218 esac
2219 done
2220 done
2221 done
2222 IFS=$as_save_IFS
2223
2224 fi
2225
2226 if test "${ac_cv_path_mkdir+set}" = set; then
2227 MKDIR_P="$ac_cv_path_mkdir -p"
2228 else
2229 # As a last resort, use the slow shell script. Don't cache a
2230 # value for MKDIR_P within a source directory, because that will
2231 # break other packages using the cache if that directory is
2232 # removed, or if the value is a relative name.
2233 test -d ./--version && rmdir ./--version
2234 MKDIR_P="$ac_install_sh -d"
2235 fi
2236 fi
2237 { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
2238 echo "${ECHO_T}$MKDIR_P" >&6; }
2239
2240 mkdir_p="$MKDIR_P"
2241 case $mkdir_p in
2242 [\\/$]* | ?:[\\/]*) ;;
2243 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2244 esac
2245
2246 for ac_prog in gawk mawk nawk awk
2247 do
2248 # Extract the first word of "$ac_prog", so it can be a program name with args.
2249 set dummy $ac_prog; ac_word=$2
2250 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2251 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2252 if test "${ac_cv_prog_AWK+set}" = set; then
2253 echo $ECHO_N "(cached) $ECHO_C" >&6
2254 else
2255 if test -n "$AWK"; then
2256 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2257 else
2258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2259 for as_dir in $PATH
2260 do
2261 IFS=$as_save_IFS
2262 test -z "$as_dir" && as_dir=.
2263 for ac_exec_ext in '' $ac_executable_extensions; do
2264 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2265 ac_cv_prog_AWK="$ac_prog"
2266 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2267 break 2
2268 fi
2269 done
2270 done
2271 IFS=$as_save_IFS
2272
2273 fi
2274 fi
2275 AWK=$ac_cv_prog_AWK
2276 if test -n "$AWK"; then
2277 { echo "$as_me:$LINENO: result: $AWK" >&5
2278 echo "${ECHO_T}$AWK" >&6; }
2279 else
2280 { echo "$as_me:$LINENO: result: no" >&5
2281 echo "${ECHO_T}no" >&6; }
2282 fi
2283
2284
2285 test -n "$AWK" && break
2286 done
2287
2288 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2289 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
2290 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2291 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
2292 echo $ECHO_N "(cached) $ECHO_C" >&6
2293 else
2294 cat >conftest.make <<\_ACEOF
2295 SHELL = /bin/sh
2296 all:
2297 @echo '@@@%%%=$(MAKE)=@@@%%%'
2298 _ACEOF
2299 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2300 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2301 *@@@%%%=?*=@@@%%%*)
2302 eval ac_cv_prog_make_${ac_make}_set=yes;;
2303 *)
2304 eval ac_cv_prog_make_${ac_make}_set=no;;
2305 esac
2306 rm -f conftest.make
2307 fi
2308 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2309 { echo "$as_me:$LINENO: result: yes" >&5
2310 echo "${ECHO_T}yes" >&6; }
2311 SET_MAKE=
2312 else
2313 { echo "$as_me:$LINENO: result: no" >&5
2314 echo "${ECHO_T}no" >&6; }
2315 SET_MAKE="MAKE=${MAKE-make}"
2316 fi
2317
2318 rm -rf .tst 2>/dev/null
2319 mkdir .tst 2>/dev/null
2320 if test -d .tst; then
2321 am__leading_dot=.
2322 else
2323 am__leading_dot=_
2324 fi
2325 rmdir .tst 2>/dev/null
2326
2327 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2328 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2329 # is not polluted with repeated "-I."
2330 am__isrc=' -I$(srcdir)'
2331 # test to see if srcdir already configured
2332 if test -f $srcdir/config.status; then
2333 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2334 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2335 { (exit 1); exit 1; }; }
2336 fi
2337 fi
2338
2339 # test whether we have cygpath
2340 if test -z "$CYGPATH_W"; then
2341 if (cygpath --version) >/dev/null 2>/dev/null; then
2342 CYGPATH_W='cygpath -w'
2343 else
2344 CYGPATH_W=echo
2345 fi
2346 fi
2347
2348
2349 # Define the identity of the package.
2350 PACKAGE='PolicyKit-gnome'
2351 VERSION='0.5'
2352
2353
2354 cat >>confdefs.h <<_ACEOF
2355 #define PACKAGE "$PACKAGE"
2356 _ACEOF
2357
2358
2359 cat >>confdefs.h <<_ACEOF
2360 #define VERSION "$VERSION"
2361 _ACEOF
2362
2363 # Some tools Automake needs.
2364
2365 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2366
2367
2368 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2369
2370
2371 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2372
2373
2374 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2375
2376
2377 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2378
2379 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
2380
2381 # Installed binaries are usually stripped using `strip' when the user
2382 # run `make install-strip'. However `strip' might not be the right
2383 # tool to use in cross-compilation environments, therefore Automake
2384 # will honor the `STRIP' environment variable to overrule this program.
2385 if test "$cross_compiling" != no; then
2386 if test -n "$ac_tool_prefix"; then
2387 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2388 set dummy ${ac_tool_prefix}strip; ac_word=$2
2389 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2390 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2391 if test "${ac_cv_prog_STRIP+set}" = set; then
2392 echo $ECHO_N "(cached) $ECHO_C" >&6
2393 else
2394 if test -n "$STRIP"; then
2395 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2396 else
2397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2398 for as_dir in $PATH
2399 do
2400 IFS=$as_save_IFS
2401 test -z "$as_dir" && as_dir=.
2402 for ac_exec_ext in '' $ac_executable_extensions; do
2403 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2404 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2405 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2406 break 2
2407 fi
2408 done
2409 done
2410 IFS=$as_save_IFS
2411
2412 fi
2413 fi
2414 STRIP=$ac_cv_prog_STRIP
2415 if test -n "$STRIP"; then
2416 { echo "$as_me:$LINENO: result: $STRIP" >&5
2417 echo "${ECHO_T}$STRIP" >&6; }
2418 else
2419 { echo "$as_me:$LINENO: result: no" >&5
2420 echo "${ECHO_T}no" >&6; }
2421 fi
2422
2423
2424 fi
2425 if test -z "$ac_cv_prog_STRIP"; then
2426 ac_ct_STRIP=$STRIP
2427 # Extract the first word of "strip", so it can be a program name with args.
2428 set dummy strip; ac_word=$2
2429 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2430 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2431 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2432 echo $ECHO_N "(cached) $ECHO_C" >&6
2433 else
2434 if test -n "$ac_ct_STRIP"; then
2435 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2436 else
2437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2438 for as_dir in $PATH
2439 do
2440 IFS=$as_save_IFS
2441 test -z "$as_dir" && as_dir=.
2442 for ac_exec_ext in '' $ac_executable_extensions; do
2443 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2444 ac_cv_prog_ac_ct_STRIP="strip"
2445 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2446 break 2
2447 fi
2448 done
2449 done
2450 IFS=$as_save_IFS
2451
2452 fi
2453 fi
2454 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2455 if test -n "$ac_ct_STRIP"; then
2456 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2457 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
2458 else
2459 { echo "$as_me:$LINENO: result: no" >&5
2460 echo "${ECHO_T}no" >&6; }
2461 fi
2462
2463 if test "x$ac_ct_STRIP" = x; then
2464 STRIP=":"
2465 else
2466 case $cross_compiling:$ac_tool_warned in
2467 yes:)
2468 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2469 whose name does not start with the host triplet. If you think this
2470 configuration is useful to you, please write to autoconf@gnu.org." >&5
2471 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2472 whose name does not start with the host triplet. If you think this
2473 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2474 ac_tool_warned=yes ;;
2475 esac
2476 STRIP=$ac_ct_STRIP
2477 fi
2478 else
2479 STRIP="$ac_cv_prog_STRIP"
2480 fi
2481
2482 fi
2483 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2484
2485 # We need awk for the "check" target. The system "awk" is bad on
2486 # some platforms.
2487 # Always define AMTAR for backward compatibility.
2488
2489 AMTAR=${AMTAR-"${am_missing_run}tar"}
2490
2491 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2492
2493
2494
2495
2496
2497
2498
2499 ac_config_headers="$ac_config_headers config.h"
2500
2501
2502 { echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
2503 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
2504 # Check whether --enable-maintainer-mode was given.
2505 if test "${enable_maintainer_mode+set}" = set; then
2506 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2507 else
2508 USE_MAINTAINER_MODE=no
2509 fi
2510
2511 { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
2512 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
2513 if test $USE_MAINTAINER_MODE = yes; then
2514 MAINTAINER_MODE_TRUE=
2515 MAINTAINER_MODE_FALSE='#'
2516 else
2517 MAINTAINER_MODE_TRUE='#'
2518 MAINTAINER_MODE_FALSE=
2519 fi
2520
2521 MAINT=$MAINTAINER_MODE_TRUE
2522
2523
2524
2525 ac_ext=c
2526 ac_cpp='$CPP $CPPFLAGS'
2527 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2528 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2529 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2530 if test -n "$ac_tool_prefix"; then
2531 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2532 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2533 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2535 if test "${ac_cv_prog_CC+set}" = set; then
2536 echo $ECHO_N "(cached) $ECHO_C" >&6
2537 else
2538 if test -n "$CC"; then
2539 ac_cv_prog_CC="$CC" # Let the user override the test.
2540 else
2541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2542 for as_dir in $PATH
2543 do
2544 IFS=$as_save_IFS
2545 test -z "$as_dir" && as_dir=.
2546 for ac_exec_ext in '' $ac_executable_extensions; do
2547 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2548 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2549 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2550 break 2
2551 fi
2552 done
2553 done
2554 IFS=$as_save_IFS
2555
2556 fi
2557 fi
2558 CC=$ac_cv_prog_CC
2559 if test -n "$CC"; then
2560 { echo "$as_me:$LINENO: result: $CC" >&5
2561 echo "${ECHO_T}$CC" >&6; }
2562 else
2563 { echo "$as_me:$LINENO: result: no" >&5
2564 echo "${ECHO_T}no" >&6; }
2565 fi
2566
2567
2568 fi
2569 if test -z "$ac_cv_prog_CC"; then
2570 ac_ct_CC=$CC
2571 # Extract the first word of "gcc", so it can be a program name with args.
2572 set dummy gcc; ac_word=$2
2573 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2575 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2576 echo $ECHO_N "(cached) $ECHO_C" >&6
2577 else
2578 if test -n "$ac_ct_CC"; then
2579 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2580 else
2581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2582 for as_dir in $PATH
2583 do
2584 IFS=$as_save_IFS
2585 test -z "$as_dir" && as_dir=.
2586 for ac_exec_ext in '' $ac_executable_extensions; do
2587 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2588 ac_cv_prog_ac_ct_CC="gcc"
2589 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2590 break 2
2591 fi
2592 done
2593 done
2594 IFS=$as_save_IFS
2595
2596 fi
2597 fi
2598 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2599 if test -n "$ac_ct_CC"; then
2600 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2601 echo "${ECHO_T}$ac_ct_CC" >&6; }
2602 else
2603 { echo "$as_me:$LINENO: result: no" >&5
2604 echo "${ECHO_T}no" >&6; }
2605 fi
2606
2607 if test "x$ac_ct_CC" = x; then
2608 CC=""
2609 else
2610 case $cross_compiling:$ac_tool_warned in
2611 yes:)
2612 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2613 whose name does not start with the host triplet. If you think this
2614 configuration is useful to you, please write to autoconf@gnu.org." >&5
2615 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2616 whose name does not start with the host triplet. If you think this
2617 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2618 ac_tool_warned=yes ;;
2619 esac
2620 CC=$ac_ct_CC
2621 fi
2622 else
2623 CC="$ac_cv_prog_CC"
2624 fi
2625
2626 if test -z "$CC"; then
2627 if test -n "$ac_tool_prefix"; then
2628 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2629 set dummy ${ac_tool_prefix}cc; ac_word=$2
2630 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2632 if test "${ac_cv_prog_CC+set}" = set; then
2633 echo $ECHO_N "(cached) $ECHO_C" >&6
2634 else
2635 if test -n "$CC"; then
2636 ac_cv_prog_CC="$CC" # Let the user override the test.
2637 else
2638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2639 for as_dir in $PATH
2640 do
2641 IFS=$as_save_IFS
2642 test -z "$as_dir" && as_dir=.
2643 for ac_exec_ext in '' $ac_executable_extensions; do
2644 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2645 ac_cv_prog_CC="${ac_tool_prefix}cc"
2646 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2647 break 2
2648 fi
2649 done
2650 done
2651 IFS=$as_save_IFS
2652
2653 fi
2654 fi
2655 CC=$ac_cv_prog_CC
2656 if test -n "$CC"; then
2657 { echo "$as_me:$LINENO: result: $CC" >&5
2658 echo "${ECHO_T}$CC" >&6; }
2659 else
2660 { echo "$as_me:$LINENO: result: no" >&5
2661 echo "${ECHO_T}no" >&6; }
2662 fi
2663
2664
2665 fi
2666 fi
2667 if test -z "$CC"; then
2668 # Extract the first word of "cc", so it can be a program name with args.
2669 set dummy cc; ac_word=$2
2670 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2672 if test "${ac_cv_prog_CC+set}" = set; then
2673 echo $ECHO_N "(cached) $ECHO_C" >&6
2674 else
2675 if test -n "$CC"; then
2676 ac_cv_prog_CC="$CC" # Let the user override the test.
2677 else
2678 ac_prog_rejected=no
2679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2680 for as_dir in $PATH
2681 do
2682 IFS=$as_save_IFS
2683 test -z "$as_dir" && as_dir=.
2684 for ac_exec_ext in '' $ac_executable_extensions; do
2685 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2686 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2687 ac_prog_rejected=yes
2688 continue
2689 fi
2690 ac_cv_prog_CC="cc"
2691 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2692 break 2
2693 fi
2694 done
2695 done
2696 IFS=$as_save_IFS
2697
2698 if test $ac_prog_rejected = yes; then
2699 # We found a bogon in the path, so make sure we never use it.
2700 set dummy $ac_cv_prog_CC
2701 shift
2702 if test $# != 0; then
2703 # We chose a different compiler from the bogus one.
2704 # However, it has the same basename, so the bogon will be chosen
2705 # first if we set CC to just the basename; use the full file name.
2706 shift
2707 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2708 fi
2709 fi
2710 fi
2711 fi
2712 CC=$ac_cv_prog_CC
2713 if test -n "$CC"; then
2714 { echo "$as_me:$LINENO: result: $CC" >&5
2715 echo "${ECHO_T}$CC" >&6; }
2716 else
2717 { echo "$as_me:$LINENO: result: no" >&5
2718 echo "${ECHO_T}no" >&6; }
2719 fi
2720
2721
2722 fi
2723 if test -z "$CC"; then
2724 if test -n "$ac_tool_prefix"; then
2725 for ac_prog in cl.exe
2726 do
2727 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2728 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2729 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2730 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2731 if test "${ac_cv_prog_CC+set}" = set; then
2732 echo $ECHO_N "(cached) $ECHO_C" >&6
2733 else
2734 if test -n "$CC"; then
2735 ac_cv_prog_CC="$CC" # Let the user override the test.
2736 else
2737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2738 for as_dir in $PATH
2739 do
2740 IFS=$as_save_IFS
2741 test -z "$as_dir" && as_dir=.
2742 for ac_exec_ext in '' $ac_executable_extensions; do
2743 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2744 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2745 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2746 break 2
2747 fi
2748 done
2749 done
2750 IFS=$as_save_IFS
2751
2752 fi
2753 fi
2754 CC=$ac_cv_prog_CC
2755 if test -n "$CC"; then
2756 { echo "$as_me:$LINENO: result: $CC" >&5
2757 echo "${ECHO_T}$CC" >&6; }
2758 else
2759 { echo "$as_me:$LINENO: result: no" >&5
2760 echo "${ECHO_T}no" >&6; }
2761 fi
2762
2763
2764 test -n "$CC" && break
2765 done
2766 fi
2767 if test -z "$CC"; then
2768 ac_ct_CC=$CC
2769 for ac_prog in cl.exe
2770 do
2771 # Extract the first word of "$ac_prog", so it can be a program name with args.
2772 set dummy $ac_prog; ac_word=$2
2773 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2775 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2776 echo $ECHO_N "(cached) $ECHO_C" >&6
2777 else
2778 if test -n "$ac_ct_CC"; then
2779 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2780 else
2781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2782 for as_dir in $PATH
2783 do
2784 IFS=$as_save_IFS
2785 test -z "$as_dir" && as_dir=.
2786 for ac_exec_ext in '' $ac_executable_extensions; do
2787 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2788 ac_cv_prog_ac_ct_CC="$ac_prog"
2789 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2790 break 2
2791 fi
2792 done
2793 done
2794 IFS=$as_save_IFS
2795
2796 fi
2797 fi
2798 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2799 if test -n "$ac_ct_CC"; then
2800 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2801 echo "${ECHO_T}$ac_ct_CC" >&6; }
2802 else
2803 { echo "$as_me:$LINENO: result: no" >&5
2804 echo "${ECHO_T}no" >&6; }
2805 fi
2806
2807
2808 test -n "$ac_ct_CC" && break
2809 done
2810
2811 if test "x$ac_ct_CC" = x; then
2812 CC=""
2813 else
2814 case $cross_compiling:$ac_tool_warned in
2815 yes:)
2816 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2817 whose name does not start with the host triplet. If you think this
2818 configuration is useful to you, please write to autoconf@gnu.org." >&5
2819 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2820 whose name does not start with the host triplet. If you think this
2821 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2822 ac_tool_warned=yes ;;
2823 esac
2824 CC=$ac_ct_CC
2825 fi
2826 fi
2827
2828 fi
2829
2830
2831 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2832 See \`config.log' for more details." >&5
2833 echo "$as_me: error: no acceptable C compiler found in \$PATH
2834 See \`config.log' for more details." >&2;}
2835 { (exit 1); exit 1; }; }
2836
2837 # Provide some information about the compiler.
2838 echo "$as_me:$LINENO: checking for C compiler version" >&5
2839 ac_compiler=`set X $ac_compile; echo $2`
2840 { (ac_try="$ac_compiler --version >&5"
2841 case "(($ac_try" in
2842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2843 *) ac_try_echo=$ac_try;;
2844 esac
2845 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2846 (eval "$ac_compiler --version >&5") 2>&5
2847 ac_status=$?
2848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2849 (exit $ac_status); }
2850 { (ac_try="$ac_compiler -v >&5"
2851 case "(($ac_try" in
2852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2853 *) ac_try_echo=$ac_try;;
2854 esac
2855 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2856 (eval "$ac_compiler -v >&5") 2>&5
2857 ac_status=$?
2858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2859 (exit $ac_status); }
2860 { (ac_try="$ac_compiler -V >&5"
2861 case "(($ac_try" in
2862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2863 *) ac_try_echo=$ac_try;;
2864 esac
2865 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2866 (eval "$ac_compiler -V >&5") 2>&5
2867 ac_status=$?
2868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2869 (exit $ac_status); }
2870
2871 cat >conftest.$ac_ext <<_ACEOF
2872 /* confdefs.h. */
2873 _ACEOF
2874 cat confdefs.h >>conftest.$ac_ext
2875 cat >>conftest.$ac_ext <<_ACEOF
2876 /* end confdefs.h. */
2877
2878 int
2879 main ()
2880 {
2881
2882 ;
2883 return 0;
2884 }
2885 _ACEOF
2886 ac_clean_files_save=$ac_clean_files
2887 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2888 # Try to create an executable without -o first, disregard a.out.
2889 # It will help us diagnose broken compilers, and finding out an intuition
2890 # of exeext.
2891 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2892 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2893 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2894 #
2895 # List of possible output files, starting from the most likely.
2896 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2897 # only as a last resort. b.out is created by i960 compilers.
2898 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2899 #
2900 # The IRIX 6 linker writes into existing files which may not be
2901 # executable, retaining their permissions. Remove them first so a
2902 # subsequent execution test works.
2903 ac_rmfiles=
2904 for ac_file in $ac_files
2905 do
2906 case $ac_file in
2907 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2908 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2909 esac
2910 done
2911 rm -f $ac_rmfiles
2912
2913 if { (ac_try="$ac_link_default"
2914 case "(($ac_try" in
2915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2916 *) ac_try_echo=$ac_try;;
2917 esac
2918 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2919 (eval "$ac_link_default") 2>&5
2920 ac_status=$?
2921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2922 (exit $ac_status); }; then
2923 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2924 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2925 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2926 # so that the user can short-circuit this test for compilers unknown to
2927 # Autoconf.
2928 for ac_file in $ac_files ''
2929 do
2930 test -f "$ac_file" || continue
2931 case $ac_file in
2932 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2933 ;;
2934 [ab].out )
2935 # We found the default executable, but exeext='' is most
2936 # certainly right.
2937 break;;
2938 *.* )
2939 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2940 then :; else
2941 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2942 fi
2943 # We set ac_cv_exeext here because the later test for it is not
2944 # safe: cross compilers may not add the suffix if given an `-o'
2945 # argument, so we may need to know it at that point already.
2946 # Even if this section looks crufty: it has the advantage of
2947 # actually working.
2948 break;;
2949 * )
2950 break;;
2951 esac
2952 done
2953 test "$ac_cv_exeext" = no && ac_cv_exeext=
2954
2955 else
2956 ac_file=''
2957 fi
2958
2959 { echo "$as_me:$LINENO: result: $ac_file" >&5
2960 echo "${ECHO_T}$ac_file" >&6; }
2961 if test -z "$ac_file"; then
2962 echo "$as_me: failed program was:" >&5
2963 sed 's/^/| /' conftest.$ac_ext >&5
2964
2965 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2966 See \`config.log' for more details." >&5
2967 echo "$as_me: error: C compiler cannot create executables
2968 See \`config.log' for more details." >&2;}
2969 { (exit 77); exit 77; }; }
2970 fi
2971
2972 ac_exeext=$ac_cv_exeext
2973
2974 # Check that the compiler produces executables we can run. If not, either
2975 # the compiler is broken, or we cross compile.
2976 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2977 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2978 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2979 # If not cross compiling, check that we can run a simple program.
2980 if test "$cross_compiling" != yes; then
2981 if { ac_try='./$ac_file'
2982 { (case "(($ac_try" in
2983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2984 *) ac_try_echo=$ac_try;;
2985 esac
2986 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2987 (eval "$ac_try") 2>&5
2988 ac_status=$?
2989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990 (exit $ac_status); }; }; then
2991 cross_compiling=no
2992 else
2993 if test "$cross_compiling" = maybe; then
2994 cross_compiling=yes
2995 else
2996 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2997 If you meant to cross compile, use \`--host'.
2998 See \`config.log' for more details." >&5
2999 echo "$as_me: error: cannot run C compiled programs.
3000 If you meant to cross compile, use \`--host'.
3001 See \`config.log' for more details." >&2;}
3002 { (exit 1); exit 1; }; }
3003 fi
3004 fi
3005 fi
3006 { echo "$as_me:$LINENO: result: yes" >&5
3007 echo "${ECHO_T}yes" >&6; }
3008
3009 rm -f a.out a.exe conftest$ac_cv_exeext b.out
3010 ac_clean_files=$ac_clean_files_save
3011 # Check that the compiler produces executables we can run. If not, either
3012 # the compiler is broken, or we cross compile.
3013 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3014 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3015 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
3016 echo "${ECHO_T}$cross_compiling" >&6; }
3017
3018 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
3019 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3020 if { (ac_try="$ac_link"
3021 case "(($ac_try" in
3022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3023 *) ac_try_echo=$ac_try;;
3024 esac
3025 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3026 (eval "$ac_link") 2>&5
3027 ac_status=$?
3028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3029 (exit $ac_status); }; then
3030 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3031 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3032 # work properly (i.e., refer to `conftest.exe'), while it won't with
3033 # `rm'.
3034 for ac_file in conftest.exe conftest conftest.*; do
3035 test -f "$ac_file" || continue
3036 case $ac_file in
3037 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3038 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3039 break;;
3040 * ) break;;
3041 esac
3042 done
3043 else
3044 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3045 See \`config.log' for more details." >&5
3046 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3047 See \`config.log' for more details." >&2;}
3048 { (exit 1); exit 1; }; }
3049 fi
3050
3051 rm -f conftest$ac_cv_exeext
3052 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3053 echo "${ECHO_T}$ac_cv_exeext" >&6; }
3054
3055 rm -f conftest.$ac_ext
3056 EXEEXT=$ac_cv_exeext
3057 ac_exeext=$EXEEXT
3058 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
3059 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
3060 if test "${ac_cv_objext+set}" = set; then
3061 echo $ECHO_N "(cached) $ECHO_C" >&6
3062 else
3063 cat >conftest.$ac_ext <<_ACEOF
3064 /* confdefs.h. */
3065 _ACEOF
3066 cat confdefs.h >>conftest.$ac_ext
3067 cat >>conftest.$ac_ext <<_ACEOF
3068 /* end confdefs.h. */
3069
3070 int
3071 main ()
3072 {
3073
3074 ;
3075 return 0;
3076 }
3077 _ACEOF
3078 rm -f conftest.o conftest.obj
3079 if { (ac_try="$ac_compile"
3080 case "(($ac_try" in
3081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3082 *) ac_try_echo=$ac_try;;
3083 esac
3084 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3085 (eval "$ac_compile") 2>&5
3086 ac_status=$?
3087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3088 (exit $ac_status); }; then
3089 for ac_file in conftest.o conftest.obj conftest.*; do
3090 test -f "$ac_file" || continue;
3091 case $ac_file in
3092 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
3093 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3094 break;;
3095 esac
3096 done
3097 else
3098 echo "$as_me: failed program was:" >&5
3099 sed 's/^/| /' conftest.$ac_ext >&5
3100
3101 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3102 See \`config.log' for more details." >&5
3103 echo "$as_me: error: cannot compute suffix of object files: cannot compile
3104 See \`config.log' for more details." >&2;}
3105 { (exit 1); exit 1; }; }
3106 fi
3107
3108 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3109 fi
3110 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3111 echo "${ECHO_T}$ac_cv_objext" >&6; }
3112 OBJEXT=$ac_cv_objext
3113 ac_objext=$OBJEXT
3114 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3115 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
3116 if test "${ac_cv_c_compiler_gnu+set}" = set; then
3117 echo $ECHO_N "(cached) $ECHO_C" >&6
3118 else
3119 cat >conftest.$ac_ext <<_ACEOF
3120 /* confdefs.h. */
3121 _ACEOF
3122 cat confdefs.h >>conftest.$ac_ext
3123 cat >>conftest.$ac_ext <<_ACEOF
3124 /* end confdefs.h. */
3125
3126 int
3127 main ()
3128 {
3129 #ifndef __GNUC__
3130 choke me
3131 #endif
3132
3133 ;
3134 return 0;
3135 }
3136 _ACEOF
3137 rm -f conftest.$ac_objext
3138 if { (ac_try="$ac_compile"
3139 case "(($ac_try" in
3140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3141 *) ac_try_echo=$ac_try;;
3142 esac
3143 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3144 (eval "$ac_compile") 2>conftest.er1
3145 ac_status=$?
3146 grep -v '^ *+' conftest.er1 >conftest.err
3147 rm -f conftest.er1
3148 cat conftest.err >&5
3149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3150 (exit $ac_status); } && {
3151 test -z "$ac_c_werror_flag" ||
3152 test ! -s conftest.err
3153 } && test -s conftest.$ac_objext; then
3154 ac_compiler_gnu=yes
3155 else
3156 echo "$as_me: failed program was:" >&5
3157 sed 's/^/| /' conftest.$ac_ext >&5
3158
3159 ac_compiler_gnu=no
3160 fi
3161
3162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3163 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3164
3165 fi
3166 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3167 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3168 GCC=`test $ac_compiler_gnu = yes && echo yes`
3169 ac_test_CFLAGS=${CFLAGS+set}
3170 ac_save_CFLAGS=$CFLAGS
3171 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3172 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
3173 if test "${ac_cv_prog_cc_g+set}" = set; then
3174 echo $ECHO_N "(cached) $ECHO_C" >&6
3175 else
3176 ac_save_c_werror_flag=$ac_c_werror_flag
3177 ac_c_werror_flag=yes
3178 ac_cv_prog_cc_g=no
3179 CFLAGS="-g"
3180 cat >conftest.$ac_ext <<_ACEOF
3181 /* confdefs.h. */
3182 _ACEOF
3183 cat confdefs.h >>conftest.$ac_ext
3184 cat >>conftest.$ac_ext <<_ACEOF
3185 /* end confdefs.h. */
3186
3187 int
3188 main ()
3189 {
3190
3191 ;
3192 return 0;
3193 }
3194 _ACEOF
3195 rm -f conftest.$ac_objext
3196 if { (ac_try="$ac_compile"
3197 case "(($ac_try" in
3198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3199 *) ac_try_echo=$ac_try;;
3200 esac
3201 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3202 (eval "$ac_compile") 2>conftest.er1
3203 ac_status=$?
3204 grep -v '^ *+' conftest.er1 >conftest.err
3205 rm -f conftest.er1
3206 cat conftest.err >&5
3207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3208 (exit $ac_status); } && {
3209 test -z "$ac_c_werror_flag" ||
3210 test ! -s conftest.err
3211 } && test -s conftest.$ac_objext; then
3212 ac_cv_prog_cc_g=yes
3213 else
3214 echo "$as_me: failed program was:" >&5
3215 sed 's/^/| /' conftest.$ac_ext >&5
3216
3217 CFLAGS=""
3218 cat >conftest.$ac_ext <<_ACEOF
3219 /* confdefs.h. */
3220 _ACEOF
3221 cat confdefs.h >>conftest.$ac_ext
3222 cat >>conftest.$ac_ext <<_ACEOF
3223 /* end confdefs.h. */
3224
3225 int
3226 main ()
3227 {
3228
3229 ;
3230 return 0;
3231 }
3232 _ACEOF
3233 rm -f conftest.$ac_objext
3234 if { (ac_try="$ac_compile"
3235 case "(($ac_try" in
3236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3237 *) ac_try_echo=$ac_try;;
3238 esac
3239 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3240 (eval "$ac_compile") 2>conftest.er1
3241 ac_status=$?
3242 grep -v '^ *+' conftest.er1 >conftest.err
3243 rm -f conftest.er1
3244 cat conftest.err >&5
3245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3246 (exit $ac_status); } && {
3247 test -z "$ac_c_werror_flag" ||
3248 test ! -s conftest.err
3249 } && test -s conftest.$ac_objext; then
3250 :
3251 else
3252 echo "$as_me: failed program was:" >&5
3253 sed 's/^/| /' conftest.$ac_ext >&5
3254
3255 ac_c_werror_flag=$ac_save_c_werror_flag
3256 CFLAGS="-g"
3257 cat >conftest.$ac_ext <<_ACEOF
3258 /* confdefs.h. */
3259 _ACEOF
3260 cat confdefs.h >>conftest.$ac_ext
3261 cat >>conftest.$ac_ext <<_ACEOF
3262 /* end confdefs.h. */
3263
3264 int
3265 main ()
3266 {
3267
3268 ;
3269 return 0;
3270 }
3271 _ACEOF
3272 rm -f conftest.$ac_objext
3273 if { (ac_try="$ac_compile"
3274 case "(($ac_try" in
3275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3276 *) ac_try_echo=$ac_try;;
3277 esac
3278 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3279 (eval "$ac_compile") 2>conftest.er1
3280 ac_status=$?
3281 grep -v '^ *+' conftest.er1 >conftest.err
3282 rm -f conftest.er1
3283 cat conftest.err >&5
3284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3285 (exit $ac_status); } && {
3286 test -z "$ac_c_werror_flag" ||
3287 test ! -s conftest.err
3288 } && test -s conftest.$ac_objext; then
3289 ac_cv_prog_cc_g=yes
3290 else
3291 echo "$as_me: failed program was:" >&5
3292 sed 's/^/| /' conftest.$ac_ext >&5
3293
3294
3295 fi
3296
3297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3298 fi
3299
3300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3301 fi
3302
3303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3304 ac_c_werror_flag=$ac_save_c_werror_flag
3305 fi
3306 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3307 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3308 if test "$ac_test_CFLAGS" = set; then
3309 CFLAGS=$ac_save_CFLAGS
3310 elif test $ac_cv_prog_cc_g = yes; then
3311 if test "$GCC" = yes; then
3312 CFLAGS="-g -O2"
3313 else
3314 CFLAGS="-g"
3315 fi
3316 else
3317 if test "$GCC" = yes; then
3318 CFLAGS="-O2"
3319 else
3320 CFLAGS=
3321 fi
3322 fi
3323 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3324 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3325 if test "${ac_cv_prog_cc_c89+set}" = set; then
3326 echo $ECHO_N "(cached) $ECHO_C" >&6
3327 else
3328 ac_cv_prog_cc_c89=no
3329 ac_save_CC=$CC
3330 cat >conftest.$ac_ext <<_ACEOF
3331 /* confdefs.h. */
3332 _ACEOF
3333 cat confdefs.h >>conftest.$ac_ext
3334 cat >>conftest.$ac_ext <<_ACEOF
3335 /* end confdefs.h. */
3336 #include <stdarg.h>
3337 #include <stdio.h>
3338 #include <sys/types.h>
3339 #include <sys/stat.h>
3340 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3341 struct buf { int x; };
3342 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3343 static char *e (p, i)
3344 char **p;
3345 int i;
3346 {
3347 return p[i];
3348 }
3349 static char *f (char * (*g) (char **, int), char **p, ...)
3350 {
3351 char *s;
3352 va_list v;
3353 va_start (v,p);
3354 s = g (p, va_arg (v,int));
3355 va_end (v);
3356 return s;
3357 }
3358
3359 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3360 function prototypes and stuff, but not '\xHH' hex character constants.
3361 These don't provoke an error unfortunately, instead are silently treated
3362 as 'x'. The following induces an error, until -std is added to get
3363 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3364 array size at least. It's necessary to write '\x00'==0 to get something
3365 that's true only with -std. */
3366 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3367
3368 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3369 inside strings and character constants. */
3370 #define FOO(x) 'x'
3371 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3372
3373 int test (int i, double x);
3374 struct s1 {int (*f) (int a);};
3375 struct s2 {int (*f) (double a);};
3376 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3377 int argc;
3378 char **argv;
3379 int
3380 main ()
3381 {
3382 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3383 ;
3384 return 0;
3385 }
3386 _ACEOF
3387 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3388 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3389 do
3390 CC="$ac_save_CC $ac_arg"
3391 rm -f conftest.$ac_objext
3392 if { (ac_try="$ac_compile"
3393 case "(($ac_try" in
3394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3395 *) ac_try_echo=$ac_try;;
3396 esac
3397 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3398 (eval "$ac_compile") 2>conftest.er1
3399 ac_status=$?
3400 grep -v '^ *+' conftest.er1 >conftest.err
3401 rm -f conftest.er1
3402 cat conftest.err >&5
3403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3404 (exit $ac_status); } && {
3405 test -z "$ac_c_werror_flag" ||
3406 test ! -s conftest.err
3407 } && test -s conftest.$ac_objext; then
3408 ac_cv_prog_cc_c89=$ac_arg
3409 else
3410 echo "$as_me: failed program was:" >&5
3411 sed 's/^/| /' conftest.$ac_ext >&5
3412
3413
3414 fi
3415
3416 rm -f core conftest.err conftest.$ac_objext
3417 test "x$ac_cv_prog_cc_c89" != "xno" && break
3418 done
3419 rm -f conftest.$ac_ext
3420 CC=$ac_save_CC
3421
3422 fi
3423 # AC_CACHE_VAL
3424 case "x$ac_cv_prog_cc_c89" in
3425 x)
3426 { echo "$as_me:$LINENO: result: none needed" >&5
3427 echo "${ECHO_T}none needed" >&6; } ;;
3428 xno)
3429 { echo "$as_me:$LINENO: result: unsupported" >&5
3430 echo "${ECHO_T}unsupported" >&6; } ;;
3431 *)
3432 CC="$CC $ac_cv_prog_cc_c89"
3433 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3434 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3435 esac
3436
3437
3438 ac_ext=c
3439 ac_cpp='$CPP $CPPFLAGS'
3440 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3441 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3442 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3443 DEPDIR="${am__leading_dot}deps"
3444
3445 ac_config_commands="$ac_config_commands depfiles"
3446
3447
3448 am_make=${MAKE-make}
3449 cat > confinc << 'END'
3450 am__doit:
3451 @echo done
3452 .PHONY: am__doit
3453 END
3454 # If we don't find an include directive, just comment out the code.
3455 { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
3456 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
3457 am__include="#"
3458 am__quote=
3459 _am_result=none
3460 # First try GNU make style include.
3461 echo "include confinc" > confmf
3462 # We grep out `Entering directory' and `Leaving directory'
3463 # messages which can occur if `w' ends up in MAKEFLAGS.
3464 # In particular we don't look at `^make:' because GNU make might
3465 # be invoked under some other name (usually "gmake"), in which
3466 # case it prints its new name instead of `make'.
3467 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
3468 am__include=include
3469 am__quote=
3470 _am_result=GNU
3471 fi
3472 # Now try BSD make style include.
3473 if test "$am__include" = "#"; then
3474 echo '.include "confinc"' > confmf
3475 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
3476 am__include=.include
3477 am__quote="\""
3478 _am_result=BSD
3479 fi
3480 fi
3481
3482
3483 { echo "$as_me:$LINENO: result: $_am_result" >&5
3484 echo "${ECHO_T}$_am_result" >&6; }
3485 rm -f confinc confmf
3486
3487 # Check whether --enable-dependency-tracking was given.
3488 if test "${enable_dependency_tracking+set}" = set; then
3489 enableval=$enable_dependency_tracking;
3490 fi
3491
3492 if test "x$enable_dependency_tracking" != xno; then
3493 am_depcomp="$ac_aux_dir/depcomp"
3494 AMDEPBACKSLASH='\'
3495 fi
3496 if test "x$enable_dependency_tracking" != xno; then
3497 AMDEP_TRUE=
3498 AMDEP_FALSE='#'
3499 else
3500 AMDEP_TRUE='#'
3501 AMDEP_FALSE=
3502 fi
3503
3504
3505
3506 depcc="$CC" am_compiler_list=
3507
3508 { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3509 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
3510 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3511 echo $ECHO_N "(cached) $ECHO_C" >&6
3512 else
3513 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3514 # We make a subdir and do the tests there. Otherwise we can end up
3515 # making bogus files that we don't know about and never remove. For
3516 # instance it was reported that on HP-UX the gcc test will end up
3517 # making a dummy file named `D' -- because `-MD' means `put the output
3518 # in D'.
3519 mkdir conftest.dir
3520 # Copy depcomp to subdir because otherwise we won't find it if we're
3521 # using a relative directory.
3522 cp "$am_depcomp" conftest.dir
3523 cd conftest.dir
3524 # We will build objects and dependencies in a subdirectory because
3525 # it helps to detect inapplicable dependency modes. For instance
3526 # both Tru64's cc and ICC support -MD to output dependencies as a
3527 # side effect of compilation, but ICC will put the dependencies in
3528 # the current directory while Tru64 will put them in the object
3529 # directory.
3530 mkdir sub
3531
3532 am_cv_CC_dependencies_compiler_type=none
3533 if test "$am_compiler_list" = ""; then
3534 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3535 fi
3536 for depmode in $am_compiler_list; do
3537 # Setup a source with many dependencies, because some compilers
3538 # like to wrap large dependency lists on column 80 (with \), and
3539 # we should not choose a depcomp mode which is confused by this.
3540 #
3541 # We need to recreate these files for each test, as the compiler may
3542 # overwrite some of them when testing with obscure command lines.
3543 # This happens at least with the AIX C compiler.
3544 : > sub/conftest.c
3545 for i in 1 2 3 4 5 6; do
3546 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3547 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3548 # Solaris 8's {/usr,}/bin/sh.
3549 touch sub/conftst$i.h
3550 done
3551 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3552
3553 case $depmode in
3554 nosideeffect)
3555 # after this tag, mechanisms are not by side-effect, so they'll
3556 # only be used when explicitly requested
3557 if test "x$enable_dependency_tracking" = xyes; then
3558 continue
3559 else
3560 break
3561 fi
3562 ;;
3563 none) break ;;
3564 esac
3565 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3566 # mode. It turns out that the SunPro C++ compiler does not properly
3567 # handle `-M -o', and we need to detect this.
3568 if depmode=$depmode \
3569 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3570 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3571 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
3572 >/dev/null 2>conftest.err &&
3573 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3574 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3575 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
3576 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3577 # icc doesn't choke on unknown options, it will just issue warnings
3578 # or remarks (even with -Werror). So we grep stderr for any message
3579 # that says an option was ignored or not supported.
3580 # When given -MP, icc 7.0 and 7.1 complain thusly:
3581 # icc: Command line warning: ignoring option '-M'; no argument required
3582 # The diagnosis changed in icc 8.0:
3583 # icc: Command line remark: option '-MP' not supported
3584 if (grep 'ignoring option' conftest.err ||
3585 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3586 am_cv_CC_dependencies_compiler_type=$depmode
3587 break
3588 fi
3589 fi
3590 done
3591
3592 cd ..
3593 rm -rf conftest.dir
3594 else
3595 am_cv_CC_dependencies_compiler_type=none
3596 fi
3597
3598 fi
3599 { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3600 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
3601 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3602
3603 if
3604 test "x$enable_dependency_tracking" != xno \
3605 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
3606 am__fastdepCC_TRUE=
3607 am__fastdepCC_FALSE='#'
3608 else
3609 am__fastdepCC_TRUE='#'
3610 am__fastdepCC_FALSE=
3611 fi
3612
3613
3614
3615 { echo "$as_me:$LINENO: checking for library containing strerror" >&5
3616 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; }
3617 if test "${ac_cv_search_strerror+set}" = set; then
3618 echo $ECHO_N "(cached) $ECHO_C" >&6
3619 else
3620 ac_func_search_save_LIBS=$LIBS
3621 cat >conftest.$ac_ext <<_ACEOF
3622 /* confdefs.h. */
3623 _ACEOF
3624 cat confdefs.h >>conftest.$ac_ext
3625 cat >>conftest.$ac_ext <<_ACEOF
3626 /* end confdefs.h. */
3627
3628 /* Override any GCC internal prototype to avoid an error.
3629 Use char because int might match the return type of a GCC
3630 builtin and then its argument prototype would still apply. */
3631 #ifdef __cplusplus
3632 extern "C"
3633 #endif
3634 char strerror ();
3635 int
3636 main ()
3637 {
3638 return strerror ();
3639 ;
3640 return 0;
3641 }
3642 _ACEOF
3643 for ac_lib in '' cposix; do
3644 if test -z "$ac_lib"; then
3645 ac_res="none required"
3646 else
3647 ac_res=-l$ac_lib
3648 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
3649 fi
3650 rm -f conftest.$ac_objext conftest$ac_exeext
3651 if { (ac_try="$ac_link"
3652 case "(($ac_try" in
3653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3654 *) ac_try_echo=$ac_try;;
3655 esac
3656 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3657 (eval "$ac_link") 2>conftest.er1
3658 ac_status=$?
3659 grep -v '^ *+' conftest.er1 >conftest.err
3660 rm -f conftest.er1
3661 cat conftest.err >&5
3662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3663 (exit $ac_status); } && {
3664 test -z "$ac_c_werror_flag" ||
3665 test ! -s conftest.err
3666 } && test -s conftest$ac_exeext &&
3667 $as_test_x conftest$ac_exeext; then
3668 ac_cv_search_strerror=$ac_res
3669 else
3670 echo "$as_me: failed program was:" >&5
3671 sed 's/^/| /' conftest.$ac_ext >&5
3672
3673
3674 fi
3675
3676 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3677 conftest$ac_exeext
3678 if test "${ac_cv_search_strerror+set}" = set; then
3679 break
3680 fi
3681 done
3682 if test "${ac_cv_search_strerror+set}" = set; then
3683 :
3684 else
3685 ac_cv_search_strerror=no
3686 fi
3687 rm conftest.$ac_ext
3688 LIBS=$ac_func_search_save_LIBS
3689 fi
3690 { echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
3691 echo "${ECHO_T}$ac_cv_search_strerror" >&6; }
3692 ac_res=$ac_cv_search_strerror
3693 if test "$ac_res" != no; then
3694 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
3695
3696 fi
3697
3698 ac_ext=c
3699 ac_cpp='$CPP $CPPFLAGS'
3700 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3701 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3702 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3703 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3704 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3705 # On Suns, sometimes $CPP names a directory.
3706 if test -n "$CPP" && test -d "$CPP"; then
3707 CPP=
3708 fi
3709 if test -z "$CPP"; then
3710 if test "${ac_cv_prog_CPP+set}" = set; then
3711 echo $ECHO_N "(cached) $ECHO_C" >&6
3712 else
3713 # Double quotes because CPP needs to be expanded
3714 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3715 do
3716 ac_preproc_ok=false
3717 for ac_c_preproc_warn_flag in '' yes
3718 do
3719 # Use a header file that comes with gcc, so configuring glibc
3720 # with a fresh cross-compiler works.
3721 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3722 # <limits.h> exists even on freestanding compilers.
3723 # On the NeXT, cc -E runs the code through the compiler's parser,
3724 # not just through cpp. "Syntax error" is here to catch this case.
3725 cat >conftest.$ac_ext <<_ACEOF
3726 /* confdefs.h. */
3727 _ACEOF
3728 cat confdefs.h >>conftest.$ac_ext
3729 cat >>conftest.$ac_ext <<_ACEOF
3730 /* end confdefs.h. */
3731 #ifdef __STDC__
3732 # include <limits.h>
3733 #else
3734 # include <assert.h>
3735 #endif
3736 Syntax error
3737 _ACEOF
3738 if { (ac_try="$ac_cpp conftest.$ac_ext"
3739 case "(($ac_try" in
3740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3741 *) ac_try_echo=$ac_try;;
3742 esac
3743 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3744 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3745 ac_status=$?
3746 grep -v '^ *+' conftest.er1 >conftest.err
3747 rm -f conftest.er1
3748 cat conftest.err >&5
3749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3750 (exit $ac_status); } >/dev/null && {
3751 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3752 test ! -s conftest.err
3753 }; then
3754 :
3755 else
3756 echo "$as_me: failed program was:" >&5
3757 sed 's/^/| /' conftest.$ac_ext >&5
3758
3759 # Broken: fails on valid input.
3760 continue
3761 fi
3762
3763 rm -f conftest.err conftest.$ac_ext
3764
3765 # OK, works on sane cases. Now check whether nonexistent headers
3766 # can be detected and how.
3767 cat >conftest.$ac_ext <<_ACEOF
3768 /* confdefs.h. */
3769 _ACEOF
3770 cat confdefs.h >>conftest.$ac_ext
3771 cat >>conftest.$ac_ext <<_ACEOF
3772 /* end confdefs.h. */
3773 #include <ac_nonexistent.h>
3774 _ACEOF
3775 if { (ac_try="$ac_cpp conftest.$ac_ext"
3776 case "(($ac_try" in
3777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3778 *) ac_try_echo=$ac_try;;
3779 esac
3780 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3781 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3782 ac_status=$?
3783 grep -v '^ *+' conftest.er1 >conftest.err
3784 rm -f conftest.er1
3785 cat conftest.err >&5
3786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3787 (exit $ac_status); } >/dev/null && {
3788 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3789 test ! -s conftest.err
3790 }; then
3791 # Broken: success on invalid input.
3792 continue
3793 else
3794 echo "$as_me: failed program was:" >&5
3795 sed 's/^/| /' conftest.$ac_ext >&5
3796
3797 # Passes both tests.
3798 ac_preproc_ok=:
3799 break
3800 fi
3801
3802 rm -f conftest.err conftest.$ac_ext
3803
3804 done
3805 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3806 rm -f conftest.err conftest.$ac_ext
3807 if $ac_preproc_ok; then
3808 break
3809 fi
3810
3811 done
3812 ac_cv_prog_CPP=$CPP
3813
3814 fi
3815 CPP=$ac_cv_prog_CPP
3816 else
3817 ac_cv_prog_CPP=$CPP
3818 fi
3819 { echo "$as_me:$LINENO: result: $CPP" >&5
3820 echo "${ECHO_T}$CPP" >&6; }
3821 ac_preproc_ok=false
3822 for ac_c_preproc_warn_flag in '' yes
3823 do
3824 # Use a header file that comes with gcc, so configuring glibc
3825 # with a fresh cross-compiler works.
3826 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3827 # <limits.h> exists even on freestanding compilers.
3828 # On the NeXT, cc -E runs the code through the compiler's parser,
3829 # not just through cpp. "Syntax error" is here to catch this case.
3830 cat >conftest.$ac_ext <<_ACEOF
3831 /* confdefs.h. */
3832 _ACEOF
3833 cat confdefs.h >>conftest.$ac_ext
3834 cat >>conftest.$ac_ext <<_ACEOF
3835 /* end confdefs.h. */
3836 #ifdef __STDC__
3837 # include <limits.h>
3838 #else
3839 # include <assert.h>
3840 #endif
3841 Syntax error
3842 _ACEOF
3843 if { (ac_try="$ac_cpp conftest.$ac_ext"
3844 case "(($ac_try" in
3845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3846 *) ac_try_echo=$ac_try;;
3847 esac
3848 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3849 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3850 ac_status=$?
3851 grep -v '^ *+' conftest.er1 >conftest.err
3852 rm -f conftest.er1
3853 cat conftest.err >&5
3854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3855 (exit $ac_status); } >/dev/null && {
3856 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3857 test ! -s conftest.err
3858 }; then
3859 :
3860 else
3861 echo "$as_me: failed program was:" >&5
3862 sed 's/^/| /' conftest.$ac_ext >&5
3863
3864 # Broken: fails on valid input.
3865 continue
3866 fi
3867
3868 rm -f conftest.err conftest.$ac_ext
3869
3870 # OK, works on sane cases. Now check whether nonexistent headers
3871 # can be detected and how.
3872 cat >conftest.$ac_ext <<_ACEOF
3873 /* confdefs.h. */
3874 _ACEOF
3875 cat confdefs.h >>conftest.$ac_ext
3876 cat >>conftest.$ac_ext <<_ACEOF
3877 /* end confdefs.h. */
3878 #include <ac_nonexistent.h>
3879 _ACEOF
3880 if { (ac_try="$ac_cpp conftest.$ac_ext"
3881 case "(($ac_try" in
3882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3883 *) ac_try_echo=$ac_try;;
3884 esac
3885 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3886 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3887 ac_status=$?
3888 grep -v '^ *+' conftest.er1 >conftest.err
3889 rm -f conftest.er1
3890 cat conftest.err >&5
3891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3892 (exit $ac_status); } >/dev/null && {
3893 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3894 test ! -s conftest.err
3895 }; then
3896 # Broken: success on invalid input.
3897 continue
3898 else
3899 echo "$as_me: failed program was:" >&5
3900 sed 's/^/| /' conftest.$ac_ext >&5
3901
3902 # Passes both tests.
3903 ac_preproc_ok=:
3904 break
3905 fi
3906
3907 rm -f conftest.err conftest.$ac_ext
3908
3909 done
3910 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3911 rm -f conftest.err conftest.$ac_ext
3912 if $ac_preproc_ok; then
3913 :
3914 else
3915 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3916 See \`config.log' for more details." >&5
3917 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3918 See \`config.log' for more details." >&2;}
3919 { (exit 1); exit 1; }; }
3920 fi
3921
3922 ac_ext=c
3923 ac_cpp='$CPP $CPPFLAGS'
3924 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3925 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3926 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3927
3928
3929 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3930 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3931 if test "${ac_cv_path_GREP+set}" = set; then
3932 echo $ECHO_N "(cached) $ECHO_C" >&6
3933 else
3934 # Extract the first word of "grep ggrep" to use in msg output
3935 if test -z "$GREP"; then
3936 set dummy grep ggrep; ac_prog_name=$2
3937 if test "${ac_cv_path_GREP+set}" = set; then
3938 echo $ECHO_N "(cached) $ECHO_C" >&6
3939 else
3940 ac_path_GREP_found=false
3941 # Loop through the user's path and test for each of PROGNAME-LIST
3942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3943 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3944 do
3945 IFS=$as_save_IFS
3946 test -z "$as_dir" && as_dir=.
3947 for ac_prog in grep ggrep; do
3948 for ac_exec_ext in '' $ac_executable_extensions; do
3949 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3950 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3951 # Check for GNU ac_path_GREP and select it if it is found.
3952 # Check for GNU $ac_path_GREP
3953 case `"$ac_path_GREP" --version 2>&1` in
3954 *GNU*)
3955 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3956 *)
3957 ac_count=0
3958 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3959 while :
3960 do
3961 cat "conftest.in" "conftest.in" >"conftest.tmp"
3962 mv "conftest.tmp" "conftest.in"
3963 cp "conftest.in" "conftest.nl"
3964 echo 'GREP' >> "conftest.nl"
3965 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3966 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3967 ac_count=`expr $ac_count + 1`
3968 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3969 # Best one so far, save it but keep looking for a better one
3970 ac_cv_path_GREP="$ac_path_GREP"
3971 ac_path_GREP_max=$ac_count
3972 fi
3973 # 10*(2^10) chars as input seems more than enough
3974 test $ac_count -gt 10 && break
3975 done
3976 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3977 esac
3978
3979
3980 $ac_path_GREP_found && break 3
3981 done
3982 done
3983
3984 done
3985 IFS=$as_save_IFS
3986
3987
3988 fi
3989
3990 GREP="$ac_cv_path_GREP"
3991 if test -z "$GREP"; then
3992 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3993 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3994 { (exit 1); exit 1; }; }
3995 fi
3996
3997 else
3998 ac_cv_path_GREP=$GREP
3999 fi
4000
4001
4002 fi
4003 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4004 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4005 GREP="$ac_cv_path_GREP"
4006
4007
4008 { echo "$as_me:$LINENO: checking for egrep" >&5
4009 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4010 if test "${ac_cv_path_EGREP+set}" = set; then
4011 echo $ECHO_N "(cached) $ECHO_C" >&6
4012 else
4013 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4014 then ac_cv_path_EGREP="$GREP -E"
4015 else
4016 # Extract the first word of "egrep" to use in msg output
4017 if test -z "$EGREP"; then
4018 set dummy egrep; ac_prog_name=$2
4019 if test "${ac_cv_path_EGREP+set}" = set; then
4020 echo $ECHO_N "(cached) $ECHO_C" >&6
4021 else
4022 ac_path_EGREP_found=false
4023 # Loop through the user's path and test for each of PROGNAME-LIST
4024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4025 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4026 do
4027 IFS=$as_save_IFS
4028 test -z "$as_dir" && as_dir=.
4029 for ac_prog in egrep; do
4030 for ac_exec_ext in '' $ac_executable_extensions; do
4031 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4032 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4033 # Check for GNU ac_path_EGREP and select it if it is found.
4034 # Check for GNU $ac_path_EGREP
4035 case `"$ac_path_EGREP" --version 2>&1` in
4036 *GNU*)
4037 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4038 *)
4039 ac_count=0
4040 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4041 while :
4042 do
4043 cat "conftest.in" "conftest.in" >"conftest.tmp"
4044 mv "conftest.tmp" "conftest.in"
4045 cp "conftest.in" "conftest.nl"
4046 echo 'EGREP' >> "conftest.nl"
4047 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4048 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4049 ac_count=`expr $ac_count + 1`
4050 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4051 # Best one so far, save it but keep looking for a better one
4052 ac_cv_path_EGREP="$ac_path_EGREP"
4053 ac_path_EGREP_max=$ac_count
4054 fi
4055 # 10*(2^10) chars as input seems more than enough
4056 test $ac_count -gt 10 && break
4057 done
4058 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4059 esac
4060
4061
4062 $ac_path_EGREP_found && break 3
4063 done
4064 done
4065
4066 done
4067 IFS=$as_save_IFS
4068
4069
4070 fi
4071
4072 EGREP="$ac_cv_path_EGREP"
4073 if test -z "$EGREP"; then
4074 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4075 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4076 { (exit 1); exit 1; }; }
4077 fi
4078
4079 else
4080 ac_cv_path_EGREP=$EGREP
4081 fi
4082
4083
4084 fi
4085 fi
4086 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4087 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4088 EGREP="$ac_cv_path_EGREP"
4089
4090
4091 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4092 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4093 if test "${ac_cv_header_stdc+set}" = set; then
4094 echo $ECHO_N "(cached) $ECHO_C" >&6
4095 else
4096 cat >conftest.$ac_ext <<_ACEOF
4097 /* confdefs.h. */
4098 _ACEOF
4099 cat confdefs.h >>conftest.$ac_ext
4100 cat >>conftest.$ac_ext <<_ACEOF
4101 /* end confdefs.h. */
4102 #include <stdlib.h>
4103 #include <stdarg.h>
4104 #include <string.h>
4105 #include <float.h>
4106
4107 int
4108 main ()
4109 {
4110
4111 ;
4112 return 0;
4113 }
4114 _ACEOF
4115 rm -f conftest.$ac_objext
4116 if { (ac_try="$ac_compile"
4117 case "(($ac_try" in
4118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4119 *) ac_try_echo=$ac_try;;
4120 esac
4121 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4122 (eval "$ac_compile") 2>conftest.er1
4123 ac_status=$?
4124 grep -v '^ *+' conftest.er1 >conftest.err
4125 rm -f conftest.er1
4126 cat conftest.err >&5
4127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4128 (exit $ac_status); } && {
4129 test -z "$ac_c_werror_flag" ||
4130 test ! -s conftest.err
4131 } && test -s conftest.$ac_objext; then
4132 ac_cv_header_stdc=yes
4133 else
4134 echo "$as_me: failed program was:" >&5
4135 sed 's/^/| /' conftest.$ac_ext >&5
4136
4137 ac_cv_header_stdc=no
4138 fi
4139
4140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4141
4142 if test $ac_cv_header_stdc = yes; then
4143 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4144 cat >conftest.$ac_ext <<_ACEOF
4145 /* confdefs.h. */
4146 _ACEOF
4147 cat confdefs.h >>conftest.$ac_ext
4148 cat >>conftest.$ac_ext <<_ACEOF
4149 /* end confdefs.h. */
4150 #include <string.h>
4151
4152 _ACEOF
4153 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4154 $EGREP "memchr" >/dev/null 2>&1; then
4155 :
4156 else
4157 ac_cv_header_stdc=no
4158 fi
4159 rm -f conftest*
4160
4161 fi
4162
4163 if test $ac_cv_header_stdc = yes; then
4164 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4165 cat >conftest.$ac_ext <<_ACEOF
4166 /* confdefs.h. */
4167 _ACEOF
4168 cat confdefs.h >>conftest.$ac_ext
4169 cat >>conftest.$ac_ext <<_ACEOF
4170 /* end confdefs.h. */
4171 #include <stdlib.h>
4172
4173 _ACEOF
4174 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4175 $EGREP "free" >/dev/null 2>&1; then
4176 :
4177 else
4178 ac_cv_header_stdc=no
4179 fi
4180 rm -f conftest*
4181
4182 fi
4183
4184 if test $ac_cv_header_stdc = yes; then
4185 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4186 if test "$cross_compiling" = yes; then
4187 :
4188 else
4189 cat >conftest.$ac_ext <<_ACEOF
4190 /* confdefs.h. */
4191 _ACEOF
4192 cat confdefs.h >>conftest.$ac_ext
4193 cat >>conftest.$ac_ext <<_ACEOF
4194 /* end confdefs.h. */
4195 #include <ctype.h>
4196 #include <stdlib.h>
4197 #if ((' ' & 0x0FF) == 0x020)
4198 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4199 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4200 #else
4201 # define ISLOWER(c) \
4202 (('a' <= (c) && (c) <= 'i') \
4203 || ('j' <= (c) && (c) <= 'r') \
4204 || ('s' <= (c) && (c) <= 'z'))
4205 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4206 #endif
4207
4208 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4209 int
4210 main ()
4211 {
4212 int i;
4213 for (i = 0; i < 256; i++)
4214 if (XOR (islower (i), ISLOWER (i))
4215 || toupper (i) != TOUPPER (i))
4216 return 2;
4217 return 0;
4218 }
4219 _ACEOF
4220 rm -f conftest$ac_exeext
4221 if { (ac_try="$ac_link"
4222 case "(($ac_try" in
4223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4224 *) ac_try_echo=$ac_try;;
4225 esac
4226 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4227 (eval "$ac_link") 2>&5
4228 ac_status=$?
4229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4230 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4231 { (case "(($ac_try" in
4232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4233 *) ac_try_echo=$ac_try;;
4234 esac
4235 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4236 (eval "$ac_try") 2>&5
4237 ac_status=$?
4238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4239 (exit $ac_status); }; }; then
4240 :
4241 else
4242 echo "$as_me: program exited with status $ac_status" >&5
4243 echo "$as_me: failed program was:" >&5
4244 sed 's/^/| /' conftest.$ac_ext >&5
4245
4246 ( exit $ac_status )
4247 ac_cv_header_stdc=no
4248 fi
4249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4250 fi
4251
4252
4253 fi
4254 fi
4255 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4256 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4257 if test $ac_cv_header_stdc = yes; then
4258
4259 cat >>confdefs.h <<\_ACEOF
4260 #define STDC_HEADERS 1
4261 _ACEOF
4262
4263 fi
4264
4265 # Check whether --enable-shared was given.
4266 if test "${enable_shared+set}" = set; then
4267 enableval=$enable_shared; p=${PACKAGE-default}
4268 case $enableval in
4269 yes) enable_shared=yes ;;
4270 no) enable_shared=no ;;
4271 *)
4272 enable_shared=no
4273 # Look at the argument we got. We use all the common list separators.
4274 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4275 for pkg in $enableval; do
4276 IFS="$lt_save_ifs"
4277 if test "X$pkg" = "X$p"; then
4278 enable_shared=yes
4279 fi
4280 done
4281 IFS="$lt_save_ifs"
4282 ;;
4283 esac
4284 else
4285 enable_shared=yes
4286 fi
4287
4288
4289 # Check whether --enable-static was given.
4290 if test "${enable_static+set}" = set; then
4291 enableval=$enable_static; p=${PACKAGE-default}
4292 case $enableval in
4293 yes) enable_static=yes ;;
4294 no) enable_static=no ;;
4295 *)
4296 enable_static=no
4297 # Look at the argument we got. We use all the common list separators.
4298 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4299 for pkg in $enableval; do
4300 IFS="$lt_save_ifs"
4301 if test "X$pkg" = "X$p"; then
4302 enable_static=yes
4303 fi
4304 done
4305 IFS="$lt_save_ifs"
4306 ;;
4307 esac
4308 else
4309 enable_static=yes
4310 fi
4311
4312
4313 # Check whether --enable-fast-install was given.
4314 if test "${enable_fast_install+set}" = set; then
4315 enableval=$enable_fast_install; p=${PACKAGE-default}
4316 case $enableval in
4317 yes) enable_fast_install=yes ;;
4318 no) enable_fast_install=no ;;
4319 *)
4320 enable_fast_install=no
4321 # Look at the argument we got. We use all the common list separators.
4322 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4323 for pkg in $enableval; do
4324 IFS="$lt_save_ifs"
4325 if test "X$pkg" = "X$p"; then
4326 enable_fast_install=yes
4327 fi
4328 done
4329 IFS="$lt_save_ifs"
4330 ;;
4331 esac
4332 else
4333 enable_fast_install=yes
4334 fi
4335
4336
4337 # Make sure we can run config.sub.
4338 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4339 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
4340 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
4341 { (exit 1); exit 1; }; }
4342
4343 { echo "$as_me:$LINENO: checking build system type" >&5
4344 echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
4345 if test "${ac_cv_build+set}" = set; then
4346 echo $ECHO_N "(cached) $ECHO_C" >&6
4347 else
4348 ac_build_alias=$build_alias
4349 test "x$ac_build_alias" = x &&
4350 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4351 test "x$ac_build_alias" = x &&
4352 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
4353 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
4354 { (exit 1); exit 1; }; }
4355 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4356 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
4357 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
4358 { (exit 1); exit 1; }; }
4359
4360 fi
4361 { echo "$as_me:$LINENO: result: $ac_cv_build" >&5
4362 echo "${ECHO_T}$ac_cv_build" >&6; }
4363 case $ac_cv_build in
4364 *-*-*) ;;
4365 *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
4366 echo "$as_me: error: invalid value of canonical build" >&2;}
4367 { (exit 1); exit 1; }; };;
4368 esac
4369 build=$ac_cv_build
4370 ac_save_IFS=$IFS; IFS='-'
4371 set x $ac_cv_build
4372 shift
4373 build_cpu=$1
4374 build_vendor=$2
4375 shift; shift
4376 # Remember, the first character of IFS is used to create $*,
4377 # except with old shells:
4378 build_os=$*
4379 IFS=$ac_save_IFS
4380 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4381
4382
4383 { echo "$as_me:$LINENO: checking host system type" >&5
4384 echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
4385 if test "${ac_cv_host+set}" = set; then
4386 echo $ECHO_N "(cached) $ECHO_C" >&6
4387 else
4388 if test "x$host_alias" = x; then
4389 ac_cv_host=$ac_cv_build
4390 else
4391 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4392 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
4393 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
4394 { (exit 1); exit 1; }; }
4395 fi
4396
4397 fi
4398 { echo "$as_me:$LINENO: result: $ac_cv_host" >&5
4399 echo "${ECHO_T}$ac_cv_host" >&6; }
4400 case $ac_cv_host in
4401 *-*-*) ;;
4402 *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
4403 echo "$as_me: error: invalid value of canonical host" >&2;}
4404 { (exit 1); exit 1; }; };;
4405 esac
4406 host=$ac_cv_host
4407 ac_save_IFS=$IFS; IFS='-'
4408 set x $ac_cv_host
4409 shift
4410 host_cpu=$1
4411 host_vendor=$2
4412 shift; shift
4413 # Remember, the first character of IFS is used to create $*,
4414 # except with old shells:
4415 host_os=$*
4416 IFS=$ac_save_IFS
4417 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4418
4419
4420 { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
4421 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
4422 if test "${lt_cv_path_SED+set}" = set; then
4423 echo $ECHO_N "(cached) $ECHO_C" >&6
4424 else
4425 # Loop through the user's path and test for sed and gsed.
4426 # Then use that list of sed's as ones to test for truncation.
4427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4428 for as_dir in $PATH
4429 do
4430 IFS=$as_save_IFS
4431 test -z "$as_dir" && as_dir=.
4432 for lt_ac_prog in sed gsed; do
4433 for ac_exec_ext in '' $ac_executable_extensions; do
4434 if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then
4435 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
4436 fi
4437 done
4438 done
4439 done
4440 IFS=$as_save_IFS
4441 lt_ac_max=0
4442 lt_ac_count=0
4443 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4444 # along with /bin/sed that truncates output.
4445 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
4446 test ! -f $lt_ac_sed && continue
4447 cat /dev/null > conftest.in
4448 lt_ac_count=0
4449 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
4450 # Check for GNU sed and select it if it is found.
4451 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
4452 lt_cv_path_SED=$lt_ac_sed
4453 break
4454 fi
4455 while true; do
4456 cat conftest.in conftest.in >conftest.tmp
4457 mv conftest.tmp conftest.in
4458 cp conftest.in conftest.nl
4459 echo >>conftest.nl
4460 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
4461 cmp -s conftest.out conftest.nl || break
4462 # 10000 chars as input seems more than enough
4463 test $lt_ac_count -gt 10 && break
4464 lt_ac_count=`expr $lt_ac_count + 1`
4465 if test $lt_ac_count -gt $lt_ac_max; then
4466 lt_ac_max=$lt_ac_count
4467 lt_cv_path_SED=$lt_ac_sed
4468 fi
4469 done
4470 done
4471
4472 fi
4473
4474 SED=$lt_cv_path_SED
4475
4476 { echo "$as_me:$LINENO: result: $SED" >&5
4477 echo "${ECHO_T}$SED" >&6; }
4478
4479
4480 # Check whether --with-gnu-ld was given.
4481 if test "${with_gnu_ld+set}" = set; then
4482 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
4483 else
4484 with_gnu_ld=no
4485 fi
4486
4487 ac_prog=ld
4488 if test "$GCC" = yes; then
4489 # Check if gcc -print-prog-name=ld gives a path.
4490 { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
4491 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
4492 case $host in
4493 *-*-mingw*)
4494 # gcc leaves a trailing carriage return which upsets mingw
4495 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4496 *)
4497 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4498 esac
4499 case $ac_prog in
4500 # Accept absolute paths.
4501 [\\/]* | ?:[\\/]*)
4502 re_direlt='/[^/][^/]*/\.\./'
4503 # Canonicalize the pathname of ld
4504 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
4505 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4506 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
4507 done
4508 test -z "$LD" && LD="$ac_prog"
4509 ;;
4510 "")
4511 # If it fails, then pretend we aren't using GCC.
4512 ac_prog=ld
4513 ;;
4514 *)
4515 # If it is relative, then search for the first ld in PATH.
4516 with_gnu_ld=unknown
4517 ;;
4518 esac
4519 elif test "$with_gnu_ld" = yes; then
4520 { echo "$as_me:$LINENO: checking for GNU ld" >&5
4521 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
4522 else
4523 { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
4524 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
4525 fi
4526 if test "${lt_cv_path_LD+set}" = set; then
4527 echo $ECHO_N "(cached) $ECHO_C" >&6
4528 else
4529 if test -z "$LD"; then
4530 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4531 for ac_dir in $PATH; do
4532 IFS="$lt_save_ifs"
4533 test -z "$ac_dir" && ac_dir=.
4534 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4535 lt_cv_path_LD="$ac_dir/$ac_prog"
4536 # Check to see if the program is GNU ld. I'd rather use --version,
4537 # but apparently some variants of GNU ld only accept -v.
4538 # Break only if it was the GNU/non-GNU ld that we prefer.
4539 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4540 *GNU* | *'with BFD'*)
4541 test "$with_gnu_ld" != no && break
4542 ;;
4543 *)
4544 test "$with_gnu_ld" != yes && break
4545 ;;
4546 esac
4547 fi
4548 done
4549 IFS="$lt_save_ifs"
4550 else
4551 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4552 fi
4553 fi
4554
4555 LD="$lt_cv_path_LD"
4556 if test -n "$LD"; then
4557 { echo "$as_me:$LINENO: result: $LD" >&5
4558 echo "${ECHO_T}$LD" >&6; }
4559 else
4560 { echo "$as_me:$LINENO: result: no" >&5
4561 echo "${ECHO_T}no" >&6; }
4562 fi
4563 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
4564 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
4565 { (exit 1); exit 1; }; }
4566 { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
4567 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
4568 if test "${lt_cv_prog_gnu_ld+set}" = set; then
4569 echo $ECHO_N "(cached) $ECHO_C" >&6
4570 else
4571 # I'd rather use --version here, but apparently some GNU lds only accept -v.
4572 case `$LD -v 2>&1 </dev/null` in
4573 *GNU* | *'with BFD'*)
4574 lt_cv_prog_gnu_ld=yes
4575 ;;
4576 *)
4577 lt_cv_prog_gnu_ld=no
4578 ;;
4579 esac
4580 fi
4581 { echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
4582 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
4583 with_gnu_ld=$lt_cv_prog_gnu_ld
4584
4585
4586 { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
4587 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
4588 if test "${lt_cv_ld_reload_flag+set}" = set; then
4589 echo $ECHO_N "(cached) $ECHO_C" >&6
4590 else
4591 lt_cv_ld_reload_flag='-r'
4592 fi
4593 { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
4594 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
4595 reload_flag=$lt_cv_ld_reload_flag
4596 case $reload_flag in
4597 "" | " "*) ;;
4598 *) reload_flag=" $reload_flag" ;;
4599 esac
4600 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4601 case $host_os in
4602 darwin*)
4603 if test "$GCC" = yes; then
4604 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4605 else
4606 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4607 fi
4608 ;;
4609 esac
4610
4611 { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
4612 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; }
4613 if test "${lt_cv_path_NM+set}" = set; then
4614 echo $ECHO_N "(cached) $ECHO_C" >&6
4615 else
4616 if test -n "$NM"; then
4617 # Let the user override the test.
4618 lt_cv_path_NM="$NM"
4619 else
4620 lt_nm_to_check="${ac_tool_prefix}nm"
4621 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4622 lt_nm_to_check="$lt_nm_to_check nm"
4623 fi
4624 for lt_tmp_nm in $lt_nm_to_check; do
4625 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4626 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4627 IFS="$lt_save_ifs"
4628 test -z "$ac_dir" && ac_dir=.
4629 tmp_nm="$ac_dir/$lt_tmp_nm"
4630 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4631 # Check to see if the nm accepts a BSD-compat flag.
4632 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4633 # nm: unknown option "B" ignored
4634 # Tru64's nm complains that /dev/null is an invalid object file
4635 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4636 */dev/null* | *'Invalid file or object type'*)
4637 lt_cv_path_NM="$tmp_nm -B"
4638 break
4639 ;;
4640 *)
4641 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4642 */dev/null*)
4643 lt_cv_path_NM="$tmp_nm -p"
4644 break
4645 ;;
4646 *)
4647 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4648 continue # so that we can try to find one that supports BSD flags
4649 ;;
4650 esac
4651 ;;
4652 esac
4653 fi
4654 done
4655 IFS="$lt_save_ifs"
4656 done
4657 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4658 fi
4659 fi
4660 { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
4661 echo "${ECHO_T}$lt_cv_path_NM" >&6; }
4662 NM="$lt_cv_path_NM"
4663
4664 { echo "$as_me:$LINENO: checking whether ln -s works" >&5
4665 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
4666 LN_S=$as_ln_s
4667 if test "$LN_S" = "ln -s"; then
4668 { echo "$as_me:$LINENO: result: yes" >&5
4669 echo "${ECHO_T}yes" >&6; }
4670 else
4671 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4672 echo "${ECHO_T}no, using $LN_S" >&6; }
4673 fi
4674
4675 { echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
4676 echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
4677 if test "${lt_cv_deplibs_check_method+set}" = set; then
4678 echo $ECHO_N "(cached) $ECHO_C" >&6
4679 else
4680 lt_cv_file_magic_cmd='$MAGIC_CMD'
4681 lt_cv_file_magic_test_file=
4682 lt_cv_deplibs_check_method='unknown'
4683 # Need to set the preceding variable on all platforms that support
4684 # interlibrary dependencies.
4685 # 'none' -- dependencies not supported.
4686 # `unknown' -- same as none, but documents that we really don't know.
4687 # 'pass_all' -- all dependencies passed with no checks.
4688 # 'test_compile' -- check by making test program.
4689 # 'file_magic [[regex]]' -- check by looking for files in library path
4690 # which responds to the $file_magic_cmd with a given extended regex.
4691 # If you have `file' or equivalent on your system and you're not sure
4692 # whether `pass_all' will *always* work, you probably want this one.
4693
4694 case $host_os in
4695 aix4* | aix5*)
4696 lt_cv_deplibs_check_method=pass_all
4697 ;;
4698
4699 beos*)
4700 lt_cv_deplibs_check_method=pass_all
4701 ;;
4702
4703 bsdi[45]*)
4704 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
4705 lt_cv_file_magic_cmd='/usr/bin/file -L'
4706 lt_cv_file_magic_test_file=/shlib/libc.so
4707 ;;
4708
4709 cygwin*)
4710 # func_win32_libid is a shell function defined in ltmain.sh
4711 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4712 lt_cv_file_magic_cmd='func_win32_libid'
4713 ;;
4714
4715 mingw* | pw32*)
4716 # Base MSYS/MinGW do not provide the 'file' command needed by
4717 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4718 # unless we find 'file', for example because we are cross-compiling.
4719 if ( file / ) >/dev/null 2>&1; then
4720 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4721 lt_cv_file_magic_cmd='func_win32_libid'
4722 else
4723 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4724 lt_cv_file_magic_cmd='$OBJDUMP -f'
4725 fi
4726 ;;
4727
4728 darwin* | rhapsody*)
4729 lt_cv_deplibs_check_method=pass_all
4730 ;;
4731
4732 freebsd* | dragonfly*)
4733 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4734 case $host_cpu in
4735 i*86 )
4736 # Not sure whether the presence of OpenBSD here was a mistake.
4737 # Let's accept both of them until this is cleared up.
4738 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
4739 lt_cv_file_magic_cmd=/usr/bin/file
4740 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4741 ;;
4742 esac
4743 else
4744 lt_cv_deplibs_check_method=pass_all
4745 fi
4746 ;;
4747
4748 gnu*)
4749 lt_cv_deplibs_check_method=pass_all
4750 ;;
4751
4752 hpux10.20* | hpux11*)
4753 lt_cv_file_magic_cmd=/usr/bin/file
4754 case $host_cpu in
4755 ia64*)
4756 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
4757 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4758 ;;
4759 hppa*64*)
4760 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
4761 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4762 ;;
4763 *)
4764 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4765 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4766 ;;
4767 esac
4768 ;;
4769
4770 interix[3-9]*)
4771 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4772 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
4773 ;;
4774
4775 irix5* | irix6* | nonstopux*)
4776 case $LD in
4777 *-32|*"-32 ") libmagic=32-bit;;
4778 *-n32|*"-n32 ") libmagic=N32;;
4779 *-64|*"-64 ") libmagic=64-bit;;
4780 *) libmagic=never-match;;
4781 esac
4782 lt_cv_deplibs_check_method=pass_all
4783 ;;
4784
4785 # This must be Linux ELF.
4786 linux* | k*bsd*-gnu)
4787 lt_cv_deplibs_check_method=pass_all
4788 ;;
4789
4790 netbsd*)
4791 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4792 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
4793 else
4794 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
4795 fi
4796 ;;
4797
4798 newos6*)
4799 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4800 lt_cv_file_magic_cmd=/usr/bin/file
4801 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4802 ;;
4803
4804 nto-qnx*)
4805 lt_cv_deplibs_check_method=unknown
4806 ;;
4807
4808 openbsd*)
4809 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4810 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
4811 else
4812 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
4813 fi
4814 ;;
4815
4816 osf3* | osf4* | osf5*)
4817 lt_cv_deplibs_check_method=pass_all
4818 ;;
4819
4820 rdos*)
4821 lt_cv_deplibs_check_method=pass_all
4822 ;;
4823
4824 solaris*)
4825 lt_cv_deplibs_check_method=pass_all
4826 ;;
4827
4828 sysv4 | sysv4.3*)
4829 case $host_vendor in
4830 motorola)
4831 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]'
4832 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4833 ;;
4834 ncr)
4835 lt_cv_deplibs_check_method=pass_all
4836 ;;
4837 sequent)
4838 lt_cv_file_magic_cmd='/bin/file'
4839 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4840 ;;
4841 sni)
4842 lt_cv_file_magic_cmd='/bin/file'
4843 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4844 lt_cv_file_magic_test_file=/lib/libc.so
4845 ;;
4846 siemens)
4847 lt_cv_deplibs_check_method=pass_all
4848 ;;
4849 pc)
4850 lt_cv_deplibs_check_method=pass_all
4851 ;;
4852 esac
4853 ;;
4854
4855 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4856 lt_cv_deplibs_check_method=pass_all
4857 ;;
4858 esac
4859
4860 fi
4861 { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
4862 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
4863 file_magic_cmd=$lt_cv_file_magic_cmd
4864 deplibs_check_method=$lt_cv_deplibs_check_method
4865 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4866
4867
4868
4869
4870 # If no C compiler was specified, use CC.
4871 LTCC=${LTCC-"$CC"}
4872
4873 # If no C compiler flags were specified, use CFLAGS.
4874 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
4875
4876 # Allow CC to be a program name with arguments.
4877 compiler=$CC
4878
4879 # Check whether --enable-libtool-lock was given.
4880 if test "${enable_libtool_lock+set}" = set; then
4881 enableval=$enable_libtool_lock;
4882 fi
4883
4884 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4885
4886 # Some flags need to be propagated to the compiler or linker for good
4887 # libtool support.
4888 case $host in
4889 ia64-*-hpux*)
4890 # Find out which ABI we are using.
4891 echo 'int i;' > conftest.$ac_ext
4892 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4893 (eval $ac_compile) 2>&5
4894 ac_status=$?
4895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4896 (exit $ac_status); }; then
4897 case `/usr/bin/file conftest.$ac_objext` in
4898 *ELF-32*)
4899 HPUX_IA64_MODE="32"
4900 ;;
4901 *ELF-64*)
4902 HPUX_IA64_MODE="64"
4903 ;;
4904 esac
4905 fi
4906 rm -rf conftest*
4907 ;;
4908 *-*-irix6*)
4909 # Find out which ABI we are using.
4910 echo '#line 4911 "configure"' > conftest.$ac_ext
4911 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4912 (eval $ac_compile) 2>&5
4913 ac_status=$?
4914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4915 (exit $ac_status); }; then
4916 if test "$lt_cv_prog_gnu_ld" = yes; then
4917 case `/usr/bin/file conftest.$ac_objext` in
4918 *32-bit*)
4919 LD="${LD-ld} -melf32bsmip"
4920 ;;
4921 *N32*)
4922 LD="${LD-ld} -melf32bmipn32"
4923 ;;
4924 *64-bit*)
4925 LD="${LD-ld} -melf64bmip"
4926 ;;
4927 esac
4928 else
4929 case `/usr/bin/file conftest.$ac_objext` in
4930 *32-bit*)
4931 LD="${LD-ld} -32"
4932 ;;
4933 *N32*)
4934 LD="${LD-ld} -n32"
4935 ;;
4936 *64-bit*)
4937 LD="${LD-ld} -64"
4938 ;;
4939 esac
4940 fi
4941 fi
4942 rm -rf conftest*
4943 ;;
4944
4945 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
4946 s390*-*linux*|sparc*-*linux*)
4947 # Find out which ABI we are using.
4948 echo 'int i;' > conftest.$ac_ext
4949 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4950 (eval $ac_compile) 2>&5
4951 ac_status=$?
4952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4953 (exit $ac_status); }; then
4954 case `/usr/bin/file conftest.o` in
4955 *32-bit*)
4956 case $host in
4957 x86_64-*kfreebsd*-gnu)
4958 LD="${LD-ld} -m elf_i386_fbsd"
4959 ;;
4960 x86_64-*linux*)
4961 LD="${LD-ld} -m elf_i386"
4962 ;;
4963 ppc64-*linux*|powerpc64-*linux*)
4964 LD="${LD-ld} -m elf32ppclinux"
4965 ;;
4966 s390x-*linux*)
4967 LD="${LD-ld} -m elf_s390"
4968 ;;
4969 sparc64-*linux*)
4970 LD="${LD-ld} -m elf32_sparc"
4971 ;;
4972 esac
4973 ;;
4974 *64-bit*)
4975 libsuff=64
4976 case $host in
4977 x86_64-*kfreebsd*-gnu)
4978 LD="${LD-ld} -m elf_x86_64_fbsd"
4979 ;;
4980 x86_64-*linux*)
4981 LD="${LD-ld} -m elf_x86_64"
4982 ;;
4983 ppc*-*linux*|powerpc*-*linux*)
4984 LD="${LD-ld} -m elf64ppc"
4985 ;;
4986 s390*-*linux*)
4987 LD="${LD-ld} -m elf64_s390"
4988 ;;
4989 sparc*-*linux*)
4990 LD="${LD-ld} -m elf64_sparc"
4991 ;;
4992 esac
4993 ;;
4994 esac
4995 fi
4996 rm -rf conftest*
4997 ;;
4998
4999 *-*-sco3.2v5*)
5000 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
5001 SAVE_CFLAGS="$CFLAGS"
5002 CFLAGS="$CFLAGS -belf"
5003 { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
5004 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
5005 if test "${lt_cv_cc_needs_belf+set}" = set; then
5006 echo $ECHO_N "(cached) $ECHO_C" >&6
5007 else
5008 ac_ext=c
5009 ac_cpp='$CPP $CPPFLAGS'
5010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5013
5014 cat >conftest.$ac_ext <<_ACEOF
5015 /* confdefs.h. */
5016 _ACEOF
5017 cat confdefs.h >>conftest.$ac_ext
5018 cat >>conftest.$ac_ext <<_ACEOF
5019 /* end confdefs.h. */
5020
5021 int
5022 main ()
5023 {
5024
5025 ;
5026 return 0;
5027 }
5028 _ACEOF
5029 rm -f conftest.$ac_objext conftest$ac_exeext
5030 if { (ac_try="$ac_link"
5031 case "(($ac_try" in
5032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5033 *) ac_try_echo=$ac_try;;
5034 esac
5035 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5036 (eval "$ac_link") 2>conftest.er1
5037 ac_status=$?
5038 grep -v '^ *+' conftest.er1 >conftest.err
5039 rm -f conftest.er1
5040 cat conftest.err >&5
5041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5042 (exit $ac_status); } && {
5043 test -z "$ac_c_werror_flag" ||
5044 test ! -s conftest.err
5045 } && test -s conftest$ac_exeext &&
5046 $as_test_x conftest$ac_exeext; then
5047 lt_cv_cc_needs_belf=yes
5048 else
5049 echo "$as_me: failed program was:" >&5
5050 sed 's/^/| /' conftest.$ac_ext >&5
5051
5052 lt_cv_cc_needs_belf=no
5053 fi
5054
5055 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5056 conftest$ac_exeext conftest.$ac_ext
5057 ac_ext=c
5058 ac_cpp='$CPP $CPPFLAGS'
5059 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5060 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5061 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5062
5063 fi
5064 { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
5065 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
5066 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
5067 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
5068 CFLAGS="$SAVE_CFLAGS"
5069 fi
5070 ;;
5071 sparc*-*solaris*)
5072 # Find out which ABI we are using.
5073 echo 'int i;' > conftest.$ac_ext
5074 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5075 (eval $ac_compile) 2>&5
5076 ac_status=$?
5077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5078 (exit $ac_status); }; then
5079 case `/usr/bin/file conftest.o` in
5080 *64-bit*)
5081 case $lt_cv_prog_gnu_ld in
5082 yes*) LD="${LD-ld} -m elf64_sparc" ;;
5083 *) LD="${LD-ld} -64" ;;
5084 esac
5085 ;;
5086 esac
5087 fi
5088 rm -rf conftest*
5089 ;;
5090
5091
5092 esac
5093
5094 need_locks="$enable_libtool_lock"
5095
5096
5097 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5108 inttypes.h stdint.h unistd.h
5109 do
5110 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5111 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5112 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5113 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5114 echo $ECHO_N "(cached) $ECHO_C" >&6
5115 else
5116 cat >conftest.$ac_ext <<_ACEOF
5117 /* confdefs.h. */
5118 _ACEOF
5119 cat confdefs.h >>conftest.$ac_ext
5120 cat >>conftest.$ac_ext <<_ACEOF
5121 /* end confdefs.h. */
5122 $ac_includes_default
5123
5124 #include <$ac_header>
5125 _ACEOF
5126 rm -f conftest.$ac_objext
5127 if { (ac_try="$ac_compile"
5128 case "(($ac_try" in
5129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5130 *) ac_try_echo=$ac_try;;
5131 esac
5132 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5133 (eval "$ac_compile") 2>conftest.er1
5134 ac_status=$?
5135 grep -v '^ *+' conftest.er1 >conftest.err
5136 rm -f conftest.er1
5137 cat conftest.err >&5
5138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5139 (exit $ac_status); } && {
5140 test -z "$ac_c_werror_flag" ||
5141 test ! -s conftest.err
5142 } && test -s conftest.$ac_objext; then
5143 eval "$as_ac_Header=yes"
5144 else
5145 echo "$as_me: failed program was:" >&5
5146 sed 's/^/| /' conftest.$ac_ext >&5
5147
5148 eval "$as_ac_Header=no"
5149 fi
5150
5151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5152 fi
5153 ac_res=`eval echo '${'$as_ac_Header'}'`
5154 { echo "$as_me:$LINENO: result: $ac_res" >&5
5155 echo "${ECHO_T}$ac_res" >&6; }
5156 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5157 cat >>confdefs.h <<_ACEOF
5158 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5159 _ACEOF
5160
5161 fi
5162
5163 done
5164
5165
5166
5167 for ac_header in dlfcn.h
5168 do
5169 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5170 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5171 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5172 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5173 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5174 echo $ECHO_N "(cached) $ECHO_C" >&6
5175 fi
5176 ac_res=`eval echo '${'$as_ac_Header'}'`
5177 { echo "$as_me:$LINENO: result: $ac_res" >&5
5178 echo "${ECHO_T}$ac_res" >&6; }
5179 else
5180 # Is the header compilable?
5181 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
5182 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
5183 cat >conftest.$ac_ext <<_ACEOF
5184 /* confdefs.h. */
5185 _ACEOF
5186 cat confdefs.h >>conftest.$ac_ext
5187 cat >>conftest.$ac_ext <<_ACEOF
5188 /* end confdefs.h. */
5189 $ac_includes_default
5190 #include <$ac_header>
5191 _ACEOF
5192 rm -f conftest.$ac_objext
5193 if { (ac_try="$ac_compile"
5194 case "(($ac_try" in
5195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5196 *) ac_try_echo=$ac_try;;
5197 esac
5198 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5199 (eval "$ac_compile") 2>conftest.er1
5200 ac_status=$?
5201 grep -v '^ *+' conftest.er1 >conftest.err
5202 rm -f conftest.er1
5203 cat conftest.err >&5
5204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205 (exit $ac_status); } && {
5206 test -z "$ac_c_werror_flag" ||
5207 test ! -s conftest.err
5208 } && test -s conftest.$ac_objext; then
5209 ac_header_compiler=yes
5210 else
5211 echo "$as_me: failed program was:" >&5
5212 sed 's/^/| /' conftest.$ac_ext >&5
5213
5214 ac_header_compiler=no
5215 fi
5216
5217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5218 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5219 echo "${ECHO_T}$ac_header_compiler" >&6; }
5220
5221 # Is the header present?
5222 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
5223 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
5224 cat >conftest.$ac_ext <<_ACEOF
5225 /* confdefs.h. */
5226 _ACEOF
5227 cat confdefs.h >>conftest.$ac_ext
5228 cat >>conftest.$ac_ext <<_ACEOF
5229 /* end confdefs.h. */
5230 #include <$ac_header>
5231 _ACEOF
5232 if { (ac_try="$ac_cpp conftest.$ac_ext"
5233 case "(($ac_try" in
5234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5235 *) ac_try_echo=$ac_try;;
5236 esac
5237 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5238 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5239 ac_status=$?
5240 grep -v '^ *+' conftest.er1 >conftest.err
5241 rm -f conftest.er1
5242 cat conftest.err >&5
5243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5244 (exit $ac_status); } >/dev/null && {
5245 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5246 test ! -s conftest.err
5247 }; then
5248 ac_header_preproc=yes
5249 else
5250 echo "$as_me: failed program was:" >&5
5251 sed 's/^/| /' conftest.$ac_ext >&5
5252
5253 ac_header_preproc=no
5254 fi
5255
5256 rm -f conftest.err conftest.$ac_ext
5257 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5258 echo "${ECHO_T}$ac_header_preproc" >&6; }
5259
5260 # So? What about this header?
5261 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5262 yes:no: )
5263 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5264 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5265 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5266 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5267 ac_header_preproc=yes
5268 ;;
5269 no:yes:* )
5270 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5271 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5272 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5273 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5274 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5275 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5276 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5277 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5278 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5279 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5280 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5281 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
5282 ( cat <<\_ASBOX
5283 ## ------------------------------------ ##
5284 ## Report this to mailto:david@fubar.dk ##
5285 ## ------------------------------------ ##
5286 _ASBOX
5287 ) | sed "s/^/$as_me: WARNING: /" >&2
5288 ;;
5289 esac
5290 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5291 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5292 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5293 echo $ECHO_N "(cached) $ECHO_C" >&6
5294 else
5295 eval "$as_ac_Header=\$ac_header_preproc"
5296 fi
5297 ac_res=`eval echo '${'$as_ac_Header'}'`
5298 { echo "$as_me:$LINENO: result: $ac_res" >&5
5299 echo "${ECHO_T}$ac_res" >&6; }
5300
5301 fi
5302 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5303 cat >>confdefs.h <<_ACEOF
5304 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5305 _ACEOF
5306
5307 fi
5308
5309 done
5310
5311 ac_ext=cpp
5312 ac_cpp='$CXXCPP $CPPFLAGS'
5313 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5314 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5315 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5316 if test -z "$CXX"; then
5317 if test -n "$CCC"; then
5318 CXX=$CCC
5319 else
5320 if test -n "$ac_tool_prefix"; then
5321 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
5322 do
5323 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5324 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5325 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5327 if test "${ac_cv_prog_CXX+set}" = set; then
5328 echo $ECHO_N "(cached) $ECHO_C" >&6
5329 else
5330 if test -n "$CXX"; then
5331 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5332 else
5333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5334 for as_dir in $PATH
5335 do
5336 IFS=$as_save_IFS
5337 test -z "$as_dir" && as_dir=.
5338 for ac_exec_ext in '' $ac_executable_extensions; do
5339 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5340 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
5341 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5342 break 2
5343 fi
5344 done
5345 done
5346 IFS=$as_save_IFS
5347
5348 fi
5349 fi
5350 CXX=$ac_cv_prog_CXX
5351 if test -n "$CXX"; then
5352 { echo "$as_me:$LINENO: result: $CXX" >&5
5353 echo "${ECHO_T}$CXX" >&6; }
5354 else
5355 { echo "$as_me:$LINENO: result: no" >&5
5356 echo "${ECHO_T}no" >&6; }
5357 fi
5358
5359
5360 test -n "$CXX" && break
5361 done
5362 fi
5363 if test -z "$CXX"; then
5364 ac_ct_CXX=$CXX
5365 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
5366 do
5367 # Extract the first word of "$ac_prog", so it can be a program name with args.
5368 set dummy $ac_prog; ac_word=$2
5369 { echo "$as_me:$LINENO: checking for $ac_word" >&5
5370 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5371 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
5372 echo $ECHO_N "(cached) $ECHO_C" >&6
5373 else
5374 if test -n "$ac_ct_CXX"; then
5375 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5376 else
5377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5378 for as_dir in $PATH
5379 do
5380 IFS=$as_save_IFS
5381 test -z "$as_dir" && as_dir=.
5382 for ac_exec_ext in '' $ac_executable_extensions; do
5383 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5384 ac_cv_prog_ac_ct_CXX="$ac_prog"
5385 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5386 break 2
5387 fi
5388 done
5389 done
5390 IFS=$as_save_IFS
5391
5392 fi
5393 fi
5394 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5395 if test -n "$ac_ct_CXX"; then
5396 { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
5397 echo "${ECHO_T}$ac_ct_CXX" >&6; }
5398 else
5399 { echo "$as_me:$LINENO: result: no" >&5
5400 echo "${ECHO_T}no" >&6; }
5401 fi
5402
5403
5404 test -n "$ac_ct_CXX" && break
5405 done
5406
5407 if test "x$ac_ct_CXX" = x; then
5408 CXX="g++"
5409 else
5410 case $cross_compiling:$ac_tool_warned in
5411 yes:)
5412 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5413 whose name does not start with the host triplet. If you think this
5414 configuration is useful to you, please write to autoconf@gnu.org." >&5
5415 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5416 whose name does not start with the host triplet. If you think this
5417 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5418 ac_tool_warned=yes ;;
5419 esac
5420 CXX=$ac_ct_CXX
5421 fi
5422 fi
5423
5424 fi
5425 fi
5426 # Provide some information about the compiler.
5427 echo "$as_me:$LINENO: checking for C++ compiler version" >&5
5428 ac_compiler=`set X $ac_compile; echo $2`
5429 { (ac_try="$ac_compiler --version >&5"
5430 case "(($ac_try" in
5431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5432 *) ac_try_echo=$ac_try;;
5433 esac
5434 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5435 (eval "$ac_compiler --version >&5") 2>&5
5436 ac_status=$?
5437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5438 (exit $ac_status); }
5439 { (ac_try="$ac_compiler -v >&5"
5440 case "(($ac_try" in
5441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5442 *) ac_try_echo=$ac_try;;
5443 esac
5444 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5445 (eval "$ac_compiler -v >&5") 2>&5
5446 ac_status=$?
5447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5448 (exit $ac_status); }
5449 { (ac_try="$ac_compiler -V >&5"
5450 case "(($ac_try" in
5451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5452 *) ac_try_echo=$ac_try;;
5453 esac
5454 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5455 (eval "$ac_compiler -V >&5") 2>&5
5456 ac_status=$?
5457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5458 (exit $ac_status); }
5459
5460 { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
5461 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
5462 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
5463 echo $ECHO_N "(cached) $ECHO_C" >&6
5464 else
5465 cat >conftest.$ac_ext <<_ACEOF
5466 /* confdefs.h. */
5467 _ACEOF
5468 cat confdefs.h >>conftest.$ac_ext
5469 cat >>conftest.$ac_ext <<_ACEOF
5470 /* end confdefs.h. */
5471
5472 int
5473 main ()
5474 {
5475 #ifndef __GNUC__
5476 choke me
5477 #endif
5478
5479 ;
5480 return 0;
5481 }
5482 _ACEOF
5483 rm -f conftest.$ac_objext
5484 if { (ac_try="$ac_compile"
5485 case "(($ac_try" in
5486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5487 *) ac_try_echo=$ac_try;;
5488 esac
5489 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5490 (eval "$ac_compile") 2>conftest.er1
5491 ac_status=$?
5492 grep -v '^ *+' conftest.er1 >conftest.err
5493 rm -f conftest.er1
5494 cat conftest.err >&5
5495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496 (exit $ac_status); } && {
5497 test -z "$ac_cxx_werror_flag" ||
5498 test ! -s conftest.err
5499 } && test -s conftest.$ac_objext; then
5500 ac_compiler_gnu=yes
5501 else
5502 echo "$as_me: failed program was:" >&5
5503 sed 's/^/| /' conftest.$ac_ext >&5
5504
5505 ac_compiler_gnu=no
5506 fi
5507
5508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5509 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
5510
5511 fi
5512 { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
5513 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
5514 GXX=`test $ac_compiler_gnu = yes && echo yes`
5515 ac_test_CXXFLAGS=${CXXFLAGS+set}
5516 ac_save_CXXFLAGS=$CXXFLAGS
5517 { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
5518 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
5519 if test "${ac_cv_prog_cxx_g+set}" = set; then
5520 echo $ECHO_N "(cached) $ECHO_C" >&6
5521 else
5522 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5523 ac_cxx_werror_flag=yes
5524 ac_cv_prog_cxx_g=no
5525 CXXFLAGS="-g"
5526 cat >conftest.$ac_ext <<_ACEOF
5527 /* confdefs.h. */
5528 _ACEOF
5529 cat confdefs.h >>conftest.$ac_ext
5530 cat >>conftest.$ac_ext <<_ACEOF
5531 /* end confdefs.h. */
5532
5533 int
5534 main ()
5535 {
5536
5537 ;
5538 return 0;
5539 }
5540 _ACEOF
5541 rm -f conftest.$ac_objext
5542 if { (ac_try="$ac_compile"
5543 case "(($ac_try" in
5544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5545 *) ac_try_echo=$ac_try;;
5546 esac
5547 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5548 (eval "$ac_compile") 2>conftest.er1
5549 ac_status=$?
5550 grep -v '^ *+' conftest.er1 >conftest.err
5551 rm -f conftest.er1
5552 cat conftest.err >&5
5553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5554 (exit $ac_status); } && {
5555 test -z "$ac_cxx_werror_flag" ||
5556 test ! -s conftest.err
5557 } && test -s conftest.$ac_objext; then
5558 ac_cv_prog_cxx_g=yes
5559 else
5560 echo "$as_me: failed program was:" >&5
5561 sed 's/^/| /' conftest.$ac_ext >&5
5562
5563 CXXFLAGS=""
5564 cat >conftest.$ac_ext <<_ACEOF
5565 /* confdefs.h. */
5566 _ACEOF
5567 cat confdefs.h >>conftest.$ac_ext
5568 cat >>conftest.$ac_ext <<_ACEOF
5569 /* end confdefs.h. */
5570
5571 int
5572 main ()
5573 {
5574
5575 ;
5576 return 0;
5577 }
5578 _ACEOF
5579 rm -f conftest.$ac_objext
5580 if { (ac_try="$ac_compile"
5581 case "(($ac_try" in
5582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5583 *) ac_try_echo=$ac_try;;
5584 esac
5585 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5586 (eval "$ac_compile") 2>conftest.er1
5587 ac_status=$?
5588 grep -v '^ *+' conftest.er1 >conftest.err
5589 rm -f conftest.er1
5590 cat conftest.err >&5
5591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5592 (exit $ac_status); } && {
5593 test -z "$ac_cxx_werror_flag" ||
5594 test ! -s conftest.err
5595 } && test -s conftest.$ac_objext; then
5596 :
5597 else
5598 echo "$as_me: failed program was:" >&5
5599 sed 's/^/| /' conftest.$ac_ext >&5
5600
5601 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5602 CXXFLAGS="-g"
5603 cat >conftest.$ac_ext <<_ACEOF
5604 /* confdefs.h. */
5605 _ACEOF
5606 cat confdefs.h >>conftest.$ac_ext
5607 cat >>conftest.$ac_ext <<_ACEOF
5608 /* end confdefs.h. */
5609
5610 int
5611 main ()
5612 {
5613
5614 ;
5615 return 0;
5616 }
5617 _ACEOF
5618 rm -f conftest.$ac_objext
5619 if { (ac_try="$ac_compile"
5620 case "(($ac_try" in
5621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5622 *) ac_try_echo=$ac_try;;
5623 esac
5624 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5625 (eval "$ac_compile") 2>conftest.er1
5626 ac_status=$?
5627 grep -v '^ *+' conftest.er1 >conftest.err
5628 rm -f conftest.er1
5629 cat conftest.err >&5
5630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5631 (exit $ac_status); } && {
5632 test -z "$ac_cxx_werror_flag" ||
5633 test ! -s conftest.err
5634 } && test -s conftest.$ac_objext; then
5635 ac_cv_prog_cxx_g=yes
5636 else
5637 echo "$as_me: failed program was:" >&5
5638 sed 's/^/| /' conftest.$ac_ext >&5
5639
5640
5641 fi
5642
5643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5644 fi
5645
5646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5647 fi
5648
5649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5650 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5651 fi
5652 { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
5653 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
5654 if test "$ac_test_CXXFLAGS" = set; then
5655 CXXFLAGS=$ac_save_CXXFLAGS
5656 elif test $ac_cv_prog_cxx_g = yes; then
5657 if test "$GXX" = yes; then
5658 CXXFLAGS="-g -O2"
5659 else
5660 CXXFLAGS="-g"
5661 fi
5662 else
5663 if test "$GXX" = yes; then
5664 CXXFLAGS="-O2"
5665 else
5666 CXXFLAGS=
5667 fi
5668 fi
5669 ac_ext=cpp
5670 ac_cpp='$CXXCPP $CPPFLAGS'
5671 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5672 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5673 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5674
5675 depcc="$CXX" am_compiler_list=
5676
5677 { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
5678 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
5679 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
5680 echo $ECHO_N "(cached) $ECHO_C" >&6
5681 else
5682 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5683 # We make a subdir and do the tests there. Otherwise we can end up
5684 # making bogus files that we don't know about and never remove. For
5685 # instance it was reported that on HP-UX the gcc test will end up
5686 # making a dummy file named `D' -- because `-MD' means `put the output
5687 # in D'.
5688 mkdir conftest.dir
5689 # Copy depcomp to subdir because otherwise we won't find it if we're
5690 # using a relative directory.
5691 cp "$am_depcomp" conftest.dir
5692 cd conftest.dir
5693 # We will build objects and dependencies in a subdirectory because
5694 # it helps to detect inapplicable dependency modes. For instance
5695 # both Tru64's cc and ICC support -MD to output dependencies as a
5696 # side effect of compilation, but ICC will put the dependencies in
5697 # the current directory while Tru64 will put them in the object
5698 # directory.
5699 mkdir sub
5700
5701 am_cv_CXX_dependencies_compiler_type=none
5702 if test "$am_compiler_list" = ""; then
5703 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5704 fi
5705 for depmode in $am_compiler_list; do
5706 # Setup a source with many dependencies, because some compilers
5707 # like to wrap large dependency lists on column 80 (with \), and
5708 # we should not choose a depcomp mode which is confused by this.
5709 #
5710 # We need to recreate these files for each test, as the compiler may
5711 # overwrite some of them when testing with obscure command lines.
5712 # This happens at least with the AIX C compiler.
5713 : > sub/conftest.c
5714 for i in 1 2 3 4 5 6; do
5715 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5716 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5717 # Solaris 8's {/usr,}/bin/sh.
5718 touch sub/conftst$i.h
5719 done
5720 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5721
5722 case $depmode in
5723 nosideeffect)
5724 # after this tag, mechanisms are not by side-effect, so they'll
5725 # only be used when explicitly requested
5726 if test "x$enable_dependency_tracking" = xyes; then
5727 continue
5728 else
5729 break
5730 fi
5731 ;;
5732 none) break ;;
5733 esac
5734 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5735 # mode. It turns out that the SunPro C++ compiler does not properly
5736 # handle `-M -o', and we need to detect this.
5737 if depmode=$depmode \
5738 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5739 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5740 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5741 >/dev/null 2>conftest.err &&
5742 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5743 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5744 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5745 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5746 # icc doesn't choke on unknown options, it will just issue warnings
5747 # or remarks (even with -Werror). So we grep stderr for any message
5748 # that says an option was ignored or not supported.
5749 # When given -MP, icc 7.0 and 7.1 complain thusly:
5750 # icc: Command line warning: ignoring option '-M'; no argument required
5751 # The diagnosis changed in icc 8.0:
5752 # icc: Command line remark: option '-MP' not supported
5753 if (grep 'ignoring option' conftest.err ||
5754 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5755 am_cv_CXX_dependencies_compiler_type=$depmode
5756 break
5757 fi
5758 fi
5759 done
5760
5761 cd ..
5762 rm -rf conftest.dir
5763 else
5764 am_cv_CXX_dependencies_compiler_type=none
5765 fi
5766
5767 fi
5768 { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
5769 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
5770 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
5771
5772 if
5773 test "x$enable_dependency_tracking" != xno \
5774 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
5775 am__fastdepCXX_TRUE=
5776 am__fastdepCXX_FALSE='#'
5777 else
5778 am__fastdepCXX_TRUE='#'
5779 am__fastdepCXX_FALSE=
5780 fi
5781
5782
5783
5784
5785 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5786 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5787 (test "X$CXX" != "Xg++"))) ; then
5788 ac_ext=cpp
5789 ac_cpp='$CXXCPP $CPPFLAGS'
5790 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5791 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5792 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5793 { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
5794 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
5795 if test -z "$CXXCPP"; then
5796 if test "${ac_cv_prog_CXXCPP+set}" = set; then
5797 echo $ECHO_N "(cached) $ECHO_C" >&6
5798 else
5799 # Double quotes because CXXCPP needs to be expanded
5800 for CXXCPP in "$CXX -E" "/lib/cpp"
5801 do
5802 ac_preproc_ok=false
5803 for ac_cxx_preproc_warn_flag in '' yes
5804 do
5805 # Use a header file that comes with gcc, so configuring glibc
5806 # with a fresh cross-compiler works.
5807 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5808 # <limits.h> exists even on freestanding compilers.
5809 # On the NeXT, cc -E runs the code through the compiler's parser,
5810 # not just through cpp. "Syntax error" is here to catch this case.
5811 cat >conftest.$ac_ext <<_ACEOF
5812 /* confdefs.h. */
5813 _ACEOF
5814 cat confdefs.h >>conftest.$ac_ext
5815 cat >>conftest.$ac_ext <<_ACEOF
5816 /* end confdefs.h. */
5817 #ifdef __STDC__
5818 # include <limits.h>
5819 #else
5820 # include <assert.h>
5821 #endif
5822 Syntax error
5823 _ACEOF
5824 if { (ac_try="$ac_cpp conftest.$ac_ext"
5825 case "(($ac_try" in
5826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5827 *) ac_try_echo=$ac_try;;
5828 esac
5829 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5830 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5831 ac_status=$?
5832 grep -v '^ *+' conftest.er1 >conftest.err
5833 rm -f conftest.er1
5834 cat conftest.err >&5
5835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5836 (exit $ac_status); } >/dev/null && {
5837 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5838 test ! -s conftest.err
5839 }; then
5840 :
5841 else
5842 echo "$as_me: failed program was:" >&5
5843 sed 's/^/| /' conftest.$ac_ext >&5
5844
5845 # Broken: fails on valid input.
5846 continue
5847 fi
5848
5849 rm -f conftest.err conftest.$ac_ext
5850
5851 # OK, works on sane cases. Now check whether nonexistent headers
5852 # can be detected and how.
5853 cat >conftest.$ac_ext <<_ACEOF
5854 /* confdefs.h. */
5855 _ACEOF
5856 cat confdefs.h >>conftest.$ac_ext
5857 cat >>conftest.$ac_ext <<_ACEOF
5858 /* end confdefs.h. */
5859 #include <ac_nonexistent.h>
5860 _ACEOF
5861 if { (ac_try="$ac_cpp conftest.$ac_ext"
5862 case "(($ac_try" in
5863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5864 *) ac_try_echo=$ac_try;;
5865 esac
5866 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5867 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5868 ac_status=$?
5869 grep -v '^ *+' conftest.er1 >conftest.err
5870 rm -f conftest.er1
5871 cat conftest.err >&5
5872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873 (exit $ac_status); } >/dev/null && {
5874 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5875 test ! -s conftest.err
5876 }; then
5877 # Broken: success on invalid input.
5878 continue
5879 else
5880 echo "$as_me: failed program was:" >&5
5881 sed 's/^/| /' conftest.$ac_ext >&5
5882
5883 # Passes both tests.
5884 ac_preproc_ok=:
5885 break
5886 fi
5887
5888 rm -f conftest.err conftest.$ac_ext
5889
5890 done
5891 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5892 rm -f conftest.err conftest.$ac_ext
5893 if $ac_preproc_ok; then
5894 break
5895 fi
5896
5897 done
5898 ac_cv_prog_CXXCPP=$CXXCPP
5899
5900 fi
5901 CXXCPP=$ac_cv_prog_CXXCPP
5902 else
5903 ac_cv_prog_CXXCPP=$CXXCPP
5904 fi
5905 { echo "$as_me:$LINENO: result: $CXXCPP" >&5
5906 echo "${ECHO_T}$CXXCPP" >&6; }
5907 ac_preproc_ok=false
5908 for ac_cxx_preproc_warn_flag in '' yes
5909 do
5910 # Use a header file that comes with gcc, so configuring glibc
5911 # with a fresh cross-compiler works.
5912 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5913 # <limits.h> exists even on freestanding compilers.
5914 # On the NeXT, cc -E runs the code through the compiler's parser,
5915 # not just through cpp. "Syntax error" is here to catch this case.
5916 cat >conftest.$ac_ext <<_ACEOF
5917 /* confdefs.h. */
5918 _ACEOF
5919 cat confdefs.h >>conftest.$ac_ext
5920 cat >>conftest.$ac_ext <<_ACEOF
5921 /* end confdefs.h. */
5922 #ifdef __STDC__
5923 # include <limits.h>
5924 #else
5925 # include <assert.h>
5926 #endif
5927 Syntax error
5928 _ACEOF
5929 if { (ac_try="$ac_cpp conftest.$ac_ext"
5930 case "(($ac_try" in
5931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5932 *) ac_try_echo=$ac_try;;
5933 esac
5934 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5935 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5936 ac_status=$?
5937 grep -v '^ *+' conftest.er1 >conftest.err
5938 rm -f conftest.er1
5939 cat conftest.err >&5
5940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5941 (exit $ac_status); } >/dev/null && {
5942 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5943 test ! -s conftest.err
5944 }; then
5945 :
5946 else
5947 echo "$as_me: failed program was:" >&5
5948 sed 's/^/| /' conftest.$ac_ext >&5
5949
5950 # Broken: fails on valid input.
5951 continue
5952 fi
5953
5954 rm -f conftest.err conftest.$ac_ext
5955
5956 # OK, works on sane cases. Now check whether nonexistent headers
5957 # can be detected and how.
5958 cat >conftest.$ac_ext <<_ACEOF
5959 /* confdefs.h. */
5960 _ACEOF
5961 cat confdefs.h >>conftest.$ac_ext
5962 cat >>conftest.$ac_ext <<_ACEOF
5963 /* end confdefs.h. */
5964 #include <ac_nonexistent.h>
5965 _ACEOF
5966 if { (ac_try="$ac_cpp conftest.$ac_ext"
5967 case "(($ac_try" in
5968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5969 *) ac_try_echo=$ac_try;;
5970 esac
5971 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5972 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5973 ac_status=$?
5974 grep -v '^ *+' conftest.er1 >conftest.err
5975 rm -f conftest.er1
5976 cat conftest.err >&5
5977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5978 (exit $ac_status); } >/dev/null && {
5979 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
5980 test ! -s conftest.err
5981 }; then
5982 # Broken: success on invalid input.
5983 continue
5984 else
5985 echo "$as_me: failed program was:" >&5
5986 sed 's/^/| /' conftest.$ac_ext >&5
5987
5988 # Passes both tests.
5989 ac_preproc_ok=:
5990 break
5991 fi
5992
5993 rm -f conftest.err conftest.$ac_ext
5994
5995 done
5996 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5997 rm -f conftest.err conftest.$ac_ext
5998 if $ac_preproc_ok; then
5999 :
6000 else
6001 { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
6002 See \`config.log' for more details." >&5
6003 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
6004 See \`config.log' for more details." >&2;}
6005 { (exit 1); exit 1; }; }
6006 fi
6007
6008 ac_ext=cpp
6009 ac_cpp='$CXXCPP $CPPFLAGS'
6010 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6011 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6012 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6013
6014 fi
6015
6016
6017 ac_ext=f
6018 ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
6019 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6020 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
6021 if test -n "$ac_tool_prefix"; then
6022 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
6023 do
6024 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6025 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6026 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6027 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6028 if test "${ac_cv_prog_F77+set}" = set; then
6029 echo $ECHO_N "(cached) $ECHO_C" >&6
6030 else
6031 if test -n "$F77"; then
6032 ac_cv_prog_F77="$F77" # Let the user override the test.
6033 else
6034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035 for as_dir in $PATH
6036 do
6037 IFS=$as_save_IFS
6038 test -z "$as_dir" && as_dir=.
6039 for ac_exec_ext in '' $ac_executable_extensions; do
6040 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6041 ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
6042 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6043 break 2
6044 fi
6045 done
6046 done
6047 IFS=$as_save_IFS
6048
6049 fi
6050 fi
6051 F77=$ac_cv_prog_F77
6052 if test -n "$F77"; then
6053 { echo "$as_me:$LINENO: result: $F77" >&5
6054 echo "${ECHO_T}$F77" >&6; }
6055 else
6056 { echo "$as_me:$LINENO: result: no" >&5
6057 echo "${ECHO_T}no" >&6; }
6058 fi
6059
6060
6061 test -n "$F77" && break
6062 done
6063 fi
6064 if test -z "$F77"; then
6065 ac_ct_F77=$F77
6066 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn
6067 do
6068 # Extract the first word of "$ac_prog", so it can be a program name with args.
6069 set dummy $ac_prog; ac_word=$2
6070 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6071 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6072 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
6073 echo $ECHO_N "(cached) $ECHO_C" >&6
6074 else
6075 if test -n "$ac_ct_F77"; then
6076 ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
6077 else
6078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6079 for as_dir in $PATH
6080 do
6081 IFS=$as_save_IFS
6082 test -z "$as_dir" && as_dir=.
6083 for ac_exec_ext in '' $ac_executable_extensions; do
6084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6085 ac_cv_prog_ac_ct_F77="$ac_prog"
6086 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6087 break 2
6088 fi
6089 done
6090 done
6091 IFS=$as_save_IFS
6092
6093 fi
6094 fi
6095 ac_ct_F77=$ac_cv_prog_ac_ct_F77
6096 if test -n "$ac_ct_F77"; then
6097 { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
6098 echo "${ECHO_T}$ac_ct_F77" >&6; }
6099 else
6100 { echo "$as_me:$LINENO: result: no" >&5
6101 echo "${ECHO_T}no" >&6; }
6102 fi
6103
6104
6105 test -n "$ac_ct_F77" && break
6106 done
6107
6108 if test "x$ac_ct_F77" = x; then
6109 F77=""
6110 else
6111 case $cross_compiling:$ac_tool_warned in
6112 yes:)
6113 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6114 whose name does not start with the host triplet. If you think this
6115 configuration is useful to you, please write to autoconf@gnu.org." >&5
6116 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6117 whose name does not start with the host triplet. If you think this
6118 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6119 ac_tool_warned=yes ;;
6120 esac
6121 F77=$ac_ct_F77
6122 fi
6123 fi
6124
6125
6126 # Provide some information about the compiler.
6127 echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5
6128 ac_compiler=`set X $ac_compile; echo $2`
6129 { (ac_try="$ac_compiler --version >&5"
6130 case "(($ac_try" in
6131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6132 *) ac_try_echo=$ac_try;;
6133 esac
6134 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6135 (eval "$ac_compiler --version >&5") 2>&5
6136 ac_status=$?
6137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6138 (exit $ac_status); }
6139 { (ac_try="$ac_compiler -v >&5"
6140 case "(($ac_try" in
6141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6142 *) ac_try_echo=$ac_try;;
6143 esac
6144 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6145 (eval "$ac_compiler -v >&5") 2>&5
6146 ac_status=$?
6147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6148 (exit $ac_status); }
6149 { (ac_try="$ac_compiler -V >&5"
6150 case "(($ac_try" in
6151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6152 *) ac_try_echo=$ac_try;;
6153 esac
6154 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6155 (eval "$ac_compiler -V >&5") 2>&5
6156 ac_status=$?
6157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6158 (exit $ac_status); }
6159 rm -f a.out
6160
6161 # If we don't use `.F' as extension, the preprocessor is not run on the
6162 # input file. (Note that this only needs to work for GNU compilers.)
6163 ac_save_ext=$ac_ext
6164 ac_ext=F
6165 { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
6166 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; }
6167 if test "${ac_cv_f77_compiler_gnu+set}" = set; then
6168 echo $ECHO_N "(cached) $ECHO_C" >&6
6169 else
6170 cat >conftest.$ac_ext <<_ACEOF
6171 program main
6172 #ifndef __GNUC__
6173 choke me
6174 #endif
6175
6176 end
6177 _ACEOF
6178 rm -f conftest.$ac_objext
6179 if { (ac_try="$ac_compile"
6180 case "(($ac_try" in
6181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6182 *) ac_try_echo=$ac_try;;
6183 esac
6184 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6185 (eval "$ac_compile") 2>conftest.er1
6186 ac_status=$?
6187 grep -v '^ *+' conftest.er1 >conftest.err
6188 rm -f conftest.er1
6189 cat conftest.err >&5
6190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6191 (exit $ac_status); } && {
6192 test -z "$ac_f77_werror_flag" ||
6193 test ! -s conftest.err
6194 } && test -s conftest.$ac_objext; then
6195 ac_compiler_gnu=yes
6196 else
6197 echo "$as_me: failed program was:" >&5
6198 sed 's/^/| /' conftest.$ac_ext >&5
6199
6200 ac_compiler_gnu=no
6201 fi
6202
6203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6204 ac_cv_f77_compiler_gnu=$ac_compiler_gnu
6205
6206 fi
6207 { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
6208 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; }
6209 ac_ext=$ac_save_ext
6210 ac_test_FFLAGS=${FFLAGS+set}
6211 ac_save_FFLAGS=$FFLAGS
6212 FFLAGS=
6213 { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
6214 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; }
6215 if test "${ac_cv_prog_f77_g+set}" = set; then
6216 echo $ECHO_N "(cached) $ECHO_C" >&6
6217 else
6218 FFLAGS=-g
6219 cat >conftest.$ac_ext <<_ACEOF
6220 program main
6221
6222 end
6223 _ACEOF
6224 rm -f conftest.$ac_objext
6225 if { (ac_try="$ac_compile"
6226 case "(($ac_try" in
6227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6228 *) ac_try_echo=$ac_try;;
6229 esac
6230 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6231 (eval "$ac_compile") 2>conftest.er1
6232 ac_status=$?
6233 grep -v '^ *+' conftest.er1 >conftest.err
6234 rm -f conftest.er1
6235 cat conftest.err >&5
6236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6237 (exit $ac_status); } && {
6238 test -z "$ac_f77_werror_flag" ||
6239 test ! -s conftest.err
6240 } && test -s conftest.$ac_objext; then
6241 ac_cv_prog_f77_g=yes
6242 else
6243 echo "$as_me: failed program was:" >&5
6244 sed 's/^/| /' conftest.$ac_ext >&5
6245
6246 ac_cv_prog_f77_g=no
6247 fi
6248
6249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6250
6251 fi
6252 { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
6253 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; }
6254 if test "$ac_test_FFLAGS" = set; then
6255 FFLAGS=$ac_save_FFLAGS
6256 elif test $ac_cv_prog_f77_g = yes; then
6257 if test "x$ac_cv_f77_compiler_gnu" = xyes; then
6258 FFLAGS="-g -O2"
6259 else
6260 FFLAGS="-g"
6261 fi
6262 else
6263 if test "x$ac_cv_f77_compiler_gnu" = xyes; then
6264 FFLAGS="-O2"
6265 else
6266 FFLAGS=
6267 fi
6268 fi
6269
6270 G77=`test $ac_compiler_gnu = yes && echo yes`
6271 ac_ext=c
6272 ac_cpp='$CPP $CPPFLAGS'
6273 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6274 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6275 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6276
6277
6278
6279 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
6280
6281 # find the maximum length of command line arguments
6282 { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
6283 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
6284 if test "${lt_cv_sys_max_cmd_len+set}" = set; then
6285 echo $ECHO_N "(cached) $ECHO_C" >&6
6286 else
6287 i=0
6288 teststring="ABCD"
6289
6290 case $build_os in
6291 msdosdjgpp*)
6292 # On DJGPP, this test can blow up pretty badly due to problems in libc
6293 # (any single argument exceeding 2000 bytes causes a buffer overrun
6294 # during glob expansion). Even if it were fixed, the result of this
6295 # check would be larger than it should be.
6296 lt_cv_sys_max_cmd_len=12288; # 12K is about right
6297 ;;
6298
6299 gnu*)
6300 # Under GNU Hurd, this test is not required because there is
6301 # no limit to the length of command line arguments.
6302 # Libtool will interpret -1 as no limit whatsoever
6303 lt_cv_sys_max_cmd_len=-1;
6304 ;;
6305
6306 cygwin* | mingw*)
6307 # On Win9x/ME, this test blows up -- it succeeds, but takes
6308 # about 5 minutes as the teststring grows exponentially.
6309 # Worse, since 9x/ME are not pre-emptively multitasking,
6310 # you end up with a "frozen" computer, even though with patience
6311 # the test eventually succeeds (with a max line length of 256k).
6312 # Instead, let's just punt: use the minimum linelength reported by
6313 # all of the supported platforms: 8192 (on NT/2K/XP).
6314 lt_cv_sys_max_cmd_len=8192;
6315 ;;
6316
6317 amigaos*)
6318 # On AmigaOS with pdksh, this test takes hours, literally.
6319 # So we just punt and use a minimum line length of 8192.
6320 lt_cv_sys_max_cmd_len=8192;
6321 ;;
6322
6323 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
6324 # This has been around since 386BSD, at least. Likely further.
6325 if test -x /sbin/sysctl; then
6326 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6327 elif test -x /usr/sbin/sysctl; then
6328 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6329 else
6330 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
6331 fi
6332 # And add a safety zone
6333 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6334 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6335 ;;
6336
6337 interix*)
6338 # We know the value 262144 and hardcode it with a safety zone (like BSD)
6339 lt_cv_sys_max_cmd_len=196608
6340 ;;
6341
6342 osf*)
6343 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6344 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6345 # nice to cause kernel panics so lets avoid the loop below.
6346 # First set a reasonable default.
6347 lt_cv_sys_max_cmd_len=16384
6348 #
6349 if test -x /sbin/sysconfig; then
6350 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6351 *1*) lt_cv_sys_max_cmd_len=-1 ;;
6352 esac
6353 fi
6354 ;;
6355 sco3.2v5*)
6356 lt_cv_sys_max_cmd_len=102400
6357 ;;
6358 sysv5* | sco5v6* | sysv4.2uw2*)
6359 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6360 if test -n "$kargmax"; then
6361 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
6362 else
6363 lt_cv_sys_max_cmd_len=32768
6364 fi
6365 ;;
6366 *)
6367 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
6368 if test -n "$lt_cv_sys_max_cmd_len"; then
6369 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6370 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6371 else
6372 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6373 while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
6374 = "XX$teststring") >/dev/null 2>&1 &&
6375 new_result=`expr "X$teststring" : ".*" 2>&1` &&
6376 lt_cv_sys_max_cmd_len=$new_result &&
6377 test $i != 17 # 1/2 MB should be enough
6378 do
6379 i=`expr $i + 1`
6380 teststring=$teststring$teststring
6381 done
6382 teststring=
6383 # Add a significant safety factor because C++ compilers can tack on massive
6384 # amounts of additional arguments before passing them to the linker.
6385 # It appears as though 1/2 is a usable value.
6386 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6387 fi
6388 ;;
6389 esac
6390
6391 fi
6392
6393 if test -n $lt_cv_sys_max_cmd_len ; then
6394 { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
6395 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
6396 else
6397 { echo "$as_me:$LINENO: result: none" >&5
6398 echo "${ECHO_T}none" >&6; }
6399 fi
6400
6401
6402
6403
6404
6405 # Check for command to grab the raw symbol name followed by C symbol from nm.
6406 { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
6407 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
6408 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
6409 echo $ECHO_N "(cached) $ECHO_C" >&6
6410 else
6411
6412 # These are sane defaults that work on at least a few old systems.
6413 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
6414
6415 # Character class describing NM global symbol codes.
6416 symcode='[BCDEGRST]'
6417
6418 # Regexp to match symbols that can be accessed directly from C.
6419 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
6420
6421 # Transform an extracted symbol line into a proper C declaration
6422 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6423
6424 # Transform an extracted symbol line into symbol name and symbol address
6425 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6426
6427 # Define system-specific variables.
6428 case $host_os in
6429 aix*)
6430 symcode='[BCDT]'
6431 ;;
6432 cygwin* | mingw* | pw32*)
6433 symcode='[ABCDGISTW]'
6434 ;;
6435 hpux*) # Its linker distinguishes data from code symbols
6436 if test "$host_cpu" = ia64; then
6437 symcode='[ABCDEGRST]'
6438 fi
6439 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6440 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6441 ;;
6442 linux* | k*bsd*-gnu)
6443 if test "$host_cpu" = ia64; then
6444 symcode='[ABCDGIRSTW]'
6445 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6446 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6447 fi
6448 ;;
6449 irix* | nonstopux*)
6450 symcode='[BCDEGRST]'
6451 ;;
6452 osf*)
6453 symcode='[BCDEGQRST]'
6454 ;;
6455 solaris*)
6456 symcode='[BDRT]'
6457 ;;
6458 sco3.2v5*)
6459 symcode='[DT]'
6460 ;;
6461 sysv4.2uw2*)
6462 symcode='[DT]'
6463 ;;
6464 sysv5* | sco5v6* | unixware* | OpenUNIX*)
6465 symcode='[ABDT]'
6466 ;;
6467 sysv4)
6468 symcode='[DFNSTU]'
6469 ;;
6470 esac
6471
6472 # Handle CRLF in mingw tool chain
6473 opt_cr=
6474 case $build_os in
6475 mingw*)
6476 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6477 ;;
6478 esac
6479
6480 # If we're using GNU nm, then use its standard symbol codes.
6481 case `$NM -V 2>&1` in
6482 *GNU* | *'with BFD'*)
6483 symcode='[ABCDGIRSTW]' ;;
6484 esac
6485
6486 # Try without a prefix undercore, then with it.
6487 for ac_symprfx in "" "_"; do
6488
6489 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6490 symxfrm="\\1 $ac_symprfx\\2 \\2"
6491
6492 # Write the raw and C identifiers.
6493 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6494
6495 # Check to see that the pipe works correctly.
6496 pipe_works=no
6497
6498 rm -f conftest*
6499 cat > conftest.$ac_ext <<EOF
6500 #ifdef __cplusplus
6501 extern "C" {
6502 #endif
6503 char nm_test_var;
6504 void nm_test_func(){}
6505 #ifdef __cplusplus
6506 }
6507 #endif
6508 int main(){nm_test_var='a';nm_test_func();return(0);}
6509 EOF
6510
6511 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6512 (eval $ac_compile) 2>&5
6513 ac_status=$?
6514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6515 (exit $ac_status); }; then
6516 # Now try to grab the symbols.
6517 nlist=conftest.nm
6518 if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
6519 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
6520 ac_status=$?
6521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6522 (exit $ac_status); } && test -s "$nlist"; then
6523 # Try sorting and uniquifying the output.
6524 if sort "$nlist" | uniq > "$nlist"T; then
6525 mv -f "$nlist"T "$nlist"
6526 else
6527 rm -f "$nlist"T
6528 fi
6529
6530 # Make sure that we snagged all the symbols we need.
6531 if grep ' nm_test_var$' "$nlist" >/dev/null; then
6532 if grep ' nm_test_func$' "$nlist" >/dev/null; then
6533 cat <<EOF > conftest.$ac_ext
6534 #ifdef __cplusplus
6535 extern "C" {
6536 #endif
6537
6538 EOF
6539 # Now generate the symbol file.
6540 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6541
6542 cat <<EOF >> conftest.$ac_ext
6543 #if defined (__STDC__) && __STDC__
6544 # define lt_ptr_t void *
6545 #else
6546 # define lt_ptr_t char *
6547 # define const
6548 #endif
6549
6550 /* The mapping between symbol names and symbols. */
6551 const struct {
6552 const char *name;
6553 lt_ptr_t address;
6554 }
6555 lt_preloaded_symbols[] =
6556 {
6557 EOF
6558 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6559 cat <<\EOF >> conftest.$ac_ext
6560 {0, (lt_ptr_t) 0}
6561 };
6562
6563 #ifdef __cplusplus
6564 }
6565 #endif
6566 EOF
6567 # Now try linking the two files.
6568 mv conftest.$ac_objext conftstm.$ac_objext
6569 lt_save_LIBS="$LIBS"
6570 lt_save_CFLAGS="$CFLAGS"
6571 LIBS="conftstm.$ac_objext"
6572 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
6573 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6574 (eval $ac_link) 2>&5
6575 ac_status=$?
6576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577 (exit $ac_status); } && test -s conftest${ac_exeext}; then
6578 pipe_works=yes
6579 fi
6580 LIBS="$lt_save_LIBS"
6581 CFLAGS="$lt_save_CFLAGS"
6582 else
6583 echo "cannot find nm_test_func in $nlist" >&5
6584 fi
6585 else
6586 echo "cannot find nm_test_var in $nlist" >&5
6587 fi
6588 else
6589 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
6590 fi
6591 else
6592 echo "$progname: failed program was:" >&5
6593 cat conftest.$ac_ext >&5
6594 fi
6595 rm -f conftest* conftst*
6596
6597 # Do not use the global_symbol_pipe unless it works.
6598 if test "$pipe_works" = yes; then
6599 break
6600 else
6601 lt_cv_sys_global_symbol_pipe=
6602 fi
6603 done
6604
6605 fi
6606
6607 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6608 lt_cv_sys_global_symbol_to_cdecl=
6609 fi
6610 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6611 { echo "$as_me:$LINENO: result: failed" >&5
6612 echo "${ECHO_T}failed" >&6; }
6613 else
6614 { echo "$as_me:$LINENO: result: ok" >&5
6615 echo "${ECHO_T}ok" >&6; }
6616 fi
6617
6618 { echo "$as_me:$LINENO: checking for objdir" >&5
6619 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
6620 if test "${lt_cv_objdir+set}" = set; then
6621 echo $ECHO_N "(cached) $ECHO_C" >&6
6622 else
6623 rm -f .libs 2>/dev/null
6624 mkdir .libs 2>/dev/null
6625 if test -d .libs; then
6626 lt_cv_objdir=.libs
6627 else
6628 # MS-DOS does not allow filenames that begin with a dot.
6629 lt_cv_objdir=_libs
6630 fi
6631 rmdir .libs 2>/dev/null
6632 fi
6633 { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
6634 echo "${ECHO_T}$lt_cv_objdir" >&6; }
6635 objdir=$lt_cv_objdir
6636
6637
6638
6639
6640
6641 case $host_os in
6642 aix3*)
6643 # AIX sometimes has problems with the GCC collect2 program. For some
6644 # reason, if we set the COLLECT_NAMES environment variable, the problems
6645 # vanish in a puff of smoke.
6646 if test "X${COLLECT_NAMES+set}" != Xset; then
6647 COLLECT_NAMES=
6648 export COLLECT_NAMES
6649 fi
6650 ;;
6651 esac
6652
6653 # Sed substitution that helps us do robust quoting. It backslashifies
6654 # metacharacters that are still active within double-quoted strings.
6655 Xsed='sed -e 1s/^X//'
6656 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
6657
6658 # Same as above, but do not quote variable references.
6659 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
6660
6661 # Sed substitution to delay expansion of an escaped shell variable in a
6662 # double_quote_subst'ed string.
6663 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6664
6665 # Sed substitution to avoid accidental globbing in evaled expressions
6666 no_glob_subst='s/\*/\\\*/g'
6667
6668 # Constants:
6669 rm="rm -f"
6670
6671 # Global variables:
6672 default_ofile=libtool
6673 can_build_shared=yes
6674
6675 # All known linkers require a `.a' archive for static linking (except MSVC,
6676 # which needs '.lib').
6677 libext=a
6678 ltmain="$ac_aux_dir/ltmain.sh"
6679 ofile="$default_ofile"
6680 with_gnu_ld="$lt_cv_prog_gnu_ld"
6681
6682 if test -n "$ac_tool_prefix"; then
6683 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6684 set dummy ${ac_tool_prefix}ar; ac_word=$2
6685 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6686 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6687 if test "${ac_cv_prog_AR+set}" = set; then
6688 echo $ECHO_N "(cached) $ECHO_C" >&6
6689 else
6690 if test -n "$AR"; then
6691 ac_cv_prog_AR="$AR" # Let the user override the test.
6692 else
6693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6694 for as_dir in $PATH
6695 do
6696 IFS=$as_save_IFS
6697 test -z "$as_dir" && as_dir=.
6698 for ac_exec_ext in '' $ac_executable_extensions; do
6699 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6700 ac_cv_prog_AR="${ac_tool_prefix}ar"
6701 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6702 break 2
6703 fi
6704 done
6705 done
6706 IFS=$as_save_IFS
6707
6708 fi
6709 fi
6710 AR=$ac_cv_prog_AR
6711 if test -n "$AR"; then
6712 { echo "$as_me:$LINENO: result: $AR" >&5
6713 echo "${ECHO_T}$AR" >&6; }
6714 else
6715 { echo "$as_me:$LINENO: result: no" >&5
6716 echo "${ECHO_T}no" >&6; }
6717 fi
6718
6719
6720 fi
6721 if test -z "$ac_cv_prog_AR"; then
6722 ac_ct_AR=$AR
6723 # Extract the first word of "ar", so it can be a program name with args.
6724 set dummy ar; ac_word=$2
6725 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6726 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6727 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
6728 echo $ECHO_N "(cached) $ECHO_C" >&6
6729 else
6730 if test -n "$ac_ct_AR"; then
6731 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6732 else
6733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6734 for as_dir in $PATH
6735 do
6736 IFS=$as_save_IFS
6737 test -z "$as_dir" && as_dir=.
6738 for ac_exec_ext in '' $ac_executable_extensions; do
6739 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6740 ac_cv_prog_ac_ct_AR="ar"
6741 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6742 break 2
6743 fi
6744 done
6745 done
6746 IFS=$as_save_IFS
6747
6748 fi
6749 fi
6750 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6751 if test -n "$ac_ct_AR"; then
6752 { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
6753 echo "${ECHO_T}$ac_ct_AR" >&6; }
6754 else
6755 { echo "$as_me:$LINENO: result: no" >&5
6756 echo "${ECHO_T}no" >&6; }
6757 fi
6758
6759 if test "x$ac_ct_AR" = x; then
6760 AR="false"
6761 else
6762 case $cross_compiling:$ac_tool_warned in
6763 yes:)
6764 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6765 whose name does not start with the host triplet. If you think this
6766 configuration is useful to you, please write to autoconf@gnu.org." >&5
6767 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6768 whose name does not start with the host triplet. If you think this
6769 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6770 ac_tool_warned=yes ;;
6771 esac
6772 AR=$ac_ct_AR
6773 fi
6774 else
6775 AR="$ac_cv_prog_AR"
6776 fi
6777
6778 if test -n "$ac_tool_prefix"; then
6779 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6780 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6781 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6782 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6783 if test "${ac_cv_prog_RANLIB+set}" = set; then
6784 echo $ECHO_N "(cached) $ECHO_C" >&6
6785 else
6786 if test -n "$RANLIB"; then
6787 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6788 else
6789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6790 for as_dir in $PATH
6791 do
6792 IFS=$as_save_IFS
6793 test -z "$as_dir" && as_dir=.
6794 for ac_exec_ext in '' $ac_executable_extensions; do
6795 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6796 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6797 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6798 break 2
6799 fi
6800 done
6801 done
6802 IFS=$as_save_IFS
6803
6804 fi
6805 fi
6806 RANLIB=$ac_cv_prog_RANLIB
6807 if test -n "$RANLIB"; then
6808 { echo "$as_me:$LINENO: result: $RANLIB" >&5
6809 echo "${ECHO_T}$RANLIB" >&6; }
6810 else
6811 { echo "$as_me:$LINENO: result: no" >&5
6812 echo "${ECHO_T}no" >&6; }
6813 fi
6814
6815
6816 fi
6817 if test -z "$ac_cv_prog_RANLIB"; then
6818 ac_ct_RANLIB=$RANLIB
6819 # Extract the first word of "ranlib", so it can be a program name with args.
6820 set dummy ranlib; ac_word=$2
6821 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6822 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6823 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
6824 echo $ECHO_N "(cached) $ECHO_C" >&6
6825 else
6826 if test -n "$ac_ct_RANLIB"; then
6827 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6828 else
6829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6830 for as_dir in $PATH
6831 do
6832 IFS=$as_save_IFS
6833 test -z "$as_dir" && as_dir=.
6834 for ac_exec_ext in '' $ac_executable_extensions; do
6835 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6836 ac_cv_prog_ac_ct_RANLIB="ranlib"
6837 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6838 break 2
6839 fi
6840 done
6841 done
6842 IFS=$as_save_IFS
6843
6844 fi
6845 fi
6846 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6847 if test -n "$ac_ct_RANLIB"; then
6848 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
6849 echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
6850 else
6851 { echo "$as_me:$LINENO: result: no" >&5
6852 echo "${ECHO_T}no" >&6; }
6853 fi
6854
6855 if test "x$ac_ct_RANLIB" = x; then
6856 RANLIB=":"
6857 else
6858 case $cross_compiling:$ac_tool_warned in
6859 yes:)
6860 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6861 whose name does not start with the host triplet. If you think this
6862 configuration is useful to you, please write to autoconf@gnu.org." >&5
6863 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6864 whose name does not start with the host triplet. If you think this
6865 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6866 ac_tool_warned=yes ;;
6867 esac
6868 RANLIB=$ac_ct_RANLIB
6869 fi
6870 else
6871 RANLIB="$ac_cv_prog_RANLIB"
6872 fi
6873
6874 if test -n "$ac_tool_prefix"; then
6875 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
6876 set dummy ${ac_tool_prefix}strip; ac_word=$2
6877 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6878 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6879 if test "${ac_cv_prog_STRIP+set}" = set; then
6880 echo $ECHO_N "(cached) $ECHO_C" >&6
6881 else
6882 if test -n "$STRIP"; then
6883 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
6884 else
6885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6886 for as_dir in $PATH
6887 do
6888 IFS=$as_save_IFS
6889 test -z "$as_dir" && as_dir=.
6890 for ac_exec_ext in '' $ac_executable_extensions; do
6891 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6892 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
6893 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6894 break 2
6895 fi
6896 done
6897 done
6898 IFS=$as_save_IFS
6899
6900 fi
6901 fi
6902 STRIP=$ac_cv_prog_STRIP
6903 if test -n "$STRIP"; then
6904 { echo "$as_me:$LINENO: result: $STRIP" >&5
6905 echo "${ECHO_T}$STRIP" >&6; }
6906 else
6907 { echo "$as_me:$LINENO: result: no" >&5
6908 echo "${ECHO_T}no" >&6; }
6909 fi
6910
6911
6912 fi
6913 if test -z "$ac_cv_prog_STRIP"; then
6914 ac_ct_STRIP=$STRIP
6915 # Extract the first word of "strip", so it can be a program name with args.
6916 set dummy strip; ac_word=$2
6917 { echo "$as_me:$LINENO: checking for $ac_word" >&5
6918 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6919 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
6920 echo $ECHO_N "(cached) $ECHO_C" >&6
6921 else
6922 if test -n "$ac_ct_STRIP"; then
6923 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
6924 else
6925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6926 for as_dir in $PATH
6927 do
6928 IFS=$as_save_IFS
6929 test -z "$as_dir" && as_dir=.
6930 for ac_exec_ext in '' $ac_executable_extensions; do
6931 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6932 ac_cv_prog_ac_ct_STRIP="strip"
6933 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6934 break 2
6935 fi
6936 done
6937 done
6938 IFS=$as_save_IFS
6939
6940 fi
6941 fi
6942 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
6943 if test -n "$ac_ct_STRIP"; then
6944 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
6945 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
6946 else
6947 { echo "$as_me:$LINENO: result: no" >&5
6948 echo "${ECHO_T}no" >&6; }
6949 fi
6950
6951 if test "x$ac_ct_STRIP" = x; then
6952 STRIP=":"
6953 else
6954 case $cross_compiling:$ac_tool_warned in
6955 yes:)
6956 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
6957 whose name does not start with the host triplet. If you think this
6958 configuration is useful to you, please write to autoconf@gnu.org." >&5
6959 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
6960 whose name does not start with the host triplet. If you think this
6961 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
6962 ac_tool_warned=yes ;;
6963 esac
6964 STRIP=$ac_ct_STRIP
6965 fi
6966 else
6967 STRIP="$ac_cv_prog_STRIP"
6968 fi
6969
6970
6971 old_CC="$CC"
6972 old_CFLAGS="$CFLAGS"
6973
6974 # Set sane defaults for various variables
6975 test -z "$AR" && AR=ar
6976 test -z "$AR_FLAGS" && AR_FLAGS=cru
6977 test -z "$AS" && AS=as
6978 test -z "$CC" && CC=cc
6979 test -z "$LTCC" && LTCC=$CC
6980 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
6981 test -z "$DLLTOOL" && DLLTOOL=dlltool
6982 test -z "$LD" && LD=ld
6983 test -z "$LN_S" && LN_S="ln -s"
6984 test -z "$MAGIC_CMD" && MAGIC_CMD=file
6985 test -z "$NM" && NM=nm
6986 test -z "$SED" && SED=sed
6987 test -z "$OBJDUMP" && OBJDUMP=objdump
6988 test -z "$RANLIB" && RANLIB=:
6989 test -z "$STRIP" && STRIP=:
6990 test -z "$ac_objext" && ac_objext=o
6991
6992 # Determine commands to create old-style static archives.
6993 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
6994 old_postinstall_cmds='chmod 644 $oldlib'
6995 old_postuninstall_cmds=
6996
6997 if test -n "$RANLIB"; then
6998 case $host_os in
6999 openbsd*)
7000 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
7001 ;;
7002 *)
7003 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
7004 ;;
7005 esac
7006 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
7007 fi
7008
7009 for cc_temp in $compiler""; do
7010 case $cc_temp in
7011 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7012 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7013 \-*) ;;
7014 *) break;;
7015 esac
7016 done
7017 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7018
7019
7020 # Only perform the check for file, if the check method requires it
7021 case $deplibs_check_method in
7022 file_magic*)
7023 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
7024 { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
7025 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
7026 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7027 echo $ECHO_N "(cached) $ECHO_C" >&6
7028 else
7029 case $MAGIC_CMD in
7030 [\\/*] | ?:[\\/]*)
7031 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7032 ;;
7033 *)
7034 lt_save_MAGIC_CMD="$MAGIC_CMD"
7035 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7036 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7037 for ac_dir in $ac_dummy; do
7038 IFS="$lt_save_ifs"
7039 test -z "$ac_dir" && ac_dir=.
7040 if test -f $ac_dir/${ac_tool_prefix}file; then
7041 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
7042 if test -n "$file_magic_test_file"; then
7043 case $deplibs_check_method in
7044 "file_magic "*)
7045 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7046 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7047 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7048 $EGREP "$file_magic_regex" > /dev/null; then
7049 :
7050 else
7051 cat <<EOF 1>&2
7052
7053 *** Warning: the command libtool uses to detect shared libraries,
7054 *** $file_magic_cmd, produces output that libtool cannot recognize.
7055 *** The result is that libtool may fail to recognize shared libraries
7056 *** as such. This will affect the creation of libtool libraries that
7057 *** depend on shared libraries, but programs linked with such libtool
7058 *** libraries will work regardless of this problem. Nevertheless, you
7059 *** may want to report the problem to your system manager and/or to
7060 *** bug-libtool@gnu.org
7061
7062 EOF
7063 fi ;;
7064 esac
7065 fi
7066 break
7067 fi
7068 done
7069 IFS="$lt_save_ifs"
7070 MAGIC_CMD="$lt_save_MAGIC_CMD"
7071 ;;
7072 esac
7073 fi
7074
7075 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7076 if test -n "$MAGIC_CMD"; then
7077 { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7078 echo "${ECHO_T}$MAGIC_CMD" >&6; }
7079 else
7080 { echo "$as_me:$LINENO: result: no" >&5
7081 echo "${ECHO_T}no" >&6; }
7082 fi
7083
7084 if test -z "$lt_cv_path_MAGIC_CMD"; then
7085 if test -n "$ac_tool_prefix"; then
7086 { echo "$as_me:$LINENO: checking for file" >&5
7087 echo $ECHO_N "checking for file... $ECHO_C" >&6; }
7088 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
7089 echo $ECHO_N "(cached) $ECHO_C" >&6
7090 else
7091 case $MAGIC_CMD in
7092 [\\/*] | ?:[\\/]*)
7093 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
7094 ;;
7095 *)
7096 lt_save_MAGIC_CMD="$MAGIC_CMD"
7097 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
7098 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
7099 for ac_dir in $ac_dummy; do
7100 IFS="$lt_save_ifs"
7101 test -z "$ac_dir" && ac_dir=.
7102 if test -f $ac_dir/file; then
7103 lt_cv_path_MAGIC_CMD="$ac_dir/file"
7104 if test -n "$file_magic_test_file"; then
7105 case $deplibs_check_method in
7106 "file_magic "*)
7107 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
7108 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7109 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
7110 $EGREP "$file_magic_regex" > /dev/null; then
7111 :
7112 else
7113 cat <<EOF 1>&2
7114
7115 *** Warning: the command libtool uses to detect shared libraries,
7116 *** $file_magic_cmd, produces output that libtool cannot recognize.
7117 *** The result is that libtool may fail to recognize shared libraries
7118 *** as such. This will affect the creation of libtool libraries that
7119 *** depend on shared libraries, but programs linked with such libtool
7120 *** libraries will work regardless of this problem. Nevertheless, you
7121 *** may want to report the problem to your system manager and/or to
7122 *** bug-libtool@gnu.org
7123
7124 EOF
7125 fi ;;
7126 esac
7127 fi
7128 break
7129 fi
7130 done
7131 IFS="$lt_save_ifs"
7132 MAGIC_CMD="$lt_save_MAGIC_CMD"
7133 ;;
7134 esac
7135 fi
7136
7137 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
7138 if test -n "$MAGIC_CMD"; then
7139 { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
7140 echo "${ECHO_T}$MAGIC_CMD" >&6; }
7141 else
7142 { echo "$as_me:$LINENO: result: no" >&5
7143 echo "${ECHO_T}no" >&6; }
7144 fi
7145
7146 else
7147 MAGIC_CMD=:
7148 fi
7149 fi
7150
7151 fi
7152 ;;
7153 esac
7154
7155 enable_dlopen=no
7156 enable_win32_dll=no
7157
7158 # Check whether --enable-libtool-lock was given.
7159 if test "${enable_libtool_lock+set}" = set; then
7160 enableval=$enable_libtool_lock;
7161 fi
7162
7163 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
7164
7165
7166 # Check whether --with-pic was given.
7167 if test "${with_pic+set}" = set; then
7168 withval=$with_pic; pic_mode="$withval"
7169 else
7170 pic_mode=default
7171 fi
7172
7173 test -z "$pic_mode" && pic_mode=default
7174
7175 # Use C for the default configuration in the libtool script
7176 tagname=
7177 lt_save_CC="$CC"
7178 ac_ext=c
7179 ac_cpp='$CPP $CPPFLAGS'
7180 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7181 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7182 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7183
7184
7185 # Source file extension for C test sources.
7186 ac_ext=c
7187
7188 # Object file extension for compiled C test sources.
7189 objext=o
7190 objext=$objext
7191
7192 # Code to be used in simple compile tests
7193 lt_simple_compile_test_code="int some_variable = 0;"
7194
7195 # Code to be used in simple link tests
7196 lt_simple_link_test_code='int main(){return(0);}'
7197
7198
7199 # If no C compiler was specified, use CC.
7200 LTCC=${LTCC-"$CC"}
7201
7202 # If no C compiler flags were specified, use CFLAGS.
7203 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7204
7205 # Allow CC to be a program name with arguments.
7206 compiler=$CC
7207
7208
7209 # save warnings/boilerplate of simple test code
7210 ac_outfile=conftest.$ac_objext
7211 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
7212 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7213 _lt_compiler_boilerplate=`cat conftest.err`
7214 $rm conftest*
7215
7216 ac_outfile=conftest.$ac_objext
7217 echo "$lt_simple_link_test_code" >conftest.$ac_ext
7218 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
7219 _lt_linker_boilerplate=`cat conftest.err`
7220 $rm conftest*
7221
7222
7223
7224 lt_prog_compiler_no_builtin_flag=
7225
7226 if test "$GCC" = yes; then
7227 lt_prog_compiler_no_builtin_flag=' -fno-builtin'
7228
7229
7230 { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
7231 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
7232 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
7233 echo $ECHO_N "(cached) $ECHO_C" >&6
7234 else
7235 lt_cv_prog_compiler_rtti_exceptions=no
7236 ac_outfile=conftest.$ac_objext
7237 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7238 lt_compiler_flag="-fno-rtti -fno-exceptions"
7239 # Insert the option either (1) after the last *FLAGS variable, or
7240 # (2) before a word containing "conftest.", or (3) at the end.
7241 # Note that $ac_compile itself does not contain backslashes and begins
7242 # with a dollar sign (not a hyphen), so the echo should work correctly.
7243 # The option is referenced via a variable to avoid confusing sed.
7244 lt_compile=`echo "$ac_compile" | $SED \
7245 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7246 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7247 -e 's:$: $lt_compiler_flag:'`
7248 (eval echo "\"\$as_me:7249: $lt_compile\"" >&5)
7249 (eval "$lt_compile" 2>conftest.err)
7250 ac_status=$?
7251 cat conftest.err >&5
7252 echo "$as_me:7253: \$? = $ac_status" >&5
7253 if (exit $ac_status) && test -s "$ac_outfile"; then
7254 # The compiler can only warn and ignore the option if not recognized
7255 # So say no if there are warnings other than the usual output.
7256 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7257 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7258 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7259 lt_cv_prog_compiler_rtti_exceptions=yes
7260 fi
7261 fi
7262 $rm conftest*
7263
7264 fi
7265 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
7266 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
7267
7268 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
7269 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
7270 else
7271 :
7272 fi
7273
7274 fi
7275
7276 lt_prog_compiler_wl=
7277 lt_prog_compiler_pic=
7278 lt_prog_compiler_static=
7279
7280 { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
7281 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
7282
7283 if test "$GCC" = yes; then
7284 lt_prog_compiler_wl='-Wl,'
7285 lt_prog_compiler_static='-static'
7286
7287 case $host_os in
7288 aix*)
7289 # All AIX code is PIC.
7290 if test "$host_cpu" = ia64; then
7291 # AIX 5 now supports IA64 processor
7292 lt_prog_compiler_static='-Bstatic'
7293 fi
7294 ;;
7295
7296 amigaos*)
7297 # FIXME: we need at least 68020 code to build shared libraries, but
7298 # adding the `-m68020' flag to GCC prevents building anything better,
7299 # like `-m68040'.
7300 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
7301 ;;
7302
7303 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
7304 # PIC is the default for these OSes.
7305 ;;
7306
7307 mingw* | cygwin* | pw32* | os2*)
7308 # This hack is so that the source file can tell whether it is being
7309 # built for inclusion in a dll (and should export symbols for example).
7310 # Although the cygwin gcc ignores -fPIC, still need this for old-style
7311 # (--disable-auto-import) libraries
7312 lt_prog_compiler_pic='-DDLL_EXPORT'
7313 ;;
7314
7315 darwin* | rhapsody*)
7316 # PIC is the default on this platform
7317 # Common symbols not allowed in MH_DYLIB files
7318 lt_prog_compiler_pic='-fno-common'
7319 ;;
7320
7321 interix[3-9]*)
7322 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
7323 # Instead, we relocate shared libraries at runtime.
7324 ;;
7325
7326 msdosdjgpp*)
7327 # Just because we use GCC doesn't mean we suddenly get shared libraries
7328 # on systems that don't support them.
7329 lt_prog_compiler_can_build_shared=no
7330 enable_shared=no
7331 ;;
7332
7333 sysv4*MP*)
7334 if test -d /usr/nec; then
7335 lt_prog_compiler_pic=-Kconform_pic
7336 fi
7337 ;;
7338
7339 hpux*)
7340 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7341 # not for PA HP-UX.
7342 case $host_cpu in
7343 hppa*64*|ia64*)
7344 # +Z the default
7345 ;;
7346 *)
7347 lt_prog_compiler_pic='-fPIC'
7348 ;;
7349 esac
7350 ;;
7351
7352 *)
7353 lt_prog_compiler_pic='-fPIC'
7354 ;;
7355 esac
7356 else
7357 # PORTME Check for flag to pass linker flags through the system compiler.
7358 case $host_os in
7359 aix*)
7360 lt_prog_compiler_wl='-Wl,'
7361 if test "$host_cpu" = ia64; then
7362 # AIX 5 now supports IA64 processor
7363 lt_prog_compiler_static='-Bstatic'
7364 else
7365 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
7366 fi
7367 ;;
7368 darwin*)
7369 # PIC is the default on this platform
7370 # Common symbols not allowed in MH_DYLIB files
7371 case $cc_basename in
7372 xlc*)
7373 lt_prog_compiler_pic='-qnocommon'
7374 lt_prog_compiler_wl='-Wl,'
7375 ;;
7376 esac
7377 ;;
7378
7379 mingw* | cygwin* | pw32* | os2*)
7380 # This hack is so that the source file can tell whether it is being
7381 # built for inclusion in a dll (and should export symbols for example).
7382 lt_prog_compiler_pic='-DDLL_EXPORT'
7383 ;;
7384
7385 hpux9* | hpux10* | hpux11*)
7386 lt_prog_compiler_wl='-Wl,'
7387 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7388 # not for PA HP-UX.
7389 case $host_cpu in
7390 hppa*64*|ia64*)
7391 # +Z the default
7392 ;;
7393 *)
7394 lt_prog_compiler_pic='+Z'
7395 ;;
7396 esac
7397 # Is there a better lt_prog_compiler_static that works with the bundled CC?
7398 lt_prog_compiler_static='${wl}-a ${wl}archive'
7399 ;;
7400
7401 irix5* | irix6* | nonstopux*)
7402 lt_prog_compiler_wl='-Wl,'
7403 # PIC (with -KPIC) is the default.
7404 lt_prog_compiler_static='-non_shared'
7405 ;;
7406
7407 newsos6)
7408 lt_prog_compiler_pic='-KPIC'
7409 lt_prog_compiler_static='-Bstatic'
7410 ;;
7411
7412 linux* | k*bsd*-gnu)
7413 case $cc_basename in
7414 icc* | ecc*)
7415 lt_prog_compiler_wl='-Wl,'
7416 lt_prog_compiler_pic='-KPIC'
7417 lt_prog_compiler_static='-static'
7418 ;;
7419 pgcc* | pgf77* | pgf90* | pgf95*)
7420 # Portland Group compilers (*not* the Pentium gcc compiler,
7421 # which looks to be a dead project)
7422 lt_prog_compiler_wl='-Wl,'
7423 lt_prog_compiler_pic='-fpic'
7424 lt_prog_compiler_static='-Bstatic'
7425 ;;
7426 ccc*)
7427 lt_prog_compiler_wl='-Wl,'
7428 # All Alpha code is PIC.
7429 lt_prog_compiler_static='-non_shared'
7430 ;;
7431 *)
7432 case `$CC -V 2>&1 | sed 5q` in
7433 *Sun\ C*)
7434 # Sun C 5.9
7435 lt_prog_compiler_pic='-KPIC'
7436 lt_prog_compiler_static='-Bstatic'
7437 lt_prog_compiler_wl='-Wl,'
7438 ;;
7439 *Sun\ F*)
7440 # Sun Fortran 8.3 passes all unrecognized flags to the linker
7441 lt_prog_compiler_pic='-KPIC'
7442 lt_prog_compiler_static='-Bstatic'
7443 lt_prog_compiler_wl=''
7444 ;;
7445 esac
7446 ;;
7447 esac
7448 ;;
7449
7450 osf3* | osf4* | osf5*)
7451 lt_prog_compiler_wl='-Wl,'
7452 # All OSF/1 code is PIC.
7453 lt_prog_compiler_static='-non_shared'
7454 ;;
7455
7456 rdos*)
7457 lt_prog_compiler_static='-non_shared'
7458 ;;
7459
7460 solaris*)
7461 lt_prog_compiler_pic='-KPIC'
7462 lt_prog_compiler_static='-Bstatic'
7463 case $cc_basename in
7464 f77* | f90* | f95*)
7465 lt_prog_compiler_wl='-Qoption ld ';;
7466 *)
7467 lt_prog_compiler_wl='-Wl,';;
7468 esac
7469 ;;
7470
7471 sunos4*)
7472 lt_prog_compiler_wl='-Qoption ld '
7473 lt_prog_compiler_pic='-PIC'
7474 lt_prog_compiler_static='-Bstatic'
7475 ;;
7476
7477 sysv4 | sysv4.2uw2* | sysv4.3*)
7478 lt_prog_compiler_wl='-Wl,'
7479 lt_prog_compiler_pic='-KPIC'
7480 lt_prog_compiler_static='-Bstatic'
7481 ;;
7482
7483 sysv4*MP*)
7484 if test -d /usr/nec ;then
7485 lt_prog_compiler_pic='-Kconform_pic'
7486 lt_prog_compiler_static='-Bstatic'
7487 fi
7488 ;;
7489
7490 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7491 lt_prog_compiler_wl='-Wl,'
7492 lt_prog_compiler_pic='-KPIC'
7493 lt_prog_compiler_static='-Bstatic'
7494 ;;
7495
7496 unicos*)
7497 lt_prog_compiler_wl='-Wl,'
7498 lt_prog_compiler_can_build_shared=no
7499 ;;
7500
7501 uts4*)
7502 lt_prog_compiler_pic='-pic'
7503 lt_prog_compiler_static='-Bstatic'
7504 ;;
7505
7506 *)
7507 lt_prog_compiler_can_build_shared=no
7508 ;;
7509 esac
7510 fi
7511
7512 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
7513 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
7514
7515 #
7516 # Check to make sure the PIC flag actually works.
7517 #
7518 if test -n "$lt_prog_compiler_pic"; then
7519
7520 { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
7521 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
7522 if test "${lt_prog_compiler_pic_works+set}" = set; then
7523 echo $ECHO_N "(cached) $ECHO_C" >&6
7524 else
7525 lt_prog_compiler_pic_works=no
7526 ac_outfile=conftest.$ac_objext
7527 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7528 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
7529 # Insert the option either (1) after the last *FLAGS variable, or
7530 # (2) before a word containing "conftest.", or (3) at the end.
7531 # Note that $ac_compile itself does not contain backslashes and begins
7532 # with a dollar sign (not a hyphen), so the echo should work correctly.
7533 # The option is referenced via a variable to avoid confusing sed.
7534 lt_compile=`echo "$ac_compile" | $SED \
7535 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7536 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7537 -e 's:$: $lt_compiler_flag:'`
7538 (eval echo "\"\$as_me:7539: $lt_compile\"" >&5)
7539 (eval "$lt_compile" 2>conftest.err)
7540 ac_status=$?
7541 cat conftest.err >&5
7542 echo "$as_me:7543: \$? = $ac_status" >&5
7543 if (exit $ac_status) && test -s "$ac_outfile"; then
7544 # The compiler can only warn and ignore the option if not recognized
7545 # So say no if there are warnings other than the usual output.
7546 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
7547 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7548 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
7549 lt_prog_compiler_pic_works=yes
7550 fi
7551 fi
7552 $rm conftest*
7553
7554 fi
7555 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
7556 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; }
7557
7558 if test x"$lt_prog_compiler_pic_works" = xyes; then
7559 case $lt_prog_compiler_pic in
7560 "" | " "*) ;;
7561 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
7562 esac
7563 else
7564 lt_prog_compiler_pic=
7565 lt_prog_compiler_can_build_shared=no
7566 fi
7567
7568 fi
7569 case $host_os in
7570 # For platforms which do not support PIC, -DPIC is meaningless:
7571 *djgpp*)
7572 lt_prog_compiler_pic=
7573 ;;
7574 *)
7575 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
7576 ;;
7577 esac
7578
7579 #
7580 # Check to make sure the static flag actually works.
7581 #
7582 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
7583 { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
7584 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
7585 if test "${lt_prog_compiler_static_works+set}" = set; then
7586 echo $ECHO_N "(cached) $ECHO_C" >&6
7587 else
7588 lt_prog_compiler_static_works=no
7589 save_LDFLAGS="$LDFLAGS"
7590 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
7591 echo "$lt_simple_link_test_code" > conftest.$ac_ext
7592 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
7593 # The linker can only warn and ignore the option if not recognized
7594 # So say no if there are warnings
7595 if test -s conftest.err; then
7596 # Append any errors to the config.log.
7597 cat conftest.err 1>&5
7598 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
7599 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
7600 if diff conftest.exp conftest.er2 >/dev/null; then
7601 lt_prog_compiler_static_works=yes
7602 fi
7603 else
7604 lt_prog_compiler_static_works=yes
7605 fi
7606 fi
7607 $rm conftest*
7608 LDFLAGS="$save_LDFLAGS"
7609
7610 fi
7611 { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
7612 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; }
7613
7614 if test x"$lt_prog_compiler_static_works" = xyes; then
7615 :
7616 else
7617 lt_prog_compiler_static=
7618 fi
7619
7620
7621 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
7622 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
7623 if test "${lt_cv_prog_compiler_c_o+set}" = set; then
7624 echo $ECHO_N "(cached) $ECHO_C" >&6
7625 else
7626 lt_cv_prog_compiler_c_o=no
7627 $rm -r conftest 2>/dev/null
7628 mkdir conftest
7629 cd conftest
7630 mkdir out
7631 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7632
7633 lt_compiler_flag="-o out/conftest2.$ac_objext"
7634 # Insert the option either (1) after the last *FLAGS variable, or
7635 # (2) before a word containing "conftest.", or (3) at the end.
7636 # Note that $ac_compile itself does not contain backslashes and begins
7637 # with a dollar sign (not a hyphen), so the echo should work correctly.
7638 lt_compile=`echo "$ac_compile" | $SED \
7639 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7640 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7641 -e 's:$: $lt_compiler_flag:'`
7642 (eval echo "\"\$as_me:7643: $lt_compile\"" >&5)
7643 (eval "$lt_compile" 2>out/conftest.err)
7644 ac_status=$?
7645 cat out/conftest.err >&5
7646 echo "$as_me:7647: \$? = $ac_status" >&5
7647 if (exit $ac_status) && test -s out/conftest2.$ac_objext
7648 then
7649 # The compiler can only warn and ignore the option if not recognized
7650 # So say no if there are warnings
7651 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
7652 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
7653 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
7654 lt_cv_prog_compiler_c_o=yes
7655 fi
7656 fi
7657 chmod u+w . 2>&5
7658 $rm conftest*
7659 # SGI C++ compiler will create directory out/ii_files/ for
7660 # template instantiation
7661 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
7662 $rm out/* && rmdir out
7663 cd ..
7664 rmdir conftest
7665 $rm conftest*
7666
7667 fi
7668 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
7669 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
7670
7671
7672 hard_links="nottested"
7673 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
7674 # do not overwrite the value of need_locks provided by the user
7675 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
7676 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
7677 hard_links=yes
7678 $rm conftest*
7679 ln conftest.a conftest.b 2>/dev/null && hard_links=no
7680 touch conftest.a
7681 ln conftest.a conftest.b 2>&5 || hard_links=no
7682 ln conftest.a conftest.b 2>/dev/null && hard_links=no
7683 { echo "$as_me:$LINENO: result: $hard_links" >&5
7684 echo "${ECHO_T}$hard_links" >&6; }
7685 if test "$hard_links" = no; then
7686 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
7687 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
7688 need_locks=warn
7689 fi
7690 else
7691 need_locks=no
7692 fi
7693
7694 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
7695 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
7696
7697 runpath_var=
7698 allow_undefined_flag=
7699 enable_shared_with_static_runtimes=no
7700 archive_cmds=
7701 archive_expsym_cmds=
7702 old_archive_From_new_cmds=
7703 old_archive_from_expsyms_cmds=
7704 export_dynamic_flag_spec=
7705 whole_archive_flag_spec=
7706 thread_safe_flag_spec=
7707 hardcode_libdir_flag_spec=
7708 hardcode_libdir_flag_spec_ld=
7709 hardcode_libdir_separator=
7710 hardcode_direct=no
7711 hardcode_minus_L=no
7712 hardcode_shlibpath_var=unsupported
7713 link_all_deplibs=unknown
7714 hardcode_automatic=no
7715 module_cmds=
7716 module_expsym_cmds=
7717 always_export_symbols=no
7718 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7719 # include_expsyms should be a list of space-separated symbols to be *always*
7720 # included in the symbol list
7721 include_expsyms=
7722 # exclude_expsyms can be an extended regexp of symbols to exclude
7723 # it will be wrapped by ` (' and `)$', so one must not match beginning or
7724 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7725 # as well as any symbol that contains `d'.
7726 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
7727 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7728 # platforms (ab)use it in PIC code, but their linkers get confused if
7729 # the symbol is explicitly referenced. Since portable code cannot
7730 # rely on this symbol name, it's probably fine to never include it in
7731 # preloaded symbol tables.
7732 extract_expsyms_cmds=
7733 # Just being paranoid about ensuring that cc_basename is set.
7734 for cc_temp in $compiler""; do
7735 case $cc_temp in
7736 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
7737 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
7738 \-*) ;;
7739 *) break;;
7740 esac
7741 done
7742 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
7743
7744 case $host_os in
7745 cygwin* | mingw* | pw32*)
7746 # FIXME: the MSVC++ port hasn't been tested in a loooong time
7747 # When not using gcc, we currently assume that we are using
7748 # Microsoft Visual C++.
7749 if test "$GCC" != yes; then
7750 with_gnu_ld=no
7751 fi
7752 ;;
7753 interix*)
7754 # we just hope/assume this is gcc and not c89 (= MSVC++)
7755 with_gnu_ld=yes
7756 ;;
7757 openbsd*)
7758 with_gnu_ld=no
7759 ;;
7760 esac
7761
7762 ld_shlibs=yes
7763 if test "$with_gnu_ld" = yes; then
7764 # If archive_cmds runs LD, not CC, wlarc should be empty
7765 wlarc='${wl}'
7766
7767 # Set some defaults for GNU ld with shared library support. These
7768 # are reset later if shared libraries are not supported. Putting them
7769 # here allows them to be overridden if necessary.
7770 runpath_var=LD_RUN_PATH
7771 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
7772 export_dynamic_flag_spec='${wl}--export-dynamic'
7773 # ancient GNU ld didn't support --whole-archive et. al.
7774 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7775 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7776 else
7777 whole_archive_flag_spec=
7778 fi
7779 supports_anon_versioning=no
7780 case `$LD -v 2>/dev/null` in
7781 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
7782 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7783 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7784 *\ 2.11.*) ;; # other 2.11 versions
7785 *) supports_anon_versioning=yes ;;
7786 esac
7787
7788 # See if GNU ld supports shared libraries.
7789 case $host_os in
7790 aix3* | aix4* | aix5*)
7791 # On AIX/PPC, the GNU linker is very broken
7792 if test "$host_cpu" != ia64; then
7793 ld_shlibs=no
7794 cat <<EOF 1>&2
7795
7796 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
7797 *** to be unable to reliably create shared libraries on AIX.
7798 *** Therefore, libtool is disabling shared libraries support. If you
7799 *** really care for shared libraries, you may want to modify your PATH
7800 *** so that a non-GNU linker is found, and then restart.
7801
7802 EOF
7803 fi
7804 ;;
7805
7806 amigaos*)
7807 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7808 hardcode_libdir_flag_spec='-L$libdir'
7809 hardcode_minus_L=yes
7810
7811 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
7812 # that the semantics of dynamic libraries on AmigaOS, at least up
7813 # to version 4, is to share data among multiple programs linked
7814 # with the same dynamic library. Since this doesn't match the
7815 # behavior of shared libraries on other platforms, we can't use
7816 # them.
7817 ld_shlibs=no
7818 ;;
7819
7820 beos*)
7821 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7822 allow_undefined_flag=unsupported
7823 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7824 # support --undefined. This deserves some investigation. FIXME
7825 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7826 else
7827 ld_shlibs=no
7828 fi
7829 ;;
7830
7831 cygwin* | mingw* | pw32*)
7832 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
7833 # as there is no search path for DLLs.
7834 hardcode_libdir_flag_spec='-L$libdir'
7835 allow_undefined_flag=unsupported
7836 always_export_symbols=no
7837 enable_shared_with_static_runtimes=yes
7838 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
7839
7840 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7841 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7842 # If the export-symbols file already is a .def file (1st line
7843 # is EXPORTS), use it as is; otherwise, prepend...
7844 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7845 cp $export_symbols $output_objdir/$soname.def;
7846 else
7847 echo EXPORTS > $output_objdir/$soname.def;
7848 cat $export_symbols >> $output_objdir/$soname.def;
7849 fi~
7850 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7851 else
7852 ld_shlibs=no
7853 fi
7854 ;;
7855
7856 interix[3-9]*)
7857 hardcode_direct=no
7858 hardcode_shlibpath_var=no
7859 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
7860 export_dynamic_flag_spec='${wl}-E'
7861 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7862 # Instead, shared libraries are loaded at an image base (0x10000000 by
7863 # default) and relocated if they conflict, which is a slow very memory
7864 # consuming and fragmenting process. To avoid this, we pick a random,
7865 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7866 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7867 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7868 archive_expsym_cmds='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'
7869 ;;
7870
7871 gnu* | linux* | k*bsd*-gnu)
7872 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7873 tmp_addflag=
7874 case $cc_basename,$host_cpu in
7875 pgcc*) # Portland Group C compiler
7876 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7877 tmp_addflag=' $pic_flag'
7878 ;;
7879 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
7880 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7881 tmp_addflag=' $pic_flag -Mnomain' ;;
7882 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
7883 tmp_addflag=' -i_dynamic' ;;
7884 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
7885 tmp_addflag=' -i_dynamic -nofor_main' ;;
7886 ifc* | ifort*) # Intel Fortran compiler
7887 tmp_addflag=' -nofor_main' ;;
7888 esac
7889 case `$CC -V 2>&1 | sed 5q` in
7890 *Sun\ C*) # Sun C 5.9
7891 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7892 tmp_sharedflag='-G' ;;
7893 *Sun\ F*) # Sun Fortran 8.3
7894 tmp_sharedflag='-G' ;;
7895 *)
7896 tmp_sharedflag='-shared' ;;
7897 esac
7898 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7899
7900 if test $supports_anon_versioning = yes; then
7901 archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
7902 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7903 $echo "local: *; };" >> $output_objdir/$libname.ver~
7904 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7905 fi
7906 else
7907 ld_shlibs=no
7908 fi
7909 ;;
7910
7911 netbsd*)
7912 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7913 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7914 wlarc=
7915 else
7916 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7917 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7918 fi
7919 ;;
7920
7921 solaris*)
7922 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7923 ld_shlibs=no
7924 cat <<EOF 1>&2
7925
7926 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
7927 *** create shared libraries on Solaris systems. Therefore, libtool
7928 *** is disabling shared libraries support. We urge you to upgrade GNU
7929 *** binutils to release 2.9.1 or newer. Another option is to modify
7930 *** your PATH or compiler configuration so that the native linker is
7931 *** used, and then restart.
7932
7933 EOF
7934 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7935 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7936 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7937 else
7938 ld_shlibs=no
7939 fi
7940 ;;
7941
7942 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7943 case `$LD -v 2>&1` in
7944 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
7945 ld_shlibs=no
7946 cat <<_LT_EOF 1>&2
7947
7948 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7949 *** reliably create shared libraries on SCO systems. Therefore, libtool
7950 *** is disabling shared libraries support. We urge you to upgrade GNU
7951 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
7952 *** your PATH or compiler configuration so that the native linker is
7953 *** used, and then restart.
7954
7955 _LT_EOF
7956 ;;
7957 *)
7958 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7959 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
7960 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
7961 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
7962 else
7963 ld_shlibs=no
7964 fi
7965 ;;
7966 esac
7967 ;;
7968
7969 sunos4*)
7970 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7971 wlarc=
7972 hardcode_direct=yes
7973 hardcode_shlibpath_var=no
7974 ;;
7975
7976 *)
7977 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7978 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7979 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7980 else
7981 ld_shlibs=no
7982 fi
7983 ;;
7984 esac
7985
7986 if test "$ld_shlibs" = no; then
7987 runpath_var=
7988 hardcode_libdir_flag_spec=
7989 export_dynamic_flag_spec=
7990 whole_archive_flag_spec=
7991 fi
7992 else
7993 # PORTME fill in a description of your system's linker (not GNU ld)
7994 case $host_os in
7995 aix3*)
7996 allow_undefined_flag=unsupported
7997 always_export_symbols=yes
7998 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
7999 # Note: this linker hardcodes the directories in LIBPATH if there
8000 # are no directories specified by -L.
8001 hardcode_minus_L=yes
8002 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
8003 # Neither direct hardcoding nor static linking is supported with a
8004 # broken collect2.
8005 hardcode_direct=unsupported
8006 fi
8007 ;;
8008
8009 aix4* | aix5*)
8010 if test "$host_cpu" = ia64; then
8011 # On IA64, the linker does run time linking by default, so we don't
8012 # have to do anything special.
8013 aix_use_runtimelinking=no
8014 exp_sym_flag='-Bexport'
8015 no_entry_flag=""
8016 else
8017 # If we're using GNU nm, then we don't want the "-C" option.
8018 # -C means demangle to AIX nm, but means don't demangle with GNU nm
8019 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
8020 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
8021 else
8022 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
8023 fi
8024 aix_use_runtimelinking=no
8025
8026 # Test if we are trying to use run time linking or normal
8027 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8028 # need to do runtime linking.
8029 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
8030 for ld_flag in $LDFLAGS; do
8031 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
8032 aix_use_runtimelinking=yes
8033 break
8034 fi
8035 done
8036 ;;
8037 esac
8038
8039 exp_sym_flag='-bexport'
8040 no_entry_flag='-bnoentry'
8041 fi
8042
8043 # When large executables or shared objects are built, AIX ld can
8044 # have problems creating the table of contents. If linking a library
8045 # or program results in "error TOC overflow" add -mminimal-toc to
8046 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
8047 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8048
8049 archive_cmds=''
8050 hardcode_direct=yes
8051 hardcode_libdir_separator=':'
8052 link_all_deplibs=yes
8053
8054 if test "$GCC" = yes; then
8055 case $host_os in aix4.[012]|aix4.[012].*)
8056 # We only want to do this on AIX 4.2 and lower, the check
8057 # below for broken collect2 doesn't work under 4.3+
8058 collect2name=`${CC} -print-prog-name=collect2`
8059 if test -f "$collect2name" && \
8060 strings "$collect2name" | grep resolve_lib_name >/dev/null
8061 then
8062 # We have reworked collect2
8063 :
8064 else
8065 # We have old collect2
8066 hardcode_direct=unsupported
8067 # It fails to find uninstalled libraries when the uninstalled
8068 # path is not listed in the libpath. Setting hardcode_minus_L
8069 # to unsupported forces relinking
8070 hardcode_minus_L=yes
8071 hardcode_libdir_flag_spec='-L$libdir'
8072 hardcode_libdir_separator=
8073 fi
8074 ;;
8075 esac
8076 shared_flag='-shared'
8077 if test "$aix_use_runtimelinking" = yes; then
8078 shared_flag="$shared_flag "'${wl}-G'
8079 fi
8080 else
8081 # not using gcc
8082 if test "$host_cpu" = ia64; then
8083 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8084 # chokes on -Wl,-G. The following line is correct:
8085 shared_flag='-G'
8086 else
8087 if test "$aix_use_runtimelinking" = yes; then
8088 shared_flag='${wl}-G'
8089 else
8090 shared_flag='${wl}-bM:SRE'
8091 fi
8092 fi
8093 fi
8094
8095 # It seems that -bexpall does not export symbols beginning with
8096 # underscore (_), so it is better to generate a list of symbols to export.
8097 always_export_symbols=yes
8098 if test "$aix_use_runtimelinking" = yes; then
8099 # Warning - without using the other runtime loading flags (-brtl),
8100 # -berok will link without error, but may produce a broken library.
8101 allow_undefined_flag='-berok'
8102 # Determine the default libpath from the value encoded in an empty executable.
8103 cat >conftest.$ac_ext <<_ACEOF
8104 /* confdefs.h. */
8105 _ACEOF
8106 cat confdefs.h >>conftest.$ac_ext
8107 cat >>conftest.$ac_ext <<_ACEOF
8108 /* end confdefs.h. */
8109
8110 int
8111 main ()
8112 {
8113
8114 ;
8115 return 0;
8116 }
8117 _ACEOF
8118 rm -f conftest.$ac_objext conftest$ac_exeext
8119 if { (ac_try="$ac_link"
8120 case "(($ac_try" in
8121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8122 *) ac_try_echo=$ac_try;;
8123 esac
8124 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8125 (eval "$ac_link") 2>conftest.er1
8126 ac_status=$?
8127 grep -v '^ *+' conftest.er1 >conftest.err
8128 rm -f conftest.er1
8129 cat conftest.err >&5
8130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8131 (exit $ac_status); } && {
8132 test -z "$ac_c_werror_flag" ||
8133 test ! -s conftest.err
8134 } && test -s conftest$ac_exeext &&
8135 $as_test_x conftest$ac_exeext; then
8136
8137 lt_aix_libpath_sed='
8138 /Import File Strings/,/^$/ {
8139 /^0/ {
8140 s/^0 *\(.*\)$/\1/
8141 p
8142 }
8143 }'
8144 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8145 # Check for a 64-bit object if we didn't find anything.
8146 if test -z "$aix_libpath"; then
8147 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8148 fi
8149 else
8150 echo "$as_me: failed program was:" >&5
8151 sed 's/^/| /' conftest.$ac_ext >&5
8152
8153
8154 fi
8155
8156 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8157 conftest$ac_exeext conftest.$ac_ext
8158 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8159
8160 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8161 archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
8162 else
8163 if test "$host_cpu" = ia64; then
8164 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
8165 allow_undefined_flag="-z nodefs"
8166 archive_expsym_cmds="\$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"
8167 else
8168 # Determine the default libpath from the value encoded in an empty executable.
8169 cat >conftest.$ac_ext <<_ACEOF
8170 /* confdefs.h. */
8171 _ACEOF
8172 cat confdefs.h >>conftest.$ac_ext
8173 cat >>conftest.$ac_ext <<_ACEOF
8174 /* end confdefs.h. */
8175
8176 int
8177 main ()
8178 {
8179
8180 ;
8181 return 0;
8182 }
8183 _ACEOF
8184 rm -f conftest.$ac_objext conftest$ac_exeext
8185 if { (ac_try="$ac_link"
8186 case "(($ac_try" in
8187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8188 *) ac_try_echo=$ac_try;;
8189 esac
8190 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8191 (eval "$ac_link") 2>conftest.er1
8192 ac_status=$?
8193 grep -v '^ *+' conftest.er1 >conftest.err
8194 rm -f conftest.er1
8195 cat conftest.err >&5
8196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8197 (exit $ac_status); } && {
8198 test -z "$ac_c_werror_flag" ||
8199 test ! -s conftest.err
8200 } && test -s conftest$ac_exeext &&
8201 $as_test_x conftest$ac_exeext; then
8202
8203 lt_aix_libpath_sed='
8204 /Import File Strings/,/^$/ {
8205 /^0/ {
8206 s/^0 *\(.*\)$/\1/
8207 p
8208 }
8209 }'
8210 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8211 # Check for a 64-bit object if we didn't find anything.
8212 if test -z "$aix_libpath"; then
8213 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
8214 fi
8215 else
8216 echo "$as_me: failed program was:" >&5
8217 sed 's/^/| /' conftest.$ac_ext >&5
8218
8219
8220 fi
8221
8222 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8223 conftest$ac_exeext conftest.$ac_ext
8224 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
8225
8226 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
8227 # Warning - without using the other run time loading flags,
8228 # -berok will link without error, but may produce a broken library.
8229 no_undefined_flag=' ${wl}-bernotok'
8230 allow_undefined_flag=' ${wl}-berok'
8231 # Exported symbols can be pulled into shared objects from archives
8232 whole_archive_flag_spec='$convenience'
8233 archive_cmds_need_lc=yes
8234 # This is similar to how AIX traditionally builds its shared libraries.
8235 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
8236 fi
8237 fi
8238 ;;
8239
8240 amigaos*)
8241 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
8242 hardcode_libdir_flag_spec='-L$libdir'
8243 hardcode_minus_L=yes
8244 # see comment about different semantics on the GNU ld section
8245 ld_shlibs=no
8246 ;;
8247
8248 bsdi[45]*)
8249 export_dynamic_flag_spec=-rdynamic
8250 ;;
8251
8252 cygwin* | mingw* | pw32*)
8253 # When not using gcc, we currently assume that we are using
8254 # Microsoft Visual C++.
8255 # hardcode_libdir_flag_spec is actually meaningless, as there is
8256 # no search path for DLLs.
8257 hardcode_libdir_flag_spec=' '
8258 allow_undefined_flag=unsupported
8259 # Tell ltmain to make .lib files, not .a files.
8260 libext=lib
8261 # Tell ltmain to make .dll files, not .so files.
8262 shrext_cmds=".dll"
8263 # FIXME: Setting linknames here is a bad hack.
8264 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
8265 # The linker will automatically build a .lib file if we build a DLL.
8266 old_archive_From_new_cmds='true'
8267 # FIXME: Should let the user specify the lib program.
8268 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
8269 fix_srcfile_path='`cygpath -w "$srcfile"`'
8270 enable_shared_with_static_runtimes=yes
8271 ;;
8272
8273 darwin* | rhapsody*)
8274 case $host_os in
8275 rhapsody* | darwin1.[012])
8276 allow_undefined_flag='${wl}-undefined ${wl}suppress'
8277 ;;
8278 *) # Darwin 1.3 on
8279 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
8280 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8281 else
8282 case ${MACOSX_DEPLOYMENT_TARGET} in
8283 10.[012])
8284 allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
8285 ;;
8286 10.*)
8287 allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
8288 ;;
8289 esac
8290 fi
8291 ;;
8292 esac
8293 archive_cmds_need_lc=no
8294 hardcode_direct=no
8295 hardcode_automatic=yes
8296 hardcode_shlibpath_var=unsupported
8297 whole_archive_flag_spec=''
8298 link_all_deplibs=yes
8299 if test "$GCC" = yes ; then
8300 output_verbose_link_cmd='echo'
8301 archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
8302 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8303 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8304 archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8305 module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8306 else
8307 case $cc_basename in
8308 xlc*)
8309 output_verbose_link_cmd='echo'
8310 archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
8311 module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
8312 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
8313 archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8314 module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
8315 ;;
8316 *)
8317 ld_shlibs=no
8318 ;;
8319 esac
8320 fi
8321 ;;
8322
8323 dgux*)
8324 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8325 hardcode_libdir_flag_spec='-L$libdir'
8326 hardcode_shlibpath_var=no
8327 ;;
8328
8329 freebsd1*)
8330 ld_shlibs=no
8331 ;;
8332
8333 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
8334 # support. Future versions do this automatically, but an explicit c++rt0.o
8335 # does not break anything, and helps significantly (at the cost of a little
8336 # extra space).
8337 freebsd2.2*)
8338 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
8339 hardcode_libdir_flag_spec='-R$libdir'
8340 hardcode_direct=yes
8341 hardcode_shlibpath_var=no
8342 ;;
8343
8344 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
8345 freebsd2*)
8346 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8347 hardcode_direct=yes
8348 hardcode_minus_L=yes
8349 hardcode_shlibpath_var=no
8350 ;;
8351
8352 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
8353 freebsd* | dragonfly*)
8354 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
8355 hardcode_libdir_flag_spec='-R$libdir'
8356 hardcode_direct=yes
8357 hardcode_shlibpath_var=no
8358 ;;
8359
8360 hpux9*)
8361 if test "$GCC" = yes; then
8362 archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8363 else
8364 archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8365 fi
8366 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8367 hardcode_libdir_separator=:
8368 hardcode_direct=yes
8369
8370 # hardcode_minus_L: Not really in the search PATH,
8371 # but as the default location of the library.
8372 hardcode_minus_L=yes
8373 export_dynamic_flag_spec='${wl}-E'
8374 ;;
8375
8376 hpux10*)
8377 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8378 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8379 else
8380 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
8381 fi
8382 if test "$with_gnu_ld" = no; then
8383 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8384 hardcode_libdir_separator=:
8385
8386 hardcode_direct=yes
8387 export_dynamic_flag_spec='${wl}-E'
8388
8389 # hardcode_minus_L: Not really in the search PATH,
8390 # but as the default location of the library.
8391 hardcode_minus_L=yes
8392 fi
8393 ;;
8394
8395 hpux11*)
8396 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
8397 case $host_cpu in
8398 hppa*64*)
8399 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8400 ;;
8401 ia64*)
8402 archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8403 ;;
8404 *)
8405 archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8406 ;;
8407 esac
8408 else
8409 case $host_cpu in
8410 hppa*64*)
8411 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8412 ;;
8413 ia64*)
8414 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
8415 ;;
8416 *)
8417 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
8418 ;;
8419 esac
8420 fi
8421 if test "$with_gnu_ld" = no; then
8422 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
8423 hardcode_libdir_separator=:
8424
8425 case $host_cpu in
8426 hppa*64*|ia64*)
8427 hardcode_libdir_flag_spec_ld='+b $libdir'
8428 hardcode_direct=no
8429 hardcode_shlibpath_var=no
8430 ;;
8431 *)
8432 hardcode_direct=yes
8433 export_dynamic_flag_spec='${wl}-E'
8434
8435 # hardcode_minus_L: Not really in the search PATH,
8436 # but as the default location of the library.
8437 hardcode_minus_L=yes
8438 ;;
8439 esac
8440 fi
8441 ;;
8442
8443 irix5* | irix6* | nonstopux*)
8444 if test "$GCC" = yes; then
8445 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8446 else
8447 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8448 hardcode_libdir_flag_spec_ld='-rpath $libdir'
8449 fi
8450 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8451 hardcode_libdir_separator=:
8452 link_all_deplibs=yes
8453 ;;
8454
8455 netbsd*)
8456 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
8457 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
8458 else
8459 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
8460 fi
8461 hardcode_libdir_flag_spec='-R$libdir'
8462 hardcode_direct=yes
8463 hardcode_shlibpath_var=no
8464 ;;
8465
8466 newsos6)
8467 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8468 hardcode_direct=yes
8469 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8470 hardcode_libdir_separator=:
8471 hardcode_shlibpath_var=no
8472 ;;
8473
8474 openbsd*)
8475 if test -f /usr/libexec/ld.so; then
8476 hardcode_direct=yes
8477 hardcode_shlibpath_var=no
8478 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8479 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8480 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
8481 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8482 export_dynamic_flag_spec='${wl}-E'
8483 else
8484 case $host_os in
8485 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
8486 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
8487 hardcode_libdir_flag_spec='-R$libdir'
8488 ;;
8489 *)
8490 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
8491 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
8492 ;;
8493 esac
8494 fi
8495 else
8496 ld_shlibs=no
8497 fi
8498 ;;
8499
8500 os2*)
8501 hardcode_libdir_flag_spec='-L$libdir'
8502 hardcode_minus_L=yes
8503 allow_undefined_flag=unsupported
8504 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
8505 old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
8506 ;;
8507
8508 osf3*)
8509 if test "$GCC" = yes; then
8510 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8511 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8512 else
8513 allow_undefined_flag=' -expect_unresolved \*'
8514 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8515 fi
8516 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8517 hardcode_libdir_separator=:
8518 ;;
8519
8520 osf4* | osf5*) # as osf3* with the addition of -msym flag
8521 if test "$GCC" = yes; then
8522 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
8523 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8524 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
8525 else
8526 allow_undefined_flag=' -expect_unresolved \*'
8527 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
8528 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
8529 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
8530
8531 # Both c and cxx compiler support -rpath directly
8532 hardcode_libdir_flag_spec='-rpath $libdir'
8533 fi
8534 hardcode_libdir_separator=:
8535 ;;
8536
8537 solaris*)
8538 no_undefined_flag=' -z text'
8539 if test "$GCC" = yes; then
8540 wlarc='${wl}'
8541 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
8542 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8543 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
8544 else
8545 wlarc=''
8546 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
8547 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
8548 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
8549 fi
8550 hardcode_libdir_flag_spec='-R$libdir'
8551 hardcode_shlibpath_var=no
8552 case $host_os in
8553 solaris2.[0-5] | solaris2.[0-5].*) ;;
8554 *)
8555 # The compiler driver will combine and reorder linker options,
8556 # but understands `-z linker_flag'. GCC discards it without `$wl',
8557 # but is careful enough not to reorder.
8558 # Supported since Solaris 2.6 (maybe 2.5.1?)
8559 if test "$GCC" = yes; then
8560 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8561 else
8562 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
8563 fi
8564 ;;
8565 esac
8566 link_all_deplibs=yes
8567 ;;
8568
8569 sunos4*)
8570 if test "x$host_vendor" = xsequent; then
8571 # Use $CC to link under sequent, because it throws in some extra .o
8572 # files that make .init and .fini sections work.
8573 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
8574 else
8575 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
8576 fi
8577 hardcode_libdir_flag_spec='-L$libdir'
8578 hardcode_direct=yes
8579 hardcode_minus_L=yes
8580 hardcode_shlibpath_var=no
8581 ;;
8582
8583 sysv4)
8584 case $host_vendor in
8585 sni)
8586 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8587 hardcode_direct=yes # is this really true???
8588 ;;
8589 siemens)
8590 ## LD is ld it makes a PLAMLIB
8591 ## CC just makes a GrossModule.
8592 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
8593 reload_cmds='$CC -r -o $output$reload_objs'
8594 hardcode_direct=no
8595 ;;
8596 motorola)
8597 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8598 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
8599 ;;
8600 esac
8601 runpath_var='LD_RUN_PATH'
8602 hardcode_shlibpath_var=no
8603 ;;
8604
8605 sysv4.3*)
8606 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8607 hardcode_shlibpath_var=no
8608 export_dynamic_flag_spec='-Bexport'
8609 ;;
8610
8611 sysv4*MP*)
8612 if test -d /usr/nec; then
8613 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8614 hardcode_shlibpath_var=no
8615 runpath_var=LD_RUN_PATH
8616 hardcode_runpath_var=yes
8617 ld_shlibs=yes
8618 fi
8619 ;;
8620
8621 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
8622 no_undefined_flag='${wl}-z,text'
8623 archive_cmds_need_lc=no
8624 hardcode_shlibpath_var=no
8625 runpath_var='LD_RUN_PATH'
8626
8627 if test "$GCC" = yes; then
8628 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8629 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8630 else
8631 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8632 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8633 fi
8634 ;;
8635
8636 sysv5* | sco3.2v5* | sco5v6*)
8637 # Note: We can NOT use -z defs as we might desire, because we do not
8638 # link with -lc, and that would cause any symbols used from libc to
8639 # always be unresolved, which means just about no library would
8640 # ever link correctly. If we're not using GNU ld we use -z text
8641 # though, which does catch some bad symbols but isn't as heavy-handed
8642 # as -z defs.
8643 no_undefined_flag='${wl}-z,text'
8644 allow_undefined_flag='${wl}-z,nodefs'
8645 archive_cmds_need_lc=no
8646 hardcode_shlibpath_var=no
8647 hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
8648 hardcode_libdir_separator=':'
8649 link_all_deplibs=yes
8650 export_dynamic_flag_spec='${wl}-Bexport'
8651 runpath_var='LD_RUN_PATH'
8652
8653 if test "$GCC" = yes; then
8654 archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8655 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8656 else
8657 archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8658 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8659 fi
8660 ;;
8661
8662 uts4*)
8663 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8664 hardcode_libdir_flag_spec='-L$libdir'
8665 hardcode_shlibpath_var=no
8666 ;;
8667
8668 *)
8669 ld_shlibs=no
8670 ;;
8671 esac
8672 fi
8673
8674 { echo "$as_me:$LINENO: result: $ld_shlibs" >&5
8675 echo "${ECHO_T}$ld_shlibs" >&6; }
8676 test "$ld_shlibs" = no && can_build_shared=no
8677
8678 #
8679 # Do we need to explicitly link libc?
8680 #
8681 case "x$archive_cmds_need_lc" in
8682 x|xyes)
8683 # Assume -lc should be added
8684 archive_cmds_need_lc=yes
8685
8686 if test "$enable_shared" = yes && test "$GCC" = yes; then
8687 case $archive_cmds in
8688 *'~'*)
8689 # FIXME: we may have to deal with multi-command sequences.
8690 ;;
8691 '$CC '*)
8692 # Test whether the compiler implicitly links with -lc since on some
8693 # systems, -lgcc has to come before -lc. If gcc already passes -lc
8694 # to ld, don't add -lc before -lgcc.
8695 { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
8696 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
8697 $rm conftest*
8698 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8699
8700 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8701 (eval $ac_compile) 2>&5
8702 ac_status=$?
8703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8704 (exit $ac_status); } 2>conftest.err; then
8705 soname=conftest
8706 lib=conftest
8707 libobjs=conftest.$ac_objext
8708 deplibs=
8709 wl=$lt_prog_compiler_wl
8710 pic_flag=$lt_prog_compiler_pic
8711 compiler_flags=-v
8712 linker_flags=-v
8713 verstring=
8714 output_objdir=.
8715 libname=conftest
8716 lt_save_allow_undefined_flag=$allow_undefined_flag
8717 allow_undefined_flag=
8718 if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
8719 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
8720 ac_status=$?
8721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8722 (exit $ac_status); }
8723 then
8724 archive_cmds_need_lc=no
8725 else
8726 archive_cmds_need_lc=yes
8727 fi
8728 allow_undefined_flag=$lt_save_allow_undefined_flag
8729 else
8730 cat conftest.err 1>&5
8731 fi
8732 $rm conftest*
8733 { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
8734 echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
8735 ;;
8736 esac
8737 fi
8738 ;;
8739 esac
8740
8741 { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
8742 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
8743 library_names_spec=
8744 libname_spec='lib$name'
8745 soname_spec=
8746 shrext_cmds=".so"
8747 postinstall_cmds=
8748 postuninstall_cmds=
8749 finish_cmds=
8750 finish_eval=
8751 shlibpath_var=
8752 shlibpath_overrides_runpath=unknown
8753 version_type=none
8754 dynamic_linker="$host_os ld.so"
8755 sys_lib_dlsearch_path_spec="/lib /usr/lib"
8756
8757 if test "$GCC" = yes; then
8758 case $host_os in
8759 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
8760 *) lt_awk_arg="/^libraries:/" ;;
8761 esac
8762 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
8763 if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
8764 # if the path contains ";" then we assume it to be the separator
8765 # otherwise default to the standard path separator (i.e. ":") - it is
8766 # assumed that no part of a normal pathname contains ";" but that should
8767 # okay in the real world where ";" in dirpaths is itself problematic.
8768 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
8769 else
8770 lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
8771 fi
8772 # Ok, now we have the path, separated by spaces, we can step through it
8773 # and add multilib dir if necessary.
8774 lt_tmp_lt_search_path_spec=
8775 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
8776 for lt_sys_path in $lt_search_path_spec; do
8777 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
8778 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
8779 else
8780 test -d "$lt_sys_path" && \
8781 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
8782 fi
8783 done
8784 lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
8785 BEGIN {RS=" "; FS="/|\n";} {
8786 lt_foo="";
8787 lt_count=0;
8788 for (lt_i = NF; lt_i > 0; lt_i--) {
8789 if ($lt_i != "" && $lt_i != ".") {
8790 if ($lt_i == "..") {
8791 lt_count++;
8792 } else {
8793 if (lt_count == 0) {
8794 lt_foo="/" $lt_i lt_foo;
8795 } else {
8796 lt_count--;
8797 }
8798 }
8799 }
8800 }
8801 if (lt_foo != "") { lt_freq[lt_foo]++; }
8802 if (lt_freq[lt_foo] == 1) { print lt_foo; }
8803 }'`
8804 sys_lib_search_path_spec=`echo $lt_search_path_spec`
8805 else
8806 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
8807 fi
8808 need_lib_prefix=unknown
8809 hardcode_into_libs=no
8810
8811 # when you set need_version to no, make sure it does not cause -set_version
8812 # flags to be left without arguments
8813 need_version=unknown
8814
8815 case $host_os in
8816 aix3*)
8817 version_type=linux
8818 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
8819 shlibpath_var=LIBPATH
8820
8821 # AIX 3 has no versioning support, so we append a major version to the name.
8822 soname_spec='${libname}${release}${shared_ext}$major'
8823 ;;
8824
8825 aix4* | aix5*)
8826 version_type=linux
8827 need_lib_prefix=no
8828 need_version=no
8829 hardcode_into_libs=yes
8830 if test "$host_cpu" = ia64; then
8831 # AIX 5 supports IA64
8832 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
8833 shlibpath_var=LD_LIBRARY_PATH
8834 else
8835 # With GCC up to 2.95.x, collect2 would create an import file
8836 # for dependence libraries. The import file would start with
8837 # the line `#! .'. This would cause the generated library to
8838 # depend on `.', always an invalid library. This was fixed in
8839 # development snapshots of GCC prior to 3.0.
8840 case $host_os in
8841 aix4 | aix4.[01] | aix4.[01].*)
8842 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
8843 echo ' yes '
8844 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
8845 :
8846 else
8847 can_build_shared=no
8848 fi
8849 ;;
8850 esac
8851 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
8852 # soname into executable. Probably we can add versioning support to
8853 # collect2, so additional links can be useful in future.
8854 if test "$aix_use_runtimelinking" = yes; then
8855 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
8856 # instead of lib<name>.a to let people know that these are not
8857 # typical AIX shared libraries.
8858 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8859 else
8860 # We preserve .a as extension for shared libraries through AIX4.2
8861 # and later when we are not doing run time linking.
8862 library_names_spec='${libname}${release}.a $libname.a'
8863 soname_spec='${libname}${release}${shared_ext}$major'
8864 fi
8865 shlibpath_var=LIBPATH
8866 fi
8867 ;;
8868
8869 amigaos*)
8870 library_names_spec='$libname.ixlibrary $libname.a'
8871 # Create ${libname}_ixlibrary.a entries in /sys/libs.
8872 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
8873 ;;
8874
8875 beos*)
8876 library_names_spec='${libname}${shared_ext}'
8877 dynamic_linker="$host_os ld.so"
8878 shlibpath_var=LIBRARY_PATH
8879 ;;
8880
8881 bsdi[45]*)
8882 version_type=linux
8883 need_version=no
8884 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
8885 soname_spec='${libname}${release}${shared_ext}$major'
8886 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
8887 shlibpath_var=LD_LIBRARY_PATH
8888 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
8889 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
8890 # the default ld.so.conf also contains /usr/contrib/lib and
8891 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
8892 # libtool to hard-code these into programs
8893 ;;
8894
8895 cygwin* | mingw* | pw32*)
8896 version_type=windows
8897 shrext_cmds=".dll"
8898 need_version=no
8899 need_lib_prefix=no
8900
8901 case $GCC,$host_os in
8902 yes,cygwin* | yes,mingw* | yes,pw32*)
8903 library_names_spec='$libname.dll.a'
8904 # DLL is installed to $(libdir)/../bin by postinstall_cmds
8905 postinstall_cmds='base_file=`basename \${file}`~
8906 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
8907 dldir=$destdir/`dirname \$dlpath`~
8908 test -d \$dldir || mkdir -p \$dldir~
8909 $install_prog $dir/$dlname \$dldir/$dlname~
8910 chmod a+x \$dldir/$dlname'
8911 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
8912 dlpath=$dir/\$dldll~
8913 $rm \$dlpath'
8914 shlibpath_overrides_runpath=yes
8915
8916 case $host_os in
8917 cygwin*)
8918 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
8919 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8920 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
8921 ;;
8922 mingw*)
8923 # MinGW DLLs use traditional 'lib' prefix
8924 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8925 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
8926 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
8927 # It is most probably a Windows format PATH printed by
8928 # mingw gcc, but we are running on Cygwin. Gcc prints its search
8929 # path with ; separators, and with drive letters. We can handle the
8930 # drive letters (cygwin fileutils understands them), so leave them,
8931 # especially as we might pass files found there to a mingw objdump,
8932 # which wouldn't understand a cygwinified path. Ahh.
8933 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
8934 else
8935 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
8936 fi
8937 ;;
8938 pw32*)
8939 # pw32 DLLs use 'pw' prefix rather than 'lib'
8940 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
8941 ;;
8942 esac
8943 ;;
8944
8945 *)
8946 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
8947 ;;
8948 esac
8949 dynamic_linker='Win32 ld.exe'
8950 # FIXME: first we should search . and the directory the executable is in
8951 shlibpath_var=PATH
8952 ;;
8953
8954 darwin* | rhapsody*)
8955 dynamic_linker="$host_os dyld"
8956 version_type=darwin
8957 need_lib_prefix=no
8958 need_version=no
8959 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
8960 soname_spec='${libname}${release}${major}$shared_ext'
8961 shlibpath_overrides_runpath=yes
8962 shlibpath_var=DYLD_LIBRARY_PATH
8963 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
8964
8965 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
8966 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
8967 ;;
8968
8969 dgux*)
8970 version_type=linux
8971 need_lib_prefix=no
8972 need_version=no
8973 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
8974 soname_spec='${libname}${release}${shared_ext}$major'
8975 shlibpath_var=LD_LIBRARY_PATH
8976 ;;
8977
8978 freebsd1*)
8979 dynamic_linker=no
8980 ;;
8981
8982 freebsd* | dragonfly*)
8983 # DragonFly does not have aout. When/if they implement a new
8984 # versioning mechanism, adjust this.
8985 if test -x /usr/bin/objformat; then
8986 objformat=`/usr/bin/objformat`
8987 else
8988 case $host_os in
8989 freebsd[123]*) objformat=aout ;;
8990 *) objformat=elf ;;
8991 esac
8992 fi
8993 version_type=freebsd-$objformat
8994 case $version_type in
8995 freebsd-elf*)
8996 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
8997 need_version=no
8998 need_lib_prefix=no
8999 ;;
9000 freebsd-*)
9001 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
9002 need_version=yes
9003 ;;
9004 esac
9005 shlibpath_var=LD_LIBRARY_PATH
9006 case $host_os in
9007 freebsd2*)
9008 shlibpath_overrides_runpath=yes
9009 ;;
9010 freebsd3.[01]* | freebsdelf3.[01]*)
9011 shlibpath_overrides_runpath=yes
9012 hardcode_into_libs=yes
9013 ;;
9014 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
9015 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
9016 shlibpath_overrides_runpath=no
9017 hardcode_into_libs=yes
9018 ;;
9019 *) # from 4.6 on, and DragonFly
9020 shlibpath_overrides_runpath=yes
9021 hardcode_into_libs=yes
9022 ;;
9023 esac
9024 ;;
9025
9026 gnu*)
9027 version_type=linux
9028 need_lib_prefix=no
9029 need_version=no
9030 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
9031 soname_spec='${libname}${release}${shared_ext}$major'
9032 shlibpath_var=LD_LIBRARY_PATH
9033 hardcode_into_libs=yes
9034 ;;
9035
9036 hpux9* | hpux10* | hpux11*)
9037 # Give a soname corresponding to the major version so that dld.sl refuses to
9038 # link against other versions.
9039 version_type=sunos
9040 need_lib_prefix=no
9041 need_version=no
9042 case $host_cpu in
9043 ia64*)
9044 shrext_cmds='.so'
9045 hardcode_into_libs=yes
9046 dynamic_linker="$host_os dld.so"
9047 shlibpath_var=LD_LIBRARY_PATH
9048 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9049 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9050 soname_spec='${libname}${release}${shared_ext}$major'
9051 if test "X$HPUX_IA64_MODE" = X32; then
9052 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
9053 else
9054 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
9055 fi
9056 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9057 ;;
9058 hppa*64*)
9059 shrext_cmds='.sl'
9060 hardcode_into_libs=yes
9061 dynamic_linker="$host_os dld.sl"
9062 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
9063 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
9064 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9065 soname_spec='${libname}${release}${shared_ext}$major'
9066 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
9067 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
9068 ;;
9069 *)
9070 shrext_cmds='.sl'
9071 dynamic_linker="$host_os dld.sl"
9072 shlibpath_var=SHLIB_PATH
9073 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
9074 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9075 soname_spec='${libname}${release}${shared_ext}$major'
9076 ;;
9077 esac
9078 # HP-UX runs *really* slowly unless shared libraries are mode 555.
9079 postinstall_cmds='chmod 555 $lib'
9080 ;;
9081
9082 interix[3-9]*)
9083 version_type=linux
9084 need_lib_prefix=no
9085 need_version=no
9086 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9087 soname_spec='${libname}${release}${shared_ext}$major'
9088 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
9089 shlibpath_var=LD_LIBRARY_PATH
9090 shlibpath_overrides_runpath=no
9091 hardcode_into_libs=yes
9092 ;;
9093
9094 irix5* | irix6* | nonstopux*)
9095 case $host_os in
9096 nonstopux*) version_type=nonstopux ;;
9097 *)
9098 if test "$lt_cv_prog_gnu_ld" = yes; then
9099 version_type=linux
9100 else
9101 version_type=irix
9102 fi ;;
9103 esac
9104 need_lib_prefix=no
9105 need_version=no
9106 soname_spec='${libname}${release}${shared_ext}$major'
9107 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
9108 case $host_os in
9109 irix5* | nonstopux*)
9110 libsuff= shlibsuff=
9111 ;;
9112 *)
9113 case $LD in # libtool.m4 will add one of these switches to LD
9114 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
9115 libsuff= shlibsuff= libmagic=32-bit;;
9116 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
9117 libsuff=32 shlibsuff=N32 libmagic=N32;;
9118 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
9119 libsuff=64 shlibsuff=64 libmagic=64-bit;;
9120 *) libsuff= shlibsuff= libmagic=never-match;;
9121 esac
9122 ;;
9123 esac
9124 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
9125 shlibpath_overrides_runpath=no
9126 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9127 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9128 hardcode_into_libs=yes
9129 ;;
9130
9131 # No shared lib support for Linux oldld, aout, or coff.
9132 linux*oldld* | linux*aout* | linux*coff*)
9133 dynamic_linker=no
9134 ;;
9135
9136 # This must be Linux ELF.
9137 linux* | k*bsd*-gnu)
9138 version_type=linux
9139 need_lib_prefix=no
9140 need_version=no
9141 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9142 soname_spec='${libname}${release}${shared_ext}$major'
9143 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
9144 shlibpath_var=LD_LIBRARY_PATH
9145 shlibpath_overrides_runpath=no
9146 # This implies no fast_install, which is unacceptable.
9147 # Some rework will be needed to allow for fast_install
9148 # before this can be enabled.
9149 hardcode_into_libs=yes
9150 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
9151 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
9152
9153 # Append ld.so.conf contents to the search path
9154 if test -f /etc/ld.so.conf; then
9155 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
9156 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
9157 fi
9158
9159 # We used to test for /lib/ld.so.1 and disable shared libraries on
9160 # powerpc, because MkLinux only supported shared libraries with the
9161 # GNU dynamic linker. Since this was broken with cross compilers,
9162 # most powerpc-linux boxes support dynamic linking these days and
9163 # people can always --disable-shared, the test was removed, and we
9164 # assume the GNU/Linux dynamic linker is in use.
9165 dynamic_linker='GNU/Linux ld.so'
9166 ;;
9167
9168 netbsd*)
9169 version_type=sunos
9170 need_lib_prefix=no
9171 need_version=no
9172 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9173 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9174 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9175 dynamic_linker='NetBSD (a.out) ld.so'
9176 else
9177 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
9178 soname_spec='${libname}${release}${shared_ext}$major'
9179 dynamic_linker='NetBSD ld.elf_so'
9180 fi
9181 shlibpath_var=LD_LIBRARY_PATH
9182 shlibpath_overrides_runpath=yes
9183 hardcode_into_libs=yes
9184 ;;
9185
9186 newsos6)
9187 version_type=linux
9188 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9189 shlibpath_var=LD_LIBRARY_PATH
9190 shlibpath_overrides_runpath=yes
9191 ;;
9192
9193 nto-qnx*)
9194 version_type=linux
9195 need_lib_prefix=no
9196 need_version=no
9197 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9198 soname_spec='${libname}${release}${shared_ext}$major'
9199 shlibpath_var=LD_LIBRARY_PATH
9200 shlibpath_overrides_runpath=yes
9201 ;;
9202
9203 openbsd*)
9204 version_type=sunos
9205 sys_lib_dlsearch_path_spec="/usr/lib"
9206 need_lib_prefix=no
9207 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
9208 case $host_os in
9209 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
9210 *) need_version=no ;;
9211 esac
9212 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9213 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
9214 shlibpath_var=LD_LIBRARY_PATH
9215 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9216 case $host_os in
9217 openbsd2.[89] | openbsd2.[89].*)
9218 shlibpath_overrides_runpath=no
9219 ;;
9220 *)
9221 shlibpath_overrides_runpath=yes
9222 ;;
9223 esac
9224 else
9225 shlibpath_overrides_runpath=yes
9226 fi
9227 ;;
9228
9229 os2*)
9230 libname_spec='$name'
9231 shrext_cmds=".dll"
9232 need_lib_prefix=no
9233 library_names_spec='$libname${shared_ext} $libname.a'
9234 dynamic_linker='OS/2 ld.exe'
9235 shlibpath_var=LIBPATH
9236 ;;
9237
9238 osf3* | osf4* | osf5*)
9239 version_type=osf
9240 need_lib_prefix=no
9241 need_version=no
9242 soname_spec='${libname}${release}${shared_ext}$major'
9243 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9244 shlibpath_var=LD_LIBRARY_PATH
9245 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
9246 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
9247 ;;
9248
9249 rdos*)
9250 dynamic_linker=no
9251 ;;
9252
9253 solaris*)
9254 version_type=linux
9255 need_lib_prefix=no
9256 need_version=no
9257 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9258 soname_spec='${libname}${release}${shared_ext}$major'
9259 shlibpath_var=LD_LIBRARY_PATH
9260 shlibpath_overrides_runpath=yes
9261 hardcode_into_libs=yes
9262 # ldd complains unless libraries are executable
9263 postinstall_cmds='chmod +x $lib'
9264 ;;
9265
9266 sunos4*)
9267 version_type=sunos
9268 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
9269 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
9270 shlibpath_var=LD_LIBRARY_PATH
9271 shlibpath_overrides_runpath=yes
9272 if test "$with_gnu_ld" = yes; then
9273 need_lib_prefix=no
9274 fi
9275 need_version=yes
9276 ;;
9277
9278 sysv4 | sysv4.3*)
9279 version_type=linux
9280 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9281 soname_spec='${libname}${release}${shared_ext}$major'
9282 shlibpath_var=LD_LIBRARY_PATH
9283 case $host_vendor in
9284 sni)
9285 shlibpath_overrides_runpath=no
9286 need_lib_prefix=no
9287 export_dynamic_flag_spec='${wl}-Blargedynsym'
9288 runpath_var=LD_RUN_PATH
9289 ;;
9290 siemens)
9291 need_lib_prefix=no
9292 ;;
9293 motorola)
9294 need_lib_prefix=no
9295 need_version=no
9296 shlibpath_overrides_runpath=no
9297 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
9298 ;;
9299 esac
9300 ;;
9301
9302 sysv4*MP*)
9303 if test -d /usr/nec ;then
9304 version_type=linux
9305 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
9306 soname_spec='$libname${shared_ext}.$major'
9307 shlibpath_var=LD_LIBRARY_PATH
9308 fi
9309 ;;
9310
9311 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
9312 version_type=freebsd-elf
9313 need_lib_prefix=no
9314 need_version=no
9315 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
9316 soname_spec='${libname}${release}${shared_ext}$major'
9317 shlibpath_var=LD_LIBRARY_PATH
9318 hardcode_into_libs=yes
9319 if test "$with_gnu_ld" = yes; then
9320 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
9321 shlibpath_overrides_runpath=no
9322 else
9323 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
9324 shlibpath_overrides_runpath=yes
9325 case $host_os in
9326 sco3.2v5*)
9327 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
9328 ;;
9329 esac
9330 fi
9331 sys_lib_dlsearch_path_spec='/usr/lib'
9332 ;;
9333
9334 uts4*)
9335 version_type=linux
9336 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9337 soname_spec='${libname}${release}${shared_ext}$major'
9338 shlibpath_var=LD_LIBRARY_PATH
9339 ;;
9340
9341 *)
9342 dynamic_linker=no
9343 ;;
9344 esac
9345 { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
9346 echo "${ECHO_T}$dynamic_linker" >&6; }
9347 test "$dynamic_linker" = no && can_build_shared=no
9348
9349 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9350 if test "$GCC" = yes; then
9351 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9352 fi
9353
9354 { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
9355 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
9356 hardcode_action=
9357 if test -n "$hardcode_libdir_flag_spec" || \
9358 test -n "$runpath_var" || \
9359 test "X$hardcode_automatic" = "Xyes" ; then
9360
9361 # We can hardcode non-existant directories.
9362 if test "$hardcode_direct" != no &&
9363 # If the only mechanism to avoid hardcoding is shlibpath_var, we
9364 # have to relink, otherwise we might link with an installed library
9365 # when we should be linking with a yet-to-be-installed one
9366 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
9367 test "$hardcode_minus_L" != no; then
9368 # Linking always hardcodes the temporary library directory.
9369 hardcode_action=relink
9370 else
9371 # We can link without hardcoding, and we can hardcode nonexisting dirs.
9372 hardcode_action=immediate
9373 fi
9374 else
9375 # We cannot hardcode anything, or else we can only hardcode existing
9376 # directories.
9377 hardcode_action=unsupported
9378 fi
9379 { echo "$as_me:$LINENO: result: $hardcode_action" >&5
9380 echo "${ECHO_T}$hardcode_action" >&6; }
9381
9382 if test "$hardcode_action" = relink; then
9383 # Fast installation is not supported
9384 enable_fast_install=no
9385 elif test "$shlibpath_overrides_runpath" = yes ||
9386 test "$enable_shared" = no; then
9387 # Fast installation is not necessary
9388 enable_fast_install=needless
9389 fi
9390
9391 striplib=
9392 old_striplib=
9393 { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
9394 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
9395 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
9396 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
9397 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
9398 { echo "$as_me:$LINENO: result: yes" >&5
9399 echo "${ECHO_T}yes" >&6; }
9400 else
9401 # FIXME - insert some real tests, host_os isn't really good enough
9402 case $host_os in
9403 darwin*)
9404 if test -n "$STRIP" ; then
9405 striplib="$STRIP -x"
9406 old_striplib="$STRIP -S"
9407 { echo "$as_me:$LINENO: result: yes" >&5
9408 echo "${ECHO_T}yes" >&6; }
9409 else
9410 { echo "$as_me:$LINENO: result: no" >&5
9411 echo "${ECHO_T}no" >&6; }
9412 fi
9413 ;;
9414 *)
9415 { echo "$as_me:$LINENO: result: no" >&5
9416 echo "${ECHO_T}no" >&6; }
9417 ;;
9418 esac
9419 fi
9420
9421 if test "x$enable_dlopen" != xyes; then
9422 enable_dlopen=unknown
9423 enable_dlopen_self=unknown
9424 enable_dlopen_self_static=unknown
9425 else
9426 lt_cv_dlopen=no
9427 lt_cv_dlopen_libs=
9428
9429 case $host_os in
9430 beos*)
9431 lt_cv_dlopen="load_add_on"
9432 lt_cv_dlopen_libs=
9433 lt_cv_dlopen_self=yes
9434 ;;
9435
9436 mingw* | pw32*)
9437 lt_cv_dlopen="LoadLibrary"
9438 lt_cv_dlopen_libs=
9439 ;;
9440
9441 cygwin*)
9442 lt_cv_dlopen="dlopen"
9443 lt_cv_dlopen_libs=
9444 ;;
9445
9446 darwin*)
9447 # if libdl is installed we need to link against it
9448 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9449 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
9450 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9451 echo $ECHO_N "(cached) $ECHO_C" >&6
9452 else
9453 ac_check_lib_save_LIBS=$LIBS
9454 LIBS="-ldl $LIBS"
9455 cat >conftest.$ac_ext <<_ACEOF
9456 /* confdefs.h. */
9457 _ACEOF
9458 cat confdefs.h >>conftest.$ac_ext
9459 cat >>conftest.$ac_ext <<_ACEOF
9460 /* end confdefs.h. */
9461
9462 /* Override any GCC internal prototype to avoid an error.
9463 Use char because int might match the return type of a GCC
9464 builtin and then its argument prototype would still apply. */
9465 #ifdef __cplusplus
9466 extern "C"
9467 #endif
9468 char dlopen ();
9469 int
9470 main ()
9471 {
9472 return dlopen ();
9473 ;
9474 return 0;
9475 }
9476 _ACEOF
9477 rm -f conftest.$ac_objext conftest$ac_exeext
9478 if { (ac_try="$ac_link"
9479 case "(($ac_try" in
9480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9481 *) ac_try_echo=$ac_try;;
9482 esac
9483 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9484 (eval "$ac_link") 2>conftest.er1
9485 ac_status=$?
9486 grep -v '^ *+' conftest.er1 >conftest.err
9487 rm -f conftest.er1
9488 cat conftest.err >&5
9489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9490 (exit $ac_status); } && {
9491 test -z "$ac_c_werror_flag" ||
9492 test ! -s conftest.err
9493 } && test -s conftest$ac_exeext &&
9494 $as_test_x conftest$ac_exeext; then
9495 ac_cv_lib_dl_dlopen=yes
9496 else
9497 echo "$as_me: failed program was:" >&5
9498 sed 's/^/| /' conftest.$ac_ext >&5
9499
9500 ac_cv_lib_dl_dlopen=no
9501 fi
9502
9503 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9504 conftest$ac_exeext conftest.$ac_ext
9505 LIBS=$ac_check_lib_save_LIBS
9506 fi
9507 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9508 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
9509 if test $ac_cv_lib_dl_dlopen = yes; then
9510 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9511 else
9512
9513 lt_cv_dlopen="dyld"
9514 lt_cv_dlopen_libs=
9515 lt_cv_dlopen_self=yes
9516
9517 fi
9518
9519 ;;
9520
9521 *)
9522 { echo "$as_me:$LINENO: checking for shl_load" >&5
9523 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
9524 if test "${ac_cv_func_shl_load+set}" = set; then
9525 echo $ECHO_N "(cached) $ECHO_C" >&6
9526 else
9527 cat >conftest.$ac_ext <<_ACEOF
9528 /* confdefs.h. */
9529 _ACEOF
9530 cat confdefs.h >>conftest.$ac_ext
9531 cat >>conftest.$ac_ext <<_ACEOF
9532 /* end confdefs.h. */
9533 /* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
9534 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9535 #define shl_load innocuous_shl_load
9536
9537 /* System header to define __stub macros and hopefully few prototypes,
9538 which can conflict with char shl_load (); below.
9539 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9540 <limits.h> exists even on freestanding compilers. */
9541
9542 #ifdef __STDC__
9543 # include <limits.h>
9544 #else
9545 # include <assert.h>
9546 #endif
9547
9548 #undef shl_load
9549
9550 /* Override any GCC internal prototype to avoid an error.
9551 Use char because int might match the return type of a GCC
9552 builtin and then its argument prototype would still apply. */
9553 #ifdef __cplusplus
9554 extern "C"
9555 #endif
9556 char shl_load ();
9557 /* The GNU C library defines this for functions which it implements
9558 to always fail with ENOSYS. Some functions are actually named
9559 something starting with __ and the normal name is an alias. */
9560 #if defined __stub_shl_load || defined __stub___shl_load
9561 choke me
9562 #endif
9563
9564 int
9565 main ()
9566 {
9567 return shl_load ();
9568 ;
9569 return 0;
9570 }
9571 _ACEOF
9572 rm -f conftest.$ac_objext conftest$ac_exeext
9573 if { (ac_try="$ac_link"
9574 case "(($ac_try" in
9575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9576 *) ac_try_echo=$ac_try;;
9577 esac
9578 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9579 (eval "$ac_link") 2>conftest.er1
9580 ac_status=$?
9581 grep -v '^ *+' conftest.er1 >conftest.err
9582 rm -f conftest.er1
9583 cat conftest.err >&5
9584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9585 (exit $ac_status); } && {
9586 test -z "$ac_c_werror_flag" ||
9587 test ! -s conftest.err
9588 } && test -s conftest$ac_exeext &&
9589 $as_test_x conftest$ac_exeext; then
9590 ac_cv_func_shl_load=yes
9591 else
9592 echo "$as_me: failed program was:" >&5
9593 sed 's/^/| /' conftest.$ac_ext >&5
9594
9595 ac_cv_func_shl_load=no
9596 fi
9597
9598 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9599 conftest$ac_exeext conftest.$ac_ext
9600 fi
9601 { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
9602 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
9603 if test $ac_cv_func_shl_load = yes; then
9604 lt_cv_dlopen="shl_load"
9605 else
9606 { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9607 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
9608 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9609 echo $ECHO_N "(cached) $ECHO_C" >&6
9610 else
9611 ac_check_lib_save_LIBS=$LIBS
9612 LIBS="-ldld $LIBS"
9613 cat >conftest.$ac_ext <<_ACEOF
9614 /* confdefs.h. */
9615 _ACEOF
9616 cat confdefs.h >>conftest.$ac_ext
9617 cat >>conftest.$ac_ext <<_ACEOF
9618 /* end confdefs.h. */
9619
9620 /* Override any GCC internal prototype to avoid an error.
9621 Use char because int might match the return type of a GCC
9622 builtin and then its argument prototype would still apply. */
9623 #ifdef __cplusplus
9624 extern "C"
9625 #endif
9626 char shl_load ();
9627 int
9628 main ()
9629 {
9630 return shl_load ();
9631 ;
9632 return 0;
9633 }
9634 _ACEOF
9635 rm -f conftest.$ac_objext conftest$ac_exeext
9636 if { (ac_try="$ac_link"
9637 case "(($ac_try" in
9638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9639 *) ac_try_echo=$ac_try;;
9640 esac
9641 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9642 (eval "$ac_link") 2>conftest.er1
9643 ac_status=$?
9644 grep -v '^ *+' conftest.er1 >conftest.err
9645 rm -f conftest.er1
9646 cat conftest.err >&5
9647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9648 (exit $ac_status); } && {
9649 test -z "$ac_c_werror_flag" ||
9650 test ! -s conftest.err
9651 } && test -s conftest$ac_exeext &&
9652 $as_test_x conftest$ac_exeext; then
9653 ac_cv_lib_dld_shl_load=yes
9654 else
9655 echo "$as_me: failed program was:" >&5
9656 sed 's/^/| /' conftest.$ac_ext >&5
9657
9658 ac_cv_lib_dld_shl_load=no
9659 fi
9660
9661 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9662 conftest$ac_exeext conftest.$ac_ext
9663 LIBS=$ac_check_lib_save_LIBS
9664 fi
9665 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9666 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
9667 if test $ac_cv_lib_dld_shl_load = yes; then
9668 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
9669 else
9670 { echo "$as_me:$LINENO: checking for dlopen" >&5
9671 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
9672 if test "${ac_cv_func_dlopen+set}" = set; then
9673 echo $ECHO_N "(cached) $ECHO_C" >&6
9674 else
9675 cat >conftest.$ac_ext <<_ACEOF
9676 /* confdefs.h. */
9677 _ACEOF
9678 cat confdefs.h >>conftest.$ac_ext
9679 cat >>conftest.$ac_ext <<_ACEOF
9680 /* end confdefs.h. */
9681 /* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
9682 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9683 #define dlopen innocuous_dlopen
9684
9685 /* System header to define __stub macros and hopefully few prototypes,
9686 which can conflict with char dlopen (); below.
9687 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9688 <limits.h> exists even on freestanding compilers. */
9689
9690 #ifdef __STDC__
9691 # include <limits.h>
9692 #else
9693 # include <assert.h>
9694 #endif
9695
9696 #undef dlopen
9697
9698 /* Override any GCC internal prototype to avoid an error.
9699 Use char because int might match the return type of a GCC
9700 builtin and then its argument prototype would still apply. */
9701 #ifdef __cplusplus
9702 extern "C"
9703 #endif
9704 char dlopen ();
9705 /* The GNU C library defines this for functions which it implements
9706 to always fail with ENOSYS. Some functions are actually named
9707 something starting with __ and the normal name is an alias. */
9708 #if defined __stub_dlopen || defined __stub___dlopen
9709 choke me
9710 #endif
9711
9712 int
9713 main ()
9714 {
9715 return dlopen ();
9716 ;
9717 return 0;
9718 }
9719 _ACEOF
9720 rm -f conftest.$ac_objext conftest$ac_exeext
9721 if { (ac_try="$ac_link"
9722 case "(($ac_try" in
9723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9724 *) ac_try_echo=$ac_try;;
9725 esac
9726 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9727 (eval "$ac_link") 2>conftest.er1
9728 ac_status=$?
9729 grep -v '^ *+' conftest.er1 >conftest.err
9730 rm -f conftest.er1
9731 cat conftest.err >&5
9732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9733 (exit $ac_status); } && {
9734 test -z "$ac_c_werror_flag" ||
9735 test ! -s conftest.err
9736 } && test -s conftest$ac_exeext &&
9737 $as_test_x conftest$ac_exeext; then
9738 ac_cv_func_dlopen=yes
9739 else
9740 echo "$as_me: failed program was:" >&5
9741 sed 's/^/| /' conftest.$ac_ext >&5
9742
9743 ac_cv_func_dlopen=no
9744 fi
9745
9746 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9747 conftest$ac_exeext conftest.$ac_ext
9748 fi
9749 { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
9750 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
9751 if test $ac_cv_func_dlopen = yes; then
9752 lt_cv_dlopen="dlopen"
9753 else
9754 { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9755 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
9756 if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9757 echo $ECHO_N "(cached) $ECHO_C" >&6
9758 else
9759 ac_check_lib_save_LIBS=$LIBS
9760 LIBS="-ldl $LIBS"
9761 cat >conftest.$ac_ext <<_ACEOF
9762 /* confdefs.h. */
9763 _ACEOF
9764 cat confdefs.h >>conftest.$ac_ext
9765 cat >>conftest.$ac_ext <<_ACEOF
9766 /* end confdefs.h. */
9767
9768 /* Override any GCC internal prototype to avoid an error.
9769 Use char because int might match the return type of a GCC
9770 builtin and then its argument prototype would still apply. */
9771 #ifdef __cplusplus
9772 extern "C"
9773 #endif
9774 char dlopen ();
9775 int
9776 main ()
9777 {
9778 return dlopen ();
9779 ;
9780 return 0;
9781 }
9782 _ACEOF
9783 rm -f conftest.$ac_objext conftest$ac_exeext
9784 if { (ac_try="$ac_link"
9785 case "(($ac_try" in
9786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9787 *) ac_try_echo=$ac_try;;
9788 esac
9789 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9790 (eval "$ac_link") 2>conftest.er1
9791 ac_status=$?
9792 grep -v '^ *+' conftest.er1 >conftest.err
9793 rm -f conftest.er1
9794 cat conftest.err >&5
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796 (exit $ac_status); } && {
9797 test -z "$ac_c_werror_flag" ||
9798 test ! -s conftest.err
9799 } && test -s conftest$ac_exeext &&
9800 $as_test_x conftest$ac_exeext; then
9801 ac_cv_lib_dl_dlopen=yes
9802 else
9803 echo "$as_me: failed program was:" >&5
9804 sed 's/^/| /' conftest.$ac_ext >&5
9805
9806 ac_cv_lib_dl_dlopen=no
9807 fi
9808
9809 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9810 conftest$ac_exeext conftest.$ac_ext
9811 LIBS=$ac_check_lib_save_LIBS
9812 fi
9813 { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9814 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
9815 if test $ac_cv_lib_dl_dlopen = yes; then
9816 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
9817 else
9818 { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
9819 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
9820 if test "${ac_cv_lib_svld_dlopen+set}" = set; then
9821 echo $ECHO_N "(cached) $ECHO_C" >&6
9822 else
9823 ac_check_lib_save_LIBS=$LIBS
9824 LIBS="-lsvld $LIBS"
9825 cat >conftest.$ac_ext <<_ACEOF
9826 /* confdefs.h. */
9827 _ACEOF
9828 cat confdefs.h >>conftest.$ac_ext
9829 cat >>conftest.$ac_ext <<_ACEOF
9830 /* end confdefs.h. */
9831
9832 /* Override any GCC internal prototype to avoid an error.
9833 Use char because int might match the return type of a GCC
9834 builtin and then its argument prototype would still apply. */
9835 #ifdef __cplusplus
9836 extern "C"
9837 #endif
9838 char dlopen ();
9839 int
9840 main ()
9841 {
9842 return dlopen ();
9843 ;
9844 return 0;
9845 }
9846 _ACEOF
9847 rm -f conftest.$ac_objext conftest$ac_exeext
9848 if { (ac_try="$ac_link"
9849 case "(($ac_try" in
9850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9851 *) ac_try_echo=$ac_try;;
9852 esac
9853 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9854 (eval "$ac_link") 2>conftest.er1
9855 ac_status=$?
9856 grep -v '^ *+' conftest.er1 >conftest.err
9857 rm -f conftest.er1
9858 cat conftest.err >&5
9859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860 (exit $ac_status); } && {
9861 test -z "$ac_c_werror_flag" ||
9862 test ! -s conftest.err
9863 } && test -s conftest$ac_exeext &&
9864 $as_test_x conftest$ac_exeext; then
9865 ac_cv_lib_svld_dlopen=yes
9866 else
9867 echo "$as_me: failed program was:" >&5
9868 sed 's/^/| /' conftest.$ac_ext >&5
9869
9870 ac_cv_lib_svld_dlopen=no
9871 fi
9872
9873 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9874 conftest$ac_exeext conftest.$ac_ext
9875 LIBS=$ac_check_lib_save_LIBS
9876 fi
9877 { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
9878 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
9879 if test $ac_cv_lib_svld_dlopen = yes; then
9880 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
9881 else
9882 { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
9883 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
9884 if test "${ac_cv_lib_dld_dld_link+set}" = set; then
9885 echo $ECHO_N "(cached) $ECHO_C" >&6
9886 else
9887 ac_check_lib_save_LIBS=$LIBS
9888 LIBS="-ldld $LIBS"
9889 cat >conftest.$ac_ext <<_ACEOF
9890 /* confdefs.h. */
9891 _ACEOF
9892 cat confdefs.h >>conftest.$ac_ext
9893 cat >>conftest.$ac_ext <<_ACEOF
9894 /* end confdefs.h. */
9895
9896 /* Override any GCC internal prototype to avoid an error.
9897 Use char because int might match the return type of a GCC
9898 builtin and then its argument prototype would still apply. */
9899 #ifdef __cplusplus
9900 extern "C"
9901 #endif
9902 char dld_link ();
9903 int
9904 main ()
9905 {
9906 return dld_link ();
9907 ;
9908 return 0;
9909 }
9910 _ACEOF
9911 rm -f conftest.$ac_objext conftest$ac_exeext
9912 if { (ac_try="$ac_link"
9913 case "(($ac_try" in
9914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9915 *) ac_try_echo=$ac_try;;
9916 esac
9917 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9918 (eval "$ac_link") 2>conftest.er1
9919 ac_status=$?
9920 grep -v '^ *+' conftest.er1 >conftest.err
9921 rm -f conftest.er1
9922 cat conftest.err >&5
9923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9924 (exit $ac_status); } && {
9925 test -z "$ac_c_werror_flag" ||
9926 test ! -s conftest.err
9927 } && test -s conftest$ac_exeext &&
9928 $as_test_x conftest$ac_exeext; then
9929 ac_cv_lib_dld_dld_link=yes
9930 else
9931 echo "$as_me: failed program was:" >&5
9932 sed 's/^/| /' conftest.$ac_ext >&5
9933
9934 ac_cv_lib_dld_dld_link=no
9935 fi
9936
9937 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9938 conftest$ac_exeext conftest.$ac_ext
9939 LIBS=$ac_check_lib_save_LIBS
9940 fi
9941 { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
9942 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
9943 if test $ac_cv_lib_dld_dld_link = yes; then
9944 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
9945 fi
9946
9947
9948 fi
9949
9950
9951 fi
9952
9953
9954 fi
9955
9956
9957 fi
9958
9959
9960 fi
9961
9962 ;;
9963 esac
9964
9965 if test "x$lt_cv_dlopen" != xno; then
9966 enable_dlopen=yes
9967 else
9968 enable_dlopen=no
9969 fi
9970
9971 case $lt_cv_dlopen in
9972 dlopen)
9973 save_CPPFLAGS="$CPPFLAGS"
9974 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
9975
9976 save_LDFLAGS="$LDFLAGS"
9977 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
9978
9979 save_LIBS="$LIBS"
9980 LIBS="$lt_cv_dlopen_libs $LIBS"
9981
9982 { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
9983 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
9984 if test "${lt_cv_dlopen_self+set}" = set; then
9985 echo $ECHO_N "(cached) $ECHO_C" >&6
9986 else
9987 if test "$cross_compiling" = yes; then :
9988 lt_cv_dlopen_self=cross
9989 else
9990 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
9991 lt_status=$lt_dlunknown
9992 cat > conftest.$ac_ext <<EOF
9993 #line 9994 "configure"
9994 #include "confdefs.h"
9995
9996 #if HAVE_DLFCN_H
9997 #include <dlfcn.h>
9998 #endif
9999
10000 #include <stdio.h>
10001
10002 #ifdef RTLD_GLOBAL
10003 # define LT_DLGLOBAL RTLD_GLOBAL
10004 #else
10005 # ifdef DL_GLOBAL
10006 # define LT_DLGLOBAL DL_GLOBAL
10007 # else
10008 # define LT_DLGLOBAL 0
10009 # endif
10010 #endif
10011
10012 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10013 find out it does not work in some platform. */
10014 #ifndef LT_DLLAZY_OR_NOW
10015 # ifdef RTLD_LAZY
10016 # define LT_DLLAZY_OR_NOW RTLD_LAZY
10017 # else
10018 # ifdef DL_LAZY
10019 # define LT_DLLAZY_OR_NOW DL_LAZY
10020 # else
10021 # ifdef RTLD_NOW
10022 # define LT_DLLAZY_OR_NOW RTLD_NOW
10023 # else
10024 # ifdef DL_NOW
10025 # define LT_DLLAZY_OR_NOW DL_NOW
10026 # else
10027 # define LT_DLLAZY_OR_NOW 0
10028 # endif
10029 # endif
10030 # endif
10031 # endif
10032 #endif
10033
10034 #ifdef __cplusplus
10035 extern "C" void exit (int);
10036 #endif
10037
10038 void fnord() { int i=42;}
10039 int main ()
10040 {
10041 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10042 int status = $lt_dlunknown;
10043
10044 if (self)
10045 {
10046 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10047 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10048 /* dlclose (self); */
10049 }
10050 else
10051 puts (dlerror ());
10052
10053 exit (status);
10054 }
10055 EOF
10056 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10057 (eval $ac_link) 2>&5
10058 ac_status=$?
10059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10060 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10061 (./conftest; exit; ) >&5 2>/dev/null
10062 lt_status=$?
10063 case x$lt_status in
10064 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10065 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10066 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
10067 esac
10068 else :
10069 # compilation failed
10070 lt_cv_dlopen_self=no
10071 fi
10072 fi
10073 rm -fr conftest*
10074
10075
10076 fi
10077 { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
10078 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
10079
10080 if test "x$lt_cv_dlopen_self" = xyes; then
10081 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
10082 { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
10083 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
10084 if test "${lt_cv_dlopen_self_static+set}" = set; then
10085 echo $ECHO_N "(cached) $ECHO_C" >&6
10086 else
10087 if test "$cross_compiling" = yes; then :
10088 lt_cv_dlopen_self_static=cross
10089 else
10090 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10091 lt_status=$lt_dlunknown
10092 cat > conftest.$ac_ext <<EOF
10093 #line 10094 "configure"
10094 #include "confdefs.h"
10095
10096 #if HAVE_DLFCN_H
10097 #include <dlfcn.h>
10098 #endif
10099
10100 #include <stdio.h>
10101
10102 #ifdef RTLD_GLOBAL
10103 # define LT_DLGLOBAL RTLD_GLOBAL
10104 #else
10105 # ifdef DL_GLOBAL
10106 # define LT_DLGLOBAL DL_GLOBAL
10107 # else
10108 # define LT_DLGLOBAL 0
10109 # endif
10110 #endif
10111
10112 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10113 find out it does not work in some platform. */
10114 #ifndef LT_DLLAZY_OR_NOW
10115 # ifdef RTLD_LAZY
10116 # define LT_DLLAZY_OR_NOW RTLD_LAZY
10117 # else
10118 # ifdef DL_LAZY
10119 # define LT_DLLAZY_OR_NOW DL_LAZY
10120 # else
10121 # ifdef RTLD_NOW
10122 # define LT_DLLAZY_OR_NOW RTLD_NOW
10123 # else
10124 # ifdef DL_NOW
10125 # define LT_DLLAZY_OR_NOW DL_NOW
10126 # else
10127 # define LT_DLLAZY_OR_NOW 0
10128 # endif
10129 # endif
10130 # endif
10131 # endif
10132 #endif
10133
10134 #ifdef __cplusplus
10135 extern "C" void exit (int);
10136 #endif
10137
10138 void fnord() { int i=42;}
10139 int main ()
10140 {
10141 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10142 int status = $lt_dlunknown;
10143
10144 if (self)
10145 {
10146 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
10147 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10148 /* dlclose (self); */
10149 }
10150 else
10151 puts (dlerror ());
10152
10153 exit (status);
10154 }
10155 EOF
10156 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10157 (eval $ac_link) 2>&5
10158 ac_status=$?
10159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
10161 (./conftest; exit; ) >&5 2>/dev/null
10162 lt_status=$?
10163 case x$lt_status in
10164 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10165 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10166 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
10167 esac
10168 else :
10169 # compilation failed
10170 lt_cv_dlopen_self_static=no
10171 fi
10172 fi
10173 rm -fr conftest*
10174
10175
10176 fi
10177 { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
10178 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
10179 fi
10180
10181 CPPFLAGS="$save_CPPFLAGS"
10182 LDFLAGS="$save_LDFLAGS"
10183 LIBS="$save_LIBS"
10184 ;;
10185 esac
10186
10187 case $lt_cv_dlopen_self in
10188 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10189 *) enable_dlopen_self=unknown ;;
10190 esac
10191
10192 case $lt_cv_dlopen_self_static in
10193 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10194 *) enable_dlopen_self_static=unknown ;;
10195 esac
10196 fi
10197
10198
10199 # Report which library types will actually be built
10200 { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
10201 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
10202 { echo "$as_me:$LINENO: result: $can_build_shared" >&5
10203 echo "${ECHO_T}$can_build_shared" >&6; }
10204
10205 { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
10206 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
10207 test "$can_build_shared" = "no" && enable_shared=no
10208
10209 # On AIX, shared libraries and static libraries use the same namespace, and
10210 # are all built from PIC.
10211 case $host_os in
10212 aix3*)
10213 test "$enable_shared" = yes && enable_static=no
10214 if test -n "$RANLIB"; then
10215 archive_cmds="$archive_cmds~\$RANLIB \$lib"
10216 postinstall_cmds='$RANLIB $lib'
10217 fi
10218 ;;
10219
10220 aix4* | aix5*)
10221 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
10222 test "$enable_shared" = yes && enable_static=no
10223 fi
10224 ;;
10225 esac
10226 { echo "$as_me:$LINENO: result: $enable_shared" >&5
10227 echo "${ECHO_T}$enable_shared" >&6; }
10228
10229 { echo "$as_me:$LINENO: checking whether to build static libraries" >&5
10230 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
10231 # Make sure either enable_shared or enable_static is yes.
10232 test "$enable_shared" = yes || enable_static=yes
10233 { echo "$as_me:$LINENO: result: $enable_static" >&5
10234 echo "${ECHO_T}$enable_static" >&6; }
10235
10236 # The else clause should only fire when bootstrapping the
10237 # libtool distribution, otherwise you forgot to ship ltmain.sh
10238 # with your package, and you will get complaints that there are
10239 # no rules to generate ltmain.sh.
10240 if test -f "$ltmain"; then
10241 # See if we are running on zsh, and set the options which allow our commands through
10242 # without removal of \ escapes.
10243 if test -n "${ZSH_VERSION+set}" ; then
10244 setopt NO_GLOB_SUBST
10245 fi
10246 # Now quote all the things that may contain metacharacters while being
10247 # careful not to overquote the AC_SUBSTed values. We take copies of the
10248 # variables and quote the copies for generation of the libtool script.
10249 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
10250 SED SHELL STRIP \
10251 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
10252 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
10253 deplibs_check_method reload_flag reload_cmds need_locks \
10254 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
10255 lt_cv_sys_global_symbol_to_c_name_address \
10256 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
10257 old_postinstall_cmds old_postuninstall_cmds \
10258 compiler \
10259 CC \
10260 LD \
10261 lt_prog_compiler_wl \
10262 lt_prog_compiler_pic \
10263 lt_prog_compiler_static \
10264 lt_prog_compiler_no_builtin_flag \
10265 export_dynamic_flag_spec \
10266 thread_safe_flag_spec \
10267 whole_archive_flag_spec \
10268 enable_shared_with_static_runtimes \
10269 old_archive_cmds \
10270 old_archive_from_new_cmds \
10271 predep_objects \
10272 postdep_objects \
10273 predeps \
10274 postdeps \
10275 compiler_lib_search_path \
10276 archive_cmds \
10277 archive_expsym_cmds \
10278 postinstall_cmds \
10279 postuninstall_cmds \
10280 old_archive_from_expsyms_cmds \
10281 allow_undefined_flag \
10282 no_undefined_flag \
10283 export_symbols_cmds \
10284 hardcode_libdir_flag_spec \
10285 hardcode_libdir_flag_spec_ld \
10286 hardcode_libdir_separator \
10287 hardcode_automatic \
10288 module_cmds \
10289 module_expsym_cmds \
10290 lt_cv_prog_compiler_c_o \
10291 fix_srcfile_path \
10292 exclude_expsyms \
10293 include_expsyms; do
10294
10295 case $var in
10296 old_archive_cmds | \
10297 old_archive_from_new_cmds | \
10298 archive_cmds | \
10299 archive_expsym_cmds | \
10300 module_cmds | \
10301 module_expsym_cmds | \
10302 old_archive_from_expsyms_cmds | \
10303 export_symbols_cmds | \
10304 extract_expsyms_cmds | reload_cmds | finish_cmds | \
10305 postinstall_cmds | postuninstall_cmds | \
10306 old_postinstall_cmds | old_postuninstall_cmds | \
10307 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
10308 # Double-quote double-evaled strings.
10309 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
10310 ;;
10311 *)
10312 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
10313 ;;
10314 esac
10315 done
10316
10317 case $lt_echo in
10318 *'\$0 --fallback-echo"')
10319 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
10320 ;;
10321 esac
10322
10323 cfgfile="${ofile}T"
10324 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
10325 $rm -f "$cfgfile"
10326 { echo "$as_me:$LINENO: creating $ofile" >&5
10327 echo "$as_me: creating $ofile" >&6;}
10328
10329 cat <<__EOF__ >> "$cfgfile"
10330 #! $SHELL
10331
10332 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
10333 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
10334 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
10335 #
10336 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
10337 # Free Software Foundation, Inc.
10338 #
10339 # This file is part of GNU Libtool:
10340 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10341 #
10342 # This program is free software; you can redistribute it and/or modify
10343 # it under the terms of the GNU General Public License as published by
10344 # the Free Software Foundation; either version 2 of the License, or
10345 # (at your option) any later version.
10346 #
10347 # This program is distributed in the hope that it will be useful, but
10348 # WITHOUT ANY WARRANTY; without even the implied warranty of
10349 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10350 # General Public License for more details.
10351 #
10352 # You should have received a copy of the GNU General Public License
10353 # along with this program; if not, write to the Free Software
10354 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10355 #
10356 # As a special exception to the GNU General Public License, if you
10357 # distribute this file as part of a program that contains a
10358 # configuration script generated by Autoconf, you may include it under
10359 # the same distribution terms that you use for the rest of that program.
10360
10361 # A sed program that does not truncate output.
10362 SED=$lt_SED
10363
10364 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
10365 Xsed="$SED -e 1s/^X//"
10366
10367 # The HP-UX ksh and POSIX shell print the target directory to stdout
10368 # if CDPATH is set.
10369 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
10370
10371 # The names of the tagged configurations supported by this script.
10372 available_tags=
10373
10374 # ### BEGIN LIBTOOL CONFIG
10375
10376 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10377
10378 # Shell to use when invoking shell scripts.
10379 SHELL=$lt_SHELL
10380
10381 # Whether or not to build shared libraries.
10382 build_libtool_libs=$enable_shared
10383
10384 # Whether or not to build static libraries.
10385 build_old_libs=$enable_static
10386
10387 # Whether or not to add -lc for building shared libraries.
10388 build_libtool_need_lc=$archive_cmds_need_lc
10389
10390 # Whether or not to disallow shared libs when runtime libs are static
10391 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
10392
10393 # Whether or not to optimize for fast installation.
10394 fast_install=$enable_fast_install
10395
10396 # The host system.
10397 host_alias=$host_alias
10398 host=$host
10399 host_os=$host_os
10400
10401 # The build system.
10402 build_alias=$build_alias
10403 build=$build
10404 build_os=$build_os
10405
10406 # An echo program that does not interpret backslashes.
10407 echo=$lt_echo
10408
10409 # The archiver.
10410 AR=$lt_AR
10411 AR_FLAGS=$lt_AR_FLAGS
10412
10413 # A C compiler.
10414 LTCC=$lt_LTCC
10415
10416 # LTCC compiler flags.
10417 LTCFLAGS=$lt_LTCFLAGS
10418
10419 # A language-specific compiler.
10420 CC=$lt_compiler
10421
10422 # Is the compiler the GNU C compiler?
10423 with_gcc=$GCC
10424
10425 # An ERE matcher.
10426 EGREP=$lt_EGREP
10427
10428 # The linker used to build libraries.
10429 LD=$lt_LD
10430
10431 # Whether we need hard or soft links.
10432 LN_S=$lt_LN_S
10433
10434 # A BSD-compatible nm program.
10435 NM=$lt_NM
10436
10437 # A symbol stripping program
10438 STRIP=$lt_STRIP
10439
10440 # Used to examine libraries when file_magic_cmd begins "file"
10441 MAGIC_CMD=$MAGIC_CMD
10442
10443 # Used on cygwin: DLL creation program.
10444 DLLTOOL="$DLLTOOL"
10445
10446 # Used on cygwin: object dumper.
10447 OBJDUMP="$OBJDUMP"
10448
10449 # Used on cygwin: assembler.
10450 AS="$AS"
10451
10452 # The name of the directory that contains temporary libtool files.
10453 objdir=$objdir
10454
10455 # How to create reloadable object files.
10456 reload_flag=$lt_reload_flag
10457 reload_cmds=$lt_reload_cmds
10458
10459 # How to pass a linker flag through the compiler.
10460 wl=$lt_lt_prog_compiler_wl
10461
10462 # Object file suffix (normally "o").
10463 objext="$ac_objext"
10464
10465 # Old archive suffix (normally "a").
10466 libext="$libext"
10467
10468 # Shared library suffix (normally ".so").
10469 shrext_cmds='$shrext_cmds'
10470
10471 # Executable file suffix (normally "").
10472 exeext="$exeext"
10473
10474 # Additional compiler flags for building library objects.
10475 pic_flag=$lt_lt_prog_compiler_pic
10476 pic_mode=$pic_mode
10477
10478 # What is the maximum length of a command?
10479 max_cmd_len=$lt_cv_sys_max_cmd_len
10480
10481 # Does compiler simultaneously support -c and -o options?
10482 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
10483
10484 # Must we lock files when doing compilation?
10485 need_locks=$lt_need_locks
10486
10487 # Do we need the lib prefix for modules?
10488 need_lib_prefix=$need_lib_prefix
10489
10490 # Do we need a version for libraries?
10491 need_version=$need_version
10492
10493 # Whether dlopen is supported.
10494 dlopen_support=$enable_dlopen
10495
10496 # Whether dlopen of programs is supported.
10497 dlopen_self=$enable_dlopen_self
10498
10499 # Whether dlopen of statically linked programs is supported.
10500 dlopen_self_static=$enable_dlopen_self_static
10501
10502 # Compiler flag to prevent dynamic linking.
10503 link_static_flag=$lt_lt_prog_compiler_static
10504
10505 # Compiler flag to turn off builtin functions.
10506 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
10507
10508 # Compiler flag to allow reflexive dlopens.
10509 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
10510
10511 # Compiler flag to generate shared objects directly from archives.
10512 whole_archive_flag_spec=$lt_whole_archive_flag_spec
10513
10514 # Compiler flag to generate thread-safe objects.
10515 thread_safe_flag_spec=$lt_thread_safe_flag_spec
10516
10517 # Library versioning type.
10518 version_type=$version_type
10519
10520 # Format of library name prefix.
10521 libname_spec=$lt_libname_spec
10522
10523 # List of archive names. First name is the real one, the rest are links.
10524 # The last name is the one that the linker finds with -lNAME.
10525 library_names_spec=$lt_library_names_spec
10526
10527 # The coded name of the library, if different from the real name.
10528 soname_spec=$lt_soname_spec
10529
10530 # Commands used to build and install an old-style archive.
10531 RANLIB=$lt_RANLIB
10532 old_archive_cmds=$lt_old_archive_cmds
10533 old_postinstall_cmds=$lt_old_postinstall_cmds
10534 old_postuninstall_cmds=$lt_old_postuninstall_cmds
10535
10536 # Create an old-style archive from a shared archive.
10537 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
10538
10539 # Create a temporary old-style archive to link instead of a shared archive.
10540 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
10541
10542 # Commands used to build and install a shared archive.
10543 archive_cmds=$lt_archive_cmds
10544 archive_expsym_cmds=$lt_archive_expsym_cmds
10545 postinstall_cmds=$lt_postinstall_cmds
10546 postuninstall_cmds=$lt_postuninstall_cmds
10547
10548 # Commands used to build a loadable module (assumed same as above if empty)
10549 module_cmds=$lt_module_cmds
10550 module_expsym_cmds=$lt_module_expsym_cmds
10551
10552 # Commands to strip libraries.
10553 old_striplib=$lt_old_striplib
10554 striplib=$lt_striplib
10555
10556 # Dependencies to place before the objects being linked to create a
10557 # shared library.
10558 predep_objects=$lt_predep_objects
10559
10560 # Dependencies to place after the objects being linked to create a
10561 # shared library.
10562 postdep_objects=$lt_postdep_objects
10563
10564 # Dependencies to place before the objects being linked to create a
10565 # shared library.
10566 predeps=$lt_predeps
10567
10568 # Dependencies to place after the objects being linked to create a
10569 # shared library.
10570 postdeps=$lt_postdeps
10571
10572 # The library search path used internally by the compiler when linking
10573 # a shared library.
10574 compiler_lib_search_path=$lt_compiler_lib_search_path
10575
10576 # Method to check whether dependent libraries are shared objects.
10577 deplibs_check_method=$lt_deplibs_check_method
10578
10579 # Command to use when deplibs_check_method == file_magic.
10580 file_magic_cmd=$lt_file_magic_cmd
10581
10582 # Flag that allows shared libraries with undefined symbols to be built.
10583 allow_undefined_flag=$lt_allow_undefined_flag
10584
10585 # Flag that forces no undefined symbols.
10586 no_undefined_flag=$lt_no_undefined_flag
10587
10588 # Commands used to finish a libtool library installation in a directory.
10589 finish_cmds=$lt_finish_cmds
10590
10591 # Same as above, but a single script fragment to be evaled but not shown.
10592 finish_eval=$lt_finish_eval
10593
10594 # Take the output of nm and produce a listing of raw symbols and C names.
10595 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
10596
10597 # Transform the output of nm in a proper C declaration
10598 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
10599
10600 # Transform the output of nm in a C name address pair
10601 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
10602
10603 # This is the shared library runtime path variable.
10604 runpath_var=$runpath_var
10605
10606 # This is the shared library path variable.
10607 shlibpath_var=$shlibpath_var
10608
10609 # Is shlibpath searched before the hard-coded library search path?
10610 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
10611
10612 # How to hardcode a shared library path into an executable.
10613 hardcode_action=$hardcode_action
10614
10615 # Whether we should hardcode library paths into libraries.
10616 hardcode_into_libs=$hardcode_into_libs
10617
10618 # Flag to hardcode \$libdir into a binary during linking.
10619 # This must work even if \$libdir does not exist.
10620 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
10621
10622 # If ld is used when linking, flag to hardcode \$libdir into
10623 # a binary during linking. This must work even if \$libdir does
10624 # not exist.
10625 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
10626
10627 # Whether we need a single -rpath flag with a separated argument.
10628 hardcode_libdir_separator=$lt_hardcode_libdir_separator
10629
10630 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
10631 # resulting binary.
10632 hardcode_direct=$hardcode_direct
10633
10634 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
10635 # resulting binary.
10636 hardcode_minus_L=$hardcode_minus_L
10637
10638 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
10639 # the resulting binary.
10640 hardcode_shlibpath_var=$hardcode_shlibpath_var
10641
10642 # Set to yes if building a shared library automatically hardcodes DIR into the library
10643 # and all subsequent libraries and executables linked against it.
10644 hardcode_automatic=$hardcode_automatic
10645
10646 # Variables whose values should be saved in libtool wrapper scripts and
10647 # restored at relink time.
10648 variables_saved_for_relink="$variables_saved_for_relink"
10649
10650 # Whether libtool must link a program against all its dependency libraries.
10651 link_all_deplibs=$link_all_deplibs
10652
10653 # Compile-time system search path for libraries
10654 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
10655
10656 # Run-time system search path for libraries
10657 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
10658
10659 # Fix the shell variable \$srcfile for the compiler.
10660 fix_srcfile_path=$lt_fix_srcfile_path
10661
10662 # Set to yes if exported symbols are required.
10663 always_export_symbols=$always_export_symbols
10664
10665 # The commands to list exported symbols.
10666 export_symbols_cmds=$lt_export_symbols_cmds
10667
10668 # The commands to extract the exported symbol list from a shared archive.
10669 extract_expsyms_cmds=$lt_extract_expsyms_cmds
10670
10671 # Symbols that should not be listed in the preloaded symbols.
10672 exclude_expsyms=$lt_exclude_expsyms
10673
10674 # Symbols that must always be exported.
10675 include_expsyms=$lt_include_expsyms
10676
10677 # ### END LIBTOOL CONFIG
10678
10679 __EOF__
10680
10681
10682 case $host_os in
10683 aix3*)
10684 cat <<\EOF >> "$cfgfile"
10685
10686 # AIX sometimes has problems with the GCC collect2 program. For some
10687 # reason, if we set the COLLECT_NAMES environment variable, the problems
10688 # vanish in a puff of smoke.
10689 if test "X${COLLECT_NAMES+set}" != Xset; then
10690 COLLECT_NAMES=
10691 export COLLECT_NAMES
10692 fi
10693 EOF
10694 ;;
10695 esac
10696
10697 # We use sed instead of cat because bash on DJGPP gets confused if
10698 # if finds mixed CR/LF and LF-only lines. Since sed operates in
10699 # text mode, it properly converts lines to CR/LF. This bash problem
10700 # is reportedly fixed, but why not run on old versions too?
10701 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
10702
10703 mv -f "$cfgfile" "$ofile" || \
10704 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
10705 chmod +x "$ofile"
10706
10707 else
10708 # If there is no Makefile yet, we rely on a make rule to execute
10709 # `config.status --recheck' to rerun these tests and create the
10710 # libtool script then.
10711 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
10712 if test -f "$ltmain_in"; then
10713 test -f Makefile && make "$ltmain"
10714 fi
10715 fi
10716
10717
10718 ac_ext=c
10719 ac_cpp='$CPP $CPPFLAGS'
10720 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10721 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10722 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10723
10724 CC="$lt_save_CC"
10725
10726
10727 # Check whether --with-tags was given.
10728 if test "${with_tags+set}" = set; then
10729 withval=$with_tags; tagnames="$withval"
10730 fi
10731
10732
10733 if test -f "$ltmain" && test -n "$tagnames"; then
10734 if test ! -f "${ofile}"; then
10735 { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
10736 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
10737 fi
10738
10739 if test -z "$LTCC"; then
10740 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
10741 if test -z "$LTCC"; then
10742 { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
10743 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
10744 else
10745 { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
10746 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
10747 fi
10748 fi
10749 if test -z "$LTCFLAGS"; then
10750 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
10751 fi
10752
10753 # Extract list of available tagged configurations in $ofile.
10754 # Note that this assumes the entire list is on one line.
10755 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
10756
10757 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10758 for tagname in $tagnames; do
10759 IFS="$lt_save_ifs"
10760 # Check whether tagname contains only valid characters
10761 case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
10762 "") ;;
10763 *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
10764 echo "$as_me: error: invalid tag name: $tagname" >&2;}
10765 { (exit 1); exit 1; }; }
10766 ;;
10767 esac
10768
10769 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
10770 then
10771 { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
10772 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
10773 { (exit 1); exit 1; }; }
10774 fi
10775
10776 # Update the list of available tags.
10777 if test -n "$tagname"; then
10778 echo appending configuration tag \"$tagname\" to $ofile
10779
10780 case $tagname in
10781 CXX)
10782 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
10783 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
10784 (test "X$CXX" != "Xg++"))) ; then
10785 ac_ext=cpp
10786 ac_cpp='$CXXCPP $CPPFLAGS'
10787 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10788 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10789 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10790
10791
10792
10793
10794 archive_cmds_need_lc_CXX=no
10795 allow_undefined_flag_CXX=
10796 always_export_symbols_CXX=no
10797 archive_expsym_cmds_CXX=
10798 export_dynamic_flag_spec_CXX=
10799 hardcode_direct_CXX=no
10800 hardcode_libdir_flag_spec_CXX=
10801 hardcode_libdir_flag_spec_ld_CXX=
10802 hardcode_libdir_separator_CXX=
10803 hardcode_minus_L_CXX=no
10804 hardcode_shlibpath_var_CXX=unsupported
10805 hardcode_automatic_CXX=no
10806 module_cmds_CXX=
10807 module_expsym_cmds_CXX=
10808 link_all_deplibs_CXX=unknown
10809 old_archive_cmds_CXX=$old_archive_cmds
10810 no_undefined_flag_CXX=
10811 whole_archive_flag_spec_CXX=
10812 enable_shared_with_static_runtimes_CXX=no
10813
10814 # Dependencies to place before and after the object being linked:
10815 predep_objects_CXX=
10816 postdep_objects_CXX=
10817 predeps_CXX=
10818 postdeps_CXX=
10819 compiler_lib_search_path_CXX=
10820
10821 # Source file extension for C++ test sources.
10822 ac_ext=cpp
10823
10824 # Object file extension for compiled C++ test sources.
10825 objext=o
10826 objext_CXX=$objext
10827
10828 # Code to be used in simple compile tests
10829 lt_simple_compile_test_code="int some_variable = 0;"
10830
10831 # Code to be used in simple link tests
10832 lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
10833
10834 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
10835
10836 # If no C compiler was specified, use CC.
10837 LTCC=${LTCC-"$CC"}
10838
10839 # If no C compiler flags were specified, use CFLAGS.
10840 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10841
10842 # Allow CC to be a program name with arguments.
10843 compiler=$CC
10844
10845
10846 # save warnings/boilerplate of simple test code
10847 ac_outfile=conftest.$ac_objext
10848 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10849 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10850 _lt_compiler_boilerplate=`cat conftest.err`
10851 $rm conftest*
10852
10853 ac_outfile=conftest.$ac_objext
10854 echo "$lt_simple_link_test_code" >conftest.$ac_ext
10855 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10856 _lt_linker_boilerplate=`cat conftest.err`
10857 $rm conftest*
10858
10859
10860 # Allow CC to be a program name with arguments.
10861 lt_save_CC=$CC
10862 lt_save_LD=$LD
10863 lt_save_GCC=$GCC
10864 GCC=$GXX
10865 lt_save_with_gnu_ld=$with_gnu_ld
10866 lt_save_path_LD=$lt_cv_path_LD
10867 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
10868 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
10869 else
10870 $as_unset lt_cv_prog_gnu_ld
10871 fi
10872 if test -n "${lt_cv_path_LDCXX+set}"; then
10873 lt_cv_path_LD=$lt_cv_path_LDCXX
10874 else
10875 $as_unset lt_cv_path_LD
10876 fi
10877 test -z "${LDCXX+set}" || LD=$LDCXX
10878 CC=${CXX-"c++"}
10879 compiler=$CC
10880 compiler_CXX=$CC
10881 for cc_temp in $compiler""; do
10882 case $cc_temp in
10883 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
10884 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
10885 \-*) ;;
10886 *) break;;
10887 esac
10888 done
10889 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
10890
10891
10892 # We don't want -fno-exception wen compiling C++ code, so set the
10893 # no_builtin_flag separately
10894 if test "$GXX" = yes; then
10895 lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
10896 else
10897 lt_prog_compiler_no_builtin_flag_CXX=
10898 fi
10899
10900 if test "$GXX" = yes; then
10901 # Set up default GNU C++ configuration
10902
10903
10904 # Check whether --with-gnu-ld was given.
10905 if test "${with_gnu_ld+set}" = set; then
10906 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
10907 else
10908 with_gnu_ld=no
10909 fi
10910
10911 ac_prog=ld
10912 if test "$GCC" = yes; then
10913 # Check if gcc -print-prog-name=ld gives a path.
10914 { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
10915 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
10916 case $host in
10917 *-*-mingw*)
10918 # gcc leaves a trailing carriage return which upsets mingw
10919 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
10920 *)
10921 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
10922 esac
10923 case $ac_prog in
10924 # Accept absolute paths.
10925 [\\/]* | ?:[\\/]*)
10926 re_direlt='/[^/][^/]*/\.\./'
10927 # Canonicalize the pathname of ld
10928 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
10929 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
10930 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
10931 done
10932 test -z "$LD" && LD="$ac_prog"
10933 ;;
10934 "")
10935 # If it fails, then pretend we aren't using GCC.
10936 ac_prog=ld
10937 ;;
10938 *)
10939 # If it is relative, then search for the first ld in PATH.
10940 with_gnu_ld=unknown
10941 ;;
10942 esac
10943 elif test "$with_gnu_ld" = yes; then
10944 { echo "$as_me:$LINENO: checking for GNU ld" >&5
10945 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
10946 else
10947 { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
10948 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
10949 fi
10950 if test "${lt_cv_path_LD+set}" = set; then
10951 echo $ECHO_N "(cached) $ECHO_C" >&6
10952 else
10953 if test -z "$LD"; then
10954 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10955 for ac_dir in $PATH; do
10956 IFS="$lt_save_ifs"
10957 test -z "$ac_dir" && ac_dir=.
10958 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
10959 lt_cv_path_LD="$ac_dir/$ac_prog"
10960 # Check to see if the program is GNU ld. I'd rather use --version,
10961 # but apparently some variants of GNU ld only accept -v.
10962 # Break only if it was the GNU/non-GNU ld that we prefer.
10963 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
10964 *GNU* | *'with BFD'*)
10965 test "$with_gnu_ld" != no && break
10966 ;;
10967 *)
10968 test "$with_gnu_ld" != yes && break
10969 ;;
10970 esac
10971 fi
10972 done
10973 IFS="$lt_save_ifs"
10974 else
10975 lt_cv_path_LD="$LD" # Let the user override the test with a path.
10976 fi
10977 fi
10978
10979 LD="$lt_cv_path_LD"
10980 if test -n "$LD"; then
10981 { echo "$as_me:$LINENO: result: $LD" >&5
10982 echo "${ECHO_T}$LD" >&6; }
10983 else
10984 { echo "$as_me:$LINENO: result: no" >&5
10985 echo "${ECHO_T}no" >&6; }
10986 fi
10987 test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
10988 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
10989 { (exit 1); exit 1; }; }
10990 { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
10991 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
10992 if test "${lt_cv_prog_gnu_ld+set}" = set; then
10993 echo $ECHO_N "(cached) $ECHO_C" >&6
10994 else
10995 # I'd rather use --version here, but apparently some GNU lds only accept -v.
10996 case `$LD -v 2>&1 </dev/null` in
10997 *GNU* | *'with BFD'*)
10998 lt_cv_prog_gnu_ld=yes
10999 ;;
11000 *)
11001 lt_cv_prog_gnu_ld=no
11002 ;;
11003 esac
11004 fi
11005 { echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
11006 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
11007 with_gnu_ld=$lt_cv_prog_gnu_ld
11008
11009
11010
11011 # Check if GNU C++ uses GNU ld as the underlying linker, since the
11012 # archiving commands below assume that GNU ld is being used.
11013 if test "$with_gnu_ld" = yes; then
11014 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11015 archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11016
11017 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
11018 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11019
11020 # If archive_cmds runs LD, not CC, wlarc should be empty
11021 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
11022 # investigate it a little bit more. (MM)
11023 wlarc='${wl}'
11024
11025 # ancient GNU ld didn't support --whole-archive et. al.
11026 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
11027 grep 'no-whole-archive' > /dev/null; then
11028 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11029 else
11030 whole_archive_flag_spec_CXX=
11031 fi
11032 else
11033 with_gnu_ld=no
11034 wlarc=
11035
11036 # A generic and very simple default shared library creation
11037 # command for GNU C++ for the case where it uses the native
11038 # linker, instead of GNU ld. If possible, this setting should
11039 # overridden to take advantage of the native linker features on
11040 # the platform it is being used on.
11041 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
11042 fi
11043
11044 # Commands to make compiler produce verbose output that lists
11045 # what "hidden" libraries, object files and flags are used when
11046 # linking a shared library.
11047 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
11048
11049 else
11050 GXX=no
11051 with_gnu_ld=no
11052 wlarc=
11053 fi
11054
11055 # PORTME: fill in a description of your system's C++ link characteristics
11056 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11057 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
11058 ld_shlibs_CXX=yes
11059 case $host_os in
11060 aix3*)
11061 # FIXME: insert proper C++ library support
11062 ld_shlibs_CXX=no
11063 ;;
11064 aix4* | aix5*)
11065 if test "$host_cpu" = ia64; then
11066 # On IA64, the linker does run time linking by default, so we don't
11067 # have to do anything special.
11068 aix_use_runtimelinking=no
11069 exp_sym_flag='-Bexport'
11070 no_entry_flag=""
11071 else
11072 aix_use_runtimelinking=no
11073
11074 # Test if we are trying to use run time linking or normal
11075 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11076 # need to do runtime linking.
11077 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
11078 for ld_flag in $LDFLAGS; do
11079 case $ld_flag in
11080 *-brtl*)
11081 aix_use_runtimelinking=yes
11082 break
11083 ;;
11084 esac
11085 done
11086 ;;
11087 esac
11088
11089 exp_sym_flag='-bexport'
11090 no_entry_flag='-bnoentry'
11091 fi
11092
11093 # When large executables or shared objects are built, AIX ld can
11094 # have problems creating the table of contents. If linking a library
11095 # or program results in "error TOC overflow" add -mminimal-toc to
11096 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
11097 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11098
11099 archive_cmds_CXX=''
11100 hardcode_direct_CXX=yes
11101 hardcode_libdir_separator_CXX=':'
11102 link_all_deplibs_CXX=yes
11103
11104 if test "$GXX" = yes; then
11105 case $host_os in aix4.[012]|aix4.[012].*)
11106 # We only want to do this on AIX 4.2 and lower, the check
11107 # below for broken collect2 doesn't work under 4.3+
11108 collect2name=`${CC} -print-prog-name=collect2`
11109 if test -f "$collect2name" && \
11110 strings "$collect2name" | grep resolve_lib_name >/dev/null
11111 then
11112 # We have reworked collect2
11113 :
11114 else
11115 # We have old collect2
11116 hardcode_direct_CXX=unsupported
11117 # It fails to find uninstalled libraries when the uninstalled
11118 # path is not listed in the libpath. Setting hardcode_minus_L
11119 # to unsupported forces relinking
11120 hardcode_minus_L_CXX=yes
11121 hardcode_libdir_flag_spec_CXX='-L$libdir'
11122 hardcode_libdir_separator_CXX=
11123 fi
11124 ;;
11125 esac
11126 shared_flag='-shared'
11127 if test "$aix_use_runtimelinking" = yes; then
11128 shared_flag="$shared_flag "'${wl}-G'
11129 fi
11130 else
11131 # not using gcc
11132 if test "$host_cpu" = ia64; then
11133 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11134 # chokes on -Wl,-G. The following line is correct:
11135 shared_flag='-G'
11136 else
11137 if test "$aix_use_runtimelinking" = yes; then
11138 shared_flag='${wl}-G'
11139 else
11140 shared_flag='${wl}-bM:SRE'
11141 fi
11142 fi
11143 fi
11144
11145 # It seems that -bexpall does not export symbols beginning with
11146 # underscore (_), so it is better to generate a list of symbols to export.
11147 always_export_symbols_CXX=yes
11148 if test "$aix_use_runtimelinking" = yes; then
11149 # Warning - without using the other runtime loading flags (-brtl),
11150 # -berok will link without error, but may produce a broken library.
11151 allow_undefined_flag_CXX='-berok'
11152 # Determine the default libpath from the value encoded in an empty executable.
11153 cat >conftest.$ac_ext <<_ACEOF
11154 /* confdefs.h. */
11155 _ACEOF
11156 cat confdefs.h >>conftest.$ac_ext
11157 cat >>conftest.$ac_ext <<_ACEOF
11158 /* end confdefs.h. */
11159
11160 int
11161 main ()
11162 {
11163
11164 ;
11165 return 0;
11166 }
11167 _ACEOF
11168 rm -f conftest.$ac_objext conftest$ac_exeext
11169 if { (ac_try="$ac_link"
11170 case "(($ac_try" in
11171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11172 *) ac_try_echo=$ac_try;;
11173 esac
11174 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11175 (eval "$ac_link") 2>conftest.er1
11176 ac_status=$?
11177 grep -v '^ *+' conftest.er1 >conftest.err
11178 rm -f conftest.er1
11179 cat conftest.err >&5
11180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11181 (exit $ac_status); } && {
11182 test -z "$ac_cxx_werror_flag" ||
11183 test ! -s conftest.err
11184 } && test -s conftest$ac_exeext &&
11185 $as_test_x conftest$ac_exeext; then
11186
11187 lt_aix_libpath_sed='
11188 /Import File Strings/,/^$/ {
11189 /^0/ {
11190 s/^0 *\(.*\)$/\1/
11191 p
11192 }
11193 }'
11194 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11195 # Check for a 64-bit object if we didn't find anything.
11196 if test -z "$aix_libpath"; then
11197 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11198 fi
11199 else
11200 echo "$as_me: failed program was:" >&5
11201 sed 's/^/| /' conftest.$ac_ext >&5
11202
11203
11204 fi
11205
11206 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11207 conftest$ac_exeext conftest.$ac_ext
11208 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
11209
11210 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
11211
11212 archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11213 else
11214 if test "$host_cpu" = ia64; then
11215 hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
11216 allow_undefined_flag_CXX="-z nodefs"
11217 archive_expsym_cmds_CXX="\$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"
11218 else
11219 # Determine the default libpath from the value encoded in an empty executable.
11220 cat >conftest.$ac_ext <<_ACEOF
11221 /* confdefs.h. */
11222 _ACEOF
11223 cat confdefs.h >>conftest.$ac_ext
11224 cat >>conftest.$ac_ext <<_ACEOF
11225 /* end confdefs.h. */
11226
11227 int
11228 main ()
11229 {
11230
11231 ;
11232 return 0;
11233 }
11234 _ACEOF
11235 rm -f conftest.$ac_objext conftest$ac_exeext
11236 if { (ac_try="$ac_link"
11237 case "(($ac_try" in
11238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11239 *) ac_try_echo=$ac_try;;
11240 esac
11241 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11242 (eval "$ac_link") 2>conftest.er1
11243 ac_status=$?
11244 grep -v '^ *+' conftest.er1 >conftest.err
11245 rm -f conftest.er1
11246 cat conftest.err >&5
11247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11248 (exit $ac_status); } && {
11249 test -z "$ac_cxx_werror_flag" ||
11250 test ! -s conftest.err
11251 } && test -s conftest$ac_exeext &&
11252 $as_test_x conftest$ac_exeext; then
11253
11254 lt_aix_libpath_sed='
11255 /Import File Strings/,/^$/ {
11256 /^0/ {
11257 s/^0 *\(.*\)$/\1/
11258 p
11259 }
11260 }'
11261 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11262 # Check for a 64-bit object if we didn't find anything.
11263 if test -z "$aix_libpath"; then
11264 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11265 fi
11266 else
11267 echo "$as_me: failed program was:" >&5
11268 sed 's/^/| /' conftest.$ac_ext >&5
11269
11270
11271 fi
11272
11273 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11274 conftest$ac_exeext conftest.$ac_ext
11275 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
11276
11277 hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
11278 # Warning - without using the other run time loading flags,
11279 # -berok will link without error, but may produce a broken library.
11280 no_undefined_flag_CXX=' ${wl}-bernotok'
11281 allow_undefined_flag_CXX=' ${wl}-berok'
11282 # Exported symbols can be pulled into shared objects from archives
11283 whole_archive_flag_spec_CXX='$convenience'
11284 archive_cmds_need_lc_CXX=yes
11285 # This is similar to how AIX traditionally builds its shared libraries.
11286 archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11287 fi
11288 fi
11289 ;;
11290
11291 beos*)
11292 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
11293 allow_undefined_flag_CXX=unsupported
11294 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11295 # support --undefined. This deserves some investigation. FIXME
11296 archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11297 else
11298 ld_shlibs_CXX=no
11299 fi
11300 ;;
11301
11302 chorus*)
11303 case $cc_basename in
11304 *)
11305 # FIXME: insert proper C++ library support
11306 ld_shlibs_CXX=no
11307 ;;
11308 esac
11309 ;;
11310
11311 cygwin* | mingw* | pw32*)
11312 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
11313 # as there is no search path for DLLs.
11314 hardcode_libdir_flag_spec_CXX='-L$libdir'
11315 allow_undefined_flag_CXX=unsupported
11316 always_export_symbols_CXX=no
11317 enable_shared_with_static_runtimes_CXX=yes
11318
11319 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
11320 archive_cmds_CXX='$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'
11321 # If the export-symbols file already is a .def file (1st line
11322 # is EXPORTS), use it as is; otherwise, prepend...
11323 archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11324 cp $export_symbols $output_objdir/$soname.def;
11325 else
11326 echo EXPORTS > $output_objdir/$soname.def;
11327 cat $export_symbols >> $output_objdir/$soname.def;
11328 fi~
11329 $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'
11330 else
11331 ld_shlibs_CXX=no
11332 fi
11333 ;;
11334 darwin* | rhapsody*)
11335 case $host_os in
11336 rhapsody* | darwin1.[012])
11337 allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
11338 ;;
11339 *) # Darwin 1.3 on
11340 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
11341 allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
11342 else
11343 case ${MACOSX_DEPLOYMENT_TARGET} in
11344 10.[012])
11345 allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
11346 ;;
11347 10.*)
11348 allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
11349 ;;
11350 esac
11351 fi
11352 ;;
11353 esac
11354 archive_cmds_need_lc_CXX=no
11355 hardcode_direct_CXX=no
11356 hardcode_automatic_CXX=yes
11357 hardcode_shlibpath_var_CXX=unsupported
11358 whole_archive_flag_spec_CXX=''
11359 link_all_deplibs_CXX=yes
11360
11361 if test "$GXX" = yes ; then
11362 lt_int_apple_cc_single_mod=no
11363 output_verbose_link_cmd='echo'
11364 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
11365 lt_int_apple_cc_single_mod=yes
11366 fi
11367 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11368 archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
11369 else
11370 archive_cmds_CXX='$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'
11371 fi
11372 module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
11373 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
11374 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
11375 archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11376 else
11377 archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11378 fi
11379 module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11380 else
11381 case $cc_basename in
11382 xlc*)
11383 output_verbose_link_cmd='echo'
11384 archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
11385 module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
11386 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
11387 archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11388 module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
11389 ;;
11390 *)
11391 ld_shlibs_CXX=no
11392 ;;
11393 esac
11394 fi
11395 ;;
11396
11397 dgux*)
11398 case $cc_basename in
11399 ec++*)
11400 # FIXME: insert proper C++ library support
11401 ld_shlibs_CXX=no
11402 ;;
11403 ghcx*)
11404 # Green Hills C++ Compiler
11405 # FIXME: insert proper C++ library support
11406 ld_shlibs_CXX=no
11407 ;;
11408 *)
11409 # FIXME: insert proper C++ library support
11410 ld_shlibs_CXX=no
11411 ;;
11412 esac
11413 ;;
11414 freebsd[12]*)
11415 # C++ shared libraries reported to be fairly broken before switch to ELF
11416 ld_shlibs_CXX=no
11417 ;;
11418 freebsd-elf*)
11419 archive_cmds_need_lc_CXX=no
11420 ;;
11421 freebsd* | dragonfly*)
11422 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
11423 # conventions
11424 ld_shlibs_CXX=yes
11425 ;;
11426 gnu*)
11427 ;;
11428 hpux9*)
11429 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
11430 hardcode_libdir_separator_CXX=:
11431 export_dynamic_flag_spec_CXX='${wl}-E'
11432 hardcode_direct_CXX=yes
11433 hardcode_minus_L_CXX=yes # Not in the search PATH,
11434 # but as the default
11435 # location of the library.
11436
11437 case $cc_basename in
11438 CC*)
11439 # FIXME: insert proper C++ library support
11440 ld_shlibs_CXX=no
11441 ;;
11442 aCC*)
11443 archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11444 # Commands to make compiler produce verbose output that lists
11445 # what "hidden" libraries, object files and flags are used when
11446 # linking a shared library.
11447 #
11448 # There doesn't appear to be a way to prevent this compiler from
11449 # explicitly linking system object files so we need to strip them
11450 # from the output so that they don't get included in the library
11451 # dependencies.
11452 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11453 ;;
11454 *)
11455 if test "$GXX" = yes; then
11456 archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11457 else
11458 # FIXME: insert proper C++ library support
11459 ld_shlibs_CXX=no
11460 fi
11461 ;;
11462 esac
11463 ;;
11464 hpux10*|hpux11*)
11465 if test $with_gnu_ld = no; then
11466 hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
11467 hardcode_libdir_separator_CXX=:
11468
11469 case $host_cpu in
11470 hppa*64*|ia64*) ;;
11471 *)
11472 export_dynamic_flag_spec_CXX='${wl}-E'
11473 ;;
11474 esac
11475 fi
11476 case $host_cpu in
11477 hppa*64*|ia64*)
11478 hardcode_direct_CXX=no
11479 hardcode_shlibpath_var_CXX=no
11480 ;;
11481 *)
11482 hardcode_direct_CXX=yes
11483 hardcode_minus_L_CXX=yes # Not in the search PATH,
11484 # but as the default
11485 # location of the library.
11486 ;;
11487 esac
11488
11489 case $cc_basename in
11490 CC*)
11491 # FIXME: insert proper C++ library support
11492 ld_shlibs_CXX=no
11493 ;;
11494 aCC*)
11495 case $host_cpu in
11496 hppa*64*)
11497 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11498 ;;
11499 ia64*)
11500 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11501 ;;
11502 *)
11503 archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11504 ;;
11505 esac
11506 # Commands to make compiler produce verbose output that lists
11507 # what "hidden" libraries, object files and flags are used when
11508 # linking a shared library.
11509 #
11510 # There doesn't appear to be a way to prevent this compiler from
11511 # explicitly linking system object files so we need to strip them
11512 # from the output so that they don't get included in the library
11513 # dependencies.
11514 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11515 ;;
11516 *)
11517 if test "$GXX" = yes; then
11518 if test $with_gnu_ld = no; then
11519 case $host_cpu in
11520 hppa*64*)
11521 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11522 ;;
11523 ia64*)
11524 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11525 ;;
11526 *)
11527 archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11528 ;;
11529 esac
11530 fi
11531 else
11532 # FIXME: insert proper C++ library support
11533 ld_shlibs_CXX=no
11534 fi
11535 ;;
11536 esac
11537 ;;
11538 interix[3-9]*)
11539 hardcode_direct_CXX=no
11540 hardcode_shlibpath_var_CXX=no
11541 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11542 export_dynamic_flag_spec_CXX='${wl}-E'
11543 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11544 # Instead, shared libraries are loaded at an image base (0x10000000 by
11545 # default) and relocated if they conflict, which is a slow very memory
11546 # consuming and fragmenting process. To avoid this, we pick a random,
11547 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11548 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
11549 archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11550 archive_expsym_cmds_CXX='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'
11551 ;;
11552 irix5* | irix6*)
11553 case $cc_basename in
11554 CC*)
11555 # SGI C++
11556 archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
11557
11558 # Archives containing C++ object files must be created using
11559 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
11560 # necessary to make sure instantiated templates are included
11561 # in the archive.
11562 old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
11563 ;;
11564 *)
11565 if test "$GXX" = yes; then
11566 if test "$with_gnu_ld" = no; then
11567 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11568 else
11569 archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
11570 fi
11571 fi
11572 link_all_deplibs_CXX=yes
11573 ;;
11574 esac
11575 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11576 hardcode_libdir_separator_CXX=:
11577 ;;
11578 linux* | k*bsd*-gnu)
11579 case $cc_basename in
11580 KCC*)
11581 # Kuck and Associates, Inc. (KAI) C++ Compiler
11582
11583 # KCC will only create a shared library if the output file
11584 # ends with ".so" (or ".sl" for HP-UX), so rename the library
11585 # to its proper name (with version) after linking.
11586 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
11587 archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
11588 # Commands to make compiler produce verbose output that lists
11589 # what "hidden" libraries, object files and flags are used when
11590 # linking a shared library.
11591 #
11592 # There doesn't appear to be a way to prevent this compiler from
11593 # explicitly linking system object files so we need to strip them
11594 # from the output so that they don't get included in the library
11595 # dependencies.
11596 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11597
11598 hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
11599 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11600
11601 # Archives containing C++ object files must be created using
11602 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
11603 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
11604 ;;
11605 icpc*)
11606 # Intel C++
11607 with_gnu_ld=yes
11608 # version 8.0 and above of icpc choke on multiply defined symbols
11609 # if we add $predep_objects and $postdep_objects, however 7.1 and
11610 # earlier do not add the objects themselves.
11611 case `$CC -V 2>&1` in
11612 *"Version 7."*)
11613 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11614 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11615 ;;
11616 *) # Version 8.0 or newer
11617 tmp_idyn=
11618 case $host_cpu in
11619 ia64*) tmp_idyn=' -i_dynamic';;
11620 esac
11621 archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11622 archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11623 ;;
11624 esac
11625 archive_cmds_need_lc_CXX=no
11626 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11627 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11628 whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
11629 ;;
11630 pgCC*)
11631 # Portland Group C++ compiler
11632 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
11633 archive_expsym_cmds_CXX='$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'
11634
11635 hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
11636 export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
11637 whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
11638 ;;
11639 cxx*)
11640 # Compaq C++
11641 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
11642 archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
11643
11644 runpath_var=LD_RUN_PATH
11645 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
11646 hardcode_libdir_separator_CXX=:
11647
11648 # Commands to make compiler produce verbose output that lists
11649 # what "hidden" libraries, object files and flags are used when
11650 # linking a shared library.
11651 #
11652 # There doesn't appear to be a way to prevent this compiler from
11653 # explicitly linking system object files so we need to strip them
11654 # from the output so that they don't get included in the library
11655 # dependencies.
11656 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11657 ;;
11658 *)
11659 case `$CC -V 2>&1 | sed 5q` in
11660 *Sun\ C*)
11661 # Sun C++ 5.9
11662 no_undefined_flag_CXX=' -zdefs'
11663 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11664 archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
11665 hardcode_libdir_flag_spec_CXX='-R$libdir'
11666 whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
11667
11668 # Not sure whether something based on
11669 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
11670 # would be better.
11671 output_verbose_link_cmd='echo'
11672
11673 # Archives containing C++ object files must be created using
11674 # "CC -xar", where "CC" is the Sun C++ compiler. This is
11675 # necessary to make sure instantiated templates are included
11676 # in the archive.
11677 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
11678 ;;
11679 esac
11680 ;;
11681 esac
11682 ;;
11683 lynxos*)
11684 # FIXME: insert proper C++ library support
11685 ld_shlibs_CXX=no
11686 ;;
11687 m88k*)
11688 # FIXME: insert proper C++ library support
11689 ld_shlibs_CXX=no
11690 ;;
11691 mvs*)
11692 case $cc_basename in
11693 cxx*)
11694 # FIXME: insert proper C++ library support
11695 ld_shlibs_CXX=no
11696 ;;
11697 *)
11698 # FIXME: insert proper C++ library support
11699 ld_shlibs_CXX=no
11700 ;;
11701 esac
11702 ;;
11703 netbsd*)
11704 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
11705 archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
11706 wlarc=
11707 hardcode_libdir_flag_spec_CXX='-R$libdir'
11708 hardcode_direct_CXX=yes
11709 hardcode_shlibpath_var_CXX=no
11710 fi
11711 # Workaround some broken pre-1.5 toolchains
11712 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
11713 ;;
11714 openbsd2*)
11715 # C++ shared libraries are fairly broken
11716 ld_shlibs_CXX=no
11717 ;;
11718 openbsd*)
11719 if test -f /usr/libexec/ld.so; then
11720 hardcode_direct_CXX=yes
11721 hardcode_shlibpath_var_CXX=no
11722 archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
11723 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11724 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
11725 archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
11726 export_dynamic_flag_spec_CXX='${wl}-E'
11727 whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11728 fi
11729 output_verbose_link_cmd='echo'
11730 else
11731 ld_shlibs_CXX=no
11732 fi
11733 ;;
11734 osf3*)
11735 case $cc_basename in
11736 KCC*)
11737 # Kuck and Associates, Inc. (KAI) C++ Compiler
11738
11739 # KCC will only create a shared library if the output file
11740 # ends with ".so" (or ".sl" for HP-UX), so rename the library
11741 # to its proper name (with version) after linking.
11742 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
11743
11744 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11745 hardcode_libdir_separator_CXX=:
11746
11747 # Archives containing C++ object files must be created using
11748 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
11749 old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
11750
11751 ;;
11752 RCC*)
11753 # Rational C++ 2.4.1
11754 # FIXME: insert proper C++ library support
11755 ld_shlibs_CXX=no
11756 ;;
11757 cxx*)
11758 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11759 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
11760
11761 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11762 hardcode_libdir_separator_CXX=:
11763
11764 # Commands to make compiler produce verbose output that lists
11765 # what "hidden" libraries, object files and flags are used when
11766 # linking a shared library.
11767 #
11768 # There doesn't appear to be a way to prevent this compiler from
11769 # explicitly linking system object files so we need to strip them
11770 # from the output so that they don't get included in the library
11771 # dependencies.
11772 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11773 ;;
11774 *)
11775 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11776 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11777 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11778
11779 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11780 hardcode_libdir_separator_CXX=:
11781
11782 # Commands to make compiler produce verbose output that lists
11783 # what "hidden" libraries, object files and flags are used when
11784 # linking a shared library.
11785 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
11786
11787 else
11788 # FIXME: insert proper C++ library support
11789 ld_shlibs_CXX=no
11790 fi
11791 ;;
11792 esac
11793 ;;
11794 osf4* | osf5*)
11795 case $cc_basename in
11796 KCC*)
11797 # Kuck and Associates, Inc. (KAI) C++ Compiler
11798
11799 # KCC will only create a shared library if the output file
11800 # ends with ".so" (or ".sl" for HP-UX), so rename the library
11801 # to its proper name (with version) after linking.
11802 archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
11803
11804 hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
11805 hardcode_libdir_separator_CXX=:
11806
11807 # Archives containing C++ object files must be created using
11808 # the KAI C++ compiler.
11809 old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
11810 ;;
11811 RCC*)
11812 # Rational C++ 2.4.1
11813 # FIXME: insert proper C++ library support
11814 ld_shlibs_CXX=no
11815 ;;
11816 cxx*)
11817 allow_undefined_flag_CXX=' -expect_unresolved \*'
11818 archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
11819 archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
11820 echo "-hidden">> $lib.exp~
11821 $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~
11822 $rm $lib.exp'
11823
11824 hardcode_libdir_flag_spec_CXX='-rpath $libdir'
11825 hardcode_libdir_separator_CXX=:
11826
11827 # Commands to make compiler produce verbose output that lists
11828 # what "hidden" libraries, object files and flags are used when
11829 # linking a shared library.
11830 #
11831 # There doesn't appear to be a way to prevent this compiler from
11832 # explicitly linking system object files so we need to strip them
11833 # from the output so that they don't get included in the library
11834 # dependencies.
11835 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
11836 ;;
11837 *)
11838 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11839 allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
11840 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11841
11842 hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
11843 hardcode_libdir_separator_CXX=:
11844
11845 # Commands to make compiler produce verbose output that lists
11846 # what "hidden" libraries, object files and flags are used when
11847 # linking a shared library.
11848 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
11849
11850 else
11851 # FIXME: insert proper C++ library support
11852 ld_shlibs_CXX=no
11853 fi
11854 ;;
11855 esac
11856 ;;
11857 psos*)
11858 # FIXME: insert proper C++ library support
11859 ld_shlibs_CXX=no
11860 ;;
11861 sunos4*)
11862 case $cc_basename in
11863 CC*)
11864 # Sun C++ 4.x
11865 # FIXME: insert proper C++ library support
11866 ld_shlibs_CXX=no
11867 ;;
11868 lcc*)
11869 # Lucid
11870 # FIXME: insert proper C++ library support
11871 ld_shlibs_CXX=no
11872 ;;
11873 *)
11874 # FIXME: insert proper C++ library support
11875 ld_shlibs_CXX=no
11876 ;;
11877 esac
11878 ;;
11879 solaris*)
11880 case $cc_basename in
11881 CC*)
11882 # Sun C++ 4.2, 5.x and Centerline C++
11883 archive_cmds_need_lc_CXX=yes
11884 no_undefined_flag_CXX=' -zdefs'
11885 archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
11886 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11887 $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'
11888
11889 hardcode_libdir_flag_spec_CXX='-R$libdir'
11890 hardcode_shlibpath_var_CXX=no
11891 case $host_os in
11892 solaris2.[0-5] | solaris2.[0-5].*) ;;
11893 *)
11894 # The compiler driver will combine and reorder linker options,
11895 # but understands `-z linker_flag'.
11896 # Supported since Solaris 2.6 (maybe 2.5.1?)
11897 whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
11898 ;;
11899 esac
11900 link_all_deplibs_CXX=yes
11901
11902 output_verbose_link_cmd='echo'
11903
11904 # Archives containing C++ object files must be created using
11905 # "CC -xar", where "CC" is the Sun C++ compiler. This is
11906 # necessary to make sure instantiated templates are included
11907 # in the archive.
11908 old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
11909 ;;
11910 gcx*)
11911 # Green Hills C++ Compiler
11912 archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11913
11914 # The C++ compiler must be used to create the archive.
11915 old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
11916 ;;
11917 *)
11918 # GNU C++ compiler with Solaris linker
11919 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
11920 no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
11921 if $CC --version | grep -v '^2\.7' > /dev/null; then
11922 archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11923 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11924 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
11925
11926 # Commands to make compiler produce verbose output that lists
11927 # what "hidden" libraries, object files and flags are used when
11928 # linking a shared library.
11929 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
11930 else
11931 # g++ 2.7 appears to require `-G' NOT `-shared' on this
11932 # platform.
11933 archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
11934 archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
11935 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
11936
11937 # Commands to make compiler produce verbose output that lists
11938 # what "hidden" libraries, object files and flags are used when
11939 # linking a shared library.
11940 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
11941 fi
11942
11943 hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
11944 case $host_os in
11945 solaris2.[0-5] | solaris2.[0-5].*) ;;
11946 *)
11947 whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
11948 ;;
11949 esac
11950 fi
11951 ;;
11952 esac
11953 ;;
11954 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
11955 no_undefined_flag_CXX='${wl}-z,text'
11956 archive_cmds_need_lc_CXX=no
11957 hardcode_shlibpath_var_CXX=no
11958 runpath_var='LD_RUN_PATH'
11959
11960 case $cc_basename in
11961 CC*)
11962 archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11963 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11964 ;;
11965 *)
11966 archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11967 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11968 ;;
11969 esac
11970 ;;
11971 sysv5* | sco3.2v5* | sco5v6*)
11972 # Note: We can NOT use -z defs as we might desire, because we do not
11973 # link with -lc, and that would cause any symbols used from libc to
11974 # always be unresolved, which means just about no library would
11975 # ever link correctly. If we're not using GNU ld we use -z text
11976 # though, which does catch some bad symbols but isn't as heavy-handed
11977 # as -z defs.
11978 # For security reasons, it is highly recommended that you always
11979 # use absolute paths for naming shared libraries, and exclude the
11980 # DT_RUNPATH tag from executables and libraries. But doing so
11981 # requires that you compile everything twice, which is a pain.
11982 # So that behaviour is only enabled if SCOABSPATH is set to a
11983 # non-empty value in the environment. Most likely only useful for
11984 # creating official distributions of packages.
11985 # This is a hack until libtool officially supports absolute path
11986 # names for shared libraries.
11987 no_undefined_flag_CXX='${wl}-z,text'
11988 allow_undefined_flag_CXX='${wl}-z,nodefs'
11989 archive_cmds_need_lc_CXX=no
11990 hardcode_shlibpath_var_CXX=no
11991 hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
11992 hardcode_libdir_separator_CXX=':'
11993 link_all_deplibs_CXX=yes
11994 export_dynamic_flag_spec_CXX='${wl}-Bexport'
11995 runpath_var='LD_RUN_PATH'
11996
11997 case $cc_basename in
11998 CC*)
11999 archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12000 archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12001 ;;
12002 *)
12003 archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12004 archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
12005 ;;
12006 esac
12007 ;;
12008 tandem*)
12009 case $cc_basename in
12010 NCC*)
12011 # NonStop-UX NCC 3.20
12012 # FIXME: insert proper C++ library support
12013 ld_shlibs_CXX=no
12014 ;;
12015 *)
12016 # FIXME: insert proper C++ library support
12017 ld_shlibs_CXX=no
12018 ;;
12019 esac
12020 ;;
12021 vxworks*)
12022 # FIXME: insert proper C++ library support
12023 ld_shlibs_CXX=no
12024 ;;
12025 *)
12026 # FIXME: insert proper C++ library support
12027 ld_shlibs_CXX=no
12028 ;;
12029 esac
12030 { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
12031 echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
12032 test "$ld_shlibs_CXX" = no && can_build_shared=no
12033
12034 GCC_CXX="$GXX"
12035 LD_CXX="$LD"
12036
12037
12038 cat > conftest.$ac_ext <<EOF
12039 class Foo
12040 {
12041 public:
12042 Foo (void) { a = 0; }
12043 private:
12044 int a;
12045 };
12046 EOF
12047
12048 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12049 (eval $ac_compile) 2>&5
12050 ac_status=$?
12051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12052 (exit $ac_status); }; then
12053 # Parse the compiler output and extract the necessary
12054 # objects, libraries and library flags.
12055
12056 # Sentinel used to keep track of whether or not we are before
12057 # the conftest object file.
12058 pre_test_object_deps_done=no
12059
12060 # The `*' in the case matches for architectures that use `case' in
12061 # $output_verbose_cmd can trigger glob expansion during the loop
12062 # eval without this substitution.
12063 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
12064
12065 for p in `eval $output_verbose_link_cmd`; do
12066 case $p in
12067
12068 -L* | -R* | -l*)
12069 # Some compilers place space between "-{L,R}" and the path.
12070 # Remove the space.
12071 if test $p = "-L" \
12072 || test $p = "-R"; then
12073 prev=$p
12074 continue
12075 else
12076 prev=
12077 fi
12078
12079 if test "$pre_test_object_deps_done" = no; then
12080 case $p in
12081 -L* | -R*)
12082 # Internal compiler library paths should come after those
12083 # provided the user. The postdeps already come after the
12084 # user supplied libs so there is no need to process them.
12085 if test -z "$compiler_lib_search_path_CXX"; then
12086 compiler_lib_search_path_CXX="${prev}${p}"
12087 else
12088 compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
12089 fi
12090 ;;
12091 # The "-l" case would never come before the object being
12092 # linked, so don't bother handling this case.
12093 esac
12094 else
12095 if test -z "$postdeps_CXX"; then
12096 postdeps_CXX="${prev}${p}"
12097 else
12098 postdeps_CXX="${postdeps_CXX} ${prev}${p}"
12099 fi
12100 fi
12101 ;;
12102
12103 *.$objext)
12104 # This assumes that the test object file only shows up
12105 # once in the compiler output.
12106 if test "$p" = "conftest.$objext"; then
12107 pre_test_object_deps_done=yes
12108 continue
12109 fi
12110
12111 if test "$pre_test_object_deps_done" = no; then
12112 if test -z "$predep_objects_CXX"; then
12113 predep_objects_CXX="$p"
12114 else
12115 predep_objects_CXX="$predep_objects_CXX $p"
12116 fi
12117 else
12118 if test -z "$postdep_objects_CXX"; then
12119 postdep_objects_CXX="$p"
12120 else
12121 postdep_objects_CXX="$postdep_objects_CXX $p"
12122 fi
12123 fi
12124 ;;
12125
12126 *) ;; # Ignore the rest.
12127
12128 esac
12129 done
12130
12131 # Clean up.
12132 rm -f a.out a.exe
12133 else
12134 echo "libtool.m4: error: problem compiling CXX test program"
12135 fi
12136
12137 $rm -f confest.$objext
12138
12139 # PORTME: override above test on systems where it is broken
12140 case $host_os in
12141 interix[3-9]*)
12142 # Interix 3.5 installs completely hosed .la files for C++, so rather than
12143 # hack all around it, let's just trust "g++" to DTRT.
12144 predep_objects_CXX=
12145 postdep_objects_CXX=
12146 postdeps_CXX=
12147 ;;
12148
12149 linux*)
12150 case `$CC -V 2>&1 | sed 5q` in
12151 *Sun\ C*)
12152 # Sun C++ 5.9
12153 #
12154 # The more standards-conforming stlport4 library is
12155 # incompatible with the Cstd library. Avoid specifying
12156 # it if it's in CXXFLAGS. Ignore libCrun as
12157 # -library=stlport4 depends on it.
12158 case " $CXX $CXXFLAGS " in
12159 *" -library=stlport4 "*)
12160 solaris_use_stlport4=yes
12161 ;;
12162 esac
12163 if test "$solaris_use_stlport4" != yes; then
12164 postdeps_CXX='-library=Cstd -library=Crun'
12165 fi
12166 ;;
12167 esac
12168 ;;
12169
12170 solaris*)
12171 case $cc_basename in
12172 CC*)
12173 # The more standards-conforming stlport4 library is
12174 # incompatible with the Cstd library. Avoid specifying
12175 # it if it's in CXXFLAGS. Ignore libCrun as
12176 # -library=stlport4 depends on it.
12177 case " $CXX $CXXFLAGS " in
12178 *" -library=stlport4 "*)
12179 solaris_use_stlport4=yes
12180 ;;
12181 esac
12182
12183 # Adding this requires a known-good setup of shared libraries for
12184 # Sun compiler versions before 5.6, else PIC objects from an old
12185 # archive will be linked into the output, leading to subtle bugs.
12186 if test "$solaris_use_stlport4" != yes; then
12187 postdeps_CXX='-library=Cstd -library=Crun'
12188 fi
12189 ;;
12190 esac
12191 ;;
12192 esac
12193
12194
12195 case " $postdeps_CXX " in
12196 *" -lc "*) archive_cmds_need_lc_CXX=no ;;
12197 esac
12198
12199 lt_prog_compiler_wl_CXX=
12200 lt_prog_compiler_pic_CXX=
12201 lt_prog_compiler_static_CXX=
12202
12203 { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
12204 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
12205
12206 # C++ specific cases for pic, static, wl, etc.
12207 if test "$GXX" = yes; then
12208 lt_prog_compiler_wl_CXX='-Wl,'
12209 lt_prog_compiler_static_CXX='-static'
12210
12211 case $host_os in
12212 aix*)
12213 # All AIX code is PIC.
12214 if test "$host_cpu" = ia64; then
12215 # AIX 5 now supports IA64 processor
12216 lt_prog_compiler_static_CXX='-Bstatic'
12217 fi
12218 ;;
12219 amigaos*)
12220 # FIXME: we need at least 68020 code to build shared libraries, but
12221 # adding the `-m68020' flag to GCC prevents building anything better,
12222 # like `-m68040'.
12223 lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
12224 ;;
12225 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
12226 # PIC is the default for these OSes.
12227 ;;
12228 mingw* | cygwin* | os2* | pw32*)
12229 # This hack is so that the source file can tell whether it is being
12230 # built for inclusion in a dll (and should export symbols for example).
12231 # Although the cygwin gcc ignores -fPIC, still need this for old-style
12232 # (--disable-auto-import) libraries
12233 lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
12234 ;;
12235 darwin* | rhapsody*)
12236 # PIC is the default on this platform
12237 # Common symbols not allowed in MH_DYLIB files
12238 lt_prog_compiler_pic_CXX='-fno-common'
12239 ;;
12240 *djgpp*)
12241 # DJGPP does not support shared libraries at all
12242 lt_prog_compiler_pic_CXX=
12243 ;;
12244 interix[3-9]*)
12245 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
12246 # Instead, we relocate shared libraries at runtime.
12247 ;;
12248 sysv4*MP*)
12249 if test -d /usr/nec; then
12250 lt_prog_compiler_pic_CXX=-Kconform_pic
12251 fi
12252 ;;
12253 hpux*)
12254 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
12255 # not for PA HP-UX.
12256 case $host_cpu in
12257 hppa*64*|ia64*)
12258 ;;
12259 *)
12260 lt_prog_compiler_pic_CXX='-fPIC'
12261 ;;
12262 esac
12263 ;;
12264 *)
12265 lt_prog_compiler_pic_CXX='-fPIC'
12266 ;;
12267 esac
12268 else
12269 case $host_os in
12270 aix4* | aix5*)
12271 # All AIX code is PIC.
12272 if test "$host_cpu" = ia64; then
12273 # AIX 5 now supports IA64 processor
12274 lt_prog_compiler_static_CXX='-Bstatic'
12275 else
12276 lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
12277 fi
12278 ;;
12279 chorus*)
12280 case $cc_basename in
12281 cxch68*)
12282 # Green Hills C++ Compiler
12283 # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
12284 ;;
12285 esac
12286 ;;
12287 darwin*)
12288 # PIC is the default on this platform
12289 # Common symbols not allowed in MH_DYLIB files
12290 case $cc_basename in
12291 xlc*)
12292 lt_prog_compiler_pic_CXX='-qnocommon'
12293 lt_prog_compiler_wl_CXX='-Wl,'
12294 ;;
12295 esac
12296 ;;
12297 dgux*)
12298 case $cc_basename in
12299 ec++*)
12300 lt_prog_compiler_pic_CXX='-KPIC'
12301 ;;
12302 ghcx*)
12303 # Green Hills C++ Compiler
12304 lt_prog_compiler_pic_CXX='-pic'
12305 ;;
12306 *)
12307 ;;
12308 esac
12309 ;;
12310 freebsd* | dragonfly*)
12311 # FreeBSD uses GNU C++
12312 ;;
12313 hpux9* | hpux10* | hpux11*)
12314 case $cc_basename in
12315 CC*)
12316 lt_prog_compiler_wl_CXX='-Wl,'
12317 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
12318 if test "$host_cpu" != ia64; then
12319 lt_prog_compiler_pic_CXX='+Z'
12320 fi
12321 ;;
12322 aCC*)
12323 lt_prog_compiler_wl_CXX='-Wl,'
12324 lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
12325 case $host_cpu in
12326 hppa*64*|ia64*)
12327 # +Z the default
12328 ;;
12329 *)
12330 lt_prog_compiler_pic_CXX='+Z'
12331 ;;
12332 esac
12333 ;;
12334 *)
12335 ;;
12336 esac
12337 ;;
12338 interix*)
12339 # This is c89, which is MS Visual C++ (no shared libs)
12340 # Anyone wants to do a port?
12341 ;;
12342 irix5* | irix6* | nonstopux*)
12343 case $cc_basename in
12344 CC*)
12345 lt_prog_compiler_wl_CXX='-Wl,'
12346 lt_prog_compiler_static_CXX='-non_shared'
12347 # CC pic flag -KPIC is the default.
12348 ;;
12349 *)
12350 ;;
12351 esac
12352 ;;
12353 linux* | k*bsd*-gnu)
12354 case $cc_basename in
12355 KCC*)
12356 # KAI C++ Compiler
12357 lt_prog_compiler_wl_CXX='--backend -Wl,'
12358 lt_prog_compiler_pic_CXX='-fPIC'
12359 ;;
12360 icpc* | ecpc*)
12361 # Intel C++
12362 lt_prog_compiler_wl_CXX='-Wl,'
12363 lt_prog_compiler_pic_CXX='-KPIC'
12364 lt_prog_compiler_static_CXX='-static'
12365 ;;
12366 pgCC*)
12367 # Portland Group C++ compiler.
12368 lt_prog_compiler_wl_CXX='-Wl,'
12369 lt_prog_compiler_pic_CXX='-fpic'
12370 lt_prog_compiler_static_CXX='-Bstatic'
12371 ;;
12372 cxx*)
12373 # Compaq C++
12374 # Make sure the PIC flag is empty. It appears that all Alpha
12375 # Linux and Compaq Tru64 Unix objects are PIC.
12376 lt_prog_compiler_pic_CXX=
12377 lt_prog_compiler_static_CXX='-non_shared'
12378 ;;
12379 *)
12380 case `$CC -V 2>&1 | sed 5q` in
12381 *Sun\ C*)
12382 # Sun C++ 5.9
12383 lt_prog_compiler_pic_CXX='-KPIC'
12384 lt_prog_compiler_static_CXX='-Bstatic'
12385 lt_prog_compiler_wl_CXX='-Qoption ld '
12386 ;;
12387 esac
12388 ;;
12389 esac
12390 ;;
12391 lynxos*)
12392 ;;
12393 m88k*)
12394 ;;
12395 mvs*)
12396 case $cc_basename in
12397 cxx*)
12398 lt_prog_compiler_pic_CXX='-W c,exportall'
12399 ;;
12400 *)
12401 ;;
12402 esac
12403 ;;
12404 netbsd*)
12405 ;;
12406 osf3* | osf4* | osf5*)
12407 case $cc_basename in
12408 KCC*)
12409 lt_prog_compiler_wl_CXX='--backend -Wl,'
12410 ;;
12411 RCC*)
12412 # Rational C++ 2.4.1
12413 lt_prog_compiler_pic_CXX='-pic'
12414 ;;
12415 cxx*)
12416 # Digital/Compaq C++
12417 lt_prog_compiler_wl_CXX='-Wl,'
12418 # Make sure the PIC flag is empty. It appears that all Alpha
12419 # Linux and Compaq Tru64 Unix objects are PIC.
12420 lt_prog_compiler_pic_CXX=
12421 lt_prog_compiler_static_CXX='-non_shared'
12422 ;;
12423 *)
12424 ;;
12425 esac
12426 ;;
12427 psos*)
12428 ;;
12429 solaris*)
12430 case $cc_basename in
12431 CC*)
12432 # Sun C++ 4.2, 5.x and Centerline C++
12433 lt_prog_compiler_pic_CXX='-KPIC'
12434 lt_prog_compiler_static_CXX='-Bstatic'
12435 lt_prog_compiler_wl_CXX='-Qoption ld '
12436 ;;
12437 gcx*)
12438 # Green Hills C++ Compiler
12439 lt_prog_compiler_pic_CXX='-PIC'
12440 ;;
12441 *)
12442 ;;
12443 esac
12444 ;;
12445 sunos4*)
12446 case $cc_basename in
12447 CC*)
12448 # Sun C++ 4.x
12449 lt_prog_compiler_pic_CXX='-pic'
12450 lt_prog_compiler_static_CXX='-Bstatic'
12451 ;;
12452 lcc*)
12453 # Lucid
12454 lt_prog_compiler_pic_CXX='-pic'
12455 ;;
12456 *)
12457 ;;
12458 esac
12459 ;;
12460 tandem*)
12461 case $cc_basename in
12462 NCC*)
12463 # NonStop-UX NCC 3.20
12464 lt_prog_compiler_pic_CXX='-KPIC'
12465 ;;
12466 *)
12467 ;;
12468 esac
12469 ;;
12470 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
12471 case $cc_basename in
12472 CC*)
12473 lt_prog_compiler_wl_CXX='-Wl,'
12474 lt_prog_compiler_pic_CXX='-KPIC'
12475 lt_prog_compiler_static_CXX='-Bstatic'
12476 ;;
12477 esac
12478 ;;
12479 vxworks*)
12480 ;;
12481 *)
12482 lt_prog_compiler_can_build_shared_CXX=no
12483 ;;
12484 esac
12485 fi
12486
12487 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
12488 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
12489
12490 #
12491 # Check to make sure the PIC flag actually works.
12492 #
12493 if test -n "$lt_prog_compiler_pic_CXX"; then
12494
12495 { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
12496 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
12497 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
12498 echo $ECHO_N "(cached) $ECHO_C" >&6
12499 else
12500 lt_prog_compiler_pic_works_CXX=no
12501 ac_outfile=conftest.$ac_objext
12502 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12503 lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
12504 # Insert the option either (1) after the last *FLAGS variable, or
12505 # (2) before a word containing "conftest.", or (3) at the end.
12506 # Note that $ac_compile itself does not contain backslashes and begins
12507 # with a dollar sign (not a hyphen), so the echo should work correctly.
12508 # The option is referenced via a variable to avoid confusing sed.
12509 lt_compile=`echo "$ac_compile" | $SED \
12510 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12511 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12512 -e 's:$: $lt_compiler_flag:'`
12513 (eval echo "\"\$as_me:12514: $lt_compile\"" >&5)
12514 (eval "$lt_compile" 2>conftest.err)
12515 ac_status=$?
12516 cat conftest.err >&5
12517 echo "$as_me:12518: \$? = $ac_status" >&5
12518 if (exit $ac_status) && test -s "$ac_outfile"; then
12519 # The compiler can only warn and ignore the option if not recognized
12520 # So say no if there are warnings other than the usual output.
12521 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
12522 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12523 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
12524 lt_prog_compiler_pic_works_CXX=yes
12525 fi
12526 fi
12527 $rm conftest*
12528
12529 fi
12530 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
12531 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; }
12532
12533 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
12534 case $lt_prog_compiler_pic_CXX in
12535 "" | " "*) ;;
12536 *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
12537 esac
12538 else
12539 lt_prog_compiler_pic_CXX=
12540 lt_prog_compiler_can_build_shared_CXX=no
12541 fi
12542
12543 fi
12544 case $host_os in
12545 # For platforms which do not support PIC, -DPIC is meaningless:
12546 *djgpp*)
12547 lt_prog_compiler_pic_CXX=
12548 ;;
12549 *)
12550 lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
12551 ;;
12552 esac
12553
12554 #
12555 # Check to make sure the static flag actually works.
12556 #
12557 wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
12558 { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
12559 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
12560 if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
12561 echo $ECHO_N "(cached) $ECHO_C" >&6
12562 else
12563 lt_prog_compiler_static_works_CXX=no
12564 save_LDFLAGS="$LDFLAGS"
12565 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
12566 echo "$lt_simple_link_test_code" > conftest.$ac_ext
12567 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12568 # The linker can only warn and ignore the option if not recognized
12569 # So say no if there are warnings
12570 if test -s conftest.err; then
12571 # Append any errors to the config.log.
12572 cat conftest.err 1>&5
12573 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
12574 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12575 if diff conftest.exp conftest.er2 >/dev/null; then
12576 lt_prog_compiler_static_works_CXX=yes
12577 fi
12578 else
12579 lt_prog_compiler_static_works_CXX=yes
12580 fi
12581 fi
12582 $rm conftest*
12583 LDFLAGS="$save_LDFLAGS"
12584
12585 fi
12586 { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
12587 echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; }
12588
12589 if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
12590 :
12591 else
12592 lt_prog_compiler_static_CXX=
12593 fi
12594
12595
12596 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
12597 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
12598 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
12599 echo $ECHO_N "(cached) $ECHO_C" >&6
12600 else
12601 lt_cv_prog_compiler_c_o_CXX=no
12602 $rm -r conftest 2>/dev/null
12603 mkdir conftest
12604 cd conftest
12605 mkdir out
12606 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12607
12608 lt_compiler_flag="-o out/conftest2.$ac_objext"
12609 # Insert the option either (1) after the last *FLAGS variable, or
12610 # (2) before a word containing "conftest.", or (3) at the end.
12611 # Note that $ac_compile itself does not contain backslashes and begins
12612 # with a dollar sign (not a hyphen), so the echo should work correctly.
12613 lt_compile=`echo "$ac_compile" | $SED \
12614 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
12615 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
12616 -e 's:$: $lt_compiler_flag:'`
12617 (eval echo "\"\$as_me:12618: $lt_compile\"" >&5)
12618 (eval "$lt_compile" 2>out/conftest.err)
12619 ac_status=$?
12620 cat out/conftest.err >&5
12621 echo "$as_me:12622: \$? = $ac_status" >&5
12622 if (exit $ac_status) && test -s out/conftest2.$ac_objext
12623 then
12624 # The compiler can only warn and ignore the option if not recognized
12625 # So say no if there are warnings
12626 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
12627 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
12628 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
12629 lt_cv_prog_compiler_c_o_CXX=yes
12630 fi
12631 fi
12632 chmod u+w . 2>&5
12633 $rm conftest*
12634 # SGI C++ compiler will create directory out/ii_files/ for
12635 # template instantiation
12636 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
12637 $rm out/* && rmdir out
12638 cd ..
12639 rmdir conftest
12640 $rm conftest*
12641
12642 fi
12643 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
12644 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
12645
12646
12647 hard_links="nottested"
12648 if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
12649 # do not overwrite the value of need_locks provided by the user
12650 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
12651 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
12652 hard_links=yes
12653 $rm conftest*
12654 ln conftest.a conftest.b 2>/dev/null && hard_links=no
12655 touch conftest.a
12656 ln conftest.a conftest.b 2>&5 || hard_links=no
12657 ln conftest.a conftest.b 2>/dev/null && hard_links=no
12658 { echo "$as_me:$LINENO: result: $hard_links" >&5
12659 echo "${ECHO_T}$hard_links" >&6; }
12660 if test "$hard_links" = no; then
12661 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
12662 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
12663 need_locks=warn
12664 fi
12665 else
12666 need_locks=no
12667 fi
12668
12669 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
12670 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
12671
12672 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12673 case $host_os in
12674 aix4* | aix5*)
12675 # If we're using GNU nm, then we don't want the "-C" option.
12676 # -C means demangle to AIX nm, but means don't demangle with GNU nm
12677 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
12678 export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
12679 else
12680 export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
12681 fi
12682 ;;
12683 pw32*)
12684 export_symbols_cmds_CXX="$ltdll_cmds"
12685 ;;
12686 cygwin* | mingw*)
12687 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12688 ;;
12689 *)
12690 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
12691 ;;
12692 esac
12693
12694 { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
12695 echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
12696 test "$ld_shlibs_CXX" = no && can_build_shared=no
12697
12698 #
12699 # Do we need to explicitly link libc?
12700 #
12701 case "x$archive_cmds_need_lc_CXX" in
12702 x|xyes)
12703 # Assume -lc should be added
12704 archive_cmds_need_lc_CXX=yes
12705
12706 if test "$enable_shared" = yes && test "$GCC" = yes; then
12707 case $archive_cmds_CXX in
12708 *'~'*)
12709 # FIXME: we may have to deal with multi-command sequences.
12710 ;;
12711 '$CC '*)
12712 # Test whether the compiler implicitly links with -lc since on some
12713 # systems, -lgcc has to come before -lc. If gcc already passes -lc
12714 # to ld, don't add -lc before -lgcc.
12715 { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
12716 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
12717 $rm conftest*
12718 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12719
12720 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12721 (eval $ac_compile) 2>&5
12722 ac_status=$?
12723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12724 (exit $ac_status); } 2>conftest.err; then
12725 soname=conftest
12726 lib=conftest
12727 libobjs=conftest.$ac_objext
12728 deplibs=
12729 wl=$lt_prog_compiler_wl_CXX
12730 pic_flag=$lt_prog_compiler_pic_CXX
12731 compiler_flags=-v
12732 linker_flags=-v
12733 verstring=
12734 output_objdir=.
12735 libname=conftest
12736 lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
12737 allow_undefined_flag_CXX=
12738 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
12739 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
12740 ac_status=$?
12741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12742 (exit $ac_status); }
12743 then
12744 archive_cmds_need_lc_CXX=no
12745 else
12746 archive_cmds_need_lc_CXX=yes
12747 fi
12748 allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
12749 else
12750 cat conftest.err 1>&5
12751 fi
12752 $rm conftest*
12753 { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
12754 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
12755 ;;
12756 esac
12757 fi
12758 ;;
12759 esac
12760
12761 { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
12762 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
12763 library_names_spec=
12764 libname_spec='lib$name'
12765 soname_spec=
12766 shrext_cmds=".so"
12767 postinstall_cmds=
12768 postuninstall_cmds=
12769 finish_cmds=
12770 finish_eval=
12771 shlibpath_var=
12772 shlibpath_overrides_runpath=unknown
12773 version_type=none
12774 dynamic_linker="$host_os ld.so"
12775 sys_lib_dlsearch_path_spec="/lib /usr/lib"
12776
12777 need_lib_prefix=unknown
12778 hardcode_into_libs=no
12779
12780 # when you set need_version to no, make sure it does not cause -set_version
12781 # flags to be left without arguments
12782 need_version=unknown
12783
12784 case $host_os in
12785 aix3*)
12786 version_type=linux
12787 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
12788 shlibpath_var=LIBPATH
12789
12790 # AIX 3 has no versioning support, so we append a major version to the name.
12791 soname_spec='${libname}${release}${shared_ext}$major'
12792 ;;
12793
12794 aix4* | aix5*)
12795 version_type=linux
12796 need_lib_prefix=no
12797 need_version=no
12798 hardcode_into_libs=yes
12799 if test "$host_cpu" = ia64; then
12800 # AIX 5 supports IA64
12801 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
12802 shlibpath_var=LD_LIBRARY_PATH
12803 else
12804 # With GCC up to 2.95.x, collect2 would create an import file
12805 # for dependence libraries. The import file would start with
12806 # the line `#! .'. This would cause the generated library to
12807 # depend on `.', always an invalid library. This was fixed in
12808 # development snapshots of GCC prior to 3.0.
12809 case $host_os in
12810 aix4 | aix4.[01] | aix4.[01].*)
12811 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12812 echo ' yes '
12813 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
12814 :
12815 else
12816 can_build_shared=no
12817 fi
12818 ;;
12819 esac
12820 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
12821 # soname into executable. Probably we can add versioning support to
12822 # collect2, so additional links can be useful in future.
12823 if test "$aix_use_runtimelinking" = yes; then
12824 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12825 # instead of lib<name>.a to let people know that these are not
12826 # typical AIX shared libraries.
12827 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12828 else
12829 # We preserve .a as extension for shared libraries through AIX4.2
12830 # and later when we are not doing run time linking.
12831 library_names_spec='${libname}${release}.a $libname.a'
12832 soname_spec='${libname}${release}${shared_ext}$major'
12833 fi
12834 shlibpath_var=LIBPATH
12835 fi
12836 ;;
12837
12838 amigaos*)
12839 library_names_spec='$libname.ixlibrary $libname.a'
12840 # Create ${libname}_ixlibrary.a entries in /sys/libs.
12841 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
12842 ;;
12843
12844 beos*)
12845 library_names_spec='${libname}${shared_ext}'
12846 dynamic_linker="$host_os ld.so"
12847 shlibpath_var=LIBRARY_PATH
12848 ;;
12849
12850 bsdi[45]*)
12851 version_type=linux
12852 need_version=no
12853 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12854 soname_spec='${libname}${release}${shared_ext}$major'
12855 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12856 shlibpath_var=LD_LIBRARY_PATH
12857 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12858 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12859 # the default ld.so.conf also contains /usr/contrib/lib and
12860 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12861 # libtool to hard-code these into programs
12862 ;;
12863
12864 cygwin* | mingw* | pw32*)
12865 version_type=windows
12866 shrext_cmds=".dll"
12867 need_version=no
12868 need_lib_prefix=no
12869
12870 case $GCC,$host_os in
12871 yes,cygwin* | yes,mingw* | yes,pw32*)
12872 library_names_spec='$libname.dll.a'
12873 # DLL is installed to $(libdir)/../bin by postinstall_cmds
12874 postinstall_cmds='base_file=`basename \${file}`~
12875 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
12876 dldir=$destdir/`dirname \$dlpath`~
12877 test -d \$dldir || mkdir -p \$dldir~
12878 $install_prog $dir/$dlname \$dldir/$dlname~
12879 chmod a+x \$dldir/$dlname'
12880 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12881 dlpath=$dir/\$dldll~
12882 $rm \$dlpath'
12883 shlibpath_overrides_runpath=yes
12884
12885 case $host_os in
12886 cygwin*)
12887 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12888 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12889 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
12890 ;;
12891 mingw*)
12892 # MinGW DLLs use traditional 'lib' prefix
12893 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12894 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
12895 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
12896 # It is most probably a Windows format PATH printed by
12897 # mingw gcc, but we are running on Cygwin. Gcc prints its search
12898 # path with ; separators, and with drive letters. We can handle the
12899 # drive letters (cygwin fileutils understands them), so leave them,
12900 # especially as we might pass files found there to a mingw objdump,
12901 # which wouldn't understand a cygwinified path. Ahh.
12902 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12903 else
12904 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12905 fi
12906 ;;
12907 pw32*)
12908 # pw32 DLLs use 'pw' prefix rather than 'lib'
12909 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12910 ;;
12911 esac
12912 ;;
12913
12914 *)
12915 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
12916 ;;
12917 esac
12918 dynamic_linker='Win32 ld.exe'
12919 # FIXME: first we should search . and the directory the executable is in
12920 shlibpath_var=PATH
12921 ;;
12922
12923 darwin* | rhapsody*)
12924 dynamic_linker="$host_os dyld"
12925 version_type=darwin
12926 need_lib_prefix=no
12927 need_version=no
12928 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
12929 soname_spec='${libname}${release}${major}$shared_ext'
12930 shlibpath_overrides_runpath=yes
12931 shlibpath_var=DYLD_LIBRARY_PATH
12932 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
12933
12934 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
12935 ;;
12936
12937 dgux*)
12938 version_type=linux
12939 need_lib_prefix=no
12940 need_version=no
12941 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
12942 soname_spec='${libname}${release}${shared_ext}$major'
12943 shlibpath_var=LD_LIBRARY_PATH
12944 ;;
12945
12946 freebsd1*)
12947 dynamic_linker=no
12948 ;;
12949
12950 freebsd* | dragonfly*)
12951 # DragonFly does not have aout. When/if they implement a new
12952 # versioning mechanism, adjust this.
12953 if test -x /usr/bin/objformat; then
12954 objformat=`/usr/bin/objformat`
12955 else
12956 case $host_os in
12957 freebsd[123]*) objformat=aout ;;
12958 *) objformat=elf ;;
12959 esac
12960 fi
12961 version_type=freebsd-$objformat
12962 case $version_type in
12963 freebsd-elf*)
12964 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
12965 need_version=no
12966 need_lib_prefix=no
12967 ;;
12968 freebsd-*)
12969 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
12970 need_version=yes
12971 ;;
12972 esac
12973 shlibpath_var=LD_LIBRARY_PATH
12974 case $host_os in
12975 freebsd2*)
12976 shlibpath_overrides_runpath=yes
12977 ;;
12978 freebsd3.[01]* | freebsdelf3.[01]*)
12979 shlibpath_overrides_runpath=yes
12980 hardcode_into_libs=yes
12981 ;;
12982 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
12983 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
12984 shlibpath_overrides_runpath=no
12985 hardcode_into_libs=yes
12986 ;;
12987 *) # from 4.6 on, and DragonFly
12988 shlibpath_overrides_runpath=yes
12989 hardcode_into_libs=yes
12990 ;;
12991 esac
12992 ;;
12993
12994 gnu*)
12995 version_type=linux
12996 need_lib_prefix=no
12997 need_version=no
12998 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
12999 soname_spec='${libname}${release}${shared_ext}$major'
13000 shlibpath_var=LD_LIBRARY_PATH
13001 hardcode_into_libs=yes
13002 ;;
13003
13004 hpux9* | hpux10* | hpux11*)
13005 # Give a soname corresponding to the major version so that dld.sl refuses to
13006 # link against other versions.
13007 version_type=sunos
13008 need_lib_prefix=no
13009 need_version=no
13010 case $host_cpu in
13011 ia64*)
13012 shrext_cmds='.so'
13013 hardcode_into_libs=yes
13014 dynamic_linker="$host_os dld.so"
13015 shlibpath_var=LD_LIBRARY_PATH
13016 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13017 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13018 soname_spec='${libname}${release}${shared_ext}$major'
13019 if test "X$HPUX_IA64_MODE" = X32; then
13020 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13021 else
13022 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13023 fi
13024 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13025 ;;
13026 hppa*64*)
13027 shrext_cmds='.sl'
13028 hardcode_into_libs=yes
13029 dynamic_linker="$host_os dld.sl"
13030 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13031 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13032 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13033 soname_spec='${libname}${release}${shared_ext}$major'
13034 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13035 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13036 ;;
13037 *)
13038 shrext_cmds='.sl'
13039 dynamic_linker="$host_os dld.sl"
13040 shlibpath_var=SHLIB_PATH
13041 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13042 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13043 soname_spec='${libname}${release}${shared_ext}$major'
13044 ;;
13045 esac
13046 # HP-UX runs *really* slowly unless shared libraries are mode 555.
13047 postinstall_cmds='chmod 555 $lib'
13048 ;;
13049
13050 interix[3-9]*)
13051 version_type=linux
13052 need_lib_prefix=no
13053 need_version=no
13054 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
13055 soname_spec='${libname}${release}${shared_ext}$major'
13056 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13057 shlibpath_var=LD_LIBRARY_PATH
13058 shlibpath_overrides_runpath=no
13059 hardcode_into_libs=yes
13060 ;;
13061
13062 irix5* | irix6* | nonstopux*)
13063 case $host_os in
13064 nonstopux*) version_type=nonstopux ;;
13065 *)
13066 if test "$lt_cv_prog_gnu_ld" = yes; then
13067 version_type=linux
13068 else
13069 version_type=irix
13070 fi ;;
13071 esac
13072 need_lib_prefix=no
13073 need_version=no
13074 soname_spec='${libname}${release}${shared_ext}$major'
13075 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
13076 case $host_os in
13077 irix5* | nonstopux*)
13078 libsuff= shlibsuff=
13079 ;;
13080 *)
13081 case $LD in # libtool.m4 will add one of these switches to LD
13082 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13083 libsuff= shlibsuff= libmagic=32-bit;;
13084 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13085 libsuff=32 shlibsuff=N32 libmagic=N32;;
13086 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13087 libsuff=64 shlibsuff=64 libmagic=64-bit;;
13088 *) libsuff= shlibsuff= libmagic=never-match;;
13089 esac
13090 ;;
13091 esac
13092 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13093 shlibpath_overrides_runpath=no
13094 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
13095 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
13096 hardcode_into_libs=yes
13097 ;;
13098
13099 # No shared lib support for Linux oldld, aout, or coff.
13100 linux*oldld* | linux*aout* | linux*coff*)
13101 dynamic_linker=no
13102 ;;
13103
13104 # This must be Linux ELF.
13105 linux* | k*bsd*-gnu)
13106 version_type=linux
13107 need_lib_prefix=no
13108 need_version=no
13109 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13110 soname_spec='${libname}${release}${shared_ext}$major'
13111 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13112 shlibpath_var=LD_LIBRARY_PATH
13113 shlibpath_overrides_runpath=no
13114 # This implies no fast_install, which is unacceptable.
13115 # Some rework will be needed to allow for fast_install
13116 # before this can be enabled.
13117 hardcode_into_libs=yes
13118 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
13119 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
13120
13121 # Append ld.so.conf contents to the search path
13122 if test -f /etc/ld.so.conf; then
13123 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
13124 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
13125 fi
13126
13127 # We used to test for /lib/ld.so.1 and disable shared libraries on
13128 # powerpc, because MkLinux only supported shared libraries with the
13129 # GNU dynamic linker. Since this was broken with cross compilers,
13130 # most powerpc-linux boxes support dynamic linking these days and
13131 # people can always --disable-shared, the test was removed, and we
13132 # assume the GNU/Linux dynamic linker is in use.
13133 dynamic_linker='GNU/Linux ld.so'
13134 ;;
13135
13136 netbsd*)
13137 version_type=sunos
13138 need_lib_prefix=no
13139 need_version=no
13140 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
13141 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13142 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13143 dynamic_linker='NetBSD (a.out) ld.so'
13144 else
13145 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
13146 soname_spec='${libname}${release}${shared_ext}$major'
13147 dynamic_linker='NetBSD ld.elf_so'
13148 fi
13149 shlibpath_var=LD_LIBRARY_PATH
13150 shlibpath_overrides_runpath=yes
13151 hardcode_into_libs=yes
13152 ;;
13153
13154 newsos6)
13155 version_type=linux
13156 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13157 shlibpath_var=LD_LIBRARY_PATH
13158 shlibpath_overrides_runpath=yes
13159 ;;
13160
13161 nto-qnx*)
13162 version_type=linux
13163 need_lib_prefix=no
13164 need_version=no
13165 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13166 soname_spec='${libname}${release}${shared_ext}$major'
13167 shlibpath_var=LD_LIBRARY_PATH
13168 shlibpath_overrides_runpath=yes
13169 ;;
13170
13171 openbsd*)
13172 version_type=sunos
13173 sys_lib_dlsearch_path_spec="/usr/lib"
13174 need_lib_prefix=no
13175 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
13176 case $host_os in
13177 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
13178 *) need_version=no ;;
13179 esac
13180 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13181 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13182 shlibpath_var=LD_LIBRARY_PATH
13183 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
13184 case $host_os in
13185 openbsd2.[89] | openbsd2.[89].*)
13186 shlibpath_overrides_runpath=no
13187 ;;
13188 *)
13189 shlibpath_overrides_runpath=yes
13190 ;;
13191 esac
13192 else
13193 shlibpath_overrides_runpath=yes
13194 fi
13195 ;;
13196
13197 os2*)
13198 libname_spec='$name'
13199 shrext_cmds=".dll"
13200 need_lib_prefix=no
13201 library_names_spec='$libname${shared_ext} $libname.a'
13202 dynamic_linker='OS/2 ld.exe'
13203 shlibpath_var=LIBPATH
13204 ;;
13205
13206 osf3* | osf4* | osf5*)
13207 version_type=osf
13208 need_lib_prefix=no
13209 need_version=no
13210 soname_spec='${libname}${release}${shared_ext}$major'
13211 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13212 shlibpath_var=LD_LIBRARY_PATH
13213 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13214 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
13215 ;;
13216
13217 rdos*)
13218 dynamic_linker=no
13219 ;;
13220
13221 solaris*)
13222 version_type=linux
13223 need_lib_prefix=no
13224 need_version=no
13225 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13226 soname_spec='${libname}${release}${shared_ext}$major'
13227 shlibpath_var=LD_LIBRARY_PATH
13228 shlibpath_overrides_runpath=yes
13229 hardcode_into_libs=yes
13230 # ldd complains unless libraries are executable
13231 postinstall_cmds='chmod +x $lib'
13232 ;;
13233
13234 sunos4*)
13235 version_type=sunos
13236 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13237 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13238 shlibpath_var=LD_LIBRARY_PATH
13239 shlibpath_overrides_runpath=yes
13240 if test "$with_gnu_ld" = yes; then
13241 need_lib_prefix=no
13242 fi
13243 need_version=yes
13244 ;;
13245
13246 sysv4 | sysv4.3*)
13247 version_type=linux
13248 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13249 soname_spec='${libname}${release}${shared_ext}$major'
13250 shlibpath_var=LD_LIBRARY_PATH
13251 case $host_vendor in
13252 sni)
13253 shlibpath_overrides_runpath=no
13254 need_lib_prefix=no
13255 export_dynamic_flag_spec='${wl}-Blargedynsym'
13256 runpath_var=LD_RUN_PATH
13257 ;;
13258 siemens)
13259 need_lib_prefix=no
13260 ;;
13261 motorola)
13262 need_lib_prefix=no
13263 need_version=no
13264 shlibpath_overrides_runpath=no
13265 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13266 ;;
13267 esac
13268 ;;
13269
13270 sysv4*MP*)
13271 if test -d /usr/nec ;then
13272 version_type=linux
13273 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
13274 soname_spec='$libname${shared_ext}.$major'
13275 shlibpath_var=LD_LIBRARY_PATH
13276 fi
13277 ;;
13278
13279 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13280 version_type=freebsd-elf
13281 need_lib_prefix=no
13282 need_version=no
13283 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
13284 soname_spec='${libname}${release}${shared_ext}$major'
13285 shlibpath_var=LD_LIBRARY_PATH
13286 hardcode_into_libs=yes
13287 if test "$with_gnu_ld" = yes; then
13288 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13289 shlibpath_overrides_runpath=no
13290 else
13291 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13292 shlibpath_overrides_runpath=yes
13293 case $host_os in
13294 sco3.2v5*)
13295 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13296 ;;
13297 esac
13298 fi
13299 sys_lib_dlsearch_path_spec='/usr/lib'
13300 ;;
13301
13302 uts4*)
13303 version_type=linux
13304 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13305 soname_spec='${libname}${release}${shared_ext}$major'
13306 shlibpath_var=LD_LIBRARY_PATH
13307 ;;
13308
13309 *)
13310 dynamic_linker=no
13311 ;;
13312 esac
13313 { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
13314 echo "${ECHO_T}$dynamic_linker" >&6; }
13315 test "$dynamic_linker" = no && can_build_shared=no
13316
13317 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13318 if test "$GCC" = yes; then
13319 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13320 fi
13321
13322 { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
13323 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
13324 hardcode_action_CXX=
13325 if test -n "$hardcode_libdir_flag_spec_CXX" || \
13326 test -n "$runpath_var_CXX" || \
13327 test "X$hardcode_automatic_CXX" = "Xyes" ; then
13328
13329 # We can hardcode non-existant directories.
13330 if test "$hardcode_direct_CXX" != no &&
13331 # If the only mechanism to avoid hardcoding is shlibpath_var, we
13332 # have to relink, otherwise we might link with an installed library
13333 # when we should be linking with a yet-to-be-installed one
13334 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
13335 test "$hardcode_minus_L_CXX" != no; then
13336 # Linking always hardcodes the temporary library directory.
13337 hardcode_action_CXX=relink
13338 else
13339 # We can link without hardcoding, and we can hardcode nonexisting dirs.
13340 hardcode_action_CXX=immediate
13341 fi
13342 else
13343 # We cannot hardcode anything, or else we can only hardcode existing
13344 # directories.
13345 hardcode_action_CXX=unsupported
13346 fi
13347 { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
13348 echo "${ECHO_T}$hardcode_action_CXX" >&6; }
13349
13350 if test "$hardcode_action_CXX" = relink; then
13351 # Fast installation is not supported
13352 enable_fast_install=no
13353 elif test "$shlibpath_overrides_runpath" = yes ||
13354 test "$enable_shared" = no; then
13355 # Fast installation is not necessary
13356 enable_fast_install=needless
13357 fi
13358
13359
13360 # The else clause should only fire when bootstrapping the
13361 # libtool distribution, otherwise you forgot to ship ltmain.sh
13362 # with your package, and you will get complaints that there are
13363 # no rules to generate ltmain.sh.
13364 if test -f "$ltmain"; then
13365 # See if we are running on zsh, and set the options which allow our commands through
13366 # without removal of \ escapes.
13367 if test -n "${ZSH_VERSION+set}" ; then
13368 setopt NO_GLOB_SUBST
13369 fi
13370 # Now quote all the things that may contain metacharacters while being
13371 # careful not to overquote the AC_SUBSTed values. We take copies of the
13372 # variables and quote the copies for generation of the libtool script.
13373 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
13374 SED SHELL STRIP \
13375 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
13376 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
13377 deplibs_check_method reload_flag reload_cmds need_locks \
13378 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
13379 lt_cv_sys_global_symbol_to_c_name_address \
13380 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
13381 old_postinstall_cmds old_postuninstall_cmds \
13382 compiler_CXX \
13383 CC_CXX \
13384 LD_CXX \
13385 lt_prog_compiler_wl_CXX \
13386 lt_prog_compiler_pic_CXX \
13387 lt_prog_compiler_static_CXX \
13388 lt_prog_compiler_no_builtin_flag_CXX \
13389 export_dynamic_flag_spec_CXX \
13390 thread_safe_flag_spec_CXX \
13391 whole_archive_flag_spec_CXX \
13392 enable_shared_with_static_runtimes_CXX \
13393 old_archive_cmds_CXX \
13394 old_archive_from_new_cmds_CXX \
13395 predep_objects_CXX \
13396 postdep_objects_CXX \
13397 predeps_CXX \
13398 postdeps_CXX \
13399 compiler_lib_search_path_CXX \
13400 archive_cmds_CXX \
13401 archive_expsym_cmds_CXX \
13402 postinstall_cmds_CXX \
13403 postuninstall_cmds_CXX \
13404 old_archive_from_expsyms_cmds_CXX \
13405 allow_undefined_flag_CXX \
13406 no_undefined_flag_CXX \
13407 export_symbols_cmds_CXX \
13408 hardcode_libdir_flag_spec_CXX \
13409 hardcode_libdir_flag_spec_ld_CXX \
13410 hardcode_libdir_separator_CXX \
13411 hardcode_automatic_CXX \
13412 module_cmds_CXX \
13413 module_expsym_cmds_CXX \
13414 lt_cv_prog_compiler_c_o_CXX \
13415 fix_srcfile_path_CXX \
13416 exclude_expsyms_CXX \
13417 include_expsyms_CXX; do
13418
13419 case $var in
13420 old_archive_cmds_CXX | \
13421 old_archive_from_new_cmds_CXX | \
13422 archive_cmds_CXX | \
13423 archive_expsym_cmds_CXX | \
13424 module_cmds_CXX | \
13425 module_expsym_cmds_CXX | \
13426 old_archive_from_expsyms_cmds_CXX | \
13427 export_symbols_cmds_CXX | \
13428 extract_expsyms_cmds | reload_cmds | finish_cmds | \
13429 postinstall_cmds | postuninstall_cmds | \
13430 old_postinstall_cmds | old_postuninstall_cmds | \
13431 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
13432 # Double-quote double-evaled strings.
13433 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
13434 ;;
13435 *)
13436 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
13437 ;;
13438 esac
13439 done
13440
13441 case $lt_echo in
13442 *'\$0 --fallback-echo"')
13443 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
13444 ;;
13445 esac
13446
13447 cfgfile="$ofile"
13448
13449 cat <<__EOF__ >> "$cfgfile"
13450 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
13451
13452 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13453
13454 # Shell to use when invoking shell scripts.
13455 SHELL=$lt_SHELL
13456
13457 # Whether or not to build shared libraries.
13458 build_libtool_libs=$enable_shared
13459
13460 # Whether or not to build static libraries.
13461 build_old_libs=$enable_static
13462
13463 # Whether or not to add -lc for building shared libraries.
13464 build_libtool_need_lc=$archive_cmds_need_lc_CXX
13465
13466 # Whether or not to disallow shared libs when runtime libs are static
13467 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
13468
13469 # Whether or not to optimize for fast installation.
13470 fast_install=$enable_fast_install
13471
13472 # The host system.
13473 host_alias=$host_alias
13474 host=$host
13475 host_os=$host_os
13476
13477 # The build system.
13478 build_alias=$build_alias
13479 build=$build
13480 build_os=$build_os
13481
13482 # An echo program that does not interpret backslashes.
13483 echo=$lt_echo
13484
13485 # The archiver.
13486 AR=$lt_AR
13487 AR_FLAGS=$lt_AR_FLAGS
13488
13489 # A C compiler.
13490 LTCC=$lt_LTCC
13491
13492 # LTCC compiler flags.
13493 LTCFLAGS=$lt_LTCFLAGS
13494
13495 # A language-specific compiler.
13496 CC=$lt_compiler_CXX
13497
13498 # Is the compiler the GNU C compiler?
13499 with_gcc=$GCC_CXX
13500
13501 # An ERE matcher.
13502 EGREP=$lt_EGREP
13503
13504 # The linker used to build libraries.
13505 LD=$lt_LD_CXX
13506
13507 # Whether we need hard or soft links.
13508 LN_S=$lt_LN_S
13509
13510 # A BSD-compatible nm program.
13511 NM=$lt_NM
13512
13513 # A symbol stripping program
13514 STRIP=$lt_STRIP
13515
13516 # Used to examine libraries when file_magic_cmd begins "file"
13517 MAGIC_CMD=$MAGIC_CMD
13518
13519 # Used on cygwin: DLL creation program.
13520 DLLTOOL="$DLLTOOL"
13521
13522 # Used on cygwin: object dumper.
13523 OBJDUMP="$OBJDUMP"
13524
13525 # Used on cygwin: assembler.
13526 AS="$AS"
13527
13528 # The name of the directory that contains temporary libtool files.
13529 objdir=$objdir
13530
13531 # How to create reloadable object files.
13532 reload_flag=$lt_reload_flag
13533 reload_cmds=$lt_reload_cmds
13534
13535 # How to pass a linker flag through the compiler.
13536 wl=$lt_lt_prog_compiler_wl_CXX
13537
13538 # Object file suffix (normally "o").
13539 objext="$ac_objext"
13540
13541 # Old archive suffix (normally "a").
13542 libext="$libext"
13543
13544 # Shared library suffix (normally ".so").
13545 shrext_cmds='$shrext_cmds'
13546
13547 # Executable file suffix (normally "").
13548 exeext="$exeext"
13549
13550 # Additional compiler flags for building library objects.
13551 pic_flag=$lt_lt_prog_compiler_pic_CXX
13552 pic_mode=$pic_mode
13553
13554 # What is the maximum length of a command?
13555 max_cmd_len=$lt_cv_sys_max_cmd_len
13556
13557 # Does compiler simultaneously support -c and -o options?
13558 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
13559
13560 # Must we lock files when doing compilation?
13561 need_locks=$lt_need_locks
13562
13563 # Do we need the lib prefix for modules?
13564 need_lib_prefix=$need_lib_prefix
13565
13566 # Do we need a version for libraries?
13567 need_version=$need_version
13568
13569 # Whether dlopen is supported.
13570 dlopen_support=$enable_dlopen
13571
13572 # Whether dlopen of programs is supported.
13573 dlopen_self=$enable_dlopen_self
13574
13575 # Whether dlopen of statically linked programs is supported.
13576 dlopen_self_static=$enable_dlopen_self_static
13577
13578 # Compiler flag to prevent dynamic linking.
13579 link_static_flag=$lt_lt_prog_compiler_static_CXX
13580
13581 # Compiler flag to turn off builtin functions.
13582 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
13583
13584 # Compiler flag to allow reflexive dlopens.
13585 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
13586
13587 # Compiler flag to generate shared objects directly from archives.
13588 whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
13589
13590 # Compiler flag to generate thread-safe objects.
13591 thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
13592
13593 # Library versioning type.
13594 version_type=$version_type
13595
13596 # Format of library name prefix.
13597 libname_spec=$lt_libname_spec
13598
13599 # List of archive names. First name is the real one, the rest are links.
13600 # The last name is the one that the linker finds with -lNAME.
13601 library_names_spec=$lt_library_names_spec
13602
13603 # The coded name of the library, if different from the real name.
13604 soname_spec=$lt_soname_spec
13605
13606 # Commands used to build and install an old-style archive.
13607 RANLIB=$lt_RANLIB
13608 old_archive_cmds=$lt_old_archive_cmds_CXX
13609 old_postinstall_cmds=$lt_old_postinstall_cmds
13610 old_postuninstall_cmds=$lt_old_postuninstall_cmds
13611
13612 # Create an old-style archive from a shared archive.
13613 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
13614
13615 # Create a temporary old-style archive to link instead of a shared archive.
13616 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
13617
13618 # Commands used to build and install a shared archive.
13619 archive_cmds=$lt_archive_cmds_CXX
13620 archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
13621 postinstall_cmds=$lt_postinstall_cmds
13622 postuninstall_cmds=$lt_postuninstall_cmds
13623
13624 # Commands used to build a loadable module (assumed same as above if empty)
13625 module_cmds=$lt_module_cmds_CXX
13626 module_expsym_cmds=$lt_module_expsym_cmds_CXX
13627
13628 # Commands to strip libraries.
13629 old_striplib=$lt_old_striplib
13630 striplib=$lt_striplib
13631
13632 # Dependencies to place before the objects being linked to create a
13633 # shared library.
13634 predep_objects=$lt_predep_objects_CXX
13635
13636 # Dependencies to place after the objects being linked to create a
13637 # shared library.
13638 postdep_objects=$lt_postdep_objects_CXX
13639
13640 # Dependencies to place before the objects being linked to create a
13641 # shared library.
13642 predeps=$lt_predeps_CXX
13643
13644 # Dependencies to place after the objects being linked to create a
13645 # shared library.
13646 postdeps=$lt_postdeps_CXX
13647
13648 # The library search path used internally by the compiler when linking
13649 # a shared library.
13650 compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
13651
13652 # Method to check whether dependent libraries are shared objects.
13653 deplibs_check_method=$lt_deplibs_check_method
13654
13655 # Command to use when deplibs_check_method == file_magic.
13656 file_magic_cmd=$lt_file_magic_cmd
13657
13658 # Flag that allows shared libraries with undefined symbols to be built.
13659 allow_undefined_flag=$lt_allow_undefined_flag_CXX
13660
13661 # Flag that forces no undefined symbols.
13662 no_undefined_flag=$lt_no_undefined_flag_CXX
13663
13664 # Commands used to finish a libtool library installation in a directory.
13665 finish_cmds=$lt_finish_cmds
13666
13667 # Same as above, but a single script fragment to be evaled but not shown.
13668 finish_eval=$lt_finish_eval
13669
13670 # Take the output of nm and produce a listing of raw symbols and C names.
13671 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
13672
13673 # Transform the output of nm in a proper C declaration
13674 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
13675
13676 # Transform the output of nm in a C name address pair
13677 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
13678
13679 # This is the shared library runtime path variable.
13680 runpath_var=$runpath_var
13681
13682 # This is the shared library path variable.
13683 shlibpath_var=$shlibpath_var
13684
13685 # Is shlibpath searched before the hard-coded library search path?
13686 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
13687
13688 # How to hardcode a shared library path into an executable.
13689 hardcode_action=$hardcode_action_CXX
13690
13691 # Whether we should hardcode library paths into libraries.
13692 hardcode_into_libs=$hardcode_into_libs
13693
13694 # Flag to hardcode \$libdir into a binary during linking.
13695 # This must work even if \$libdir does not exist.
13696 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
13697
13698 # If ld is used when linking, flag to hardcode \$libdir into
13699 # a binary during linking. This must work even if \$libdir does
13700 # not exist.
13701 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
13702
13703 # Whether we need a single -rpath flag with a separated argument.
13704 hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
13705
13706 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
13707 # resulting binary.
13708 hardcode_direct=$hardcode_direct_CXX
13709
13710 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
13711 # resulting binary.
13712 hardcode_minus_L=$hardcode_minus_L_CXX
13713
13714 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
13715 # the resulting binary.
13716 hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
13717
13718 # Set to yes if building a shared library automatically hardcodes DIR into the library
13719 # and all subsequent libraries and executables linked against it.
13720 hardcode_automatic=$hardcode_automatic_CXX
13721
13722 # Variables whose values should be saved in libtool wrapper scripts and
13723 # restored at relink time.
13724 variables_saved_for_relink="$variables_saved_for_relink"
13725
13726 # Whether libtool must link a program against all its dependency libraries.
13727 link_all_deplibs=$link_all_deplibs_CXX
13728
13729 # Compile-time system search path for libraries
13730 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
13731
13732 # Run-time system search path for libraries
13733 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
13734
13735 # Fix the shell variable \$srcfile for the compiler.
13736 fix_srcfile_path=$lt_fix_srcfile_path
13737
13738 # Set to yes if exported symbols are required.
13739 always_export_symbols=$always_export_symbols_CXX
13740
13741 # The commands to list exported symbols.
13742 export_symbols_cmds=$lt_export_symbols_cmds_CXX
13743
13744 # The commands to extract the exported symbol list from a shared archive.
13745 extract_expsyms_cmds=$lt_extract_expsyms_cmds
13746
13747 # Symbols that should not be listed in the preloaded symbols.
13748 exclude_expsyms=$lt_exclude_expsyms_CXX
13749
13750 # Symbols that must always be exported.
13751 include_expsyms=$lt_include_expsyms_CXX
13752
13753 # ### END LIBTOOL TAG CONFIG: $tagname
13754
13755 __EOF__
13756
13757
13758 else
13759 # If there is no Makefile yet, we rely on a make rule to execute
13760 # `config.status --recheck' to rerun these tests and create the
13761 # libtool script then.
13762 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
13763 if test -f "$ltmain_in"; then
13764 test -f Makefile && make "$ltmain"
13765 fi
13766 fi
13767
13768
13769 ac_ext=c
13770 ac_cpp='$CPP $CPPFLAGS'
13771 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13772 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13774
13775 CC=$lt_save_CC
13776 LDCXX=$LD
13777 LD=$lt_save_LD
13778 GCC=$lt_save_GCC
13779 with_gnu_ldcxx=$with_gnu_ld
13780 with_gnu_ld=$lt_save_with_gnu_ld
13781 lt_cv_path_LDCXX=$lt_cv_path_LD
13782 lt_cv_path_LD=$lt_save_path_LD
13783 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
13784 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
13785
13786 else
13787 tagname=""
13788 fi
13789 ;;
13790
13791 F77)
13792 if test -n "$F77" && test "X$F77" != "Xno"; then
13793
13794 ac_ext=f
13795 ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
13796 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13797 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
13798
13799
13800 archive_cmds_need_lc_F77=no
13801 allow_undefined_flag_F77=
13802 always_export_symbols_F77=no
13803 archive_expsym_cmds_F77=
13804 export_dynamic_flag_spec_F77=
13805 hardcode_direct_F77=no
13806 hardcode_libdir_flag_spec_F77=
13807 hardcode_libdir_flag_spec_ld_F77=
13808 hardcode_libdir_separator_F77=
13809 hardcode_minus_L_F77=no
13810 hardcode_automatic_F77=no
13811 module_cmds_F77=
13812 module_expsym_cmds_F77=
13813 link_all_deplibs_F77=unknown
13814 old_archive_cmds_F77=$old_archive_cmds
13815 no_undefined_flag_F77=
13816 whole_archive_flag_spec_F77=
13817 enable_shared_with_static_runtimes_F77=no
13818
13819 # Source file extension for f77 test sources.
13820 ac_ext=f
13821
13822 # Object file extension for compiled f77 test sources.
13823 objext=o
13824 objext_F77=$objext
13825
13826 # Code to be used in simple compile tests
13827 lt_simple_compile_test_code="\
13828 subroutine t
13829 return
13830 end
13831 "
13832
13833 # Code to be used in simple link tests
13834 lt_simple_link_test_code="\
13835 program t
13836 end
13837 "
13838
13839 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
13840
13841 # If no C compiler was specified, use CC.
13842 LTCC=${LTCC-"$CC"}
13843
13844 # If no C compiler flags were specified, use CFLAGS.
13845 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
13846
13847 # Allow CC to be a program name with arguments.
13848 compiler=$CC
13849
13850
13851 # save warnings/boilerplate of simple test code
13852 ac_outfile=conftest.$ac_objext
13853 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
13854 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
13855 _lt_compiler_boilerplate=`cat conftest.err`
13856 $rm conftest*
13857
13858 ac_outfile=conftest.$ac_objext
13859 echo "$lt_simple_link_test_code" >conftest.$ac_ext
13860 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
13861 _lt_linker_boilerplate=`cat conftest.err`
13862 $rm conftest*
13863
13864
13865 # Allow CC to be a program name with arguments.
13866 lt_save_CC="$CC"
13867 CC=${F77-"f77"}
13868 compiler=$CC
13869 compiler_F77=$CC
13870 for cc_temp in $compiler""; do
13871 case $cc_temp in
13872 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
13873 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
13874 \-*) ;;
13875 *) break;;
13876 esac
13877 done
13878 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
13879
13880
13881 { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
13882 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
13883 { echo "$as_me:$LINENO: result: $can_build_shared" >&5
13884 echo "${ECHO_T}$can_build_shared" >&6; }
13885
13886 { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
13887 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
13888 test "$can_build_shared" = "no" && enable_shared=no
13889
13890 # On AIX, shared libraries and static libraries use the same namespace, and
13891 # are all built from PIC.
13892 case $host_os in
13893 aix3*)
13894 test "$enable_shared" = yes && enable_static=no
13895 if test -n "$RANLIB"; then
13896 archive_cmds="$archive_cmds~\$RANLIB \$lib"
13897 postinstall_cmds='$RANLIB $lib'
13898 fi
13899 ;;
13900 aix4* | aix5*)
13901 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
13902 test "$enable_shared" = yes && enable_static=no
13903 fi
13904 ;;
13905 esac
13906 { echo "$as_me:$LINENO: result: $enable_shared" >&5
13907 echo "${ECHO_T}$enable_shared" >&6; }
13908
13909 { echo "$as_me:$LINENO: checking whether to build static libraries" >&5
13910 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
13911 # Make sure either enable_shared or enable_static is yes.
13912 test "$enable_shared" = yes || enable_static=yes
13913 { echo "$as_me:$LINENO: result: $enable_static" >&5
13914 echo "${ECHO_T}$enable_static" >&6; }
13915
13916 GCC_F77="$G77"
13917 LD_F77="$LD"
13918
13919 lt_prog_compiler_wl_F77=
13920 lt_prog_compiler_pic_F77=
13921 lt_prog_compiler_static_F77=
13922
13923 { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
13924 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
13925
13926 if test "$GCC" = yes; then
13927 lt_prog_compiler_wl_F77='-Wl,'
13928 lt_prog_compiler_static_F77='-static'
13929
13930 case $host_os in
13931 aix*)
13932 # All AIX code is PIC.
13933 if test "$host_cpu" = ia64; then
13934 # AIX 5 now supports IA64 processor
13935 lt_prog_compiler_static_F77='-Bstatic'
13936 fi
13937 ;;
13938
13939 amigaos*)
13940 # FIXME: we need at least 68020 code to build shared libraries, but
13941 # adding the `-m68020' flag to GCC prevents building anything better,
13942 # like `-m68040'.
13943 lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
13944 ;;
13945
13946 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
13947 # PIC is the default for these OSes.
13948 ;;
13949
13950 mingw* | cygwin* | pw32* | os2*)
13951 # This hack is so that the source file can tell whether it is being
13952 # built for inclusion in a dll (and should export symbols for example).
13953 # Although the cygwin gcc ignores -fPIC, still need this for old-style
13954 # (--disable-auto-import) libraries
13955 lt_prog_compiler_pic_F77='-DDLL_EXPORT'
13956 ;;
13957
13958 darwin* | rhapsody*)
13959 # PIC is the default on this platform
13960 # Common symbols not allowed in MH_DYLIB files
13961 lt_prog_compiler_pic_F77='-fno-common'
13962 ;;
13963
13964 interix[3-9]*)
13965 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
13966 # Instead, we relocate shared libraries at runtime.
13967 ;;
13968
13969 msdosdjgpp*)
13970 # Just because we use GCC doesn't mean we suddenly get shared libraries
13971 # on systems that don't support them.
13972 lt_prog_compiler_can_build_shared_F77=no
13973 enable_shared=no
13974 ;;
13975
13976 sysv4*MP*)
13977 if test -d /usr/nec; then
13978 lt_prog_compiler_pic_F77=-Kconform_pic
13979 fi
13980 ;;
13981
13982 hpux*)
13983 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
13984 # not for PA HP-UX.
13985 case $host_cpu in
13986 hppa*64*|ia64*)
13987 # +Z the default
13988 ;;
13989 *)
13990 lt_prog_compiler_pic_F77='-fPIC'
13991 ;;
13992 esac
13993 ;;
13994
13995 *)
13996 lt_prog_compiler_pic_F77='-fPIC'
13997 ;;
13998 esac
13999 else
14000 # PORTME Check for flag to pass linker flags through the system compiler.
14001 case $host_os in
14002 aix*)
14003 lt_prog_compiler_wl_F77='-Wl,'
14004 if test "$host_cpu" = ia64; then
14005 # AIX 5 now supports IA64 processor
14006 lt_prog_compiler_static_F77='-Bstatic'
14007 else
14008 lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
14009 fi
14010 ;;
14011 darwin*)
14012 # PIC is the default on this platform
14013 # Common symbols not allowed in MH_DYLIB files
14014 case $cc_basename in
14015 xlc*)
14016 lt_prog_compiler_pic_F77='-qnocommon'
14017 lt_prog_compiler_wl_F77='-Wl,'
14018 ;;
14019 esac
14020 ;;
14021
14022 mingw* | cygwin* | pw32* | os2*)
14023 # This hack is so that the source file can tell whether it is being
14024 # built for inclusion in a dll (and should export symbols for example).
14025 lt_prog_compiler_pic_F77='-DDLL_EXPORT'
14026 ;;
14027
14028 hpux9* | hpux10* | hpux11*)
14029 lt_prog_compiler_wl_F77='-Wl,'
14030 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
14031 # not for PA HP-UX.
14032 case $host_cpu in
14033 hppa*64*|ia64*)
14034 # +Z the default
14035 ;;
14036 *)
14037 lt_prog_compiler_pic_F77='+Z'
14038 ;;
14039 esac
14040 # Is there a better lt_prog_compiler_static that works with the bundled CC?
14041 lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
14042 ;;
14043
14044 irix5* | irix6* | nonstopux*)
14045 lt_prog_compiler_wl_F77='-Wl,'
14046 # PIC (with -KPIC) is the default.
14047 lt_prog_compiler_static_F77='-non_shared'
14048 ;;
14049
14050 newsos6)
14051 lt_prog_compiler_pic_F77='-KPIC'
14052 lt_prog_compiler_static_F77='-Bstatic'
14053 ;;
14054
14055 linux* | k*bsd*-gnu)
14056 case $cc_basename in
14057 icc* | ecc*)
14058 lt_prog_compiler_wl_F77='-Wl,'
14059 lt_prog_compiler_pic_F77='-KPIC'
14060 lt_prog_compiler_static_F77='-static'
14061 ;;
14062 pgcc* | pgf77* | pgf90* | pgf95*)
14063 # Portland Group compilers (*not* the Pentium gcc compiler,
14064 # which looks to be a dead project)
14065 lt_prog_compiler_wl_F77='-Wl,'
14066 lt_prog_compiler_pic_F77='-fpic'
14067 lt_prog_compiler_static_F77='-Bstatic'
14068 ;;
14069 ccc*)
14070 lt_prog_compiler_wl_F77='-Wl,'
14071 # All Alpha code is PIC.
14072 lt_prog_compiler_static_F77='-non_shared'
14073 ;;
14074 *)
14075 case `$CC -V 2>&1 | sed 5q` in
14076 *Sun\ C*)
14077 # Sun C 5.9
14078 lt_prog_compiler_pic_F77='-KPIC'
14079 lt_prog_compiler_static_F77='-Bstatic'
14080 lt_prog_compiler_wl_F77='-Wl,'
14081 ;;
14082 *Sun\ F*)
14083 # Sun Fortran 8.3 passes all unrecognized flags to the linker
14084 lt_prog_compiler_pic_F77='-KPIC'
14085 lt_prog_compiler_static_F77='-Bstatic'
14086 lt_prog_compiler_wl_F77=''
14087 ;;
14088 esac
14089 ;;
14090 esac
14091 ;;
14092
14093 osf3* | osf4* | osf5*)
14094 lt_prog_compiler_wl_F77='-Wl,'
14095 # All OSF/1 code is PIC.
14096 lt_prog_compiler_static_F77='-non_shared'
14097 ;;
14098
14099 rdos*)
14100 lt_prog_compiler_static_F77='-non_shared'
14101 ;;
14102
14103 solaris*)
14104 lt_prog_compiler_pic_F77='-KPIC'
14105 lt_prog_compiler_static_F77='-Bstatic'
14106 case $cc_basename in
14107 f77* | f90* | f95*)
14108 lt_prog_compiler_wl_F77='-Qoption ld ';;
14109 *)
14110 lt_prog_compiler_wl_F77='-Wl,';;
14111 esac
14112 ;;
14113
14114 sunos4*)
14115 lt_prog_compiler_wl_F77='-Qoption ld '
14116 lt_prog_compiler_pic_F77='-PIC'
14117 lt_prog_compiler_static_F77='-Bstatic'
14118 ;;
14119
14120 sysv4 | sysv4.2uw2* | sysv4.3*)
14121 lt_prog_compiler_wl_F77='-Wl,'
14122 lt_prog_compiler_pic_F77='-KPIC'
14123 lt_prog_compiler_static_F77='-Bstatic'
14124 ;;
14125
14126 sysv4*MP*)
14127 if test -d /usr/nec ;then
14128 lt_prog_compiler_pic_F77='-Kconform_pic'
14129 lt_prog_compiler_static_F77='-Bstatic'
14130 fi
14131 ;;
14132
14133 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
14134 lt_prog_compiler_wl_F77='-Wl,'
14135 lt_prog_compiler_pic_F77='-KPIC'
14136 lt_prog_compiler_static_F77='-Bstatic'
14137 ;;
14138
14139 unicos*)
14140 lt_prog_compiler_wl_F77='-Wl,'
14141 lt_prog_compiler_can_build_shared_F77=no
14142 ;;
14143
14144 uts4*)
14145 lt_prog_compiler_pic_F77='-pic'
14146 lt_prog_compiler_static_F77='-Bstatic'
14147 ;;
14148
14149 *)
14150 lt_prog_compiler_can_build_shared_F77=no
14151 ;;
14152 esac
14153 fi
14154
14155 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
14156 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; }
14157
14158 #
14159 # Check to make sure the PIC flag actually works.
14160 #
14161 if test -n "$lt_prog_compiler_pic_F77"; then
14162
14163 { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
14164 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; }
14165 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
14166 echo $ECHO_N "(cached) $ECHO_C" >&6
14167 else
14168 lt_prog_compiler_pic_works_F77=no
14169 ac_outfile=conftest.$ac_objext
14170 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14171 lt_compiler_flag="$lt_prog_compiler_pic_F77"
14172 # Insert the option either (1) after the last *FLAGS variable, or
14173 # (2) before a word containing "conftest.", or (3) at the end.
14174 # Note that $ac_compile itself does not contain backslashes and begins
14175 # with a dollar sign (not a hyphen), so the echo should work correctly.
14176 # The option is referenced via a variable to avoid confusing sed.
14177 lt_compile=`echo "$ac_compile" | $SED \
14178 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14179 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14180 -e 's:$: $lt_compiler_flag:'`
14181 (eval echo "\"\$as_me:14182: $lt_compile\"" >&5)
14182 (eval "$lt_compile" 2>conftest.err)
14183 ac_status=$?
14184 cat conftest.err >&5
14185 echo "$as_me:14186: \$? = $ac_status" >&5
14186 if (exit $ac_status) && test -s "$ac_outfile"; then
14187 # The compiler can only warn and ignore the option if not recognized
14188 # So say no if there are warnings other than the usual output.
14189 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
14190 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14191 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
14192 lt_prog_compiler_pic_works_F77=yes
14193 fi
14194 fi
14195 $rm conftest*
14196
14197 fi
14198 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
14199 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; }
14200
14201 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
14202 case $lt_prog_compiler_pic_F77 in
14203 "" | " "*) ;;
14204 *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
14205 esac
14206 else
14207 lt_prog_compiler_pic_F77=
14208 lt_prog_compiler_can_build_shared_F77=no
14209 fi
14210
14211 fi
14212 case $host_os in
14213 # For platforms which do not support PIC, -DPIC is meaningless:
14214 *djgpp*)
14215 lt_prog_compiler_pic_F77=
14216 ;;
14217 *)
14218 lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
14219 ;;
14220 esac
14221
14222 #
14223 # Check to make sure the static flag actually works.
14224 #
14225 wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
14226 { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
14227 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
14228 if test "${lt_prog_compiler_static_works_F77+set}" = set; then
14229 echo $ECHO_N "(cached) $ECHO_C" >&6
14230 else
14231 lt_prog_compiler_static_works_F77=no
14232 save_LDFLAGS="$LDFLAGS"
14233 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
14234 echo "$lt_simple_link_test_code" > conftest.$ac_ext
14235 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
14236 # The linker can only warn and ignore the option if not recognized
14237 # So say no if there are warnings
14238 if test -s conftest.err; then
14239 # Append any errors to the config.log.
14240 cat conftest.err 1>&5
14241 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
14242 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
14243 if diff conftest.exp conftest.er2 >/dev/null; then
14244 lt_prog_compiler_static_works_F77=yes
14245 fi
14246 else
14247 lt_prog_compiler_static_works_F77=yes
14248 fi
14249 fi
14250 $rm conftest*
14251 LDFLAGS="$save_LDFLAGS"
14252
14253 fi
14254 { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
14255 echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; }
14256
14257 if test x"$lt_prog_compiler_static_works_F77" = xyes; then
14258 :
14259 else
14260 lt_prog_compiler_static_F77=
14261 fi
14262
14263
14264 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
14265 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
14266 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
14267 echo $ECHO_N "(cached) $ECHO_C" >&6
14268 else
14269 lt_cv_prog_compiler_c_o_F77=no
14270 $rm -r conftest 2>/dev/null
14271 mkdir conftest
14272 cd conftest
14273 mkdir out
14274 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
14275
14276 lt_compiler_flag="-o out/conftest2.$ac_objext"
14277 # Insert the option either (1) after the last *FLAGS variable, or
14278 # (2) before a word containing "conftest.", or (3) at the end.
14279 # Note that $ac_compile itself does not contain backslashes and begins
14280 # with a dollar sign (not a hyphen), so the echo should work correctly.
14281 lt_compile=`echo "$ac_compile" | $SED \
14282 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
14283 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
14284 -e 's:$: $lt_compiler_flag:'`
14285 (eval echo "\"\$as_me:14286: $lt_compile\"" >&5)
14286 (eval "$lt_compile" 2>out/conftest.err)
14287 ac_status=$?
14288 cat out/conftest.err >&5
14289 echo "$as_me:14290: \$? = $ac_status" >&5
14290 if (exit $ac_status) && test -s out/conftest2.$ac_objext
14291 then
14292 # The compiler can only warn and ignore the option if not recognized
14293 # So say no if there are warnings
14294 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
14295 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
14296 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
14297 lt_cv_prog_compiler_c_o_F77=yes
14298 fi
14299 fi
14300 chmod u+w . 2>&5
14301 $rm conftest*
14302 # SGI C++ compiler will create directory out/ii_files/ for
14303 # template instantiation
14304 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
14305 $rm out/* && rmdir out
14306 cd ..
14307 rmdir conftest
14308 $rm conftest*
14309
14310 fi
14311 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
14312 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; }
14313
14314
14315 hard_links="nottested"
14316 if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
14317 # do not overwrite the value of need_locks provided by the user
14318 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
14319 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
14320 hard_links=yes
14321 $rm conftest*
14322 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14323 touch conftest.a
14324 ln conftest.a conftest.b 2>&5 || hard_links=no
14325 ln conftest.a conftest.b 2>/dev/null && hard_links=no
14326 { echo "$as_me:$LINENO: result: $hard_links" >&5
14327 echo "${ECHO_T}$hard_links" >&6; }
14328 if test "$hard_links" = no; then
14329 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
14330 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
14331 need_locks=warn
14332 fi
14333 else
14334 need_locks=no
14335 fi
14336
14337 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
14338 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
14339
14340 runpath_var=
14341 allow_undefined_flag_F77=
14342 enable_shared_with_static_runtimes_F77=no
14343 archive_cmds_F77=
14344 archive_expsym_cmds_F77=
14345 old_archive_From_new_cmds_F77=
14346 old_archive_from_expsyms_cmds_F77=
14347 export_dynamic_flag_spec_F77=
14348 whole_archive_flag_spec_F77=
14349 thread_safe_flag_spec_F77=
14350 hardcode_libdir_flag_spec_F77=
14351 hardcode_libdir_flag_spec_ld_F77=
14352 hardcode_libdir_separator_F77=
14353 hardcode_direct_F77=no
14354 hardcode_minus_L_F77=no
14355 hardcode_shlibpath_var_F77=unsupported
14356 link_all_deplibs_F77=unknown
14357 hardcode_automatic_F77=no
14358 module_cmds_F77=
14359 module_expsym_cmds_F77=
14360 always_export_symbols_F77=no
14361 export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
14362 # include_expsyms should be a list of space-separated symbols to be *always*
14363 # included in the symbol list
14364 include_expsyms_F77=
14365 # exclude_expsyms can be an extended regexp of symbols to exclude
14366 # it will be wrapped by ` (' and `)$', so one must not match beginning or
14367 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
14368 # as well as any symbol that contains `d'.
14369 exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
14370 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
14371 # platforms (ab)use it in PIC code, but their linkers get confused if
14372 # the symbol is explicitly referenced. Since portable code cannot
14373 # rely on this symbol name, it's probably fine to never include it in
14374 # preloaded symbol tables.
14375 extract_expsyms_cmds=
14376 # Just being paranoid about ensuring that cc_basename is set.
14377 for cc_temp in $compiler""; do
14378 case $cc_temp in
14379 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
14380 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
14381 \-*) ;;
14382 *) break;;
14383 esac
14384 done
14385 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
14386
14387 case $host_os in
14388 cygwin* | mingw* | pw32*)
14389 # FIXME: the MSVC++ port hasn't been tested in a loooong time
14390 # When not using gcc, we currently assume that we are using
14391 # Microsoft Visual C++.
14392 if test "$GCC" != yes; then
14393 with_gnu_ld=no
14394 fi
14395 ;;
14396 interix*)
14397 # we just hope/assume this is gcc and not c89 (= MSVC++)
14398 with_gnu_ld=yes
14399 ;;
14400 openbsd*)
14401 with_gnu_ld=no
14402 ;;
14403 esac
14404
14405 ld_shlibs_F77=yes
14406 if test "$with_gnu_ld" = yes; then
14407 # If archive_cmds runs LD, not CC, wlarc should be empty
14408 wlarc='${wl}'
14409
14410 # Set some defaults for GNU ld with shared library support. These
14411 # are reset later if shared libraries are not supported. Putting them
14412 # here allows them to be overridden if necessary.
14413 runpath_var=LD_RUN_PATH
14414 hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
14415 export_dynamic_flag_spec_F77='${wl}--export-dynamic'
14416 # ancient GNU ld didn't support --whole-archive et. al.
14417 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
14418 whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
14419 else
14420 whole_archive_flag_spec_F77=
14421 fi
14422 supports_anon_versioning=no
14423 case `$LD -v 2>/dev/null` in
14424 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
14425 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
14426 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
14427 *\ 2.11.*) ;; # other 2.11 versions
14428 *) supports_anon_versioning=yes ;;
14429 esac
14430
14431 # See if GNU ld supports shared libraries.
14432 case $host_os in
14433 aix3* | aix4* | aix5*)
14434 # On AIX/PPC, the GNU linker is very broken
14435 if test "$host_cpu" != ia64; then
14436 ld_shlibs_F77=no
14437 cat <<EOF 1>&2
14438
14439 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
14440 *** to be unable to reliably create shared libraries on AIX.
14441 *** Therefore, libtool is disabling shared libraries support. If you
14442 *** really care for shared libraries, you may want to modify your PATH
14443 *** so that a non-GNU linker is found, and then restart.
14444
14445 EOF
14446 fi
14447 ;;
14448
14449 amigaos*)
14450 archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
14451 hardcode_libdir_flag_spec_F77='-L$libdir'
14452 hardcode_minus_L_F77=yes
14453
14454 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
14455 # that the semantics of dynamic libraries on AmigaOS, at least up
14456 # to version 4, is to share data among multiple programs linked
14457 # with the same dynamic library. Since this doesn't match the
14458 # behavior of shared libraries on other platforms, we can't use
14459 # them.
14460 ld_shlibs_F77=no
14461 ;;
14462
14463 beos*)
14464 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14465 allow_undefined_flag_F77=unsupported
14466 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
14467 # support --undefined. This deserves some investigation. FIXME
14468 archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14469 else
14470 ld_shlibs_F77=no
14471 fi
14472 ;;
14473
14474 cygwin* | mingw* | pw32*)
14475 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
14476 # as there is no search path for DLLs.
14477 hardcode_libdir_flag_spec_F77='-L$libdir'
14478 allow_undefined_flag_F77=unsupported
14479 always_export_symbols_F77=no
14480 enable_shared_with_static_runtimes_F77=yes
14481 export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
14482
14483 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
14484 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14485 # If the export-symbols file already is a .def file (1st line
14486 # is EXPORTS), use it as is; otherwise, prepend...
14487 archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
14488 cp $export_symbols $output_objdir/$soname.def;
14489 else
14490 echo EXPORTS > $output_objdir/$soname.def;
14491 cat $export_symbols >> $output_objdir/$soname.def;
14492 fi~
14493 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
14494 else
14495 ld_shlibs_F77=no
14496 fi
14497 ;;
14498
14499 interix[3-9]*)
14500 hardcode_direct_F77=no
14501 hardcode_shlibpath_var_F77=no
14502 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
14503 export_dynamic_flag_spec_F77='${wl}-E'
14504 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
14505 # Instead, shared libraries are loaded at an image base (0x10000000 by
14506 # default) and relocated if they conflict, which is a slow very memory
14507 # consuming and fragmenting process. To avoid this, we pick a random,
14508 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
14509 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
14510 archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
14511 archive_expsym_cmds_F77='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'
14512 ;;
14513
14514 gnu* | linux* | k*bsd*-gnu)
14515 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14516 tmp_addflag=
14517 case $cc_basename,$host_cpu in
14518 pgcc*) # Portland Group C compiler
14519 whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
14520 tmp_addflag=' $pic_flag'
14521 ;;
14522 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
14523 whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
14524 tmp_addflag=' $pic_flag -Mnomain' ;;
14525 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
14526 tmp_addflag=' -i_dynamic' ;;
14527 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
14528 tmp_addflag=' -i_dynamic -nofor_main' ;;
14529 ifc* | ifort*) # Intel Fortran compiler
14530 tmp_addflag=' -nofor_main' ;;
14531 esac
14532 case `$CC -V 2>&1 | sed 5q` in
14533 *Sun\ C*) # Sun C 5.9
14534 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
14535 tmp_sharedflag='-G' ;;
14536 *Sun\ F*) # Sun Fortran 8.3
14537 tmp_sharedflag='-G' ;;
14538 *)
14539 tmp_sharedflag='-shared' ;;
14540 esac
14541 archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14542
14543 if test $supports_anon_versioning = yes; then
14544 archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
14545 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
14546 $echo "local: *; };" >> $output_objdir/$libname.ver~
14547 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
14548 fi
14549 else
14550 ld_shlibs_F77=no
14551 fi
14552 ;;
14553
14554 netbsd*)
14555 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
14556 archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
14557 wlarc=
14558 else
14559 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14560 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14561 fi
14562 ;;
14563
14564 solaris*)
14565 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
14566 ld_shlibs_F77=no
14567 cat <<EOF 1>&2
14568
14569 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
14570 *** create shared libraries on Solaris systems. Therefore, libtool
14571 *** is disabling shared libraries support. We urge you to upgrade GNU
14572 *** binutils to release 2.9.1 or newer. Another option is to modify
14573 *** your PATH or compiler configuration so that the native linker is
14574 *** used, and then restart.
14575
14576 EOF
14577 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14578 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14579 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14580 else
14581 ld_shlibs_F77=no
14582 fi
14583 ;;
14584
14585 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
14586 case `$LD -v 2>&1` in
14587 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
14588 ld_shlibs_F77=no
14589 cat <<_LT_EOF 1>&2
14590
14591 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
14592 *** reliably create shared libraries on SCO systems. Therefore, libtool
14593 *** is disabling shared libraries support. We urge you to upgrade GNU
14594 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
14595 *** your PATH or compiler configuration so that the native linker is
14596 *** used, and then restart.
14597
14598 _LT_EOF
14599 ;;
14600 *)
14601 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14602 hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
14603 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
14604 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
14605 else
14606 ld_shlibs_F77=no
14607 fi
14608 ;;
14609 esac
14610 ;;
14611
14612 sunos4*)
14613 archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14614 wlarc=
14615 hardcode_direct_F77=yes
14616 hardcode_shlibpath_var_F77=no
14617 ;;
14618
14619 *)
14620 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
14621 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
14622 archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
14623 else
14624 ld_shlibs_F77=no
14625 fi
14626 ;;
14627 esac
14628
14629 if test "$ld_shlibs_F77" = no; then
14630 runpath_var=
14631 hardcode_libdir_flag_spec_F77=
14632 export_dynamic_flag_spec_F77=
14633 whole_archive_flag_spec_F77=
14634 fi
14635 else
14636 # PORTME fill in a description of your system's linker (not GNU ld)
14637 case $host_os in
14638 aix3*)
14639 allow_undefined_flag_F77=unsupported
14640 always_export_symbols_F77=yes
14641 archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
14642 # Note: this linker hardcodes the directories in LIBPATH if there
14643 # are no directories specified by -L.
14644 hardcode_minus_L_F77=yes
14645 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
14646 # Neither direct hardcoding nor static linking is supported with a
14647 # broken collect2.
14648 hardcode_direct_F77=unsupported
14649 fi
14650 ;;
14651
14652 aix4* | aix5*)
14653 if test "$host_cpu" = ia64; then
14654 # On IA64, the linker does run time linking by default, so we don't
14655 # have to do anything special.
14656 aix_use_runtimelinking=no
14657 exp_sym_flag='-Bexport'
14658 no_entry_flag=""
14659 else
14660 # If we're using GNU nm, then we don't want the "-C" option.
14661 # -C means demangle to AIX nm, but means don't demangle with GNU nm
14662 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
14663 export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
14664 else
14665 export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
14666 fi
14667 aix_use_runtimelinking=no
14668
14669 # Test if we are trying to use run time linking or normal
14670 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
14671 # need to do runtime linking.
14672 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
14673 for ld_flag in $LDFLAGS; do
14674 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
14675 aix_use_runtimelinking=yes
14676 break
14677 fi
14678 done
14679 ;;
14680 esac
14681
14682 exp_sym_flag='-bexport'
14683 no_entry_flag='-bnoentry'
14684 fi
14685
14686 # When large executables or shared objects are built, AIX ld can
14687 # have problems creating the table of contents. If linking a library
14688 # or program results in "error TOC overflow" add -mminimal-toc to
14689 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
14690 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
14691
14692 archive_cmds_F77=''
14693 hardcode_direct_F77=yes
14694 hardcode_libdir_separator_F77=':'
14695 link_all_deplibs_F77=yes
14696
14697 if test "$GCC" = yes; then
14698 case $host_os in aix4.[012]|aix4.[012].*)
14699 # We only want to do this on AIX 4.2 and lower, the check
14700 # below for broken collect2 doesn't work under 4.3+
14701 collect2name=`${CC} -print-prog-name=collect2`
14702 if test -f "$collect2name" && \
14703 strings "$collect2name" | grep resolve_lib_name >/dev/null
14704 then
14705 # We have reworked collect2
14706 :
14707 else
14708 # We have old collect2
14709 hardcode_direct_F77=unsupported
14710 # It fails to find uninstalled libraries when the uninstalled
14711 # path is not listed in the libpath. Setting hardcode_minus_L
14712 # to unsupported forces relinking
14713 hardcode_minus_L_F77=yes
14714 hardcode_libdir_flag_spec_F77='-L$libdir'
14715 hardcode_libdir_separator_F77=
14716 fi
14717 ;;
14718 esac
14719 shared_flag='-shared'
14720 if test "$aix_use_runtimelinking" = yes; then
14721 shared_flag="$shared_flag "'${wl}-G'
14722 fi
14723 else
14724 # not using gcc
14725 if test "$host_cpu" = ia64; then
14726 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
14727 # chokes on -Wl,-G. The following line is correct:
14728 shared_flag='-G'
14729 else
14730 if test "$aix_use_runtimelinking" = yes; then
14731 shared_flag='${wl}-G'
14732 else
14733 shared_flag='${wl}-bM:SRE'
14734 fi
14735 fi
14736 fi
14737
14738 # It seems that -bexpall does not export symbols beginning with
14739 # underscore (_), so it is better to generate a list of symbols to export.
14740 always_export_symbols_F77=yes
14741 if test "$aix_use_runtimelinking" = yes; then
14742 # Warning - without using the other runtime loading flags (-brtl),
14743 # -berok will link without error, but may produce a broken library.
14744 allow_undefined_flag_F77='-berok'
14745 # Determine the default libpath from the value encoded in an empty executable.
14746 cat >conftest.$ac_ext <<_ACEOF
14747 program main
14748
14749 end
14750 _ACEOF
14751 rm -f conftest.$ac_objext conftest$ac_exeext
14752 if { (ac_try="$ac_link"
14753 case "(($ac_try" in
14754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14755 *) ac_try_echo=$ac_try;;
14756 esac
14757 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14758 (eval "$ac_link") 2>conftest.er1
14759 ac_status=$?
14760 grep -v '^ *+' conftest.er1 >conftest.err
14761 rm -f conftest.er1
14762 cat conftest.err >&5
14763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14764 (exit $ac_status); } && {
14765 test -z "$ac_f77_werror_flag" ||
14766 test ! -s conftest.err
14767 } && test -s conftest$ac_exeext &&
14768 $as_test_x conftest$ac_exeext; then
14769
14770 lt_aix_libpath_sed='
14771 /Import File Strings/,/^$/ {
14772 /^0/ {
14773 s/^0 *\(.*\)$/\1/
14774 p
14775 }
14776 }'
14777 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14778 # Check for a 64-bit object if we didn't find anything.
14779 if test -z "$aix_libpath"; then
14780 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14781 fi
14782 else
14783 echo "$as_me: failed program was:" >&5
14784 sed 's/^/| /' conftest.$ac_ext >&5
14785
14786
14787 fi
14788
14789 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14790 conftest$ac_exeext conftest.$ac_ext
14791 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
14792
14793 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
14794 archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
14795 else
14796 if test "$host_cpu" = ia64; then
14797 hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
14798 allow_undefined_flag_F77="-z nodefs"
14799 archive_expsym_cmds_F77="\$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"
14800 else
14801 # Determine the default libpath from the value encoded in an empty executable.
14802 cat >conftest.$ac_ext <<_ACEOF
14803 program main
14804
14805 end
14806 _ACEOF
14807 rm -f conftest.$ac_objext conftest$ac_exeext
14808 if { (ac_try="$ac_link"
14809 case "(($ac_try" in
14810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14811 *) ac_try_echo=$ac_try;;
14812 esac
14813 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14814 (eval "$ac_link") 2>conftest.er1
14815 ac_status=$?
14816 grep -v '^ *+' conftest.er1 >conftest.err
14817 rm -f conftest.er1
14818 cat conftest.err >&5
14819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14820 (exit $ac_status); } && {
14821 test -z "$ac_f77_werror_flag" ||
14822 test ! -s conftest.err
14823 } && test -s conftest$ac_exeext &&
14824 $as_test_x conftest$ac_exeext; then
14825
14826 lt_aix_libpath_sed='
14827 /Import File Strings/,/^$/ {
14828 /^0/ {
14829 s/^0 *\(.*\)$/\1/
14830 p
14831 }
14832 }'
14833 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14834 # Check for a 64-bit object if we didn't find anything.
14835 if test -z "$aix_libpath"; then
14836 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
14837 fi
14838 else
14839 echo "$as_me: failed program was:" >&5
14840 sed 's/^/| /' conftest.$ac_ext >&5
14841
14842
14843 fi
14844
14845 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14846 conftest$ac_exeext conftest.$ac_ext
14847 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
14848
14849 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
14850 # Warning - without using the other run time loading flags,
14851 # -berok will link without error, but may produce a broken library.
14852 no_undefined_flag_F77=' ${wl}-bernotok'
14853 allow_undefined_flag_F77=' ${wl}-berok'
14854 # Exported symbols can be pulled into shared objects from archives
14855 whole_archive_flag_spec_F77='$convenience'
14856 archive_cmds_need_lc_F77=yes
14857 # This is similar to how AIX traditionally builds its shared libraries.
14858 archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
14859 fi
14860 fi
14861 ;;
14862
14863 amigaos*)
14864 archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
14865 hardcode_libdir_flag_spec_F77='-L$libdir'
14866 hardcode_minus_L_F77=yes
14867 # see comment about different semantics on the GNU ld section
14868 ld_shlibs_F77=no
14869 ;;
14870
14871 bsdi[45]*)
14872 export_dynamic_flag_spec_F77=-rdynamic
14873 ;;
14874
14875 cygwin* | mingw* | pw32*)
14876 # When not using gcc, we currently assume that we are using
14877 # Microsoft Visual C++.
14878 # hardcode_libdir_flag_spec is actually meaningless, as there is
14879 # no search path for DLLs.
14880 hardcode_libdir_flag_spec_F77=' '
14881 allow_undefined_flag_F77=unsupported
14882 # Tell ltmain to make .lib files, not .a files.
14883 libext=lib
14884 # Tell ltmain to make .dll files, not .so files.
14885 shrext_cmds=".dll"
14886 # FIXME: Setting linknames here is a bad hack.
14887 archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
14888 # The linker will automatically build a .lib file if we build a DLL.
14889 old_archive_From_new_cmds_F77='true'
14890 # FIXME: Should let the user specify the lib program.
14891 old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs'
14892 fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
14893 enable_shared_with_static_runtimes_F77=yes
14894 ;;
14895
14896 darwin* | rhapsody*)
14897 case $host_os in
14898 rhapsody* | darwin1.[012])
14899 allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
14900 ;;
14901 *) # Darwin 1.3 on
14902 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
14903 allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
14904 else
14905 case ${MACOSX_DEPLOYMENT_TARGET} in
14906 10.[012])
14907 allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
14908 ;;
14909 10.*)
14910 allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
14911 ;;
14912 esac
14913 fi
14914 ;;
14915 esac
14916 archive_cmds_need_lc_F77=no
14917 hardcode_direct_F77=no
14918 hardcode_automatic_F77=yes
14919 hardcode_shlibpath_var_F77=unsupported
14920 whole_archive_flag_spec_F77=''
14921 link_all_deplibs_F77=yes
14922 if test "$GCC" = yes ; then
14923 output_verbose_link_cmd='echo'
14924 archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
14925 module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
14926 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
14927 archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
14928 module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
14929 else
14930 case $cc_basename in
14931 xlc*)
14932 output_verbose_link_cmd='echo'
14933 archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
14934 module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
14935 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
14936 archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
14937 module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
14938 ;;
14939 *)
14940 ld_shlibs_F77=no
14941 ;;
14942 esac
14943 fi
14944 ;;
14945
14946 dgux*)
14947 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
14948 hardcode_libdir_flag_spec_F77='-L$libdir'
14949 hardcode_shlibpath_var_F77=no
14950 ;;
14951
14952 freebsd1*)
14953 ld_shlibs_F77=no
14954 ;;
14955
14956 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14957 # support. Future versions do this automatically, but an explicit c++rt0.o
14958 # does not break anything, and helps significantly (at the cost of a little
14959 # extra space).
14960 freebsd2.2*)
14961 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
14962 hardcode_libdir_flag_spec_F77='-R$libdir'
14963 hardcode_direct_F77=yes
14964 hardcode_shlibpath_var_F77=no
14965 ;;
14966
14967 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
14968 freebsd2*)
14969 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
14970 hardcode_direct_F77=yes
14971 hardcode_minus_L_F77=yes
14972 hardcode_shlibpath_var_F77=no
14973 ;;
14974
14975 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
14976 freebsd* | dragonfly*)
14977 archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
14978 hardcode_libdir_flag_spec_F77='-R$libdir'
14979 hardcode_direct_F77=yes
14980 hardcode_shlibpath_var_F77=no
14981 ;;
14982
14983 hpux9*)
14984 if test "$GCC" = yes; then
14985 archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
14986 else
14987 archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
14988 fi
14989 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
14990 hardcode_libdir_separator_F77=:
14991 hardcode_direct_F77=yes
14992
14993 # hardcode_minus_L: Not really in the search PATH,
14994 # but as the default location of the library.
14995 hardcode_minus_L_F77=yes
14996 export_dynamic_flag_spec_F77='${wl}-E'
14997 ;;
14998
14999 hpux10*)
15000 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
15001 archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15002 else
15003 archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
15004 fi
15005 if test "$with_gnu_ld" = no; then
15006 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
15007 hardcode_libdir_separator_F77=:
15008
15009 hardcode_direct_F77=yes
15010 export_dynamic_flag_spec_F77='${wl}-E'
15011
15012 # hardcode_minus_L: Not really in the search PATH,
15013 # but as the default location of the library.
15014 hardcode_minus_L_F77=yes
15015 fi
15016 ;;
15017
15018 hpux11*)
15019 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
15020 case $host_cpu in
15021 hppa*64*)
15022 archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15023 ;;
15024 ia64*)
15025 archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15026 ;;
15027 *)
15028 archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15029 ;;
15030 esac
15031 else
15032 case $host_cpu in
15033 hppa*64*)
15034 archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15035 ;;
15036 ia64*)
15037 archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
15038 ;;
15039 *)
15040 archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
15041 ;;
15042 esac
15043 fi
15044 if test "$with_gnu_ld" = no; then
15045 hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
15046 hardcode_libdir_separator_F77=:
15047
15048 case $host_cpu in
15049 hppa*64*|ia64*)
15050 hardcode_libdir_flag_spec_ld_F77='+b $libdir'
15051 hardcode_direct_F77=no
15052 hardcode_shlibpath_var_F77=no
15053 ;;
15054 *)
15055 hardcode_direct_F77=yes
15056 export_dynamic_flag_spec_F77='${wl}-E'
15057
15058 # hardcode_minus_L: Not really in the search PATH,
15059 # but as the default location of the library.
15060 hardcode_minus_L_F77=yes
15061 ;;
15062 esac
15063 fi
15064 ;;
15065
15066 irix5* | irix6* | nonstopux*)
15067 if test "$GCC" = yes; then
15068 archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15069 else
15070 archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
15071 hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
15072 fi
15073 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
15074 hardcode_libdir_separator_F77=:
15075 link_all_deplibs_F77=yes
15076 ;;
15077
15078 netbsd*)
15079 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
15080 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
15081 else
15082 archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
15083 fi
15084 hardcode_libdir_flag_spec_F77='-R$libdir'
15085 hardcode_direct_F77=yes
15086 hardcode_shlibpath_var_F77=no
15087 ;;
15088
15089 newsos6)
15090 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15091 hardcode_direct_F77=yes
15092 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
15093 hardcode_libdir_separator_F77=:
15094 hardcode_shlibpath_var_F77=no
15095 ;;
15096
15097 openbsd*)
15098 if test -f /usr/libexec/ld.so; then
15099 hardcode_direct_F77=yes
15100 hardcode_shlibpath_var_F77=no
15101 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15102 archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15103 archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
15104 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
15105 export_dynamic_flag_spec_F77='${wl}-E'
15106 else
15107 case $host_os in
15108 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
15109 archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
15110 hardcode_libdir_flag_spec_F77='-R$libdir'
15111 ;;
15112 *)
15113 archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
15114 hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
15115 ;;
15116 esac
15117 fi
15118 else
15119 ld_shlibs_F77=no
15120 fi
15121 ;;
15122
15123 os2*)
15124 hardcode_libdir_flag_spec_F77='-L$libdir'
15125 hardcode_minus_L_F77=yes
15126 allow_undefined_flag_F77=unsupported
15127 archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
15128 old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
15129 ;;
15130
15131 osf3*)
15132 if test "$GCC" = yes; then
15133 allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
15134 archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15135 else
15136 allow_undefined_flag_F77=' -expect_unresolved \*'
15137 archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
15138 fi
15139 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
15140 hardcode_libdir_separator_F77=:
15141 ;;
15142
15143 osf4* | osf5*) # as osf3* with the addition of -msym flag
15144 if test "$GCC" = yes; then
15145 allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
15146 archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
15147 hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
15148 else
15149 allow_undefined_flag_F77=' -expect_unresolved \*'
15150 archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
15151 archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
15152 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
15153
15154 # Both c and cxx compiler support -rpath directly
15155 hardcode_libdir_flag_spec_F77='-rpath $libdir'
15156 fi
15157 hardcode_libdir_separator_F77=:
15158 ;;
15159
15160 solaris*)
15161 no_undefined_flag_F77=' -z text'
15162 if test "$GCC" = yes; then
15163 wlarc='${wl}'
15164 archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
15165 archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
15166 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
15167 else
15168 wlarc=''
15169 archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
15170 archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
15171 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
15172 fi
15173 hardcode_libdir_flag_spec_F77='-R$libdir'
15174 hardcode_shlibpath_var_F77=no
15175 case $host_os in
15176 solaris2.[0-5] | solaris2.[0-5].*) ;;
15177 *)
15178 # The compiler driver will combine and reorder linker options,
15179 # but understands `-z linker_flag'. GCC discards it without `$wl',
15180 # but is careful enough not to reorder.
15181 # Supported since Solaris 2.6 (maybe 2.5.1?)
15182 if test "$GCC" = yes; then
15183 whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
15184 else
15185 whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract'
15186 fi
15187 ;;
15188 esac
15189 link_all_deplibs_F77=yes
15190 ;;
15191
15192 sunos4*)
15193 if test "x$host_vendor" = xsequent; then
15194 # Use $CC to link under sequent, because it throws in some extra .o
15195 # files that make .init and .fini sections work.
15196 archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
15197 else
15198 archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
15199 fi
15200 hardcode_libdir_flag_spec_F77='-L$libdir'
15201 hardcode_direct_F77=yes
15202 hardcode_minus_L_F77=yes
15203 hardcode_shlibpath_var_F77=no
15204 ;;
15205
15206 sysv4)
15207 case $host_vendor in
15208 sni)
15209 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15210 hardcode_direct_F77=yes # is this really true???
15211 ;;
15212 siemens)
15213 ## LD is ld it makes a PLAMLIB
15214 ## CC just makes a GrossModule.
15215 archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
15216 reload_cmds_F77='$CC -r -o $output$reload_objs'
15217 hardcode_direct_F77=no
15218 ;;
15219 motorola)
15220 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15221 hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
15222 ;;
15223 esac
15224 runpath_var='LD_RUN_PATH'
15225 hardcode_shlibpath_var_F77=no
15226 ;;
15227
15228 sysv4.3*)
15229 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15230 hardcode_shlibpath_var_F77=no
15231 export_dynamic_flag_spec_F77='-Bexport'
15232 ;;
15233
15234 sysv4*MP*)
15235 if test -d /usr/nec; then
15236 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15237 hardcode_shlibpath_var_F77=no
15238 runpath_var=LD_RUN_PATH
15239 hardcode_runpath_var=yes
15240 ld_shlibs_F77=yes
15241 fi
15242 ;;
15243
15244 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
15245 no_undefined_flag_F77='${wl}-z,text'
15246 archive_cmds_need_lc_F77=no
15247 hardcode_shlibpath_var_F77=no
15248 runpath_var='LD_RUN_PATH'
15249
15250 if test "$GCC" = yes; then
15251 archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15252 archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15253 else
15254 archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15255 archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
15256 fi
15257 ;;
15258
15259 sysv5* | sco3.2v5* | sco5v6*)
15260 # Note: We can NOT use -z defs as we might desire, because we do not
15261 # link with -lc, and that would cause any symbols used from libc to
15262 # always be unresolved, which means just about no library would
15263 # ever link correctly. If we're not using GNU ld we use -z text
15264 # though, which does catch some bad symbols but isn't as heavy-handed
15265 # as -z defs.
15266 no_undefined_flag_F77='${wl}-z,text'
15267 allow_undefined_flag_F77='${wl}-z,nodefs'
15268 archive_cmds_need_lc_F77=no
15269 hardcode_shlibpath_var_F77=no
15270 hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
15271 hardcode_libdir_separator_F77=':'
15272 link_all_deplibs_F77=yes
15273 export_dynamic_flag_spec_F77='${wl}-Bexport'
15274 runpath_var='LD_RUN_PATH'
15275
15276 if test "$GCC" = yes; then
15277 archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
15278 archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
15279 else
15280 archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
15281 archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
15282 fi
15283 ;;
15284
15285 uts4*)
15286 archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
15287 hardcode_libdir_flag_spec_F77='-L$libdir'
15288 hardcode_shlibpath_var_F77=no
15289 ;;
15290
15291 *)
15292 ld_shlibs_F77=no
15293 ;;
15294 esac
15295 fi
15296
15297 { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
15298 echo "${ECHO_T}$ld_shlibs_F77" >&6; }
15299 test "$ld_shlibs_F77" = no && can_build_shared=no
15300
15301 #
15302 # Do we need to explicitly link libc?
15303 #
15304 case "x$archive_cmds_need_lc_F77" in
15305 x|xyes)
15306 # Assume -lc should be added
15307 archive_cmds_need_lc_F77=yes
15308
15309 if test "$enable_shared" = yes && test "$GCC" = yes; then
15310 case $archive_cmds_F77 in
15311 *'~'*)
15312 # FIXME: we may have to deal with multi-command sequences.
15313 ;;
15314 '$CC '*)
15315 # Test whether the compiler implicitly links with -lc since on some
15316 # systems, -lgcc has to come before -lc. If gcc already passes -lc
15317 # to ld, don't add -lc before -lgcc.
15318 { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
15319 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
15320 $rm conftest*
15321 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
15322
15323 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15324 (eval $ac_compile) 2>&5
15325 ac_status=$?
15326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15327 (exit $ac_status); } 2>conftest.err; then
15328 soname=conftest
15329 lib=conftest
15330 libobjs=conftest.$ac_objext
15331 deplibs=
15332 wl=$lt_prog_compiler_wl_F77
15333 pic_flag=$lt_prog_compiler_pic_F77
15334 compiler_flags=-v
15335 linker_flags=-v
15336 verstring=
15337 output_objdir=.
15338 libname=conftest
15339 lt_save_allow_undefined_flag=$allow_undefined_flag_F77
15340 allow_undefined_flag_F77=
15341 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
15342 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
15343 ac_status=$?
15344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15345 (exit $ac_status); }
15346 then
15347 archive_cmds_need_lc_F77=no
15348 else
15349 archive_cmds_need_lc_F77=yes
15350 fi
15351 allow_undefined_flag_F77=$lt_save_allow_undefined_flag
15352 else
15353 cat conftest.err 1>&5
15354 fi
15355 $rm conftest*
15356 { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
15357 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; }
15358 ;;
15359 esac
15360 fi
15361 ;;
15362 esac
15363
15364 { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
15365 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
15366 library_names_spec=
15367 libname_spec='lib$name'
15368 soname_spec=
15369 shrext_cmds=".so"
15370 postinstall_cmds=
15371 postuninstall_cmds=
15372 finish_cmds=
15373 finish_eval=
15374 shlibpath_var=
15375 shlibpath_overrides_runpath=unknown
15376 version_type=none
15377 dynamic_linker="$host_os ld.so"
15378 sys_lib_dlsearch_path_spec="/lib /usr/lib"
15379
15380 need_lib_prefix=unknown
15381 hardcode_into_libs=no
15382
15383 # when you set need_version to no, make sure it does not cause -set_version
15384 # flags to be left without arguments
15385 need_version=unknown
15386
15387 case $host_os in
15388 aix3*)
15389 version_type=linux
15390 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
15391 shlibpath_var=LIBPATH
15392
15393 # AIX 3 has no versioning support, so we append a major version to the name.
15394 soname_spec='${libname}${release}${shared_ext}$major'
15395 ;;
15396
15397 aix4* | aix5*)
15398 version_type=linux
15399 need_lib_prefix=no
15400 need_version=no
15401 hardcode_into_libs=yes
15402 if test "$host_cpu" = ia64; then
15403 # AIX 5 supports IA64
15404 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
15405 shlibpath_var=LD_LIBRARY_PATH
15406 else
15407 # With GCC up to 2.95.x, collect2 would create an import file
15408 # for dependence libraries. The import file would start with
15409 # the line `#! .'. This would cause the generated library to
15410 # depend on `.', always an invalid library. This was fixed in
15411 # development snapshots of GCC prior to 3.0.
15412 case $host_os in
15413 aix4 | aix4.[01] | aix4.[01].*)
15414 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
15415 echo ' yes '
15416 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
15417 :
15418 else
15419 can_build_shared=no
15420 fi
15421 ;;
15422 esac
15423 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
15424 # soname into executable. Probably we can add versioning support to
15425 # collect2, so additional links can be useful in future.
15426 if test "$aix_use_runtimelinking" = yes; then
15427 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
15428 # instead of lib<name>.a to let people know that these are not
15429 # typical AIX shared libraries.
15430 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15431 else
15432 # We preserve .a as extension for shared libraries through AIX4.2
15433 # and later when we are not doing run time linking.
15434 library_names_spec='${libname}${release}.a $libname.a'
15435 soname_spec='${libname}${release}${shared_ext}$major'
15436 fi
15437 shlibpath_var=LIBPATH
15438 fi
15439 ;;
15440
15441 amigaos*)
15442 library_names_spec='$libname.ixlibrary $libname.a'
15443 # Create ${libname}_ixlibrary.a entries in /sys/libs.
15444 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
15445 ;;
15446
15447 beos*)
15448 library_names_spec='${libname}${shared_ext}'
15449 dynamic_linker="$host_os ld.so"
15450 shlibpath_var=LIBRARY_PATH
15451 ;;
15452
15453 bsdi[45]*)
15454 version_type=linux
15455 need_version=no
15456 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15457 soname_spec='${libname}${release}${shared_ext}$major'
15458 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
15459 shlibpath_var=LD_LIBRARY_PATH
15460 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
15461 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
15462 # the default ld.so.conf also contains /usr/contrib/lib and
15463 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
15464 # libtool to hard-code these into programs
15465 ;;
15466
15467 cygwin* | mingw* | pw32*)
15468 version_type=windows
15469 shrext_cmds=".dll"
15470 need_version=no
15471 need_lib_prefix=no
15472
15473 case $GCC,$host_os in
15474 yes,cygwin* | yes,mingw* | yes,pw32*)
15475 library_names_spec='$libname.dll.a'
15476 # DLL is installed to $(libdir)/../bin by postinstall_cmds
15477 postinstall_cmds='base_file=`basename \${file}`~
15478 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
15479 dldir=$destdir/`dirname \$dlpath`~
15480 test -d \$dldir || mkdir -p \$dldir~
15481 $install_prog $dir/$dlname \$dldir/$dlname~
15482 chmod a+x \$dldir/$dlname'
15483 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
15484 dlpath=$dir/\$dldll~
15485 $rm \$dlpath'
15486 shlibpath_overrides_runpath=yes
15487
15488 case $host_os in
15489 cygwin*)
15490 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
15491 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15492 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
15493 ;;
15494 mingw*)
15495 # MinGW DLLs use traditional 'lib' prefix
15496 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15497 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
15498 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
15499 # It is most probably a Windows format PATH printed by
15500 # mingw gcc, but we are running on Cygwin. Gcc prints its search
15501 # path with ; separators, and with drive letters. We can handle the
15502 # drive letters (cygwin fileutils understands them), so leave them,
15503 # especially as we might pass files found there to a mingw objdump,
15504 # which wouldn't understand a cygwinified path. Ahh.
15505 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
15506 else
15507 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
15508 fi
15509 ;;
15510 pw32*)
15511 # pw32 DLLs use 'pw' prefix rather than 'lib'
15512 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
15513 ;;
15514 esac
15515 ;;
15516
15517 *)
15518 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
15519 ;;
15520 esac
15521 dynamic_linker='Win32 ld.exe'
15522 # FIXME: first we should search . and the directory the executable is in
15523 shlibpath_var=PATH
15524 ;;
15525
15526 darwin* | rhapsody*)
15527 dynamic_linker="$host_os dyld"
15528 version_type=darwin
15529 need_lib_prefix=no
15530 need_version=no
15531 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
15532 soname_spec='${libname}${release}${major}$shared_ext'
15533 shlibpath_overrides_runpath=yes
15534 shlibpath_var=DYLD_LIBRARY_PATH
15535 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15536
15537 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
15538 ;;
15539
15540 dgux*)
15541 version_type=linux
15542 need_lib_prefix=no
15543 need_version=no
15544 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
15545 soname_spec='${libname}${release}${shared_ext}$major'
15546 shlibpath_var=LD_LIBRARY_PATH
15547 ;;
15548
15549 freebsd1*)
15550 dynamic_linker=no
15551 ;;
15552
15553 freebsd* | dragonfly*)
15554 # DragonFly does not have aout. When/if they implement a new
15555 # versioning mechanism, adjust this.
15556 if test -x /usr/bin/objformat; then
15557 objformat=`/usr/bin/objformat`
15558 else
15559 case $host_os in
15560 freebsd[123]*) objformat=aout ;;
15561 *) objformat=elf ;;
15562 esac
15563 fi
15564 version_type=freebsd-$objformat
15565 case $version_type in
15566 freebsd-elf*)
15567 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15568 need_version=no
15569 need_lib_prefix=no
15570 ;;
15571 freebsd-*)
15572 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
15573 need_version=yes
15574 ;;
15575 esac
15576 shlibpath_var=LD_LIBRARY_PATH
15577 case $host_os in
15578 freebsd2*)
15579 shlibpath_overrides_runpath=yes
15580 ;;
15581 freebsd3.[01]* | freebsdelf3.[01]*)
15582 shlibpath_overrides_runpath=yes
15583 hardcode_into_libs=yes
15584 ;;
15585 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
15586 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
15587 shlibpath_overrides_runpath=no
15588 hardcode_into_libs=yes
15589 ;;
15590 *) # from 4.6 on, and DragonFly
15591 shlibpath_overrides_runpath=yes
15592 hardcode_into_libs=yes
15593 ;;
15594 esac
15595 ;;
15596
15597 gnu*)
15598 version_type=linux
15599 need_lib_prefix=no
15600 need_version=no
15601 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
15602 soname_spec='${libname}${release}${shared_ext}$major'
15603 shlibpath_var=LD_LIBRARY_PATH
15604 hardcode_into_libs=yes
15605 ;;
15606
15607 hpux9* | hpux10* | hpux11*)
15608 # Give a soname corresponding to the major version so that dld.sl refuses to
15609 # link against other versions.
15610 version_type=sunos
15611 need_lib_prefix=no
15612 need_version=no
15613 case $host_cpu in
15614 ia64*)
15615 shrext_cmds='.so'
15616 hardcode_into_libs=yes
15617 dynamic_linker="$host_os dld.so"
15618 shlibpath_var=LD_LIBRARY_PATH
15619 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15620 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15621 soname_spec='${libname}${release}${shared_ext}$major'
15622 if test "X$HPUX_IA64_MODE" = X32; then
15623 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
15624 else
15625 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
15626 fi
15627 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15628 ;;
15629 hppa*64*)
15630 shrext_cmds='.sl'
15631 hardcode_into_libs=yes
15632 dynamic_linker="$host_os dld.sl"
15633 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
15634 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
15635 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15636 soname_spec='${libname}${release}${shared_ext}$major'
15637 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
15638 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
15639 ;;
15640 *)
15641 shrext_cmds='.sl'
15642 dynamic_linker="$host_os dld.sl"
15643 shlibpath_var=SHLIB_PATH
15644 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
15645 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15646 soname_spec='${libname}${release}${shared_ext}$major'
15647 ;;
15648 esac
15649 # HP-UX runs *really* slowly unless shared libraries are mode 555.
15650 postinstall_cmds='chmod 555 $lib'
15651 ;;
15652
15653 interix[3-9]*)
15654 version_type=linux
15655 need_lib_prefix=no
15656 need_version=no
15657 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15658 soname_spec='${libname}${release}${shared_ext}$major'
15659 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
15660 shlibpath_var=LD_LIBRARY_PATH
15661 shlibpath_overrides_runpath=no
15662 hardcode_into_libs=yes
15663 ;;
15664
15665 irix5* | irix6* | nonstopux*)
15666 case $host_os in
15667 nonstopux*) version_type=nonstopux ;;
15668 *)
15669 if test "$lt_cv_prog_gnu_ld" = yes; then
15670 version_type=linux
15671 else
15672 version_type=irix
15673 fi ;;
15674 esac
15675 need_lib_prefix=no
15676 need_version=no
15677 soname_spec='${libname}${release}${shared_ext}$major'
15678 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
15679 case $host_os in
15680 irix5* | nonstopux*)
15681 libsuff= shlibsuff=
15682 ;;
15683 *)
15684 case $LD in # libtool.m4 will add one of these switches to LD
15685 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
15686 libsuff= shlibsuff= libmagic=32-bit;;
15687 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
15688 libsuff=32 shlibsuff=N32 libmagic=N32;;
15689 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
15690 libsuff=64 shlibsuff=64 libmagic=64-bit;;
15691 *) libsuff= shlibsuff= libmagic=never-match;;
15692 esac
15693 ;;
15694 esac
15695 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
15696 shlibpath_overrides_runpath=no
15697 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
15698 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
15699 hardcode_into_libs=yes
15700 ;;
15701
15702 # No shared lib support for Linux oldld, aout, or coff.
15703 linux*oldld* | linux*aout* | linux*coff*)
15704 dynamic_linker=no
15705 ;;
15706
15707 # This must be Linux ELF.
15708 linux* | k*bsd*-gnu)
15709 version_type=linux
15710 need_lib_prefix=no
15711 need_version=no
15712 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15713 soname_spec='${libname}${release}${shared_ext}$major'
15714 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
15715 shlibpath_var=LD_LIBRARY_PATH
15716 shlibpath_overrides_runpath=no
15717 # This implies no fast_install, which is unacceptable.
15718 # Some rework will be needed to allow for fast_install
15719 # before this can be enabled.
15720 hardcode_into_libs=yes
15721 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
15722 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
15723
15724 # Append ld.so.conf contents to the search path
15725 if test -f /etc/ld.so.conf; then
15726 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
15727 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
15728 fi
15729
15730 # We used to test for /lib/ld.so.1 and disable shared libraries on
15731 # powerpc, because MkLinux only supported shared libraries with the
15732 # GNU dynamic linker. Since this was broken with cross compilers,
15733 # most powerpc-linux boxes support dynamic linking these days and
15734 # people can always --disable-shared, the test was removed, and we
15735 # assume the GNU/Linux dynamic linker is in use.
15736 dynamic_linker='GNU/Linux ld.so'
15737 ;;
15738
15739 netbsd*)
15740 version_type=sunos
15741 need_lib_prefix=no
15742 need_version=no
15743 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
15744 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15745 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15746 dynamic_linker='NetBSD (a.out) ld.so'
15747 else
15748 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
15749 soname_spec='${libname}${release}${shared_ext}$major'
15750 dynamic_linker='NetBSD ld.elf_so'
15751 fi
15752 shlibpath_var=LD_LIBRARY_PATH
15753 shlibpath_overrides_runpath=yes
15754 hardcode_into_libs=yes
15755 ;;
15756
15757 newsos6)
15758 version_type=linux
15759 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15760 shlibpath_var=LD_LIBRARY_PATH
15761 shlibpath_overrides_runpath=yes
15762 ;;
15763
15764 nto-qnx*)
15765 version_type=linux
15766 need_lib_prefix=no
15767 need_version=no
15768 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15769 soname_spec='${libname}${release}${shared_ext}$major'
15770 shlibpath_var=LD_LIBRARY_PATH
15771 shlibpath_overrides_runpath=yes
15772 ;;
15773
15774 openbsd*)
15775 version_type=sunos
15776 sys_lib_dlsearch_path_spec="/usr/lib"
15777 need_lib_prefix=no
15778 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
15779 case $host_os in
15780 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
15781 *) need_version=no ;;
15782 esac
15783 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15784 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
15785 shlibpath_var=LD_LIBRARY_PATH
15786 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
15787 case $host_os in
15788 openbsd2.[89] | openbsd2.[89].*)
15789 shlibpath_overrides_runpath=no
15790 ;;
15791 *)
15792 shlibpath_overrides_runpath=yes
15793 ;;
15794 esac
15795 else
15796 shlibpath_overrides_runpath=yes
15797 fi
15798 ;;
15799
15800 os2*)
15801 libname_spec='$name'
15802 shrext_cmds=".dll"
15803 need_lib_prefix=no
15804 library_names_spec='$libname${shared_ext} $libname.a'
15805 dynamic_linker='OS/2 ld.exe'
15806 shlibpath_var=LIBPATH
15807 ;;
15808
15809 osf3* | osf4* | osf5*)
15810 version_type=osf
15811 need_lib_prefix=no
15812 need_version=no
15813 soname_spec='${libname}${release}${shared_ext}$major'
15814 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15815 shlibpath_var=LD_LIBRARY_PATH
15816 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
15817 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
15818 ;;
15819
15820 rdos*)
15821 dynamic_linker=no
15822 ;;
15823
15824 solaris*)
15825 version_type=linux
15826 need_lib_prefix=no
15827 need_version=no
15828 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15829 soname_spec='${libname}${release}${shared_ext}$major'
15830 shlibpath_var=LD_LIBRARY_PATH
15831 shlibpath_overrides_runpath=yes
15832 hardcode_into_libs=yes
15833 # ldd complains unless libraries are executable
15834 postinstall_cmds='chmod +x $lib'
15835 ;;
15836
15837 sunos4*)
15838 version_type=sunos
15839 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
15840 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
15841 shlibpath_var=LD_LIBRARY_PATH
15842 shlibpath_overrides_runpath=yes
15843 if test "$with_gnu_ld" = yes; then
15844 need_lib_prefix=no
15845 fi
15846 need_version=yes
15847 ;;
15848
15849 sysv4 | sysv4.3*)
15850 version_type=linux
15851 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15852 soname_spec='${libname}${release}${shared_ext}$major'
15853 shlibpath_var=LD_LIBRARY_PATH
15854 case $host_vendor in
15855 sni)
15856 shlibpath_overrides_runpath=no
15857 need_lib_prefix=no
15858 export_dynamic_flag_spec='${wl}-Blargedynsym'
15859 runpath_var=LD_RUN_PATH
15860 ;;
15861 siemens)
15862 need_lib_prefix=no
15863 ;;
15864 motorola)
15865 need_lib_prefix=no
15866 need_version=no
15867 shlibpath_overrides_runpath=no
15868 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
15869 ;;
15870 esac
15871 ;;
15872
15873 sysv4*MP*)
15874 if test -d /usr/nec ;then
15875 version_type=linux
15876 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
15877 soname_spec='$libname${shared_ext}.$major'
15878 shlibpath_var=LD_LIBRARY_PATH
15879 fi
15880 ;;
15881
15882 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
15883 version_type=freebsd-elf
15884 need_lib_prefix=no
15885 need_version=no
15886 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
15887 soname_spec='${libname}${release}${shared_ext}$major'
15888 shlibpath_var=LD_LIBRARY_PATH
15889 hardcode_into_libs=yes
15890 if test "$with_gnu_ld" = yes; then
15891 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
15892 shlibpath_overrides_runpath=no
15893 else
15894 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
15895 shlibpath_overrides_runpath=yes
15896 case $host_os in
15897 sco3.2v5*)
15898 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
15899 ;;
15900 esac
15901 fi
15902 sys_lib_dlsearch_path_spec='/usr/lib'
15903 ;;
15904
15905 uts4*)
15906 version_type=linux
15907 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
15908 soname_spec='${libname}${release}${shared_ext}$major'
15909 shlibpath_var=LD_LIBRARY_PATH
15910 ;;
15911
15912 *)
15913 dynamic_linker=no
15914 ;;
15915 esac
15916 { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
15917 echo "${ECHO_T}$dynamic_linker" >&6; }
15918 test "$dynamic_linker" = no && can_build_shared=no
15919
15920 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
15921 if test "$GCC" = yes; then
15922 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
15923 fi
15924
15925 { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
15926 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
15927 hardcode_action_F77=
15928 if test -n "$hardcode_libdir_flag_spec_F77" || \
15929 test -n "$runpath_var_F77" || \
15930 test "X$hardcode_automatic_F77" = "Xyes" ; then
15931
15932 # We can hardcode non-existant directories.
15933 if test "$hardcode_direct_F77" != no &&
15934 # If the only mechanism to avoid hardcoding is shlibpath_var, we
15935 # have to relink, otherwise we might link with an installed library
15936 # when we should be linking with a yet-to-be-installed one
15937 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
15938 test "$hardcode_minus_L_F77" != no; then
15939 # Linking always hardcodes the temporary library directory.
15940 hardcode_action_F77=relink
15941 else
15942 # We can link without hardcoding, and we can hardcode nonexisting dirs.
15943 hardcode_action_F77=immediate
15944 fi
15945 else
15946 # We cannot hardcode anything, or else we can only hardcode existing
15947 # directories.
15948 hardcode_action_F77=unsupported
15949 fi
15950 { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
15951 echo "${ECHO_T}$hardcode_action_F77" >&6; }
15952
15953 if test "$hardcode_action_F77" = relink; then
15954 # Fast installation is not supported
15955 enable_fast_install=no
15956 elif test "$shlibpath_overrides_runpath" = yes ||
15957 test "$enable_shared" = no; then
15958 # Fast installation is not necessary
15959 enable_fast_install=needless
15960 fi
15961
15962
15963 # The else clause should only fire when bootstrapping the
15964 # libtool distribution, otherwise you forgot to ship ltmain.sh
15965 # with your package, and you will get complaints that there are
15966 # no rules to generate ltmain.sh.
15967 if test -f "$ltmain"; then
15968 # See if we are running on zsh, and set the options which allow our commands through
15969 # without removal of \ escapes.
15970 if test -n "${ZSH_VERSION+set}" ; then
15971 setopt NO_GLOB_SUBST
15972 fi
15973 # Now quote all the things that may contain metacharacters while being
15974 # careful not to overquote the AC_SUBSTed values. We take copies of the
15975 # variables and quote the copies for generation of the libtool script.
15976 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
15977 SED SHELL STRIP \
15978 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
15979 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
15980 deplibs_check_method reload_flag reload_cmds need_locks \
15981 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
15982 lt_cv_sys_global_symbol_to_c_name_address \
15983 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
15984 old_postinstall_cmds old_postuninstall_cmds \
15985 compiler_F77 \
15986 CC_F77 \
15987 LD_F77 \
15988 lt_prog_compiler_wl_F77 \
15989 lt_prog_compiler_pic_F77 \
15990 lt_prog_compiler_static_F77 \
15991 lt_prog_compiler_no_builtin_flag_F77 \
15992 export_dynamic_flag_spec_F77 \
15993 thread_safe_flag_spec_F77 \
15994 whole_archive_flag_spec_F77 \
15995 enable_shared_with_static_runtimes_F77 \
15996 old_archive_cmds_F77 \
15997 old_archive_from_new_cmds_F77 \
15998 predep_objects_F77 \
15999 postdep_objects_F77 \
16000 predeps_F77 \
16001 postdeps_F77 \
16002 compiler_lib_search_path_F77 \
16003 archive_cmds_F77 \
16004 archive_expsym_cmds_F77 \
16005 postinstall_cmds_F77 \
16006 postuninstall_cmds_F77 \
16007 old_archive_from_expsyms_cmds_F77 \
16008 allow_undefined_flag_F77 \
16009 no_undefined_flag_F77 \
16010 export_symbols_cmds_F77 \
16011 hardcode_libdir_flag_spec_F77 \
16012 hardcode_libdir_flag_spec_ld_F77 \
16013 hardcode_libdir_separator_F77 \
16014 hardcode_automatic_F77 \
16015 module_cmds_F77 \
16016 module_expsym_cmds_F77 \
16017 lt_cv_prog_compiler_c_o_F77 \
16018 fix_srcfile_path_F77 \
16019 exclude_expsyms_F77 \
16020 include_expsyms_F77; do
16021
16022 case $var in
16023 old_archive_cmds_F77 | \
16024 old_archive_from_new_cmds_F77 | \
16025 archive_cmds_F77 | \
16026 archive_expsym_cmds_F77 | \
16027 module_cmds_F77 | \
16028 module_expsym_cmds_F77 | \
16029 old_archive_from_expsyms_cmds_F77 | \
16030 export_symbols_cmds_F77 | \
16031 extract_expsyms_cmds | reload_cmds | finish_cmds | \
16032 postinstall_cmds | postuninstall_cmds | \
16033 old_postinstall_cmds | old_postuninstall_cmds | \
16034 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
16035 # Double-quote double-evaled strings.
16036 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
16037 ;;
16038 *)
16039 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
16040 ;;
16041 esac
16042 done
16043
16044 case $lt_echo in
16045 *'\$0 --fallback-echo"')
16046 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
16047 ;;
16048 esac
16049
16050 cfgfile="$ofile"
16051
16052 cat <<__EOF__ >> "$cfgfile"
16053 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
16054
16055 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16056
16057 # Shell to use when invoking shell scripts.
16058 SHELL=$lt_SHELL
16059
16060 # Whether or not to build shared libraries.
16061 build_libtool_libs=$enable_shared
16062
16063 # Whether or not to build static libraries.
16064 build_old_libs=$enable_static
16065
16066 # Whether or not to add -lc for building shared libraries.
16067 build_libtool_need_lc=$archive_cmds_need_lc_F77
16068
16069 # Whether or not to disallow shared libs when runtime libs are static
16070 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
16071
16072 # Whether or not to optimize for fast installation.
16073 fast_install=$enable_fast_install
16074
16075 # The host system.
16076 host_alias=$host_alias
16077 host=$host
16078 host_os=$host_os
16079
16080 # The build system.
16081 build_alias=$build_alias
16082 build=$build
16083 build_os=$build_os
16084
16085 # An echo program that does not interpret backslashes.
16086 echo=$lt_echo
16087
16088 # The archiver.
16089 AR=$lt_AR
16090 AR_FLAGS=$lt_AR_FLAGS
16091
16092 # A C compiler.
16093 LTCC=$lt_LTCC
16094
16095 # LTCC compiler flags.
16096 LTCFLAGS=$lt_LTCFLAGS
16097
16098 # A language-specific compiler.
16099 CC=$lt_compiler_F77
16100
16101 # Is the compiler the GNU C compiler?
16102 with_gcc=$GCC_F77
16103
16104 # An ERE matcher.
16105 EGREP=$lt_EGREP
16106
16107 # The linker used to build libraries.
16108 LD=$lt_LD_F77
16109
16110 # Whether we need hard or soft links.
16111 LN_S=$lt_LN_S
16112
16113 # A BSD-compatible nm program.
16114 NM=$lt_NM
16115
16116 # A symbol stripping program
16117 STRIP=$lt_STRIP
16118
16119 # Used to examine libraries when file_magic_cmd begins "file"
16120 MAGIC_CMD=$MAGIC_CMD
16121
16122 # Used on cygwin: DLL creation program.
16123 DLLTOOL="$DLLTOOL"
16124
16125 # Used on cygwin: object dumper.
16126 OBJDUMP="$OBJDUMP"
16127
16128 # Used on cygwin: assembler.
16129 AS="$AS"
16130
16131 # The name of the directory that contains temporary libtool files.
16132 objdir=$objdir
16133
16134 # How to create reloadable object files.
16135 reload_flag=$lt_reload_flag
16136 reload_cmds=$lt_reload_cmds
16137
16138 # How to pass a linker flag through the compiler.
16139 wl=$lt_lt_prog_compiler_wl_F77
16140
16141 # Object file suffix (normally "o").
16142 objext="$ac_objext"
16143
16144 # Old archive suffix (normally "a").
16145 libext="$libext"
16146
16147 # Shared library suffix (normally ".so").
16148 shrext_cmds='$shrext_cmds'
16149
16150 # Executable file suffix (normally "").
16151 exeext="$exeext"
16152
16153 # Additional compiler flags for building library objects.
16154 pic_flag=$lt_lt_prog_compiler_pic_F77
16155 pic_mode=$pic_mode
16156
16157 # What is the maximum length of a command?
16158 max_cmd_len=$lt_cv_sys_max_cmd_len
16159
16160 # Does compiler simultaneously support -c and -o options?
16161 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
16162
16163 # Must we lock files when doing compilation?
16164 need_locks=$lt_need_locks
16165
16166 # Do we need the lib prefix for modules?
16167 need_lib_prefix=$need_lib_prefix
16168
16169 # Do we need a version for libraries?
16170 need_version=$need_version
16171
16172 # Whether dlopen is supported.
16173 dlopen_support=$enable_dlopen
16174
16175 # Whether dlopen of programs is supported.
16176 dlopen_self=$enable_dlopen_self
16177
16178 # Whether dlopen of statically linked programs is supported.
16179 dlopen_self_static=$enable_dlopen_self_static
16180
16181 # Compiler flag to prevent dynamic linking.
16182 link_static_flag=$lt_lt_prog_compiler_static_F77
16183
16184 # Compiler flag to turn off builtin functions.
16185 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
16186
16187 # Compiler flag to allow reflexive dlopens.
16188 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
16189
16190 # Compiler flag to generate shared objects directly from archives.
16191 whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
16192
16193 # Compiler flag to generate thread-safe objects.
16194 thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
16195
16196 # Library versioning type.
16197 version_type=$version_type
16198
16199 # Format of library name prefix.
16200 libname_spec=$lt_libname_spec
16201
16202 # List of archive names. First name is the real one, the rest are links.
16203 # The last name is the one that the linker finds with -lNAME.
16204 library_names_spec=$lt_library_names_spec
16205
16206 # The coded name of the library, if different from the real name.
16207 soname_spec=$lt_soname_spec
16208
16209 # Commands used to build and install an old-style archive.
16210 RANLIB=$lt_RANLIB
16211 old_archive_cmds=$lt_old_archive_cmds_F77
16212 old_postinstall_cmds=$lt_old_postinstall_cmds
16213 old_postuninstall_cmds=$lt_old_postuninstall_cmds
16214
16215 # Create an old-style archive from a shared archive.
16216 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
16217
16218 # Create a temporary old-style archive to link instead of a shared archive.
16219 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
16220
16221 # Commands used to build and install a shared archive.
16222 archive_cmds=$lt_archive_cmds_F77
16223 archive_expsym_cmds=$lt_archive_expsym_cmds_F77
16224 postinstall_cmds=$lt_postinstall_cmds
16225 postuninstall_cmds=$lt_postuninstall_cmds
16226
16227 # Commands used to build a loadable module (assumed same as above if empty)
16228 module_cmds=$lt_module_cmds_F77
16229 module_expsym_cmds=$lt_module_expsym_cmds_F77
16230
16231 # Commands to strip libraries.
16232 old_striplib=$lt_old_striplib
16233 striplib=$lt_striplib
16234
16235 # Dependencies to place before the objects being linked to create a
16236 # shared library.
16237 predep_objects=$lt_predep_objects_F77
16238
16239 # Dependencies to place after the objects being linked to create a
16240 # shared library.
16241 postdep_objects=$lt_postdep_objects_F77
16242
16243 # Dependencies to place before the objects being linked to create a
16244 # shared library.
16245 predeps=$lt_predeps_F77
16246
16247 # Dependencies to place after the objects being linked to create a
16248 # shared library.
16249 postdeps=$lt_postdeps_F77
16250
16251 # The library search path used internally by the compiler when linking
16252 # a shared library.
16253 compiler_lib_search_path=$lt_compiler_lib_search_path_F77
16254
16255 # Method to check whether dependent libraries are shared objects.
16256 deplibs_check_method=$lt_deplibs_check_method
16257
16258 # Command to use when deplibs_check_method == file_magic.
16259 file_magic_cmd=$lt_file_magic_cmd
16260
16261 # Flag that allows shared libraries with undefined symbols to be built.
16262 allow_undefined_flag=$lt_allow_undefined_flag_F77
16263
16264 # Flag that forces no undefined symbols.
16265 no_undefined_flag=$lt_no_undefined_flag_F77
16266
16267 # Commands used to finish a libtool library installation in a directory.
16268 finish_cmds=$lt_finish_cmds
16269
16270 # Same as above, but a single script fragment to be evaled but not shown.
16271 finish_eval=$lt_finish_eval
16272
16273 # Take the output of nm and produce a listing of raw symbols and C names.
16274 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
16275
16276 # Transform the output of nm in a proper C declaration
16277 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
16278
16279 # Transform the output of nm in a C name address pair
16280 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
16281
16282 # This is the shared library runtime path variable.
16283 runpath_var=$runpath_var
16284
16285 # This is the shared library path variable.
16286 shlibpath_var=$shlibpath_var
16287
16288 # Is shlibpath searched before the hard-coded library search path?
16289 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
16290
16291 # How to hardcode a shared library path into an executable.
16292 hardcode_action=$hardcode_action_F77
16293
16294 # Whether we should hardcode library paths into libraries.
16295 hardcode_into_libs=$hardcode_into_libs
16296
16297 # Flag to hardcode \$libdir into a binary during linking.
16298 # This must work even if \$libdir does not exist.
16299 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
16300
16301 # If ld is used when linking, flag to hardcode \$libdir into
16302 # a binary during linking. This must work even if \$libdir does
16303 # not exist.
16304 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
16305
16306 # Whether we need a single -rpath flag with a separated argument.
16307 hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
16308
16309 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
16310 # resulting binary.
16311 hardcode_direct=$hardcode_direct_F77
16312
16313 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
16314 # resulting binary.
16315 hardcode_minus_L=$hardcode_minus_L_F77
16316
16317 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
16318 # the resulting binary.
16319 hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
16320
16321 # Set to yes if building a shared library automatically hardcodes DIR into the library
16322 # and all subsequent libraries and executables linked against it.
16323 hardcode_automatic=$hardcode_automatic_F77
16324
16325 # Variables whose values should be saved in libtool wrapper scripts and
16326 # restored at relink time.
16327 variables_saved_for_relink="$variables_saved_for_relink"
16328
16329 # Whether libtool must link a program against all its dependency libraries.
16330 link_all_deplibs=$link_all_deplibs_F77
16331
16332 # Compile-time system search path for libraries
16333 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
16334
16335 # Run-time system search path for libraries
16336 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
16337
16338 # Fix the shell variable \$srcfile for the compiler.
16339 fix_srcfile_path=$lt_fix_srcfile_path
16340
16341 # Set to yes if exported symbols are required.
16342 always_export_symbols=$always_export_symbols_F77
16343
16344 # The commands to list exported symbols.
16345 export_symbols_cmds=$lt_export_symbols_cmds_F77
16346
16347 # The commands to extract the exported symbol list from a shared archive.
16348 extract_expsyms_cmds=$lt_extract_expsyms_cmds
16349
16350 # Symbols that should not be listed in the preloaded symbols.
16351 exclude_expsyms=$lt_exclude_expsyms_F77
16352
16353 # Symbols that must always be exported.
16354 include_expsyms=$lt_include_expsyms_F77
16355
16356 # ### END LIBTOOL TAG CONFIG: $tagname
16357
16358 __EOF__
16359
16360
16361 else
16362 # If there is no Makefile yet, we rely on a make rule to execute
16363 # `config.status --recheck' to rerun these tests and create the
16364 # libtool script then.
16365 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
16366 if test -f "$ltmain_in"; then
16367 test -f Makefile && make "$ltmain"
16368 fi
16369 fi
16370
16371
16372 ac_ext=c
16373 ac_cpp='$CPP $CPPFLAGS'
16374 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16375 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16376 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16377
16378 CC="$lt_save_CC"
16379
16380 else
16381 tagname=""
16382 fi
16383 ;;
16384
16385 GCJ)
16386 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
16387
16388
16389 # Source file extension for Java test sources.
16390 ac_ext=java
16391
16392 # Object file extension for compiled Java test sources.
16393 objext=o
16394 objext_GCJ=$objext
16395
16396 # Code to be used in simple compile tests
16397 lt_simple_compile_test_code="class foo {}"
16398
16399 # Code to be used in simple link tests
16400 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
16401
16402 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
16403
16404 # If no C compiler was specified, use CC.
16405 LTCC=${LTCC-"$CC"}
16406
16407 # If no C compiler flags were specified, use CFLAGS.
16408 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
16409
16410 # Allow CC to be a program name with arguments.
16411 compiler=$CC
16412
16413
16414 # save warnings/boilerplate of simple test code
16415 ac_outfile=conftest.$ac_objext
16416 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
16417 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16418 _lt_compiler_boilerplate=`cat conftest.err`
16419 $rm conftest*
16420
16421 ac_outfile=conftest.$ac_objext
16422 echo "$lt_simple_link_test_code" >conftest.$ac_ext
16423 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
16424 _lt_linker_boilerplate=`cat conftest.err`
16425 $rm conftest*
16426
16427
16428 # Allow CC to be a program name with arguments.
16429 lt_save_CC="$CC"
16430 CC=${GCJ-"gcj"}
16431 compiler=$CC
16432 compiler_GCJ=$CC
16433 for cc_temp in $compiler""; do
16434 case $cc_temp in
16435 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
16436 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
16437 \-*) ;;
16438 *) break;;
16439 esac
16440 done
16441 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
16442
16443
16444 # GCJ did not exist at the time GCC didn't implicitly link libc in.
16445 archive_cmds_need_lc_GCJ=no
16446
16447 old_archive_cmds_GCJ=$old_archive_cmds
16448
16449
16450 lt_prog_compiler_no_builtin_flag_GCJ=
16451
16452 if test "$GCC" = yes; then
16453 lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
16454
16455
16456 { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
16457 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
16458 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
16459 echo $ECHO_N "(cached) $ECHO_C" >&6
16460 else
16461 lt_cv_prog_compiler_rtti_exceptions=no
16462 ac_outfile=conftest.$ac_objext
16463 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16464 lt_compiler_flag="-fno-rtti -fno-exceptions"
16465 # Insert the option either (1) after the last *FLAGS variable, or
16466 # (2) before a word containing "conftest.", or (3) at the end.
16467 # Note that $ac_compile itself does not contain backslashes and begins
16468 # with a dollar sign (not a hyphen), so the echo should work correctly.
16469 # The option is referenced via a variable to avoid confusing sed.
16470 lt_compile=`echo "$ac_compile" | $SED \
16471 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16472 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16473 -e 's:$: $lt_compiler_flag:'`
16474 (eval echo "\"\$as_me:16475: $lt_compile\"" >&5)
16475 (eval "$lt_compile" 2>conftest.err)
16476 ac_status=$?
16477 cat conftest.err >&5
16478 echo "$as_me:16479: \$? = $ac_status" >&5
16479 if (exit $ac_status) && test -s "$ac_outfile"; then
16480 # The compiler can only warn and ignore the option if not recognized
16481 # So say no if there are warnings other than the usual output.
16482 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16483 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16484 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16485 lt_cv_prog_compiler_rtti_exceptions=yes
16486 fi
16487 fi
16488 $rm conftest*
16489
16490 fi
16491 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
16492 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
16493
16494 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
16495 lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
16496 else
16497 :
16498 fi
16499
16500 fi
16501
16502 lt_prog_compiler_wl_GCJ=
16503 lt_prog_compiler_pic_GCJ=
16504 lt_prog_compiler_static_GCJ=
16505
16506 { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
16507 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
16508
16509 if test "$GCC" = yes; then
16510 lt_prog_compiler_wl_GCJ='-Wl,'
16511 lt_prog_compiler_static_GCJ='-static'
16512
16513 case $host_os in
16514 aix*)
16515 # All AIX code is PIC.
16516 if test "$host_cpu" = ia64; then
16517 # AIX 5 now supports IA64 processor
16518 lt_prog_compiler_static_GCJ='-Bstatic'
16519 fi
16520 ;;
16521
16522 amigaos*)
16523 # FIXME: we need at least 68020 code to build shared libraries, but
16524 # adding the `-m68020' flag to GCC prevents building anything better,
16525 # like `-m68040'.
16526 lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
16527 ;;
16528
16529 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
16530 # PIC is the default for these OSes.
16531 ;;
16532
16533 mingw* | cygwin* | pw32* | os2*)
16534 # This hack is so that the source file can tell whether it is being
16535 # built for inclusion in a dll (and should export symbols for example).
16536 # Although the cygwin gcc ignores -fPIC, still need this for old-style
16537 # (--disable-auto-import) libraries
16538 lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
16539 ;;
16540
16541 darwin* | rhapsody*)
16542 # PIC is the default on this platform
16543 # Common symbols not allowed in MH_DYLIB files
16544 lt_prog_compiler_pic_GCJ='-fno-common'
16545 ;;
16546
16547 interix[3-9]*)
16548 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
16549 # Instead, we relocate shared libraries at runtime.
16550 ;;
16551
16552 msdosdjgpp*)
16553 # Just because we use GCC doesn't mean we suddenly get shared libraries
16554 # on systems that don't support them.
16555 lt_prog_compiler_can_build_shared_GCJ=no
16556 enable_shared=no
16557 ;;
16558
16559 sysv4*MP*)
16560 if test -d /usr/nec; then
16561 lt_prog_compiler_pic_GCJ=-Kconform_pic
16562 fi
16563 ;;
16564
16565 hpux*)
16566 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16567 # not for PA HP-UX.
16568 case $host_cpu in
16569 hppa*64*|ia64*)
16570 # +Z the default
16571 ;;
16572 *)
16573 lt_prog_compiler_pic_GCJ='-fPIC'
16574 ;;
16575 esac
16576 ;;
16577
16578 *)
16579 lt_prog_compiler_pic_GCJ='-fPIC'
16580 ;;
16581 esac
16582 else
16583 # PORTME Check for flag to pass linker flags through the system compiler.
16584 case $host_os in
16585 aix*)
16586 lt_prog_compiler_wl_GCJ='-Wl,'
16587 if test "$host_cpu" = ia64; then
16588 # AIX 5 now supports IA64 processor
16589 lt_prog_compiler_static_GCJ='-Bstatic'
16590 else
16591 lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
16592 fi
16593 ;;
16594 darwin*)
16595 # PIC is the default on this platform
16596 # Common symbols not allowed in MH_DYLIB files
16597 case $cc_basename in
16598 xlc*)
16599 lt_prog_compiler_pic_GCJ='-qnocommon'
16600 lt_prog_compiler_wl_GCJ='-Wl,'
16601 ;;
16602 esac
16603 ;;
16604
16605 mingw* | cygwin* | pw32* | os2*)
16606 # This hack is so that the source file can tell whether it is being
16607 # built for inclusion in a dll (and should export symbols for example).
16608 lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
16609 ;;
16610
16611 hpux9* | hpux10* | hpux11*)
16612 lt_prog_compiler_wl_GCJ='-Wl,'
16613 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
16614 # not for PA HP-UX.
16615 case $host_cpu in
16616 hppa*64*|ia64*)
16617 # +Z the default
16618 ;;
16619 *)
16620 lt_prog_compiler_pic_GCJ='+Z'
16621 ;;
16622 esac
16623 # Is there a better lt_prog_compiler_static that works with the bundled CC?
16624 lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
16625 ;;
16626
16627 irix5* | irix6* | nonstopux*)
16628 lt_prog_compiler_wl_GCJ='-Wl,'
16629 # PIC (with -KPIC) is the default.
16630 lt_prog_compiler_static_GCJ='-non_shared'
16631 ;;
16632
16633 newsos6)
16634 lt_prog_compiler_pic_GCJ='-KPIC'
16635 lt_prog_compiler_static_GCJ='-Bstatic'
16636 ;;
16637
16638 linux* | k*bsd*-gnu)
16639 case $cc_basename in
16640 icc* | ecc*)
16641 lt_prog_compiler_wl_GCJ='-Wl,'
16642 lt_prog_compiler_pic_GCJ='-KPIC'
16643 lt_prog_compiler_static_GCJ='-static'
16644 ;;
16645 pgcc* | pgf77* | pgf90* | pgf95*)
16646 # Portland Group compilers (*not* the Pentium gcc compiler,
16647 # which looks to be a dead project)
16648 lt_prog_compiler_wl_GCJ='-Wl,'
16649 lt_prog_compiler_pic_GCJ='-fpic'
16650 lt_prog_compiler_static_GCJ='-Bstatic'
16651 ;;
16652 ccc*)
16653 lt_prog_compiler_wl_GCJ='-Wl,'
16654 # All Alpha code is PIC.
16655 lt_prog_compiler_static_GCJ='-non_shared'
16656 ;;
16657 *)
16658 case `$CC -V 2>&1 | sed 5q` in
16659 *Sun\ C*)
16660 # Sun C 5.9
16661 lt_prog_compiler_pic_GCJ='-KPIC'
16662 lt_prog_compiler_static_GCJ='-Bstatic'
16663 lt_prog_compiler_wl_GCJ='-Wl,'
16664 ;;
16665 *Sun\ F*)
16666 # Sun Fortran 8.3 passes all unrecognized flags to the linker
16667 lt_prog_compiler_pic_GCJ='-KPIC'
16668 lt_prog_compiler_static_GCJ='-Bstatic'
16669 lt_prog_compiler_wl_GCJ=''
16670 ;;
16671 esac
16672 ;;
16673 esac
16674 ;;
16675
16676 osf3* | osf4* | osf5*)
16677 lt_prog_compiler_wl_GCJ='-Wl,'
16678 # All OSF/1 code is PIC.
16679 lt_prog_compiler_static_GCJ='-non_shared'
16680 ;;
16681
16682 rdos*)
16683 lt_prog_compiler_static_GCJ='-non_shared'
16684 ;;
16685
16686 solaris*)
16687 lt_prog_compiler_pic_GCJ='-KPIC'
16688 lt_prog_compiler_static_GCJ='-Bstatic'
16689 case $cc_basename in
16690 f77* | f90* | f95*)
16691 lt_prog_compiler_wl_GCJ='-Qoption ld ';;
16692 *)
16693 lt_prog_compiler_wl_GCJ='-Wl,';;
16694 esac
16695 ;;
16696
16697 sunos4*)
16698 lt_prog_compiler_wl_GCJ='-Qoption ld '
16699 lt_prog_compiler_pic_GCJ='-PIC'
16700 lt_prog_compiler_static_GCJ='-Bstatic'
16701 ;;
16702
16703 sysv4 | sysv4.2uw2* | sysv4.3*)
16704 lt_prog_compiler_wl_GCJ='-Wl,'
16705 lt_prog_compiler_pic_GCJ='-KPIC'
16706 lt_prog_compiler_static_GCJ='-Bstatic'
16707 ;;
16708
16709 sysv4*MP*)
16710 if test -d /usr/nec ;then
16711 lt_prog_compiler_pic_GCJ='-Kconform_pic'
16712 lt_prog_compiler_static_GCJ='-Bstatic'
16713 fi
16714 ;;
16715
16716 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
16717 lt_prog_compiler_wl_GCJ='-Wl,'
16718 lt_prog_compiler_pic_GCJ='-KPIC'
16719 lt_prog_compiler_static_GCJ='-Bstatic'
16720 ;;
16721
16722 unicos*)
16723 lt_prog_compiler_wl_GCJ='-Wl,'
16724 lt_prog_compiler_can_build_shared_GCJ=no
16725 ;;
16726
16727 uts4*)
16728 lt_prog_compiler_pic_GCJ='-pic'
16729 lt_prog_compiler_static_GCJ='-Bstatic'
16730 ;;
16731
16732 *)
16733 lt_prog_compiler_can_build_shared_GCJ=no
16734 ;;
16735 esac
16736 fi
16737
16738 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
16739 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; }
16740
16741 #
16742 # Check to make sure the PIC flag actually works.
16743 #
16744 if test -n "$lt_prog_compiler_pic_GCJ"; then
16745
16746 { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
16747 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; }
16748 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
16749 echo $ECHO_N "(cached) $ECHO_C" >&6
16750 else
16751 lt_prog_compiler_pic_works_GCJ=no
16752 ac_outfile=conftest.$ac_objext
16753 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16754 lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
16755 # Insert the option either (1) after the last *FLAGS variable, or
16756 # (2) before a word containing "conftest.", or (3) at the end.
16757 # Note that $ac_compile itself does not contain backslashes and begins
16758 # with a dollar sign (not a hyphen), so the echo should work correctly.
16759 # The option is referenced via a variable to avoid confusing sed.
16760 lt_compile=`echo "$ac_compile" | $SED \
16761 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16762 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16763 -e 's:$: $lt_compiler_flag:'`
16764 (eval echo "\"\$as_me:16765: $lt_compile\"" >&5)
16765 (eval "$lt_compile" 2>conftest.err)
16766 ac_status=$?
16767 cat conftest.err >&5
16768 echo "$as_me:16769: \$? = $ac_status" >&5
16769 if (exit $ac_status) && test -s "$ac_outfile"; then
16770 # The compiler can only warn and ignore the option if not recognized
16771 # So say no if there are warnings other than the usual output.
16772 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
16773 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16774 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
16775 lt_prog_compiler_pic_works_GCJ=yes
16776 fi
16777 fi
16778 $rm conftest*
16779
16780 fi
16781 { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
16782 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; }
16783
16784 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
16785 case $lt_prog_compiler_pic_GCJ in
16786 "" | " "*) ;;
16787 *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
16788 esac
16789 else
16790 lt_prog_compiler_pic_GCJ=
16791 lt_prog_compiler_can_build_shared_GCJ=no
16792 fi
16793
16794 fi
16795 case $host_os in
16796 # For platforms which do not support PIC, -DPIC is meaningless:
16797 *djgpp*)
16798 lt_prog_compiler_pic_GCJ=
16799 ;;
16800 *)
16801 lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
16802 ;;
16803 esac
16804
16805 #
16806 # Check to make sure the static flag actually works.
16807 #
16808 wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
16809 { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
16810 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
16811 if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
16812 echo $ECHO_N "(cached) $ECHO_C" >&6
16813 else
16814 lt_prog_compiler_static_works_GCJ=no
16815 save_LDFLAGS="$LDFLAGS"
16816 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
16817 echo "$lt_simple_link_test_code" > conftest.$ac_ext
16818 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
16819 # The linker can only warn and ignore the option if not recognized
16820 # So say no if there are warnings
16821 if test -s conftest.err; then
16822 # Append any errors to the config.log.
16823 cat conftest.err 1>&5
16824 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
16825 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
16826 if diff conftest.exp conftest.er2 >/dev/null; then
16827 lt_prog_compiler_static_works_GCJ=yes
16828 fi
16829 else
16830 lt_prog_compiler_static_works_GCJ=yes
16831 fi
16832 fi
16833 $rm conftest*
16834 LDFLAGS="$save_LDFLAGS"
16835
16836 fi
16837 { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
16838 echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; }
16839
16840 if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
16841 :
16842 else
16843 lt_prog_compiler_static_GCJ=
16844 fi
16845
16846
16847 { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
16848 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
16849 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
16850 echo $ECHO_N "(cached) $ECHO_C" >&6
16851 else
16852 lt_cv_prog_compiler_c_o_GCJ=no
16853 $rm -r conftest 2>/dev/null
16854 mkdir conftest
16855 cd conftest
16856 mkdir out
16857 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
16858
16859 lt_compiler_flag="-o out/conftest2.$ac_objext"
16860 # Insert the option either (1) after the last *FLAGS variable, or
16861 # (2) before a word containing "conftest.", or (3) at the end.
16862 # Note that $ac_compile itself does not contain backslashes and begins
16863 # with a dollar sign (not a hyphen), so the echo should work correctly.
16864 lt_compile=`echo "$ac_compile" | $SED \
16865 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
16866 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
16867 -e 's:$: $lt_compiler_flag:'`
16868 (eval echo "\"\$as_me:16869: $lt_compile\"" >&5)
16869 (eval "$lt_compile" 2>out/conftest.err)
16870 ac_status=$?
16871 cat out/conftest.err >&5
16872 echo "$as_me:16873: \$? = $ac_status" >&5
16873 if (exit $ac_status) && test -s out/conftest2.$ac_objext
16874 then
16875 # The compiler can only warn and ignore the option if not recognized
16876 # So say no if there are warnings
16877 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
16878 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
16879 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
16880 lt_cv_prog_compiler_c_o_GCJ=yes
16881 fi
16882 fi
16883 chmod u+w . 2>&5
16884 $rm conftest*
16885 # SGI C++ compiler will create directory out/ii_files/ for
16886 # template instantiation
16887 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
16888 $rm out/* && rmdir out
16889 cd ..
16890 rmdir conftest
16891 $rm conftest*
16892
16893 fi
16894 { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
16895 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; }
16896
16897
16898 hard_links="nottested"
16899 if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
16900 # do not overwrite the value of need_locks provided by the user
16901 { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
16902 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
16903 hard_links=yes
16904 $rm conftest*
16905 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16906 touch conftest.a
16907 ln conftest.a conftest.b 2>&5 || hard_links=no
16908 ln conftest.a conftest.b 2>/dev/null && hard_links=no
16909 { echo "$as_me:$LINENO: result: $hard_links" >&5
16910 echo "${ECHO_T}$hard_links" >&6; }
16911 if test "$hard_links" = no; then
16912 { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
16913 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
16914 need_locks=warn
16915 fi
16916 else
16917 need_locks=no
16918 fi
16919
16920 { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
16921 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
16922
16923 runpath_var=
16924 allow_undefined_flag_GCJ=
16925 enable_shared_with_static_runtimes_GCJ=no
16926 archive_cmds_GCJ=
16927 archive_expsym_cmds_GCJ=
16928 old_archive_From_new_cmds_GCJ=
16929 old_archive_from_expsyms_cmds_GCJ=
16930 export_dynamic_flag_spec_GCJ=
16931 whole_archive_flag_spec_GCJ=
16932 thread_safe_flag_spec_GCJ=
16933 hardcode_libdir_flag_spec_GCJ=
16934 hardcode_libdir_flag_spec_ld_GCJ=
16935 hardcode_libdir_separator_GCJ=
16936 hardcode_direct_GCJ=no
16937 hardcode_minus_L_GCJ=no
16938 hardcode_shlibpath_var_GCJ=unsupported
16939 link_all_deplibs_GCJ=unknown
16940 hardcode_automatic_GCJ=no
16941 module_cmds_GCJ=
16942 module_expsym_cmds_GCJ=
16943 always_export_symbols_GCJ=no
16944 export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
16945 # include_expsyms should be a list of space-separated symbols to be *always*
16946 # included in the symbol list
16947 include_expsyms_GCJ=
16948 # exclude_expsyms can be an extended regexp of symbols to exclude
16949 # it will be wrapped by ` (' and `)$', so one must not match beginning or
16950 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
16951 # as well as any symbol that contains `d'.
16952 exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
16953 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
16954 # platforms (ab)use it in PIC code, but their linkers get confused if
16955 # the symbol is explicitly referenced. Since portable code cannot
16956 # rely on this symbol name, it's probably fine to never include it in
16957 # preloaded symbol tables.
16958 extract_expsyms_cmds=
16959 # Just being paranoid about ensuring that cc_basename is set.
16960 for cc_temp in $compiler""; do
16961 case $cc_temp in
16962 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
16963 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
16964 \-*) ;;
16965 *) break;;
16966 esac
16967 done
16968 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
16969
16970 case $host_os in
16971 cygwin* | mingw* | pw32*)
16972 # FIXME: the MSVC++ port hasn't been tested in a loooong time
16973 # When not using gcc, we currently assume that we are using
16974 # Microsoft Visual C++.
16975 if test "$GCC" != yes; then
16976 with_gnu_ld=no
16977 fi
16978 ;;
16979 interix*)
16980 # we just hope/assume this is gcc and not c89 (= MSVC++)
16981 with_gnu_ld=yes
16982 ;;
16983 openbsd*)
16984 with_gnu_ld=no
16985 ;;
16986 esac
16987
16988 ld_shlibs_GCJ=yes
16989 if test "$with_gnu_ld" = yes; then
16990 # If archive_cmds runs LD, not CC, wlarc should be empty
16991 wlarc='${wl}'
16992
16993 # Set some defaults for GNU ld with shared library support. These
16994 # are reset later if shared libraries are not supported. Putting them
16995 # here allows them to be overridden if necessary.
16996 runpath_var=LD_RUN_PATH
16997 hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
16998 export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
16999 # ancient GNU ld didn't support --whole-archive et. al.
17000 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
17001 whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
17002 else
17003 whole_archive_flag_spec_GCJ=
17004 fi
17005 supports_anon_versioning=no
17006 case `$LD -v 2>/dev/null` in
17007 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
17008 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
17009 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
17010 *\ 2.11.*) ;; # other 2.11 versions
17011 *) supports_anon_versioning=yes ;;
17012 esac
17013
17014 # See if GNU ld supports shared libraries.
17015 case $host_os in
17016 aix3* | aix4* | aix5*)
17017 # On AIX/PPC, the GNU linker is very broken
17018 if test "$host_cpu" != ia64; then
17019 ld_shlibs_GCJ=no
17020 cat <<EOF 1>&2
17021
17022 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
17023 *** to be unable to reliably create shared libraries on AIX.
17024 *** Therefore, libtool is disabling shared libraries support. If you
17025 *** really care for shared libraries, you may want to modify your PATH
17026 *** so that a non-GNU linker is found, and then restart.
17027
17028 EOF
17029 fi
17030 ;;
17031
17032 amigaos*)
17033 archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
17034 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17035 hardcode_minus_L_GCJ=yes
17036
17037 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
17038 # that the semantics of dynamic libraries on AmigaOS, at least up
17039 # to version 4, is to share data among multiple programs linked
17040 # with the same dynamic library. Since this doesn't match the
17041 # behavior of shared libraries on other platforms, we can't use
17042 # them.
17043 ld_shlibs_GCJ=no
17044 ;;
17045
17046 beos*)
17047 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
17048 allow_undefined_flag_GCJ=unsupported
17049 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
17050 # support --undefined. This deserves some investigation. FIXME
17051 archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17052 else
17053 ld_shlibs_GCJ=no
17054 fi
17055 ;;
17056
17057 cygwin* | mingw* | pw32*)
17058 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
17059 # as there is no search path for DLLs.
17060 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17061 allow_undefined_flag_GCJ=unsupported
17062 always_export_symbols_GCJ=no
17063 enable_shared_with_static_runtimes_GCJ=yes
17064 export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
17065
17066 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
17067 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17068 # If the export-symbols file already is a .def file (1st line
17069 # is EXPORTS), use it as is; otherwise, prepend...
17070 archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
17071 cp $export_symbols $output_objdir/$soname.def;
17072 else
17073 echo EXPORTS > $output_objdir/$soname.def;
17074 cat $export_symbols >> $output_objdir/$soname.def;
17075 fi~
17076 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
17077 else
17078 ld_shlibs_GCJ=no
17079 fi
17080 ;;
17081
17082 interix[3-9]*)
17083 hardcode_direct_GCJ=no
17084 hardcode_shlibpath_var_GCJ=no
17085 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
17086 export_dynamic_flag_spec_GCJ='${wl}-E'
17087 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
17088 # Instead, shared libraries are loaded at an image base (0x10000000 by
17089 # default) and relocated if they conflict, which is a slow very memory
17090 # consuming and fragmenting process. To avoid this, we pick a random,
17091 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
17092 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
17093 archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
17094 archive_expsym_cmds_GCJ='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'
17095 ;;
17096
17097 gnu* | linux* | k*bsd*-gnu)
17098 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
17099 tmp_addflag=
17100 case $cc_basename,$host_cpu in
17101 pgcc*) # Portland Group C compiler
17102 whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
17103 tmp_addflag=' $pic_flag'
17104 ;;
17105 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
17106 whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
17107 tmp_addflag=' $pic_flag -Mnomain' ;;
17108 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
17109 tmp_addflag=' -i_dynamic' ;;
17110 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
17111 tmp_addflag=' -i_dynamic -nofor_main' ;;
17112 ifc* | ifort*) # Intel Fortran compiler
17113 tmp_addflag=' -nofor_main' ;;
17114 esac
17115 case `$CC -V 2>&1 | sed 5q` in
17116 *Sun\ C*) # Sun C 5.9
17117 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
17118 tmp_sharedflag='-G' ;;
17119 *Sun\ F*) # Sun Fortran 8.3
17120 tmp_sharedflag='-G' ;;
17121 *)
17122 tmp_sharedflag='-shared' ;;
17123 esac
17124 archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17125
17126 if test $supports_anon_versioning = yes; then
17127 archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
17128 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
17129 $echo "local: *; };" >> $output_objdir/$libname.ver~
17130 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
17131 fi
17132 else
17133 ld_shlibs_GCJ=no
17134 fi
17135 ;;
17136
17137 netbsd*)
17138 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
17139 archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
17140 wlarc=
17141 else
17142 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17143 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17144 fi
17145 ;;
17146
17147 solaris*)
17148 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
17149 ld_shlibs_GCJ=no
17150 cat <<EOF 1>&2
17151
17152 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
17153 *** create shared libraries on Solaris systems. Therefore, libtool
17154 *** is disabling shared libraries support. We urge you to upgrade GNU
17155 *** binutils to release 2.9.1 or newer. Another option is to modify
17156 *** your PATH or compiler configuration so that the native linker is
17157 *** used, and then restart.
17158
17159 EOF
17160 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
17161 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17162 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17163 else
17164 ld_shlibs_GCJ=no
17165 fi
17166 ;;
17167
17168 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
17169 case `$LD -v 2>&1` in
17170 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
17171 ld_shlibs_GCJ=no
17172 cat <<_LT_EOF 1>&2
17173
17174 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
17175 *** reliably create shared libraries on SCO systems. Therefore, libtool
17176 *** is disabling shared libraries support. We urge you to upgrade GNU
17177 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
17178 *** your PATH or compiler configuration so that the native linker is
17179 *** used, and then restart.
17180
17181 _LT_EOF
17182 ;;
17183 *)
17184 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
17185 hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
17186 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
17187 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
17188 else
17189 ld_shlibs_GCJ=no
17190 fi
17191 ;;
17192 esac
17193 ;;
17194
17195 sunos4*)
17196 archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17197 wlarc=
17198 hardcode_direct_GCJ=yes
17199 hardcode_shlibpath_var_GCJ=no
17200 ;;
17201
17202 *)
17203 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
17204 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
17205 archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
17206 else
17207 ld_shlibs_GCJ=no
17208 fi
17209 ;;
17210 esac
17211
17212 if test "$ld_shlibs_GCJ" = no; then
17213 runpath_var=
17214 hardcode_libdir_flag_spec_GCJ=
17215 export_dynamic_flag_spec_GCJ=
17216 whole_archive_flag_spec_GCJ=
17217 fi
17218 else
17219 # PORTME fill in a description of your system's linker (not GNU ld)
17220 case $host_os in
17221 aix3*)
17222 allow_undefined_flag_GCJ=unsupported
17223 always_export_symbols_GCJ=yes
17224 archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
17225 # Note: this linker hardcodes the directories in LIBPATH if there
17226 # are no directories specified by -L.
17227 hardcode_minus_L_GCJ=yes
17228 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
17229 # Neither direct hardcoding nor static linking is supported with a
17230 # broken collect2.
17231 hardcode_direct_GCJ=unsupported
17232 fi
17233 ;;
17234
17235 aix4* | aix5*)
17236 if test "$host_cpu" = ia64; then
17237 # On IA64, the linker does run time linking by default, so we don't
17238 # have to do anything special.
17239 aix_use_runtimelinking=no
17240 exp_sym_flag='-Bexport'
17241 no_entry_flag=""
17242 else
17243 # If we're using GNU nm, then we don't want the "-C" option.
17244 # -C means demangle to AIX nm, but means don't demangle with GNU nm
17245 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
17246 export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
17247 else
17248 export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
17249 fi
17250 aix_use_runtimelinking=no
17251
17252 # Test if we are trying to use run time linking or normal
17253 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
17254 # need to do runtime linking.
17255 case $host_os in aix4.[23]|aix4.[23].*|aix5*)
17256 for ld_flag in $LDFLAGS; do
17257 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
17258 aix_use_runtimelinking=yes
17259 break
17260 fi
17261 done
17262 ;;
17263 esac
17264
17265 exp_sym_flag='-bexport'
17266 no_entry_flag='-bnoentry'
17267 fi
17268
17269 # When large executables or shared objects are built, AIX ld can
17270 # have problems creating the table of contents. If linking a library
17271 # or program results in "error TOC overflow" add -mminimal-toc to
17272 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
17273 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
17274
17275 archive_cmds_GCJ=''
17276 hardcode_direct_GCJ=yes
17277 hardcode_libdir_separator_GCJ=':'
17278 link_all_deplibs_GCJ=yes
17279
17280 if test "$GCC" = yes; then
17281 case $host_os in aix4.[012]|aix4.[012].*)
17282 # We only want to do this on AIX 4.2 and lower, the check
17283 # below for broken collect2 doesn't work under 4.3+
17284 collect2name=`${CC} -print-prog-name=collect2`
17285 if test -f "$collect2name" && \
17286 strings "$collect2name" | grep resolve_lib_name >/dev/null
17287 then
17288 # We have reworked collect2
17289 :
17290 else
17291 # We have old collect2
17292 hardcode_direct_GCJ=unsupported
17293 # It fails to find uninstalled libraries when the uninstalled
17294 # path is not listed in the libpath. Setting hardcode_minus_L
17295 # to unsupported forces relinking
17296 hardcode_minus_L_GCJ=yes
17297 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17298 hardcode_libdir_separator_GCJ=
17299 fi
17300 ;;
17301 esac
17302 shared_flag='-shared'
17303 if test "$aix_use_runtimelinking" = yes; then
17304 shared_flag="$shared_flag "'${wl}-G'
17305 fi
17306 else
17307 # not using gcc
17308 if test "$host_cpu" = ia64; then
17309 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
17310 # chokes on -Wl,-G. The following line is correct:
17311 shared_flag='-G'
17312 else
17313 if test "$aix_use_runtimelinking" = yes; then
17314 shared_flag='${wl}-G'
17315 else
17316 shared_flag='${wl}-bM:SRE'
17317 fi
17318 fi
17319 fi
17320
17321 # It seems that -bexpall does not export symbols beginning with
17322 # underscore (_), so it is better to generate a list of symbols to export.
17323 always_export_symbols_GCJ=yes
17324 if test "$aix_use_runtimelinking" = yes; then
17325 # Warning - without using the other runtime loading flags (-brtl),
17326 # -berok will link without error, but may produce a broken library.
17327 allow_undefined_flag_GCJ='-berok'
17328 # Determine the default libpath from the value encoded in an empty executable.
17329 cat >conftest.$ac_ext <<_ACEOF
17330 /* confdefs.h. */
17331 _ACEOF
17332 cat confdefs.h >>conftest.$ac_ext
17333 cat >>conftest.$ac_ext <<_ACEOF
17334 /* end confdefs.h. */
17335
17336 int
17337 main ()
17338 {
17339
17340 ;
17341 return 0;
17342 }
17343 _ACEOF
17344 rm -f conftest.$ac_objext conftest$ac_exeext
17345 if { (ac_try="$ac_link"
17346 case "(($ac_try" in
17347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17348 *) ac_try_echo=$ac_try;;
17349 esac
17350 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17351 (eval "$ac_link") 2>conftest.er1
17352 ac_status=$?
17353 grep -v '^ *+' conftest.er1 >conftest.err
17354 rm -f conftest.er1
17355 cat conftest.err >&5
17356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17357 (exit $ac_status); } && {
17358 test -z "$ac_c_werror_flag" ||
17359 test ! -s conftest.err
17360 } && test -s conftest$ac_exeext &&
17361 $as_test_x conftest$ac_exeext; then
17362
17363 lt_aix_libpath_sed='
17364 /Import File Strings/,/^$/ {
17365 /^0/ {
17366 s/^0 *\(.*\)$/\1/
17367 p
17368 }
17369 }'
17370 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17371 # Check for a 64-bit object if we didn't find anything.
17372 if test -z "$aix_libpath"; then
17373 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17374 fi
17375 else
17376 echo "$as_me: failed program was:" >&5
17377 sed 's/^/| /' conftest.$ac_ext >&5
17378
17379
17380 fi
17381
17382 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17383 conftest$ac_exeext conftest.$ac_ext
17384 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17385
17386 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
17387 archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
17388 else
17389 if test "$host_cpu" = ia64; then
17390 hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
17391 allow_undefined_flag_GCJ="-z nodefs"
17392 archive_expsym_cmds_GCJ="\$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"
17393 else
17394 # Determine the default libpath from the value encoded in an empty executable.
17395 cat >conftest.$ac_ext <<_ACEOF
17396 /* confdefs.h. */
17397 _ACEOF
17398 cat confdefs.h >>conftest.$ac_ext
17399 cat >>conftest.$ac_ext <<_ACEOF
17400 /* end confdefs.h. */
17401
17402 int
17403 main ()
17404 {
17405
17406 ;
17407 return 0;
17408 }
17409 _ACEOF
17410 rm -f conftest.$ac_objext conftest$ac_exeext
17411 if { (ac_try="$ac_link"
17412 case "(($ac_try" in
17413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17414 *) ac_try_echo=$ac_try;;
17415 esac
17416 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17417 (eval "$ac_link") 2>conftest.er1
17418 ac_status=$?
17419 grep -v '^ *+' conftest.er1 >conftest.err
17420 rm -f conftest.er1
17421 cat conftest.err >&5
17422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17423 (exit $ac_status); } && {
17424 test -z "$ac_c_werror_flag" ||
17425 test ! -s conftest.err
17426 } && test -s conftest$ac_exeext &&
17427 $as_test_x conftest$ac_exeext; then
17428
17429 lt_aix_libpath_sed='
17430 /Import File Strings/,/^$/ {
17431 /^0/ {
17432 s/^0 *\(.*\)$/\1/
17433 p
17434 }
17435 }'
17436 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17437 # Check for a 64-bit object if we didn't find anything.
17438 if test -z "$aix_libpath"; then
17439 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
17440 fi
17441 else
17442 echo "$as_me: failed program was:" >&5
17443 sed 's/^/| /' conftest.$ac_ext >&5
17444
17445
17446 fi
17447
17448 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17449 conftest$ac_exeext conftest.$ac_ext
17450 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
17451
17452 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
17453 # Warning - without using the other run time loading flags,
17454 # -berok will link without error, but may produce a broken library.
17455 no_undefined_flag_GCJ=' ${wl}-bernotok'
17456 allow_undefined_flag_GCJ=' ${wl}-berok'
17457 # Exported symbols can be pulled into shared objects from archives
17458 whole_archive_flag_spec_GCJ='$convenience'
17459 archive_cmds_need_lc_GCJ=yes
17460 # This is similar to how AIX traditionally builds its shared libraries.
17461 archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
17462 fi
17463 fi
17464 ;;
17465
17466 amigaos*)
17467 archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
17468 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17469 hardcode_minus_L_GCJ=yes
17470 # see comment about different semantics on the GNU ld section
17471 ld_shlibs_GCJ=no
17472 ;;
17473
17474 bsdi[45]*)
17475 export_dynamic_flag_spec_GCJ=-rdynamic
17476 ;;
17477
17478 cygwin* | mingw* | pw32*)
17479 # When not using gcc, we currently assume that we are using
17480 # Microsoft Visual C++.
17481 # hardcode_libdir_flag_spec is actually meaningless, as there is
17482 # no search path for DLLs.
17483 hardcode_libdir_flag_spec_GCJ=' '
17484 allow_undefined_flag_GCJ=unsupported
17485 # Tell ltmain to make .lib files, not .a files.
17486 libext=lib
17487 # Tell ltmain to make .dll files, not .so files.
17488 shrext_cmds=".dll"
17489 # FIXME: Setting linknames here is a bad hack.
17490 archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
17491 # The linker will automatically build a .lib file if we build a DLL.
17492 old_archive_From_new_cmds_GCJ='true'
17493 # FIXME: Should let the user specify the lib program.
17494 old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs'
17495 fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
17496 enable_shared_with_static_runtimes_GCJ=yes
17497 ;;
17498
17499 darwin* | rhapsody*)
17500 case $host_os in
17501 rhapsody* | darwin1.[012])
17502 allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
17503 ;;
17504 *) # Darwin 1.3 on
17505 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
17506 allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17507 else
17508 case ${MACOSX_DEPLOYMENT_TARGET} in
17509 10.[012])
17510 allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
17511 ;;
17512 10.*)
17513 allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
17514 ;;
17515 esac
17516 fi
17517 ;;
17518 esac
17519 archive_cmds_need_lc_GCJ=no
17520 hardcode_direct_GCJ=no
17521 hardcode_automatic_GCJ=yes
17522 hardcode_shlibpath_var_GCJ=unsupported
17523 whole_archive_flag_spec_GCJ=''
17524 link_all_deplibs_GCJ=yes
17525 if test "$GCC" = yes ; then
17526 output_verbose_link_cmd='echo'
17527 archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
17528 module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17529 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
17530 archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17531 module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17532 else
17533 case $cc_basename in
17534 xlc*)
17535 output_verbose_link_cmd='echo'
17536 archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
17537 module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
17538 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
17539 archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17540 module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
17541 ;;
17542 *)
17543 ld_shlibs_GCJ=no
17544 ;;
17545 esac
17546 fi
17547 ;;
17548
17549 dgux*)
17550 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17551 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17552 hardcode_shlibpath_var_GCJ=no
17553 ;;
17554
17555 freebsd1*)
17556 ld_shlibs_GCJ=no
17557 ;;
17558
17559 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
17560 # support. Future versions do this automatically, but an explicit c++rt0.o
17561 # does not break anything, and helps significantly (at the cost of a little
17562 # extra space).
17563 freebsd2.2*)
17564 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
17565 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17566 hardcode_direct_GCJ=yes
17567 hardcode_shlibpath_var_GCJ=no
17568 ;;
17569
17570 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
17571 freebsd2*)
17572 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17573 hardcode_direct_GCJ=yes
17574 hardcode_minus_L_GCJ=yes
17575 hardcode_shlibpath_var_GCJ=no
17576 ;;
17577
17578 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
17579 freebsd* | dragonfly*)
17580 archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
17581 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17582 hardcode_direct_GCJ=yes
17583 hardcode_shlibpath_var_GCJ=no
17584 ;;
17585
17586 hpux9*)
17587 if test "$GCC" = yes; then
17588 archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
17589 else
17590 archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
17591 fi
17592 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17593 hardcode_libdir_separator_GCJ=:
17594 hardcode_direct_GCJ=yes
17595
17596 # hardcode_minus_L: Not really in the search PATH,
17597 # but as the default location of the library.
17598 hardcode_minus_L_GCJ=yes
17599 export_dynamic_flag_spec_GCJ='${wl}-E'
17600 ;;
17601
17602 hpux10*)
17603 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17604 archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17605 else
17606 archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
17607 fi
17608 if test "$with_gnu_ld" = no; then
17609 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17610 hardcode_libdir_separator_GCJ=:
17611
17612 hardcode_direct_GCJ=yes
17613 export_dynamic_flag_spec_GCJ='${wl}-E'
17614
17615 # hardcode_minus_L: Not really in the search PATH,
17616 # but as the default location of the library.
17617 hardcode_minus_L_GCJ=yes
17618 fi
17619 ;;
17620
17621 hpux11*)
17622 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
17623 case $host_cpu in
17624 hppa*64*)
17625 archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17626 ;;
17627 ia64*)
17628 archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17629 ;;
17630 *)
17631 archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17632 ;;
17633 esac
17634 else
17635 case $host_cpu in
17636 hppa*64*)
17637 archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17638 ;;
17639 ia64*)
17640 archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
17641 ;;
17642 *)
17643 archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
17644 ;;
17645 esac
17646 fi
17647 if test "$with_gnu_ld" = no; then
17648 hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
17649 hardcode_libdir_separator_GCJ=:
17650
17651 case $host_cpu in
17652 hppa*64*|ia64*)
17653 hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
17654 hardcode_direct_GCJ=no
17655 hardcode_shlibpath_var_GCJ=no
17656 ;;
17657 *)
17658 hardcode_direct_GCJ=yes
17659 export_dynamic_flag_spec_GCJ='${wl}-E'
17660
17661 # hardcode_minus_L: Not really in the search PATH,
17662 # but as the default location of the library.
17663 hardcode_minus_L_GCJ=yes
17664 ;;
17665 esac
17666 fi
17667 ;;
17668
17669 irix5* | irix6* | nonstopux*)
17670 if test "$GCC" = yes; then
17671 archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17672 else
17673 archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
17674 hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
17675 fi
17676 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17677 hardcode_libdir_separator_GCJ=:
17678 link_all_deplibs_GCJ=yes
17679 ;;
17680
17681 netbsd*)
17682 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
17683 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
17684 else
17685 archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
17686 fi
17687 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17688 hardcode_direct_GCJ=yes
17689 hardcode_shlibpath_var_GCJ=no
17690 ;;
17691
17692 newsos6)
17693 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17694 hardcode_direct_GCJ=yes
17695 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17696 hardcode_libdir_separator_GCJ=:
17697 hardcode_shlibpath_var_GCJ=no
17698 ;;
17699
17700 openbsd*)
17701 if test -f /usr/libexec/ld.so; then
17702 hardcode_direct_GCJ=yes
17703 hardcode_shlibpath_var_GCJ=no
17704 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
17705 archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17706 archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
17707 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
17708 export_dynamic_flag_spec_GCJ='${wl}-E'
17709 else
17710 case $host_os in
17711 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
17712 archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
17713 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17714 ;;
17715 *)
17716 archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
17717 hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
17718 ;;
17719 esac
17720 fi
17721 else
17722 ld_shlibs_GCJ=no
17723 fi
17724 ;;
17725
17726 os2*)
17727 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17728 hardcode_minus_L_GCJ=yes
17729 allow_undefined_flag_GCJ=unsupported
17730 archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
17731 old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
17732 ;;
17733
17734 osf3*)
17735 if test "$GCC" = yes; then
17736 allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
17737 archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17738 else
17739 allow_undefined_flag_GCJ=' -expect_unresolved \*'
17740 archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
17741 fi
17742 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17743 hardcode_libdir_separator_GCJ=:
17744 ;;
17745
17746 osf4* | osf5*) # as osf3* with the addition of -msym flag
17747 if test "$GCC" = yes; then
17748 allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
17749 archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
17750 hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
17751 else
17752 allow_undefined_flag_GCJ=' -expect_unresolved \*'
17753 archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
17754 archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
17755 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
17756
17757 # Both c and cxx compiler support -rpath directly
17758 hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
17759 fi
17760 hardcode_libdir_separator_GCJ=:
17761 ;;
17762
17763 solaris*)
17764 no_undefined_flag_GCJ=' -z text'
17765 if test "$GCC" = yes; then
17766 wlarc='${wl}'
17767 archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
17768 archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
17769 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
17770 else
17771 wlarc=''
17772 archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
17773 archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
17774 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
17775 fi
17776 hardcode_libdir_flag_spec_GCJ='-R$libdir'
17777 hardcode_shlibpath_var_GCJ=no
17778 case $host_os in
17779 solaris2.[0-5] | solaris2.[0-5].*) ;;
17780 *)
17781 # The compiler driver will combine and reorder linker options,
17782 # but understands `-z linker_flag'. GCC discards it without `$wl',
17783 # but is careful enough not to reorder.
17784 # Supported since Solaris 2.6 (maybe 2.5.1?)
17785 if test "$GCC" = yes; then
17786 whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
17787 else
17788 whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract'
17789 fi
17790 ;;
17791 esac
17792 link_all_deplibs_GCJ=yes
17793 ;;
17794
17795 sunos4*)
17796 if test "x$host_vendor" = xsequent; then
17797 # Use $CC to link under sequent, because it throws in some extra .o
17798 # files that make .init and .fini sections work.
17799 archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
17800 else
17801 archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
17802 fi
17803 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17804 hardcode_direct_GCJ=yes
17805 hardcode_minus_L_GCJ=yes
17806 hardcode_shlibpath_var_GCJ=no
17807 ;;
17808
17809 sysv4)
17810 case $host_vendor in
17811 sni)
17812 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17813 hardcode_direct_GCJ=yes # is this really true???
17814 ;;
17815 siemens)
17816 ## LD is ld it makes a PLAMLIB
17817 ## CC just makes a GrossModule.
17818 archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
17819 reload_cmds_GCJ='$CC -r -o $output$reload_objs'
17820 hardcode_direct_GCJ=no
17821 ;;
17822 motorola)
17823 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17824 hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
17825 ;;
17826 esac
17827 runpath_var='LD_RUN_PATH'
17828 hardcode_shlibpath_var_GCJ=no
17829 ;;
17830
17831 sysv4.3*)
17832 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17833 hardcode_shlibpath_var_GCJ=no
17834 export_dynamic_flag_spec_GCJ='-Bexport'
17835 ;;
17836
17837 sysv4*MP*)
17838 if test -d /usr/nec; then
17839 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17840 hardcode_shlibpath_var_GCJ=no
17841 runpath_var=LD_RUN_PATH
17842 hardcode_runpath_var=yes
17843 ld_shlibs_GCJ=yes
17844 fi
17845 ;;
17846
17847 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
17848 no_undefined_flag_GCJ='${wl}-z,text'
17849 archive_cmds_need_lc_GCJ=no
17850 hardcode_shlibpath_var_GCJ=no
17851 runpath_var='LD_RUN_PATH'
17852
17853 if test "$GCC" = yes; then
17854 archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17855 archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17856 else
17857 archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17858 archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
17859 fi
17860 ;;
17861
17862 sysv5* | sco3.2v5* | sco5v6*)
17863 # Note: We can NOT use -z defs as we might desire, because we do not
17864 # link with -lc, and that would cause any symbols used from libc to
17865 # always be unresolved, which means just about no library would
17866 # ever link correctly. If we're not using GNU ld we use -z text
17867 # though, which does catch some bad symbols but isn't as heavy-handed
17868 # as -z defs.
17869 no_undefined_flag_GCJ='${wl}-z,text'
17870 allow_undefined_flag_GCJ='${wl}-z,nodefs'
17871 archive_cmds_need_lc_GCJ=no
17872 hardcode_shlibpath_var_GCJ=no
17873 hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
17874 hardcode_libdir_separator_GCJ=':'
17875 link_all_deplibs_GCJ=yes
17876 export_dynamic_flag_spec_GCJ='${wl}-Bexport'
17877 runpath_var='LD_RUN_PATH'
17878
17879 if test "$GCC" = yes; then
17880 archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
17881 archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
17882 else
17883 archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
17884 archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
17885 fi
17886 ;;
17887
17888 uts4*)
17889 archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
17890 hardcode_libdir_flag_spec_GCJ='-L$libdir'
17891 hardcode_shlibpath_var_GCJ=no
17892 ;;
17893
17894 *)
17895 ld_shlibs_GCJ=no
17896 ;;
17897 esac
17898 fi
17899
17900 { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
17901 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; }
17902 test "$ld_shlibs_GCJ" = no && can_build_shared=no
17903
17904 #
17905 # Do we need to explicitly link libc?
17906 #
17907 case "x$archive_cmds_need_lc_GCJ" in
17908 x|xyes)
17909 # Assume -lc should be added
17910 archive_cmds_need_lc_GCJ=yes
17911
17912 if test "$enable_shared" = yes && test "$GCC" = yes; then
17913 case $archive_cmds_GCJ in
17914 *'~'*)
17915 # FIXME: we may have to deal with multi-command sequences.
17916 ;;
17917 '$CC '*)
17918 # Test whether the compiler implicitly links with -lc since on some
17919 # systems, -lgcc has to come before -lc. If gcc already passes -lc
17920 # to ld, don't add -lc before -lgcc.
17921 { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
17922 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
17923 $rm conftest*
17924 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
17925
17926 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17927 (eval $ac_compile) 2>&5
17928 ac_status=$?
17929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17930 (exit $ac_status); } 2>conftest.err; then
17931 soname=conftest
17932 lib=conftest
17933 libobjs=conftest.$ac_objext
17934 deplibs=
17935 wl=$lt_prog_compiler_wl_GCJ
17936 pic_flag=$lt_prog_compiler_pic_GCJ
17937 compiler_flags=-v
17938 linker_flags=-v
17939 verstring=
17940 output_objdir=.
17941 libname=conftest
17942 lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
17943 allow_undefined_flag_GCJ=
17944 if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
17945 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
17946 ac_status=$?
17947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17948 (exit $ac_status); }
17949 then
17950 archive_cmds_need_lc_GCJ=no
17951 else
17952 archive_cmds_need_lc_GCJ=yes
17953 fi
17954 allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
17955 else
17956 cat conftest.err 1>&5
17957 fi
17958 $rm conftest*
17959 { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
17960 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; }
17961 ;;
17962 esac
17963 fi
17964 ;;
17965 esac
17966
17967 { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
17968 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
17969 library_names_spec=
17970 libname_spec='lib$name'
17971 soname_spec=
17972 shrext_cmds=".so"
17973 postinstall_cmds=
17974 postuninstall_cmds=
17975 finish_cmds=
17976 finish_eval=
17977 shlibpath_var=
17978 shlibpath_overrides_runpath=unknown
17979 version_type=none
17980 dynamic_linker="$host_os ld.so"
17981 sys_lib_dlsearch_path_spec="/lib /usr/lib"
17982
17983 need_lib_prefix=unknown
17984 hardcode_into_libs=no
17985
17986 # when you set need_version to no, make sure it does not cause -set_version
17987 # flags to be left without arguments
17988 need_version=unknown
17989
17990 case $host_os in
17991 aix3*)
17992 version_type=linux
17993 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
17994 shlibpath_var=LIBPATH
17995
17996 # AIX 3 has no versioning support, so we append a major version to the name.
17997 soname_spec='${libname}${release}${shared_ext}$major'
17998 ;;
17999
18000 aix4* | aix5*)
18001 version_type=linux
18002 need_lib_prefix=no
18003 need_version=no
18004 hardcode_into_libs=yes
18005 if test "$host_cpu" = ia64; then
18006 # AIX 5 supports IA64
18007 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
18008 shlibpath_var=LD_LIBRARY_PATH
18009 else
18010 # With GCC up to 2.95.x, collect2 would create an import file
18011 # for dependence libraries. The import file would start with
18012 # the line `#! .'. This would cause the generated library to
18013 # depend on `.', always an invalid library. This was fixed in
18014 # development snapshots of GCC prior to 3.0.
18015 case $host_os in
18016 aix4 | aix4.[01] | aix4.[01].*)
18017 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
18018 echo ' yes '
18019 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
18020 :
18021 else
18022 can_build_shared=no
18023 fi
18024 ;;
18025 esac
18026 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
18027 # soname into executable. Probably we can add versioning support to
18028 # collect2, so additional links can be useful in future.
18029 if test "$aix_use_runtimelinking" = yes; then
18030 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
18031 # instead of lib<name>.a to let people know that these are not
18032 # typical AIX shared libraries.
18033 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18034 else
18035 # We preserve .a as extension for shared libraries through AIX4.2
18036 # and later when we are not doing run time linking.
18037 library_names_spec='${libname}${release}.a $libname.a'
18038 soname_spec='${libname}${release}${shared_ext}$major'
18039 fi
18040 shlibpath_var=LIBPATH
18041 fi
18042 ;;
18043
18044 amigaos*)
18045 library_names_spec='$libname.ixlibrary $libname.a'
18046 # Create ${libname}_ixlibrary.a entries in /sys/libs.
18047 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
18048 ;;
18049
18050 beos*)
18051 library_names_spec='${libname}${shared_ext}'
18052 dynamic_linker="$host_os ld.so"
18053 shlibpath_var=LIBRARY_PATH
18054 ;;
18055
18056 bsdi[45]*)
18057 version_type=linux
18058 need_version=no
18059 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18060 soname_spec='${libname}${release}${shared_ext}$major'
18061 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
18062 shlibpath_var=LD_LIBRARY_PATH
18063 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
18064 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
18065 # the default ld.so.conf also contains /usr/contrib/lib and
18066 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
18067 # libtool to hard-code these into programs
18068 ;;
18069
18070 cygwin* | mingw* | pw32*)
18071 version_type=windows
18072 shrext_cmds=".dll"
18073 need_version=no
18074 need_lib_prefix=no
18075
18076 case $GCC,$host_os in
18077 yes,cygwin* | yes,mingw* | yes,pw32*)
18078 library_names_spec='$libname.dll.a'
18079 # DLL is installed to $(libdir)/../bin by postinstall_cmds
18080 postinstall_cmds='base_file=`basename \${file}`~
18081 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
18082 dldir=$destdir/`dirname \$dlpath`~
18083 test -d \$dldir || mkdir -p \$dldir~
18084 $install_prog $dir/$dlname \$dldir/$dlname~
18085 chmod a+x \$dldir/$dlname'
18086 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
18087 dlpath=$dir/\$dldll~
18088 $rm \$dlpath'
18089 shlibpath_overrides_runpath=yes
18090
18091 case $host_os in
18092 cygwin*)
18093 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
18094 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18095 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
18096 ;;
18097 mingw*)
18098 # MinGW DLLs use traditional 'lib' prefix
18099 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18100 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
18101 if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
18102 # It is most probably a Windows format PATH printed by
18103 # mingw gcc, but we are running on Cygwin. Gcc prints its search
18104 # path with ; separators, and with drive letters. We can handle the
18105 # drive letters (cygwin fileutils understands them), so leave them,
18106 # especially as we might pass files found there to a mingw objdump,
18107 # which wouldn't understand a cygwinified path. Ahh.
18108 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
18109 else
18110 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
18111 fi
18112 ;;
18113 pw32*)
18114 # pw32 DLLs use 'pw' prefix rather than 'lib'
18115 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
18116 ;;
18117 esac
18118 ;;
18119
18120 *)
18121 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
18122 ;;
18123 esac
18124 dynamic_linker='Win32 ld.exe'
18125 # FIXME: first we should search . and the directory the executable is in
18126 shlibpath_var=PATH
18127 ;;
18128
18129 darwin* | rhapsody*)
18130 dynamic_linker="$host_os dyld"
18131 version_type=darwin
18132 need_lib_prefix=no
18133 need_version=no
18134 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
18135 soname_spec='${libname}${release}${major}$shared_ext'
18136 shlibpath_overrides_runpath=yes
18137 shlibpath_var=DYLD_LIBRARY_PATH
18138 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
18139
18140 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
18141 ;;
18142
18143 dgux*)
18144 version_type=linux
18145 need_lib_prefix=no
18146 need_version=no
18147 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
18148 soname_spec='${libname}${release}${shared_ext}$major'
18149 shlibpath_var=LD_LIBRARY_PATH
18150 ;;
18151
18152 freebsd1*)
18153 dynamic_linker=no
18154 ;;
18155
18156 freebsd* | dragonfly*)
18157 # DragonFly does not have aout. When/if they implement a new
18158 # versioning mechanism, adjust this.
18159 if test -x /usr/bin/objformat; then
18160 objformat=`/usr/bin/objformat`
18161 else
18162 case $host_os in
18163 freebsd[123]*) objformat=aout ;;
18164 *) objformat=elf ;;
18165 esac
18166 fi
18167 version_type=freebsd-$objformat
18168 case $version_type in
18169 freebsd-elf*)
18170 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18171 need_version=no
18172 need_lib_prefix=no
18173 ;;
18174 freebsd-*)
18175 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
18176 need_version=yes
18177 ;;
18178 esac
18179 shlibpath_var=LD_LIBRARY_PATH
18180 case $host_os in
18181 freebsd2*)
18182 shlibpath_overrides_runpath=yes
18183 ;;
18184 freebsd3.[01]* | freebsdelf3.[01]*)
18185 shlibpath_overrides_runpath=yes
18186 hardcode_into_libs=yes
18187 ;;
18188 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
18189 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
18190 shlibpath_overrides_runpath=no
18191 hardcode_into_libs=yes
18192 ;;
18193 *) # from 4.6 on, and DragonFly
18194 shlibpath_overrides_runpath=yes
18195 hardcode_into_libs=yes
18196 ;;
18197 esac
18198 ;;
18199
18200 gnu*)
18201 version_type=linux
18202 need_lib_prefix=no
18203 need_version=no
18204 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
18205 soname_spec='${libname}${release}${shared_ext}$major'
18206 shlibpath_var=LD_LIBRARY_PATH
18207 hardcode_into_libs=yes
18208 ;;
18209
18210 hpux9* | hpux10* | hpux11*)
18211 # Give a soname corresponding to the major version so that dld.sl refuses to
18212 # link against other versions.
18213 version_type=sunos
18214 need_lib_prefix=no
18215 need_version=no
18216 case $host_cpu in
18217 ia64*)
18218 shrext_cmds='.so'
18219 hardcode_into_libs=yes
18220 dynamic_linker="$host_os dld.so"
18221 shlibpath_var=LD_LIBRARY_PATH
18222 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18223 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18224 soname_spec='${libname}${release}${shared_ext}$major'
18225 if test "X$HPUX_IA64_MODE" = X32; then
18226 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
18227 else
18228 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
18229 fi
18230 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18231 ;;
18232 hppa*64*)
18233 shrext_cmds='.sl'
18234 hardcode_into_libs=yes
18235 dynamic_linker="$host_os dld.sl"
18236 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
18237 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
18238 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18239 soname_spec='${libname}${release}${shared_ext}$major'
18240 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
18241 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
18242 ;;
18243 *)
18244 shrext_cmds='.sl'
18245 dynamic_linker="$host_os dld.sl"
18246 shlibpath_var=SHLIB_PATH
18247 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
18248 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18249 soname_spec='${libname}${release}${shared_ext}$major'
18250 ;;
18251 esac
18252 # HP-UX runs *really* slowly unless shared libraries are mode 555.
18253 postinstall_cmds='chmod 555 $lib'
18254 ;;
18255
18256 interix[3-9]*)
18257 version_type=linux
18258 need_lib_prefix=no
18259 need_version=no
18260 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18261 soname_spec='${libname}${release}${shared_ext}$major'
18262 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
18263 shlibpath_var=LD_LIBRARY_PATH
18264 shlibpath_overrides_runpath=no
18265 hardcode_into_libs=yes
18266 ;;
18267
18268 irix5* | irix6* | nonstopux*)
18269 case $host_os in
18270 nonstopux*) version_type=nonstopux ;;
18271 *)
18272 if test "$lt_cv_prog_gnu_ld" = yes; then
18273 version_type=linux
18274 else
18275 version_type=irix
18276 fi ;;
18277 esac
18278 need_lib_prefix=no
18279 need_version=no
18280 soname_spec='${libname}${release}${shared_ext}$major'
18281 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
18282 case $host_os in
18283 irix5* | nonstopux*)
18284 libsuff= shlibsuff=
18285 ;;
18286 *)
18287 case $LD in # libtool.m4 will add one of these switches to LD
18288 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
18289 libsuff= shlibsuff= libmagic=32-bit;;
18290 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
18291 libsuff=32 shlibsuff=N32 libmagic=N32;;
18292 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
18293 libsuff=64 shlibsuff=64 libmagic=64-bit;;
18294 *) libsuff= shlibsuff= libmagic=never-match;;
18295 esac
18296 ;;
18297 esac
18298 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
18299 shlibpath_overrides_runpath=no
18300 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
18301 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
18302 hardcode_into_libs=yes
18303 ;;
18304
18305 # No shared lib support for Linux oldld, aout, or coff.
18306 linux*oldld* | linux*aout* | linux*coff*)
18307 dynamic_linker=no
18308 ;;
18309
18310 # This must be Linux ELF.
18311 linux* | k*bsd*-gnu)
18312 version_type=linux
18313 need_lib_prefix=no
18314 need_version=no
18315 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18316 soname_spec='${libname}${release}${shared_ext}$major'
18317 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
18318 shlibpath_var=LD_LIBRARY_PATH
18319 shlibpath_overrides_runpath=no
18320 # This implies no fast_install, which is unacceptable.
18321 # Some rework will be needed to allow for fast_install
18322 # before this can be enabled.
18323 hardcode_into_libs=yes
18324 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
18325 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
18326
18327 # Append ld.so.conf contents to the search path
18328 if test -f /etc/ld.so.conf; then
18329 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
18330 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
18331 fi
18332
18333 # We used to test for /lib/ld.so.1 and disable shared libraries on
18334 # powerpc, because MkLinux only supported shared libraries with the
18335 # GNU dynamic linker. Since this was broken with cross compilers,
18336 # most powerpc-linux boxes support dynamic linking these days and
18337 # people can always --disable-shared, the test was removed, and we
18338 # assume the GNU/Linux dynamic linker is in use.
18339 dynamic_linker='GNU/Linux ld.so'
18340 ;;
18341
18342 netbsd*)
18343 version_type=sunos
18344 need_lib_prefix=no
18345 need_version=no
18346 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
18347 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18348 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18349 dynamic_linker='NetBSD (a.out) ld.so'
18350 else
18351 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
18352 soname_spec='${libname}${release}${shared_ext}$major'
18353 dynamic_linker='NetBSD ld.elf_so'
18354 fi
18355 shlibpath_var=LD_LIBRARY_PATH
18356 shlibpath_overrides_runpath=yes
18357 hardcode_into_libs=yes
18358 ;;
18359
18360 newsos6)
18361 version_type=linux
18362 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18363 shlibpath_var=LD_LIBRARY_PATH
18364 shlibpath_overrides_runpath=yes
18365 ;;
18366
18367 nto-qnx*)
18368 version_type=linux
18369 need_lib_prefix=no
18370 need_version=no
18371 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18372 soname_spec='${libname}${release}${shared_ext}$major'
18373 shlibpath_var=LD_LIBRARY_PATH
18374 shlibpath_overrides_runpath=yes
18375 ;;
18376
18377 openbsd*)
18378 version_type=sunos
18379 sys_lib_dlsearch_path_spec="/usr/lib"
18380 need_lib_prefix=no
18381 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
18382 case $host_os in
18383 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
18384 *) need_version=no ;;
18385 esac
18386 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18387 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
18388 shlibpath_var=LD_LIBRARY_PATH
18389 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
18390 case $host_os in
18391 openbsd2.[89] | openbsd2.[89].*)
18392 shlibpath_overrides_runpath=no
18393 ;;
18394 *)
18395 shlibpath_overrides_runpath=yes
18396 ;;
18397 esac
18398 else
18399 shlibpath_overrides_runpath=yes
18400 fi
18401 ;;
18402
18403 os2*)
18404 libname_spec='$name'
18405 shrext_cmds=".dll"
18406 need_lib_prefix=no
18407 library_names_spec='$libname${shared_ext} $libname.a'
18408 dynamic_linker='OS/2 ld.exe'
18409 shlibpath_var=LIBPATH
18410 ;;
18411
18412 osf3* | osf4* | osf5*)
18413 version_type=osf
18414 need_lib_prefix=no
18415 need_version=no
18416 soname_spec='${libname}${release}${shared_ext}$major'
18417 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18418 shlibpath_var=LD_LIBRARY_PATH
18419 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
18420 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
18421 ;;
18422
18423 rdos*)
18424 dynamic_linker=no
18425 ;;
18426
18427 solaris*)
18428 version_type=linux
18429 need_lib_prefix=no
18430 need_version=no
18431 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18432 soname_spec='${libname}${release}${shared_ext}$major'
18433 shlibpath_var=LD_LIBRARY_PATH
18434 shlibpath_overrides_runpath=yes
18435 hardcode_into_libs=yes
18436 # ldd complains unless libraries are executable
18437 postinstall_cmds='chmod +x $lib'
18438 ;;
18439
18440 sunos4*)
18441 version_type=sunos
18442 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
18443 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
18444 shlibpath_var=LD_LIBRARY_PATH
18445 shlibpath_overrides_runpath=yes
18446 if test "$with_gnu_ld" = yes; then
18447 need_lib_prefix=no
18448 fi
18449 need_version=yes
18450 ;;
18451
18452 sysv4 | sysv4.3*)
18453 version_type=linux
18454 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18455 soname_spec='${libname}${release}${shared_ext}$major'
18456 shlibpath_var=LD_LIBRARY_PATH
18457 case $host_vendor in
18458 sni)
18459 shlibpath_overrides_runpath=no
18460 need_lib_prefix=no
18461 export_dynamic_flag_spec='${wl}-Blargedynsym'
18462 runpath_var=LD_RUN_PATH
18463 ;;
18464 siemens)
18465 need_lib_prefix=no
18466 ;;
18467 motorola)
18468 need_lib_prefix=no
18469 need_version=no
18470 shlibpath_overrides_runpath=no
18471 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
18472 ;;
18473 esac
18474 ;;
18475
18476 sysv4*MP*)
18477 if test -d /usr/nec ;then
18478 version_type=linux
18479 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
18480 soname_spec='$libname${shared_ext}.$major'
18481 shlibpath_var=LD_LIBRARY_PATH
18482 fi
18483 ;;
18484
18485 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
18486 version_type=freebsd-elf
18487 need_lib_prefix=no
18488 need_version=no
18489 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
18490 soname_spec='${libname}${release}${shared_ext}$major'
18491 shlibpath_var=LD_LIBRARY_PATH
18492 hardcode_into_libs=yes
18493 if test "$with_gnu_ld" = yes; then
18494 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
18495 shlibpath_overrides_runpath=no
18496 else
18497 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
18498 shlibpath_overrides_runpath=yes
18499 case $host_os in
18500 sco3.2v5*)
18501 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
18502 ;;
18503 esac
18504 fi
18505 sys_lib_dlsearch_path_spec='/usr/lib'
18506 ;;
18507
18508 uts4*)
18509 version_type=linux
18510 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
18511 soname_spec='${libname}${release}${shared_ext}$major'
18512 shlibpath_var=LD_LIBRARY_PATH
18513 ;;
18514
18515 *)
18516 dynamic_linker=no
18517 ;;
18518 esac
18519 { echo "$as_me:$LINENO: result: $dynamic_linker" >&5
18520 echo "${ECHO_T}$dynamic_linker" >&6; }
18521 test "$dynamic_linker" = no && can_build_shared=no
18522
18523 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
18524 if test "$GCC" = yes; then
18525 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
18526 fi
18527
18528 { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
18529 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
18530 hardcode_action_GCJ=
18531 if test -n "$hardcode_libdir_flag_spec_GCJ" || \
18532 test -n "$runpath_var_GCJ" || \
18533 test "X$hardcode_automatic_GCJ" = "Xyes" ; then
18534
18535 # We can hardcode non-existant directories.
18536 if test "$hardcode_direct_GCJ" != no &&
18537 # If the only mechanism to avoid hardcoding is shlibpath_var, we
18538 # have to relink, otherwise we might link with an installed library
18539 # when we should be linking with a yet-to-be-installed one
18540 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
18541 test "$hardcode_minus_L_GCJ" != no; then
18542 # Linking always hardcodes the temporary library directory.
18543 hardcode_action_GCJ=relink
18544 else
18545 # We can link without hardcoding, and we can hardcode nonexisting dirs.
18546 hardcode_action_GCJ=immediate
18547 fi
18548 else
18549 # We cannot hardcode anything, or else we can only hardcode existing
18550 # directories.
18551 hardcode_action_GCJ=unsupported
18552 fi
18553 { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
18554 echo "${ECHO_T}$hardcode_action_GCJ" >&6; }
18555
18556 if test "$hardcode_action_GCJ" = relink; then
18557 # Fast installation is not supported
18558 enable_fast_install=no
18559 elif test "$shlibpath_overrides_runpath" = yes ||
18560 test "$enable_shared" = no; then
18561 # Fast installation is not necessary
18562 enable_fast_install=needless
18563 fi
18564
18565
18566 # The else clause should only fire when bootstrapping the
18567 # libtool distribution, otherwise you forgot to ship ltmain.sh
18568 # with your package, and you will get complaints that there are
18569 # no rules to generate ltmain.sh.
18570 if test -f "$ltmain"; then
18571 # See if we are running on zsh, and set the options which allow our commands through
18572 # without removal of \ escapes.
18573 if test -n "${ZSH_VERSION+set}" ; then
18574 setopt NO_GLOB_SUBST
18575 fi
18576 # Now quote all the things that may contain metacharacters while being
18577 # careful not to overquote the AC_SUBSTed values. We take copies of the
18578 # variables and quote the copies for generation of the libtool script.
18579 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
18580 SED SHELL STRIP \
18581 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
18582 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
18583 deplibs_check_method reload_flag reload_cmds need_locks \
18584 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
18585 lt_cv_sys_global_symbol_to_c_name_address \
18586 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
18587 old_postinstall_cmds old_postuninstall_cmds \
18588 compiler_GCJ \
18589 CC_GCJ \
18590 LD_GCJ \
18591 lt_prog_compiler_wl_GCJ \
18592 lt_prog_compiler_pic_GCJ \
18593 lt_prog_compiler_static_GCJ \
18594 lt_prog_compiler_no_builtin_flag_GCJ \
18595 export_dynamic_flag_spec_GCJ \
18596 thread_safe_flag_spec_GCJ \
18597 whole_archive_flag_spec_GCJ \
18598 enable_shared_with_static_runtimes_GCJ \
18599 old_archive_cmds_GCJ \
18600 old_archive_from_new_cmds_GCJ \
18601 predep_objects_GCJ \
18602 postdep_objects_GCJ \
18603 predeps_GCJ \
18604 postdeps_GCJ \
18605 compiler_lib_search_path_GCJ \
18606 archive_cmds_GCJ \
18607 archive_expsym_cmds_GCJ \
18608 postinstall_cmds_GCJ \
18609 postuninstall_cmds_GCJ \
18610 old_archive_from_expsyms_cmds_GCJ \
18611 allow_undefined_flag_GCJ \
18612 no_undefined_flag_GCJ \
18613 export_symbols_cmds_GCJ \
18614 hardcode_libdir_flag_spec_GCJ \
18615 hardcode_libdir_flag_spec_ld_GCJ \
18616 hardcode_libdir_separator_GCJ \
18617 hardcode_automatic_GCJ \
18618 module_cmds_GCJ \
18619 module_expsym_cmds_GCJ \
18620 lt_cv_prog_compiler_c_o_GCJ \
18621 fix_srcfile_path_GCJ \
18622 exclude_expsyms_GCJ \
18623 include_expsyms_GCJ; do
18624
18625 case $var in
18626 old_archive_cmds_GCJ | \
18627 old_archive_from_new_cmds_GCJ | \
18628 archive_cmds_GCJ | \
18629 archive_expsym_cmds_GCJ | \
18630 module_cmds_GCJ | \
18631 module_expsym_cmds_GCJ | \
18632 old_archive_from_expsyms_cmds_GCJ | \
18633 export_symbols_cmds_GCJ | \
18634 extract_expsyms_cmds | reload_cmds | finish_cmds | \
18635 postinstall_cmds | postuninstall_cmds | \
18636 old_postinstall_cmds | old_postuninstall_cmds | \
18637 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
18638 # Double-quote double-evaled strings.
18639 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
18640 ;;
18641 *)
18642 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
18643 ;;
18644 esac
18645 done
18646
18647 case $lt_echo in
18648 *'\$0 --fallback-echo"')
18649 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
18650 ;;
18651 esac
18652
18653 cfgfile="$ofile"
18654
18655 cat <<__EOF__ >> "$cfgfile"
18656 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
18657
18658 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18659
18660 # Shell to use when invoking shell scripts.
18661 SHELL=$lt_SHELL
18662
18663 # Whether or not to build shared libraries.
18664 build_libtool_libs=$enable_shared
18665
18666 # Whether or not to build static libraries.
18667 build_old_libs=$enable_static
18668
18669 # Whether or not to add -lc for building shared libraries.
18670 build_libtool_need_lc=$archive_cmds_need_lc_GCJ
18671
18672 # Whether or not to disallow shared libs when runtime libs are static
18673 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
18674
18675 # Whether or not to optimize for fast installation.
18676 fast_install=$enable_fast_install
18677
18678 # The host system.
18679 host_alias=$host_alias
18680 host=$host
18681 host_os=$host_os
18682
18683 # The build system.
18684 build_alias=$build_alias
18685 build=$build
18686 build_os=$build_os
18687
18688 # An echo program that does not interpret backslashes.
18689 echo=$lt_echo
18690
18691 # The archiver.
18692 AR=$lt_AR
18693 AR_FLAGS=$lt_AR_FLAGS
18694
18695 # A C compiler.
18696 LTCC=$lt_LTCC
18697
18698 # LTCC compiler flags.
18699 LTCFLAGS=$lt_LTCFLAGS
18700
18701 # A language-specific compiler.
18702 CC=$lt_compiler_GCJ
18703
18704 # Is the compiler the GNU C compiler?
18705 with_gcc=$GCC_GCJ
18706
18707 # An ERE matcher.
18708 EGREP=$lt_EGREP
18709
18710 # The linker used to build libraries.
18711 LD=$lt_LD_GCJ
18712
18713 # Whether we need hard or soft links.
18714 LN_S=$lt_LN_S
18715
18716 # A BSD-compatible nm program.
18717 NM=$lt_NM
18718
18719 # A symbol stripping program
18720 STRIP=$lt_STRIP
18721
18722 # Used to examine libraries when file_magic_cmd begins "file"
18723 MAGIC_CMD=$MAGIC_CMD
18724
18725 # Used on cygwin: DLL creation program.
18726 DLLTOOL="$DLLTOOL"
18727
18728 # Used on cygwin: object dumper.
18729 OBJDUMP="$OBJDUMP"
18730
18731 # Used on cygwin: assembler.
18732 AS="$AS"
18733
18734 # The name of the directory that contains temporary libtool files.
18735 objdir=$objdir
18736
18737 # How to create reloadable object files.
18738 reload_flag=$lt_reload_flag
18739 reload_cmds=$lt_reload_cmds
18740
18741 # How to pass a linker flag through the compiler.
18742 wl=$lt_lt_prog_compiler_wl_GCJ
18743
18744 # Object file suffix (normally "o").
18745 objext="$ac_objext"
18746
18747 # Old archive suffix (normally "a").
18748 libext="$libext"
18749
18750 # Shared library suffix (normally ".so").
18751 shrext_cmds='$shrext_cmds'
18752
18753 # Executable file suffix (normally "").
18754 exeext="$exeext"
18755
18756 # Additional compiler flags for building library objects.
18757 pic_flag=$lt_lt_prog_compiler_pic_GCJ
18758 pic_mode=$pic_mode
18759
18760 # What is the maximum length of a command?
18761 max_cmd_len=$lt_cv_sys_max_cmd_len
18762
18763 # Does compiler simultaneously support -c and -o options?
18764 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
18765
18766 # Must we lock files when doing compilation?
18767 need_locks=$lt_need_locks
18768
18769 # Do we need the lib prefix for modules?
18770 need_lib_prefix=$need_lib_prefix
18771
18772 # Do we need a version for libraries?
18773 need_version=$need_version
18774
18775 # Whether dlopen is supported.
18776 dlopen_support=$enable_dlopen
18777
18778 # Whether dlopen of programs is supported.
18779 dlopen_self=$enable_dlopen_self
18780
18781 # Whether dlopen of statically linked programs is supported.
18782 dlopen_self_static=$enable_dlopen_self_static
18783
18784 # Compiler flag to prevent dynamic linking.
18785 link_static_flag=$lt_lt_prog_compiler_static_GCJ
18786
18787 # Compiler flag to turn off builtin functions.
18788 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
18789
18790 # Compiler flag to allow reflexive dlopens.
18791 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
18792
18793 # Compiler flag to generate shared objects directly from archives.
18794 whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
18795
18796 # Compiler flag to generate thread-safe objects.
18797 thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
18798
18799 # Library versioning type.
18800 version_type=$version_type
18801
18802 # Format of library name prefix.
18803 libname_spec=$lt_libname_spec
18804
18805 # List of archive names. First name is the real one, the rest are links.
18806 # The last name is the one that the linker finds with -lNAME.
18807 library_names_spec=$lt_library_names_spec
18808
18809 # The coded name of the library, if different from the real name.
18810 soname_spec=$lt_soname_spec
18811
18812 # Commands used to build and install an old-style archive.
18813 RANLIB=$lt_RANLIB
18814 old_archive_cmds=$lt_old_archive_cmds_GCJ
18815 old_postinstall_cmds=$lt_old_postinstall_cmds
18816 old_postuninstall_cmds=$lt_old_postuninstall_cmds
18817
18818 # Create an old-style archive from a shared archive.
18819 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
18820
18821 # Create a temporary old-style archive to link instead of a shared archive.
18822 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
18823
18824 # Commands used to build and install a shared archive.
18825 archive_cmds=$lt_archive_cmds_GCJ
18826 archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
18827 postinstall_cmds=$lt_postinstall_cmds
18828 postuninstall_cmds=$lt_postuninstall_cmds
18829
18830 # Commands used to build a loadable module (assumed same as above if empty)
18831 module_cmds=$lt_module_cmds_GCJ
18832 module_expsym_cmds=$lt_module_expsym_cmds_GCJ
18833
18834 # Commands to strip libraries.
18835 old_striplib=$lt_old_striplib
18836 striplib=$lt_striplib
18837
18838 # Dependencies to place before the objects being linked to create a
18839 # shared library.
18840 predep_objects=$lt_predep_objects_GCJ
18841
18842 # Dependencies to place after the objects being linked to create a
18843 # shared library.
18844 postdep_objects=$lt_postdep_objects_GCJ
18845
18846 # Dependencies to place before the objects being linked to create a
18847 # shared library.
18848 predeps=$lt_predeps_GCJ
18849
18850 # Dependencies to place after the objects being linked to create a
18851 # shared library.
18852 postdeps=$lt_postdeps_GCJ
18853
18854 # The library search path used internally by the compiler when linking
18855 # a shared library.
18856 compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
18857
18858 # Method to check whether dependent libraries are shared objects.
18859 deplibs_check_method=$lt_deplibs_check_method
18860
18861 # Command to use when deplibs_check_method == file_magic.
18862 file_magic_cmd=$lt_file_magic_cmd
18863
18864 # Flag that allows shared libraries with undefined symbols to be built.
18865 allow_undefined_flag=$lt_allow_undefined_flag_GCJ
18866
18867 # Flag that forces no undefined symbols.
18868 no_undefined_flag=$lt_no_undefined_flag_GCJ
18869
18870 # Commands used to finish a libtool library installation in a directory.
18871 finish_cmds=$lt_finish_cmds
18872
18873 # Same as above, but a single script fragment to be evaled but not shown.
18874 finish_eval=$lt_finish_eval
18875
18876 # Take the output of nm and produce a listing of raw symbols and C names.
18877 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
18878
18879 # Transform the output of nm in a proper C declaration
18880 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
18881
18882 # Transform the output of nm in a C name address pair
18883 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
18884
18885 # This is the shared library runtime path variable.
18886 runpath_var=$runpath_var
18887
18888 # This is the shared library path variable.
18889 shlibpath_var=$shlibpath_var
18890
18891 # Is shlibpath searched before the hard-coded library search path?
18892 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
18893
18894 # How to hardcode a shared library path into an executable.
18895 hardcode_action=$hardcode_action_GCJ
18896
18897 # Whether we should hardcode library paths into libraries.
18898 hardcode_into_libs=$hardcode_into_libs
18899
18900 # Flag to hardcode \$libdir into a binary during linking.
18901 # This must work even if \$libdir does not exist.
18902 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
18903
18904 # If ld is used when linking, flag to hardcode \$libdir into
18905 # a binary during linking. This must work even if \$libdir does
18906 # not exist.
18907 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
18908
18909 # Whether we need a single -rpath flag with a separated argument.
18910 hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
18911
18912 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
18913 # resulting binary.
18914 hardcode_direct=$hardcode_direct_GCJ
18915
18916 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
18917 # resulting binary.
18918 hardcode_minus_L=$hardcode_minus_L_GCJ
18919
18920 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
18921 # the resulting binary.
18922 hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
18923
18924 # Set to yes if building a shared library automatically hardcodes DIR into the library
18925 # and all subsequent libraries and executables linked against it.
18926 hardcode_automatic=$hardcode_automatic_GCJ
18927
18928 # Variables whose values should be saved in libtool wrapper scripts and
18929 # restored at relink time.
18930 variables_saved_for_relink="$variables_saved_for_relink"
18931
18932 # Whether libtool must link a program against all its dependency libraries.
18933 link_all_deplibs=$link_all_deplibs_GCJ
18934
18935 # Compile-time system search path for libraries
18936 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
18937
18938 # Run-time system search path for libraries
18939 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
18940
18941 # Fix the shell variable \$srcfile for the compiler.
18942 fix_srcfile_path=$lt_fix_srcfile_path
18943
18944 # Set to yes if exported symbols are required.
18945 always_export_symbols=$always_export_symbols_GCJ
18946
18947 # The commands to list exported symbols.
18948 export_symbols_cmds=$lt_export_symbols_cmds_GCJ
18949
18950 # The commands to extract the exported symbol list from a shared archive.
18951 extract_expsyms_cmds=$lt_extract_expsyms_cmds
18952
18953 # Symbols that should not be listed in the preloaded symbols.
18954 exclude_expsyms=$lt_exclude_expsyms_GCJ
18955
18956 # Symbols that must always be exported.
18957 include_expsyms=$lt_include_expsyms_GCJ
18958
18959 # ### END LIBTOOL TAG CONFIG: $tagname
18960
18961 __EOF__
18962
18963
18964 else
18965 # If there is no Makefile yet, we rely on a make rule to execute
18966 # `config.status --recheck' to rerun these tests and create the
18967 # libtool script then.
18968 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
18969 if test -f "$ltmain_in"; then
18970 test -f Makefile && make "$ltmain"
18971 fi
18972 fi
18973
18974
18975 ac_ext=c
18976 ac_cpp='$CPP $CPPFLAGS'
18977 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18978 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18979 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18980
18981 CC="$lt_save_CC"
18982
18983 else
18984 tagname=""
18985 fi
18986 ;;
18987
18988 RC)
18989
18990
18991 # Source file extension for RC test sources.
18992 ac_ext=rc
18993
18994 # Object file extension for compiled RC test sources.
18995 objext=o
18996 objext_RC=$objext
18997
18998 # Code to be used in simple compile tests
18999 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
19000
19001 # Code to be used in simple link tests
19002 lt_simple_link_test_code="$lt_simple_compile_test_code"
19003
19004 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
19005
19006 # If no C compiler was specified, use CC.
19007 LTCC=${LTCC-"$CC"}
19008
19009 # If no C compiler flags were specified, use CFLAGS.
19010 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19011
19012 # Allow CC to be a program name with arguments.
19013 compiler=$CC
19014
19015
19016 # save warnings/boilerplate of simple test code
19017 ac_outfile=conftest.$ac_objext
19018 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
19019 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19020 _lt_compiler_boilerplate=`cat conftest.err`
19021 $rm conftest*
19022
19023 ac_outfile=conftest.$ac_objext
19024 echo "$lt_simple_link_test_code" >conftest.$ac_ext
19025 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19026 _lt_linker_boilerplate=`cat conftest.err`
19027 $rm conftest*
19028
19029
19030 # Allow CC to be a program name with arguments.
19031 lt_save_CC="$CC"
19032 CC=${RC-"windres"}
19033 compiler=$CC
19034 compiler_RC=$CC
19035 for cc_temp in $compiler""; do
19036 case $cc_temp in
19037 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
19038 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
19039 \-*) ;;
19040 *) break;;
19041 esac
19042 done
19043 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
19044
19045 lt_cv_prog_compiler_c_o_RC=yes
19046
19047 # The else clause should only fire when bootstrapping the
19048 # libtool distribution, otherwise you forgot to ship ltmain.sh
19049 # with your package, and you will get complaints that there are
19050 # no rules to generate ltmain.sh.
19051 if test -f "$ltmain"; then
19052 # See if we are running on zsh, and set the options which allow our commands through
19053 # without removal of \ escapes.
19054 if test -n "${ZSH_VERSION+set}" ; then
19055 setopt NO_GLOB_SUBST
19056 fi
19057 # Now quote all the things that may contain metacharacters while being
19058 # careful not to overquote the AC_SUBSTed values. We take copies of the
19059 # variables and quote the copies for generation of the libtool script.
19060 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
19061 SED SHELL STRIP \
19062 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
19063 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
19064 deplibs_check_method reload_flag reload_cmds need_locks \
19065 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
19066 lt_cv_sys_global_symbol_to_c_name_address \
19067 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
19068 old_postinstall_cmds old_postuninstall_cmds \
19069 compiler_RC \
19070 CC_RC \
19071 LD_RC \
19072 lt_prog_compiler_wl_RC \
19073 lt_prog_compiler_pic_RC \
19074 lt_prog_compiler_static_RC \
19075 lt_prog_compiler_no_builtin_flag_RC \
19076 export_dynamic_flag_spec_RC \
19077 thread_safe_flag_spec_RC \
19078 whole_archive_flag_spec_RC \
19079 enable_shared_with_static_runtimes_RC \
19080 old_archive_cmds_RC \
19081 old_archive_from_new_cmds_RC \
19082 predep_objects_RC \
19083 postdep_objects_RC \
19084 predeps_RC \
19085 postdeps_RC \
19086 compiler_lib_search_path_RC \
19087 archive_cmds_RC \
19088 archive_expsym_cmds_RC \
19089 postinstall_cmds_RC \
19090 postuninstall_cmds_RC \
19091 old_archive_from_expsyms_cmds_RC \
19092 allow_undefined_flag_RC \
19093 no_undefined_flag_RC \
19094 export_symbols_cmds_RC \
19095 hardcode_libdir_flag_spec_RC \
19096 hardcode_libdir_flag_spec_ld_RC \
19097 hardcode_libdir_separator_RC \
19098 hardcode_automatic_RC \
19099 module_cmds_RC \
19100 module_expsym_cmds_RC \
19101 lt_cv_prog_compiler_c_o_RC \
19102 fix_srcfile_path_RC \
19103 exclude_expsyms_RC \
19104 include_expsyms_RC; do
19105
19106 case $var in
19107 old_archive_cmds_RC | \
19108 old_archive_from_new_cmds_RC | \
19109 archive_cmds_RC | \
19110 archive_expsym_cmds_RC | \
19111 module_cmds_RC | \
19112 module_expsym_cmds_RC | \
19113 old_archive_from_expsyms_cmds_RC | \
19114 export_symbols_cmds_RC | \
19115 extract_expsyms_cmds | reload_cmds | finish_cmds | \
19116 postinstall_cmds | postuninstall_cmds | \
19117 old_postinstall_cmds | old_postuninstall_cmds | \
19118 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
19119 # Double-quote double-evaled strings.
19120 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
19121 ;;
19122 *)
19123 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
19124 ;;
19125 esac
19126 done
19127
19128 case $lt_echo in
19129 *'\$0 --fallback-echo"')
19130 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
19131 ;;
19132 esac
19133
19134 cfgfile="$ofile"
19135
19136 cat <<__EOF__ >> "$cfgfile"
19137 # ### BEGIN LIBTOOL TAG CONFIG: $tagname
19138
19139 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
19140
19141 # Shell to use when invoking shell scripts.
19142 SHELL=$lt_SHELL
19143
19144 # Whether or not to build shared libraries.
19145 build_libtool_libs=$enable_shared
19146
19147 # Whether or not to build static libraries.
19148 build_old_libs=$enable_static
19149
19150 # Whether or not to add -lc for building shared libraries.
19151 build_libtool_need_lc=$archive_cmds_need_lc_RC
19152
19153 # Whether or not to disallow shared libs when runtime libs are static
19154 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
19155
19156 # Whether or not to optimize for fast installation.
19157 fast_install=$enable_fast_install
19158
19159 # The host system.
19160 host_alias=$host_alias
19161 host=$host
19162 host_os=$host_os
19163
19164 # The build system.
19165 build_alias=$build_alias
19166 build=$build
19167 build_os=$build_os
19168
19169 # An echo program that does not interpret backslashes.
19170 echo=$lt_echo
19171
19172 # The archiver.
19173 AR=$lt_AR
19174 AR_FLAGS=$lt_AR_FLAGS
19175
19176 # A C compiler.
19177 LTCC=$lt_LTCC
19178
19179 # LTCC compiler flags.
19180 LTCFLAGS=$lt_LTCFLAGS
19181
19182 # A language-specific compiler.
19183 CC=$lt_compiler_RC
19184
19185 # Is the compiler the GNU C compiler?
19186 with_gcc=$GCC_RC
19187
19188 # An ERE matcher.
19189 EGREP=$lt_EGREP
19190
19191 # The linker used to build libraries.
19192 LD=$lt_LD_RC
19193
19194 # Whether we need hard or soft links.
19195 LN_S=$lt_LN_S
19196
19197 # A BSD-compatible nm program.
19198 NM=$lt_NM
19199
19200 # A symbol stripping program
19201 STRIP=$lt_STRIP
19202
19203 # Used to examine libraries when file_magic_cmd begins "file"
19204 MAGIC_CMD=$MAGIC_CMD
19205
19206 # Used on cygwin: DLL creation program.
19207 DLLTOOL="$DLLTOOL"
19208
19209 # Used on cygwin: object dumper.
19210 OBJDUMP="$OBJDUMP"
19211
19212 # Used on cygwin: assembler.
19213 AS="$AS"
19214
19215 # The name of the directory that contains temporary libtool files.
19216 objdir=$objdir
19217
19218 # How to create reloadable object files.
19219 reload_flag=$lt_reload_flag
19220 reload_cmds=$lt_reload_cmds
19221
19222 # How to pass a linker flag through the compiler.
19223 wl=$lt_lt_prog_compiler_wl_RC
19224
19225 # Object file suffix (normally "o").
19226 objext="$ac_objext"
19227
19228 # Old archive suffix (normally "a").
19229 libext="$libext"
19230
19231 # Shared library suffix (normally ".so").
19232 shrext_cmds='$shrext_cmds'
19233
19234 # Executable file suffix (normally "").
19235 exeext="$exeext"
19236
19237 # Additional compiler flags for building library objects.
19238 pic_flag=$lt_lt_prog_compiler_pic_RC
19239 pic_mode=$pic_mode
19240
19241 # What is the maximum length of a command?
19242 max_cmd_len=$lt_cv_sys_max_cmd_len
19243
19244 # Does compiler simultaneously support -c and -o options?
19245 compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
19246
19247 # Must we lock files when doing compilation?
19248 need_locks=$lt_need_locks
19249
19250 # Do we need the lib prefix for modules?
19251 need_lib_prefix=$need_lib_prefix
19252
19253 # Do we need a version for libraries?
19254 need_version=$need_version
19255
19256 # Whether dlopen is supported.
19257 dlopen_support=$enable_dlopen
19258
19259 # Whether dlopen of programs is supported.
19260 dlopen_self=$enable_dlopen_self
19261
19262 # Whether dlopen of statically linked programs is supported.
19263 dlopen_self_static=$enable_dlopen_self_static
19264
19265 # Compiler flag to prevent dynamic linking.
19266 link_static_flag=$lt_lt_prog_compiler_static_RC
19267
19268 # Compiler flag to turn off builtin functions.
19269 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
19270
19271 # Compiler flag to allow reflexive dlopens.
19272 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
19273
19274 # Compiler flag to generate shared objects directly from archives.
19275 whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
19276
19277 # Compiler flag to generate thread-safe objects.
19278 thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
19279
19280 # Library versioning type.
19281 version_type=$version_type
19282
19283 # Format of library name prefix.
19284 libname_spec=$lt_libname_spec
19285
19286 # List of archive names. First name is the real one, the rest are links.
19287 # The last name is the one that the linker finds with -lNAME.
19288 library_names_spec=$lt_library_names_spec
19289
19290 # The coded name of the library, if different from the real name.
19291 soname_spec=$lt_soname_spec
19292
19293 # Commands used to build and install an old-style archive.
19294 RANLIB=$lt_RANLIB
19295 old_archive_cmds=$lt_old_archive_cmds_RC
19296 old_postinstall_cmds=$lt_old_postinstall_cmds
19297 old_postuninstall_cmds=$lt_old_postuninstall_cmds
19298
19299 # Create an old-style archive from a shared archive.
19300 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
19301
19302 # Create a temporary old-style archive to link instead of a shared archive.
19303 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
19304
19305 # Commands used to build and install a shared archive.
19306 archive_cmds=$lt_archive_cmds_RC
19307 archive_expsym_cmds=$lt_archive_expsym_cmds_RC
19308 postinstall_cmds=$lt_postinstall_cmds
19309 postuninstall_cmds=$lt_postuninstall_cmds
19310
19311 # Commands used to build a loadable module (assumed same as above if empty)
19312 module_cmds=$lt_module_cmds_RC
19313 module_expsym_cmds=$lt_module_expsym_cmds_RC
19314
19315 # Commands to strip libraries.
19316 old_striplib=$lt_old_striplib
19317 striplib=$lt_striplib
19318
19319 # Dependencies to place before the objects being linked to create a
19320 # shared library.
19321 predep_objects=$lt_predep_objects_RC
19322
19323 # Dependencies to place after the objects being linked to create a
19324 # shared library.
19325 postdep_objects=$lt_postdep_objects_RC
19326
19327 # Dependencies to place before the objects being linked to create a
19328 # shared library.
19329 predeps=$lt_predeps_RC
19330
19331 # Dependencies to place after the objects being linked to create a
19332 # shared library.
19333 postdeps=$lt_postdeps_RC
19334
19335 # The library search path used internally by the compiler when linking
19336 # a shared library.
19337 compiler_lib_search_path=$lt_compiler_lib_search_path_RC
19338
19339 # Method to check whether dependent libraries are shared objects.
19340 deplibs_check_method=$lt_deplibs_check_method
19341
19342 # Command to use when deplibs_check_method == file_magic.
19343 file_magic_cmd=$lt_file_magic_cmd
19344
19345 # Flag that allows shared libraries with undefined symbols to be built.
19346 allow_undefined_flag=$lt_allow_undefined_flag_RC
19347
19348 # Flag that forces no undefined symbols.
19349 no_undefined_flag=$lt_no_undefined_flag_RC
19350
19351 # Commands used to finish a libtool library installation in a directory.
19352 finish_cmds=$lt_finish_cmds
19353
19354 # Same as above, but a single script fragment to be evaled but not shown.
19355 finish_eval=$lt_finish_eval
19356
19357 # Take the output of nm and produce a listing of raw symbols and C names.
19358 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
19359
19360 # Transform the output of nm in a proper C declaration
19361 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
19362
19363 # Transform the output of nm in a C name address pair
19364 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
19365
19366 # This is the shared library runtime path variable.
19367 runpath_var=$runpath_var
19368
19369 # This is the shared library path variable.
19370 shlibpath_var=$shlibpath_var
19371
19372 # Is shlibpath searched before the hard-coded library search path?
19373 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
19374
19375 # How to hardcode a shared library path into an executable.
19376 hardcode_action=$hardcode_action_RC
19377
19378 # Whether we should hardcode library paths into libraries.
19379 hardcode_into_libs=$hardcode_into_libs
19380
19381 # Flag to hardcode \$libdir into a binary during linking.
19382 # This must work even if \$libdir does not exist.
19383 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
19384
19385 # If ld is used when linking, flag to hardcode \$libdir into
19386 # a binary during linking. This must work even if \$libdir does
19387 # not exist.
19388 hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
19389
19390 # Whether we need a single -rpath flag with a separated argument.
19391 hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
19392
19393 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
19394 # resulting binary.
19395 hardcode_direct=$hardcode_direct_RC
19396
19397 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
19398 # resulting binary.
19399 hardcode_minus_L=$hardcode_minus_L_RC
19400
19401 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
19402 # the resulting binary.
19403 hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
19404
19405 # Set to yes if building a shared library automatically hardcodes DIR into the library
19406 # and all subsequent libraries and executables linked against it.
19407 hardcode_automatic=$hardcode_automatic_RC
19408
19409 # Variables whose values should be saved in libtool wrapper scripts and
19410 # restored at relink time.
19411 variables_saved_for_relink="$variables_saved_for_relink"
19412
19413 # Whether libtool must link a program against all its dependency libraries.
19414 link_all_deplibs=$link_all_deplibs_RC
19415
19416 # Compile-time system search path for libraries
19417 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
19418
19419 # Run-time system search path for libraries
19420 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
19421
19422 # Fix the shell variable \$srcfile for the compiler.
19423 fix_srcfile_path=$lt_fix_srcfile_path
19424
19425 # Set to yes if exported symbols are required.
19426 always_export_symbols=$always_export_symbols_RC
19427
19428 # The commands to list exported symbols.
19429 export_symbols_cmds=$lt_export_symbols_cmds_RC
19430
19431 # The commands to extract the exported symbol list from a shared archive.
19432 extract_expsyms_cmds=$lt_extract_expsyms_cmds
19433
19434 # Symbols that should not be listed in the preloaded symbols.
19435 exclude_expsyms=$lt_exclude_expsyms_RC
19436
19437 # Symbols that must always be exported.
19438 include_expsyms=$lt_include_expsyms_RC
19439
19440 # ### END LIBTOOL TAG CONFIG: $tagname
19441
19442 __EOF__
19443
19444
19445 else
19446 # If there is no Makefile yet, we rely on a make rule to execute
19447 # `config.status --recheck' to rerun these tests and create the
19448 # libtool script then.
19449 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
19450 if test -f "$ltmain_in"; then
19451 test -f Makefile && make "$ltmain"
19452 fi
19453 fi
19454
19455
19456 ac_ext=c
19457 ac_cpp='$CPP $CPPFLAGS'
19458 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19459 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19460 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19461
19462 CC="$lt_save_CC"
19463
19464 ;;
19465
19466 *)
19467 { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
19468 echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
19469 { (exit 1); exit 1; }; }
19470 ;;
19471 esac
19472
19473 # Append the new tag name to the list of available tags.
19474 if test -n "$tagname" ; then
19475 available_tags="$available_tags $tagname"
19476 fi
19477 fi
19478 done
19479 IFS="$lt_save_ifs"
19480
19481 # Now substitute the updated list of available tags.
19482 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
19483 mv "${ofile}T" "$ofile"
19484 chmod +x "$ofile"
19485 else
19486 rm -f "${ofile}T"
19487 { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
19488 echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
19489 { (exit 1); exit 1; }; }
19490 fi
19491 fi
19492
19493
19494
19495 # This can be used to rebuild libtool when needed
19496 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
19497
19498 # Always use our own libtool.
19499 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
19500
19501 # Prevent multiple expansion
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523 # *****
19524 # GNOME
19525 # *****
19526
19527
19528
19529
19530 ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
19531 if test -n "$ac_macro_dir"; then
19532 ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
19533 fi
19534
19535
19536
19537
19538
19539 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19540 if test -n "$ac_tool_prefix"; then
19541 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19542 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19543 { echo "$as_me:$LINENO: checking for $ac_word" >&5
19544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19545 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
19546 echo $ECHO_N "(cached) $ECHO_C" >&6
19547 else
19548 case $PKG_CONFIG in
19549 [\\/]* | ?:[\\/]*)
19550 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19551 ;;
19552 *)
19553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19554 for as_dir in $PATH
19555 do
19556 IFS=$as_save_IFS
19557 test -z "$as_dir" && as_dir=.
19558 for ac_exec_ext in '' $ac_executable_extensions; do
19559 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19560 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19561 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19562 break 2
19563 fi
19564 done
19565 done
19566 IFS=$as_save_IFS
19567
19568 ;;
19569 esac
19570 fi
19571 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19572 if test -n "$PKG_CONFIG"; then
19573 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
19574 echo "${ECHO_T}$PKG_CONFIG" >&6; }
19575 else
19576 { echo "$as_me:$LINENO: result: no" >&5
19577 echo "${ECHO_T}no" >&6; }
19578 fi
19579
19580
19581 fi
19582 if test -z "$ac_cv_path_PKG_CONFIG"; then
19583 ac_pt_PKG_CONFIG=$PKG_CONFIG
19584 # Extract the first word of "pkg-config", so it can be a program name with args.
19585 set dummy pkg-config; ac_word=$2
19586 { echo "$as_me:$LINENO: checking for $ac_word" >&5
19587 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19588 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
19589 echo $ECHO_N "(cached) $ECHO_C" >&6
19590 else
19591 case $ac_pt_PKG_CONFIG in
19592 [\\/]* | ?:[\\/]*)
19593 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19594 ;;
19595 *)
19596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19597 for as_dir in $PATH
19598 do
19599 IFS=$as_save_IFS
19600 test -z "$as_dir" && as_dir=.
19601 for ac_exec_ext in '' $ac_executable_extensions; do
19602 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19603 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19604 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19605 break 2
19606 fi
19607 done
19608 done
19609 IFS=$as_save_IFS
19610
19611 ;;
19612 esac
19613 fi
19614 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19615 if test -n "$ac_pt_PKG_CONFIG"; then
19616 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
19617 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
19618 else
19619 { echo "$as_me:$LINENO: result: no" >&5
19620 echo "${ECHO_T}no" >&6; }
19621 fi
19622
19623 if test "x$ac_pt_PKG_CONFIG" = x; then
19624 PKG_CONFIG=""
19625 else
19626 case $cross_compiling:$ac_tool_warned in
19627 yes:)
19628 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
19629 whose name does not start with the host triplet. If you think this
19630 configuration is useful to you, please write to autoconf@gnu.org." >&5
19631 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
19632 whose name does not start with the host triplet. If you think this
19633 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
19634 ac_tool_warned=yes ;;
19635 esac
19636 PKG_CONFIG=$ac_pt_PKG_CONFIG
19637 fi
19638 else
19639 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19640 fi
19641
19642 fi
19643 if test -n "$PKG_CONFIG"; then
19644 _pkg_min_version=0.9.0
19645 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
19646 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; }
19647 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19648 { echo "$as_me:$LINENO: result: yes" >&5
19649 echo "${ECHO_T}yes" >&6; }
19650 else
19651 { echo "$as_me:$LINENO: result: no" >&5
19652 echo "${ECHO_T}no" >&6; }
19653 PKG_CONFIG=""
19654 fi
19655
19656 fi
19657
19658 gdu_cv_version_required=0.3.2
19659
19660 if test -n "$PKG_CONFIG" && \
19661 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gnome-doc-utils >= \$gdu_cv_version_required\"") >&5
19662 ($PKG_CONFIG --exists --print-errors "gnome-doc-utils >= $gdu_cv_version_required") 2>&5
19663 ac_status=$?
19664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19665 (exit $ac_status); }; then
19666 gdu_cv_have_gdu=yes
19667 else
19668 gdu_cv_have_gdu=no
19669 fi
19670
19671 if test "$gdu_cv_have_gdu" = "yes"; then
19672 :
19673 else
19674 { { echo "$as_me:$LINENO: error: gnome-doc-utils >= $gdu_cv_version_required not found" >&5
19675 echo "$as_me: error: gnome-doc-utils >= $gdu_cv_version_required not found" >&2;}
19676 { (exit 1); exit 1; }; }
19677 fi
19678
19679
19680
19681 # Check whether --with-help-dir was given.
19682 if test "${with_help_dir+set}" = set; then
19683 withval=$with_help_dir;
19684 else
19685 with_help_dir='${datadir}/gnome/help'
19686 fi
19687
19688 HELP_DIR="$with_help_dir"
19689
19690
19691
19692 # Check whether --with-omf-dir was given.
19693 if test "${with_omf_dir+set}" = set; then
19694 withval=$with_omf_dir;
19695 else
19696 with_omf_dir='${datadir}/omf'
19697 fi
19698
19699 OMF_DIR="$with_omf_dir"
19700
19701
19702
19703 # Check whether --with-help-formats was given.
19704 if test "${with_help_formats+set}" = set; then
19705 withval=$with_help_formats;
19706 else
19707 with_help_formats=''
19708 fi
19709
19710 DOC_USER_FORMATS="$with_help_formats"
19711
19712
19713 # Check whether --enable-scrollkeeper was given.
19714 if test "${enable_scrollkeeper+set}" = set; then
19715 enableval=$enable_scrollkeeper;
19716 else
19717 enable_scrollkeeper=yes
19718 fi
19719
19720 if test "$gdu_cv_have_gdu" = "yes" -a "$enable_scrollkeeper" = "yes"; then
19721 ENABLE_SK_TRUE=
19722 ENABLE_SK_FALSE='#'
19723 else
19724 ENABLE_SK_TRUE='#'
19725 ENABLE_SK_FALSE=
19726 fi
19727
19728
19729 if test "$gdu_cv_have_gdu" = "yes"; then
19730 HAVE_GNOME_DOC_UTILS_TRUE=
19731 HAVE_GNOME_DOC_UTILS_FALSE='#'
19732 else
19733 HAVE_GNOME_DOC_UTILS_TRUE='#'
19734 HAVE_GNOME_DOC_UTILS_FALSE=
19735 fi
19736
19737
19738
19739
19740 # Check whether --enable-debug was given.
19741 if test "${enable_debug+set}" = set; then
19742 enableval=$enable_debug;
19743 else
19744 enable_debug=no
19745 fi
19746
19747
19748 if test x$enable_debug = xyes ; then
19749
19750 cat >>confdefs.h <<\_ACEOF
19751 #define GNOME_ENABLE_DEBUG 1
19752 _ACEOF
19753
19754 fi
19755
19756
19757
19758 # Check whether --enable-compile-warnings was given.
19759 if test "${enable_compile_warnings+set}" = set; then
19760 enableval=$enable_compile_warnings;
19761 else
19762 enable_compile_warnings="maximum"
19763 fi
19764
19765
19766 warnCFLAGS=
19767 if test "x$GCC" != xyes; then
19768 enable_compile_warnings=no
19769 fi
19770
19771 warning_flags=
19772 realsave_CFLAGS="$CFLAGS"
19773
19774 case "$enable_compile_warnings" in
19775 no)
19776 warning_flags=
19777 ;;
19778 minimum)
19779 warning_flags="-Wall"
19780 ;;
19781 yes)
19782 warning_flags="-Wall -Wmissing-prototypes"
19783 ;;
19784 maximum|error)
19785 warning_flags="-Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
19786 CFLAGS="$warning_flags $CFLAGS"
19787 for option in -Wno-sign-compare; do
19788 SAVE_CFLAGS="$CFLAGS"
19789 CFLAGS="$CFLAGS $option"
19790 { echo "$as_me:$LINENO: checking whether gcc understands $option" >&5
19791 echo $ECHO_N "checking whether gcc understands $option... $ECHO_C" >&6; }
19792 cat >conftest.$ac_ext <<_ACEOF
19793 /* confdefs.h. */
19794 _ACEOF
19795 cat confdefs.h >>conftest.$ac_ext
19796 cat >>conftest.$ac_ext <<_ACEOF
19797 /* end confdefs.h. */
19798
19799 int
19800 main ()
19801 {
19802
19803 ;
19804 return 0;
19805 }
19806 _ACEOF
19807 rm -f conftest.$ac_objext
19808 if { (ac_try="$ac_compile"
19809 case "(($ac_try" in
19810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19811 *) ac_try_echo=$ac_try;;
19812 esac
19813 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19814 (eval "$ac_compile") 2>conftest.er1
19815 ac_status=$?
19816 grep -v '^ *+' conftest.er1 >conftest.err
19817 rm -f conftest.er1
19818 cat conftest.err >&5
19819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19820 (exit $ac_status); } && {
19821 test -z "$ac_c_werror_flag" ||
19822 test ! -s conftest.err
19823 } && test -s conftest.$ac_objext; then
19824 has_option=yes
19825 else
19826 echo "$as_me: failed program was:" >&5
19827 sed 's/^/| /' conftest.$ac_ext >&5
19828
19829 has_option=no
19830 fi
19831
19832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19833 CFLAGS="$SAVE_CFLAGS"
19834 { echo "$as_me:$LINENO: result: $has_option" >&5
19835 echo "${ECHO_T}$has_option" >&6; }
19836 if test $has_option = yes; then
19837 warning_flags="$warning_flags $option"
19838 fi
19839 unset has_option
19840 unset SAVE_CFLAGS
19841 done
19842 unset option
19843 if test "$enable_compile_warnings" = "error" ; then
19844 warning_flags="$warning_flags -Werror"
19845 fi
19846 ;;
19847 *)
19848 { { echo "$as_me:$LINENO: error: Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" >&5
19849 echo "$as_me: error: Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" >&2;}
19850 { (exit 1); exit 1; }; }
19851 ;;
19852 esac
19853 CFLAGS="$realsave_CFLAGS"
19854 { echo "$as_me:$LINENO: checking what warning flags to pass to the C compiler" >&5
19855 echo $ECHO_N "checking what warning flags to pass to the C compiler... $ECHO_C" >&6; }
19856 { echo "$as_me:$LINENO: result: $warning_flags" >&5
19857 echo "${ECHO_T}$warning_flags" >&6; }
19858
19859 # Check whether --enable-iso-c was given.
19860 if test "${enable_iso_c+set}" = set; then
19861 enableval=$enable_iso_c;
19862 else
19863 enable_iso_c=no
19864 fi
19865
19866
19867 { echo "$as_me:$LINENO: checking what language compliance flags to pass to the C compiler" >&5
19868 echo $ECHO_N "checking what language compliance flags to pass to the C compiler... $ECHO_C" >&6; }
19869 complCFLAGS=
19870 if test "x$enable_iso_c" != "xno"; then
19871 if test "x$GCC" = "xyes"; then
19872 case " $CFLAGS " in
19873 *\ \ -ansi\ \ *) ;;
19874 *) complCFLAGS="$complCFLAGS -ansi" ;;
19875 esac
19876 case " $CFLAGS " in
19877 *\ \ -pedantic\ \ *) ;;
19878 *) complCFLAGS="$complCFLAGS -pedantic" ;;
19879 esac
19880 fi
19881 fi
19882 { echo "$as_me:$LINENO: result: $complCFLAGS" >&5
19883 echo "${ECHO_T}$complCFLAGS" >&6; }
19884
19885 WARN_CFLAGS="$warning_flags $complCFLAGS"
19886
19887
19888
19889
19890
19891 if test $USE_MAINTAINER_MODE = yes; then
19892 DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED -DBONOBO_UI_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED"
19893 else
19894 DISABLE_DEPRECATED=""
19895 fi
19896
19897
19898
19899 # ***************************
19900 # Check for required packages
19901 # ***************************
19902
19903 GTK_REQUIRED=2.6.0
19904 LIBGNOME_REQUIRED=2.14.0
19905 LIBGNOMEUI_REQUIRED=2.14.0
19906 DBUS_GLIB_REQUIRED=0.71
19907 POLKIT_DBUS_REQUIRED=0.5
19908 POLKIT_GRANT_REQUIRED=0.5
19909
19910
19911 pkg_failed=no
19912 { echo "$as_me:$LINENO: checking for POLKIT_GNOME" >&5
19913 echo $ECHO_N "checking for POLKIT_GNOME... $ECHO_C" >&6; }
19914
19915 if test -n "$PKG_CONFIG"; then
19916 if test -n "$POLKIT_GNOME_CFLAGS"; then
19917 pkg_cv_POLKIT_GNOME_CFLAGS="$POLKIT_GNOME_CFLAGS"
19918 else
19919 if test -n "$PKG_CONFIG" && \
19920 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_REQUIRED
19921 libgnome-2.0 >= \$LIBGNOME_REQUIRED
19922 libgnomeui-2.0 >= \$LIBGNOMEUI_REQUIRED
19923 dbus-glib-1 >= \$DBUS_GLIB_REQUIRED
19924 polkit-dbus >= \$POLKIT_DBUS_REQUIRED
19925 polkit-grant >= \$POLKIT_GRANT_REQUIRED\"") >&5
19926 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_REQUIRED
19927 libgnome-2.0 >= $LIBGNOME_REQUIRED
19928 libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
19929 dbus-glib-1 >= $DBUS_GLIB_REQUIRED
19930 polkit-dbus >= $POLKIT_DBUS_REQUIRED
19931 polkit-grant >= $POLKIT_GRANT_REQUIRED") 2>&5
19932 ac_status=$?
19933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19934 (exit $ac_status); }; then
19935 pkg_cv_POLKIT_GNOME_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK_REQUIRED
19936 libgnome-2.0 >= $LIBGNOME_REQUIRED
19937 libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
19938 dbus-glib-1 >= $DBUS_GLIB_REQUIRED
19939 polkit-dbus >= $POLKIT_DBUS_REQUIRED
19940 polkit-grant >= $POLKIT_GRANT_REQUIRED" 2>/dev/null`
19941 else
19942 pkg_failed=yes
19943 fi
19944 fi
19945 else
19946 pkg_failed=untried
19947 fi
19948 if test -n "$PKG_CONFIG"; then
19949 if test -n "$POLKIT_GNOME_LIBS"; then
19950 pkg_cv_POLKIT_GNOME_LIBS="$POLKIT_GNOME_LIBS"
19951 else
19952 if test -n "$PKG_CONFIG" && \
19953 { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_REQUIRED
19954 libgnome-2.0 >= \$LIBGNOME_REQUIRED
19955 libgnomeui-2.0 >= \$LIBGNOMEUI_REQUIRED
19956 dbus-glib-1 >= \$DBUS_GLIB_REQUIRED
19957 polkit-dbus >= \$POLKIT_DBUS_REQUIRED
19958 polkit-grant >= \$POLKIT_GRANT_REQUIRED\"") >&5
19959 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_REQUIRED
19960 libgnome-2.0 >= $LIBGNOME_REQUIRED
19961 libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
19962 dbus-glib-1 >= $DBUS_GLIB_REQUIRED
19963 polkit-dbus >= $POLKIT_DBUS_REQUIRED
19964 polkit-grant >= $POLKIT_GRANT_REQUIRED") 2>&5
19965 ac_status=$?
19966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19967 (exit $ac_status); }; then
19968 pkg_cv_POLKIT_GNOME_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= $GTK_REQUIRED
19969 libgnome-2.0 >= $LIBGNOME_REQUIRED
19970 libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
19971 dbus-glib-1 >= $DBUS_GLIB_REQUIRED
19972 polkit-dbus >= $POLKIT_DBUS_REQUIRED
19973 polkit-grant >= $POLKIT_GRANT_REQUIRED" 2>/dev/null`
19974 else
19975 pkg_failed=yes
19976 fi
19977 fi
19978 else
19979 pkg_failed=untried
19980 fi
19981
19982
19983
19984 if test $pkg_failed = yes; then
19985
19986 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
19987 _pkg_short_errors_supported=yes
19988 else
19989 _pkg_short_errors_supported=no
19990 fi
19991 if test $_pkg_short_errors_supported = yes; then
19992 POLKIT_GNOME_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= $GTK_REQUIRED
19993 libgnome-2.0 >= $LIBGNOME_REQUIRED
19994 libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
19995 dbus-glib-1 >= $DBUS_GLIB_REQUIRED
19996 polkit-dbus >= $POLKIT_DBUS_REQUIRED
19997 polkit-grant >= $POLKIT_GRANT_REQUIRED"`
19998 else
19999 POLKIT_GNOME_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= $GTK_REQUIRED
20000 libgnome-2.0 >= $LIBGNOME_REQUIRED
20001 libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
20002 dbus-glib-1 >= $DBUS_GLIB_REQUIRED
20003 polkit-dbus >= $POLKIT_DBUS_REQUIRED
20004 polkit-grant >= $POLKIT_GRANT_REQUIRED"`
20005 fi
20006 # Put the nasty error message in config.log where it belongs
20007 echo "$POLKIT_GNOME_PKG_ERRORS" >&5
20008
20009 { { echo "$as_me:$LINENO: error: Package requirements (gtk+-2.0 >= $GTK_REQUIRED
20010 libgnome-2.0 >= $LIBGNOME_REQUIRED
20011 libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
20012 dbus-glib-1 >= $DBUS_GLIB_REQUIRED
20013 polkit-dbus >= $POLKIT_DBUS_REQUIRED
20014 polkit-grant >= $POLKIT_GRANT_REQUIRED) were not met:
20015
20016 $POLKIT_GNOME_PKG_ERRORS
20017
20018 Consider adjusting the PKG_CONFIG_PATH environment variable if you
20019 installed software in a non-standard prefix.
20020
20021 Alternatively, you may set the environment variables POLKIT_GNOME_CFLAGS
20022 and POLKIT_GNOME_LIBS to avoid the need to call pkg-config.
20023 See the pkg-config man page for more details.
20024 " >&5
20025 echo "$as_me: error: Package requirements (gtk+-2.0 >= $GTK_REQUIRED
20026 libgnome-2.0 >= $LIBGNOME_REQUIRED
20027 libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
20028 dbus-glib-1 >= $DBUS_GLIB_REQUIRED
20029 polkit-dbus >= $POLKIT_DBUS_REQUIRED
20030 polkit-grant >= $POLKIT_GRANT_REQUIRED) were not met:
20031
20032 $POLKIT_GNOME_PKG_ERRORS
20033
20034 Consider adjusting the PKG_CONFIG_PATH environment variable if you
20035 installed software in a non-standard prefix.
20036
20037 Alternatively, you may set the environment variables POLKIT_GNOME_CFLAGS
20038 and POLKIT_GNOME_LIBS to avoid the need to call pkg-config.
20039 See the pkg-config man page for more details.
20040 " >&2;}
20041 { (exit 1); exit 1; }; }
20042 elif test $pkg_failed = untried; then
20043 { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it
20044 is in your PATH or set the PKG_CONFIG environment variable to the full
20045 path to pkg-config.
20046
20047 Alternatively, you may set the environment variables POLKIT_GNOME_CFLAGS
20048 and POLKIT_GNOME_LIBS to avoid the need to call pkg-config.
20049 See the pkg-config man page for more details.
20050
20051 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
20052 See \`config.log' for more details." >&5
20053 echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it
20054 is in your PATH or set the PKG_CONFIG environment variable to the full
20055 path to pkg-config.
20056
20057 Alternatively, you may set the environment variables POLKIT_GNOME_CFLAGS
20058 and POLKIT_GNOME_LIBS to avoid the need to call pkg-config.
20059 See the pkg-config man page for more details.
20060
20061 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
20062 See \`config.log' for more details." >&2;}
20063 { (exit 1); exit 1; }; }
20064 else
20065 POLKIT_GNOME_CFLAGS=$pkg_cv_POLKIT_GNOME_CFLAGS
20066 POLKIT_GNOME_LIBS=$pkg_cv_POLKIT_GNOME_LIBS
20067 { echo "$as_me:$LINENO: result: yes" >&5
20068 echo "${ECHO_T}yes" >&6; }
20069 :
20070 fi
20071
20072 # Extract the first word of "polkit-policy-file-validate", so it can be a program name with args.
20073 set dummy polkit-policy-file-validate; ac_word=$2
20074 { echo "$as_me:$LINENO: checking for $ac_word" >&5
20075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
20076 if test "${ac_cv_prog_POLKIT_POLICY_FILE_VALIDATE+set}" = set; then
20077 echo $ECHO_N "(cached) $ECHO_C" >&6
20078 else
20079 if test -n "$POLKIT_POLICY_FILE_VALIDATE"; then
20080 ac_cv_prog_POLKIT_POLICY_FILE_VALIDATE="$POLKIT_POLICY_FILE_VALIDATE" # Let the user override the test.
20081 else
20082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20083 for as_dir in $PATH
20084 do
20085 IFS=$as_save_IFS
20086 test -z "$as_dir" && as_dir=.
20087 for ac_exec_ext in '' $ac_executable_extensions; do
20088 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20089 ac_cv_prog_POLKIT_POLICY_FILE_VALIDATE="polkit-policy-file-validate"
20090 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20091 break 2
20092 fi
20093 done
20094 done
20095 IFS=$as_save_IFS
20096
20097 fi
20098 fi
20099 POLKIT_POLICY_FILE_VALIDATE=$ac_cv_prog_POLKIT_POLICY_FILE_VALIDATE
20100 if test -n "$POLKIT_POLICY_FILE_VALIDATE"; then
20101 { echo "$as_me:$LINENO: result: $POLKIT_POLICY_FILE_VALIDATE" >&5
20102 echo "${ECHO_T}$POLKIT_POLICY_FILE_VALIDATE" >&6; }
20103 else
20104 { echo "$as_me:$LINENO: result: no" >&5
20105 echo "${ECHO_T}no" >&6; }
20106 fi
20107
20108
20109 if test -z "$POLKIT_POLICY_FILE_VALIDATE"; then
20110 { { echo "$as_me:$LINENO: error: polkit-policy-file-validate not found" >&5
20111 echo "$as_me: error: polkit-policy-file-validate not found" >&2;}
20112 { (exit 1); exit 1; }; }
20113 fi
20114
20115 # ********************
20116 # Internationalisation
20117 # ********************
20118
20119
20120 case "$am__api_version" in
20121 1.01234)
20122 { { echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5
20123 echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
20124 { (exit 1); exit 1; }; }
20125 ;;
20126 *)
20127 ;;
20128 esac
20129
20130 if test -n "0.35.0"; then
20131 { echo "$as_me:$LINENO: checking for intltool >= 0.35.0" >&5
20132 echo $ECHO_N "checking for intltool >= 0.35.0... $ECHO_C" >&6; }
20133
20134 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
20135 INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
20136 INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
20137
20138 { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
20139 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
20140 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
20141 { { echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.35.0 or later." >&5
20142 echo "$as_me: error: Your intltool is too old. You need intltool 0.35.0 or later." >&2;}
20143 { (exit 1); exit 1; }; }
20144 fi
20145
20146 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20147 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20148 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20149 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20150 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@'
20151 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20152 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20153 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20154 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20155 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20156 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20157 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@'
20158 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20159 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20160 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20161 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20162 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20163 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20164 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186 # Use the tools built into the package, not the ones that are installed.
20187 INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
20188
20189 INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
20190
20191 INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
20192
20193
20194 # Extract the first word of "perl", so it can be a program name with args.
20195 set dummy perl; ac_word=$2
20196 { echo "$as_me:$LINENO: checking for $ac_word" >&5
20197 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
20198 if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
20199 echo $ECHO_N "(cached) $ECHO_C" >&6
20200 else
20201 case $INTLTOOL_PERL in
20202 [\\/]* | ?:[\\/]*)
20203 ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
20204 ;;
20205 *)
20206 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20207 for as_dir in $PATH
20208 do
20209 IFS=$as_save_IFS
20210 test -z "$as_dir" && as_dir=.
20211 for ac_exec_ext in '' $ac_executable_extensions; do
20212 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20213 ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
20214 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20215 break 2
20216 fi
20217 done
20218 done
20219 IFS=$as_save_IFS
20220
20221 ;;
20222 esac
20223 fi
20224 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
20225 if test -n "$INTLTOOL_PERL"; then
20226 { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
20227 echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
20228 else
20229 { echo "$as_me:$LINENO: result: no" >&5
20230 echo "${ECHO_T}no" >&6; }
20231 fi
20232
20233
20234 if test -z "$INTLTOOL_PERL"; then
20235 { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
20236 echo "$as_me: error: perl not found; required for intltool" >&2;}
20237 { (exit 1); exit 1; }; }
20238 fi
20239 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
20240 { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
20241 echo "$as_me: error: perl 5.x required for intltool" >&2;}
20242 { (exit 1); exit 1; }; }
20243 fi
20244 if test "x" != "xno-xml"; then
20245 { echo "$as_me:$LINENO: checking for XML::Parser" >&5
20246 echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6; }
20247 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
20248 { echo "$as_me:$LINENO: result: ok" >&5
20249 echo "${ECHO_T}ok" >&6; }
20250 else
20251 { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5
20252 echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
20253 { (exit 1); exit 1; }; }
20254 fi
20255 fi
20256
20257 # Substitute ALL_LINGUAS so we can use it in po/Makefile
20258
20259
20260 # Set DATADIRNAME correctly if it is not set yet
20261 # (copied from glib-gettext.m4)
20262 if test -z "$DATADIRNAME"; then
20263 cat >conftest.$ac_ext <<_ACEOF
20264 /* confdefs.h. */
20265 _ACEOF
20266 cat confdefs.h >>conftest.$ac_ext
20267 cat >>conftest.$ac_ext <<_ACEOF
20268 /* end confdefs.h. */
20269
20270 int
20271 main ()
20272 {
20273 extern int _nl_msg_cat_cntr;
20274 return _nl_msg_cat_cntr
20275 ;
20276 return 0;
20277 }
20278 _ACEOF
20279 rm -f conftest.$ac_objext conftest$ac_exeext
20280 if { (ac_try="$ac_link"
20281 case "(($ac_try" in
20282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20283 *) ac_try_echo=$ac_try;;
20284 esac
20285 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20286 (eval "$ac_link") 2>conftest.er1
20287 ac_status=$?
20288 grep -v '^ *+' conftest.er1 >conftest.err
20289 rm -f conftest.er1
20290 cat conftest.err >&5
20291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20292 (exit $ac_status); } && {
20293 test -z "$ac_c_werror_flag" ||
20294 test ! -s conftest.err
20295 } && test -s conftest$ac_exeext &&
20296 $as_test_x conftest$ac_exeext; then
20297 DATADIRNAME=share
20298 else
20299 echo "$as_me: failed program was:" >&5
20300 sed 's/^/| /' conftest.$ac_ext >&5
20301
20302 case $host in
20303 *-*-solaris*)
20304 { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
20305 echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
20306 if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
20307 echo $ECHO_N "(cached) $ECHO_C" >&6
20308 else
20309 cat >conftest.$ac_ext <<_ACEOF
20310 /* confdefs.h. */
20311 _ACEOF
20312 cat confdefs.h >>conftest.$ac_ext
20313 cat >>conftest.$ac_ext <<_ACEOF
20314 /* end confdefs.h. */
20315 /* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
20316 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20317 #define bind_textdomain_codeset innocuous_bind_textdomain_codeset
20318
20319 /* System header to define __stub macros and hopefully few prototypes,
20320 which can conflict with char bind_textdomain_codeset (); below.
20321 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20322 <limits.h> exists even on freestanding compilers. */
20323
20324 #ifdef __STDC__
20325 # include <limits.h>
20326 #else
20327 # include <assert.h>
20328 #endif
20329
20330 #undef bind_textdomain_codeset
20331
20332 /* Override any GCC internal prototype to avoid an error.
20333 Use char because int might match the return type of a GCC
20334 builtin and then its argument prototype would still apply. */
20335 #ifdef __cplusplus
20336 extern "C"
20337 #endif
20338 char bind_textdomain_codeset ();
20339 /* The GNU C library defines this for functions which it implements
20340 to always fail with ENOSYS. Some functions are actually named
20341 something starting with __ and the normal name is an alias. */
20342 #if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
20343 choke me
20344 #endif
20345
20346 int
20347 main ()
20348 {
20349 return bind_textdomain_codeset ();
20350 ;
20351 return 0;
20352 }
20353 _ACEOF
20354 rm -f conftest.$ac_objext conftest$ac_exeext
20355 if { (ac_try="$ac_link"
20356 case "(($ac_try" in
20357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20358 *) ac_try_echo=$ac_try;;
20359 esac
20360 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20361 (eval "$ac_link") 2>conftest.er1
20362 ac_status=$?
20363 grep -v '^ *+' conftest.er1 >conftest.err
20364 rm -f conftest.er1
20365 cat conftest.err >&5
20366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20367 (exit $ac_status); } && {
20368 test -z "$ac_c_werror_flag" ||
20369 test ! -s conftest.err
20370 } && test -s conftest$ac_exeext &&
20371 $as_test_x conftest$ac_exeext; then
20372 ac_cv_func_bind_textdomain_codeset=yes
20373 else
20374 echo "$as_me: failed program was:" >&5
20375 sed 's/^/| /' conftest.$ac_ext >&5
20376
20377 ac_cv_func_bind_textdomain_codeset=no
20378 fi
20379
20380 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20381 conftest$ac_exeext conftest.$ac_ext
20382 fi
20383 { echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
20384 echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; }
20385 if test $ac_cv_func_bind_textdomain_codeset = yes; then
20386 DATADIRNAME=share
20387 else
20388 DATADIRNAME=lib
20389 fi
20390
20391 ;;
20392 *)
20393 DATADIRNAME=lib
20394 ;;
20395 esac
20396 fi
20397
20398 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20399 conftest$ac_exeext conftest.$ac_ext
20400 fi
20401
20402
20403
20404
20405
20406 ac_config_commands="$ac_config_commands intltool"
20407
20408
20409
20410
20411 GETTEXT_PACKAGE=PolicyKit-gnome
20412
20413
20414
20415 for ac_header in locale.h
20416 do
20417 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20418 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20419 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20420 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20421 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20422 echo $ECHO_N "(cached) $ECHO_C" >&6
20423 fi
20424 ac_res=`eval echo '${'$as_ac_Header'}'`
20425 { echo "$as_me:$LINENO: result: $ac_res" >&5
20426 echo "${ECHO_T}$ac_res" >&6; }
20427 else
20428 # Is the header compilable?
20429 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
20430 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
20431 cat >conftest.$ac_ext <<_ACEOF
20432 /* confdefs.h. */
20433 _ACEOF
20434 cat confdefs.h >>conftest.$ac_ext
20435 cat >>conftest.$ac_ext <<_ACEOF
20436 /* end confdefs.h. */
20437 $ac_includes_default
20438 #include <$ac_header>
20439 _ACEOF
20440 rm -f conftest.$ac_objext
20441 if { (ac_try="$ac_compile"
20442 case "(($ac_try" in
20443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20444 *) ac_try_echo=$ac_try;;
20445 esac
20446 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20447 (eval "$ac_compile") 2>conftest.er1
20448 ac_status=$?
20449 grep -v '^ *+' conftest.er1 >conftest.err
20450 rm -f conftest.er1
20451 cat conftest.err >&5
20452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20453 (exit $ac_status); } && {
20454 test -z "$ac_c_werror_flag" ||
20455 test ! -s conftest.err
20456 } && test -s conftest.$ac_objext; then
20457 ac_header_compiler=yes
20458 else
20459 echo "$as_me: failed program was:" >&5
20460 sed 's/^/| /' conftest.$ac_ext >&5
20461
20462 ac_header_compiler=no
20463 fi
20464
20465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20466 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20467 echo "${ECHO_T}$ac_header_compiler" >&6; }
20468
20469 # Is the header present?
20470 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
20471 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
20472 cat >conftest.$ac_ext <<_ACEOF
20473 /* confdefs.h. */
20474 _ACEOF
20475 cat confdefs.h >>conftest.$ac_ext
20476 cat >>conftest.$ac_ext <<_ACEOF
20477 /* end confdefs.h. */
20478 #include <$ac_header>
20479 _ACEOF
20480 if { (ac_try="$ac_cpp conftest.$ac_ext"
20481 case "(($ac_try" in
20482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20483 *) ac_try_echo=$ac_try;;
20484 esac
20485 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20486 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20487 ac_status=$?
20488 grep -v '^ *+' conftest.er1 >conftest.err
20489 rm -f conftest.er1
20490 cat conftest.err >&5
20491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20492 (exit $ac_status); } >/dev/null && {
20493 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20494 test ! -s conftest.err
20495 }; then
20496 ac_header_preproc=yes
20497 else
20498 echo "$as_me: failed program was:" >&5
20499 sed 's/^/| /' conftest.$ac_ext >&5
20500
20501 ac_header_preproc=no
20502 fi
20503
20504 rm -f conftest.err conftest.$ac_ext
20505 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20506 echo "${ECHO_T}$ac_header_preproc" >&6; }
20507
20508 # So? What about this header?
20509 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20510 yes:no: )
20511 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20512 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
20513 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20514 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20515 ac_header_preproc=yes
20516 ;;
20517 no:yes:* )
20518 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20519 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
20520 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20521 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20522 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20523 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20524 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20525 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
20526 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
20527 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
20528 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20529 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
20530 ( cat <<\_ASBOX
20531 ## ------------------------------------ ##
20532 ## Report this to mailto:david@fubar.dk ##
20533 ## ------------------------------------ ##
20534 _ASBOX
20535 ) | sed "s/^/$as_me: WARNING: /" >&2
20536 ;;
20537 esac
20538 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20539 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20540 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20541 echo $ECHO_N "(cached) $ECHO_C" >&6
20542 else
20543 eval "$as_ac_Header=\$ac_header_preproc"
20544 fi
20545 ac_res=`eval echo '${'$as_ac_Header'}'`
20546 { echo "$as_me:$LINENO: result: $ac_res" >&5
20547 echo "${ECHO_T}$ac_res" >&6; }
20548
20549 fi
20550 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20551 cat >>confdefs.h <<_ACEOF
20552 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20553 _ACEOF
20554
20555 fi
20556
20557 done
20558
20559 if test $ac_cv_header_locale_h = yes; then
20560 { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
20561 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
20562 if test "${am_cv_val_LC_MESSAGES+set}" = set; then
20563 echo $ECHO_N "(cached) $ECHO_C" >&6
20564 else
20565 cat >conftest.$ac_ext <<_ACEOF
20566 /* confdefs.h. */
20567 _ACEOF
20568 cat confdefs.h >>conftest.$ac_ext
20569 cat >>conftest.$ac_ext <<_ACEOF
20570 /* end confdefs.h. */
20571 #include <locale.h>
20572 int
20573 main ()
20574 {
20575 return LC_MESSAGES
20576 ;
20577 return 0;
20578 }
20579 _ACEOF
20580 rm -f conftest.$ac_objext conftest$ac_exeext
20581 if { (ac_try="$ac_link"
20582 case "(($ac_try" in
20583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20584 *) ac_try_echo=$ac_try;;
20585 esac
20586 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20587 (eval "$ac_link") 2>conftest.er1
20588 ac_status=$?
20589 grep -v '^ *+' conftest.er1 >conftest.err
20590 rm -f conftest.er1
20591 cat conftest.err >&5
20592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20593 (exit $ac_status); } && {
20594 test -z "$ac_c_werror_flag" ||
20595 test ! -s conftest.err
20596 } && test -s conftest$ac_exeext &&
20597 $as_test_x conftest$ac_exeext; then
20598 am_cv_val_LC_MESSAGES=yes
20599 else
20600 echo "$as_me: failed program was:" >&5
20601 sed 's/^/| /' conftest.$ac_ext >&5
20602
20603 am_cv_val_LC_MESSAGES=no
20604 fi
20605
20606 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20607 conftest$ac_exeext conftest.$ac_ext
20608 fi
20609 { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
20610 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
20611 if test $am_cv_val_LC_MESSAGES = yes; then
20612
20613 cat >>confdefs.h <<\_ACEOF
20614 #define HAVE_LC_MESSAGES 1
20615 _ACEOF
20616
20617 fi
20618 fi
20619 USE_NLS=yes
20620
20621
20622 gt_cv_have_gettext=no
20623
20624 CATOBJEXT=NONE
20625 XGETTEXT=:
20626 INTLLIBS=
20627
20628 if test "${ac_cv_header_libintl_h+set}" = set; then
20629 { echo "$as_me:$LINENO: checking for libintl.h" >&5
20630 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
20631 if test "${ac_cv_header_libintl_h+set}" = set; then
20632 echo $ECHO_N "(cached) $ECHO_C" >&6
20633 fi
20634 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
20635 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
20636 else
20637 # Is the header compilable?
20638 { echo "$as_me:$LINENO: checking libintl.h usability" >&5
20639 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
20640 cat >conftest.$ac_ext <<_ACEOF
20641 /* confdefs.h. */
20642 _ACEOF
20643 cat confdefs.h >>conftest.$ac_ext
20644 cat >>conftest.$ac_ext <<_ACEOF
20645 /* end confdefs.h. */
20646 $ac_includes_default
20647 #include <libintl.h>
20648 _ACEOF
20649 rm -f conftest.$ac_objext
20650 if { (ac_try="$ac_compile"
20651 case "(($ac_try" in
20652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20653 *) ac_try_echo=$ac_try;;
20654 esac
20655 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20656 (eval "$ac_compile") 2>conftest.er1
20657 ac_status=$?
20658 grep -v '^ *+' conftest.er1 >conftest.err
20659 rm -f conftest.er1
20660 cat conftest.err >&5
20661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20662 (exit $ac_status); } && {
20663 test -z "$ac_c_werror_flag" ||
20664 test ! -s conftest.err
20665 } && test -s conftest.$ac_objext; then
20666 ac_header_compiler=yes
20667 else
20668 echo "$as_me: failed program was:" >&5
20669 sed 's/^/| /' conftest.$ac_ext >&5
20670
20671 ac_header_compiler=no
20672 fi
20673
20674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20675 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20676 echo "${ECHO_T}$ac_header_compiler" >&6; }
20677
20678 # Is the header present?
20679 { echo "$as_me:$LINENO: checking libintl.h presence" >&5
20680 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
20681 cat >conftest.$ac_ext <<_ACEOF
20682 /* confdefs.h. */
20683 _ACEOF
20684 cat confdefs.h >>conftest.$ac_ext
20685 cat >>conftest.$ac_ext <<_ACEOF
20686 /* end confdefs.h. */
20687 #include <libintl.h>
20688 _ACEOF
20689 if { (ac_try="$ac_cpp conftest.$ac_ext"
20690 case "(($ac_try" in
20691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20692 *) ac_try_echo=$ac_try;;
20693 esac
20694 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
20696 ac_status=$?
20697 grep -v '^ *+' conftest.er1 >conftest.err
20698 rm -f conftest.er1
20699 cat conftest.err >&5
20700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20701 (exit $ac_status); } >/dev/null && {
20702 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20703 test ! -s conftest.err
20704 }; then
20705 ac_header_preproc=yes
20706 else
20707 echo "$as_me: failed program was:" >&5
20708 sed 's/^/| /' conftest.$ac_ext >&5
20709
20710 ac_header_preproc=no
20711 fi
20712
20713 rm -f conftest.err conftest.$ac_ext
20714 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20715 echo "${ECHO_T}$ac_header_preproc" >&6; }
20716
20717 # So? What about this header?
20718 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20719 yes:no: )
20720 { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
20721 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
20722 { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
20723 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
20724 ac_header_preproc=yes
20725 ;;
20726 no:yes:* )
20727 { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
20728 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
20729 { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
20730 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
20731 { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
20732 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
20733 { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
20734 echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
20735 { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
20736 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
20737 { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
20738 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
20739 ( cat <<\_ASBOX
20740 ## ------------------------------------ ##
20741 ## Report this to mailto:david@fubar.dk ##
20742 ## ------------------------------------ ##
20743 _ASBOX
20744 ) | sed "s/^/$as_me: WARNING: /" >&2
20745 ;;
20746 esac
20747 { echo "$as_me:$LINENO: checking for libintl.h" >&5
20748 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
20749 if test "${ac_cv_header_libintl_h+set}" = set; then
20750 echo $ECHO_N "(cached) $ECHO_C" >&6
20751 else
20752 ac_cv_header_libintl_h=$ac_header_preproc
20753 fi
20754 { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
20755 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
20756
20757 fi
20758 if test $ac_cv_header_libintl_h = yes; then
20759 gt_cv_func_dgettext_libintl="no"
20760 libintl_extra_libs=""
20761
20762 #
20763 # First check in libc
20764 #
20765 { echo "$as_me:$LINENO: checking for ngettext in libc" >&5
20766 echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6; }
20767 if test "${gt_cv_func_ngettext_libc+set}" = set; then
20768 echo $ECHO_N "(cached) $ECHO_C" >&6
20769 else
20770 cat >conftest.$ac_ext <<_ACEOF
20771 /* confdefs.h. */
20772 _ACEOF
20773 cat confdefs.h >>conftest.$ac_ext
20774 cat >>conftest.$ac_ext <<_ACEOF
20775 /* end confdefs.h. */
20776
20777 #include <libintl.h>
20778
20779 int
20780 main ()
20781 {
20782 return !ngettext ("","", 1)
20783 ;
20784 return 0;
20785 }
20786 _ACEOF
20787 rm -f conftest.$ac_objext conftest$ac_exeext
20788 if { (ac_try="$ac_link"
20789 case "(($ac_try" in
20790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20791 *) ac_try_echo=$ac_try;;
20792 esac
20793 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20794 (eval "$ac_link") 2>conftest.er1
20795 ac_status=$?
20796 grep -v '^ *+' conftest.er1 >conftest.err
20797 rm -f conftest.er1
20798 cat conftest.err >&5
20799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20800 (exit $ac_status); } && {
20801 test -z "$ac_c_werror_flag" ||
20802 test ! -s conftest.err
20803 } && test -s conftest$ac_exeext &&
20804 $as_test_x conftest$ac_exeext; then
20805 gt_cv_func_ngettext_libc=yes
20806 else
20807 echo "$as_me: failed program was:" >&5
20808 sed 's/^/| /' conftest.$ac_ext >&5
20809
20810 gt_cv_func_ngettext_libc=no
20811 fi
20812
20813 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20814 conftest$ac_exeext conftest.$ac_ext
20815
20816 fi
20817 { echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5
20818 echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6; }
20819
20820 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
20821 { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
20822 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
20823 if test "${gt_cv_func_dgettext_libc+set}" = set; then
20824 echo $ECHO_N "(cached) $ECHO_C" >&6
20825 else
20826 cat >conftest.$ac_ext <<_ACEOF
20827 /* confdefs.h. */
20828 _ACEOF
20829 cat confdefs.h >>conftest.$ac_ext
20830 cat >>conftest.$ac_ext <<_ACEOF
20831 /* end confdefs.h. */
20832
20833 #include <libintl.h>
20834
20835 int
20836 main ()
20837 {
20838 return !dgettext ("","")
20839 ;
20840 return 0;
20841 }
20842 _ACEOF
20843 rm -f conftest.$ac_objext conftest$ac_exeext
20844 if { (ac_try="$ac_link"
20845 case "(($ac_try" in
20846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20847 *) ac_try_echo=$ac_try;;
20848 esac
20849 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20850 (eval "$ac_link") 2>conftest.er1
20851 ac_status=$?
20852 grep -v '^ *+' conftest.er1 >conftest.err
20853 rm -f conftest.er1
20854 cat conftest.err >&5
20855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20856 (exit $ac_status); } && {
20857 test -z "$ac_c_werror_flag" ||
20858 test ! -s conftest.err
20859 } && test -s conftest$ac_exeext &&
20860 $as_test_x conftest$ac_exeext; then
20861 gt_cv_func_dgettext_libc=yes
20862 else
20863 echo "$as_me: failed program was:" >&5
20864 sed 's/^/| /' conftest.$ac_ext >&5
20865
20866 gt_cv_func_dgettext_libc=no
20867 fi
20868
20869 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20870 conftest$ac_exeext conftest.$ac_ext
20871
20872 fi
20873 { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
20874 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
20875 fi
20876
20877 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
20878
20879 for ac_func in bind_textdomain_codeset
20880 do
20881 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20882 { echo "$as_me:$LINENO: checking for $ac_func" >&5
20883 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20884 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20885 echo $ECHO_N "(cached) $ECHO_C" >&6
20886 else
20887 cat >conftest.$ac_ext <<_ACEOF
20888 /* confdefs.h. */
20889 _ACEOF
20890 cat confdefs.h >>conftest.$ac_ext
20891 cat >>conftest.$ac_ext <<_ACEOF
20892 /* end confdefs.h. */
20893 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20894 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20895 #define $ac_func innocuous_$ac_func
20896
20897 /* System header to define __stub macros and hopefully few prototypes,
20898 which can conflict with char $ac_func (); below.
20899 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20900 <limits.h> exists even on freestanding compilers. */
20901
20902 #ifdef __STDC__
20903 # include <limits.h>
20904 #else
20905 # include <assert.h>
20906 #endif
20907
20908 #undef $ac_func
20909
20910 /* Override any GCC internal prototype to avoid an error.
20911 Use char because int might match the return type of a GCC
20912 builtin and then its argument prototype would still apply. */
20913 #ifdef __cplusplus
20914 extern "C"
20915 #endif
20916 char $ac_func ();
20917 /* The GNU C library defines this for functions which it implements
20918 to always fail with ENOSYS. Some functions are actually named
20919 something starting with __ and the normal name is an alias. */
20920 #if defined __stub_$ac_func || defined __stub___$ac_func
20921 choke me
20922 #endif
20923
20924 int
20925 main ()
20926 {
20927 return $ac_func ();
20928 ;
20929 return 0;
20930 }
20931 _ACEOF
20932 rm -f conftest.$ac_objext conftest$ac_exeext
20933 if { (ac_try="$ac_link"
20934 case "(($ac_try" in
20935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20936 *) ac_try_echo=$ac_try;;
20937 esac
20938 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20939 (eval "$ac_link") 2>conftest.er1
20940 ac_status=$?
20941 grep -v '^ *+' conftest.er1 >conftest.err
20942 rm -f conftest.er1
20943 cat conftest.err >&5
20944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20945 (exit $ac_status); } && {
20946 test -z "$ac_c_werror_flag" ||
20947 test ! -s conftest.err
20948 } && test -s conftest$ac_exeext &&
20949 $as_test_x conftest$ac_exeext; then
20950 eval "$as_ac_var=yes"
20951 else
20952 echo "$as_me: failed program was:" >&5
20953 sed 's/^/| /' conftest.$ac_ext >&5
20954
20955 eval "$as_ac_var=no"
20956 fi
20957
20958 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20959 conftest$ac_exeext conftest.$ac_ext
20960 fi
20961 ac_res=`eval echo '${'$as_ac_var'}'`
20962 { echo "$as_me:$LINENO: result: $ac_res" >&5
20963 echo "${ECHO_T}$ac_res" >&6; }
20964 if test `eval echo '${'$as_ac_var'}'` = yes; then
20965 cat >>confdefs.h <<_ACEOF
20966 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20967 _ACEOF
20968
20969 fi
20970 done
20971
20972 fi
20973
20974 #
20975 # If we don't have everything we want, check in libintl
20976 #
20977 if test "$gt_cv_func_dgettext_libc" != "yes" \
20978 || test "$gt_cv_func_ngettext_libc" != "yes" \
20979 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
20980
20981 { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
20982 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
20983 if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
20984 echo $ECHO_N "(cached) $ECHO_C" >&6
20985 else
20986 ac_check_lib_save_LIBS=$LIBS
20987 LIBS="-lintl $LIBS"
20988 cat >conftest.$ac_ext <<_ACEOF
20989 /* confdefs.h. */
20990 _ACEOF
20991 cat confdefs.h >>conftest.$ac_ext
20992 cat >>conftest.$ac_ext <<_ACEOF
20993 /* end confdefs.h. */
20994
20995 /* Override any GCC internal prototype to avoid an error.
20996 Use char because int might match the return type of a GCC
20997 builtin and then its argument prototype would still apply. */
20998 #ifdef __cplusplus
20999 extern "C"
21000 #endif
21001 char bindtextdomain ();
21002 int
21003 main ()
21004 {
21005 return bindtextdomain ();
21006 ;
21007 return 0;
21008 }
21009 _ACEOF
21010 rm -f conftest.$ac_objext conftest$ac_exeext
21011 if { (ac_try="$ac_link"
21012 case "(($ac_try" in
21013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21014 *) ac_try_echo=$ac_try;;
21015 esac
21016 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21017 (eval "$ac_link") 2>conftest.er1
21018 ac_status=$?
21019 grep -v '^ *+' conftest.er1 >conftest.err
21020 rm -f conftest.er1
21021 cat conftest.err >&5
21022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21023 (exit $ac_status); } && {
21024 test -z "$ac_c_werror_flag" ||
21025 test ! -s conftest.err
21026 } && test -s conftest$ac_exeext &&
21027 $as_test_x conftest$ac_exeext; then
21028 ac_cv_lib_intl_bindtextdomain=yes
21029 else
21030 echo "$as_me: failed program was:" >&5
21031 sed 's/^/| /' conftest.$ac_ext >&5
21032
21033 ac_cv_lib_intl_bindtextdomain=no
21034 fi
21035
21036 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21037 conftest$ac_exeext conftest.$ac_ext
21038 LIBS=$ac_check_lib_save_LIBS
21039 fi
21040 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
21041 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
21042 if test $ac_cv_lib_intl_bindtextdomain = yes; then
21043 { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
21044 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; }
21045 if test "${ac_cv_lib_intl_ngettext+set}" = set; then
21046 echo $ECHO_N "(cached) $ECHO_C" >&6
21047 else
21048 ac_check_lib_save_LIBS=$LIBS
21049 LIBS="-lintl $LIBS"
21050 cat >conftest.$ac_ext <<_ACEOF
21051 /* confdefs.h. */
21052 _ACEOF
21053 cat confdefs.h >>conftest.$ac_ext
21054 cat >>conftest.$ac_ext <<_ACEOF
21055 /* end confdefs.h. */
21056
21057 /* Override any GCC internal prototype to avoid an error.
21058 Use char because int might match the return type of a GCC
21059 builtin and then its argument prototype would still apply. */
21060 #ifdef __cplusplus
21061 extern "C"
21062 #endif
21063 char ngettext ();
21064 int
21065 main ()
21066 {
21067 return ngettext ();
21068 ;
21069 return 0;
21070 }
21071 _ACEOF
21072 rm -f conftest.$ac_objext conftest$ac_exeext
21073 if { (ac_try="$ac_link"
21074 case "(($ac_try" in
21075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21076 *) ac_try_echo=$ac_try;;
21077 esac
21078 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21079 (eval "$ac_link") 2>conftest.er1
21080 ac_status=$?
21081 grep -v '^ *+' conftest.er1 >conftest.err
21082 rm -f conftest.er1
21083 cat conftest.err >&5
21084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21085 (exit $ac_status); } && {
21086 test -z "$ac_c_werror_flag" ||
21087 test ! -s conftest.err
21088 } && test -s conftest$ac_exeext &&
21089 $as_test_x conftest$ac_exeext; then
21090 ac_cv_lib_intl_ngettext=yes
21091 else
21092 echo "$as_me: failed program was:" >&5
21093 sed 's/^/| /' conftest.$ac_ext >&5
21094
21095 ac_cv_lib_intl_ngettext=no
21096 fi
21097
21098 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21099 conftest$ac_exeext conftest.$ac_ext
21100 LIBS=$ac_check_lib_save_LIBS
21101 fi
21102 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
21103 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; }
21104 if test $ac_cv_lib_intl_ngettext = yes; then
21105 { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
21106 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
21107 if test "${ac_cv_lib_intl_dgettext+set}" = set; then
21108 echo $ECHO_N "(cached) $ECHO_C" >&6
21109 else
21110 ac_check_lib_save_LIBS=$LIBS
21111 LIBS="-lintl $LIBS"
21112 cat >conftest.$ac_ext <<_ACEOF
21113 /* confdefs.h. */
21114 _ACEOF
21115 cat confdefs.h >>conftest.$ac_ext
21116 cat >>conftest.$ac_ext <<_ACEOF
21117 /* end confdefs.h. */
21118
21119 /* Override any GCC internal prototype to avoid an error.
21120 Use char because int might match the return type of a GCC
21121 builtin and then its argument prototype would still apply. */
21122 #ifdef __cplusplus
21123 extern "C"
21124 #endif
21125 char dgettext ();
21126 int
21127 main ()
21128 {
21129 return dgettext ();
21130 ;
21131 return 0;
21132 }
21133 _ACEOF
21134 rm -f conftest.$ac_objext conftest$ac_exeext
21135 if { (ac_try="$ac_link"
21136 case "(($ac_try" in
21137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21138 *) ac_try_echo=$ac_try;;
21139 esac
21140 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21141 (eval "$ac_link") 2>conftest.er1
21142 ac_status=$?
21143 grep -v '^ *+' conftest.er1 >conftest.err
21144 rm -f conftest.er1
21145 cat conftest.err >&5
21146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21147 (exit $ac_status); } && {
21148 test -z "$ac_c_werror_flag" ||
21149 test ! -s conftest.err
21150 } && test -s conftest$ac_exeext &&
21151 $as_test_x conftest$ac_exeext; then
21152 ac_cv_lib_intl_dgettext=yes
21153 else
21154 echo "$as_me: failed program was:" >&5
21155 sed 's/^/| /' conftest.$ac_ext >&5
21156
21157 ac_cv_lib_intl_dgettext=no
21158 fi
21159
21160 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21161 conftest$ac_exeext conftest.$ac_ext
21162 LIBS=$ac_check_lib_save_LIBS
21163 fi
21164 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
21165 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
21166 if test $ac_cv_lib_intl_dgettext = yes; then
21167 gt_cv_func_dgettext_libintl=yes
21168 fi
21169
21170 fi
21171
21172 fi
21173
21174
21175 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
21176 { echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5
21177 echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6; }
21178 { echo "$as_me:$LINENO: result: " >&5
21179 echo "${ECHO_T}" >&6; }
21180 { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
21181 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; }
21182 if test "${ac_cv_lib_intl_ngettext+set}" = set; then
21183 echo $ECHO_N "(cached) $ECHO_C" >&6
21184 else
21185 ac_check_lib_save_LIBS=$LIBS
21186 LIBS="-lintl -liconv $LIBS"
21187 cat >conftest.$ac_ext <<_ACEOF
21188 /* confdefs.h. */
21189 _ACEOF
21190 cat confdefs.h >>conftest.$ac_ext
21191 cat >>conftest.$ac_ext <<_ACEOF
21192 /* end confdefs.h. */
21193
21194 /* Override any GCC internal prototype to avoid an error.
21195 Use char because int might match the return type of a GCC
21196 builtin and then its argument prototype would still apply. */
21197 #ifdef __cplusplus
21198 extern "C"
21199 #endif
21200 char ngettext ();
21201 int
21202 main ()
21203 {
21204 return ngettext ();
21205 ;
21206 return 0;
21207 }
21208 _ACEOF
21209 rm -f conftest.$ac_objext conftest$ac_exeext
21210 if { (ac_try="$ac_link"
21211 case "(($ac_try" in
21212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21213 *) ac_try_echo=$ac_try;;
21214 esac
21215 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21216 (eval "$ac_link") 2>conftest.er1
21217 ac_status=$?
21218 grep -v '^ *+' conftest.er1 >conftest.err
21219 rm -f conftest.er1
21220 cat conftest.err >&5
21221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21222 (exit $ac_status); } && {
21223 test -z "$ac_c_werror_flag" ||
21224 test ! -s conftest.err
21225 } && test -s conftest$ac_exeext &&
21226 $as_test_x conftest$ac_exeext; then
21227 ac_cv_lib_intl_ngettext=yes
21228 else
21229 echo "$as_me: failed program was:" >&5
21230 sed 's/^/| /' conftest.$ac_ext >&5
21231
21232 ac_cv_lib_intl_ngettext=no
21233 fi
21234
21235 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21236 conftest$ac_exeext conftest.$ac_ext
21237 LIBS=$ac_check_lib_save_LIBS
21238 fi
21239 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
21240 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; }
21241 if test $ac_cv_lib_intl_ngettext = yes; then
21242 { echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5
21243 echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6; }
21244 if test "${ac_cv_lib_intl_dcgettext+set}" = set; then
21245 echo $ECHO_N "(cached) $ECHO_C" >&6
21246 else
21247 ac_check_lib_save_LIBS=$LIBS
21248 LIBS="-lintl -liconv $LIBS"
21249 cat >conftest.$ac_ext <<_ACEOF
21250 /* confdefs.h. */
21251 _ACEOF
21252 cat confdefs.h >>conftest.$ac_ext
21253 cat >>conftest.$ac_ext <<_ACEOF
21254 /* end confdefs.h. */
21255
21256 /* Override any GCC internal prototype to avoid an error.
21257 Use char because int might match the return type of a GCC
21258 builtin and then its argument prototype would still apply. */
21259 #ifdef __cplusplus
21260 extern "C"
21261 #endif
21262 char dcgettext ();
21263 int
21264 main ()
21265 {
21266 return dcgettext ();
21267 ;
21268 return 0;
21269 }
21270 _ACEOF
21271 rm -f conftest.$ac_objext conftest$ac_exeext
21272 if { (ac_try="$ac_link"
21273 case "(($ac_try" in
21274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21275 *) ac_try_echo=$ac_try;;
21276 esac
21277 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21278 (eval "$ac_link") 2>conftest.er1
21279 ac_status=$?
21280 grep -v '^ *+' conftest.er1 >conftest.err
21281 rm -f conftest.er1
21282 cat conftest.err >&5
21283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21284 (exit $ac_status); } && {
21285 test -z "$ac_c_werror_flag" ||
21286 test ! -s conftest.err
21287 } && test -s conftest$ac_exeext &&
21288 $as_test_x conftest$ac_exeext; then
21289 ac_cv_lib_intl_dcgettext=yes
21290 else
21291 echo "$as_me: failed program was:" >&5
21292 sed 's/^/| /' conftest.$ac_ext >&5
21293
21294 ac_cv_lib_intl_dcgettext=no
21295 fi
21296
21297 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21298 conftest$ac_exeext conftest.$ac_ext
21299 LIBS=$ac_check_lib_save_LIBS
21300 fi
21301 { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
21302 echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6; }
21303 if test $ac_cv_lib_intl_dcgettext = yes; then
21304 gt_cv_func_dgettext_libintl=yes
21305 libintl_extra_libs=-liconv
21306 else
21307 :
21308 fi
21309
21310 else
21311 :
21312 fi
21313
21314 fi
21315
21316 #
21317 # If we found libintl, then check in it for bind_textdomain_codeset();
21318 # we'll prefer libc if neither have bind_textdomain_codeset(),
21319 # and both have dgettext and ngettext
21320 #
21321 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
21322 glib_save_LIBS="$LIBS"
21323 LIBS="$LIBS -lintl $libintl_extra_libs"
21324 unset ac_cv_func_bind_textdomain_codeset
21325
21326 for ac_func in bind_textdomain_codeset
21327 do
21328 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21329 { echo "$as_me:$LINENO: checking for $ac_func" >&5
21330 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21331 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21332 echo $ECHO_N "(cached) $ECHO_C" >&6
21333 else
21334 cat >conftest.$ac_ext <<_ACEOF
21335 /* confdefs.h. */
21336 _ACEOF
21337 cat confdefs.h >>conftest.$ac_ext
21338 cat >>conftest.$ac_ext <<_ACEOF
21339 /* end confdefs.h. */
21340 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21341 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21342 #define $ac_func innocuous_$ac_func
21343
21344 /* System header to define __stub macros and hopefully few prototypes,
21345 which can conflict with char $ac_func (); below.
21346 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21347 <limits.h> exists even on freestanding compilers. */
21348
21349 #ifdef __STDC__
21350 # include <limits.h>
21351 #else
21352 # include <assert.h>
21353 #endif
21354
21355 #undef $ac_func
21356
21357 /* Override any GCC internal prototype to avoid an error.
21358 Use char because int might match the return type of a GCC
21359 builtin and then its argument prototype would still apply. */
21360 #ifdef __cplusplus
21361 extern "C"
21362 #endif
21363 char $ac_func ();
21364 /* The GNU C library defines this for functions which it implements
21365 to always fail with ENOSYS. Some functions are actually named
21366 something starting with __ and the normal name is an alias. */
21367 #if defined __stub_$ac_func || defined __stub___$ac_func
21368 choke me
21369 #endif
21370
21371 int
21372 main ()
21373 {
21374 return $ac_func ();
21375 ;
21376 return 0;
21377 }
21378 _ACEOF
21379 rm -f conftest.$ac_objext conftest$ac_exeext
21380 if { (ac_try="$ac_link"
21381 case "(($ac_try" in
21382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21383 *) ac_try_echo=$ac_try;;
21384 esac
21385 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21386 (eval "$ac_link") 2>conftest.er1
21387 ac_status=$?
21388 grep -v '^ *+' conftest.er1 >conftest.err
21389 rm -f conftest.er1
21390 cat conftest.err >&5
21391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21392 (exit $ac_status); } && {
21393 test -z "$ac_c_werror_flag" ||
21394 test ! -s conftest.err
21395 } && test -s conftest$ac_exeext &&
21396 $as_test_x conftest$ac_exeext; then
21397 eval "$as_ac_var=yes"
21398 else
21399 echo "$as_me: failed program was:" >&5
21400 sed 's/^/| /' conftest.$ac_ext >&5
21401
21402 eval "$as_ac_var=no"
21403 fi
21404
21405 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21406 conftest$ac_exeext conftest.$ac_ext
21407 fi
21408 ac_res=`eval echo '${'$as_ac_var'}'`
21409 { echo "$as_me:$LINENO: result: $ac_res" >&5
21410 echo "${ECHO_T}$ac_res" >&6; }
21411 if test `eval echo '${'$as_ac_var'}'` = yes; then
21412 cat >>confdefs.h <<_ACEOF
21413 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21414 _ACEOF
21415
21416 fi
21417 done
21418
21419 LIBS="$glib_save_LIBS"
21420
21421 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
21422 gt_cv_func_dgettext_libc=no
21423 else
21424 if test "$gt_cv_func_dgettext_libc" = "yes" \
21425 && test "$gt_cv_func_ngettext_libc" = "yes"; then
21426 gt_cv_func_dgettext_libintl=no
21427 fi
21428 fi
21429 fi
21430 fi
21431
21432 if test "$gt_cv_func_dgettext_libc" = "yes" \
21433 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
21434 gt_cv_have_gettext=yes
21435 fi
21436
21437 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
21438 INTLLIBS="-lintl $libintl_extra_libs"
21439 fi
21440
21441 if test "$gt_cv_have_gettext" = "yes"; then
21442
21443 cat >>confdefs.h <<\_ACEOF
21444 #define HAVE_GETTEXT 1
21445 _ACEOF
21446
21447 # Extract the first word of "msgfmt", so it can be a program name with args.
21448 set dummy msgfmt; ac_word=$2
21449 { echo "$as_me:$LINENO: checking for $ac_word" >&5
21450 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
21451 if test "${ac_cv_path_MSGFMT+set}" = set; then
21452 echo $ECHO_N "(cached) $ECHO_C" >&6
21453 else
21454 case "$MSGFMT" in
21455 /*)
21456 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
21457 ;;
21458 *)
21459 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
21460 for ac_dir in $PATH; do
21461 test -z "$ac_dir" && ac_dir=.
21462 if test -f $ac_dir/$ac_word; then
21463 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
21464 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
21465 break
21466 fi
21467 fi
21468 done
21469 IFS="$ac_save_ifs"
21470 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
21471 ;;
21472 esac
21473 fi
21474 MSGFMT="$ac_cv_path_MSGFMT"
21475 if test "$MSGFMT" != "no"; then
21476 { echo "$as_me:$LINENO: result: $MSGFMT" >&5
21477 echo "${ECHO_T}$MSGFMT" >&6; }
21478 else
21479 { echo "$as_me:$LINENO: result: no" >&5
21480 echo "${ECHO_T}no" >&6; }
21481 fi
21482 if test "$MSGFMT" != "no"; then
21483 glib_save_LIBS="$LIBS"
21484 LIBS="$LIBS $INTLLIBS"
21485
21486 for ac_func in dcgettext
21487 do
21488 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21489 { echo "$as_me:$LINENO: checking for $ac_func" >&5
21490 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21491 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21492 echo $ECHO_N "(cached) $ECHO_C" >&6
21493 else
21494 cat >conftest.$ac_ext <<_ACEOF
21495 /* confdefs.h. */
21496 _ACEOF
21497 cat confdefs.h >>conftest.$ac_ext
21498 cat >>conftest.$ac_ext <<_ACEOF
21499 /* end confdefs.h. */
21500 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21501 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21502 #define $ac_func innocuous_$ac_func
21503
21504 /* System header to define __stub macros and hopefully few prototypes,
21505 which can conflict with char $ac_func (); below.
21506 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21507 <limits.h> exists even on freestanding compilers. */
21508
21509 #ifdef __STDC__
21510 # include <limits.h>
21511 #else
21512 # include <assert.h>
21513 #endif
21514
21515 #undef $ac_func
21516
21517 /* Override any GCC internal prototype to avoid an error.
21518 Use char because int might match the return type of a GCC
21519 builtin and then its argument prototype would still apply. */
21520 #ifdef __cplusplus
21521 extern "C"
21522 #endif
21523 char $ac_func ();
21524 /* The GNU C library defines this for functions which it implements
21525 to always fail with ENOSYS. Some functions are actually named
21526 something starting with __ and the normal name is an alias. */
21527 #if defined __stub_$ac_func || defined __stub___$ac_func
21528 choke me
21529 #endif
21530
21531 int
21532 main ()
21533 {
21534 return $ac_func ();
21535 ;
21536 return 0;
21537 }
21538 _ACEOF
21539 rm -f conftest.$ac_objext conftest$ac_exeext
21540 if { (ac_try="$ac_link"
21541 case "(($ac_try" in
21542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21543 *) ac_try_echo=$ac_try;;
21544 esac
21545 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21546 (eval "$ac_link") 2>conftest.er1
21547 ac_status=$?
21548 grep -v '^ *+' conftest.er1 >conftest.err
21549 rm -f conftest.er1
21550 cat conftest.err >&5
21551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21552 (exit $ac_status); } && {
21553 test -z "$ac_c_werror_flag" ||
21554 test ! -s conftest.err
21555 } && test -s conftest$ac_exeext &&
21556 $as_test_x conftest$ac_exeext; then
21557 eval "$as_ac_var=yes"
21558 else
21559 echo "$as_me: failed program was:" >&5
21560 sed 's/^/| /' conftest.$ac_ext >&5
21561
21562 eval "$as_ac_var=no"
21563 fi
21564
21565 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21566 conftest$ac_exeext conftest.$ac_ext
21567 fi
21568 ac_res=`eval echo '${'$as_ac_var'}'`
21569 { echo "$as_me:$LINENO: result: $ac_res" >&5
21570 echo "${ECHO_T}$ac_res" >&6; }
21571 if test `eval echo '${'$as_ac_var'}'` = yes; then
21572 cat >>confdefs.h <<_ACEOF
21573 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21574 _ACEOF
21575
21576 fi
21577 done
21578
21579 MSGFMT_OPTS=
21580 { echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5
21581 echo $ECHO_N "checking if msgfmt accepts -c... $ECHO_C" >&6; }
21582 cat >conftest.foo <<_ACEOF
21583
21584 msgid ""
21585 msgstr ""
21586 "Content-Type: text/plain; charset=UTF-8\n"
21587 "Project-Id-Version: test 1.0\n"
21588 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
21589 "Last-Translator: test <foo@bar.xx>\n"
21590 "Language-Team: C <LL@li.org>\n"
21591 "MIME-Version: 1.0\n"
21592 "Content-Transfer-Encoding: 8bit\n"
21593
21594 _ACEOF
21595 if { (echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5
21596 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
21597 ac_status=$?
21598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21599 (exit $ac_status); }; then
21600 MSGFMT_OPTS=-c; { echo "$as_me:$LINENO: result: yes" >&5
21601 echo "${ECHO_T}yes" >&6; }
21602 else { echo "$as_me:$LINENO: result: no" >&5
21603 echo "${ECHO_T}no" >&6; }
21604 echo "$as_me: failed input was:" >&5
21605 sed 's/^/| /' conftest.foo >&5
21606 fi
21607
21608 # Extract the first word of "gmsgfmt", so it can be a program name with args.
21609 set dummy gmsgfmt; ac_word=$2
21610 { echo "$as_me:$LINENO: checking for $ac_word" >&5
21611 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
21612 if test "${ac_cv_path_GMSGFMT+set}" = set; then
21613 echo $ECHO_N "(cached) $ECHO_C" >&6
21614 else
21615 case $GMSGFMT in
21616 [\\/]* | ?:[\\/]*)
21617 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
21618 ;;
21619 *)
21620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21621 for as_dir in $PATH
21622 do
21623 IFS=$as_save_IFS
21624 test -z "$as_dir" && as_dir=.
21625 for ac_exec_ext in '' $ac_executable_extensions; do
21626 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21627 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
21628 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
21629 break 2
21630 fi
21631 done
21632 done
21633 IFS=$as_save_IFS
21634
21635 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
21636 ;;
21637 esac
21638 fi
21639 GMSGFMT=$ac_cv_path_GMSGFMT
21640 if test -n "$GMSGFMT"; then
21641 { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
21642 echo "${ECHO_T}$GMSGFMT" >&6; }
21643 else
21644 { echo "$as_me:$LINENO: result: no" >&5
21645 echo "${ECHO_T}no" >&6; }
21646 fi
21647
21648
21649 # Extract the first word of "xgettext", so it can be a program name with args.
21650 set dummy xgettext; ac_word=$2
21651 { echo "$as_me:$LINENO: checking for $ac_word" >&5
21652 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
21653 if test "${ac_cv_path_XGETTEXT+set}" = set; then
21654 echo $ECHO_N "(cached) $ECHO_C" >&6
21655 else
21656 case "$XGETTEXT" in
21657 /*)
21658 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
21659 ;;
21660 *)
21661 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
21662 for ac_dir in $PATH; do
21663 test -z "$ac_dir" && ac_dir=.
21664 if test -f $ac_dir/$ac_word; then
21665 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
21666 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
21667 break
21668 fi
21669 fi
21670 done
21671 IFS="$ac_save_ifs"
21672 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
21673 ;;
21674 esac
21675 fi
21676 XGETTEXT="$ac_cv_path_XGETTEXT"
21677 if test "$XGETTEXT" != ":"; then
21678 { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
21679 echo "${ECHO_T}$XGETTEXT" >&6; }
21680 else
21681 { echo "$as_me:$LINENO: result: no" >&5
21682 echo "${ECHO_T}no" >&6; }
21683 fi
21684
21685 cat >conftest.$ac_ext <<_ACEOF
21686 /* confdefs.h. */
21687 _ACEOF
21688 cat confdefs.h >>conftest.$ac_ext
21689 cat >>conftest.$ac_ext <<_ACEOF
21690 /* end confdefs.h. */
21691
21692 int
21693 main ()
21694 {
21695 extern int _nl_msg_cat_cntr;
21696 return _nl_msg_cat_cntr
21697 ;
21698 return 0;
21699 }
21700 _ACEOF
21701 rm -f conftest.$ac_objext conftest$ac_exeext
21702 if { (ac_try="$ac_link"
21703 case "(($ac_try" in
21704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21705 *) ac_try_echo=$ac_try;;
21706 esac
21707 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21708 (eval "$ac_link") 2>conftest.er1
21709 ac_status=$?
21710 grep -v '^ *+' conftest.er1 >conftest.err
21711 rm -f conftest.er1
21712 cat conftest.err >&5
21713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21714 (exit $ac_status); } && {
21715 test -z "$ac_c_werror_flag" ||
21716 test ! -s conftest.err
21717 } && test -s conftest$ac_exeext &&
21718 $as_test_x conftest$ac_exeext; then
21719 CATOBJEXT=.gmo
21720 DATADIRNAME=share
21721 else
21722 echo "$as_me: failed program was:" >&5
21723 sed 's/^/| /' conftest.$ac_ext >&5
21724
21725 case $host in
21726 *-*-solaris*)
21727 { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
21728 echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
21729 if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
21730 echo $ECHO_N "(cached) $ECHO_C" >&6
21731 else
21732 cat >conftest.$ac_ext <<_ACEOF
21733 /* confdefs.h. */
21734 _ACEOF
21735 cat confdefs.h >>conftest.$ac_ext
21736 cat >>conftest.$ac_ext <<_ACEOF
21737 /* end confdefs.h. */
21738 /* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
21739 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21740 #define bind_textdomain_codeset innocuous_bind_textdomain_codeset
21741
21742 /* System header to define __stub macros and hopefully few prototypes,
21743 which can conflict with char bind_textdomain_codeset (); below.
21744 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21745 <limits.h> exists even on freestanding compilers. */
21746
21747 #ifdef __STDC__
21748 # include <limits.h>
21749 #else
21750 # include <assert.h>
21751 #endif
21752
21753 #undef bind_textdomain_codeset
21754
21755 /* Override any GCC internal prototype to avoid an error.
21756 Use char because int might match the return type of a GCC
21757 builtin and then its argument prototype would still apply. */
21758 #ifdef __cplusplus
21759 extern "C"
21760 #endif
21761 char bind_textdomain_codeset ();
21762 /* The GNU C library defines this for functions which it implements
21763 to always fail with ENOSYS. Some functions are actually named
21764 something starting with __ and the normal name is an alias. */
21765 #if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
21766 choke me
21767 #endif
21768
21769 int
21770 main ()
21771 {
21772 return bind_textdomain_codeset ();
21773 ;
21774 return 0;
21775 }
21776 _ACEOF
21777 rm -f conftest.$ac_objext conftest$ac_exeext
21778 if { (ac_try="$ac_link"
21779 case "(($ac_try" in
21780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21781 *) ac_try_echo=$ac_try;;
21782 esac
21783 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21784 (eval "$ac_link") 2>conftest.er1
21785 ac_status=$?
21786 grep -v '^ *+' conftest.er1 >conftest.err
21787 rm -f conftest.er1
21788 cat conftest.err >&5
21789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21790 (exit $ac_status); } && {
21791 test -z "$ac_c_werror_flag" ||
21792 test ! -s conftest.err
21793 } && test -s conftest$ac_exeext &&
21794 $as_test_x conftest$ac_exeext; then
21795 ac_cv_func_bind_textdomain_codeset=yes
21796 else
21797 echo "$as_me: failed program was:" >&5
21798 sed 's/^/| /' conftest.$ac_ext >&5
21799
21800 ac_cv_func_bind_textdomain_codeset=no
21801 fi
21802
21803 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21804 conftest$ac_exeext conftest.$ac_ext
21805 fi
21806 { echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
21807 echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; }
21808 if test $ac_cv_func_bind_textdomain_codeset = yes; then
21809 CATOBJEXT=.gmo
21810 DATADIRNAME=share
21811 else
21812 CATOBJEXT=.mo
21813 DATADIRNAME=lib
21814 fi
21815
21816 ;;
21817 *)
21818 CATOBJEXT=.mo
21819 DATADIRNAME=lib
21820 ;;
21821 esac
21822 fi
21823
21824 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21825 conftest$ac_exeext conftest.$ac_ext
21826 LIBS="$glib_save_LIBS"
21827 INSTOBJEXT=.mo
21828 else
21829 gt_cv_have_gettext=no
21830 fi
21831 fi
21832
21833 fi
21834
21835
21836
21837 if test "$gt_cv_have_gettext" = "yes" ; then
21838
21839 cat >>confdefs.h <<\_ACEOF
21840 #define ENABLE_NLS 1
21841 _ACEOF
21842
21843 fi
21844
21845 if test "$XGETTEXT" != ":"; then
21846 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
21847 : ;
21848 else
21849 { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
21850 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
21851 XGETTEXT=":"
21852 fi
21853 fi
21854
21855 # We need to process the po/ directory.
21856 POSUB=po
21857
21858 ac_config_commands="$ac_config_commands default-1"
21859
21860
21861 for lang in $ALL_LINGUAS; do
21862 GMOFILES="$GMOFILES $lang.gmo"
21863 POFILES="$POFILES $lang.po"
21864 done
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878 if test "$gt_cv_have_gettext" = "yes"; then
21879 if test "x$ALL_LINGUAS" = "x"; then
21880 LINGUAS=
21881 else
21882 { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
21883 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
21884 NEW_LINGUAS=
21885 for presentlang in $ALL_LINGUAS; do
21886 useit=no
21887 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
21888 desiredlanguages="$LINGUAS"
21889 else
21890 desiredlanguages="$ALL_LINGUAS"
21891 fi
21892 for desiredlang in $desiredlanguages; do
21893 # Use the presentlang catalog if desiredlang is
21894 # a. equal to presentlang, or
21895 # b. a variant of presentlang (because in this case,
21896 # presentlang can be used as a fallback for messages
21897 # which are not translated in the desiredlang catalog).
21898 case "$desiredlang" in
21899 "$presentlang"*) useit=yes;;
21900 esac
21901 done
21902 if test $useit = yes; then
21903 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
21904 fi
21905 done
21906 LINGUAS=$NEW_LINGUAS
21907 { echo "$as_me:$LINENO: result: $LINGUAS" >&5
21908 echo "${ECHO_T}$LINGUAS" >&6; }
21909 fi
21910
21911 if test -n "$LINGUAS"; then
21912 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
21913 fi
21914 fi
21915
21916 MKINSTALLDIRS=
21917 if test -n "$ac_aux_dir"; then
21918 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
21919 fi
21920 if test -z "$MKINSTALLDIRS"; then
21921 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
21922 fi
21923
21924
21925 test -d po || mkdir po
21926 if test "x$srcdir" != "x."; then
21927 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
21928 posrcprefix="$srcdir/"
21929 else
21930 posrcprefix="../$srcdir/"
21931 fi
21932 else
21933 posrcprefix="../"
21934 fi
21935 rm -f po/POTFILES
21936 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
21937 < $srcdir/po/POTFILES.in > po/POTFILES
21938
21939
21940 cat >>confdefs.h <<_ACEOF
21941 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
21942 _ACEOF
21943
21944
21945 # *************************************
21946 # *************************************
21947
21948
21949
21950
21951
21952
21953 ac_config_files="$ac_config_files Makefile data/Makefile examples/Makefile src/Makefile po/Makefile.in"
21954
21955
21956 cat >confcache <<\_ACEOF
21957 # This file is a shell script that caches the results of configure
21958 # tests run on this system so they can be shared between configure
21959 # scripts and configure runs, see configure's option --config-cache.
21960 # It is not useful on other systems. If it contains results you don't
21961 # want to keep, you may remove or edit it.
21962 #
21963 # config.status only pays attention to the cache file if you give it
21964 # the --recheck option to rerun configure.
21965 #
21966 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21967 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21968 # following values.
21969
21970 _ACEOF
21971
21972 # The following way of writing the cache mishandles newlines in values,
21973 # but we know of no workaround that is simple, portable, and efficient.
21974 # So, we kill variables containing newlines.
21975 # Ultrix sh set writes to stderr and can't be redirected directly,
21976 # and sets the high bit in the cache file unless we assign to the vars.
21977 (
21978 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21979 eval ac_val=\$$ac_var
21980 case $ac_val in #(
21981 *${as_nl}*)
21982 case $ac_var in #(
21983 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
21984 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
21985 esac
21986 case $ac_var in #(
21987 _ | IFS | as_nl) ;; #(
21988 *) $as_unset $ac_var ;;
21989 esac ;;
21990 esac
21991 done
21992
21993 (set) 2>&1 |
21994 case $as_nl`(ac_space=' '; set) 2>&1` in #(
21995 *${as_nl}ac_space=\ *)
21996 # `set' does not quote correctly, so add quotes (double-quote
21997 # substitution turns \\\\ into \\, and sed turns \\ into \).
21998 sed -n \
21999 "s/'/'\\\\''/g;
22000 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22001 ;; #(
22002 *)
22003 # `set' quotes correctly as required by POSIX, so do not add quotes.
22004 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
22005 ;;
22006 esac |
22007 sort
22008 ) |
22009 sed '
22010 /^ac_cv_env_/b end
22011 t clear
22012 :clear
22013 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22014 t end
22015 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22016 :end' >>confcache
22017 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
22018 if test -w "$cache_file"; then
22019 test "x$cache_file" != "x/dev/null" &&
22020 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
22021 echo "$as_me: updating cache $cache_file" >&6;}
22022 cat confcache >$cache_file
22023 else
22024 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
22025 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
22026 fi
22027 fi
22028 rm -f confcache
22029
22030 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22031 # Let make expand exec_prefix.
22032 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22033
22034 DEFS=-DHAVE_CONFIG_H
22035
22036 ac_libobjs=
22037 ac_ltlibobjs=
22038 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22039 # 1. Remove the extension, and $U if already installed.
22040 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
22041 ac_i=`echo "$ac_i" | sed "$ac_script"`
22042 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
22043 # will be set to the directory where LIBOBJS objects are built.
22044 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
22045 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
22046 done
22047 LIBOBJS=$ac_libobjs
22048
22049 LTLIBOBJS=$ac_ltlibobjs
22050
22051
22052 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
22053 { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
22054 Usually this means the macro was only invoked conditionally." >&5
22055 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
22056 Usually this means the macro was only invoked conditionally." >&2;}
22057 { (exit 1); exit 1; }; }
22058 fi
22059 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
22060 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
22061 Usually this means the macro was only invoked conditionally." >&5
22062 echo "$as_me: error: conditional \"AMDEP\" was never defined.
22063 Usually this means the macro was only invoked conditionally." >&2;}
22064 { (exit 1); exit 1; }; }
22065 fi
22066 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
22067 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
22068 Usually this means the macro was only invoked conditionally." >&5
22069 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
22070 Usually this means the macro was only invoked conditionally." >&2;}
22071 { (exit 1); exit 1; }; }
22072 fi
22073 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
22074 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
22075 Usually this means the macro was only invoked conditionally." >&5
22076 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
22077 Usually this means the macro was only invoked conditionally." >&2;}
22078 { (exit 1); exit 1; }; }
22079 fi
22080 if test -z "${ENABLE_SK_TRUE}" && test -z "${ENABLE_SK_FALSE}"; then
22081 { { echo "$as_me:$LINENO: error: conditional \"ENABLE_SK\" was never defined.
22082 Usually this means the macro was only invoked conditionally." >&5
22083 echo "$as_me: error: conditional \"ENABLE_SK\" was never defined.
22084 Usually this means the macro was only invoked conditionally." >&2;}
22085 { (exit 1); exit 1; }; }
22086 fi
22087 if test -z "${HAVE_GNOME_DOC_UTILS_TRUE}" && test -z "${HAVE_GNOME_DOC_UTILS_FALSE}"; then
22088 { { echo "$as_me:$LINENO: error: conditional \"HAVE_GNOME_DOC_UTILS\" was never defined.
22089 Usually this means the macro was only invoked conditionally." >&5
22090 echo "$as_me: error: conditional \"HAVE_GNOME_DOC_UTILS\" was never defined.
22091 Usually this means the macro was only invoked conditionally." >&2;}
22092 { (exit 1); exit 1; }; }
22093 fi
22094
22095 ac_config_commands="$ac_config_commands po/stamp-it"
22096
22097
22098
22099 : ${CONFIG_STATUS=./config.status}
22100 ac_clean_files_save=$ac_clean_files
22101 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22102 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22103 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22104 cat >$CONFIG_STATUS <<_ACEOF
22105 #! $SHELL
22106 # Generated by $as_me.
22107 # Run this file to recreate the current configuration.
22108 # Compiler output produced by configure, useful for debugging
22109 # configure, is in config.log if it exists.
22110
22111 debug=false
22112 ac_cs_recheck=false
22113 ac_cs_silent=false
22114 SHELL=\${CONFIG_SHELL-$SHELL}
22115 _ACEOF
22116
22117 cat >>$CONFIG_STATUS <<\_ACEOF
22118 ## --------------------- ##
22119 ## M4sh Initialization. ##
22120 ## --------------------- ##
22121
22122 # Be more Bourne compatible
22123 DUALCASE=1; export DUALCASE # for MKS sh
22124 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22125 emulate sh
22126 NULLCMD=:
22127 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22128 # is contrary to our usage. Disable this feature.
22129 alias -g '${1+"$@"}'='"$@"'
22130 setopt NO_GLOB_SUBST
22131 else
22132 case `(set -o) 2>/dev/null` in
22133 *posix*) set -o posix ;;
22134 esac
22135
22136 fi
22137
22138
22139
22140
22141 # PATH needs CR
22142 # Avoid depending upon Character Ranges.
22143 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22144 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22145 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22146 as_cr_digits='0123456789'
22147 as_cr_alnum=$as_cr_Letters$as_cr_digits
22148
22149 # The user is always right.
22150 if test "${PATH_SEPARATOR+set}" != set; then
22151 echo "#! /bin/sh" >conf$$.sh
22152 echo "exit 0" >>conf$$.sh
22153 chmod +x conf$$.sh
22154 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22155 PATH_SEPARATOR=';'
22156 else
22157 PATH_SEPARATOR=:
22158 fi
22159 rm -f conf$$.sh
22160 fi
22161
22162 # Support unset when possible.
22163 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22164 as_unset=unset
22165 else
22166 as_unset=false
22167 fi
22168
22169
22170 # IFS
22171 # We need space, tab and new line, in precisely that order. Quoting is
22172 # there to prevent editors from complaining about space-tab.
22173 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
22174 # splitting by setting IFS to empty value.)
22175 as_nl='
22176 '
22177 IFS=" "" $as_nl"
22178
22179 # Find who we are. Look in the path if we contain no directory separator.
22180 case $0 in
22181 *[\\/]* ) as_myself=$0 ;;
22182 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22183 for as_dir in $PATH
22184 do
22185 IFS=$as_save_IFS
22186 test -z "$as_dir" && as_dir=.
22187 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22188 done
22189 IFS=$as_save_IFS
22190
22191 ;;
22192 esac
22193 # We did not find ourselves, most probably we were run as `sh COMMAND'
22194 # in which case we are not to be found in the path.
22195 if test "x$as_myself" = x; then
22196 as_myself=$0
22197 fi
22198 if test ! -f "$as_myself"; then
22199 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
22200 { (exit 1); exit 1; }
22201 fi
22202
22203 # Work around bugs in pre-3.0 UWIN ksh.
22204 for as_var in ENV MAIL MAILPATH
22205 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
22206 done
22207 PS1='$ '
22208 PS2='> '
22209 PS4='+ '
22210
22211 # NLS nuisances.
22212 for as_var in \
22213 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22214 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22215 LC_TELEPHONE LC_TIME
22216 do
22217 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22218 eval $as_var=C; export $as_var
22219 else
22220 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
22221 fi
22222 done
22223
22224 # Required to use basename.
22225 if expr a : '\(a\)' >/dev/null 2>&1 &&
22226 test "X`expr 00001 : '.*\(...\)'`" = X001; then
22227 as_expr=expr
22228 else
22229 as_expr=false
22230 fi
22231
22232 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
22233 as_basename=basename
22234 else
22235 as_basename=false
22236 fi
22237
22238
22239 # Name of the executable.
22240 as_me=`$as_basename -- "$0" ||
22241 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22242 X"$0" : 'X\(//\)$' \| \
22243 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
22244 echo X/"$0" |
22245 sed '/^.*\/\([^/][^/]*\)\/*$/{
22246 s//\1/
22247 q
22248 }
22249 /^X\/\(\/\/\)$/{
22250 s//\1/
22251 q
22252 }
22253 /^X\/\(\/\).*/{
22254 s//\1/
22255 q
22256 }
22257 s/.*/./; q'`
22258
22259 # CDPATH.
22260 $as_unset CDPATH
22261
22262
22263
22264 as_lineno_1=$LINENO
22265 as_lineno_2=$LINENO
22266 test "x$as_lineno_1" != "x$as_lineno_2" &&
22267 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
22268
22269 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22270 # uniformly replaced by the line number. The first 'sed' inserts a
22271 # line-number line after each line using $LINENO; the second 'sed'
22272 # does the real work. The second script uses 'N' to pair each
22273 # line-number line with the line containing $LINENO, and appends
22274 # trailing '-' during substitution so that $LINENO is not a special
22275 # case at line end.
22276 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
22277 # scripts with optimization help from Paolo Bonzini. Blame Lee
22278 # E. McMahon (1931-1989) for sed's syntax. :-)
22279 sed -n '
22280 p
22281 /[$]LINENO/=
22282 ' <$as_myself |
22283 sed '
22284 s/[$]LINENO.*/&-/
22285 t lineno
22286 b
22287 :lineno
22288 N
22289 :loop
22290 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
22291 t loop
22292 s/-\n.*//
22293 ' >$as_me.lineno &&
22294 chmod +x "$as_me.lineno" ||
22295 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
22296 { (exit 1); exit 1; }; }
22297
22298 # Don't try to exec as it changes $[0], causing all sort of problems
22299 # (the dirname of $[0] is not the place where we might find the
22300 # original and so on. Autoconf is especially sensitive to this).
22301 . "./$as_me.lineno"
22302 # Exit status is that of the last command.
22303 exit
22304 }
22305
22306
22307 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
22308 as_dirname=dirname
22309 else
22310 as_dirname=false
22311 fi
22312
22313 ECHO_C= ECHO_N= ECHO_T=
22314 case `echo -n x` in
22315 -n*)
22316 case `echo 'x\c'` in
22317 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
22318 *) ECHO_C='\c';;
22319 esac;;
22320 *)
22321 ECHO_N='-n';;
22322 esac
22323
22324 if expr a : '\(a\)' >/dev/null 2>&1 &&
22325 test "X`expr 00001 : '.*\(...\)'`" = X001; then
22326 as_expr=expr
22327 else
22328 as_expr=false
22329 fi
22330
22331 rm -f conf$$ conf$$.exe conf$$.file
22332 if test -d conf$$.dir; then
22333 rm -f conf$$.dir/conf$$.file
22334 else
22335 rm -f conf$$.dir
22336 mkdir conf$$.dir
22337 fi
22338 echo >conf$$.file
22339 if ln -s conf$$.file conf$$ 2>/dev/null; then
22340 as_ln_s='ln -s'
22341 # ... but there are two gotchas:
22342 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
22343 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
22344 # In both cases, we have to default to `cp -p'.
22345 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
22346 as_ln_s='cp -p'
22347 elif ln conf$$.file conf$$ 2>/dev/null; then
22348 as_ln_s=ln
22349 else
22350 as_ln_s='cp -p'
22351 fi
22352 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
22353 rmdir conf$$.dir 2>/dev/null
22354
22355 if mkdir -p . 2>/dev/null; then
22356 as_mkdir_p=:
22357 else
22358 test -d ./-p && rmdir ./-p
22359 as_mkdir_p=false
22360 fi
22361
22362 if test -x / >/dev/null 2>&1; then
22363 as_test_x='test -x'
22364 else
22365 if ls -dL / >/dev/null 2>&1; then
22366 as_ls_L_option=L
22367 else
22368 as_ls_L_option=
22369 fi
22370 as_test_x='
22371 eval sh -c '\''
22372 if test -d "$1"; then
22373 test -d "$1/.";
22374 else
22375 case $1 in
22376 -*)set "./$1";;
22377 esac;
22378 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
22379 ???[sx]*):;;*)false;;esac;fi
22380 '\'' sh
22381 '
22382 fi
22383 as_executable_p=$as_test_x
22384
22385 # Sed expression to map a string onto a valid CPP name.
22386 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
22387
22388 # Sed expression to map a string onto a valid variable name.
22389 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
22390
22391
22392 exec 6>&1
22393
22394 # Save the log message, to keep $[0] and so on meaningful, and to
22395 # report actual input values of CONFIG_FILES etc. instead of their
22396 # values after options handling.
22397 ac_log="
22398 This file was extended by PolicyKit-gnome $as_me 0.5, which was
22399 generated by GNU Autoconf 2.61. Invocation command line was
22400
22401 CONFIG_FILES = $CONFIG_FILES
22402 CONFIG_HEADERS = $CONFIG_HEADERS
22403 CONFIG_LINKS = $CONFIG_LINKS
22404 CONFIG_COMMANDS = $CONFIG_COMMANDS
22405 $ $0 $@
22406
22407 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22408 "
22409
22410 _ACEOF
22411
22412 cat >>$CONFIG_STATUS <<_ACEOF
22413 # Files that config.status was made for.
22414 config_files="$ac_config_files"
22415 config_headers="$ac_config_headers"
22416 config_commands="$ac_config_commands"
22417
22418 _ACEOF
22419
22420 cat >>$CONFIG_STATUS <<\_ACEOF
22421 ac_cs_usage="\
22422 \`$as_me' instantiates files from templates according to the
22423 current configuration.
22424
22425 Usage: $0 [OPTIONS] [FILE]...
22426
22427 -h, --help print this help, then exit
22428 -V, --version print version number and configuration settings, then exit
22429 -q, --quiet do not print progress messages
22430 -d, --debug don't remove temporary files
22431 --recheck update $as_me by reconfiguring in the same conditions
22432 --file=FILE[:TEMPLATE]
22433 instantiate the configuration file FILE
22434 --header=FILE[:TEMPLATE]
22435 instantiate the configuration header FILE
22436
22437 Configuration files:
22438 $config_files
22439
22440 Configuration headers:
22441 $config_headers
22442
22443 Configuration commands:
22444 $config_commands
22445
22446 Report bugs to <bug-autoconf@gnu.org>."
22447
22448 _ACEOF
22449 cat >>$CONFIG_STATUS <<_ACEOF
22450 ac_cs_version="\\
22451 PolicyKit-gnome config.status 0.5
22452 configured by $0, generated by GNU Autoconf 2.61,
22453 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
22454
22455 Copyright (C) 2006 Free Software Foundation, Inc.
22456 This config.status script is free software; the Free Software Foundation
22457 gives unlimited permission to copy, distribute and modify it."
22458
22459 ac_pwd='$ac_pwd'
22460 srcdir='$srcdir'
22461 INSTALL='$INSTALL'
22462 MKDIR_P='$MKDIR_P'
22463 _ACEOF
22464
22465 cat >>$CONFIG_STATUS <<\_ACEOF
22466 # If no file are specified by the user, then we need to provide default
22467 # value. By we need to know if files were specified by the user.
22468 ac_need_defaults=:
22469 while test $# != 0
22470 do
22471 case $1 in
22472 --*=*)
22473 ac_option=`expr "X$1" : 'X\([^=]*\)='`
22474 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
22475 ac_shift=:
22476 ;;
22477 *)
22478 ac_option=$1
22479 ac_optarg=$2
22480 ac_shift=shift
22481 ;;
22482 esac
22483
22484 case $ac_option in
22485 # Handling of the options.
22486 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22487 ac_cs_recheck=: ;;
22488 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
22489 echo "$ac_cs_version"; exit ;;
22490 --debug | --debu | --deb | --de | --d | -d )
22491 debug=: ;;
22492 --file | --fil | --fi | --f )
22493 $ac_shift
22494 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
22495 ac_need_defaults=false;;
22496 --header | --heade | --head | --hea )
22497 $ac_shift
22498 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
22499 ac_need_defaults=false;;
22500 --he | --h)
22501 # Conflict between --help and --header
22502 { echo "$as_me: error: ambiguous option: $1
22503 Try \`$0 --help' for more information." >&2
22504 { (exit 1); exit 1; }; };;
22505 --help | --hel | -h )
22506 echo "$ac_cs_usage"; exit ;;
22507 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
22508 | -silent | --silent | --silen | --sile | --sil | --si | --s)
22509 ac_cs_silent=: ;;
22510
22511 # This is an error.
22512 -*) { echo "$as_me: error: unrecognized option: $1
22513 Try \`$0 --help' for more information." >&2
22514 { (exit 1); exit 1; }; } ;;
22515
22516 *) ac_config_targets="$ac_config_targets $1"
22517 ac_need_defaults=false ;;
22518
22519 esac
22520 shift
22521 done
22522
22523 ac_configure_extra_args=
22524
22525 if $ac_cs_silent; then
22526 exec 6>/dev/null
22527 ac_configure_extra_args="$ac_configure_extra_args --silent"
22528 fi
22529
22530 _ACEOF
22531 cat >>$CONFIG_STATUS <<_ACEOF
22532 if \$ac_cs_recheck; then
22533 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
22534 CONFIG_SHELL=$SHELL
22535 export CONFIG_SHELL
22536 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
22537 fi
22538
22539 _ACEOF
22540 cat >>$CONFIG_STATUS <<\_ACEOF
22541 exec 5>>config.log
22542 {
22543 echo
22544 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22545 ## Running $as_me. ##
22546 _ASBOX
22547 echo "$ac_log"
22548 } >&5
22549
22550 _ACEOF
22551 cat >>$CONFIG_STATUS <<_ACEOF
22552 #
22553 # INIT-COMMANDS
22554 #
22555 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
22556 INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
22557 prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
22558 INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'
22559
22560
22561 _ACEOF
22562
22563 cat >>$CONFIG_STATUS <<\_ACEOF
22564
22565 # Handling of arguments.
22566 for ac_config_target in $ac_config_targets
22567 do
22568 case $ac_config_target in
22569 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
22570 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
22571 "intltool") CONFIG_COMMANDS="$CONFIG_COMMANDS intltool" ;;
22572 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
22573 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22574 "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;;
22575 "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
22576 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
22577 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
22578 "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
22579
22580 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
22581 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22582 { (exit 1); exit 1; }; };;
22583 esac
22584 done
22585
22586
22587 # If the user did not use the arguments to specify the items to instantiate,
22588 # then the envvar interface is used. Set only those that are not.
22589 # We use the long form for the default assignment because of an extremely
22590 # bizarre bug on SunOS 4.1.3.
22591 if $ac_need_defaults; then
22592 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22593 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22594 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22595 fi
22596
22597 # Have a temporary directory for convenience. Make it in the build tree
22598 # simply because there is no reason against having it here, and in addition,
22599 # creating and moving files from /tmp can sometimes cause problems.
22600 # Hook for its removal unless debugging.
22601 # Note that there is a small window in which the directory will not be cleaned:
22602 # after its creation but before its name has been assigned to `$tmp'.
22603 $debug ||
22604 {
22605 tmp=
22606 trap 'exit_status=$?
22607 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
22608 ' 0
22609 trap '{ (exit 1); exit 1; }' 1 2 13 15
22610 }
22611 # Create a (secure) tmp directory for tmp files.
22612
22613 {
22614 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
22615 test -n "$tmp" && test -d "$tmp"
22616 } ||
22617 {
22618 tmp=./conf$$-$RANDOM
22619 (umask 077 && mkdir "$tmp")
22620 } ||
22621 {
22622 echo "$me: cannot create a temporary directory in ." >&2
22623 { (exit 1); exit 1; }
22624 }
22625
22626 #
22627 # Set up the sed scripts for CONFIG_FILES section.
22628 #
22629
22630 # No need to generate the scripts if there are no CONFIG_FILES.
22631 # This happens for instance when ./config.status config.h
22632 if test -n "$CONFIG_FILES"; then
22633
22634 _ACEOF
22635
22636
22637
22638 ac_delim='%!_!# '
22639 for ac_last_try in false false false false false :; do
22640 cat >conf$$subs.sed <<_ACEOF
22641 SHELL!$SHELL$ac_delim
22642 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
22643 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
22644 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
22645 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
22646 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
22647 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
22648 exec_prefix!$exec_prefix$ac_delim
22649 prefix!$prefix$ac_delim
22650 program_transform_name!$program_transform_name$ac_delim
22651 bindir!$bindir$ac_delim
22652 sbindir!$sbindir$ac_delim
22653 libexecdir!$libexecdir$ac_delim
22654 datarootdir!$datarootdir$ac_delim
22655 datadir!$datadir$ac_delim
22656 sysconfdir!$sysconfdir$ac_delim
22657 sharedstatedir!$sharedstatedir$ac_delim
22658 localstatedir!$localstatedir$ac_delim
22659 includedir!$includedir$ac_delim
22660 oldincludedir!$oldincludedir$ac_delim
22661 docdir!$docdir$ac_delim
22662 infodir!$infodir$ac_delim
22663 htmldir!$htmldir$ac_delim
22664 dvidir!$dvidir$ac_delim
22665 pdfdir!$pdfdir$ac_delim
22666 psdir!$psdir$ac_delim
22667 libdir!$libdir$ac_delim
22668 localedir!$localedir$ac_delim
22669 mandir!$mandir$ac_delim
22670 DEFS!$DEFS$ac_delim
22671 ECHO_C!$ECHO_C$ac_delim
22672 ECHO_N!$ECHO_N$ac_delim
22673 ECHO_T!$ECHO_T$ac_delim
22674 LIBS!$LIBS$ac_delim
22675 build_alias!$build_alias$ac_delim
22676 host_alias!$host_alias$ac_delim
22677 target_alias!$target_alias$ac_delim
22678 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
22679 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
22680 INSTALL_DATA!$INSTALL_DATA$ac_delim
22681 am__isrc!$am__isrc$ac_delim
22682 CYGPATH_W!$CYGPATH_W$ac_delim
22683 PACKAGE!$PACKAGE$ac_delim
22684 VERSION!$VERSION$ac_delim
22685 ACLOCAL!$ACLOCAL$ac_delim
22686 AUTOCONF!$AUTOCONF$ac_delim
22687 AUTOMAKE!$AUTOMAKE$ac_delim
22688 AUTOHEADER!$AUTOHEADER$ac_delim
22689 MAKEINFO!$MAKEINFO$ac_delim
22690 install_sh!$install_sh$ac_delim
22691 STRIP!$STRIP$ac_delim
22692 INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
22693 mkdir_p!$mkdir_p$ac_delim
22694 AWK!$AWK$ac_delim
22695 SET_MAKE!$SET_MAKE$ac_delim
22696 am__leading_dot!$am__leading_dot$ac_delim
22697 AMTAR!$AMTAR$ac_delim
22698 am__tar!$am__tar$ac_delim
22699 am__untar!$am__untar$ac_delim
22700 MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
22701 MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
22702 MAINT!$MAINT$ac_delim
22703 CC!$CC$ac_delim
22704 CFLAGS!$CFLAGS$ac_delim
22705 LDFLAGS!$LDFLAGS$ac_delim
22706 CPPFLAGS!$CPPFLAGS$ac_delim
22707 ac_ct_CC!$ac_ct_CC$ac_delim
22708 EXEEXT!$EXEEXT$ac_delim
22709 OBJEXT!$OBJEXT$ac_delim
22710 DEPDIR!$DEPDIR$ac_delim
22711 am__include!$am__include$ac_delim
22712 am__quote!$am__quote$ac_delim
22713 AMDEP_TRUE!$AMDEP_TRUE$ac_delim
22714 AMDEP_FALSE!$AMDEP_FALSE$ac_delim
22715 AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
22716 CCDEPMODE!$CCDEPMODE$ac_delim
22717 am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
22718 am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
22719 CPP!$CPP$ac_delim
22720 GREP!$GREP$ac_delim
22721 EGREP!$EGREP$ac_delim
22722 build!$build$ac_delim
22723 build_cpu!$build_cpu$ac_delim
22724 build_vendor!$build_vendor$ac_delim
22725 build_os!$build_os$ac_delim
22726 host!$host$ac_delim
22727 host_cpu!$host_cpu$ac_delim
22728 host_vendor!$host_vendor$ac_delim
22729 host_os!$host_os$ac_delim
22730 SED!$SED$ac_delim
22731 LN_S!$LN_S$ac_delim
22732 ECHO!$ECHO$ac_delim
22733 AR!$AR$ac_delim
22734 RANLIB!$RANLIB$ac_delim
22735 CXX!$CXX$ac_delim
22736 CXXFLAGS!$CXXFLAGS$ac_delim
22737 ac_ct_CXX!$ac_ct_CXX$ac_delim
22738 _ACEOF
22739
22740 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
22741 break
22742 elif $ac_last_try; then
22743 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22744 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
22745 { (exit 1); exit 1; }; }
22746 else
22747 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22748 fi
22749 done
22750
22751 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
22752 if test -n "$ac_eof"; then
22753 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
22754 ac_eof=`expr $ac_eof + 1`
22755 fi
22756
22757 cat >>$CONFIG_STATUS <<_ACEOF
22758 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
22759 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22760 _ACEOF
22761 sed '
22762 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
22763 s/^/s,@/; s/!/@,|#_!!_#|/
22764 :n
22765 t n
22766 s/'"$ac_delim"'$/,g/; t
22767 s/$/\\/; p
22768 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
22769 ' >>$CONFIG_STATUS <conf$$subs.sed
22770 rm -f conf$$subs.sed
22771 cat >>$CONFIG_STATUS <<_ACEOF
22772 CEOF$ac_eof
22773 _ACEOF
22774
22775
22776 ac_delim='%!_!# '
22777 for ac_last_try in false false false false false :; do
22778 cat >conf$$subs.sed <<_ACEOF
22779 CXXDEPMODE!$CXXDEPMODE$ac_delim
22780 am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
22781 am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
22782 CXXCPP!$CXXCPP$ac_delim
22783 F77!$F77$ac_delim
22784 FFLAGS!$FFLAGS$ac_delim
22785 ac_ct_F77!$ac_ct_F77$ac_delim
22786 LIBTOOL!$LIBTOOL$ac_delim
22787 ACLOCAL_AMFLAGS!$ACLOCAL_AMFLAGS$ac_delim
22788 PKG_CONFIG!$PKG_CONFIG$ac_delim
22789 HELP_DIR!$HELP_DIR$ac_delim
22790 OMF_DIR!$OMF_DIR$ac_delim
22791 DOC_USER_FORMATS!$DOC_USER_FORMATS$ac_delim
22792 ENABLE_SK_TRUE!$ENABLE_SK_TRUE$ac_delim
22793 ENABLE_SK_FALSE!$ENABLE_SK_FALSE$ac_delim
22794 HAVE_GNOME_DOC_UTILS_TRUE!$HAVE_GNOME_DOC_UTILS_TRUE$ac_delim
22795 HAVE_GNOME_DOC_UTILS_FALSE!$HAVE_GNOME_DOC_UTILS_FALSE$ac_delim
22796 WARN_CFLAGS!$WARN_CFLAGS$ac_delim
22797 DISABLE_DEPRECATED!$DISABLE_DEPRECATED$ac_delim
22798 POLKIT_GNOME_CFLAGS!$POLKIT_GNOME_CFLAGS$ac_delim
22799 POLKIT_GNOME_LIBS!$POLKIT_GNOME_LIBS$ac_delim
22800 POLKIT_POLICY_FILE_VALIDATE!$POLKIT_POLICY_FILE_VALIDATE$ac_delim
22801 INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
22802 INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
22803 INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
22804 INTLTOOL_PROP_RULE!$INTLTOOL_PROP_RULE$ac_delim
22805 INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
22806 INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
22807 INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
22808 INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
22809 INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
22810 INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
22811 INTLTOOL_XAM_RULE!$INTLTOOL_XAM_RULE$ac_delim
22812 INTLTOOL_KBD_RULE!$INTLTOOL_KBD_RULE$ac_delim
22813 INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
22814 INTLTOOL_XML_NOMERGE_RULE!$INTLTOOL_XML_NOMERGE_RULE$ac_delim
22815 INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
22816 INTLTOOL_SCHEMAS_RULE!$INTLTOOL_SCHEMAS_RULE$ac_delim
22817 INTLTOOL_THEME_RULE!$INTLTOOL_THEME_RULE$ac_delim
22818 INTLTOOL_SERVICE_RULE!$INTLTOOL_SERVICE_RULE$ac_delim
22819 INTLTOOL_POLICY_RULE!$INTLTOOL_POLICY_RULE$ac_delim
22820 INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
22821 INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
22822 INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
22823 INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
22824 ALL_LINGUAS!$ALL_LINGUAS$ac_delim
22825 DATADIRNAME!$DATADIRNAME$ac_delim
22826 GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
22827 USE_NLS!$USE_NLS$ac_delim
22828 MSGFMT!$MSGFMT$ac_delim
22829 MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim
22830 GMSGFMT!$GMSGFMT$ac_delim
22831 XGETTEXT!$XGETTEXT$ac_delim
22832 CATALOGS!$CATALOGS$ac_delim
22833 CATOBJEXT!$CATOBJEXT$ac_delim
22834 GMOFILES!$GMOFILES$ac_delim
22835 INSTOBJEXT!$INSTOBJEXT$ac_delim
22836 INTLLIBS!$INTLLIBS$ac_delim
22837 PO_IN_DATADIR_TRUE!$PO_IN_DATADIR_TRUE$ac_delim
22838 PO_IN_DATADIR_FALSE!$PO_IN_DATADIR_FALSE$ac_delim
22839 POFILES!$POFILES$ac_delim
22840 POSUB!$POSUB$ac_delim
22841 MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
22842 AM_CPPFLAGS!$AM_CPPFLAGS$ac_delim
22843 AM_CFLAGS!$AM_CFLAGS$ac_delim
22844 AM_CXXFLAGS!$AM_CXXFLAGS$ac_delim
22845 AM_LDFLAGS!$AM_LDFLAGS$ac_delim
22846 LIBOBJS!$LIBOBJS$ac_delim
22847 LTLIBOBJS!$LTLIBOBJS$ac_delim
22848 _ACEOF
22849
22850 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then
22851 break
22852 elif $ac_last_try; then
22853 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
22854 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
22855 { (exit 1); exit 1; }; }
22856 else
22857 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22858 fi
22859 done
22860
22861 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
22862 if test -n "$ac_eof"; then
22863 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
22864 ac_eof=`expr $ac_eof + 1`
22865 fi
22866
22867 cat >>$CONFIG_STATUS <<_ACEOF
22868 cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
22869 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
22870 _ACEOF
22871 sed '
22872 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
22873 s/^/s,@/; s/!/@,|#_!!_#|/
22874 :n
22875 t n
22876 s/'"$ac_delim"'$/,g/; t
22877 s/$/\\/; p
22878 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
22879 ' >>$CONFIG_STATUS <conf$$subs.sed
22880 rm -f conf$$subs.sed
22881 cat >>$CONFIG_STATUS <<_ACEOF
22882 :end
22883 s/|#_!!_#|//g
22884 CEOF$ac_eof
22885 _ACEOF
22886
22887
22888 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22889 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22890 # trailing colons and then remove the whole line if VPATH becomes empty
22891 # (actually we leave an empty line to preserve line numbers).
22892 if test "x$srcdir" = x.; then
22893 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22894 s/:*\$(srcdir):*/:/
22895 s/:*\${srcdir}:*/:/
22896 s/:*@srcdir@:*/:/
22897 s/^\([^=]*=[ ]*\):*/\1/
22898 s/:*$//
22899 s/^[^=]*=[ ]*$//
22900 }'
22901 fi
22902
22903 cat >>$CONFIG_STATUS <<\_ACEOF
22904 fi # test -n "$CONFIG_FILES"
22905
22906
22907 for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
22908 do
22909 case $ac_tag in
22910 :[FHLC]) ac_mode=$ac_tag; continue;;
22911 esac
22912 case $ac_mode$ac_tag in
22913 :[FHL]*:*);;
22914 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
22915 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
22916 { (exit 1); exit 1; }; };;
22917 :[FH]-) ac_tag=-:-;;
22918 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22919 esac
22920 ac_save_IFS=$IFS
22921 IFS=:
22922 set x $ac_tag
22923 IFS=$ac_save_IFS
22924 shift
22925 ac_file=$1
22926 shift
22927
22928 case $ac_mode in
22929 :L) ac_source=$1;;
22930 :[FH])
22931 ac_file_inputs=
22932 for ac_f
22933 do
22934 case $ac_f in
22935 -) ac_f="$tmp/stdin";;
22936 *) # Look for the file first in the build tree, then in the source tree
22937 # (if the path is not absolute). The absolute path cannot be DOS-style,
22938 # because $ac_f cannot contain `:'.
22939 test -f "$ac_f" ||
22940 case $ac_f in
22941 [\\/$]*) false;;
22942 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22943 esac ||
22944 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
22945 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
22946 { (exit 1); exit 1; }; };;
22947 esac
22948 ac_file_inputs="$ac_file_inputs $ac_f"
22949 done
22950
22951 # Let's still pretend it is `configure' which instantiates (i.e., don't
22952 # use $as_me), people would be surprised to read:
22953 # /* config.h. Generated by config.status. */
22954 configure_input="Generated from "`IFS=:
22955 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
22956 if test x"$ac_file" != x-; then
22957 configure_input="$ac_file. $configure_input"
22958 { echo "$as_me:$LINENO: creating $ac_file" >&5
22959 echo "$as_me: creating $ac_file" >&6;}
22960 fi
22961
22962 case $ac_tag in
22963 *:-:* | *:-) cat >"$tmp/stdin";;
22964 esac
22965 ;;
22966 esac
22967
22968 ac_dir=`$as_dirname -- "$ac_file" ||
22969 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22970 X"$ac_file" : 'X\(//\)[^/]' \| \
22971 X"$ac_file" : 'X\(//\)$' \| \
22972 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22973 echo X"$ac_file" |
22974 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22975 s//\1/
22976 q
22977 }
22978 /^X\(\/\/\)[^/].*/{
22979 s//\1/
22980 q
22981 }
22982 /^X\(\/\/\)$/{
22983 s//\1/
22984 q
22985 }
22986 /^X\(\/\).*/{
22987 s//\1/
22988 q
22989 }
22990 s/.*/./; q'`
22991 { as_dir="$ac_dir"
22992 case $as_dir in #(
22993 -*) as_dir=./$as_dir;;
22994 esac
22995 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
22996 as_dirs=
22997 while :; do
22998 case $as_dir in #(
22999 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
23000 *) as_qdir=$as_dir;;
23001 esac
23002 as_dirs="'$as_qdir' $as_dirs"
23003 as_dir=`$as_dirname -- "$as_dir" ||
23004 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23005 X"$as_dir" : 'X\(//\)[^/]' \| \
23006 X"$as_dir" : 'X\(//\)$' \| \
23007 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
23008 echo X"$as_dir" |
23009 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23010 s//\1/
23011 q
23012 }
23013 /^X\(\/\/\)[^/].*/{
23014 s//\1/
23015 q
23016 }
23017 /^X\(\/\/\)$/{
23018 s//\1/
23019 q
23020 }
23021 /^X\(\/\).*/{
23022 s//\1/
23023 q
23024 }
23025 s/.*/./; q'`
23026 test -d "$as_dir" && break
23027 done
23028 test -z "$as_dirs" || eval "mkdir $as_dirs"
23029 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
23030 echo "$as_me: error: cannot create directory $as_dir" >&2;}
23031 { (exit 1); exit 1; }; }; }
23032 ac_builddir=.
23033
23034 case "$ac_dir" in
23035 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23036 *)
23037 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
23038 # A ".." for each directory in $ac_dir_suffix.
23039 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
23040 case $ac_top_builddir_sub in
23041 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23042 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23043 esac ;;
23044 esac
23045 ac_abs_top_builddir=$ac_pwd
23046 ac_abs_builddir=$ac_pwd$ac_dir_suffix
23047 # for backward compatibility:
23048 ac_top_builddir=$ac_top_build_prefix
23049
23050 case $srcdir in
23051 .) # We are building in place.
23052 ac_srcdir=.
23053 ac_top_srcdir=$ac_top_builddir_sub
23054 ac_abs_top_srcdir=$ac_pwd ;;
23055 [\\/]* | ?:[\\/]* ) # Absolute name.
23056 ac_srcdir=$srcdir$ac_dir_suffix;
23057 ac_top_srcdir=$srcdir
23058 ac_abs_top_srcdir=$srcdir ;;
23059 *) # Relative name.
23060 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23061 ac_top_srcdir=$ac_top_build_prefix$srcdir
23062 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
23063 esac
23064 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
23065
23066
23067 case $ac_mode in
23068 :F)
23069 #
23070 # CONFIG_FILE
23071 #
23072
23073 case $INSTALL in
23074 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23075 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
23076 esac
23077 ac_MKDIR_P=$MKDIR_P
23078 case $MKDIR_P in
23079 [\\/$]* | ?:[\\/]* ) ;;
23080 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
23081 esac
23082 _ACEOF
23083
23084 cat >>$CONFIG_STATUS <<\_ACEOF
23085 # If the template does not know about datarootdir, expand it.
23086 # FIXME: This hack should be removed a few years after 2.60.
23087 ac_datarootdir_hack=; ac_datarootdir_seen=
23088
23089 case `sed -n '/datarootdir/ {
23090 p
23091 q
23092 }
23093 /@datadir@/p
23094 /@docdir@/p
23095 /@infodir@/p
23096 /@localedir@/p
23097 /@mandir@/p
23098 ' $ac_file_inputs` in
23099 *datarootdir*) ac_datarootdir_seen=yes;;
23100 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23101 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23102 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
23103 _ACEOF
23104 cat >>$CONFIG_STATUS <<_ACEOF
23105 ac_datarootdir_hack='
23106 s&@datadir@&$datadir&g
23107 s&@docdir@&$docdir&g
23108 s&@infodir@&$infodir&g
23109 s&@localedir@&$localedir&g
23110 s&@mandir@&$mandir&g
23111 s&\\\${datarootdir}&$datarootdir&g' ;;
23112 esac
23113 _ACEOF
23114
23115 # Neutralize VPATH when `$srcdir' = `.'.
23116 # Shell code in configure.ac might set extrasub.
23117 # FIXME: do we really want to maintain this feature?
23118 cat >>$CONFIG_STATUS <<_ACEOF
23119 sed "$ac_vpsub
23120 $extrasub
23121 _ACEOF
23122 cat >>$CONFIG_STATUS <<\_ACEOF
23123 :t
23124 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23125 s&@configure_input@&$configure_input&;t t
23126 s&@top_builddir@&$ac_top_builddir_sub&;t t
23127 s&@srcdir@&$ac_srcdir&;t t
23128 s&@abs_srcdir@&$ac_abs_srcdir&;t t
23129 s&@top_srcdir@&$ac_top_srcdir&;t t
23130 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23131 s&@builddir@&$ac_builddir&;t t
23132 s&@abs_builddir@&$ac_abs_builddir&;t t
23133 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23134 s&@INSTALL@&$ac_INSTALL&;t t
23135 s&@MKDIR_P@&$ac_MKDIR_P&;t t
23136 $ac_datarootdir_hack
23137 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
23138
23139 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
23140 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
23141 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
23142 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23143 which seems to be undefined. Please make sure it is defined." >&5
23144 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23145 which seems to be undefined. Please make sure it is defined." >&2;}
23146
23147 rm -f "$tmp/stdin"
23148 case $ac_file in
23149 -) cat "$tmp/out"; rm -f "$tmp/out";;
23150 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
23151 esac
23152 ;;
23153 :H)
23154 #
23155 # CONFIG_HEADER
23156 #
23157 _ACEOF
23158
23159 # Transform confdefs.h into a sed script `conftest.defines', that
23160 # substitutes the proper values into config.h.in to produce config.h.
23161 rm -f conftest.defines conftest.tail
23162 # First, append a space to every undef/define line, to ease matching.
23163 echo 's/$/ /' >conftest.defines
23164 # Then, protect against being on the right side of a sed subst, or in
23165 # an unquoted here document, in config.status. If some macros were
23166 # called several times there might be several #defines for the same
23167 # symbol, which is useless. But do not sort them, since the last
23168 # AC_DEFINE must be honored.
23169 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
23170 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
23171 # NAME is the cpp macro being defined, VALUE is the value it is being given.
23172 # PARAMS is the parameter list in the macro definition--in most cases, it's
23173 # just an empty string.
23174 ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
23175 ac_dB='\\)[ (].*,\\1define\\2'
23176 ac_dC=' '
23177 ac_dD=' ,'
23178
23179 uniq confdefs.h |
23180 sed -n '
23181 t rset
23182 :rset
23183 s/^[ ]*#[ ]*define[ ][ ]*//
23184 t ok
23185 d
23186 :ok
23187 s/[\\&,]/\\&/g
23188 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
23189 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
23190 ' >>conftest.defines
23191
23192 # Remove the space that was appended to ease matching.
23193 # Then replace #undef with comments. This is necessary, for
23194 # example, in the case of _POSIX_SOURCE, which is predefined and required
23195 # on some systems where configure will not decide to define it.
23196 # (The regexp can be short, since the line contains either #define or #undef.)
23197 echo 's/ $//
23198 s,^[ #]*u.*,/* & */,' >>conftest.defines
23199
23200 # Break up conftest.defines:
23201 ac_max_sed_lines=50
23202
23203 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
23204 # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
23205 # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
23206 # et cetera.
23207 ac_in='$ac_file_inputs'
23208 ac_out='"$tmp/out1"'
23209 ac_nxt='"$tmp/out2"'
23210
23211 while :
23212 do
23213 # Write a here document:
23214 cat >>$CONFIG_STATUS <<_ACEOF
23215 # First, check the format of the line:
23216 cat >"\$tmp/defines.sed" <<\\CEOF
23217 /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
23218 /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
23219 b
23220 :def
23221 _ACEOF
23222 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
23223 echo 'CEOF
23224 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
23225 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
23226 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
23227 grep . conftest.tail >/dev/null || break
23228 rm -f conftest.defines
23229 mv conftest.tail conftest.defines
23230 done
23231 rm -f conftest.defines conftest.tail
23232
23233 echo "ac_result=$ac_in" >>$CONFIG_STATUS
23234 cat >>$CONFIG_STATUS <<\_ACEOF
23235 if test x"$ac_file" != x-; then
23236 echo "/* $configure_input */" >"$tmp/config.h"
23237 cat "$ac_result" >>"$tmp/config.h"
23238 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
23239 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23240 echo "$as_me: $ac_file is unchanged" >&6;}
23241 else
23242 rm -f $ac_file
23243 mv "$tmp/config.h" $ac_file
23244 fi
23245 else
23246 echo "/* $configure_input */"
23247 cat "$ac_result"
23248 fi
23249 rm -f "$tmp/out12"
23250 # Compute $ac_file's index in $config_headers.
23251 _am_stamp_count=1
23252 for _am_header in $config_headers :; do
23253 case $_am_header in
23254 $ac_file | $ac_file:* )
23255 break ;;
23256 * )
23257 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
23258 esac
23259 done
23260 echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
23261 $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23262 X$ac_file : 'X\(//\)[^/]' \| \
23263 X$ac_file : 'X\(//\)$' \| \
23264 X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
23265 echo X$ac_file |
23266 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23267 s//\1/
23268 q
23269 }
23270 /^X\(\/\/\)[^/].*/{
23271 s//\1/
23272 q
23273 }
23274 /^X\(\/\/\)$/{
23275 s//\1/
23276 q
23277 }
23278 /^X\(\/\).*/{
23279 s//\1/
23280 q
23281 }
23282 s/.*/./; q'`/stamp-h$_am_stamp_count
23283 ;;
23284
23285 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
23286 echo "$as_me: executing $ac_file commands" >&6;}
23287 ;;
23288 esac
23289
23290
23291 case $ac_file$ac_mode in
23292 "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
23293 # Strip MF so we end up with the name of the file.
23294 mf=`echo "$mf" | sed -e 's/:.*$//'`
23295 # Check whether this is an Automake generated Makefile or not.
23296 # We used to match only the files named `Makefile.in', but
23297 # some people rename them; so instead we look at the file content.
23298 # Grep'ing the first line is not enough: some people post-process
23299 # each Makefile.in and add a new line on top of each file to say so.
23300 # Grep'ing the whole file is not good either: AIX grep has a line
23301 # limit of 2048, but all sed's we know have understand at least 4000.
23302 if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
23303 dirpart=`$as_dirname -- "$mf" ||
23304 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23305 X"$mf" : 'X\(//\)[^/]' \| \
23306 X"$mf" : 'X\(//\)$' \| \
23307 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
23308 echo X"$mf" |
23309 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23310 s//\1/
23311 q
23312 }
23313 /^X\(\/\/\)[^/].*/{
23314 s//\1/
23315 q
23316 }
23317 /^X\(\/\/\)$/{
23318 s//\1/
23319 q
23320 }
23321 /^X\(\/\).*/{
23322 s//\1/
23323 q
23324 }
23325 s/.*/./; q'`
23326 else
23327 continue
23328 fi
23329 # Extract the definition of DEPDIR, am__include, and am__quote
23330 # from the Makefile without running `make'.
23331 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
23332 test -z "$DEPDIR" && continue
23333 am__include=`sed -n 's/^am__include = //p' < "$mf"`
23334 test -z "am__include" && continue
23335 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
23336 # When using ansi2knr, U may be empty or an underscore; expand it
23337 U=`sed -n 's/^U = //p' < "$mf"`
23338 # Find all dependency output files, they are included files with
23339 # $(DEPDIR) in their names. We invoke sed twice because it is the
23340 # simplest approach to changing $(DEPDIR) to its actual value in the
23341 # expansion.
23342 for file in `sed -n "
23343 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
23344 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
23345 # Make sure the directory exists.
23346 test -f "$dirpart/$file" && continue
23347 fdir=`$as_dirname -- "$file" ||
23348 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23349 X"$file" : 'X\(//\)[^/]' \| \
23350 X"$file" : 'X\(//\)$' \| \
23351 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
23352 echo X"$file" |
23353 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23354 s//\1/
23355 q
23356 }
23357 /^X\(\/\/\)[^/].*/{
23358 s//\1/
23359 q
23360 }
23361 /^X\(\/\/\)$/{
23362 s//\1/
23363 q
23364 }
23365 /^X\(\/\).*/{
23366 s//\1/
23367 q
23368 }
23369 s/.*/./; q'`
23370 { as_dir=$dirpart/$fdir
23371 case $as_dir in #(
23372 -*) as_dir=./$as_dir;;
23373 esac
23374 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
23375 as_dirs=
23376 while :; do
23377 case $as_dir in #(
23378 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
23379 *) as_qdir=$as_dir;;
23380 esac
23381 as_dirs="'$as_qdir' $as_dirs"
23382 as_dir=`$as_dirname -- "$as_dir" ||
23383 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23384 X"$as_dir" : 'X\(//\)[^/]' \| \
23385 X"$as_dir" : 'X\(//\)$' \| \
23386 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
23387 echo X"$as_dir" |
23388 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23389 s//\1/
23390 q
23391 }
23392 /^X\(\/\/\)[^/].*/{
23393 s//\1/
23394 q
23395 }
23396 /^X\(\/\/\)$/{
23397 s//\1/
23398 q
23399 }
23400 /^X\(\/\).*/{
23401 s//\1/
23402 q
23403 }
23404 s/.*/./; q'`
23405 test -d "$as_dir" && break
23406 done
23407 test -z "$as_dirs" || eval "mkdir $as_dirs"
23408 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
23409 echo "$as_me: error: cannot create directory $as_dir" >&2;}
23410 { (exit 1); exit 1; }; }; }
23411 # echo "creating $dirpart/$file"
23412 echo '# dummy' > "$dirpart/$file"
23413 done
23414 done
23415 ;;
23416 "intltool":C)
23417
23418 for file in intltool-extract intltool-merge intltool-update; do
23419 sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
23420 -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
23421 -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
23422 < ${ac_aux_dir}/${file}.in > ${file}.out
23423 if cmp -s ${file} ${file}.out 2>/dev/null; then
23424 rm -f ${file}.out
23425 else
23426 mv -f ${file}.out ${file}
23427 fi
23428 chmod ugo+x ${file}
23429 chmod u+w ${file}
23430 done
23431
23432 ;;
23433 "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
23434 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
23435 esac ;;
23436 "po/stamp-it":C)
23437 rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
23438 >"po/stamp-it.tmp"
23439 sed '/^#/d
23440 s/^[[].*] *//
23441 /^[ ]*$/d
23442 '"s|^| $ac_top_srcdir/|" \
23443 "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
23444
23445 if test ! -f "po/Makefile"; then
23446 { { echo "$as_me:$LINENO: error: po/Makefile is not ready." >&5
23447 echo "$as_me: error: po/Makefile is not ready." >&2;}
23448 { (exit 1); exit 1; }; }
23449 fi
23450 mv "po/Makefile" "po/Makefile.tmp"
23451 sed '/^POTFILES =/,/[^\\]$/ {
23452 /^POTFILES =/!d
23453 r po/POTFILES
23454 }
23455 ' "po/Makefile.tmp" >"po/Makefile"
23456 rm -f "po/Makefile.tmp"
23457 mv "po/stamp-it.tmp" "po/stamp-it"
23458 ;;
23459
23460 esac
23461 done # for ac_tag
23462
23463
23464 { (exit 0); exit 0; }
23465 _ACEOF
23466 chmod +x $CONFIG_STATUS
23467 ac_clean_files=$ac_clean_files_save
23468
23469
23470 # configure is writing to config.log, and then calls config.status.
23471 # config.status does its own redirection, appending to config.log.
23472 # Unfortunately, on DOS this fails, as config.log is still kept open
23473 # by configure, so config.status won't be able to write to it; its
23474 # output is simply discarded. So we exec the FD to /dev/null,
23475 # effectively closing config.log, so it can be properly (re)opened and
23476 # appended to by config.status. When coming back to configure, we
23477 # need to make the FD available again.
23478 if test "$no_create" != yes; then
23479 ac_cs_success=:
23480 ac_config_status_args=
23481 test "$silent" = yes &&
23482 ac_config_status_args="$ac_config_status_args --quiet"
23483 exec 5>/dev/null
23484 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
23485 exec 5>>config.log
23486 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23487 # would make configure fail if this is the last instruction.
23488 $ac_cs_success || { (exit 1); exit 1; }
23489 fi
23490
0 AC_INIT([PolicyKit-gnome],[0.5],[mailto:david@fubar.dk],[PolicyKit-gnome])
1
2 AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip])
3
4 AC_CONFIG_SRCDIR([src])
5 AC_CONFIG_HEADERS([config.h])
6
7 AM_MAINTAINER_MODE
8
9 AC_PROG_CC
10 AC_ISC_POSIX
11 AC_HEADER_STDC
12 AC_PROG_LIBTOOL
13
14 # *****
15 # GNOME
16 # *****
17
18 GNOME_COMMON_INIT
19 GNOME_DOC_INIT
20 GNOME_DEBUG_CHECK
21 GNOME_COMPILE_WARNINGS([maximum])
22 GNOME_MAINTAINER_MODE_DEFINES
23
24 # ***************************
25 # Check for required packages
26 # ***************************
27
28 GTK_REQUIRED=2.6.0
29 LIBGNOME_REQUIRED=2.14.0
30 LIBGNOMEUI_REQUIRED=2.14.0
31 DBUS_GLIB_REQUIRED=0.71
32 POLKIT_DBUS_REQUIRED=0.5
33 POLKIT_GRANT_REQUIRED=0.5
34
35 PKG_CHECK_MODULES(POLKIT_GNOME,
36 gtk+-2.0 >= $GTK_REQUIRED
37 libgnome-2.0 >= $LIBGNOME_REQUIRED
38 libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
39 dbus-glib-1 >= $DBUS_GLIB_REQUIRED
40 polkit-dbus >= $POLKIT_DBUS_REQUIRED
41 polkit-grant >= $POLKIT_GRANT_REQUIRED)
42
43 AC_CHECK_PROG([POLKIT_POLICY_FILE_VALIDATE],
44 [polkit-policy-file-validate], [polkit-policy-file-validate])
45 if test -z "$POLKIT_POLICY_FILE_VALIDATE"; then
46 AC_MSG_ERROR([polkit-policy-file-validate not found])
47 fi
48
49 # ********************
50 # Internationalisation
51 # ********************
52
53 IT_PROG_INTLTOOL([0.35.0])
54
55 GETTEXT_PACKAGE=PolicyKit-gnome
56 AC_SUBST([GETTEXT_PACKAGE])
57 AM_GLIB_GNU_GETTEXT
58 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[gettext domain])
59
60 # *************************************
61 # *************************************
62
63 AC_SUBST([AM_CPPFLAGS])
64 AC_SUBST([AM_CFLAGS])
65 AC_SUBST([AM_CXXFLAGS])
66 AC_SUBST([AM_LDFLAGS])
67
68 AC_CONFIG_FILES([
69 Makefile
70 data/Makefile
71 examples/Makefile
72 src/Makefile
73 po/Makefile.in
74 ])
75
76 AC_OUTPUT
0
1 servicedir = $(datadir)/dbus-1/services
2 service_in_files = org.gnome.PolicyKit.service.in
3 service_DATA = $(service_in_files:.service.in=.service)
4
5 $(service_DATA): $(service_in_files) Makefile
6 @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
7
8 DISTCLEANFILES = $(service_DATA)
9
10 EXTRA_DIST = $(service_in_files)
11
12 clean-local :
13 rm -f *~ $(service_DATA)
0 # Makefile.in generated by automake 1.10 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 pkgdatadir = $(datadir)/@PACKAGE@
18 pkglibdir = $(libdir)/@PACKAGE@
19 pkgincludedir = $(includedir)/@PACKAGE@
20 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
21 install_sh_DATA = $(install_sh) -c -m 644
22 install_sh_PROGRAM = $(install_sh) -c
23 install_sh_SCRIPT = $(install_sh) -c
24 INSTALL_HEADER = $(INSTALL_DATA)
25 transform = $(program_transform_name)
26 NORMAL_INSTALL = :
27 PRE_INSTALL = :
28 POST_INSTALL = :
29 NORMAL_UNINSTALL = :
30 PRE_UNINSTALL = :
31 POST_UNINSTALL = :
32 build_triplet = @build@
33 host_triplet = @host@
34 subdir = data
35 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
36 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
37 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
38 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
39 $(ACLOCAL_M4)
40 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
41 CONFIG_HEADER = $(top_builddir)/config.h
42 CONFIG_CLEAN_FILES =
43 SOURCES =
44 DIST_SOURCES =
45 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
46 am__vpath_adj = case $$p in \
47 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
48 *) f=$$p;; \
49 esac;
50 am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
51 am__installdirs = "$(DESTDIR)$(servicedir)"
52 serviceDATA_INSTALL = $(INSTALL_DATA)
53 DATA = $(service_DATA)
54 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
55 ACLOCAL = @ACLOCAL@
56 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
57 ALL_LINGUAS = @ALL_LINGUAS@
58 AMTAR = @AMTAR@
59 AM_CFLAGS = @AM_CFLAGS@
60 AM_CPPFLAGS = @AM_CPPFLAGS@
61 AM_CXXFLAGS = @AM_CXXFLAGS@
62 AM_LDFLAGS = @AM_LDFLAGS@
63 AR = @AR@
64 AUTOCONF = @AUTOCONF@
65 AUTOHEADER = @AUTOHEADER@
66 AUTOMAKE = @AUTOMAKE@
67 AWK = @AWK@
68 CATALOGS = @CATALOGS@
69 CATOBJEXT = @CATOBJEXT@
70 CC = @CC@
71 CCDEPMODE = @CCDEPMODE@
72 CFLAGS = @CFLAGS@
73 CPP = @CPP@
74 CPPFLAGS = @CPPFLAGS@
75 CXX = @CXX@
76 CXXCPP = @CXXCPP@
77 CXXDEPMODE = @CXXDEPMODE@
78 CXXFLAGS = @CXXFLAGS@
79 CYGPATH_W = @CYGPATH_W@
80 DATADIRNAME = @DATADIRNAME@
81 DEFS = @DEFS@
82 DEPDIR = @DEPDIR@
83 DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
84 DOC_USER_FORMATS = @DOC_USER_FORMATS@
85 ECHO = @ECHO@
86 ECHO_C = @ECHO_C@
87 ECHO_N = @ECHO_N@
88 ECHO_T = @ECHO_T@
89 EGREP = @EGREP@
90 EXEEXT = @EXEEXT@
91 F77 = @F77@
92 FFLAGS = @FFLAGS@
93 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
94 GMOFILES = @GMOFILES@
95 GMSGFMT = @GMSGFMT@
96 GREP = @GREP@
97 HELP_DIR = @HELP_DIR@
98 INSTALL = @INSTALL@
99 INSTALL_DATA = @INSTALL_DATA@
100 INSTALL_PROGRAM = @INSTALL_PROGRAM@
101 INSTALL_SCRIPT = @INSTALL_SCRIPT@
102 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
103 INSTOBJEXT = @INSTOBJEXT@
104 INTLLIBS = @INTLLIBS@
105 INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
106 INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
107 INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
108 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
109 INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
110 INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
111 INTLTOOL_MERGE = @INTLTOOL_MERGE@
112 INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
113 INTLTOOL_PERL = @INTLTOOL_PERL@
114 INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
115 INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
116 INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
117 INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
118 INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
119 INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
120 INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
121 INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
122 INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
123 INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
124 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
125 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
126 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
127 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
128 LDFLAGS = @LDFLAGS@
129 LIBOBJS = @LIBOBJS@
130 LIBS = @LIBS@
131 LIBTOOL = @LIBTOOL@
132 LN_S = @LN_S@
133 LTLIBOBJS = @LTLIBOBJS@
134 MAINT = @MAINT@
135 MAKEINFO = @MAKEINFO@
136 MKDIR_P = @MKDIR_P@
137 MKINSTALLDIRS = @MKINSTALLDIRS@
138 MSGFMT = @MSGFMT@
139 MSGFMT_OPTS = @MSGFMT_OPTS@
140 OBJEXT = @OBJEXT@
141 OMF_DIR = @OMF_DIR@
142 PACKAGE = @PACKAGE@
143 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
144 PACKAGE_NAME = @PACKAGE_NAME@
145 PACKAGE_STRING = @PACKAGE_STRING@
146 PACKAGE_TARNAME = @PACKAGE_TARNAME@
147 PACKAGE_VERSION = @PACKAGE_VERSION@
148 PATH_SEPARATOR = @PATH_SEPARATOR@
149 PKG_CONFIG = @PKG_CONFIG@
150 POFILES = @POFILES@
151 POLKIT_GNOME_CFLAGS = @POLKIT_GNOME_CFLAGS@
152 POLKIT_GNOME_LIBS = @POLKIT_GNOME_LIBS@
153 POLKIT_POLICY_FILE_VALIDATE = @POLKIT_POLICY_FILE_VALIDATE@
154 POSUB = @POSUB@
155 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
156 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
157 RANLIB = @RANLIB@
158 SED = @SED@
159 SET_MAKE = @SET_MAKE@
160 SHELL = @SHELL@
161 STRIP = @STRIP@
162 USE_NLS = @USE_NLS@
163 VERSION = @VERSION@
164 WARN_CFLAGS = @WARN_CFLAGS@
165 XGETTEXT = @XGETTEXT@
166 abs_builddir = @abs_builddir@
167 abs_srcdir = @abs_srcdir@
168 abs_top_builddir = @abs_top_builddir@
169 abs_top_srcdir = @abs_top_srcdir@
170 ac_ct_CC = @ac_ct_CC@
171 ac_ct_CXX = @ac_ct_CXX@
172 ac_ct_F77 = @ac_ct_F77@
173 am__include = @am__include@
174 am__leading_dot = @am__leading_dot@
175 am__quote = @am__quote@
176 am__tar = @am__tar@
177 am__untar = @am__untar@
178 bindir = @bindir@
179 build = @build@
180 build_alias = @build_alias@
181 build_cpu = @build_cpu@
182 build_os = @build_os@
183 build_vendor = @build_vendor@
184 builddir = @builddir@
185 datadir = @datadir@
186 datarootdir = @datarootdir@
187 docdir = @docdir@
188 dvidir = @dvidir@
189 exec_prefix = @exec_prefix@
190 host = @host@
191 host_alias = @host_alias@
192 host_cpu = @host_cpu@
193 host_os = @host_os@
194 host_vendor = @host_vendor@
195 htmldir = @htmldir@
196 includedir = @includedir@
197 infodir = @infodir@
198 install_sh = @install_sh@
199 libdir = @libdir@
200 libexecdir = @libexecdir@
201 localedir = @localedir@
202 localstatedir = @localstatedir@
203 mandir = @mandir@
204 mkdir_p = @mkdir_p@
205 oldincludedir = @oldincludedir@
206 pdfdir = @pdfdir@
207 prefix = @prefix@
208 program_transform_name = @program_transform_name@
209 psdir = @psdir@
210 sbindir = @sbindir@
211 sharedstatedir = @sharedstatedir@
212 srcdir = @srcdir@
213 sysconfdir = @sysconfdir@
214 target_alias = @target_alias@
215 top_builddir = @top_builddir@
216 top_srcdir = @top_srcdir@
217 servicedir = $(datadir)/dbus-1/services
218 service_in_files = org.gnome.PolicyKit.service.in
219 service_DATA = $(service_in_files:.service.in=.service)
220 DISTCLEANFILES = $(service_DATA)
221 EXTRA_DIST = $(service_in_files)
222 all: all-am
223
224 .SUFFIXES:
225 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
226 @for dep in $?; do \
227 case '$(am__configure_deps)' in \
228 *$$dep*) \
229 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
230 && exit 0; \
231 exit 1;; \
232 esac; \
233 done; \
234 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign data/Makefile'; \
235 cd $(top_srcdir) && \
236 $(AUTOMAKE) --foreign data/Makefile
237 .PRECIOUS: Makefile
238 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
239 @case '$?' in \
240 *config.status*) \
241 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
242 *) \
243 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
244 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
245 esac;
246
247 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
248 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
249
250 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
251 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
252 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
253 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
254
255 mostlyclean-libtool:
256 -rm -f *.lo
257
258 clean-libtool:
259 -rm -rf .libs _libs
260 install-serviceDATA: $(service_DATA)
261 @$(NORMAL_INSTALL)
262 test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)"
263 @list='$(service_DATA)'; for p in $$list; do \
264 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
265 f=$(am__strip_dir) \
266 echo " $(serviceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(servicedir)/$$f'"; \
267 $(serviceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(servicedir)/$$f"; \
268 done
269
270 uninstall-serviceDATA:
271 @$(NORMAL_UNINSTALL)
272 @list='$(service_DATA)'; for p in $$list; do \
273 f=$(am__strip_dir) \
274 echo " rm -f '$(DESTDIR)$(servicedir)/$$f'"; \
275 rm -f "$(DESTDIR)$(servicedir)/$$f"; \
276 done
277 tags: TAGS
278 TAGS:
279
280 ctags: CTAGS
281 CTAGS:
282
283
284 distdir: $(DISTFILES)
285 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
286 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
287 list='$(DISTFILES)'; \
288 dist_files=`for file in $$list; do echo $$file; done | \
289 sed -e "s|^$$srcdirstrip/||;t" \
290 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
291 case $$dist_files in \
292 */*) $(MKDIR_P) `echo "$$dist_files" | \
293 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
294 sort -u` ;; \
295 esac; \
296 for file in $$dist_files; do \
297 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
298 if test -d $$d/$$file; then \
299 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
300 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
301 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
302 fi; \
303 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
304 else \
305 test -f $(distdir)/$$file \
306 || cp -p $$d/$$file $(distdir)/$$file \
307 || exit 1; \
308 fi; \
309 done
310 check-am: all-am
311 check: check-am
312 all-am: Makefile $(DATA)
313 installdirs:
314 for dir in "$(DESTDIR)$(servicedir)"; do \
315 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
316 done
317 install: install-am
318 install-exec: install-exec-am
319 install-data: install-data-am
320 uninstall: uninstall-am
321
322 install-am: all-am
323 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
324
325 installcheck: installcheck-am
326 install-strip:
327 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
328 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
329 `test -z '$(STRIP)' || \
330 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
331 mostlyclean-generic:
332
333 clean-generic:
334
335 distclean-generic:
336 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
337 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
338
339 maintainer-clean-generic:
340 @echo "This command is intended for maintainers to use"
341 @echo "it deletes files that may require special tools to rebuild."
342 clean: clean-am
343
344 clean-am: clean-generic clean-libtool clean-local mostlyclean-am
345
346 distclean: distclean-am
347 -rm -f Makefile
348 distclean-am: clean-am distclean-generic
349
350 dvi: dvi-am
351
352 dvi-am:
353
354 html: html-am
355
356 info: info-am
357
358 info-am:
359
360 install-data-am: install-serviceDATA
361
362 install-dvi: install-dvi-am
363
364 install-exec-am:
365
366 install-html: install-html-am
367
368 install-info: install-info-am
369
370 install-man:
371
372 install-pdf: install-pdf-am
373
374 install-ps: install-ps-am
375
376 installcheck-am:
377
378 maintainer-clean: maintainer-clean-am
379 -rm -f Makefile
380 maintainer-clean-am: distclean-am maintainer-clean-generic
381
382 mostlyclean: mostlyclean-am
383
384 mostlyclean-am: mostlyclean-generic mostlyclean-libtool
385
386 pdf: pdf-am
387
388 pdf-am:
389
390 ps: ps-am
391
392 ps-am:
393
394 uninstall-am: uninstall-serviceDATA
395
396 .MAKE: install-am install-strip
397
398 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
399 clean-local distclean distclean-generic distclean-libtool \
400 distdir dvi dvi-am html html-am info info-am install \
401 install-am install-data install-data-am install-dvi \
402 install-dvi-am install-exec install-exec-am install-html \
403 install-html-am install-info install-info-am install-man \
404 install-pdf install-pdf-am install-ps install-ps-am \
405 install-serviceDATA install-strip installcheck installcheck-am \
406 installdirs maintainer-clean maintainer-clean-generic \
407 mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
408 ps ps-am uninstall uninstall-am uninstall-serviceDATA
409
410
411 $(service_DATA): $(service_in_files) Makefile
412 @sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
413
414 clean-local :
415 rm -f *~ $(service_DATA)
416 # Tell versions [3.59,3.63) of GNU make to not export all variables.
417 # Otherwise a system limit (for SysV at least) may be exceeded.
418 .NOEXPORT:
0 [D-BUS Service]
1 Name=org.gnome.PolicyKit
2 Exec=@libexecdir@/polkit-gnome-manager
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2006-10-15.18
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
6 # Foundation, Inc.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 # 02110-1301, USA.
22
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
27
28 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
29
30 case $1 in
31 '')
32 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
33 exit 1;
34 ;;
35 -h | --h*)
36 cat <<\EOF
37 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
38
39 Run PROGRAMS ARGS to compile a file, generating dependencies
40 as side-effects.
41
42 Environment variables:
43 depmode Dependency tracking mode.
44 source Source file read by `PROGRAMS ARGS'.
45 object Object file output by `PROGRAMS ARGS'.
46 DEPDIR directory where to store dependencies.
47 depfile Dependency file to output.
48 tmpdepfile Temporary file to use when outputing dependencies.
49 libtool Whether libtool is used (yes/no).
50
51 Report bugs to <bug-automake@gnu.org>.
52 EOF
53 exit $?
54 ;;
55 -v | --v*)
56 echo "depcomp $scriptversion"
57 exit $?
58 ;;
59 esac
60
61 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
62 echo "depcomp: Variables source, object and depmode must be set" 1>&2
63 exit 1
64 fi
65
66 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
67 depfile=${depfile-`echo "$object" |
68 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
69 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
70
71 rm -f "$tmpdepfile"
72
73 # Some modes work just like other modes, but use different flags. We
74 # parameterize here, but still list the modes in the big case below,
75 # to make depend.m4 easier to write. Note that we *cannot* use a case
76 # here, because this file can only contain one case statement.
77 if test "$depmode" = hp; then
78 # HP compiler uses -M and no extra arg.
79 gccflag=-M
80 depmode=gcc
81 fi
82
83 if test "$depmode" = dashXmstdout; then
84 # This is just like dashmstdout with a different argument.
85 dashmflag=-xM
86 depmode=dashmstdout
87 fi
88
89 case "$depmode" in
90 gcc3)
91 ## gcc 3 implements dependency tracking that does exactly what
92 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
93 ## it if -MD -MP comes after the -MF stuff. Hmm.
94 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
95 ## the command line argument order; so add the flags where they
96 ## appear in depend2.am. Note that the slowdown incurred here
97 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
98 for arg
99 do
100 case $arg in
101 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
102 *) set fnord "$@" "$arg" ;;
103 esac
104 shift # fnord
105 shift # $arg
106 done
107 "$@"
108 stat=$?
109 if test $stat -eq 0; then :
110 else
111 rm -f "$tmpdepfile"
112 exit $stat
113 fi
114 mv "$tmpdepfile" "$depfile"
115 ;;
116
117 gcc)
118 ## There are various ways to get dependency output from gcc. Here's
119 ## why we pick this rather obscure method:
120 ## - Don't want to use -MD because we'd like the dependencies to end
121 ## up in a subdir. Having to rename by hand is ugly.
122 ## (We might end up doing this anyway to support other compilers.)
123 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
124 ## -MM, not -M (despite what the docs say).
125 ## - Using -M directly means running the compiler twice (even worse
126 ## than renaming).
127 if test -z "$gccflag"; then
128 gccflag=-MD,
129 fi
130 "$@" -Wp,"$gccflag$tmpdepfile"
131 stat=$?
132 if test $stat -eq 0; then :
133 else
134 rm -f "$tmpdepfile"
135 exit $stat
136 fi
137 rm -f "$depfile"
138 echo "$object : \\" > "$depfile"
139 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
140 ## The second -e expression handles DOS-style file names with drive letters.
141 sed -e 's/^[^:]*: / /' \
142 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
143 ## This next piece of magic avoids the `deleted header file' problem.
144 ## The problem is that when a header file which appears in a .P file
145 ## is deleted, the dependency causes make to die (because there is
146 ## typically no way to rebuild the header). We avoid this by adding
147 ## dummy dependencies for each header file. Too bad gcc doesn't do
148 ## this for us directly.
149 tr ' ' '
150 ' < "$tmpdepfile" |
151 ## Some versions of gcc put a space before the `:'. On the theory
152 ## that the space means something, we add a space to the output as
153 ## well.
154 ## Some versions of the HPUX 10.20 sed can't process this invocation
155 ## correctly. Breaking it into two sed invocations is a workaround.
156 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
157 rm -f "$tmpdepfile"
158 ;;
159
160 hp)
161 # This case exists only to let depend.m4 do its work. It works by
162 # looking at the text of this script. This case will never be run,
163 # since it is checked for above.
164 exit 1
165 ;;
166
167 sgi)
168 if test "$libtool" = yes; then
169 "$@" "-Wp,-MDupdate,$tmpdepfile"
170 else
171 "$@" -MDupdate "$tmpdepfile"
172 fi
173 stat=$?
174 if test $stat -eq 0; then :
175 else
176 rm -f "$tmpdepfile"
177 exit $stat
178 fi
179 rm -f "$depfile"
180
181 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
182 echo "$object : \\" > "$depfile"
183
184 # Clip off the initial element (the dependent). Don't try to be
185 # clever and replace this with sed code, as IRIX sed won't handle
186 # lines with more than a fixed number of characters (4096 in
187 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
188 # the IRIX cc adds comments like `#:fec' to the end of the
189 # dependency line.
190 tr ' ' '
191 ' < "$tmpdepfile" \
192 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
193 tr '
194 ' ' ' >> $depfile
195 echo >> $depfile
196
197 # The second pass generates a dummy entry for each header file.
198 tr ' ' '
199 ' < "$tmpdepfile" \
200 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
201 >> $depfile
202 else
203 # The sourcefile does not contain any dependencies, so just
204 # store a dummy comment line, to avoid errors with the Makefile
205 # "include basename.Plo" scheme.
206 echo "#dummy" > "$depfile"
207 fi
208 rm -f "$tmpdepfile"
209 ;;
210
211 aix)
212 # The C for AIX Compiler uses -M and outputs the dependencies
213 # in a .u file. In older versions, this file always lives in the
214 # current directory. Also, the AIX compiler puts `$object:' at the
215 # start of each line; $object doesn't have directory information.
216 # Version 6 uses the directory in both cases.
217 stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
218 tmpdepfile="$stripped.u"
219 if test "$libtool" = yes; then
220 "$@" -Wc,-M
221 else
222 "$@" -M
223 fi
224 stat=$?
225
226 if test -f "$tmpdepfile"; then :
227 else
228 stripped=`echo "$stripped" | sed 's,^.*/,,'`
229 tmpdepfile="$stripped.u"
230 fi
231
232 if test $stat -eq 0; then :
233 else
234 rm -f "$tmpdepfile"
235 exit $stat
236 fi
237
238 if test -f "$tmpdepfile"; then
239 outname="$stripped.o"
240 # Each line is of the form `foo.o: dependent.h'.
241 # Do two passes, one to just change these to
242 # `$object: dependent.h' and one to simply `dependent.h:'.
243 sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
244 sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
245 else
246 # The sourcefile does not contain any dependencies, so just
247 # store a dummy comment line, to avoid errors with the Makefile
248 # "include basename.Plo" scheme.
249 echo "#dummy" > "$depfile"
250 fi
251 rm -f "$tmpdepfile"
252 ;;
253
254 icc)
255 # Intel's C compiler understands `-MD -MF file'. However on
256 # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
257 # ICC 7.0 will fill foo.d with something like
258 # foo.o: sub/foo.c
259 # foo.o: sub/foo.h
260 # which is wrong. We want:
261 # sub/foo.o: sub/foo.c
262 # sub/foo.o: sub/foo.h
263 # sub/foo.c:
264 # sub/foo.h:
265 # ICC 7.1 will output
266 # foo.o: sub/foo.c sub/foo.h
267 # and will wrap long lines using \ :
268 # foo.o: sub/foo.c ... \
269 # sub/foo.h ... \
270 # ...
271
272 "$@" -MD -MF "$tmpdepfile"
273 stat=$?
274 if test $stat -eq 0; then :
275 else
276 rm -f "$tmpdepfile"
277 exit $stat
278 fi
279 rm -f "$depfile"
280 # Each line is of the form `foo.o: dependent.h',
281 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
282 # Do two passes, one to just change these to
283 # `$object: dependent.h' and one to simply `dependent.h:'.
284 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
285 # Some versions of the HPUX 10.20 sed can't process this invocation
286 # correctly. Breaking it into two sed invocations is a workaround.
287 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
288 sed -e 's/$/ :/' >> "$depfile"
289 rm -f "$tmpdepfile"
290 ;;
291
292 hp2)
293 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
294 # compilers, which have integrated preprocessors. The correct option
295 # to use with these is +Maked; it writes dependencies to a file named
296 # 'foo.d', which lands next to the object file, wherever that
297 # happens to be.
298 # Much of this is similar to the tru64 case; see comments there.
299 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
300 test "x$dir" = "x$object" && dir=
301 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
302 if test "$libtool" = yes; then
303 tmpdepfile1=$dir$base.d
304 tmpdepfile2=$dir.libs/$base.d
305 "$@" -Wc,+Maked
306 else
307 tmpdepfile1=$dir$base.d
308 tmpdepfile2=$dir$base.d
309 "$@" +Maked
310 fi
311 stat=$?
312 if test $stat -eq 0; then :
313 else
314 rm -f "$tmpdepfile1" "$tmpdepfile2"
315 exit $stat
316 fi
317
318 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
319 do
320 test -f "$tmpdepfile" && break
321 done
322 if test -f "$tmpdepfile"; then
323 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
324 # Add `dependent.h:' lines.
325 sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
326 else
327 echo "#dummy" > "$depfile"
328 fi
329 rm -f "$tmpdepfile" "$tmpdepfile2"
330 ;;
331
332 tru64)
333 # The Tru64 compiler uses -MD to generate dependencies as a side
334 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
335 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
336 # dependencies in `foo.d' instead, so we check for that too.
337 # Subdirectories are respected.
338 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
339 test "x$dir" = "x$object" && dir=
340 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
341
342 if test "$libtool" = yes; then
343 # With Tru64 cc, shared objects can also be used to make a
344 # static library. This mechanism is used in libtool 1.4 series to
345 # handle both shared and static libraries in a single compilation.
346 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
347 #
348 # With libtool 1.5 this exception was removed, and libtool now
349 # generates 2 separate objects for the 2 libraries. These two
350 # compilations output dependencies in $dir.libs/$base.o.d and
351 # in $dir$base.o.d. We have to check for both files, because
352 # one of the two compilations can be disabled. We should prefer
353 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
354 # automatically cleaned when .libs/ is deleted, while ignoring
355 # the former would cause a distcleancheck panic.
356 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
357 tmpdepfile2=$dir$base.o.d # libtool 1.5
358 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
359 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
360 "$@" -Wc,-MD
361 else
362 tmpdepfile1=$dir$base.o.d
363 tmpdepfile2=$dir$base.d
364 tmpdepfile3=$dir$base.d
365 tmpdepfile4=$dir$base.d
366 "$@" -MD
367 fi
368
369 stat=$?
370 if test $stat -eq 0; then :
371 else
372 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
373 exit $stat
374 fi
375
376 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
377 do
378 test -f "$tmpdepfile" && break
379 done
380 if test -f "$tmpdepfile"; then
381 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
382 # That's a tab and a space in the [].
383 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
384 else
385 echo "#dummy" > "$depfile"
386 fi
387 rm -f "$tmpdepfile"
388 ;;
389
390 #nosideeffect)
391 # This comment above is used by automake to tell side-effect
392 # dependency tracking mechanisms from slower ones.
393
394 dashmstdout)
395 # Important note: in order to support this mode, a compiler *must*
396 # always write the preprocessed file to stdout, regardless of -o.
397 "$@" || exit $?
398
399 # Remove the call to Libtool.
400 if test "$libtool" = yes; then
401 while test $1 != '--mode=compile'; do
402 shift
403 done
404 shift
405 fi
406
407 # Remove `-o $object'.
408 IFS=" "
409 for arg
410 do
411 case $arg in
412 -o)
413 shift
414 ;;
415 $object)
416 shift
417 ;;
418 *)
419 set fnord "$@" "$arg"
420 shift # fnord
421 shift # $arg
422 ;;
423 esac
424 done
425
426 test -z "$dashmflag" && dashmflag=-M
427 # Require at least two characters before searching for `:'
428 # in the target name. This is to cope with DOS-style filenames:
429 # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
430 "$@" $dashmflag |
431 sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
432 rm -f "$depfile"
433 cat < "$tmpdepfile" > "$depfile"
434 tr ' ' '
435 ' < "$tmpdepfile" | \
436 ## Some versions of the HPUX 10.20 sed can't process this invocation
437 ## correctly. Breaking it into two sed invocations is a workaround.
438 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
439 rm -f "$tmpdepfile"
440 ;;
441
442 dashXmstdout)
443 # This case only exists to satisfy depend.m4. It is never actually
444 # run, as this mode is specially recognized in the preamble.
445 exit 1
446 ;;
447
448 makedepend)
449 "$@" || exit $?
450 # Remove any Libtool call
451 if test "$libtool" = yes; then
452 while test $1 != '--mode=compile'; do
453 shift
454 done
455 shift
456 fi
457 # X makedepend
458 shift
459 cleared=no
460 for arg in "$@"; do
461 case $cleared in
462 no)
463 set ""; shift
464 cleared=yes ;;
465 esac
466 case "$arg" in
467 -D*|-I*)
468 set fnord "$@" "$arg"; shift ;;
469 # Strip any option that makedepend may not understand. Remove
470 # the object too, otherwise makedepend will parse it as a source file.
471 -*|$object)
472 ;;
473 *)
474 set fnord "$@" "$arg"; shift ;;
475 esac
476 done
477 obj_suffix="`echo $object | sed 's/^.*\././'`"
478 touch "$tmpdepfile"
479 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
480 rm -f "$depfile"
481 cat < "$tmpdepfile" > "$depfile"
482 sed '1,2d' "$tmpdepfile" | tr ' ' '
483 ' | \
484 ## Some versions of the HPUX 10.20 sed can't process this invocation
485 ## correctly. Breaking it into two sed invocations is a workaround.
486 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
487 rm -f "$tmpdepfile" "$tmpdepfile".bak
488 ;;
489
490 cpp)
491 # Important note: in order to support this mode, a compiler *must*
492 # always write the preprocessed file to stdout.
493 "$@" || exit $?
494
495 # Remove the call to Libtool.
496 if test "$libtool" = yes; then
497 while test $1 != '--mode=compile'; do
498 shift
499 done
500 shift
501 fi
502
503 # Remove `-o $object'.
504 IFS=" "
505 for arg
506 do
507 case $arg in
508 -o)
509 shift
510 ;;
511 $object)
512 shift
513 ;;
514 *)
515 set fnord "$@" "$arg"
516 shift # fnord
517 shift # $arg
518 ;;
519 esac
520 done
521
522 "$@" -E |
523 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
524 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
525 sed '$ s: \\$::' > "$tmpdepfile"
526 rm -f "$depfile"
527 echo "$object : \\" > "$depfile"
528 cat < "$tmpdepfile" >> "$depfile"
529 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
530 rm -f "$tmpdepfile"
531 ;;
532
533 msvisualcpp)
534 # Important note: in order to support this mode, a compiler *must*
535 # always write the preprocessed file to stdout, regardless of -o,
536 # because we must use -o when running libtool.
537 "$@" || exit $?
538 IFS=" "
539 for arg
540 do
541 case "$arg" in
542 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
543 set fnord "$@"
544 shift
545 shift
546 ;;
547 *)
548 set fnord "$@" "$arg"
549 shift
550 shift
551 ;;
552 esac
553 done
554 "$@" -E |
555 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
556 rm -f "$depfile"
557 echo "$object : \\" > "$depfile"
558 . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
559 echo " " >> "$depfile"
560 . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
561 rm -f "$tmpdepfile"
562 ;;
563
564 none)
565 exec "$@"
566 ;;
567
568 *)
569 echo "Unknown depmode $depmode" 1>&2
570 exit 1
571 ;;
572 esac
573
574 exit 0
575
576 # Local Variables:
577 # mode: shell-script
578 # sh-indentation: 2
579 # eval: (add-hook 'write-file-hooks 'time-stamp)
580 # time-stamp-start: "scriptversion="
581 # time-stamp-format: "%:y-%02m-%02d.%02H"
582 # time-stamp-end: "$"
583 # End:
0
1 bin_PROGRAMS = polkit-gnome-example
2
3 polkit_gnome_example_SOURCES = \
4 polkit-gnome-example.c
5
6 polkit_gnome_example_CPPFLAGS = \
7 -I$(top_srcdir) \
8 -DLIBEXECDIR=\""$(libexecdir)"\" \
9 -DDATADIR=\""$(pkgdatadir)"\" \
10 -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
11 $(DISABLE_DEPRECATED) \
12 $(AM_CPPFLAGS)
13
14 polkit_gnome_example_CFLAGS = \
15 $(POLKIT_GNOME_CFLAGS) \
16 $(WARN_CFLAGS) \
17 $(AM_CFLAGS)
18
19 polkit_gnome_example_LDFLAGS = \
20 $(AM_LDFLAGS)
21
22 polkit_gnome_example_LDADD = \
23 $(POLKIT_GNOME_LIBS) \
24 $(INTLLIBS)
25
26 ## Helper
27
28 libexec_PROGRAMS = polkit-gnome-example-helper
29
30 polkit_gnome_example_helper_SOURCES = \
31 polkit-gnome-example-helper.c
32
33 polkit_gnome_example_helper_CPPFLAGS = \
34 -I$(top_srcdir) \
35 -DLIBEXECDIR=\""$(libexecdir)"\" \
36 -DDATADIR=\""$(pkgdatadir)"\" \
37 -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
38 $(DISABLE_DEPRECATED) \
39 $(AM_CPPFLAGS)
40
41
42 polkit_gnome_example_helper_CFLAGS = \
43 $(POLKIT_GNOME_CFLAGS) \
44 $(WARN_CFLAGS) \
45 $(AM_CFLAGS)
46
47 polkit_gnome_example_helper_LDADD = \
48 $(POLKIT_GNOME_LIBS) \
49 $(INTLLIBS)
50
51 # PolicyKit action definitions for this example
52 #
53 polkit_policydir = $(datadir)/PolicyKit/policy
54 dist_polkit_policy_DATA = polkit-gnome-example.policy
55
56 # You will need a recent intltool or the patch from this bug
57 # http://bugzilla.gnome.org/show_bug.cgi?id=462312
58 @INTLTOOL_POLICY_RULE@
59
60 # TODO: FIXME: this breaks 'make distcheck'
61 check:
62 $(POLKIT_POLICY_FILE_VALIDATE) $(dist_polkit_policy_DATA)
63
64 EXTRA_DIST = polkit-gnome-example.policy.in
65
66 CLEANFILES = $(BUILT_SOURCES)
67 DISTCLEANFILES = polkit-gnome-example.policy
68
69 clean-local :
70 rm -f *~
0 # Makefile.in generated by automake 1.10 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16
17 VPATH = @srcdir@
18 pkgdatadir = $(datadir)/@PACKAGE@
19 pkglibdir = $(libdir)/@PACKAGE@
20 pkgincludedir = $(includedir)/@PACKAGE@
21 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22 install_sh_DATA = $(install_sh) -c -m 644
23 install_sh_PROGRAM = $(install_sh) -c
24 install_sh_SCRIPT = $(install_sh) -c
25 INSTALL_HEADER = $(INSTALL_DATA)
26 transform = $(program_transform_name)
27 NORMAL_INSTALL = :
28 PRE_INSTALL = :
29 POST_INSTALL = :
30 NORMAL_UNINSTALL = :
31 PRE_UNINSTALL = :
32 POST_UNINSTALL = :
33 build_triplet = @build@
34 host_triplet = @host@
35 bin_PROGRAMS = polkit-gnome-example$(EXEEXT)
36 libexec_PROGRAMS = polkit-gnome-example-helper$(EXEEXT)
37 subdir = examples
38 DIST_COMMON = $(dist_polkit_policy_DATA) $(srcdir)/Makefile.am \
39 $(srcdir)/Makefile.in
40 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
42 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
43 $(ACLOCAL_M4)
44 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
45 CONFIG_HEADER = $(top_builddir)/config.h
46 CONFIG_CLEAN_FILES =
47 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
48 "$(DESTDIR)$(polkit_policydir)"
49 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
50 libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
51 PROGRAMS = $(bin_PROGRAMS) $(libexec_PROGRAMS)
52 am_polkit_gnome_example_OBJECTS = \
53 polkit_gnome_example-polkit-gnome-example.$(OBJEXT)
54 polkit_gnome_example_OBJECTS = $(am_polkit_gnome_example_OBJECTS)
55 am__DEPENDENCIES_1 =
56 polkit_gnome_example_DEPENDENCIES = $(am__DEPENDENCIES_1) \
57 $(am__DEPENDENCIES_1)
58 polkit_gnome_example_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
59 $(LIBTOOLFLAGS) --mode=link $(CCLD) \
60 $(polkit_gnome_example_CFLAGS) $(CFLAGS) \
61 $(polkit_gnome_example_LDFLAGS) $(LDFLAGS) -o $@
62 am_polkit_gnome_example_helper_OBJECTS = polkit_gnome_example_helper-polkit-gnome-example-helper.$(OBJEXT)
63 polkit_gnome_example_helper_OBJECTS = \
64 $(am_polkit_gnome_example_helper_OBJECTS)
65 polkit_gnome_example_helper_DEPENDENCIES = $(am__DEPENDENCIES_1) \
66 $(am__DEPENDENCIES_1)
67 polkit_gnome_example_helper_LINK = $(LIBTOOL) --tag=CC \
68 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
69 $(polkit_gnome_example_helper_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
70 $(LDFLAGS) -o $@
71 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
72 depcomp = $(SHELL) $(top_srcdir)/depcomp
73 am__depfiles_maybe = depfiles
74 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
75 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
76 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
77 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
78 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
79 CCLD = $(CC)
80 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
81 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
82 $(LDFLAGS) -o $@
83 SOURCES = $(polkit_gnome_example_SOURCES) \
84 $(polkit_gnome_example_helper_SOURCES)
85 DIST_SOURCES = $(polkit_gnome_example_SOURCES) \
86 $(polkit_gnome_example_helper_SOURCES)
87 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
88 am__vpath_adj = case $$p in \
89 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
90 *) f=$$p;; \
91 esac;
92 am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
93 dist_polkit_policyDATA_INSTALL = $(INSTALL_DATA)
94 DATA = $(dist_polkit_policy_DATA)
95 ETAGS = etags
96 CTAGS = ctags
97 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
98 ACLOCAL = @ACLOCAL@
99 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
100 ALL_LINGUAS = @ALL_LINGUAS@
101 AMTAR = @AMTAR@
102 AM_CFLAGS = @AM_CFLAGS@
103 AM_CPPFLAGS = @AM_CPPFLAGS@
104 AM_CXXFLAGS = @AM_CXXFLAGS@
105 AM_LDFLAGS = @AM_LDFLAGS@
106 AR = @AR@
107 AUTOCONF = @AUTOCONF@
108 AUTOHEADER = @AUTOHEADER@
109 AUTOMAKE = @AUTOMAKE@
110 AWK = @AWK@
111 CATALOGS = @CATALOGS@
112 CATOBJEXT = @CATOBJEXT@
113 CC = @CC@
114 CCDEPMODE = @CCDEPMODE@
115 CFLAGS = @CFLAGS@
116 CPP = @CPP@
117 CPPFLAGS = @CPPFLAGS@
118 CXX = @CXX@
119 CXXCPP = @CXXCPP@
120 CXXDEPMODE = @CXXDEPMODE@
121 CXXFLAGS = @CXXFLAGS@
122 CYGPATH_W = @CYGPATH_W@
123 DATADIRNAME = @DATADIRNAME@
124 DEFS = @DEFS@
125 DEPDIR = @DEPDIR@
126 DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
127 DOC_USER_FORMATS = @DOC_USER_FORMATS@
128 ECHO = @ECHO@
129 ECHO_C = @ECHO_C@
130 ECHO_N = @ECHO_N@
131 ECHO_T = @ECHO_T@
132 EGREP = @EGREP@
133 EXEEXT = @EXEEXT@
134 F77 = @F77@
135 FFLAGS = @FFLAGS@
136 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
137 GMOFILES = @GMOFILES@
138 GMSGFMT = @GMSGFMT@
139 GREP = @GREP@
140 HELP_DIR = @HELP_DIR@
141 INSTALL = @INSTALL@
142 INSTALL_DATA = @INSTALL_DATA@
143 INSTALL_PROGRAM = @INSTALL_PROGRAM@
144 INSTALL_SCRIPT = @INSTALL_SCRIPT@
145 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
146 INSTOBJEXT = @INSTOBJEXT@
147 INTLLIBS = @INTLLIBS@
148 INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
149 INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
150 INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
151 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
152 INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
153 INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
154 INTLTOOL_MERGE = @INTLTOOL_MERGE@
155 INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
156 INTLTOOL_PERL = @INTLTOOL_PERL@
157 INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
158 INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
159 INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
160 INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
161 INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
162 INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
163 INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
164 INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
165 INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
166 INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
167 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
168 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
169 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
170 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
171 LDFLAGS = @LDFLAGS@
172 LIBOBJS = @LIBOBJS@
173 LIBS = @LIBS@
174 LIBTOOL = @LIBTOOL@
175 LN_S = @LN_S@
176 LTLIBOBJS = @LTLIBOBJS@
177 MAINT = @MAINT@
178 MAKEINFO = @MAKEINFO@
179 MKDIR_P = @MKDIR_P@
180 MKINSTALLDIRS = @MKINSTALLDIRS@
181 MSGFMT = @MSGFMT@
182 MSGFMT_OPTS = @MSGFMT_OPTS@
183 OBJEXT = @OBJEXT@
184 OMF_DIR = @OMF_DIR@
185 PACKAGE = @PACKAGE@
186 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
187 PACKAGE_NAME = @PACKAGE_NAME@
188 PACKAGE_STRING = @PACKAGE_STRING@
189 PACKAGE_TARNAME = @PACKAGE_TARNAME@
190 PACKAGE_VERSION = @PACKAGE_VERSION@
191 PATH_SEPARATOR = @PATH_SEPARATOR@
192 PKG_CONFIG = @PKG_CONFIG@
193 POFILES = @POFILES@
194 POLKIT_GNOME_CFLAGS = @POLKIT_GNOME_CFLAGS@
195 POLKIT_GNOME_LIBS = @POLKIT_GNOME_LIBS@
196 POLKIT_POLICY_FILE_VALIDATE = @POLKIT_POLICY_FILE_VALIDATE@
197 POSUB = @POSUB@
198 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
199 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
200 RANLIB = @RANLIB@
201 SED = @SED@
202 SET_MAKE = @SET_MAKE@
203 SHELL = @SHELL@
204 STRIP = @STRIP@
205 USE_NLS = @USE_NLS@
206 VERSION = @VERSION@
207 WARN_CFLAGS = @WARN_CFLAGS@
208 XGETTEXT = @XGETTEXT@
209 abs_builddir = @abs_builddir@
210 abs_srcdir = @abs_srcdir@
211 abs_top_builddir = @abs_top_builddir@
212 abs_top_srcdir = @abs_top_srcdir@
213 ac_ct_CC = @ac_ct_CC@
214 ac_ct_CXX = @ac_ct_CXX@
215 ac_ct_F77 = @ac_ct_F77@
216 am__include = @am__include@
217 am__leading_dot = @am__leading_dot@
218 am__quote = @am__quote@
219 am__tar = @am__tar@
220 am__untar = @am__untar@
221 bindir = @bindir@
222 build = @build@
223 build_alias = @build_alias@
224 build_cpu = @build_cpu@
225 build_os = @build_os@
226 build_vendor = @build_vendor@
227 builddir = @builddir@
228 datadir = @datadir@
229 datarootdir = @datarootdir@
230 docdir = @docdir@
231 dvidir = @dvidir@
232 exec_prefix = @exec_prefix@
233 host = @host@
234 host_alias = @host_alias@
235 host_cpu = @host_cpu@
236 host_os = @host_os@
237 host_vendor = @host_vendor@
238 htmldir = @htmldir@
239 includedir = @includedir@
240 infodir = @infodir@
241 install_sh = @install_sh@
242 libdir = @libdir@
243 libexecdir = @libexecdir@
244 localedir = @localedir@
245 localstatedir = @localstatedir@
246 mandir = @mandir@
247 mkdir_p = @mkdir_p@
248 oldincludedir = @oldincludedir@
249 pdfdir = @pdfdir@
250 prefix = @prefix@
251 program_transform_name = @program_transform_name@
252 psdir = @psdir@
253 sbindir = @sbindir@
254 sharedstatedir = @sharedstatedir@
255 srcdir = @srcdir@
256 sysconfdir = @sysconfdir@
257 target_alias = @target_alias@
258 top_builddir = @top_builddir@
259 top_srcdir = @top_srcdir@
260 polkit_gnome_example_SOURCES = \
261 polkit-gnome-example.c
262
263 polkit_gnome_example_CPPFLAGS = \
264 -I$(top_srcdir) \
265 -DLIBEXECDIR=\""$(libexecdir)"\" \
266 -DDATADIR=\""$(pkgdatadir)"\" \
267 -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
268 $(DISABLE_DEPRECATED) \
269 $(AM_CPPFLAGS)
270
271 polkit_gnome_example_CFLAGS = \
272 $(POLKIT_GNOME_CFLAGS) \
273 $(WARN_CFLAGS) \
274 $(AM_CFLAGS)
275
276 polkit_gnome_example_LDFLAGS = \
277 $(AM_LDFLAGS)
278
279 polkit_gnome_example_LDADD = \
280 $(POLKIT_GNOME_LIBS) \
281 $(INTLLIBS)
282
283 polkit_gnome_example_helper_SOURCES = \
284 polkit-gnome-example-helper.c
285
286 polkit_gnome_example_helper_CPPFLAGS = \
287 -I$(top_srcdir) \
288 -DLIBEXECDIR=\""$(libexecdir)"\" \
289 -DDATADIR=\""$(pkgdatadir)"\" \
290 -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
291 $(DISABLE_DEPRECATED) \
292 $(AM_CPPFLAGS)
293
294 polkit_gnome_example_helper_CFLAGS = \
295 $(POLKIT_GNOME_CFLAGS) \
296 $(WARN_CFLAGS) \
297 $(AM_CFLAGS)
298
299 polkit_gnome_example_helper_LDADD = \
300 $(POLKIT_GNOME_LIBS) \
301 $(INTLLIBS)
302
303
304 # PolicyKit action definitions for this example
305 #
306 polkit_policydir = $(datadir)/PolicyKit/policy
307 dist_polkit_policy_DATA = polkit-gnome-example.policy
308 EXTRA_DIST = polkit-gnome-example.policy.in
309 CLEANFILES = $(BUILT_SOURCES)
310 DISTCLEANFILES = polkit-gnome-example.policy
311 all: all-am
312
313 .SUFFIXES:
314 .SUFFIXES: .c .lo .o .obj
315 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
316 @for dep in $?; do \
317 case '$(am__configure_deps)' in \
318 *$$dep*) \
319 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
320 && exit 0; \
321 exit 1;; \
322 esac; \
323 done; \
324 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \
325 cd $(top_srcdir) && \
326 $(AUTOMAKE) --foreign examples/Makefile
327 .PRECIOUS: Makefile
328 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
329 @case '$?' in \
330 *config.status*) \
331 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
332 *) \
333 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
334 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
335 esac;
336
337 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
338 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
339
340 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
341 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
342 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
343 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
344 install-binPROGRAMS: $(bin_PROGRAMS)
345 @$(NORMAL_INSTALL)
346 test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
347 @list='$(bin_PROGRAMS)'; for p in $$list; do \
348 p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
349 if test -f $$p \
350 || test -f $$p1 \
351 ; then \
352 f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
353 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
354 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
355 else :; fi; \
356 done
357
358 uninstall-binPROGRAMS:
359 @$(NORMAL_UNINSTALL)
360 @list='$(bin_PROGRAMS)'; for p in $$list; do \
361 f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
362 echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
363 rm -f "$(DESTDIR)$(bindir)/$$f"; \
364 done
365
366 clean-binPROGRAMS:
367 @list='$(bin_PROGRAMS)'; for p in $$list; do \
368 f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
369 echo " rm -f $$p $$f"; \
370 rm -f $$p $$f ; \
371 done
372 install-libexecPROGRAMS: $(libexec_PROGRAMS)
373 @$(NORMAL_INSTALL)
374 test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
375 @list='$(libexec_PROGRAMS)'; for p in $$list; do \
376 p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
377 if test -f $$p \
378 || test -f $$p1 \
379 ; then \
380 f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
381 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
382 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
383 else :; fi; \
384 done
385
386 uninstall-libexecPROGRAMS:
387 @$(NORMAL_UNINSTALL)
388 @list='$(libexec_PROGRAMS)'; for p in $$list; do \
389 f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
390 echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
391 rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
392 done
393
394 clean-libexecPROGRAMS:
395 @list='$(libexec_PROGRAMS)'; for p in $$list; do \
396 f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
397 echo " rm -f $$p $$f"; \
398 rm -f $$p $$f ; \
399 done
400 polkit-gnome-example$(EXEEXT): $(polkit_gnome_example_OBJECTS) $(polkit_gnome_example_DEPENDENCIES)
401 @rm -f polkit-gnome-example$(EXEEXT)
402 $(polkit_gnome_example_LINK) $(polkit_gnome_example_OBJECTS) $(polkit_gnome_example_LDADD) $(LIBS)
403 polkit-gnome-example-helper$(EXEEXT): $(polkit_gnome_example_helper_OBJECTS) $(polkit_gnome_example_helper_DEPENDENCIES)
404 @rm -f polkit-gnome-example-helper$(EXEEXT)
405 $(polkit_gnome_example_helper_LINK) $(polkit_gnome_example_helper_OBJECTS) $(polkit_gnome_example_helper_LDADD) $(LIBS)
406
407 mostlyclean-compile:
408 -rm -f *.$(OBJEXT)
409
410 distclean-compile:
411 -rm -f *.tab.c
412
413 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polkit_gnome_example-polkit-gnome-example.Po@am__quote@
414 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polkit_gnome_example_helper-polkit-gnome-example-helper.Po@am__quote@
415
416 .c.o:
417 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
418 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
419 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
420 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
421 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
422
423 .c.obj:
424 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
425 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
426 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
427 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
428 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
429
430 .c.lo:
431 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
432 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
433 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
434 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
435 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
436
437 polkit_gnome_example-polkit-gnome-example.o: polkit-gnome-example.c
438 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_example_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_example_CFLAGS) $(CFLAGS) -MT polkit_gnome_example-polkit-gnome-example.o -MD -MP -MF $(DEPDIR)/polkit_gnome_example-polkit-gnome-example.Tpo -c -o polkit_gnome_example-polkit-gnome-example.o `test -f 'polkit-gnome-example.c' || echo '$(srcdir)/'`polkit-gnome-example.c
439 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/polkit_gnome_example-polkit-gnome-example.Tpo $(DEPDIR)/polkit_gnome_example-polkit-gnome-example.Po
440 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkit-gnome-example.c' object='polkit_gnome_example-polkit-gnome-example.o' libtool=no @AMDEPBACKSLASH@
441 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
442 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_example_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_example_CFLAGS) $(CFLAGS) -c -o polkit_gnome_example-polkit-gnome-example.o `test -f 'polkit-gnome-example.c' || echo '$(srcdir)/'`polkit-gnome-example.c
443
444 polkit_gnome_example-polkit-gnome-example.obj: polkit-gnome-example.c
445 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_example_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_example_CFLAGS) $(CFLAGS) -MT polkit_gnome_example-polkit-gnome-example.obj -MD -MP -MF $(DEPDIR)/polkit_gnome_example-polkit-gnome-example.Tpo -c -o polkit_gnome_example-polkit-gnome-example.obj `if test -f 'polkit-gnome-example.c'; then $(CYGPATH_W) 'polkit-gnome-example.c'; else $(CYGPATH_W) '$(srcdir)/polkit-gnome-example.c'; fi`
446 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/polkit_gnome_example-polkit-gnome-example.Tpo $(DEPDIR)/polkit_gnome_example-polkit-gnome-example.Po
447 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkit-gnome-example.c' object='polkit_gnome_example-polkit-gnome-example.obj' libtool=no @AMDEPBACKSLASH@
448 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
449 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_example_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_example_CFLAGS) $(CFLAGS) -c -o polkit_gnome_example-polkit-gnome-example.obj `if test -f 'polkit-gnome-example.c'; then $(CYGPATH_W) 'polkit-gnome-example.c'; else $(CYGPATH_W) '$(srcdir)/polkit-gnome-example.c'; fi`
450
451 polkit_gnome_example_helper-polkit-gnome-example-helper.o: polkit-gnome-example-helper.c
452 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_example_helper_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_example_helper_CFLAGS) $(CFLAGS) -MT polkit_gnome_example_helper-polkit-gnome-example-helper.o -MD -MP -MF $(DEPDIR)/polkit_gnome_example_helper-polkit-gnome-example-helper.Tpo -c -o polkit_gnome_example_helper-polkit-gnome-example-helper.o `test -f 'polkit-gnome-example-helper.c' || echo '$(srcdir)/'`polkit-gnome-example-helper.c
453 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/polkit_gnome_example_helper-polkit-gnome-example-helper.Tpo $(DEPDIR)/polkit_gnome_example_helper-polkit-gnome-example-helper.Po
454 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkit-gnome-example-helper.c' object='polkit_gnome_example_helper-polkit-gnome-example-helper.o' libtool=no @AMDEPBACKSLASH@
455 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
456 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_example_helper_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_example_helper_CFLAGS) $(CFLAGS) -c -o polkit_gnome_example_helper-polkit-gnome-example-helper.o `test -f 'polkit-gnome-example-helper.c' || echo '$(srcdir)/'`polkit-gnome-example-helper.c
457
458 polkit_gnome_example_helper-polkit-gnome-example-helper.obj: polkit-gnome-example-helper.c
459 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_example_helper_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_example_helper_CFLAGS) $(CFLAGS) -MT polkit_gnome_example_helper-polkit-gnome-example-helper.obj -MD -MP -MF $(DEPDIR)/polkit_gnome_example_helper-polkit-gnome-example-helper.Tpo -c -o polkit_gnome_example_helper-polkit-gnome-example-helper.obj `if test -f 'polkit-gnome-example-helper.c'; then $(CYGPATH_W) 'polkit-gnome-example-helper.c'; else $(CYGPATH_W) '$(srcdir)/polkit-gnome-example-helper.c'; fi`
460 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/polkit_gnome_example_helper-polkit-gnome-example-helper.Tpo $(DEPDIR)/polkit_gnome_example_helper-polkit-gnome-example-helper.Po
461 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkit-gnome-example-helper.c' object='polkit_gnome_example_helper-polkit-gnome-example-helper.obj' libtool=no @AMDEPBACKSLASH@
462 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
463 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_example_helper_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_example_helper_CFLAGS) $(CFLAGS) -c -o polkit_gnome_example_helper-polkit-gnome-example-helper.obj `if test -f 'polkit-gnome-example-helper.c'; then $(CYGPATH_W) 'polkit-gnome-example-helper.c'; else $(CYGPATH_W) '$(srcdir)/polkit-gnome-example-helper.c'; fi`
464
465 mostlyclean-libtool:
466 -rm -f *.lo
467
468 clean-libtool:
469 -rm -rf .libs _libs
470 install-dist_polkit_policyDATA: $(dist_polkit_policy_DATA)
471 @$(NORMAL_INSTALL)
472 test -z "$(polkit_policydir)" || $(MKDIR_P) "$(DESTDIR)$(polkit_policydir)"
473 @list='$(dist_polkit_policy_DATA)'; for p in $$list; do \
474 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
475 f=$(am__strip_dir) \
476 echo " $(dist_polkit_policyDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(polkit_policydir)/$$f'"; \
477 $(dist_polkit_policyDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(polkit_policydir)/$$f"; \
478 done
479
480 uninstall-dist_polkit_policyDATA:
481 @$(NORMAL_UNINSTALL)
482 @list='$(dist_polkit_policy_DATA)'; for p in $$list; do \
483 f=$(am__strip_dir) \
484 echo " rm -f '$(DESTDIR)$(polkit_policydir)/$$f'"; \
485 rm -f "$(DESTDIR)$(polkit_policydir)/$$f"; \
486 done
487
488 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
489 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
490 unique=`for i in $$list; do \
491 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
492 done | \
493 $(AWK) ' { files[$$0] = 1; } \
494 END { for (i in files) print i; }'`; \
495 mkid -fID $$unique
496 tags: TAGS
497
498 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
499 $(TAGS_FILES) $(LISP)
500 tags=; \
501 here=`pwd`; \
502 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
503 unique=`for i in $$list; do \
504 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
505 done | \
506 $(AWK) ' { files[$$0] = 1; } \
507 END { for (i in files) print i; }'`; \
508 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
509 test -n "$$unique" || unique=$$empty_fix; \
510 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
511 $$tags $$unique; \
512 fi
513 ctags: CTAGS
514 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
515 $(TAGS_FILES) $(LISP)
516 tags=; \
517 here=`pwd`; \
518 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
519 unique=`for i in $$list; do \
520 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
521 done | \
522 $(AWK) ' { files[$$0] = 1; } \
523 END { for (i in files) print i; }'`; \
524 test -z "$(CTAGS_ARGS)$$tags$$unique" \
525 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
526 $$tags $$unique
527
528 GTAGS:
529 here=`$(am__cd) $(top_builddir) && pwd` \
530 && cd $(top_srcdir) \
531 && gtags -i $(GTAGS_ARGS) $$here
532
533 distclean-tags:
534 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
535
536 distdir: $(DISTFILES)
537 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
538 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
539 list='$(DISTFILES)'; \
540 dist_files=`for file in $$list; do echo $$file; done | \
541 sed -e "s|^$$srcdirstrip/||;t" \
542 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
543 case $$dist_files in \
544 */*) $(MKDIR_P) `echo "$$dist_files" | \
545 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
546 sort -u` ;; \
547 esac; \
548 for file in $$dist_files; do \
549 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
550 if test -d $$d/$$file; then \
551 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
552 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
553 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
554 fi; \
555 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
556 else \
557 test -f $(distdir)/$$file \
558 || cp -p $$d/$$file $(distdir)/$$file \
559 || exit 1; \
560 fi; \
561 done
562 check-am: all-am
563 check: check-am
564 all-am: Makefile $(PROGRAMS) $(DATA)
565 installdirs:
566 for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(polkit_policydir)"; do \
567 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
568 done
569 install: install-am
570 install-exec: install-exec-am
571 install-data: install-data-am
572 uninstall: uninstall-am
573
574 install-am: all-am
575 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
576
577 installcheck: installcheck-am
578 install-strip:
579 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
580 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
581 `test -z '$(STRIP)' || \
582 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
583 mostlyclean-generic:
584
585 clean-generic:
586 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
587
588 distclean-generic:
589 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
590 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
591
592 maintainer-clean-generic:
593 @echo "This command is intended for maintainers to use"
594 @echo "it deletes files that may require special tools to rebuild."
595 clean: clean-am
596
597 clean-am: clean-binPROGRAMS clean-generic clean-libexecPROGRAMS \
598 clean-libtool clean-local mostlyclean-am
599
600 distclean: distclean-am
601 -rm -rf ./$(DEPDIR)
602 -rm -f Makefile
603 distclean-am: clean-am distclean-compile distclean-generic \
604 distclean-tags
605
606 dvi: dvi-am
607
608 dvi-am:
609
610 html: html-am
611
612 info: info-am
613
614 info-am:
615
616 install-data-am: install-dist_polkit_policyDATA
617
618 install-dvi: install-dvi-am
619
620 install-exec-am: install-binPROGRAMS install-libexecPROGRAMS
621
622 install-html: install-html-am
623
624 install-info: install-info-am
625
626 install-man:
627
628 install-pdf: install-pdf-am
629
630 install-ps: install-ps-am
631
632 installcheck-am:
633
634 maintainer-clean: maintainer-clean-am
635 -rm -rf ./$(DEPDIR)
636 -rm -f Makefile
637 maintainer-clean-am: distclean-am maintainer-clean-generic
638
639 mostlyclean: mostlyclean-am
640
641 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
642 mostlyclean-libtool
643
644 pdf: pdf-am
645
646 pdf-am:
647
648 ps: ps-am
649
650 ps-am:
651
652 uninstall-am: uninstall-binPROGRAMS uninstall-dist_polkit_policyDATA \
653 uninstall-libexecPROGRAMS
654
655 .MAKE: install-am install-strip
656
657 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
658 clean-generic clean-libexecPROGRAMS clean-libtool clean-local \
659 ctags distclean distclean-compile distclean-generic \
660 distclean-libtool distclean-tags distdir dvi dvi-am html \
661 html-am info info-am install install-am install-binPROGRAMS \
662 install-data install-data-am install-dist_polkit_policyDATA \
663 install-dvi install-dvi-am install-exec install-exec-am \
664 install-html install-html-am install-info install-info-am \
665 install-libexecPROGRAMS install-man install-pdf install-pdf-am \
666 install-ps install-ps-am install-strip installcheck \
667 installcheck-am installdirs maintainer-clean \
668 maintainer-clean-generic mostlyclean mostlyclean-compile \
669 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
670 tags uninstall uninstall-am uninstall-binPROGRAMS \
671 uninstall-dist_polkit_policyDATA uninstall-libexecPROGRAMS
672
673
674 # You will need a recent intltool or the patch from this bug
675 # http://bugzilla.gnome.org/show_bug.cgi?id=462312
676 @INTLTOOL_POLICY_RULE@
677
678 # TODO: FIXME: this breaks 'make distcheck'
679 check:
680 $(POLKIT_POLICY_FILE_VALIDATE) $(dist_polkit_policy_DATA)
681
682 clean-local :
683 rm -f *~
684 # Tell versions [3.59,3.63) of GNU make to not export all variables.
685 # Otherwise a system limit (for SysV at least) may be exceeded.
686 .NOEXPORT:
0 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
1 *
2 * Copyright (C) 2007 David Zeuthen <david@fubar.dk>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 */
19
20 #ifdef HAVE_CONFIG_H
21 # include "config.h"
22 #endif
23
24 #include <stdlib.h>
25 #include <stdio.h>
26 #include <unistd.h>
27 #include <signal.h>
28 #include <errno.h>
29 #include <string.h>
30 #include <sys/types.h>
31 #include <sys/stat.h>
32 #include <fcntl.h>
33
34 #include <glib.h>
35 #include <polkit/polkit.h>
36 #include <polkit-dbus/polkit-dbus.h>
37
38 static gboolean
39 io_watch_have_data (GIOChannel *channel, GIOCondition condition, gpointer user_data)
40 {
41 int fd;
42 PolKitContext *pk_context = user_data;
43 fd = g_io_channel_unix_get_fd (channel);
44 polkit_context_io_func (pk_context, fd);
45 return TRUE;
46 }
47
48 static int
49 io_add_watch (PolKitContext *pk_context, int fd)
50 {
51 guint id = 0;
52 GIOChannel *channel;
53 channel = g_io_channel_unix_new (fd);
54 if (channel == NULL)
55 goto out;
56 id = g_io_add_watch (channel, G_IO_IN, io_watch_have_data, pk_context);
57 if (id == 0) {
58 g_io_channel_unref (channel);
59 goto out;
60 }
61 g_io_channel_unref (channel);
62 out:
63 return id;
64 }
65
66 static void
67 io_remove_watch (PolKitContext *pk_context, int watch_id)
68 {
69 g_source_remove (watch_id);
70 }
71
72
73 static void
74 exit_not_privileged (PolKitResult pk_result, const char *pk_action)
75 {
76 const char *pk_result_as_str;
77 pk_result_as_str = polkit_result_to_string_representation (pk_result);
78 fprintf (stderr, "%s %s", pk_result_as_str, pk_action);
79 exit(1);
80 }
81
82 static gboolean
83 check_privileged (PolKitContext *pol_ctx,
84 pid_t caller_pid,
85 const char *pk_action,
86 PolKitResult *pk_result)
87 {
88 DBusError error;
89 DBusConnection *bus;
90 PolKitCaller *caller;
91 PolKitAction *action;
92
93 dbus_error_init (&error);
94 bus = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
95 if (bus == NULL) {
96 fprintf (stderr, "cannot connect to system bus: %s: %s\n", error.name, error.message);
97 dbus_error_free (&error);
98 goto out;
99 }
100
101 action = polkit_action_new ();
102 polkit_action_set_action_id (action, pk_action);
103
104 caller = polkit_caller_new_from_pid (bus, caller_pid, &error);
105 if (caller == NULL) {
106 fprintf (stderr, "cannot get caller from dbus name\n");
107 goto out;
108 }
109
110 *pk_result = polkit_context_can_caller_do_action (pol_ctx, action, caller);
111 return TRUE;
112 out:
113 return FALSE;
114 }
115
116 static void
117 usage (void)
118 {
119 fprintf (stderr, "usage: polkit-gnome-example-helper --frobnicate | --tweak\n");
120 exit (2);
121 }
122
123 static char *kick_type = NULL;
124
125 static void
126 _cb (PolKitPolicyCache *policy_cache,
127 PolKitPolicyFileEntry *entry,
128 void *user_data)
129 {
130 const char *value;
131 char **target_action = (char **) user_data;
132
133 /* have we already found one Action? */
134 if (*target_action != NULL)
135 return;
136
137 value = polkit_policy_file_entry_get_annotation (entry, "org.gnome.policykit.examples.kick-path");
138 if (value == NULL)
139 return;
140
141 if (strcmp (value, kick_type) != 0)
142 return;
143
144 *target_action = strdup (polkit_policy_file_entry_get_id (entry));
145 }
146
147 int
148 main (int argc, char *argv[])
149 {
150 pid_t parent_pid;
151 char *pk_action;
152 PolKitResult pk_result = POLKIT_RESULT_NO;
153 PolKitContext *pol_ctx;
154
155 printf ("In polkit-gnome-example-helper\n");
156
157
158 if (argc < 2) {
159 usage ();
160 }
161
162 pol_ctx = polkit_context_new ();
163 polkit_context_set_io_watch_functions (pol_ctx, io_add_watch, io_remove_watch);
164 if (!polkit_context_init (pol_ctx, NULL)) {
165 fprintf (stderr, "cannot init polkit\n");
166 exit_not_privileged (POLKIT_RESULT_NO, pk_action);
167 }
168
169 if (strcmp (argv[1], "--frobnicate") == 0 && argc == 2) {
170 pk_action = "org.gnome.policykit.examples.frobnicate";
171 } else if (strcmp (argv[1], "--tweak") == 0 && argc == 2) {
172 pk_action = "org.gnome.policykit.examples.tweak";
173 } else if (strcmp (argv[1], "--twiddle") == 0 && argc == 2) {
174 pk_action = "org.gnome.policykit.examples.twiddle";
175 } else if (strcmp (argv[1], "--punch") == 0 && argc == 2) {
176 pk_action = "org.gnome.policykit.examples.punch";
177 } else if (strcmp (argv[1], "--kick") == 0 && argc == 3) {
178 PolKitPolicyCache *policy_cache;
179 policy_cache = polkit_context_get_policy_cache (pol_ctx);
180 pk_action = NULL;
181 kick_type = argv[2];
182 polkit_policy_cache_foreach (policy_cache, _cb, &pk_action);
183 if (pk_action == NULL) {
184 printf ("cannot find action for kick type '%s'\n", kick_type);
185 exit_not_privileged (POLKIT_RESULT_NO, pk_action);
186 }
187 } else {
188 usage ();
189 }
190
191 /* check if parent is privileged */
192 parent_pid = getppid ();
193 if (!check_privileged (pol_ctx, parent_pid, pk_action, &pk_result)) {
194 /* PolicyKit don't know - just return 'NO' for now */
195 printf ("we're not privileged: PK inquiry failed\n");
196 exit_not_privileged (POLKIT_RESULT_NO, pk_action);
197 }
198
199 if (pk_result != POLKIT_RESULT_YES) {
200 /* Caller is not privileged */
201 printf ("we're not privileged: pk_result='%s'\n", polkit_result_to_string_representation (pk_result));
202 exit_not_privileged (pk_result, pk_action);
203 }
204
205 /* caller is indeed privileged; carry out the deed.. */
206 printf ("we're privileged - yeay!\n");
207
208 /* TODO: now either: "frobnicate", "tweak" or "twiddle", "punch", "kick", "poke" */
209
210 return 0;
211 }
0 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
1 *
2 * Copyright (C) 2007 David Zeuthen <david@fubar.dk>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 */
19
20 #ifdef HAVE_CONFIG_H
21 # include "config.h"
22 #endif
23
24 #include <stdlib.h>
25 #include <stdio.h>
26 #include <unistd.h>
27 #include <signal.h>
28 #include <errno.h>
29 #include <string.h>
30 #include <sys/types.h>
31 #include <sys/stat.h>
32 #include <sys/wait.h>
33 #include <fcntl.h>
34
35 #include <glib.h>
36 #include <glib/gi18n-lib.h>
37 #include <glib-object.h>
38
39 #include <gtk/gtk.h>
40 #include <gdk/gdkx.h>
41
42 #define DBUS_API_SUBJECT_TO_CHANGE
43 #include <dbus/dbus-glib.h>
44 #include <dbus/dbus-glib-lowlevel.h>
45
46 #include <polkit/polkit.h>
47 #include <polkit-dbus/polkit-dbus.h>
48
49 static DBusConnection *system_bus;
50 static PolKitContext *pk_context;
51
52
53 static DBusGProxy *polkit_gnome_proxy;
54
55 static DBusGConnection *
56 get_session_bus (void)
57 {
58 GError *error;
59 DBusGConnection *bus;
60 DBusConnection *connection;
61
62 error = NULL;
63 bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
64 if (bus == NULL) {
65 g_warning ("Couldn't connect to session bus: %s", error->message);
66 g_error_free (error);
67 goto out;
68 }
69
70 connection = dbus_g_connection_get_connection (bus);
71 out:
72 return bus;
73 }
74
75 static GtkWidget *toplevel_window;
76 static GtkWidget *button_frobnicate;
77 static GtkWidget *button_tweak;
78 static GtkWidget *button_twiddle;
79 static GtkWidget *button_punch;
80 static GtkWidget *kick_combo_box;
81 static GtkWidget *button_kick;
82
83 static void
84 simple_button_cb (GtkButton *button, gpointer user_data)
85 {
86 int status;
87 int return_code;
88 char *helper_stderr = NULL;
89 GError *error = NULL;
90 gboolean gained_privilege;
91 char *helper_cmdline;
92 char *cmdline;
93
94 /* gross hack - but it works */
95 if (button == GTK_BUTTON (button_frobnicate)) {
96 helper_cmdline = g_strdup ("polkit-gnome-example-helper --frobnicate");
97 } else if (button == GTK_BUTTON (button_tweak)) {
98 helper_cmdline = g_strdup ("polkit-gnome-example-helper --tweak");
99 } else if (button == GTK_BUTTON (button_twiddle)) {
100 helper_cmdline = g_strdup ("polkit-gnome-example-helper --twiddle");
101 } else if (button == GTK_BUTTON (button_punch)) {
102 helper_cmdline = g_strdup ("polkit-gnome-example-helper --punch");
103 } else if (button == GTK_BUTTON (button_kick)) {
104 helper_cmdline = g_strdup_printf ("polkit-gnome-example-helper --kick %s",
105 gtk_combo_box_get_active_text (GTK_COMBO_BOX (kick_combo_box)));
106 } else {
107 g_warning ("Unknown button pressed");
108 goto out;
109 }
110
111 cmdline = g_strdup_printf (LIBEXECDIR /* "." */ "/%s", helper_cmdline);
112 g_free (helper_cmdline);
113 g_debug ("launching '%s'", cmdline);
114 g_spawn_command_line_sync (cmdline,
115 NULL,
116 &helper_stderr,
117 &status,
118 NULL);
119 g_free (cmdline);
120
121 return_code = WEXITSTATUS (status);
122 g_debug ("helper return code was %d", return_code);
123
124 if (return_code == 1) {
125 char **tokens;
126 PolKitResult polkit_result;
127 char *polkit_result_textual;
128 char *polkit_action;
129 guint32 xid;
130
131 tokens = g_strsplit (helper_stderr, " ", 2);
132 if (g_strv_length (tokens) != 2) {
133 g_warning ("helper return string '%s' malformed", helper_stderr);
134 g_strfreev (tokens);
135 goto out;
136 }
137
138 polkit_result_textual = tokens[0];
139 polkit_action = tokens[1];
140
141 if (!polkit_result_from_string_representation (polkit_result_textual, &polkit_result)) {
142 g_warning ("polkit_result_textual '%s' malformed", polkit_result_textual);
143 g_strfreev (tokens);
144 goto out;
145 }
146
147 g_debug ("helper refused; returned polkit_result='%s' (%d) and polkit_action='%s'",
148 polkit_result_textual, polkit_result, polkit_action);
149
150 xid = gdk_x11_drawable_get_xid (GDK_DRAWABLE (toplevel_window->window));
151
152 /* now use PolicyKit-gnome to bring up an auth dialog */
153 if (!dbus_g_proxy_call_with_timeout (polkit_gnome_proxy,
154 "ShowDialog",
155 INT_MAX,
156 &error,
157 /* parameters: */
158 G_TYPE_STRING, polkit_action, /* action_id */
159 G_TYPE_UINT, xid, /* X11 window ID */
160 G_TYPE_INVALID,
161 /* return values: */
162 G_TYPE_BOOLEAN, &gained_privilege,
163 G_TYPE_INVALID)) {
164 g_warning ("Caught exception '%s'", error->message);
165 g_error_free (error);
166 g_strfreev (tokens);
167 goto out;
168 }
169
170 g_debug ("gained privilege = %d", gained_privilege);
171
172 g_strfreev (tokens);
173 }
174
175 out:
176 g_free (helper_stderr);
177 }
178
179
180 static void
181 update_one_button (GtkWidget *button, const char *pk_action_id)
182 {
183 PolKitCaller *pk_caller;
184 PolKitAction *pk_action;
185 PolKitResult pk_result;
186 DBusError dbus_error;
187 char *s;
188
189 pk_caller = NULL;
190 pk_action = NULL;
191
192 pk_action = polkit_action_new ();
193 polkit_action_set_action_id (pk_action, pk_action_id);
194
195 dbus_error_init (&dbus_error);
196 pk_caller = polkit_caller_new_from_pid (system_bus, getpid (), &dbus_error);
197 if (pk_caller == NULL) {
198 fprintf (stderr, "cannot get caller from dbus name\n");
199 goto out;
200 }
201
202 pk_result = polkit_context_can_caller_do_action (pk_context, pk_action, pk_caller);
203
204 g_debug ("for '%s' we got '%s'", pk_action_id, polkit_result_to_string_representation (pk_result));
205
206 switch (pk_result) {
207 default:
208 case POLKIT_RESULT_UNKNOWN:
209 case POLKIT_RESULT_NO:
210 gtk_button_set_image (GTK_BUTTON (button),
211 gtk_image_new_from_stock (GTK_STOCK_STOP, GTK_ICON_SIZE_SMALL_TOOLBAR));
212 gtk_widget_set_tooltip_markup (button, _("This action is not permitted"));
213 break;
214
215 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH:
216 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_SESSION:
217 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_ALWAYS:
218 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH:
219 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_SESSION:
220 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_ALWAYS:
221 gtk_button_set_image (GTK_BUTTON (button),
222 gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_SMALL_TOOLBAR));
223
224 s = g_strdup_printf (_("This action requires authentication (%s)"),
225 polkit_result_to_string_representation (pk_result));
226 gtk_widget_set_tooltip_markup (button, s);
227 g_free (s);
228 break;
229
230 case POLKIT_RESULT_YES:
231 gtk_button_set_image (GTK_BUTTON (button),
232 gtk_image_new_from_stock (GTK_STOCK_OK, GTK_ICON_SIZE_SMALL_TOOLBAR));
233 gtk_widget_set_tooltip_markup (button, _("This action is permitted"));
234 break;
235 }
236
237 out:
238 if (pk_action != NULL)
239 polkit_action_unref (pk_action);
240 if (pk_caller != NULL)
241 polkit_caller_unref (pk_caller);
242 }
243
244 static void
245 update_buttons (void)
246 {
247 update_one_button (button_frobnicate, "org.gnome.policykit.examples.frobnicate");
248 update_one_button (button_tweak, "org.gnome.policykit.examples.tweak");
249 update_one_button (button_twiddle, "org.gnome.policykit.examples.twiddle");
250 update_one_button (button_punch, "org.gnome.policykit.examples.punch");
251 }
252
253 static gboolean
254 io_watch_have_data (GIOChannel *channel, GIOCondition condition, gpointer user_data)
255 {
256 int fd;
257 PolKitContext *pk_context = user_data;
258 fd = g_io_channel_unix_get_fd (channel);
259 polkit_context_io_func (pk_context, fd);
260 return TRUE;
261 }
262
263 static int
264 io_add_watch (PolKitContext *pk_context, int fd)
265 {
266 guint id = 0;
267 GIOChannel *channel;
268 channel = g_io_channel_unix_new (fd);
269 if (channel == NULL)
270 goto out;
271 id = g_io_add_watch (channel, G_IO_IN, io_watch_have_data, pk_context);
272 if (id == 0) {
273 g_io_channel_unref (channel);
274 goto out;
275 }
276 g_io_channel_unref (channel);
277 out:
278 return id;
279 }
280
281 static void
282 io_remove_watch (PolKitContext *pk_context, int watch_id)
283 {
284 g_source_remove (watch_id);
285 }
286
287
288 static void
289 pk_config_changed (PolKitContext *pk_context, void *user_data)
290 {
291 g_debug ("PolicyKit config changed");
292 update_buttons ();
293 }
294
295 int
296 main (int argc, char **argv)
297 {
298 GMainLoop *loop;
299 DBusGConnection *session_bus;
300 int ret;
301 DBusError dbus_error;
302
303 ret = 1;
304
305 if (!g_thread_supported ()) {
306 g_thread_init (NULL);
307 }
308 dbus_g_thread_init ();
309 g_type_init ();
310 gtk_init (&argc, &argv);
311
312 loop = g_main_loop_new (NULL, FALSE);
313
314
315 session_bus = get_session_bus ();
316 if (session_bus == NULL) {
317 goto out;
318 }
319
320 dbus_error_init (&dbus_error);
321 system_bus = dbus_bus_get (DBUS_BUS_SYSTEM, &dbus_error);
322 if (system_bus == NULL) {
323 goto out;
324 }
325
326 pk_context = polkit_context_new ();
327 polkit_context_set_io_watch_functions (pk_context, io_add_watch, io_remove_watch);
328 polkit_context_set_config_changed (pk_context, pk_config_changed, NULL);
329 if (!polkit_context_init (pk_context, NULL)) {
330 goto out;
331 }
332
333
334 polkit_gnome_proxy = dbus_g_proxy_new_for_name (session_bus,
335 "org.gnome.PolicyKit", /* bus name */
336 "/org/gnome/PolicyKit/Manager", /* object */
337 "org.gnome.PolicyKit.Manager"); /* interface */
338
339 GtkWidget *vbox;
340 GtkWidget *label;
341 GtkWidget *separator;
342
343
344
345 toplevel_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
346
347
348 vbox = gtk_vbox_new (FALSE, 10);
349 gtk_container_add (GTK_CONTAINER (toplevel_window), vbox);
350
351 /*----------------------------------------------------------------*/
352
353 label = gtk_label_new (NULL);
354 gtk_label_set_markup (GTK_LABEL (label), _("Making the helper <b>Frobnicate</b> requires the user to authenticate."));
355 gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
356 gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
357 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
358 button_frobnicate = gtk_button_new_with_label (_("Frobnicate!"));
359 g_signal_connect (button_frobnicate, "clicked", G_CALLBACK (simple_button_cb), NULL);
360 gtk_box_pack_start (GTK_BOX (vbox), button_frobnicate, FALSE, FALSE, 0);
361
362
363 /*----------------------------------------------------------------*/
364 separator = gtk_hseparator_new ();
365 gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
366 /*----------------------------------------------------------------*/
367
368 label = gtk_label_new (NULL);
369 gtk_label_set_markup (GTK_LABEL (label), _("Making the helper <b>Tweak</b> requires a system administrator to authenticate."));
370 gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
371 gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
372 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
373 button_tweak = gtk_button_new_with_label (_("Tweak!"));
374 g_signal_connect (button_tweak, "clicked", G_CALLBACK (simple_button_cb), NULL);
375 gtk_box_pack_start (GTK_BOX (vbox), button_tweak, FALSE, FALSE, 0);
376
377 /*----------------------------------------------------------------*/
378 separator = gtk_hseparator_new ();
379 gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
380 /*----------------------------------------------------------------*/
381
382 label = gtk_label_new (NULL);
383 gtk_label_set_markup (GTK_LABEL (label), _("Making the helper <b>Twiddle</b> requires a system administrator to authenticate. Once authenticated, this privilege can be retained indefinitely."));
384 gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
385 gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
386 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
387 button_twiddle = gtk_button_new_with_label (_("Twiddle!"));
388 g_signal_connect (button_twiddle, "clicked", G_CALLBACK (simple_button_cb), NULL);
389 gtk_box_pack_start (GTK_BOX (vbox), button_twiddle, FALSE, FALSE, 0);
390
391 /*----------------------------------------------------------------*/
392 separator = gtk_hseparator_new ();
393 gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
394 /*----------------------------------------------------------------*/
395
396 label = gtk_label_new (NULL);
397 gtk_label_set_markup (GTK_LABEL (label), _("Making the helper <b>Punch</b> requires the user to authenticate. Once authenticated, this privilege can be retained for the remainder of the desktop session."));
398 gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
399 gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
400 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
401 button_punch = gtk_button_new_with_label (_("Punch!"));
402 g_signal_connect (button_punch, "clicked", G_CALLBACK (simple_button_cb), NULL);
403 gtk_box_pack_start (GTK_BOX (vbox), button_punch, FALSE, FALSE, 0);
404
405 /*----------------------------------------------------------------*/
406 separator = gtk_hseparator_new ();
407 gtk_box_pack_start (GTK_BOX (vbox), separator, FALSE, FALSE, 0);
408 /*----------------------------------------------------------------*/
409
410 label = gtk_label_new (NULL);
411 gtk_label_set_markup (GTK_LABEL (label), _("Making the helper <b>Kick</b> can be done in different ways (this demonstrates <i>annotations</i>). Select what to kick below and then press the Kick button.."));
412 gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.0);
413 gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
414 gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
415 button_kick = gtk_button_new_with_label (_("Kick!"));
416 g_signal_connect (button_kick, "clicked", G_CALLBACK (simple_button_cb), NULL);
417 kick_combo_box = gtk_combo_box_new_text();
418 gtk_combo_box_append_text (GTK_COMBO_BOX (kick_combo_box), "foo");
419 gtk_combo_box_append_text (GTK_COMBO_BOX (kick_combo_box), "bar");
420 gtk_combo_box_append_text (GTK_COMBO_BOX (kick_combo_box), "baz");
421 gtk_combo_box_set_active (GTK_COMBO_BOX (kick_combo_box), 0);
422 gtk_box_pack_start (GTK_BOX (vbox), kick_combo_box, FALSE, FALSE, 0);
423 gtk_box_pack_start (GTK_BOX (vbox), button_kick, FALSE, FALSE, 0);
424
425 /*----------------------------------------------------------------*/
426
427 update_buttons ();
428
429 gtk_window_set_title (GTK_WINDOW (toplevel_window), _("PolicyKit-gnome demo"));
430 g_signal_connect (toplevel_window, "delete-event", exit, NULL);
431 gtk_widget_show_all (toplevel_window);
432
433 g_main_loop_run (loop);
434
435 g_main_loop_unref (loop);
436 ret = 0;
437 out:
438 return ret;
439 }
0 <?xml version="1.0" encoding="UTF-8"?>
1 <!DOCTYPE policyconfig PUBLIC
2 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
3 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
4 <policyconfig>
5
6 <action id="org.gnome.policykit.examples.frobnicate">
7 <description>Frobnicate</description>
8 <description xml:lang="da">Frobniker</description>
9 <message>System policy prevents the PolicyKit-gnome example helper from Frobnicating</message>
10 <message xml:lang="da">System indstillinger forhindrer PolicyKit-gnome eksempel hjælper i at Frobnikere!</message>
11 <defaults>
12 <allow_inactive>no</allow_inactive>
13 <allow_active>auth_self</allow_active>
14 </defaults>
15 </action>
16
17 <action id="org.gnome.policykit.examples.tweak">
18 <description>Tweak</description>
19 <description xml:lang="da">Tvæk</description>
20 <message>System policy prevents the PolicyKit-gnome example helper from Tweaking</message>
21 <message xml:lang="da">System indstillinger forhindrer PolicyKit-gnome eksempel hjælper i at Tvække!</message>
22 <defaults>
23 <allow_inactive>no</allow_inactive>
24 <allow_active>auth_admin</allow_active>
25 </defaults>
26 </action>
27
28 <action id="org.gnome.policykit.examples.twiddle">
29 <description>Twiddle</description>
30 <description xml:lang="da">Tvidl</description>
31 <message>System policy prevents the PolicyKit-gnome example helper from Twiddling</message>
32 <message xml:lang="da">System indstillinger forhindrer PolicyKit-gnome eksempel hjælper i at Tvidle!</message>
33 <defaults>
34 <allow_inactive>no</allow_inactive>
35 <allow_active>auth_admin_keep_always</allow_active>
36 </defaults>
37 </action>
38
39 <action id="org.gnome.policykit.examples.punch">
40 <description>Punch</description>
41 <description xml:lang="da">Smadre</description>
42 <message>System policy prevents the PolicyKit-gnome example helper from Punching</message>
43 <message xml:lang="da">System indstillinger forhindrer PolicyKit-gnome eksempel hjælper i at Smadre!</message>
44 <defaults>
45 <allow_inactive>no</allow_inactive>
46 <allow_active>auth_self_keep_session</allow_active>
47 </defaults>
48 </action>
49
50 <action id="org.gnome.policykit.examples.kick-foo">
51 <description>Punch</description>
52 <description xml:lang="da">Smadre</description>
53 <message>System policy prevents the PolicyKit-gnome example helper from Kicking foo</message>
54 <message xml:lang="da">System indstillinger forhindrer PolicyKit-gnome eksempel hjælper fra at Sparke foo!</message>
55 <defaults>
56 <allow_inactive>no</allow_inactive>
57 <allow_active>auth_self</allow_active>
58 </defaults>
59 <annotate key="org.gnome.policykit.examples.kick-path">foo</annotate>
60 </action>
61
62 <action id="org.gnome.policykit.examples.kick-bar">
63 <description>Punch</description>
64 <description xml:lang="da">Smadre</description>
65 <message>System policy prevents the PolicyKit-gnome example helper from Kicking bar</message>
66 <message xml:lang="da">System indstillinger forhindrer PolicyKit-gnome eksempel hjælper fra at Sparke bar!</message>
67 <defaults>
68 <allow_inactive>no</allow_inactive>
69 <allow_active>auth_self</allow_active>
70 </defaults>
71 <annotate key="org.gnome.policykit.examples.kick-path">bar</annotate>
72 </action>
73
74 <action id="org.gnome.policykit.examples.kick-baz">
75 <description>Punch</description>
76 <description xml:lang="da">Smadre</description>
77 <message>System policy prevents the PolicyKit-gnome example helper from Kicking baz</message>
78 <message xml:lang="da">System indstillinger forhindrer PolicyKit-gnome eksempel hjælper fra at Sparke baz!</message>
79 <defaults>
80 <allow_inactive>no</allow_inactive>
81 <allow_active>auth_self</allow_active>
82 </defaults>
83 <annotate key="org.gnome.policykit.examples.kick-path">baz</annotate>
84 </action>
85
86 </policyconfig>
0 <?xml version="1.0" encoding="utf-8"?>
1
2 <!DOCTYPE policyconfig PUBLIC
3 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
4 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
5
6 <!--
7 Policy definitions for PolicyKit-Gnome example
8
9 Copyright (c) 2007 David Zeuthen <david@fubar.dk>
10
11 NOTE: If you make changes to this file, make sure to validate the file
12 using the polkit-policy-file-validate(1) tool. Changes made to this
13 file are instantly applied.
14 -->
15
16 <policyconfig>
17
18 <action id="org.gnome.policykit.examples.frobnicate">
19 <_description>Frobnicate</_description>
20 <_message>System policy prevents the PolicyKit-gnome example helper from Frobnicating</_message>
21 <defaults>
22 <allow_inactive>no</allow_inactive>
23 <allow_active>auth_self</allow_active>
24 </defaults>
25 </action>
26
27 <action id="org.gnome.policykit.examples.tweak">
28 <_description>Tweak</_description>
29 <_message>System policy prevents the PolicyKit-gnome example helper from Tweaking</_message>
30 <defaults>
31 <allow_inactive>no</allow_inactive>
32 <allow_active>auth_admin</allow_active>
33 </defaults>
34 </action>
35
36 <action id="org.gnome.policykit.examples.twiddle">
37 <_description>Twiddle</_description>
38 <_message>System policy prevents the PolicyKit-gnome example helper from Twiddling</_message>
39 <defaults>
40 <allow_inactive>no</allow_inactive>
41 <allow_active>auth_admin_keep_always</allow_active>
42 </defaults>
43 </action>
44
45 <action id="org.gnome.policykit.examples.punch">
46 <_description>Punch</_description>
47 <_message>System policy prevents the PolicyKit-gnome example helper from Punching</_message>
48 <defaults>
49 <allow_inactive>no</allow_inactive>
50 <allow_active>auth_self_keep_session</allow_active>
51 </defaults>
52 </action>
53
54 <action id="org.gnome.policykit.examples.kick-foo">
55 <_description>Punch</_description>
56 <_message>System policy prevents the PolicyKit-gnome example helper from Kicking foo</_message>
57 <defaults>
58 <allow_inactive>no</allow_inactive>
59 <allow_active>auth_self</allow_active>
60 </defaults>
61 <annotate key="org.gnome.policykit.examples.kick-path">foo</annotate>
62 </action>
63
64 <action id="org.gnome.policykit.examples.kick-bar">
65 <_description>Punch</_description>
66 <_message>System policy prevents the PolicyKit-gnome example helper from Kicking bar</_message>
67 <defaults>
68 <allow_inactive>no</allow_inactive>
69 <allow_active>auth_self</allow_active>
70 </defaults>
71 <annotate key="org.gnome.policykit.examples.kick-path">bar</annotate>
72 </action>
73
74 <action id="org.gnome.policykit.examples.kick-baz">
75 <_description>Punch</_description>
76 <_message>System policy prevents the PolicyKit-gnome example helper from Kicking baz</_message>
77 <defaults>
78 <allow_inactive>no</allow_inactive>
79 <allow_active>auth_self</allow_active>
80 </defaults>
81 <annotate key="org.gnome.policykit.examples.kick-path">baz</annotate>
82 </action>
83
84 </policyconfig>
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2006-10-14.15
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # `make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 nl='
44 '
45 IFS=" "" $nl"
46
47 # set DOITPROG to echo to test this script
48
49 # Don't use :- since 4.3BSD and earlier shells don't like it.
50 doit="${DOITPROG-}"
51 if test -z "$doit"; then
52 doit_exec=exec
53 else
54 doit_exec=$doit
55 fi
56
57 # Put in absolute file names if you don't have them in your path;
58 # or use environment vars.
59
60 mvprog="${MVPROG-mv}"
61 cpprog="${CPPROG-cp}"
62 chmodprog="${CHMODPROG-chmod}"
63 chownprog="${CHOWNPROG-chown}"
64 chgrpprog="${CHGRPPROG-chgrp}"
65 stripprog="${STRIPPROG-strip}"
66 rmprog="${RMPROG-rm}"
67 mkdirprog="${MKDIRPROG-mkdir}"
68
69 posix_glob=
70 posix_mkdir=
71
72 # Desired mode of installed file.
73 mode=0755
74
75 chmodcmd=$chmodprog
76 chowncmd=
77 chgrpcmd=
78 stripcmd=
79 rmcmd="$rmprog -f"
80 mvcmd="$mvprog"
81 src=
82 dst=
83 dir_arg=
84 dstarg=
85 no_target_directory=
86
87 usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
88 or: $0 [OPTION]... SRCFILES... DIRECTORY
89 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
90 or: $0 [OPTION]... -d DIRECTORIES...
91
92 In the 1st form, copy SRCFILE to DSTFILE.
93 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
94 In the 4th, create DIRECTORIES.
95
96 Options:
97 -c (ignored)
98 -d create directories instead of installing files.
99 -g GROUP $chgrpprog installed files to GROUP.
100 -m MODE $chmodprog installed files to MODE.
101 -o USER $chownprog installed files to USER.
102 -s $stripprog installed files.
103 -t DIRECTORY install into DIRECTORY.
104 -T report an error if DSTFILE is a directory.
105 --help display this help and exit.
106 --version display version info and exit.
107
108 Environment variables override the default commands:
109 CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
110 "
111
112 while test $# -ne 0; do
113 case $1 in
114 -c) shift
115 continue;;
116
117 -d) dir_arg=true
118 shift
119 continue;;
120
121 -g) chgrpcmd="$chgrpprog $2"
122 shift
123 shift
124 continue;;
125
126 --help) echo "$usage"; exit $?;;
127
128 -m) mode=$2
129 shift
130 shift
131 case $mode in
132 *' '* | *' '* | *'
133 '* | *'*'* | *'?'* | *'['*)
134 echo "$0: invalid mode: $mode" >&2
135 exit 1;;
136 esac
137 continue;;
138
139 -o) chowncmd="$chownprog $2"
140 shift
141 shift
142 continue;;
143
144 -s) stripcmd=$stripprog
145 shift
146 continue;;
147
148 -t) dstarg=$2
149 shift
150 shift
151 continue;;
152
153 -T) no_target_directory=true
154 shift
155 continue;;
156
157 --version) echo "$0 $scriptversion"; exit $?;;
158
159 --) shift
160 break;;
161
162 -*) echo "$0: invalid option: $1" >&2
163 exit 1;;
164
165 *) break;;
166 esac
167 done
168
169 if test $# -ne 0 && test -z "$dir_arg$dstarg"; then
170 # When -d is used, all remaining arguments are directories to create.
171 # When -t is used, the destination is already specified.
172 # Otherwise, the last argument is the destination. Remove it from $@.
173 for arg
174 do
175 if test -n "$dstarg"; then
176 # $@ is not empty: it contains at least $arg.
177 set fnord "$@" "$dstarg"
178 shift # fnord
179 fi
180 shift # arg
181 dstarg=$arg
182 done
183 fi
184
185 if test $# -eq 0; then
186 if test -z "$dir_arg"; then
187 echo "$0: no input file specified." >&2
188 exit 1
189 fi
190 # It's OK to call `install-sh -d' without argument.
191 # This can happen when creating conditional directories.
192 exit 0
193 fi
194
195 if test -z "$dir_arg"; then
196 trap '(exit $?); exit' 1 2 13 15
197
198 # Set umask so as not to create temps with too-generous modes.
199 # However, 'strip' requires both read and write access to temps.
200 case $mode in
201 # Optimize common cases.
202 *644) cp_umask=133;;
203 *755) cp_umask=22;;
204
205 *[0-7])
206 if test -z "$stripcmd"; then
207 u_plus_rw=
208 else
209 u_plus_rw='% 200'
210 fi
211 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
212 *)
213 if test -z "$stripcmd"; then
214 u_plus_rw=
215 else
216 u_plus_rw=,u+rw
217 fi
218 cp_umask=$mode$u_plus_rw;;
219 esac
220 fi
221
222 for src
223 do
224 # Protect names starting with `-'.
225 case $src in
226 -*) src=./$src ;;
227 esac
228
229 if test -n "$dir_arg"; then
230 dst=$src
231 dstdir=$dst
232 test -d "$dstdir"
233 dstdir_status=$?
234 else
235
236 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
237 # might cause directories to be created, which would be especially bad
238 # if $src (and thus $dsttmp) contains '*'.
239 if test ! -f "$src" && test ! -d "$src"; then
240 echo "$0: $src does not exist." >&2
241 exit 1
242 fi
243
244 if test -z "$dstarg"; then
245 echo "$0: no destination specified." >&2
246 exit 1
247 fi
248
249 dst=$dstarg
250 # Protect names starting with `-'.
251 case $dst in
252 -*) dst=./$dst ;;
253 esac
254
255 # If destination is a directory, append the input filename; won't work
256 # if double slashes aren't ignored.
257 if test -d "$dst"; then
258 if test -n "$no_target_directory"; then
259 echo "$0: $dstarg: Is a directory" >&2
260 exit 1
261 fi
262 dstdir=$dst
263 dst=$dstdir/`basename "$src"`
264 dstdir_status=0
265 else
266 # Prefer dirname, but fall back on a substitute if dirname fails.
267 dstdir=`
268 (dirname "$dst") 2>/dev/null ||
269 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
270 X"$dst" : 'X\(//\)[^/]' \| \
271 X"$dst" : 'X\(//\)$' \| \
272 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
273 echo X"$dst" |
274 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
275 s//\1/
276 q
277 }
278 /^X\(\/\/\)[^/].*/{
279 s//\1/
280 q
281 }
282 /^X\(\/\/\)$/{
283 s//\1/
284 q
285 }
286 /^X\(\/\).*/{
287 s//\1/
288 q
289 }
290 s/.*/./; q'
291 `
292
293 test -d "$dstdir"
294 dstdir_status=$?
295 fi
296 fi
297
298 obsolete_mkdir_used=false
299
300 if test $dstdir_status != 0; then
301 case $posix_mkdir in
302 '')
303 # Create intermediate dirs using mode 755 as modified by the umask.
304 # This is like FreeBSD 'install' as of 1997-10-28.
305 umask=`umask`
306 case $stripcmd.$umask in
307 # Optimize common cases.
308 *[2367][2367]) mkdir_umask=$umask;;
309 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
310
311 *[0-7])
312 mkdir_umask=`expr $umask + 22 \
313 - $umask % 100 % 40 + $umask % 20 \
314 - $umask % 10 % 4 + $umask % 2
315 `;;
316 *) mkdir_umask=$umask,go-w;;
317 esac
318
319 # With -d, create the new directory with the user-specified mode.
320 # Otherwise, rely on $mkdir_umask.
321 if test -n "$dir_arg"; then
322 mkdir_mode=-m$mode
323 else
324 mkdir_mode=
325 fi
326
327 posix_mkdir=false
328 case $umask in
329 *[123567][0-7][0-7])
330 # POSIX mkdir -p sets u+wx bits regardless of umask, which
331 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
332 ;;
333 *)
334 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
335 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
336
337 if (umask $mkdir_umask &&
338 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
339 then
340 if test -z "$dir_arg" || {
341 # Check for POSIX incompatibilities with -m.
342 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
343 # other-writeable bit of parent directory when it shouldn't.
344 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
345 ls_ld_tmpdir=`ls -ld "$tmpdir"`
346 case $ls_ld_tmpdir in
347 d????-?r-*) different_mode=700;;
348 d????-?--*) different_mode=755;;
349 *) false;;
350 esac &&
351 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
352 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
353 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
354 }
355 }
356 then posix_mkdir=:
357 fi
358 rmdir "$tmpdir/d" "$tmpdir"
359 else
360 # Remove any dirs left behind by ancient mkdir implementations.
361 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
362 fi
363 trap '' 0;;
364 esac;;
365 esac
366
367 if
368 $posix_mkdir && (
369 umask $mkdir_umask &&
370 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
371 )
372 then :
373 else
374
375 # The umask is ridiculous, or mkdir does not conform to POSIX,
376 # or it failed possibly due to a race condition. Create the
377 # directory the slow way, step by step, checking for races as we go.
378
379 case $dstdir in
380 /*) prefix=/ ;;
381 -*) prefix=./ ;;
382 *) prefix= ;;
383 esac
384
385 case $posix_glob in
386 '')
387 if (set -f) 2>/dev/null; then
388 posix_glob=true
389 else
390 posix_glob=false
391 fi ;;
392 esac
393
394 oIFS=$IFS
395 IFS=/
396 $posix_glob && set -f
397 set fnord $dstdir
398 shift
399 $posix_glob && set +f
400 IFS=$oIFS
401
402 prefixes=
403
404 for d
405 do
406 test -z "$d" && continue
407
408 prefix=$prefix$d
409 if test -d "$prefix"; then
410 prefixes=
411 else
412 if $posix_mkdir; then
413 (umask=$mkdir_umask &&
414 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
415 # Don't fail if two instances are running concurrently.
416 test -d "$prefix" || exit 1
417 else
418 case $prefix in
419 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
420 *) qprefix=$prefix;;
421 esac
422 prefixes="$prefixes '$qprefix'"
423 fi
424 fi
425 prefix=$prefix/
426 done
427
428 if test -n "$prefixes"; then
429 # Don't fail if two instances are running concurrently.
430 (umask $mkdir_umask &&
431 eval "\$doit_exec \$mkdirprog $prefixes") ||
432 test -d "$dstdir" || exit 1
433 obsolete_mkdir_used=true
434 fi
435 fi
436 fi
437
438 if test -n "$dir_arg"; then
439 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
440 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
441 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
442 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
443 else
444
445 # Make a couple of temp file names in the proper directory.
446 dsttmp=$dstdir/_inst.$$_
447 rmtmp=$dstdir/_rm.$$_
448
449 # Trap to clean up those temp files at exit.
450 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
451
452 # Copy the file name to the temp name.
453 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
454
455 # and set any options; do chmod last to preserve setuid bits.
456 #
457 # If any of these fail, we abort the whole thing. If we want to
458 # ignore errors from any of these, just make sure not to ignore
459 # errors from the above "$doit $cpprog $src $dsttmp" command.
460 #
461 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
462 && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
463 && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
464 && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
465
466 # Now rename the file to the real destination.
467 { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \
468 || {
469 # The rename failed, perhaps because mv can't rename something else
470 # to itself, or perhaps because mv is so ancient that it does not
471 # support -f.
472
473 # Now remove or move aside any old file at destination location.
474 # We try this two ways since rm can't unlink itself on some
475 # systems and the destination file might be busy for other
476 # reasons. In this case, the final cleanup might fail but the new
477 # file should still install successfully.
478 {
479 if test -f "$dst"; then
480 $doit $rmcmd -f "$dst" 2>/dev/null \
481 || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \
482 && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\
483 || {
484 echo "$0: cannot unlink or rename $dst" >&2
485 (exit 1); exit 1
486 }
487 else
488 :
489 fi
490 } &&
491
492 # Now rename the file to the real destination.
493 $doit $mvcmd "$dsttmp" "$dst"
494 }
495 } || exit 1
496
497 trap '' 0
498 fi
499 done
500
501 # Local variables:
502 # eval: (add-hook 'write-file-hooks 'time-stamp)
503 # time-stamp-start: "scriptversion="
504 # time-stamp-format: "%:y-%02m-%02d.%02H"
505 # time-stamp-end: "$"
506 # End:
0 #!@INTLTOOL_PERL@ -w
1 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2
3 #
4 # The Intltool Message Extractor
5 #
6 # Copyright (C) 2000-2001, 2003 Free Software Foundation.
7 #
8 # Intltool is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of the
11 # License, or (at your option) any later version.
12 #
13 # Intltool is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
26 #
27 # Authors: Kenneth Christiansen <kenneth@gnu.org>
28 # Darin Adler <darin@bentspoon.com>
29 #
30
31 ## Release information
32 my $PROGRAM = "intltool-extract";
33 my $PACKAGE = "intltool";
34 my $VERSION = "0.36.1";
35
36 ## Loaded modules
37 use strict;
38 use File::Basename;
39 use Getopt::Long;
40
41 ## Scalars used by the option stuff
42 my $TYPE_ARG = "0";
43 my $LOCAL_ARG = "0";
44 my $HELP_ARG = "0";
45 my $VERSION_ARG = "0";
46 my $UPDATE_ARG = "0";
47 my $QUIET_ARG = "0";
48 my $SRCDIR_ARG = ".";
49
50 my $FILE;
51 my $OUTFILE;
52
53 my $gettext_type = "";
54 my $input;
55 my %messages = ();
56 my %loc = ();
57 my %count = ();
58 my %comments = ();
59 my $strcount = 0;
60
61 my $XMLCOMMENT = "";
62
63 ## Use this instead of \w for XML files to handle more possible characters.
64 my $w = "[-A-Za-z0-9._:]";
65
66 ## Always print first
67 $| = 1;
68
69 ## Handle options
70 GetOptions (
71 "type=s" => \$TYPE_ARG,
72 "local|l" => \$LOCAL_ARG,
73 "help|h" => \$HELP_ARG,
74 "version|v" => \$VERSION_ARG,
75 "update" => \$UPDATE_ARG,
76 "quiet|q" => \$QUIET_ARG,
77 "srcdir=s" => \$SRCDIR_ARG,
78 ) or &error;
79
80 &split_on_argument;
81
82
83 ## Check for options.
84 ## This section will check for the different options.
85
86 sub split_on_argument {
87
88 if ($VERSION_ARG) {
89 &version;
90
91 } elsif ($HELP_ARG) {
92 &help;
93
94 } elsif ($LOCAL_ARG) {
95 &place_local;
96 &extract;
97
98 } elsif ($UPDATE_ARG) {
99 &place_normal;
100 &extract;
101
102 } elsif (@ARGV > 0) {
103 &place_normal;
104 &message;
105 &extract;
106
107 } else {
108 &help;
109
110 }
111 }
112
113 sub place_normal {
114 $FILE = $ARGV[0];
115 $OUTFILE = "$FILE.h";
116
117 my $dirname = dirname ($OUTFILE);
118 if (! -d "$dirname" && $dirname ne "") {
119 system ("mkdir -p $dirname");
120 }
121 }
122
123 sub place_local {
124 $FILE = $ARGV[0];
125 $OUTFILE = fileparse($FILE, ());
126 if (!-e "tmp/") {
127 system("mkdir tmp/");
128 }
129 $OUTFILE = "./tmp/$OUTFILE.h"
130 }
131
132 sub determine_type {
133 if ($TYPE_ARG =~ /^gettext\/(.*)/) {
134 $gettext_type=$1
135 }
136 }
137
138 ## Sub for printing release information
139 sub version{
140 print <<_EOF_;
141 ${PROGRAM} (${PACKAGE}) $VERSION
142 Copyright (C) 2000, 2003 Free Software Foundation, Inc.
143 Written by Kenneth Christiansen, 2000.
144
145 This is free software; see the source for copying conditions. There is NO
146 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
147 _EOF_
148 exit;
149 }
150
151 ## Sub for printing usage information
152 sub help {
153 print <<_EOF_;
154 Usage: ${PROGRAM} [OPTION]... [FILENAME]
155 Generates a header file from an XML source file.
156
157 It grabs all strings between <_translatable_node> and its end tag in
158 XML files. Read manpage (man ${PROGRAM}) for more info.
159
160 --type=TYPE Specify the file type of FILENAME. Currently supports:
161 "gettext/glade", "gettext/ini", "gettext/keys"
162 "gettext/rfc822deb", "gettext/schemas",
163 "gettext/scheme", "gettext/xml", "gettext/quoted"
164 -l, --local Writes output into current working directory
165 (conflicts with --update)
166 --update Writes output into the same directory the source file
167 reside (conflicts with --local)
168 --srcdir Root of the source tree
169 -v, --version Output version information and exit
170 -h, --help Display this help and exit
171 -q, --quiet Quiet mode
172
173 Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
174 or send email to <xml-i18n-tools\@gnome.org>.
175 _EOF_
176 exit;
177 }
178
179 ## Sub for printing error messages
180 sub error{
181 print STDERR "Try `${PROGRAM} --help' for more information.\n";
182 exit;
183 }
184
185 sub message {
186 print "Generating C format header file for translation.\n" unless $QUIET_ARG;
187 }
188
189 sub extract {
190 &determine_type;
191
192 &convert;
193
194 open OUT, ">$OUTFILE";
195 binmode (OUT) if $^O eq 'MSWin32';
196 &msg_write;
197 close OUT;
198
199 print "Wrote $OUTFILE\n" unless $QUIET_ARG;
200 }
201
202 sub convert {
203
204 ## Reading the file
205 {
206 local (*IN);
207 local $/; #slurp mode
208 open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!";
209 $input = <IN>;
210 }
211
212 &type_ini if $gettext_type eq "ini";
213 &type_keys if $gettext_type eq "keys";
214 &type_xml if $gettext_type eq "xml";
215 &type_glade if $gettext_type eq "glade";
216 &type_scheme if $gettext_type eq "scheme";
217 &type_schemas if $gettext_type eq "schemas";
218 &type_rfc822deb if $gettext_type eq "rfc822deb";
219 &type_quoted if $gettext_type eq "quoted";
220 }
221
222 sub entity_decode_minimal
223 {
224 local ($_) = @_;
225
226 s/&apos;/'/g; # '
227 s/&quot;/"/g; # "
228 s/&amp;/&/g;
229
230 return $_;
231 }
232
233 sub entity_decode
234 {
235 local ($_) = @_;
236
237 s/&apos;/'/g; # '
238 s/&quot;/"/g; # "
239 s/&lt;/</g;
240 s/&gt;/>/g;
241 s/&amp;/&/g;
242
243 return $_;
244 }
245
246 sub escape_char
247 {
248 return '\"' if $_ eq '"';
249 return '\n' if $_ eq "\n";
250 return '\\\\' if $_ eq '\\';
251
252 return $_;
253 }
254
255 sub escape
256 {
257 my ($string) = @_;
258 return join "", map &escape_char, split //, $string;
259 }
260
261 sub type_ini {
262 ### For generic translatable desktop files ###
263 while ($input =~ /^(#(.+)\n)?^_.*=(.*)$/mg) {
264 if (defined($2)) {
265 $comments{$3} = $2;
266 }
267 $messages{$3} = [];
268 }
269 }
270
271 sub type_keys {
272 ### For generic translatable mime/keys files ###
273 while ($input =~ /^\s*_\w+=(.*)$/mg) {
274 $messages{$1} = [];
275 }
276 }
277
278 sub type_xml {
279 ### For generic translatable XML files ###
280 my $tree = readXml($input);
281 parseTree(0, $tree);
282 }
283
284 sub print_var {
285 my $var = shift;
286 my $vartype = ref $var;
287
288 if ($vartype =~ /ARRAY/) {
289 my @arr = @{$var};
290 print "[ ";
291 foreach my $el (@arr) {
292 print_var($el);
293 print ", ";
294 }
295 print "] ";
296 } elsif ($vartype =~ /HASH/) {
297 my %hash = %{$var};
298 print "{ ";
299 foreach my $key (keys %hash) {
300 print "$key => ";
301 print_var($hash{$key});
302 print ", ";
303 }
304 print "} ";
305 } else {
306 print $var;
307 }
308 }
309
310 # Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment)
311 sub getAttributeString
312 {
313 my $sub = shift;
314 my $do_translate = shift || 1;
315 my $language = shift || "";
316 my $translate = shift;
317 my $result = "";
318 foreach my $e (reverse(sort(keys %{ $sub }))) {
319 my $key = $e;
320 my $string = $sub->{$e};
321 my $quote = '"';
322
323 $string =~ s/^[\s]+//;
324 $string =~ s/[\s]+$//;
325
326 if ($string =~ /^'.*'$/)
327 {
328 $quote = "'";
329 }
330 $string =~ s/^['"]//g;
331 $string =~ s/['"]$//g;
332
333 ## differences from intltool-merge.in.in
334 if ($key =~ /^_/) {
335 $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT;
336 $messages{entity_decode($string)} = [];
337 $$translate = 2;
338 }
339 ## differences end here from intltool-merge.in.in
340 $result .= " $key=$quote$string$quote";
341 }
342 return $result;
343 }
344
345 # Verbatim copy from intltool-merge.in.in
346 sub getXMLstring
347 {
348 my $ref = shift;
349 my $spacepreserve = shift || 0;
350 my @list = @{ $ref };
351 my $result = "";
352
353 my $count = scalar(@list);
354 my $attrs = $list[0];
355 my $index = 1;
356
357 $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
358 $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
359
360 while ($index < $count) {
361 my $type = $list[$index];
362 my $content = $list[$index+1];
363 if (! $type ) {
364 # We've got CDATA
365 if ($content) {
366 # lets strip the whitespace here, and *ONLY* here
367 $content =~ s/\s+/ /gs if (!$spacepreserve);
368 $result .= $content;
369 }
370 } elsif ( "$type" ne "1" ) {
371 # We've got another element
372 $result .= "<$type";
373 $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
374 if ($content) {
375 my $subresult = getXMLstring($content, $spacepreserve);
376 if ($subresult) {
377 $result .= ">".$subresult . "</$type>";
378 } else {
379 $result .= "/>";
380 }
381 } else {
382 $result .= "/>";
383 }
384 }
385 $index += 2;
386 }
387 return $result;
388 }
389
390 # Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed
391 # Translate list of nodes if necessary
392 sub translate_subnodes
393 {
394 my $fh = shift;
395 my $content = shift;
396 my $language = shift || "";
397 my $singlelang = shift || 0;
398 my $spacepreserve = shift || 0;
399
400 my @nodes = @{ $content };
401
402 my $count = scalar(@nodes);
403 my $index = 0;
404 while ($index < $count) {
405 my $type = $nodes[$index];
406 my $rest = $nodes[$index+1];
407 traverse($fh, $type, $rest, $language, $spacepreserve);
408 $index += 2;
409 }
410 }
411
412 # Based on traverse() in intltool-merge.in.in
413 sub traverse
414 {
415 my $fh = shift; # unused, to allow us to sync code between -merge and -extract
416 my $nodename = shift;
417 my $content = shift;
418 my $language = shift || "";
419 my $spacepreserve = shift || 0;
420
421 if ($nodename && "$nodename" eq "1") {
422 $XMLCOMMENT = $content;
423 } elsif ($nodename) {
424 # element
425 my @all = @{ $content };
426 my $attrs = shift @all;
427 my $translate = 0;
428 my $outattr = getAttributeString($attrs, 1, $language, \$translate);
429
430 if ($nodename =~ /^_/) {
431 $translate = 1;
432 $nodename =~ s/^_//;
433 }
434 my $lookup = '';
435
436 $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
437 $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
438
439 if ($translate) {
440 $lookup = getXMLstring($content, $spacepreserve);
441 if (!$spacepreserve) {
442 $lookup =~ s/^\s+//s;
443 $lookup =~ s/\s+$//s;
444 }
445
446 if ($lookup && $translate != 2) {
447 $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT;
448 $messages{$lookup} = [];
449 } elsif ($translate == 2) {
450 translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
451 }
452 } else {
453 $XMLCOMMENT = "";
454 my $count = scalar(@all);
455 if ($count > 0) {
456 my $index = 0;
457 while ($index < $count) {
458 my $type = $all[$index];
459 my $rest = $all[$index+1];
460 traverse($fh, $type, $rest, $language, $spacepreserve);
461 $index += 2;
462 }
463 }
464 }
465 $XMLCOMMENT = "";
466 }
467 }
468
469
470 # Verbatim copy from intltool-merge.in.in, $fh for compatibility
471 sub parseTree
472 {
473 my $fh = shift;
474 my $ref = shift;
475 my $language = shift || "";
476
477 my $name = shift @{ $ref };
478 my $cont = shift @{ $ref };
479
480 while (!$name || "$name" eq "1") {
481 $name = shift @{ $ref };
482 $cont = shift @{ $ref };
483 }
484
485 my $spacepreserve = 0;
486 my $attrs = @{$cont}[0];
487 $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
488
489 traverse($fh, $name, $cont, $language, $spacepreserve);
490 }
491
492 # Verbatim copy from intltool-merge.in.in
493 sub intltool_tree_comment
494 {
495 my $expat = shift;
496 my $data = $expat->original_string();
497 my $clist = $expat->{Curlist};
498 my $pos = $#$clist;
499
500 $data =~ s/^<!--//s;
501 $data =~ s/-->$//s;
502 push @$clist, 1 => $data;
503 }
504
505 # Verbatim copy from intltool-merge.in.in
506 sub intltool_tree_cdatastart
507 {
508 my $expat = shift;
509 my $clist = $expat->{Curlist};
510 my $pos = $#$clist;
511
512 push @$clist, 0 => $expat->original_string();
513 }
514
515 # Verbatim copy from intltool-merge.in.in
516 sub intltool_tree_cdataend
517 {
518 my $expat = shift;
519 my $clist = $expat->{Curlist};
520 my $pos = $#$clist;
521
522 $clist->[$pos] .= $expat->original_string();
523 }
524
525 # Verbatim copy from intltool-merge.in.in
526 sub intltool_tree_char
527 {
528 my $expat = shift;
529 my $text = shift;
530 my $clist = $expat->{Curlist};
531 my $pos = $#$clist;
532
533 # Use original_string so that we retain escaped entities
534 # in CDATA sections.
535 #
536 if ($pos > 0 and $clist->[$pos - 1] eq '0') {
537 $clist->[$pos] .= $expat->original_string();
538 } else {
539 push @$clist, 0 => $expat->original_string();
540 }
541 }
542
543 # Verbatim copy from intltool-merge.in.in
544 sub intltool_tree_start
545 {
546 my $expat = shift;
547 my $tag = shift;
548 my @origlist = ();
549
550 # Use original_string so that we retain escaped entities
551 # in attribute values. We must convert the string to an
552 # @origlist array to conform to the structure of the Tree
553 # Style.
554 #
555 my @original_array = split /\x/, $expat->original_string();
556 my $source = $expat->original_string();
557
558 # Remove leading tag.
559 #
560 $source =~ s|^\s*<\s*(\S+)||s;
561
562 # Grab attribute key/value pairs and push onto @origlist array.
563 #
564 while ($source)
565 {
566 if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
567 {
568 $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
569 push @origlist, $1;
570 push @origlist, '"' . $2 . '"';
571 }
572 elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
573 {
574 $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
575 push @origlist, $1;
576 push @origlist, "'" . $2 . "'";
577 }
578 else
579 {
580 last;
581 }
582 }
583
584 my $ol = [ { @origlist } ];
585
586 push @{ $expat->{Lists} }, $expat->{Curlist};
587 push @{ $expat->{Curlist} }, $tag => $ol;
588 $expat->{Curlist} = $ol;
589 }
590
591 # Copied from intltool-merge.in.in and added comment handler.
592 sub readXml
593 {
594 my $xmldoc = shift || return;
595 my $ret = eval 'require XML::Parser';
596 if(!$ret) {
597 die "You must have XML::Parser installed to run $0\n\n";
598 }
599 my $xp = new XML::Parser(Style => 'Tree');
600 $xp->setHandlers(Char => \&intltool_tree_char);
601 $xp->setHandlers(Start => \&intltool_tree_start);
602 $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
603 $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
604
605 ## differences from intltool-merge.in.in
606 $xp->setHandlers(Comment => \&intltool_tree_comment);
607 ## differences end here from intltool-merge.in.in
608
609 my $tree = $xp->parse($xmldoc);
610 #print_var($tree);
611
612 # <foo><!-- comment --><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
613 # would be:
614 # [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar,
615 # [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ]
616
617 return $tree;
618 }
619
620 sub type_schemas {
621 ### For schemas XML files ###
622
623 # FIXME: We should handle escaped < (less than)
624 while ($input =~ /
625 <locale\ name="C">\s*
626 (<default>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/default>\s*)?
627 (<short>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/short>\s*)?
628 (<long>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/long>\s*)?
629 <\/locale>
630 /sgx) {
631 my @totranslate = ($3,$6,$9);
632 my @eachcomment = ($2,$5,$8);
633 foreach (@totranslate) {
634 my $currentcomment = shift @eachcomment;
635 next if !$_;
636 s/\s+/ /g;
637 $messages{entity_decode_minimal($_)} = [];
638 $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment));
639 }
640 }
641 }
642
643 sub type_rfc822deb {
644 ### For rfc822-style Debian configuration files ###
645
646 my $lineno = 1;
647 my $type = '';
648 while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg)
649 {
650 my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5);
651 while ($pre =~ m/\n/g)
652 {
653 $lineno ++;
654 }
655 $lineno += length($newline);
656 my @str_list = rfc822deb_split(length($underscore), $text);
657 for my $str (@str_list)
658 {
659 $strcount++;
660 $messages{$str} = [];
661 $loc{$str} = $lineno;
662 $count{$str} = $strcount;
663 my $usercomment = '';
664 while($pre =~ s/(^|\n)#([^\n]*)$//s)
665 {
666 $usercomment = "\n" . $2 . $usercomment;
667 }
668 $comments{$str} = $tag . $usercomment;
669 }
670 $lineno += ($text =~ s/\n//g);
671 }
672 }
673
674 sub rfc822deb_split {
675 # Debian defines a special way to deal with rfc822-style files:
676 # when a value contain newlines, it consists of
677 # 1. a short form (first line)
678 # 2. a long description, all lines begin with a space,
679 # and paragraphs are separated by a single dot on a line
680 # This routine returns an array of all paragraphs, and reformat
681 # them.
682 # When first argument is 2, the string is a comma separated list of
683 # values.
684 my $type = shift;
685 my $text = shift;
686 $text =~ s/^[ \t]//mg;
687 return (split(/, */, $text, 0)) if $type ne 1;
688 return ($text) if $text !~ /\n/;
689
690 $text =~ s/([^\n]*)\n//;
691 my @list = ($1);
692 my $str = '';
693 for my $line (split (/\n/, $text))
694 {
695 chomp $line;
696 if ($line =~ /^\.\s*$/)
697 {
698 # New paragraph
699 $str =~ s/\s*$//;
700 push(@list, $str);
701 $str = '';
702 }
703 elsif ($line =~ /^\s/)
704 {
705 # Line which must not be reformatted
706 $str .= "\n" if length ($str) && $str !~ /\n$/;
707 $line =~ s/\s+$//;
708 $str .= $line."\n";
709 }
710 else
711 {
712 # Continuation line, remove newline
713 $str .= " " if length ($str) && $str !~ /\n$/;
714 $str .= $line;
715 }
716 }
717 $str =~ s/\s*$//;
718 push(@list, $str) if length ($str);
719 return @list;
720 }
721
722 sub type_quoted {
723 while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) {
724 my $message = $1;
725 my $before = $`;
726 $message =~ s/\\\"/\"/g;
727 $before =~ s/[^\n]//g;
728 $messages{$message} = [];
729 $loc{$message} = length ($before) + 2;
730 }
731 }
732
733 sub type_glade {
734 ### For translatable Glade XML files ###
735
736 my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message";
737
738 while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) {
739 # Glade sometimes uses tags that normally mark translatable things for
740 # little bits of non-translatable content. We work around this by not
741 # translating strings that only includes something like label4 or window1.
742 $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/;
743 }
744
745 while ($input =~ /<items>(..[^<]*)<\/items>/sg) {
746 for my $item (split (/\n/, $1)) {
747 $messages{entity_decode($item)} = [];
748 }
749 }
750
751 ## handle new glade files
752 while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) {
753 $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/;
754 if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) {
755 $comments{entity_decode($3)} = entity_decode($2) ;
756 }
757 }
758 while ($input =~ /<atkaction\s+action_name="([^>]*)"\s+description="([^>]+)"\/>/sg) {
759 $messages{entity_decode_minimal($2)} = [];
760 }
761 }
762
763 sub type_scheme {
764 my ($line, $i, $state, $str, $trcomment, $char);
765 for $line (split(/\n/, $input)) {
766 $i = 0;
767 $state = 0; # 0 - nothing, 1 - string, 2 - translatable string
768 while ($i < length($line)) {
769 if (substr($line,$i,1) eq "\"") {
770 if ($state == 2) {
771 $comments{$str} = $trcomment if ($trcomment);
772 $messages{$str} = [];
773 $str = '';
774 $state = 0; $trcomment = "";
775 } elsif ($state == 1) {
776 $str = '';
777 $state = 0; $trcomment = "";
778 } else {
779 $state = 1;
780 $str = '';
781 if ($i>0 && substr($line,$i-1,1) eq '_') {
782 $state = 2;
783 }
784 }
785 } elsif (!$state) {
786 if (substr($line,$i,1) eq ";") {
787 $trcomment = substr($line,$i+1);
788 $trcomment =~ s/^;*\s*//;
789 $i = length($line);
790 } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) {
791 $trcomment = "";
792 }
793 } else {
794 if (substr($line,$i,1) eq "\\") {
795 $char = substr($line,$i+1,1);
796 if ($char ne "\"" && $char ne "\\") {
797 $str = $str . "\\";
798 }
799 $i++;
800 }
801 $str = $str . substr($line,$i,1);
802 }
803 $i++;
804 }
805 }
806 }
807
808 sub msg_write {
809 my @msgids;
810 if (%count)
811 {
812 @msgids = sort { $count{$a} <=> $count{$b} } keys %count;
813 }
814 else
815 {
816 @msgids = sort keys %messages;
817 }
818 for my $message (@msgids)
819 {
820 my $offsetlines = 1;
821 $offsetlines++ if $message =~ /%/;
822 if (defined ($comments{$message}))
823 {
824 while ($comments{$message} =~ m/\n/g)
825 {
826 $offsetlines++;
827 }
828 }
829 print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n"
830 if defined $loc{$message};
831 print OUT "/* ".$comments{$message}." */\n"
832 if defined $comments{$message};
833 print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/;
834
835 my @lines = split (/\n/, $message, -1);
836 for (my $n = 0; $n < @lines; $n++)
837 {
838 if ($n == 0)
839 {
840 print OUT "char *s = N_(\"";
841 }
842 else
843 {
844 print OUT " \"";
845 }
846
847 print OUT escape($lines[$n]);
848
849 if ($n < @lines - 1)
850 {
851 print OUT "\\n\"\n";
852 }
853 else
854 {
855 print OUT "\");\n";
856 }
857 }
858 }
859 }
860
0 #!@INTLTOOL_PERL@ -w
1 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2
3 #
4 # The Intltool Message Merger
5 #
6 # Copyright (C) 2000, 2003 Free Software Foundation.
7 # Copyright (C) 2000, 2001 Eazel, Inc
8 #
9 # Intltool is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License
11 # version 2 published by the Free Software Foundation.
12 #
13 # Intltool is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
26 #
27 # Authors: Maciej Stachowiak <mjs@noisehavoc.org>
28 # Kenneth Christiansen <kenneth@gnu.org>
29 # Darin Adler <darin@bentspoon.com>
30 #
31 # Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@calixo.net>
32 #
33
34 ## Release information
35 my $PROGRAM = "intltool-merge";
36 my $PACKAGE = "intltool";
37 my $VERSION = "0.36.1";
38
39 ## Loaded modules
40 use strict;
41 use Getopt::Long;
42 use Text::Wrap;
43 use File::Basename;
44
45 my $must_end_tag = -1;
46 my $last_depth = -1;
47 my $translation_depth = -1;
48 my @tag_stack = ();
49 my @entered_tag = ();
50 my @translation_strings = ();
51 my $leading_space = "";
52
53 ## Scalars used by the option stuff
54 my $HELP_ARG = 0;
55 my $VERSION_ARG = 0;
56 my $BA_STYLE_ARG = 0;
57 my $XML_STYLE_ARG = 0;
58 my $KEYS_STYLE_ARG = 0;
59 my $DESKTOP_STYLE_ARG = 0;
60 my $SCHEMAS_STYLE_ARG = 0;
61 my $RFC822DEB_STYLE_ARG = 0;
62 my $QUOTED_STYLE_ARG = 0;
63 my $QUIET_ARG = 0;
64 my $PASS_THROUGH_ARG = 0;
65 my $UTF8_ARG = 0;
66 my $MULTIPLE_OUTPUT = 0;
67 my $cache_file;
68
69 ## Handle options
70 GetOptions
71 (
72 "help" => \$HELP_ARG,
73 "version" => \$VERSION_ARG,
74 "quiet|q" => \$QUIET_ARG,
75 "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility
76 "ba-style|b" => \$BA_STYLE_ARG,
77 "xml-style|x" => \$XML_STYLE_ARG,
78 "keys-style|k" => \$KEYS_STYLE_ARG,
79 "desktop-style|d" => \$DESKTOP_STYLE_ARG,
80 "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
81 "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG,
82 "quoted-style" => \$QUOTED_STYLE_ARG,
83 "pass-through|p" => \$PASS_THROUGH_ARG,
84 "utf8|u" => \$UTF8_ARG,
85 "multiple-output|m" => \$MULTIPLE_OUTPUT,
86 "cache|c=s" => \$cache_file
87 ) or &error;
88
89 my $PO_DIR;
90 my $FILE;
91 my $OUTFILE;
92
93 my %po_files_by_lang = ();
94 my %translations = ();
95 my $iconv = $ENV{"ICONV"} || "iconv";
96 my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
97
98 sub isProgramInPath
99 {
100 my ($file) = @_;
101 # If either a file exists, or when run it returns 0 exit status
102 return 1 if ((-x $file) or (system("$file --version >$devnull") == 0));
103 return 0;
104 }
105
106 if (! isProgramInPath ("$iconv"))
107 {
108 print STDERR " *** iconv is not found on this system!\n".
109 " *** Without it, intltool-merge can not convert encodings.\n";
110 exit;
111 }
112
113 # Use this instead of \w for XML files to handle more possible characters.
114 my $w = "[-A-Za-z0-9._:]";
115
116 # XML quoted string contents
117 my $q = "[^\\\"]*";
118
119 ## Check for options.
120
121 if ($VERSION_ARG)
122 {
123 &print_version;
124 }
125 elsif ($HELP_ARG)
126 {
127 &print_help;
128 }
129 elsif ($BA_STYLE_ARG && @ARGV > 2)
130 {
131 &utf8_sanity_check;
132 &preparation;
133 &print_message;
134 &ba_merge_translations;
135 &finalize;
136 }
137 elsif ($XML_STYLE_ARG && @ARGV > 2)
138 {
139 &utf8_sanity_check;
140 &preparation;
141 &print_message;
142 &xml_merge_output;
143 &finalize;
144 }
145 elsif ($KEYS_STYLE_ARG && @ARGV > 2)
146 {
147 &utf8_sanity_check;
148 &preparation;
149 &print_message;
150 &keys_merge_translations;
151 &finalize;
152 }
153 elsif ($DESKTOP_STYLE_ARG && @ARGV > 2)
154 {
155 &utf8_sanity_check;
156 &preparation;
157 &print_message;
158 &desktop_merge_translations;
159 &finalize;
160 }
161 elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2)
162 {
163 &utf8_sanity_check;
164 &preparation;
165 &print_message;
166 &schemas_merge_translations;
167 &finalize;
168 }
169 elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2)
170 {
171 &preparation;
172 &print_message;
173 &rfc822deb_merge_translations;
174 &finalize;
175 }
176 elsif ($QUOTED_STYLE_ARG && @ARGV > 2)
177 {
178 &utf8_sanity_check;
179 &preparation;
180 &print_message;
181 &quoted_merge_translations;
182 &finalize;
183 }
184 else
185 {
186 &print_help;
187 }
188
189 exit;
190
191 ## Sub for printing release information
192 sub print_version
193 {
194 print <<_EOF_;
195 ${PROGRAM} (${PACKAGE}) ${VERSION}
196 Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.
197
198 Copyright (C) 2000-2003 Free Software Foundation, Inc.
199 Copyright (C) 2000-2001 Eazel, Inc.
200 This is free software; see the source for copying conditions. There is NO
201 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
202 _EOF_
203 exit;
204 }
205
206 ## Sub for printing usage information
207 sub print_help
208 {
209 print <<_EOF_;
210 Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE
211 Generates an output file that includes some localized attributes from an
212 untranslated source file.
213
214 Mandatory options: (exactly one must be specified)
215 -b, --ba-style includes translations in the bonobo-activation style
216 -d, --desktop-style includes translations in the desktop style
217 -k, --keys-style includes translations in the keys style
218 -s, --schemas-style includes translations in the schemas style
219 -r, --rfc822deb-style includes translations in the RFC822 style
220 --quoted-style includes translations in the quoted string style
221 -x, --xml-style includes translations in the standard xml style
222
223 Other options:
224 -u, --utf8 convert all strings to UTF-8 before merging
225 (default for everything except RFC822 style)
226 -p, --pass-through deprecated, does nothing and issues a warning
227 -m, --multiple-output output one localized file per locale, instead of
228 a single file containing all localized elements
229 -c, --cache=FILE specify cache file name
230 (usually \$top_builddir/po/.intltool-merge-cache)
231 -q, --quiet suppress most messages
232 --help display this help and exit
233 --version output version information and exit
234
235 Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
236 or send email to <xml-i18n-tools\@gnome.org>.
237 _EOF_
238 exit;
239 }
240
241
242 ## Sub for printing error messages
243 sub print_error
244 {
245 print STDERR "Try `${PROGRAM} --help' for more information.\n";
246 exit;
247 }
248
249
250 sub print_message
251 {
252 print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG;
253 }
254
255
256 sub preparation
257 {
258 $PO_DIR = $ARGV[0];
259 $FILE = $ARGV[1];
260 $OUTFILE = $ARGV[2];
261
262 &gather_po_files;
263 &get_translation_database;
264 }
265
266 # General-purpose code for looking up translations in .po files
267
268 sub po_file2lang
269 {
270 my ($tmp) = @_;
271 $tmp =~ s/^.*\/(.*)\.po$/$1/;
272 return $tmp;
273 }
274
275 sub gather_po_files
276 {
277 for my $po_file (glob "$PO_DIR/*.po") {
278 $po_files_by_lang{po_file2lang($po_file)} = $po_file;
279 }
280 }
281
282 sub get_local_charset
283 {
284 my ($encoding) = @_;
285 my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias";
286
287 # seek character encoding aliases in charset.alias (glib)
288
289 if (open CHARSET_ALIAS, $alias_file)
290 {
291 while (<CHARSET_ALIAS>)
292 {
293 next if /^\#/;
294 return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i)
295 }
296
297 close CHARSET_ALIAS;
298 }
299
300 # if not found, return input string
301
302 return $encoding;
303 }
304
305 sub get_po_encoding
306 {
307 my ($in_po_file) = @_;
308 my $encoding = "";
309
310 open IN_PO_FILE, $in_po_file or die;
311 while (<IN_PO_FILE>)
312 {
313 ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
314 if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/)
315 {
316 $encoding = $1;
317 last;
318 }
319 }
320 close IN_PO_FILE;
321
322 if (!$encoding)
323 {
324 print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG;
325 $encoding = "ISO-8859-1";
326 }
327
328 system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull");
329 if ($?) {
330 $encoding = get_local_charset($encoding);
331 }
332
333 return $encoding
334 }
335
336 sub utf8_sanity_check
337 {
338 print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG;
339 $UTF8_ARG = 1;
340 }
341
342 sub get_translation_database
343 {
344 if ($cache_file) {
345 &get_cached_translation_database;
346 } else {
347 &create_translation_database;
348 }
349 }
350
351 sub get_newest_po_age
352 {
353 my $newest_age;
354
355 foreach my $file (values %po_files_by_lang)
356 {
357 my $file_age = -M $file;
358 $newest_age = $file_age if !$newest_age || $file_age < $newest_age;
359 }
360
361 $newest_age = 0 if !$newest_age;
362
363 return $newest_age;
364 }
365
366 sub create_cache
367 {
368 print "Generating and caching the translation database\n" unless $QUIET_ARG;
369
370 &create_translation_database;
371
372 open CACHE, ">$cache_file" || die;
373 print CACHE join "\x01", %translations;
374 close CACHE;
375 }
376
377 sub load_cache
378 {
379 print "Found cached translation database\n" unless $QUIET_ARG;
380
381 my $contents;
382 open CACHE, "<$cache_file" || die;
383 {
384 local $/;
385 $contents = <CACHE>;
386 }
387 close CACHE;
388 %translations = split "\x01", $contents;
389 }
390
391 sub get_cached_translation_database
392 {
393 my $cache_file_age = -M $cache_file;
394 if (defined $cache_file_age)
395 {
396 if ($cache_file_age <= &get_newest_po_age)
397 {
398 &load_cache;
399 return;
400 }
401 print "Found too-old cached translation database\n" unless $QUIET_ARG;
402 }
403
404 &create_cache;
405 }
406
407 sub create_translation_database
408 {
409 for my $lang (keys %po_files_by_lang)
410 {
411 my $po_file = $po_files_by_lang{$lang};
412
413 if ($UTF8_ARG)
414 {
415 my $encoding = get_po_encoding ($po_file);
416
417 if (lc $encoding eq "utf-8")
418 {
419 open PO_FILE, "<$po_file";
420 }
421 else
422 {
423 print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;;
424
425 open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";
426 }
427 }
428 else
429 {
430 open PO_FILE, "<$po_file";
431 }
432
433 my $nextfuzzy = 0;
434 my $inmsgid = 0;
435 my $inmsgstr = 0;
436 my $msgid = "";
437 my $msgstr = "";
438
439 while (<PO_FILE>)
440 {
441 $nextfuzzy = 1 if /^#, fuzzy/;
442
443 if (/^msgid "((\\.|[^\\]+)*)"/ )
444 {
445 $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
446 $msgid = "";
447 $msgstr = "";
448
449 if ($nextfuzzy) {
450 $inmsgid = 0;
451 } else {
452 $msgid = unescape_po_string($1);
453 $inmsgid = 1;
454 }
455 $inmsgstr = 0;
456 $nextfuzzy = 0;
457 }
458
459 if (/^msgstr "((\\.|[^\\]+)*)"/)
460 {
461 $msgstr = unescape_po_string($1);
462 $inmsgstr = 1;
463 $inmsgid = 0;
464 }
465
466 if (/^"((\\.|[^\\]+)*)"/)
467 {
468 $msgid .= unescape_po_string($1) if $inmsgid;
469 $msgstr .= unescape_po_string($1) if $inmsgstr;
470 }
471 }
472 $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
473 }
474 }
475
476 sub finalize
477 {
478 }
479
480 sub unescape_one_sequence
481 {
482 my ($sequence) = @_;
483
484 return "\\" if $sequence eq "\\\\";
485 return "\"" if $sequence eq "\\\"";
486 return "\n" if $sequence eq "\\n";
487 return "\r" if $sequence eq "\\r";
488 return "\t" if $sequence eq "\\t";
489 return "\b" if $sequence eq "\\b";
490 return "\f" if $sequence eq "\\f";
491 return "\a" if $sequence eq "\\a";
492 return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7)
493
494 return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/);
495 return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/);
496
497 # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489
498
499 return $sequence;
500 }
501
502 sub unescape_po_string
503 {
504 my ($string) = @_;
505
506 $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg;
507
508 return $string;
509 }
510
511 sub entity_decode
512 {
513 local ($_) = @_;
514
515 s/&apos;/'/g; # '
516 s/&quot;/"/g; # "
517 s/&lt;/</g;
518 s/&gt;/>/g;
519 s/&amp;/&/g;
520
521 return $_;
522 }
523
524 # entity_encode: (string)
525 #
526 # Encode the given string to XML format (encode '<' etc).
527
528 sub entity_encode
529 {
530 my ($pre_encoded) = @_;
531
532 my @list_of_chars = unpack ('C*', $pre_encoded);
533
534 # with UTF-8 we only encode minimalistic
535 return join ('', map (&entity_encode_int_minimalist, @list_of_chars));
536 }
537
538 sub entity_encode_int_minimalist
539 {
540 return "&quot;" if $_ == 34;
541 return "&amp;" if $_ == 38;
542 return "&apos;" if $_ == 39;
543 return "&lt;" if $_ == 60;
544 return chr $_;
545 }
546
547 sub entity_encoded_translation
548 {
549 my ($lang, $string) = @_;
550
551 my $translation = $translations{$lang, $string};
552 return $string if !$translation;
553 return entity_encode ($translation);
554 }
555
556 ## XML (bonobo-activation specific) merge code
557
558 sub ba_merge_translations
559 {
560 my $source;
561
562 {
563 local $/; # slurp mode
564 open INPUT, "<$FILE" or die "can't open $FILE: $!";
565 $source = <INPUT>;
566 close INPUT;
567 }
568
569 open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!";
570 # Binmode so that selftest works ok if using a native Win32 Perl...
571 binmode (OUTPUT) if $^O eq 'MSWin32';
572
573 while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s)
574 {
575 print OUTPUT $1;
576
577 my $node = $2 . "\n";
578
579 my @strings = ();
580 $_ = $node;
581 while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) {
582 push @strings, entity_decode($3);
583 }
584 print OUTPUT;
585
586 my %langs;
587 for my $string (@strings)
588 {
589 for my $lang (keys %po_files_by_lang)
590 {
591 $langs{$lang} = 1 if $translations{$lang, $string};
592 }
593 }
594
595 for my $lang (sort keys %langs)
596 {
597 $_ = $node;
598 s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s;
599 s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg;
600 print OUTPUT;
601 }
602 }
603
604 print OUTPUT $source;
605
606 close OUTPUT;
607 }
608
609
610 ## XML (non-bonobo-activation) merge code
611
612
613 # Process tag attributes
614 # Only parameter is a HASH containing attributes -> values mapping
615 sub getAttributeString
616 {
617 my $sub = shift;
618 my $do_translate = shift || 0;
619 my $language = shift || "";
620 my $result = "";
621 my $translate = shift;
622 foreach my $e (reverse(sort(keys %{ $sub }))) {
623 my $key = $e;
624 my $string = $sub->{$e};
625 my $quote = '"';
626
627 $string =~ s/^[\s]+//;
628 $string =~ s/[\s]+$//;
629
630 if ($string =~ /^'.*'$/)
631 {
632 $quote = "'";
633 }
634 $string =~ s/^['"]//g;
635 $string =~ s/['"]$//g;
636
637 if ($do_translate && $key =~ /^_/) {
638 $key =~ s|^_||g;
639 if ($language) {
640 # Handle translation
641 my $decode_string = entity_decode($string);
642 my $translation = $translations{$language, $decode_string};
643 if ($translation) {
644 $translation = entity_encode($translation);
645 $string = $translation;
646 }
647 $$translate = 2;
648 } else {
649 $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate
650 }
651 }
652
653 $result .= " $key=$quote$string$quote";
654 }
655 return $result;
656 }
657
658 # Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree
659 sub getXMLstring
660 {
661 my $ref = shift;
662 my $spacepreserve = shift || 0;
663 my @list = @{ $ref };
664 my $result = "";
665
666 my $count = scalar(@list);
667 my $attrs = $list[0];
668 my $index = 1;
669
670 $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
671 $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
672
673 while ($index < $count) {
674 my $type = $list[$index];
675 my $content = $list[$index+1];
676 if (! $type ) {
677 # We've got CDATA
678 if ($content) {
679 # lets strip the whitespace here, and *ONLY* here
680 $content =~ s/\s+/ /gs if (!$spacepreserve);
681 $result .= $content;
682 }
683 } elsif ( "$type" ne "1" ) {
684 # We've got another element
685 $result .= "<$type";
686 $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
687 if ($content) {
688 my $subresult = getXMLstring($content, $spacepreserve);
689 if ($subresult) {
690 $result .= ">".$subresult . "</$type>";
691 } else {
692 $result .= "/>";
693 }
694 } else {
695 $result .= "/>";
696 }
697 }
698 $index += 2;
699 }
700 return $result;
701 }
702
703 # Translate list of nodes if necessary
704 sub translate_subnodes
705 {
706 my $fh = shift;
707 my $content = shift;
708 my $language = shift || "";
709 my $singlelang = shift || 0;
710 my $spacepreserve = shift || 0;
711
712 my @nodes = @{ $content };
713
714 my $count = scalar(@nodes);
715 my $index = 0;
716 while ($index < $count) {
717 my $type = $nodes[$index];
718 my $rest = $nodes[$index+1];
719 if ($singlelang) {
720 my $oldMO = $MULTIPLE_OUTPUT;
721 $MULTIPLE_OUTPUT = 1;
722 traverse($fh, $type, $rest, $language, $spacepreserve);
723 $MULTIPLE_OUTPUT = $oldMO;
724 } else {
725 traverse($fh, $type, $rest, $language, $spacepreserve);
726 }
727 $index += 2;
728 }
729 }
730
731 sub isWellFormedXmlFragment
732 {
733 my $ret = eval 'require XML::Parser';
734 if(!$ret) {
735 die "You must have XML::Parser installed to run $0\n\n";
736 }
737
738 my $fragment = shift;
739 return 0 if (!$fragment);
740
741 $fragment = "<root>$fragment</root>";
742 my $xp = new XML::Parser(Style => 'Tree');
743 my $tree = 0;
744 eval { $tree = $xp->parse($fragment); };
745 return $tree;
746 }
747
748 sub traverse
749 {
750 my $fh = shift;
751 my $nodename = shift;
752 my $content = shift;
753 my $language = shift || "";
754 my $spacepreserve = shift || 0;
755
756 if (!$nodename) {
757 if ($content =~ /^[\s]*$/) {
758 $leading_space .= $content;
759 }
760 print $fh $content;
761 } else {
762 # element
763 my @all = @{ $content };
764 my $attrs = shift @all;
765 my $translate = 0;
766 my $outattr = getAttributeString($attrs, 1, $language, \$translate);
767
768 if ($nodename =~ /^_/) {
769 $translate = 1;
770 $nodename =~ s/^_//;
771 }
772 my $lookup = '';
773
774 $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
775 $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
776
777 print $fh "<$nodename", $outattr;
778 if ($translate) {
779 $lookup = getXMLstring($content, $spacepreserve);
780 if (!$spacepreserve) {
781 $lookup =~ s/^\s+//s;
782 $lookup =~ s/\s+$//s;
783 }
784
785 if ($lookup || $translate == 2) {
786 my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup});
787 if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) {
788 $translation = $lookup if (!$translation);
789 print $fh " xml:lang=\"", $language, "\"" if $language;
790 print $fh ">";
791 if ($translate == 2) {
792 translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
793 } else {
794 print $fh $translation;
795 }
796 print $fh "</$nodename>";
797
798 return; # this means there will be no same translation with xml:lang="$language"...
799 # if we want them both, just remove this "return"
800 } else {
801 print $fh ">";
802 if ($translate == 2) {
803 translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
804 } else {
805 print $fh $lookup;
806 }
807 print $fh "</$nodename>";
808 }
809 } else {
810 print $fh "/>";
811 }
812
813 for my $lang (sort keys %po_files_by_lang) {
814 if ($MULTIPLE_OUTPUT && $lang ne "$language") {
815 next;
816 }
817 if ($lang) {
818 # Handle translation
819 #
820 my $translate = 0;
821 my $localattrs = getAttributeString($attrs, 1, $lang, \$translate);
822 my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup});
823 if ($translate && !$translation) {
824 $translation = $lookup;
825 }
826
827 if ($translation || $translate) {
828 print $fh "\n";
829 $leading_space =~ s/.*\n//g;
830 print $fh $leading_space;
831 print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">";
832 if ($translate == 2) {
833 translate_subnodes($fh, \@all, $lang, 1, $spacepreserve);
834 } else {
835 print $fh $translation;
836 }
837 print $fh "</$nodename>";
838 }
839 }
840 }
841
842 } else {
843 my $count = scalar(@all);
844 if ($count > 0) {
845 print $fh ">";
846 my $index = 0;
847 while ($index < $count) {
848 my $type = $all[$index];
849 my $rest = $all[$index+1];
850 traverse($fh, $type, $rest, $language, $spacepreserve);
851 $index += 2;
852 }
853 print $fh "</$nodename>";
854 } else {
855 print $fh "/>";
856 }
857 }
858 }
859 }
860
861 sub intltool_tree_comment
862 {
863 my $expat = shift;
864 my $data = shift;
865 my $clist = $expat->{Curlist};
866 my $pos = $#$clist;
867
868 push @$clist, 1 => $data;
869 }
870
871 sub intltool_tree_cdatastart
872 {
873 my $expat = shift;
874 my $clist = $expat->{Curlist};
875 my $pos = $#$clist;
876
877 push @$clist, 0 => $expat->original_string();
878 }
879
880 sub intltool_tree_cdataend
881 {
882 my $expat = shift;
883 my $clist = $expat->{Curlist};
884 my $pos = $#$clist;
885
886 $clist->[$pos] .= $expat->original_string();
887 }
888
889 sub intltool_tree_char
890 {
891 my $expat = shift;
892 my $text = shift;
893 my $clist = $expat->{Curlist};
894 my $pos = $#$clist;
895
896 # Use original_string so that we retain escaped entities
897 # in CDATA sections.
898 #
899 if ($pos > 0 and $clist->[$pos - 1] eq '0') {
900 $clist->[$pos] .= $expat->original_string();
901 } else {
902 push @$clist, 0 => $expat->original_string();
903 }
904 }
905
906 sub intltool_tree_start
907 {
908 my $expat = shift;
909 my $tag = shift;
910 my @origlist = ();
911
912 # Use original_string so that we retain escaped entities
913 # in attribute values. We must convert the string to an
914 # @origlist array to conform to the structure of the Tree
915 # Style.
916 #
917 my @original_array = split /\x/, $expat->original_string();
918 my $source = $expat->original_string();
919
920 # Remove leading tag.
921 #
922 $source =~ s|^\s*<\s*(\S+)||s;
923
924 # Grab attribute key/value pairs and push onto @origlist array.
925 #
926 while ($source)
927 {
928 if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
929 {
930 $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
931 push @origlist, $1;
932 push @origlist, '"' . $2 . '"';
933 }
934 elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
935 {
936 $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
937 push @origlist, $1;
938 push @origlist, "'" . $2 . "'";
939 }
940 else
941 {
942 last;
943 }
944 }
945
946 my $ol = [ { @origlist } ];
947
948 push @{ $expat->{Lists} }, $expat->{Curlist};
949 push @{ $expat->{Curlist} }, $tag => $ol;
950 $expat->{Curlist} = $ol;
951 }
952
953 sub readXml
954 {
955 my $filename = shift || return;
956 if(!-f $filename) {
957 die "ERROR Cannot find filename: $filename\n";
958 }
959
960 my $ret = eval 'require XML::Parser';
961 if(!$ret) {
962 die "You must have XML::Parser installed to run $0\n\n";
963 }
964 my $xp = new XML::Parser(Style => 'Tree');
965 $xp->setHandlers(Char => \&intltool_tree_char);
966 $xp->setHandlers(Start => \&intltool_tree_start);
967 $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
968 $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
969 my $tree = $xp->parsefile($filename);
970
971 # <foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
972 # would be:
973 # [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{},
974 # 0, "Howdy", ref, [{}]], 0, "do" ] ]
975
976 return $tree;
977 }
978
979 sub print_header
980 {
981 my $infile = shift;
982 my $fh = shift;
983 my $source;
984
985 if(!-f $infile) {
986 die "ERROR Cannot find filename: $infile\n";
987 }
988
989 print $fh qq{<?xml version="1.0" encoding="UTF-8"?>\n};
990 {
991 local $/;
992 open DOCINPUT, "<${FILE}" or die;
993 $source = <DOCINPUT>;
994 close DOCINPUT;
995 }
996 if ($source =~ /(<!DOCTYPE.*\[.*\]\s*>)/s)
997 {
998 print $fh "$1\n";
999 }
1000 elsif ($source =~ /(<!DOCTYPE[^>]*>)/s)
1001 {
1002 print $fh "$1\n";
1003 }
1004 }
1005
1006 sub parseTree
1007 {
1008 my $fh = shift;
1009 my $ref = shift;
1010 my $language = shift || "";
1011
1012 my $name = shift @{ $ref };
1013 my $cont = shift @{ $ref };
1014
1015 while (!$name || "$name" eq "1") {
1016 $name = shift @{ $ref };
1017 $cont = shift @{ $ref };
1018 }
1019
1020 my $spacepreserve = 0;
1021 my $attrs = @{$cont}[0];
1022 $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
1023
1024 traverse($fh, $name, $cont, $language, $spacepreserve);
1025 }
1026
1027 sub xml_merge_output
1028 {
1029 my $source;
1030
1031 if ($MULTIPLE_OUTPUT) {
1032 for my $lang (sort keys %po_files_by_lang) {
1033 if ( ! -d $lang ) {
1034 mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
1035 }
1036 open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
1037 binmode (OUTPUT) if $^O eq 'MSWin32';
1038 my $tree = readXml($FILE);
1039 print_header($FILE, \*OUTPUT);
1040 parseTree(\*OUTPUT, $tree, $lang);
1041 close OUTPUT;
1042 print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
1043 }
1044 }
1045 open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n";
1046 binmode (OUTPUT) if $^O eq 'MSWin32';
1047 my $tree = readXml($FILE);
1048 print_header($FILE, \*OUTPUT);
1049 parseTree(\*OUTPUT, $tree);
1050 close OUTPUT;
1051 print "CREATED $OUTFILE\n" unless $QUIET_ARG;
1052 }
1053
1054 sub keys_merge_translations
1055 {
1056 open INPUT, "<${FILE}" or die;
1057 open OUTPUT, ">${OUTFILE}" or die;
1058 binmode (OUTPUT) if $^O eq 'MSWin32';
1059
1060 while (<INPUT>)
1061 {
1062 if (s/^(\s*)_(\w+=(.*))/$1$2/)
1063 {
1064 my $string = $3;
1065
1066 print OUTPUT;
1067
1068 my $non_translated_line = $_;
1069
1070 for my $lang (sort keys %po_files_by_lang)
1071 {
1072 my $translation = $translations{$lang, $string};
1073 next if !$translation;
1074
1075 $_ = $non_translated_line;
1076 s/(\w+)=.*/[$lang]$1=$translation/;
1077 print OUTPUT;
1078 }
1079 }
1080 else
1081 {
1082 print OUTPUT;
1083 }
1084 }
1085
1086 close OUTPUT;
1087 close INPUT;
1088 }
1089
1090 sub desktop_merge_translations
1091 {
1092 open INPUT, "<${FILE}" or die;
1093 open OUTPUT, ">${OUTFILE}" or die;
1094 binmode (OUTPUT) if $^O eq 'MSWin32';
1095
1096 while (<INPUT>)
1097 {
1098 if (s/^(\s*)_(\w+=(.*))/$1$2/)
1099 {
1100 my $string = $3;
1101
1102 print OUTPUT;
1103
1104 my $non_translated_line = $_;
1105
1106 for my $lang (sort keys %po_files_by_lang)
1107 {
1108 my $translation = $translations{$lang, $string};
1109 next if !$translation;
1110
1111 $_ = $non_translated_line;
1112 s/(\w+)=.*/${1}[$lang]=$translation/;
1113 print OUTPUT;
1114 }
1115 }
1116 else
1117 {
1118 print OUTPUT;
1119 }
1120 }
1121
1122 close OUTPUT;
1123 close INPUT;
1124 }
1125
1126 sub schemas_merge_translations
1127 {
1128 my $source;
1129
1130 {
1131 local $/; # slurp mode
1132 open INPUT, "<$FILE" or die "can't open $FILE: $!";
1133 $source = <INPUT>;
1134 close INPUT;
1135 }
1136
1137 open OUTPUT, ">$OUTFILE" or die;
1138 binmode (OUTPUT) if $^O eq 'MSWin32';
1139
1140 # FIXME: support attribute translations
1141
1142 # Empty nodes never need translation, so unmark all of them.
1143 # For example, <_foo/> is just replaced by <foo/>.
1144 $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
1145
1146 while ($source =~ s/
1147 (.*?)
1148 (\s+)(<locale\ name="C">(\s*)
1149 (<default>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/default>)?(\s*)
1150 (<short>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/short>)?(\s*)
1151 (<long>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/long>)?(\s*)
1152 <\/locale>)
1153 //sx)
1154 {
1155 print OUTPUT $1;
1156
1157 my $locale_start_spaces = $2 ? $2 : '';
1158 my $default_spaces = $4 ? $4 : '';
1159 my $short_spaces = $7 ? $7 : '';
1160 my $long_spaces = $10 ? $10 : '';
1161 my $locale_end_spaces = $13 ? $13 : '';
1162 my $c_default_block = $3 ? $3 : '';
1163 my $default_string = $6 ? $6 : '';
1164 my $short_string = $9 ? $9 : '';
1165 my $long_string = $12 ? $12 : '';
1166
1167 print OUTPUT "$locale_start_spaces$c_default_block";
1168
1169 $default_string =~ s/\s+/ /g;
1170 $default_string = entity_decode($default_string);
1171 $short_string =~ s/\s+/ /g;
1172 $short_string = entity_decode($short_string);
1173 $long_string =~ s/\s+/ /g;
1174 $long_string = entity_decode($long_string);
1175
1176 for my $lang (sort keys %po_files_by_lang)
1177 {
1178 my $default_translation = $translations{$lang, $default_string};
1179 my $short_translation = $translations{$lang, $short_string};
1180 my $long_translation = $translations{$lang, $long_string};
1181
1182 next if (!$default_translation && !$short_translation &&
1183 !$long_translation);
1184
1185 print OUTPUT "\n$locale_start_spaces<locale name=\"$lang\">";
1186
1187 print OUTPUT "$default_spaces";
1188
1189 if ($default_translation)
1190 {
1191 $default_translation = entity_encode($default_translation);
1192 print OUTPUT "<default>$default_translation</default>";
1193 }
1194
1195 print OUTPUT "$short_spaces";
1196
1197 if ($short_translation)
1198 {
1199 $short_translation = entity_encode($short_translation);
1200 print OUTPUT "<short>$short_translation</short>";
1201 }
1202
1203 print OUTPUT "$long_spaces";
1204
1205 if ($long_translation)
1206 {
1207 $long_translation = entity_encode($long_translation);
1208 print OUTPUT "<long>$long_translation</long>";
1209 }
1210
1211 print OUTPUT "$locale_end_spaces</locale>";
1212 }
1213 }
1214
1215 print OUTPUT $source;
1216
1217 close OUTPUT;
1218 }
1219
1220 sub rfc822deb_merge_translations
1221 {
1222 my %encodings = ();
1223 for my $lang (keys %po_files_by_lang) {
1224 $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang}));
1225 }
1226
1227 my $source;
1228
1229 $Text::Wrap::huge = 'overflow';
1230 $Text::Wrap::break = qr/\n|\s(?=\S)/;
1231
1232 {
1233 local $/; # slurp mode
1234 open INPUT, "<$FILE" or die "can't open $FILE: $!";
1235 $source = <INPUT>;
1236 close INPUT;
1237 }
1238
1239 open OUTPUT, ">${OUTFILE}" or die;
1240 binmode (OUTPUT) if $^O eq 'MSWin32';
1241
1242 while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg)
1243 {
1244 my $sep = $1;
1245 my $non_translated_line = $3.$4;
1246 my $string = $5;
1247 my $underscore = length($2);
1248 next if $underscore eq 0 && $non_translated_line =~ /^#/;
1249 # Remove [] dummy strings
1250 my $stripped = $string;
1251 $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2;
1252 $stripped =~ s/\[\s[^\[\]]*\]$//;
1253 $non_translated_line .= $stripped;
1254
1255 print OUTPUT $sep.$non_translated_line;
1256
1257 if ($underscore)
1258 {
1259 my @str_list = rfc822deb_split($underscore, $string);
1260
1261 for my $lang (sort keys %po_files_by_lang)
1262 {
1263 my $is_translated = 1;
1264 my $str_translated = '';
1265 my $first = 1;
1266
1267 for my $str (@str_list)
1268 {
1269 my $translation = $translations{$lang, $str};
1270
1271 if (!$translation)
1272 {
1273 $is_translated = 0;
1274 last;
1275 }
1276
1277 # $translation may also contain [] dummy
1278 # strings, mostly to indicate an empty string
1279 $translation =~ s/\[\s[^\[\]]*\]$//;
1280
1281 if ($first)
1282 {
1283 if ($underscore eq 2)
1284 {
1285 $str_translated .= $translation;
1286 }
1287 else
1288 {
1289 $str_translated .=
1290 Text::Tabs::expand($translation) .
1291 "\n";
1292 }
1293 }
1294 else
1295 {
1296 if ($underscore eq 2)
1297 {
1298 $str_translated .= ', ' . $translation;
1299 }
1300 else
1301 {
1302 $str_translated .= Text::Tabs::expand(
1303 Text::Wrap::wrap(' ', ' ', $translation)) .
1304 "\n .\n";
1305 }
1306 }
1307 $first = 0;
1308
1309 # To fix some problems with Text::Wrap::wrap
1310 $str_translated =~ s/(\n )+\n/\n .\n/g;
1311 }
1312 next unless $is_translated;
1313
1314 $str_translated =~ s/\n \.\n$//;
1315 $str_translated =~ s/\s+$//;
1316
1317 $_ = $non_translated_line;
1318 s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s;
1319 print OUTPUT;
1320 }
1321 }
1322 }
1323 print OUTPUT "\n";
1324
1325 close OUTPUT;
1326 close INPUT;
1327 }
1328
1329 sub rfc822deb_split
1330 {
1331 # Debian defines a special way to deal with rfc822-style files:
1332 # when a value contain newlines, it consists of
1333 # 1. a short form (first line)
1334 # 2. a long description, all lines begin with a space,
1335 # and paragraphs are separated by a single dot on a line
1336 # This routine returns an array of all paragraphs, and reformat
1337 # them.
1338 # When first argument is 2, the string is a comma separated list of
1339 # values.
1340 my $type = shift;
1341 my $text = shift;
1342 $text =~ s/^[ \t]//mg;
1343 return (split(/, */, $text, 0)) if $type ne 1;
1344 return ($text) if $text !~ /\n/;
1345
1346 $text =~ s/([^\n]*)\n//;
1347 my @list = ($1);
1348 my $str = '';
1349
1350 for my $line (split (/\n/, $text))
1351 {
1352 chomp $line;
1353 if ($line =~ /^\.\s*$/)
1354 {
1355 # New paragraph
1356 $str =~ s/\s*$//;
1357 push(@list, $str);
1358 $str = '';
1359 }
1360 elsif ($line =~ /^\s/)
1361 {
1362 # Line which must not be reformatted
1363 $str .= "\n" if length ($str) && $str !~ /\n$/;
1364 $line =~ s/\s+$//;
1365 $str .= $line."\n";
1366 }
1367 else
1368 {
1369 # Continuation line, remove newline
1370 $str .= " " if length ($str) && $str !~ /\n$/;
1371 $str .= $line;
1372 }
1373 }
1374
1375 $str =~ s/\s*$//;
1376 push(@list, $str) if length ($str);
1377
1378 return @list;
1379 }
1380
1381 sub quoted_translation
1382 {
1383 my ($lang, $string) = @_;
1384
1385 $string =~ s/\\\"/\"/g;
1386
1387 my $translation = $translations{$lang, $string};
1388 $translation = $string if !$translation;
1389
1390 $translation =~ s/\"/\\\"/g;
1391 return $translation
1392 }
1393
1394 sub quoted_merge_translations
1395 {
1396 if (!$MULTIPLE_OUTPUT) {
1397 print "Quoted only supports Multiple Output.\n";
1398 exit(1);
1399 }
1400
1401 for my $lang (sort keys %po_files_by_lang) {
1402 if ( ! -d $lang ) {
1403 mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
1404 }
1405 open INPUT, "<${FILE}" or die;
1406 open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
1407 binmode (OUTPUT) if $^O eq 'MSWin32';
1408 while (<INPUT>)
1409 {
1410 s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . &quoted_translation($lang, $1) . "\""/ge;
1411 print OUTPUT;
1412 }
1413 close OUTPUT;
1414 close INPUT;
1415 }
1416 }
0 #!@INTLTOOL_PERL@ -w
1 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2
3 #
4 # The Intltool Message Updater
5 #
6 # Copyright (C) 2000-2003 Free Software Foundation.
7 #
8 # Intltool is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License
10 # version 2 published by the Free Software Foundation.
11 #
12 # Intltool is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25 #
26 # Authors: Kenneth Christiansen <kenneth@gnu.org>
27 # Maciej Stachowiak
28 # Darin Adler <darin@bentspoon.com>
29
30 ## Release information
31 my $PROGRAM = "intltool-update";
32 my $VERSION = "0.36.1";
33 my $PACKAGE = "intltool";
34
35 ## Loaded modules
36 use strict;
37 use Getopt::Long;
38 use Cwd;
39 use File::Copy;
40 use File::Find;
41
42 ## Scalars used by the option stuff
43 my $HELP_ARG = 0;
44 my $VERSION_ARG = 0;
45 my $DIST_ARG = 0;
46 my $POT_ARG = 0;
47 my $HEADERS_ARG = 0;
48 my $MAINTAIN_ARG = 0;
49 my $REPORT_ARG = 0;
50 my $VERBOSE = 0;
51 my $GETTEXT_PACKAGE = "";
52 my $OUTPUT_FILE = "";
53
54 my @languages;
55 my %varhash = ();
56 my %po_files_by_lang = ();
57
58 # Regular expressions to categorize file types.
59 # FIXME: Please check if the following is correct
60
61 my $xml_support =
62 "xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required)
63 "ui|". # Bonobo specific - User Interface desc. files
64 "lang|". # ?
65 "glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required)
66 "scm(?:\\.in)*|". # ? (Note: .in is not required)
67 "oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files
68 "etspec|". # ?
69 "server(?:\\.in)+|". # Bonobo specific
70 "sheet(?:\\.in)+|". # ?
71 "schemas(?:\\.in)+|". # GConf specific
72 "pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer.
73 "kbd(?:\\.in)+|". # GOK specific.
74 "policy(?:\\.in)+"; # PolicyKit files
75
76 my $ini_support =
77 "icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
78 "desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
79 "caves(?:\\.in)+|". # GNOME Games specific
80 "directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
81 "soundlist(?:\\.in)+|". # GNOME specific
82 "keys(?:\\.in)+|". # GNOME Mime database specific
83 "theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
84 "service(?:\\.in)+"; # DBus specific
85
86 my $buildin_gettext_support =
87 "c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py";
88
89 ## Always flush buffer when printing
90 $| = 1;
91
92 ## Sometimes the source tree will be rooted somewhere else.
93 my $SRCDIR = $ENV{"srcdir"} || ".";
94 my $POTFILES_in;
95
96 $POTFILES_in = "<$SRCDIR/POTFILES.in";
97
98 my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
99
100 ## Handle options
101 GetOptions
102 (
103 "help" => \$HELP_ARG,
104 "version" => \$VERSION_ARG,
105 "dist|d" => \$DIST_ARG,
106 "pot|p" => \$POT_ARG,
107 "headers|s" => \$HEADERS_ARG,
108 "maintain|m" => \$MAINTAIN_ARG,
109 "report|r" => \$REPORT_ARG,
110 "verbose|x" => \$VERBOSE,
111 "gettext-package|g=s" => \$GETTEXT_PACKAGE,
112 "output-file|o=s" => \$OUTPUT_FILE,
113 ) or &Console_WriteError_InvalidOption;
114
115 &Console_Write_IntltoolHelp if $HELP_ARG;
116 &Console_Write_IntltoolVersion if $VERSION_ARG;
117
118 my $arg_count = ($DIST_ARG > 0)
119 + ($POT_ARG > 0)
120 + ($HEADERS_ARG > 0)
121 + ($MAINTAIN_ARG > 0)
122 + ($REPORT_ARG > 0);
123
124 &Console_Write_IntltoolHelp if $arg_count > 1;
125
126 my $PKGNAME = FindPackageName ();
127
128 # --version and --help don't require a module name
129 my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown";
130
131 if ($POT_ARG)
132 {
133 &GenerateHeaders;
134 &GeneratePOTemplate;
135 }
136 elsif ($HEADERS_ARG)
137 {
138 &GenerateHeaders;
139 }
140 elsif ($MAINTAIN_ARG)
141 {
142 &FindLeftoutFiles;
143 }
144 elsif ($REPORT_ARG)
145 {
146 &GenerateHeaders;
147 &GeneratePOTemplate;
148 &Console_Write_CoverageReport;
149 }
150 elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/)
151 {
152 my $lang = $ARGV[0];
153
154 ## Report error if the language file supplied
155 ## to the command line is non-existent
156 &Console_WriteError_NotExisting("$SRCDIR/$lang.po")
157 if ! -s "$SRCDIR/$lang.po";
158
159 if (!$DIST_ARG)
160 {
161 print "Working, please wait..." if $VERBOSE;
162 &GenerateHeaders;
163 &GeneratePOTemplate;
164 }
165 &POFile_Update ($lang, $OUTPUT_FILE);
166 &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE);
167 }
168 else
169 {
170 &Console_Write_IntltoolHelp;
171 }
172
173 exit;
174
175 #########
176
177 sub Console_Write_IntltoolVersion
178 {
179 print <<_EOF_;
180 ${PROGRAM} (${PACKAGE}) $VERSION
181 Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler.
182
183 Copyright (C) 2000-2003 Free Software Foundation, Inc.
184 This is free software; see the source for copying conditions. There is NO
185 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
186 _EOF_
187 exit;
188 }
189
190 sub Console_Write_IntltoolHelp
191 {
192 print <<_EOF_;
193 Usage: ${PROGRAM} [OPTION]... LANGCODE
194 Updates PO template files and merge them with the translations.
195
196 Mode of operation (only one is allowed):
197 -p, --pot generate the PO template only
198 -s, --headers generate the header files in POTFILES.in
199 -m, --maintain search for left out files from POTFILES.in
200 -r, --report display a status report for the module
201 -d, --dist merge LANGCODE.po with existing PO template
202
203 Extra options:
204 -g, --gettext-package=NAME override PO template name, useful with --pot
205 -o, --output-file=FILE write merged translation to FILE
206 -x, --verbose display lots of feedback
207 --help display this help and exit
208 --version output version information and exit
209
210 Examples of use:
211 ${PROGRAM} --pot just create a new PO template
212 ${PROGRAM} xy create new PO template and merge xy.po with it
213
214 Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
215 or send email to <xml-i18n-tools\@gnome.org>.
216 _EOF_
217 exit;
218 }
219
220 sub echo_n
221 {
222 my $str = shift;
223 my $ret = `echo "$str"`;
224
225 $ret =~ s/\n$//; # do we need the "s" flag?
226
227 return $ret;
228 }
229
230 sub POFile_DetermineType ($)
231 {
232 my $type = $_;
233 my $gettext_type;
234
235 my $xml_regex = "(?:" . $xml_support . ")";
236 my $ini_regex = "(?:" . $ini_support . ")";
237 my $buildin_regex = "(?:" . $buildin_gettext_support . ")";
238
239 if ($type =~ /\[type: gettext\/([^\]].*)]/)
240 {
241 $gettext_type=$1;
242 }
243 elsif ($type =~ /schemas(\.in)+$/)
244 {
245 $gettext_type="schemas";
246 }
247 elsif ($type =~ /glade2?(\.in)*$/)
248 {
249 $gettext_type="glade";
250 }
251 elsif ($type =~ /scm(\.in)*$/)
252 {
253 $gettext_type="scheme";
254 }
255 elsif ($type =~ /keys(\.in)+$/)
256 {
257 $gettext_type="keys";
258 }
259
260 # bucket types
261
262 elsif ($type =~ /$xml_regex$/)
263 {
264 $gettext_type="xml";
265 }
266 elsif ($type =~ /$ini_regex$/)
267 {
268 $gettext_type="ini";
269 }
270 elsif ($type =~ /$buildin_regex$/)
271 {
272 $gettext_type="buildin";
273 }
274 else
275 {
276 $gettext_type="unknown";
277 }
278
279 return "gettext\/$gettext_type";
280 }
281
282 sub TextFile_DetermineEncoding ($)
283 {
284 my $gettext_code="ASCII"; # All files are ASCII by default
285 my $filetype=`file $_ | cut -d ' ' -f 2`;
286
287 if ($? eq "0")
288 {
289 if ($filetype =~ /^(ISO|UTF)/)
290 {
291 chomp ($gettext_code = $filetype);
292 }
293 elsif ($filetype =~ /^XML/)
294 {
295 $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8
296 }
297 }
298
299 return $gettext_code;
300 }
301
302 sub isNotValidMissing
303 {
304 my ($file) = @_;
305
306 return if $file =~ /^\{arch\}\/.*$/;
307 return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/;
308 }
309
310 sub FindLeftoutFiles
311 {
312 my (@buf_i18n_plain,
313 @buf_i18n_xml,
314 @buf_i18n_xml_unmarked,
315 @buf_i18n_ini,
316 @buf_potfiles,
317 @buf_potfiles_ignore,
318 @buf_allfiles,
319 @buf_allfiles_sorted,
320 @buf_potfiles_sorted,
321 @buf_potfiles_ignore_sorted
322 );
323
324 ## Search and find all translatable files
325 find sub {
326 push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/;
327 push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/;
328 push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/;
329 push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
330 }, "..";
331 find sub {
332 push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/;
333 push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/;
334 push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/;
335 push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
336 }, "$SRCDIR/..";
337
338 open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n";
339 @buf_potfiles = grep !/^(#|\s*$)/, <POTFILES>;
340 close POTFILES;
341
342 foreach (@buf_potfiles) {
343 s/^\[.*]\s*//;
344 }
345
346 print "Searching for missing translatable files...\n" if $VERBOSE;
347
348 ## Check if we should ignore some found files, when
349 ## comparing with POTFILES.in
350 foreach my $ignore ("POTFILES.skip", "POTFILES.ignore")
351 {
352 (-s "$SRCDIR/$ignore") or next;
353
354 if ("$ignore" eq "POTFILES.ignore")
355 {
356 print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n".
357 "content of this file to POTFILES.skip.\n";
358 }
359
360 print "Found $ignore: Ignoring files...\n" if $VERBOSE;
361 open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n";
362
363 while (<FILE>)
364 {
365 push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/;
366 }
367 close FILE;
368
369 @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore);
370 }
371
372 foreach my $file (@buf_i18n_plain)
373 {
374 my $in_comment = 0;
375 my $in_macro = 0;
376
377 open FILE, "<$file";
378 while (<FILE>)
379 {
380 # Handle continued multi-line comment.
381 if ($in_comment)
382 {
383 next unless s-.*\*/--;
384 $in_comment = 0;
385 }
386
387 # Handle continued macro.
388 if ($in_macro)
389 {
390 $in_macro = 0 unless /\\$/;
391 next;
392 }
393
394 # Handle start of macro (or any preprocessor directive).
395 if (/^\s*\#/)
396 {
397 $in_macro = 1 if /^([^\\]|\\.)*\\$/;
398 next;
399 }
400
401 # Handle comments and quoted text.
402 while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy
403 {
404 my $match = $1;
405 if ($match eq "/*")
406 {
407 if (!s-/\*.*?\*/--)
408 {
409 s-/\*.*--;
410 $in_comment = 1;
411 }
412 }
413 elsif ($match eq "//")
414 {
415 s-//.*--;
416 }
417 else # ' or "
418 {
419 if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-)
420 {
421 warn "mismatched quotes at line $. in $file\n";
422 s-$match.*--;
423 }
424 }
425 }
426
427 if (/\w\.GetString *\(QUOTEDTEXT/)
428 {
429 if (defined isNotValidMissing (unpack("x3 A*", $file))) {
430 ## Remove the first 3 chars and add newline
431 push @buf_allfiles, unpack("x3 A*", $file) . "\n";
432 }
433 last;
434 }
435
436 ## N_ Q_ and _ are the three macros defined in gi8n.h
437 if (/[NQ]?_ *\(QUOTEDTEXT/)
438 {
439 if (defined isNotValidMissing (unpack("x3 A*", $file))) {
440 ## Remove the first 3 chars and add newline
441 push @buf_allfiles, unpack("x3 A*", $file) . "\n";
442 }
443 last;
444 }
445 }
446 close FILE;
447 }
448
449 foreach my $file (@buf_i18n_xml)
450 {
451 open FILE, "<$file";
452
453 while (<FILE>)
454 {
455 # FIXME: share the pattern matching code with intltool-extract
456 if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/)
457 {
458 if (defined isNotValidMissing (unpack("x3 A*", $file))) {
459 push @buf_allfiles, unpack("x3 A*", $file) . "\n";
460 }
461 last;
462 }
463 }
464 close FILE;
465 }
466
467 foreach my $file (@buf_i18n_ini)
468 {
469 open FILE, "<$file";
470 while (<FILE>)
471 {
472 if (/_(.*)=/)
473 {
474 if (defined isNotValidMissing (unpack("x3 A*", $file))) {
475 push @buf_allfiles, unpack("x3 A*", $file) . "\n";
476 }
477 last;
478 }
479 }
480 close FILE;
481 }
482
483 foreach my $file (@buf_i18n_xml_unmarked)
484 {
485 if (defined isNotValidMissing (unpack("x3 A*", $file))) {
486 push @buf_allfiles, unpack("x3 A*", $file) . "\n";
487 }
488 }
489
490
491 @buf_allfiles_sorted = sort (@buf_allfiles);
492 @buf_potfiles_sorted = sort (@buf_potfiles);
493
494 my %in2;
495 foreach (@buf_potfiles_sorted)
496 {
497 s#^$SRCDIR/../##;
498 s#^$SRCDIR/##;
499 $in2{$_} = 1;
500 }
501
502 foreach (@buf_potfiles_ignore_sorted)
503 {
504 s#^$SRCDIR/../##;
505 s#^$SRCDIR/##;
506 $in2{$_} = 1;
507 }
508
509 my @result;
510
511 foreach (@buf_allfiles_sorted)
512 {
513 my $dummy = $_;
514 my $srcdir = $SRCDIR;
515
516 $srcdir =~ s#^../##;
517 $dummy =~ s#^$srcdir/../##;
518 $dummy =~ s#^$srcdir/##;
519 $dummy =~ s#_build/##;
520 if (!exists($in2{$dummy}))
521 {
522 push @result, $dummy
523 }
524 }
525
526 my @buf_potfiles_notexist;
527
528 foreach (@buf_potfiles_sorted)
529 {
530 chomp (my $dummy = $_);
531 if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy"))
532 {
533 push @buf_potfiles_notexist, $_;
534 }
535 }
536
537 ## Save file with information about the files missing
538 ## if any, and give information about this procedure.
539 if (@result + @buf_potfiles_notexist > 0)
540 {
541 if (@result)
542 {
543 print "\n" if $VERBOSE;
544 unlink "missing";
545 open OUT, ">missing";
546 print OUT @result;
547 close OUT;
548 warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n".
549 "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n";
550 print STDERR @result, "\n";
551 warn "If some of these files are left out on purpose then please add them to\n".
552 "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n".
553 "of left out files has been written in the current directory.\n";
554 }
555 if (@buf_potfiles_notexist)
556 {
557 unlink "notexist";
558 open OUT, ">notexist";
559 print OUT @buf_potfiles_notexist;
560 close OUT;
561 warn "\n" if ($VERBOSE or @result);
562 warn "\e[1mThe following files do not exist anymore:\e[0m\n\n";
563 warn @buf_potfiles_notexist, "\n";
564 warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n".
565 "containing this list of absent files has been written in the current directory.\n";
566 }
567 }
568
569 ## If there is nothing to complain about, notify the user
570 else {
571 print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE;
572 }
573 }
574
575 sub Console_WriteError_InvalidOption
576 {
577 ## Handle invalid arguments
578 print STDERR "Try `${PROGRAM} --help' for more information.\n";
579 exit 1;
580 }
581
582 sub isProgramInPath
583 {
584 my ($file) = @_;
585 # If either a file exists, or when run it returns 0 exit status
586 return 1 if ((-x $file) or (system("$file --version >$devnull") == 0));
587 return 0;
588 }
589
590 sub isGNUGettextTool
591 {
592 my ($file) = @_;
593 # Check that we are using GNU gettext tools
594 if (isProgramInPath ($file))
595 {
596 my $version = `$file --version`;
597 return 1 if ($version =~ m/.*\(GNU .*\).*/);
598 }
599 return 0;
600 }
601
602 sub GenerateHeaders
603 {
604 my $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} || "intltool-extract";
605
606 ## Generate the .h header files, so we can allow glade and
607 ## xml translation support
608 if (! isProgramInPath ("$EXTRACT"))
609 {
610 print STDERR "\n *** The intltool-extract script wasn't found!"
611 ."\n *** Without it, intltool-update can not generate files.\n";
612 exit;
613 }
614 else
615 {
616 open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n";
617
618 while (<FILE>)
619 {
620 chomp;
621 next if /^\[\s*encoding/;
622
623 ## Find xml files in POTFILES.in and generate the
624 ## files with help from the extract script
625
626 my $gettext_type= &POFile_DetermineType ($1);
627
628 if (/\.($xml_support|$ini_support)$/ || /^\[/)
629 {
630 s/^\[[^\[].*]\s*//;
631
632 my $filename = "../$_";
633
634 if ($VERBOSE)
635 {
636 system ($EXTRACT, "--update", "--srcdir=$SRCDIR",
637 "--type=$gettext_type", $filename);
638 }
639 else
640 {
641 system ($EXTRACT, "--update", "--type=$gettext_type",
642 "--srcdir=$SRCDIR", "--quiet", $filename);
643 }
644 }
645 }
646 close FILE;
647 }
648 }
649
650 #
651 # Generate .pot file from POTFILES.in
652 #
653 sub GeneratePOTemplate
654 {
655 my $XGETTEXT = $ENV{"XGETTEXT"} || "xgettext";
656 my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || '';
657 chomp $XGETTEXT;
658
659 if (! isGNUGettextTool ("$XGETTEXT"))
660 {
661 print STDERR " *** GNU xgettext is not found on this system!\n".
662 " *** Without it, intltool-update can not extract strings.\n";
663 exit;
664 }
665
666 print "Building $MODULE.pot...\n" if $VERBOSE;
667
668 open INFILE, $POTFILES_in;
669 unlink "POTFILES.in.temp";
670 open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing");
671
672 my $gettext_support_nonascii = 0;
673
674 # checks for GNU gettext >= 0.12
675 my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`;
676 if ($? == 0)
677 {
678 $gettext_support_nonascii = 1;
679 }
680 else
681 {
682 # urge everybody to upgrade gettext
683 print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n".
684 " strings. That means you should install a version of gettext\n".
685 " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n".
686 " or have to let non-ASCII strings untranslated. (If there is any)\n";
687 }
688
689 my $encoding = "ASCII";
690 my $forced_gettext_code;
691 my @temp_headers;
692 my $encoding_problem_is_reported = 0;
693
694 while (<INFILE>)
695 {
696 next if (/^#/ or /^\s*$/);
697
698 chomp;
699
700 my $gettext_code;
701
702 if (/^\[\s*encoding:\s*(.*)\s*\]/)
703 {
704 $forced_gettext_code=$1;
705 }
706 elsif (/\.($xml_support|$ini_support)$/ || /^\[/)
707 {
708 s/^\[.*]\s*//;
709 print OUTFILE "../$_.h\n";
710 push @temp_headers, "../$_.h";
711 $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code);
712 }
713 else
714 {
715 print OUTFILE "$SRCDIR/../$_\n";
716 $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code);
717 }
718
719 next if (! $gettext_support_nonascii);
720
721 if (defined $forced_gettext_code)
722 {
723 $encoding=$forced_gettext_code;
724 }
725 elsif (defined $gettext_code and "$encoding" ne "$gettext_code")
726 {
727 if ($encoding eq "ASCII")
728 {
729 $encoding=$gettext_code;
730 }
731 elsif ($gettext_code ne "ASCII")
732 {
733 # Only report once because the message is quite long
734 if (! $encoding_problem_is_reported)
735 {
736 print STDERR "WARNING: You should use the same file encoding for all your project files,\n".
737 " but $PROGRAM thinks that most of the source files are in\n".
738 " $encoding encoding, while \"$_\" is (likely) in\n".
739 " $gettext_code encoding. If you are sure that all translatable strings\n".
740 " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n".
741 " line to POTFILES.in:\n\n".
742 " [encoding: UTF-8]\n\n".
743 " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n".
744 "(such warning message will only be reported once.)\n";
745 $encoding_problem_is_reported = 1;
746 }
747 }
748 }
749 }
750
751 close OUTFILE;
752 close INFILE;
753
754 unlink "$MODULE.pot";
755 my @xgettext_argument=("$XGETTEXT",
756 "--add-comments",
757 "--directory\=.",
758 "--default-domain\=$MODULE",
759 "--flag\=g_strdup_printf:1:c-format",
760 "--flag\=g_string_printf:2:c-format",
761 "--flag\=g_string_append_printf:2:c-format",
762 "--flag\=g_error_new:3:c-format",
763 "--flag\=g_set_error:4:c-format",
764 "--flag\=g_markup_printf_escaped:1:c-format",
765 "--flag\=g_log:3:c-format",
766 "--flag\=g_print:1:c-format",
767 "--flag\=g_printerr:1:c-format",
768 "--flag\=g_printf:1:c-format",
769 "--flag\=g_fprintf:2:c-format",
770 "--flag\=g_sprintf:2:c-format",
771 "--flag\=g_snprintf:3:c-format",
772 "--flag\=g_scanner_error:2:c-format",
773 "--flag\=g_scanner_warn:2:c-format",
774 "--output\=$MODULE\.pot",
775 "--files-from\=\.\/POTFILES\.in\.temp");
776 my $XGETTEXT_KEYWORDS = &FindPOTKeywords;
777 push @xgettext_argument, $XGETTEXT_KEYWORDS;
778 my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress;
779 push @xgettext_argument, "--msgid-bugs-address\=$MSGID_BUGS_ADDRESS" if $MSGID_BUGS_ADDRESS;
780 push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii);
781 push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS;
782 my $xgettext_command = join ' ', @xgettext_argument;
783
784 # intercept xgettext error message
785 print "Running $xgettext_command\n" if $VERBOSE;
786 my $xgettext_error_msg = `$xgettext_command 2>\&1`;
787 my $command_failed = $?;
788
789 unlink "POTFILES.in.temp";
790
791 print "Removing generated header (.h) files..." if $VERBOSE;
792 unlink foreach (@temp_headers);
793 print "done.\n" if $VERBOSE;
794
795 if (! $command_failed)
796 {
797 if (! -e "$MODULE.pot")
798 {
799 print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE;
800 }
801 else
802 {
803 print "Wrote $MODULE.pot\n" if $VERBOSE;
804 }
805 }
806 else
807 {
808 if ($xgettext_error_msg =~ /--from-code/)
809 {
810 # replace non-ASCII error message with a more useful one.
811 print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n".
812 " string marked for translation. Please make sure that all strings marked\n".
813 " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n".
814 " following line to POTFILES.in and rerun $PROGRAM:\n\n".
815 " [encoding: UTF-8]\n\n";
816 }
817 else
818 {
819 print STDERR "$xgettext_error_msg";
820 if (-e "$MODULE.pot")
821 {
822 # is this possible?
823 print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n".
824 " Please consult error message above if there is any.\n";
825 }
826 else
827 {
828 print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n".
829 " error message above if there is any.\n";
830 }
831 }
832 exit (1);
833 }
834 }
835
836 sub POFile_Update
837 {
838 -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n";
839
840 my $MSGMERGE = $ENV{"MSGMERGE"} || "msgmerge";
841 my ($lang, $outfile) = @_;
842
843 if (! isGNUGettextTool ("$MSGMERGE"))
844 {
845 print STDERR " *** GNU msgmerge is not found on this system!\n".
846 " *** Without it, intltool-update can not extract strings.\n";
847 exit;
848 }
849
850 print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE;
851
852 my $infile = "$SRCDIR/$lang.po";
853 $outfile = "$SRCDIR/$lang.po" if ($outfile eq "");
854
855 # I think msgmerge won't overwrite old file if merge is not successful
856 system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot");
857 }
858
859 sub Console_WriteError_NotExisting
860 {
861 my ($file) = @_;
862
863 ## Report error if supplied language file is non-existing
864 print STDERR "$PROGRAM: $file does not exist!\n";
865 print STDERR "Try '$PROGRAM --help' for more information.\n";
866 exit;
867 }
868
869 sub GatherPOFiles
870 {
871 my @po_files = glob ("./*.po");
872
873 @languages = map (&POFile_GetLanguage, @po_files);
874
875 foreach my $lang (@languages)
876 {
877 $po_files_by_lang{$lang} = shift (@po_files);
878 }
879 }
880
881 sub POFile_GetLanguage ($)
882 {
883 s/^(.*\/)?(.+)\.po$/$2/;
884 return $_;
885 }
886
887 sub Console_Write_TranslationStatus
888 {
889 my ($lang, $output_file) = @_;
890 my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt";
891
892 if (! isGNUGettextTool ("$MSGFMT"))
893 {
894 print STDERR " *** GNU msgfmt is not found on this system!\n".
895 " *** Without it, intltool-update can not extract strings.\n";
896 exit;
897 }
898
899 $output_file = "$SRCDIR/$lang.po" if ($output_file eq "");
900
901 system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file);
902 }
903
904 sub Console_Write_CoverageReport
905 {
906 my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt";
907
908 if (! isGNUGettextTool ("$MSGFMT"))
909 {
910 print STDERR " *** GNU msgfmt is not found on this system!\n".
911 " *** Without it, intltool-update can not extract strings.\n";
912 exit;
913 }
914
915 &GatherPOFiles;
916
917 foreach my $lang (@languages)
918 {
919 print STDERR "$lang: ";
920 &POFile_Update ($lang, "");
921 }
922
923 print STDERR "\n\n * Current translation support in $MODULE \n\n";
924
925 foreach my $lang (@languages)
926 {
927 print STDERR "$lang: ";
928 system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po");
929 }
930 }
931
932 sub SubstituteVariable
933 {
934 my ($str) = @_;
935
936 # always need to rewind file whenever it has been accessed
937 seek (CONF, 0, 0);
938
939 # cache each variable. varhash is global to we can add
940 # variables elsewhere.
941 while (<CONF>)
942 {
943 if (/^(\w+)=(.*)$/)
944 {
945 ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/;
946 }
947 }
948
949 if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
950 {
951 my $rest = $3;
952 my $untouched = $1;
953 my $sub = "";
954 # Ignore recursive definitions of variables
955 $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
956
957 return SubstituteVariable ("$untouched$sub$rest");
958 }
959
960 # We're using Perl backticks ` and "echo -n" here in order to
961 # expand any shell escapes (such as backticks themselves) in every variable
962 return echo_n ($str);
963 }
964
965 sub CONF_Handle_Open
966 {
967 my $base_dirname = getcwd();
968 $base_dirname =~ s@.*/@@;
969
970 my ($conf_in, $src_dir);
971
972 if ($base_dirname =~ /^po(-.+)?$/)
973 {
974 if (-f "Makevars")
975 {
976 my $makefile_source;
977
978 local (*IN);
979 open (IN, "<Makevars") || die "can't open Makevars: $!";
980
981 while (<IN>)
982 {
983 if (/^top_builddir[ \t]*=/)
984 {
985 $src_dir = $_;
986 $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
987
988 chomp $src_dir;
989 if (-f "$src_dir" . "/configure.ac") {
990 $conf_in = "$src_dir" . "/configure.ac" . "\n";
991 } else {
992 $conf_in = "$src_dir" . "/configure.in" . "\n";
993 }
994 last;
995 }
996 }
997 close IN;
998
999 $conf_in || die "Cannot find top_builddir in Makevars.";
1000 }
1001 elsif (-f "$SRCDIR/../configure.ac")
1002 {
1003 $conf_in = "$SRCDIR/../configure.ac";
1004 }
1005 elsif (-f "$SRCDIR/../configure.in")
1006 {
1007 $conf_in = "$SRCDIR/../configure.in";
1008 }
1009 else
1010 {
1011 my $makefile_source;
1012
1013 local (*IN);
1014 open (IN, "<Makefile") || return;
1015
1016 while (<IN>)
1017 {
1018 if (/^top_srcdir[ \t]*=/)
1019 {
1020 $src_dir = $_;
1021 $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
1022
1023 chomp $src_dir;
1024 $conf_in = "$src_dir" . "/configure.in" . "\n";
1025
1026 last;
1027 }
1028 }
1029 close IN;
1030
1031 $conf_in || die "Cannot find top_srcdir in Makefile.";
1032 }
1033
1034 open (CONF, "<$conf_in");
1035 }
1036 else
1037 {
1038 print STDERR "$PROGRAM: Unable to proceed.\n" .
1039 "Make sure to run this script inside the po directory.\n";
1040 exit;
1041 }
1042 }
1043
1044 sub FindPackageName
1045 {
1046 my $version;
1047 my $domain = &FindMakevarsDomain;
1048 my $name = $domain || "untitled";
1049
1050 &CONF_Handle_Open;
1051
1052 my $conf_source; {
1053 local (*IN);
1054 open (IN, "<&CONF") || return $name;
1055 seek (IN, 0, 0);
1056 local $/; # slurp mode
1057 $conf_source = <IN>;
1058 close IN;
1059 }
1060
1061 # priority for getting package name:
1062 # 1. GETTEXT_PACKAGE
1063 # 2. first argument of AC_INIT (with >= 2 arguments)
1064 # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument)
1065
1066 # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m
1067 # the \s makes this not work, why?
1068 if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m)
1069 {
1070 ($name, $version) = ($1, $2);
1071 $name =~ s/[\[\]\s]//g;
1072 $version =~ s/[\[\]\s]//g;
1073 $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
1074 $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
1075 $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
1076 $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
1077 }
1078
1079 if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m)
1080 {
1081 ($name, $version) = ($1, $2);
1082 $name =~ s/[\[\]\s]//g;
1083 $version =~ s/[\[\]\s]//g;
1084 $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
1085 $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
1086 $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
1087 $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
1088 }
1089
1090 # \s makes this not work, why?
1091 $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m;
1092
1093 # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value
1094 # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables.
1095 $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g;
1096
1097 $name = $domain if $domain;
1098
1099 $name = SubstituteVariable ($name);
1100 $name =~ s/^["'](.*)["']$/$1/;
1101
1102 return $name if $name;
1103 }
1104
1105
1106 sub FindPOTKeywords
1107 {
1108
1109 my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_";
1110 my $varname = "XGETTEXT_OPTIONS";
1111 my $make_source; {
1112 local (*IN);
1113 open (IN, "<Makevars") || (open(IN, "<Makefile.in.in") && ($varname = "XGETTEXT_KEYWORDS")) || return $keywords;
1114 seek (IN, 0, 0);
1115 local $/; # slurp mode
1116 $make_source = <IN>;
1117 close IN;
1118 }
1119
1120 $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m;
1121
1122 return $keywords;
1123 }
1124
1125 sub FindMakevarsDomain
1126 {
1127
1128 my $domain = "";
1129 my $makevars_source; {
1130 local (*IN);
1131 open (IN, "<Makevars") || return $domain;
1132 seek (IN, 0, 0);
1133 local $/; # slurp mode
1134 $makevars_source = <IN>;
1135 close IN;
1136 }
1137
1138 $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m;
1139 $domain =~ s/^\s+//;
1140 $domain =~ s/\s+$//;
1141
1142 return $domain;
1143 }
1144
1145 sub FindMakevarsBugAddress
1146 {
1147
1148 my $address = "";
1149 my $makevars_source; {
1150 local (*IN);
1151 open (IN, "<Makevars") || return undef;
1152 seek (IN, 0, 0);
1153 local $/; # slurp mode
1154 $makevars_source = <IN>;
1155 close IN;
1156 }
1157
1158 $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m;
1159 $address =~ s/^\s+//;
1160 $address =~ s/\s+$//;
1161
1162 return $address;
1163 }
0 # ltmain.sh - Provide generalized library-building support services.
1 # NOTE: Changing this file will not affect anything until you rerun configure.
2 #
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
4 # 2007 Free Software Foundation, Inc.
5 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 basename="s,^.*/,,g"
27
28 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
29 # is ksh but when the shell is invoked as "sh" and the current value of
30 # the _XPG environment variable is not equal to 1 (one), the special
31 # positional parameter $0, within a function call, is the name of the
32 # function.
33 progpath="$0"
34
35 # The name of this program:
36 progname=`echo "$progpath" | $SED $basename`
37 modename="$progname"
38
39 # Global variables:
40 EXIT_SUCCESS=0
41 EXIT_FAILURE=1
42
43 PROGRAM=ltmain.sh
44 PACKAGE=libtool
45 VERSION=1.5.24
46 TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
47
48 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
49 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
50 emulate sh
51 NULLCMD=:
52 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
53 # is contrary to our usage. Disable this feature.
54 alias -g '${1+"$@"}'='"$@"'
55 setopt NO_GLOB_SUBST
56 else
57 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
58 fi
59 BIN_SH=xpg4; export BIN_SH # for Tru64
60 DUALCASE=1; export DUALCASE # for MKS sh
61
62 # Check that we have a working $echo.
63 if test "X$1" = X--no-reexec; then
64 # Discard the --no-reexec flag, and continue.
65 shift
66 elif test "X$1" = X--fallback-echo; then
67 # Avoid inline document here, it may be left over
68 :
69 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
70 # Yippee, $echo works!
71 :
72 else
73 # Restart under the correct shell, and then maybe $echo will work.
74 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
75 fi
76
77 if test "X$1" = X--fallback-echo; then
78 # used as fallback echo
79 shift
80 cat <<EOF
81 $*
82 EOF
83 exit $EXIT_SUCCESS
84 fi
85
86 default_mode=
87 help="Try \`$progname --help' for more information."
88 magic="%%%MAGIC variable%%%"
89 mkdir="mkdir"
90 mv="mv -f"
91 rm="rm -f"
92
93 # Sed substitution that helps us do robust quoting. It backslashifies
94 # metacharacters that are still active within double-quoted strings.
95 Xsed="${SED}"' -e 1s/^X//'
96 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
97 # test EBCDIC or ASCII
98 case `echo X|tr X '\101'` in
99 A) # ASCII based system
100 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
101 SP2NL='tr \040 \012'
102 NL2SP='tr \015\012 \040\040'
103 ;;
104 *) # EBCDIC based system
105 SP2NL='tr \100 \n'
106 NL2SP='tr \r\n \100\100'
107 ;;
108 esac
109
110 # NLS nuisances.
111 # Only set LANG and LC_ALL to C if already set.
112 # These must not be set unconditionally because not all systems understand
113 # e.g. LANG=C (notably SCO).
114 # We save the old values to restore during execute mode.
115 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
116 do
117 eval "if test \"\${$lt_var+set}\" = set; then
118 save_$lt_var=\$$lt_var
119 $lt_var=C
120 export $lt_var
121 fi"
122 done
123
124 # Make sure IFS has a sensible default
125 lt_nl='
126 '
127 IFS=" $lt_nl"
128
129 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
130 $echo "$modename: not configured to build any kind of library" 1>&2
131 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
132 exit $EXIT_FAILURE
133 fi
134
135 # Global variables.
136 mode=$default_mode
137 nonopt=
138 prev=
139 prevopt=
140 run=
141 show="$echo"
142 show_help=
143 execute_dlfiles=
144 duplicate_deps=no
145 preserve_args=
146 lo2o="s/\\.lo\$/.${objext}/"
147 o2lo="s/\\.${objext}\$/.lo/"
148 extracted_archives=
149 extracted_serial=0
150
151 #####################################
152 # Shell function definitions:
153 # This seems to be the best place for them
154
155 # func_mktempdir [string]
156 # Make a temporary directory that won't clash with other running
157 # libtool processes, and avoids race conditions if possible. If
158 # given, STRING is the basename for that directory.
159 func_mktempdir ()
160 {
161 my_template="${TMPDIR-/tmp}/${1-$progname}"
162
163 if test "$run" = ":"; then
164 # Return a directory name, but don't create it in dry-run mode
165 my_tmpdir="${my_template}-$$"
166 else
167
168 # If mktemp works, use that first and foremost
169 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
170
171 if test ! -d "$my_tmpdir"; then
172 # Failing that, at least try and use $RANDOM to avoid a race
173 my_tmpdir="${my_template}-${RANDOM-0}$$"
174
175 save_mktempdir_umask=`umask`
176 umask 0077
177 $mkdir "$my_tmpdir"
178 umask $save_mktempdir_umask
179 fi
180
181 # If we're not in dry-run mode, bomb out on failure
182 test -d "$my_tmpdir" || {
183 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
184 exit $EXIT_FAILURE
185 }
186 fi
187
188 $echo "X$my_tmpdir" | $Xsed
189 }
190
191
192 # func_win32_libid arg
193 # return the library type of file 'arg'
194 #
195 # Need a lot of goo to handle *both* DLLs and import libs
196 # Has to be a shell function in order to 'eat' the argument
197 # that is supplied when $file_magic_command is called.
198 func_win32_libid ()
199 {
200 win32_libid_type="unknown"
201 win32_fileres=`file -L $1 2>/dev/null`
202 case $win32_fileres in
203 *ar\ archive\ import\ library*) # definitely import
204 win32_libid_type="x86 archive import"
205 ;;
206 *ar\ archive*) # could be an import, or static
207 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
208 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
209 win32_nmres=`eval $NM -f posix -A $1 | \
210 $SED -n -e '1,100{
211 / I /{
212 s,.*,import,
213 p
214 q
215 }
216 }'`
217 case $win32_nmres in
218 import*) win32_libid_type="x86 archive import";;
219 *) win32_libid_type="x86 archive static";;
220 esac
221 fi
222 ;;
223 *DLL*)
224 win32_libid_type="x86 DLL"
225 ;;
226 *executable*) # but shell scripts are "executable" too...
227 case $win32_fileres in
228 *MS\ Windows\ PE\ Intel*)
229 win32_libid_type="x86 DLL"
230 ;;
231 esac
232 ;;
233 esac
234 $echo $win32_libid_type
235 }
236
237
238 # func_infer_tag arg
239 # Infer tagged configuration to use if any are available and
240 # if one wasn't chosen via the "--tag" command line option.
241 # Only attempt this if the compiler in the base compile
242 # command doesn't match the default compiler.
243 # arg is usually of the form 'gcc ...'
244 func_infer_tag ()
245 {
246 if test -n "$available_tags" && test -z "$tagname"; then
247 CC_quoted=
248 for arg in $CC; do
249 case $arg in
250 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
251 arg="\"$arg\""
252 ;;
253 esac
254 CC_quoted="$CC_quoted $arg"
255 done
256 case $@ in
257 # Blanks in the command may have been stripped by the calling shell,
258 # but not from the CC environment variable when configure was run.
259 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
260 # Blanks at the start of $base_compile will cause this to fail
261 # if we don't check for them as well.
262 *)
263 for z in $available_tags; do
264 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
265 # Evaluate the configuration.
266 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
267 CC_quoted=
268 for arg in $CC; do
269 # Double-quote args containing other shell metacharacters.
270 case $arg in
271 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
272 arg="\"$arg\""
273 ;;
274 esac
275 CC_quoted="$CC_quoted $arg"
276 done
277 case "$@ " in
278 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
279 # The compiler in the base compile command matches
280 # the one in the tagged configuration.
281 # Assume this is the tagged configuration we want.
282 tagname=$z
283 break
284 ;;
285 esac
286 fi
287 done
288 # If $tagname still isn't set, then no tagged configuration
289 # was found and let the user know that the "--tag" command
290 # line option must be used.
291 if test -z "$tagname"; then
292 $echo "$modename: unable to infer tagged configuration"
293 $echo "$modename: specify a tag with \`--tag'" 1>&2
294 exit $EXIT_FAILURE
295 # else
296 # $echo "$modename: using $tagname tagged configuration"
297 fi
298 ;;
299 esac
300 fi
301 }
302
303
304 # func_extract_an_archive dir oldlib
305 func_extract_an_archive ()
306 {
307 f_ex_an_ar_dir="$1"; shift
308 f_ex_an_ar_oldlib="$1"
309
310 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
311 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
312 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
313 :
314 else
315 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
316 exit $EXIT_FAILURE
317 fi
318 }
319
320 # func_extract_archives gentop oldlib ...
321 func_extract_archives ()
322 {
323 my_gentop="$1"; shift
324 my_oldlibs=${1+"$@"}
325 my_oldobjs=""
326 my_xlib=""
327 my_xabs=""
328 my_xdir=""
329 my_status=""
330
331 $show "${rm}r $my_gentop"
332 $run ${rm}r "$my_gentop"
333 $show "$mkdir $my_gentop"
334 $run $mkdir "$my_gentop"
335 my_status=$?
336 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
337 exit $my_status
338 fi
339
340 for my_xlib in $my_oldlibs; do
341 # Extract the objects.
342 case $my_xlib in
343 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
344 *) my_xabs=`pwd`"/$my_xlib" ;;
345 esac
346 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
347 my_xlib_u=$my_xlib
348 while :; do
349 case " $extracted_archives " in
350 *" $my_xlib_u "*)
351 extracted_serial=`expr $extracted_serial + 1`
352 my_xlib_u=lt$extracted_serial-$my_xlib ;;
353 *) break ;;
354 esac
355 done
356 extracted_archives="$extracted_archives $my_xlib_u"
357 my_xdir="$my_gentop/$my_xlib_u"
358
359 $show "${rm}r $my_xdir"
360 $run ${rm}r "$my_xdir"
361 $show "$mkdir $my_xdir"
362 $run $mkdir "$my_xdir"
363 exit_status=$?
364 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
365 exit $exit_status
366 fi
367 case $host in
368 *-darwin*)
369 $show "Extracting $my_xabs"
370 # Do not bother doing anything if just a dry run
371 if test -z "$run"; then
372 darwin_orig_dir=`pwd`
373 cd $my_xdir || exit $?
374 darwin_archive=$my_xabs
375 darwin_curdir=`pwd`
376 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
377 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
378 if test -n "$darwin_arches"; then
379 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
380 darwin_arch=
381 $show "$darwin_base_archive has multiple architectures $darwin_arches"
382 for darwin_arch in $darwin_arches ; do
383 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
384 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
385 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
386 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
387 cd "$darwin_curdir"
388 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
389 done # $darwin_arches
390 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
391 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
392 darwin_file=
393 darwin_files=
394 for darwin_file in $darwin_filelist; do
395 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
396 lipo -create -output "$darwin_file" $darwin_files
397 done # $darwin_filelist
398 ${rm}r unfat-$$
399 cd "$darwin_orig_dir"
400 else
401 cd "$darwin_orig_dir"
402 func_extract_an_archive "$my_xdir" "$my_xabs"
403 fi # $darwin_arches
404 fi # $run
405 ;;
406 *)
407 func_extract_an_archive "$my_xdir" "$my_xabs"
408 ;;
409 esac
410 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
411 done
412 func_extract_archives_result="$my_oldobjs"
413 }
414 # End of Shell function definitions
415 #####################################
416
417 # Darwin sucks
418 eval std_shrext=\"$shrext_cmds\"
419
420 disable_libs=no
421
422 # Parse our command line options once, thoroughly.
423 while test "$#" -gt 0
424 do
425 arg="$1"
426 shift
427
428 case $arg in
429 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
430 *) optarg= ;;
431 esac
432
433 # If the previous option needs an argument, assign it.
434 if test -n "$prev"; then
435 case $prev in
436 execute_dlfiles)
437 execute_dlfiles="$execute_dlfiles $arg"
438 ;;
439 tag)
440 tagname="$arg"
441 preserve_args="${preserve_args}=$arg"
442
443 # Check whether tagname contains only valid characters
444 case $tagname in
445 *[!-_A-Za-z0-9,/]*)
446 $echo "$progname: invalid tag name: $tagname" 1>&2
447 exit $EXIT_FAILURE
448 ;;
449 esac
450
451 case $tagname in
452 CC)
453 # Don't test for the "default" C tag, as we know, it's there, but
454 # not specially marked.
455 ;;
456 *)
457 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
458 taglist="$taglist $tagname"
459 # Evaluate the configuration.
460 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
461 else
462 $echo "$progname: ignoring unknown tag $tagname" 1>&2
463 fi
464 ;;
465 esac
466 ;;
467 *)
468 eval "$prev=\$arg"
469 ;;
470 esac
471
472 prev=
473 prevopt=
474 continue
475 fi
476
477 # Have we seen a non-optional argument yet?
478 case $arg in
479 --help)
480 show_help=yes
481 ;;
482
483 --version)
484 echo "\
485 $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
486
487 Copyright (C) 2007 Free Software Foundation, Inc.
488 This is free software; see the source for copying conditions. There is NO
489 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
490 exit $?
491 ;;
492
493 --config)
494 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
495 # Now print the configurations for the tags.
496 for tagname in $taglist; do
497 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
498 done
499 exit $?
500 ;;
501
502 --debug)
503 $echo "$progname: enabling shell trace mode"
504 set -x
505 preserve_args="$preserve_args $arg"
506 ;;
507
508 --dry-run | -n)
509 run=:
510 ;;
511
512 --features)
513 $echo "host: $host"
514 if test "$build_libtool_libs" = yes; then
515 $echo "enable shared libraries"
516 else
517 $echo "disable shared libraries"
518 fi
519 if test "$build_old_libs" = yes; then
520 $echo "enable static libraries"
521 else
522 $echo "disable static libraries"
523 fi
524 exit $?
525 ;;
526
527 --finish) mode="finish" ;;
528
529 --mode) prevopt="--mode" prev=mode ;;
530 --mode=*) mode="$optarg" ;;
531
532 --preserve-dup-deps) duplicate_deps="yes" ;;
533
534 --quiet | --silent)
535 show=:
536 preserve_args="$preserve_args $arg"
537 ;;
538
539 --tag)
540 prevopt="--tag"
541 prev=tag
542 preserve_args="$preserve_args --tag"
543 ;;
544 --tag=*)
545 set tag "$optarg" ${1+"$@"}
546 shift
547 prev=tag
548 preserve_args="$preserve_args --tag"
549 ;;
550
551 -dlopen)
552 prevopt="-dlopen"
553 prev=execute_dlfiles
554 ;;
555
556 -*)
557 $echo "$modename: unrecognized option \`$arg'" 1>&2
558 $echo "$help" 1>&2
559 exit $EXIT_FAILURE
560 ;;
561
562 *)
563 nonopt="$arg"
564 break
565 ;;
566 esac
567 done
568
569 if test -n "$prevopt"; then
570 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
571 $echo "$help" 1>&2
572 exit $EXIT_FAILURE
573 fi
574
575 case $disable_libs in
576 no)
577 ;;
578 shared)
579 build_libtool_libs=no
580 build_old_libs=yes
581 ;;
582 static)
583 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
584 ;;
585 esac
586
587 # If this variable is set in any of the actions, the command in it
588 # will be execed at the end. This prevents here-documents from being
589 # left over by shells.
590 exec_cmd=
591
592 if test -z "$show_help"; then
593
594 # Infer the operation mode.
595 if test -z "$mode"; then
596 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
597 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
598 case $nonopt in
599 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
600 mode=link
601 for arg
602 do
603 case $arg in
604 -c)
605 mode=compile
606 break
607 ;;
608 esac
609 done
610 ;;
611 *db | *dbx | *strace | *truss)
612 mode=execute
613 ;;
614 *install*|cp|mv)
615 mode=install
616 ;;
617 *rm)
618 mode=uninstall
619 ;;
620 *)
621 # If we have no mode, but dlfiles were specified, then do execute mode.
622 test -n "$execute_dlfiles" && mode=execute
623
624 # Just use the default operation mode.
625 if test -z "$mode"; then
626 if test -n "$nonopt"; then
627 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
628 else
629 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
630 fi
631 fi
632 ;;
633 esac
634 fi
635
636 # Only execute mode is allowed to have -dlopen flags.
637 if test -n "$execute_dlfiles" && test "$mode" != execute; then
638 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
639 $echo "$help" 1>&2
640 exit $EXIT_FAILURE
641 fi
642
643 # Change the help message to a mode-specific one.
644 generic_help="$help"
645 help="Try \`$modename --help --mode=$mode' for more information."
646
647 # These modes are in order of execution frequency so that they run quickly.
648 case $mode in
649 # libtool compile mode
650 compile)
651 modename="$modename: compile"
652 # Get the compilation command and the source file.
653 base_compile=
654 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
655 suppress_opt=yes
656 suppress_output=
657 arg_mode=normal
658 libobj=
659 later=
660
661 for arg
662 do
663 case $arg_mode in
664 arg )
665 # do not "continue". Instead, add this to base_compile
666 lastarg="$arg"
667 arg_mode=normal
668 ;;
669
670 target )
671 libobj="$arg"
672 arg_mode=normal
673 continue
674 ;;
675
676 normal )
677 # Accept any command-line options.
678 case $arg in
679 -o)
680 if test -n "$libobj" ; then
681 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
682 exit $EXIT_FAILURE
683 fi
684 arg_mode=target
685 continue
686 ;;
687
688 -static | -prefer-pic | -prefer-non-pic)
689 later="$later $arg"
690 continue
691 ;;
692
693 -no-suppress)
694 suppress_opt=no
695 continue
696 ;;
697
698 -Xcompiler)
699 arg_mode=arg # the next one goes into the "base_compile" arg list
700 continue # The current "srcfile" will either be retained or
701 ;; # replaced later. I would guess that would be a bug.
702
703 -Wc,*)
704 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
705 lastarg=
706 save_ifs="$IFS"; IFS=','
707 for arg in $args; do
708 IFS="$save_ifs"
709
710 # Double-quote args containing other shell metacharacters.
711 # Many Bourne shells cannot handle close brackets correctly
712 # in scan sets, so we specify it separately.
713 case $arg in
714 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
715 arg="\"$arg\""
716 ;;
717 esac
718 lastarg="$lastarg $arg"
719 done
720 IFS="$save_ifs"
721 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
722
723 # Add the arguments to base_compile.
724 base_compile="$base_compile $lastarg"
725 continue
726 ;;
727
728 * )
729 # Accept the current argument as the source file.
730 # The previous "srcfile" becomes the current argument.
731 #
732 lastarg="$srcfile"
733 srcfile="$arg"
734 ;;
735 esac # case $arg
736 ;;
737 esac # case $arg_mode
738
739 # Aesthetically quote the previous argument.
740 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
741
742 case $lastarg in
743 # Double-quote args containing other shell metacharacters.
744 # Many Bourne shells cannot handle close brackets correctly
745 # in scan sets, and some SunOS ksh mistreat backslash-escaping
746 # in scan sets (worked around with variable expansion),
747 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
748 # at all, so we specify them separately.
749 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
750 lastarg="\"$lastarg\""
751 ;;
752 esac
753
754 base_compile="$base_compile $lastarg"
755 done # for arg
756
757 case $arg_mode in
758 arg)
759 $echo "$modename: you must specify an argument for -Xcompile"
760 exit $EXIT_FAILURE
761 ;;
762 target)
763 $echo "$modename: you must specify a target with \`-o'" 1>&2
764 exit $EXIT_FAILURE
765 ;;
766 *)
767 # Get the name of the library object.
768 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
769 ;;
770 esac
771
772 # Recognize several different file suffixes.
773 # If the user specifies -o file.o, it is replaced with file.lo
774 xform='[cCFSifmso]'
775 case $libobj in
776 *.ada) xform=ada ;;
777 *.adb) xform=adb ;;
778 *.ads) xform=ads ;;
779 *.asm) xform=asm ;;
780 *.c++) xform=c++ ;;
781 *.cc) xform=cc ;;
782 *.ii) xform=ii ;;
783 *.class) xform=class ;;
784 *.cpp) xform=cpp ;;
785 *.cxx) xform=cxx ;;
786 *.[fF][09]?) xform=[fF][09]. ;;
787 *.for) xform=for ;;
788 *.java) xform=java ;;
789 *.obj) xform=obj ;;
790 esac
791
792 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
793
794 case $libobj in
795 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
796 *)
797 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
798 exit $EXIT_FAILURE
799 ;;
800 esac
801
802 func_infer_tag $base_compile
803
804 for arg in $later; do
805 case $arg in
806 -static)
807 build_old_libs=yes
808 continue
809 ;;
810
811 -prefer-pic)
812 pic_mode=yes
813 continue
814 ;;
815
816 -prefer-non-pic)
817 pic_mode=no
818 continue
819 ;;
820 esac
821 done
822
823 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
824 case $qlibobj in
825 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
826 qlibobj="\"$qlibobj\"" ;;
827 esac
828 test "X$libobj" != "X$qlibobj" \
829 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
830 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
831 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
832 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
833 if test "X$xdir" = "X$obj"; then
834 xdir=
835 else
836 xdir=$xdir/
837 fi
838 lobj=${xdir}$objdir/$objname
839
840 if test -z "$base_compile"; then
841 $echo "$modename: you must specify a compilation command" 1>&2
842 $echo "$help" 1>&2
843 exit $EXIT_FAILURE
844 fi
845
846 # Delete any leftover library objects.
847 if test "$build_old_libs" = yes; then
848 removelist="$obj $lobj $libobj ${libobj}T"
849 else
850 removelist="$lobj $libobj ${libobj}T"
851 fi
852
853 $run $rm $removelist
854 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
855
856 # On Cygwin there's no "real" PIC flag so we must build both object types
857 case $host_os in
858 cygwin* | mingw* | pw32* | os2*)
859 pic_mode=default
860 ;;
861 esac
862 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
863 # non-PIC code in shared libraries is not supported
864 pic_mode=default
865 fi
866
867 # Calculate the filename of the output object if compiler does
868 # not support -o with -c
869 if test "$compiler_c_o" = no; then
870 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
871 lockfile="$output_obj.lock"
872 removelist="$removelist $output_obj $lockfile"
873 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
874 else
875 output_obj=
876 need_locks=no
877 lockfile=
878 fi
879
880 # Lock this critical section if it is needed
881 # We use this script file to make the link, it avoids creating a new file
882 if test "$need_locks" = yes; then
883 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
884 $show "Waiting for $lockfile to be removed"
885 sleep 2
886 done
887 elif test "$need_locks" = warn; then
888 if test -f "$lockfile"; then
889 $echo "\
890 *** ERROR, $lockfile exists and contains:
891 `cat $lockfile 2>/dev/null`
892
893 This indicates that another process is trying to use the same
894 temporary object file, and libtool could not work around it because
895 your compiler does not support \`-c' and \`-o' together. If you
896 repeat this compilation, it may succeed, by chance, but you had better
897 avoid parallel builds (make -j) in this platform, or get a better
898 compiler."
899
900 $run $rm $removelist
901 exit $EXIT_FAILURE
902 fi
903 $echo "$srcfile" > "$lockfile"
904 fi
905
906 if test -n "$fix_srcfile_path"; then
907 eval srcfile=\"$fix_srcfile_path\"
908 fi
909 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
910 case $qsrcfile in
911 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
912 qsrcfile="\"$qsrcfile\"" ;;
913 esac
914
915 $run $rm "$libobj" "${libobj}T"
916
917 # Create a libtool object file (analogous to a ".la" file),
918 # but don't create it if we're doing a dry run.
919 test -z "$run" && cat > ${libobj}T <<EOF
920 # $libobj - a libtool object file
921 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
922 #
923 # Please DO NOT delete this file!
924 # It is necessary for linking the library.
925
926 # Name of the PIC object.
927 EOF
928
929 # Only build a PIC object if we are building libtool libraries.
930 if test "$build_libtool_libs" = yes; then
931 # Without this assignment, base_compile gets emptied.
932 fbsd_hideous_sh_bug=$base_compile
933
934 if test "$pic_mode" != no; then
935 command="$base_compile $qsrcfile $pic_flag"
936 else
937 # Don't build PIC code
938 command="$base_compile $qsrcfile"
939 fi
940
941 if test ! -d "${xdir}$objdir"; then
942 $show "$mkdir ${xdir}$objdir"
943 $run $mkdir ${xdir}$objdir
944 exit_status=$?
945 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
946 exit $exit_status
947 fi
948 fi
949
950 if test -z "$output_obj"; then
951 # Place PIC objects in $objdir
952 command="$command -o $lobj"
953 fi
954
955 $run $rm "$lobj" "$output_obj"
956
957 $show "$command"
958 if $run eval "$command"; then :
959 else
960 test -n "$output_obj" && $run $rm $removelist
961 exit $EXIT_FAILURE
962 fi
963
964 if test "$need_locks" = warn &&
965 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
966 $echo "\
967 *** ERROR, $lockfile contains:
968 `cat $lockfile 2>/dev/null`
969
970 but it should contain:
971 $srcfile
972
973 This indicates that another process is trying to use the same
974 temporary object file, and libtool could not work around it because
975 your compiler does not support \`-c' and \`-o' together. If you
976 repeat this compilation, it may succeed, by chance, but you had better
977 avoid parallel builds (make -j) in this platform, or get a better
978 compiler."
979
980 $run $rm $removelist
981 exit $EXIT_FAILURE
982 fi
983
984 # Just move the object if needed, then go on to compile the next one
985 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
986 $show "$mv $output_obj $lobj"
987 if $run $mv $output_obj $lobj; then :
988 else
989 error=$?
990 $run $rm $removelist
991 exit $error
992 fi
993 fi
994
995 # Append the name of the PIC object to the libtool object file.
996 test -z "$run" && cat >> ${libobj}T <<EOF
997 pic_object='$objdir/$objname'
998
999 EOF
1000
1001 # Allow error messages only from the first compilation.
1002 if test "$suppress_opt" = yes; then
1003 suppress_output=' >/dev/null 2>&1'
1004 fi
1005 else
1006 # No PIC object so indicate it doesn't exist in the libtool
1007 # object file.
1008 test -z "$run" && cat >> ${libobj}T <<EOF
1009 pic_object=none
1010
1011 EOF
1012 fi
1013
1014 # Only build a position-dependent object if we build old libraries.
1015 if test "$build_old_libs" = yes; then
1016 if test "$pic_mode" != yes; then
1017 # Don't build PIC code
1018 command="$base_compile $qsrcfile"
1019 else
1020 command="$base_compile $qsrcfile $pic_flag"
1021 fi
1022 if test "$compiler_c_o" = yes; then
1023 command="$command -o $obj"
1024 fi
1025
1026 # Suppress compiler output if we already did a PIC compilation.
1027 command="$command$suppress_output"
1028 $run $rm "$obj" "$output_obj"
1029 $show "$command"
1030 if $run eval "$command"; then :
1031 else
1032 $run $rm $removelist
1033 exit $EXIT_FAILURE
1034 fi
1035
1036 if test "$need_locks" = warn &&
1037 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1038 $echo "\
1039 *** ERROR, $lockfile contains:
1040 `cat $lockfile 2>/dev/null`
1041
1042 but it should contain:
1043 $srcfile
1044
1045 This indicates that another process is trying to use the same
1046 temporary object file, and libtool could not work around it because
1047 your compiler does not support \`-c' and \`-o' together. If you
1048 repeat this compilation, it may succeed, by chance, but you had better
1049 avoid parallel builds (make -j) in this platform, or get a better
1050 compiler."
1051
1052 $run $rm $removelist
1053 exit $EXIT_FAILURE
1054 fi
1055
1056 # Just move the object if needed
1057 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1058 $show "$mv $output_obj $obj"
1059 if $run $mv $output_obj $obj; then :
1060 else
1061 error=$?
1062 $run $rm $removelist
1063 exit $error
1064 fi
1065 fi
1066
1067 # Append the name of the non-PIC object the libtool object file.
1068 # Only append if the libtool object file exists.
1069 test -z "$run" && cat >> ${libobj}T <<EOF
1070 # Name of the non-PIC object.
1071 non_pic_object='$objname'
1072
1073 EOF
1074 else
1075 # Append the name of the non-PIC object the libtool object file.
1076 # Only append if the libtool object file exists.
1077 test -z "$run" && cat >> ${libobj}T <<EOF
1078 # Name of the non-PIC object.
1079 non_pic_object=none
1080
1081 EOF
1082 fi
1083
1084 $run $mv "${libobj}T" "${libobj}"
1085
1086 # Unlock the critical section if it was locked
1087 if test "$need_locks" != no; then
1088 $run $rm "$lockfile"
1089 fi
1090
1091 exit $EXIT_SUCCESS
1092 ;;
1093
1094 # libtool link mode
1095 link | relink)
1096 modename="$modename: link"
1097 case $host in
1098 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1099 # It is impossible to link a dll without this setting, and
1100 # we shouldn't force the makefile maintainer to figure out
1101 # which system we are compiling for in order to pass an extra
1102 # flag for every libtool invocation.
1103 # allow_undefined=no
1104
1105 # FIXME: Unfortunately, there are problems with the above when trying
1106 # to make a dll which has undefined symbols, in which case not
1107 # even a static library is built. For now, we need to specify
1108 # -no-undefined on the libtool link line when we can be certain
1109 # that all symbols are satisfied, otherwise we get a static library.
1110 allow_undefined=yes
1111 ;;
1112 *)
1113 allow_undefined=yes
1114 ;;
1115 esac
1116 libtool_args="$nonopt"
1117 base_compile="$nonopt $@"
1118 compile_command="$nonopt"
1119 finalize_command="$nonopt"
1120
1121 compile_rpath=
1122 finalize_rpath=
1123 compile_shlibpath=
1124 finalize_shlibpath=
1125 convenience=
1126 old_convenience=
1127 deplibs=
1128 old_deplibs=
1129 compiler_flags=
1130 linker_flags=
1131 dllsearchpath=
1132 lib_search_path=`pwd`
1133 inst_prefix_dir=
1134
1135 avoid_version=no
1136 dlfiles=
1137 dlprefiles=
1138 dlself=no
1139 export_dynamic=no
1140 export_symbols=
1141 export_symbols_regex=
1142 generated=
1143 libobjs=
1144 ltlibs=
1145 module=no
1146 no_install=no
1147 objs=
1148 non_pic_objects=
1149 notinst_path= # paths that contain not-installed libtool libraries
1150 precious_files_regex=
1151 prefer_static_libs=no
1152 preload=no
1153 prev=
1154 prevarg=
1155 release=
1156 rpath=
1157 xrpath=
1158 perm_rpath=
1159 temp_rpath=
1160 thread_safe=no
1161 vinfo=
1162 vinfo_number=no
1163
1164 func_infer_tag $base_compile
1165
1166 # We need to know -static, to get the right output filenames.
1167 for arg
1168 do
1169 case $arg in
1170 -all-static | -static | -static-libtool-libs)
1171 case $arg in
1172 -all-static)
1173 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1174 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1175 fi
1176 if test -n "$link_static_flag"; then
1177 dlopen_self=$dlopen_self_static
1178 fi
1179 prefer_static_libs=yes
1180 ;;
1181 -static)
1182 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1183 dlopen_self=$dlopen_self_static
1184 fi
1185 prefer_static_libs=built
1186 ;;
1187 -static-libtool-libs)
1188 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1189 dlopen_self=$dlopen_self_static
1190 fi
1191 prefer_static_libs=yes
1192 ;;
1193 esac
1194 build_libtool_libs=no
1195 build_old_libs=yes
1196 break
1197 ;;
1198 esac
1199 done
1200
1201 # See if our shared archives depend on static archives.
1202 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1203
1204 # Go through the arguments, transforming them on the way.
1205 while test "$#" -gt 0; do
1206 arg="$1"
1207 shift
1208 case $arg in
1209 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1210 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1211 ;;
1212 *) qarg=$arg ;;
1213 esac
1214 libtool_args="$libtool_args $qarg"
1215
1216 # If the previous option needs an argument, assign it.
1217 if test -n "$prev"; then
1218 case $prev in
1219 output)
1220 compile_command="$compile_command @OUTPUT@"
1221 finalize_command="$finalize_command @OUTPUT@"
1222 ;;
1223 esac
1224
1225 case $prev in
1226 dlfiles|dlprefiles)
1227 if test "$preload" = no; then
1228 # Add the symbol object into the linking commands.
1229 compile_command="$compile_command @SYMFILE@"
1230 finalize_command="$finalize_command @SYMFILE@"
1231 preload=yes
1232 fi
1233 case $arg in
1234 *.la | *.lo) ;; # We handle these cases below.
1235 force)
1236 if test "$dlself" = no; then
1237 dlself=needless
1238 export_dynamic=yes
1239 fi
1240 prev=
1241 continue
1242 ;;
1243 self)
1244 if test "$prev" = dlprefiles; then
1245 dlself=yes
1246 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1247 dlself=yes
1248 else
1249 dlself=needless
1250 export_dynamic=yes
1251 fi
1252 prev=
1253 continue
1254 ;;
1255 *)
1256 if test "$prev" = dlfiles; then
1257 dlfiles="$dlfiles $arg"
1258 else
1259 dlprefiles="$dlprefiles $arg"
1260 fi
1261 prev=
1262 continue
1263 ;;
1264 esac
1265 ;;
1266 expsyms)
1267 export_symbols="$arg"
1268 if test ! -f "$arg"; then
1269 $echo "$modename: symbol file \`$arg' does not exist"
1270 exit $EXIT_FAILURE
1271 fi
1272 prev=
1273 continue
1274 ;;
1275 expsyms_regex)
1276 export_symbols_regex="$arg"
1277 prev=
1278 continue
1279 ;;
1280 inst_prefix)
1281 inst_prefix_dir="$arg"
1282 prev=
1283 continue
1284 ;;
1285 precious_regex)
1286 precious_files_regex="$arg"
1287 prev=
1288 continue
1289 ;;
1290 release)
1291 release="-$arg"
1292 prev=
1293 continue
1294 ;;
1295 objectlist)
1296 if test -f "$arg"; then
1297 save_arg=$arg
1298 moreargs=
1299 for fil in `cat $save_arg`
1300 do
1301 # moreargs="$moreargs $fil"
1302 arg=$fil
1303 # A libtool-controlled object.
1304
1305 # Check to see that this really is a libtool object.
1306 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1307 pic_object=
1308 non_pic_object=
1309
1310 # Read the .lo file
1311 # If there is no directory component, then add one.
1312 case $arg in
1313 */* | *\\*) . $arg ;;
1314 *) . ./$arg ;;
1315 esac
1316
1317 if test -z "$pic_object" || \
1318 test -z "$non_pic_object" ||
1319 test "$pic_object" = none && \
1320 test "$non_pic_object" = none; then
1321 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1322 exit $EXIT_FAILURE
1323 fi
1324
1325 # Extract subdirectory from the argument.
1326 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1327 if test "X$xdir" = "X$arg"; then
1328 xdir=
1329 else
1330 xdir="$xdir/"
1331 fi
1332
1333 if test "$pic_object" != none; then
1334 # Prepend the subdirectory the object is found in.
1335 pic_object="$xdir$pic_object"
1336
1337 if test "$prev" = dlfiles; then
1338 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1339 dlfiles="$dlfiles $pic_object"
1340 prev=
1341 continue
1342 else
1343 # If libtool objects are unsupported, then we need to preload.
1344 prev=dlprefiles
1345 fi
1346 fi
1347
1348 # CHECK ME: I think I busted this. -Ossama
1349 if test "$prev" = dlprefiles; then
1350 # Preload the old-style object.
1351 dlprefiles="$dlprefiles $pic_object"
1352 prev=
1353 fi
1354
1355 # A PIC object.
1356 libobjs="$libobjs $pic_object"
1357 arg="$pic_object"
1358 fi
1359
1360 # Non-PIC object.
1361 if test "$non_pic_object" != none; then
1362 # Prepend the subdirectory the object is found in.
1363 non_pic_object="$xdir$non_pic_object"
1364
1365 # A standard non-PIC object
1366 non_pic_objects="$non_pic_objects $non_pic_object"
1367 if test -z "$pic_object" || test "$pic_object" = none ; then
1368 arg="$non_pic_object"
1369 fi
1370 else
1371 # If the PIC object exists, use it instead.
1372 # $xdir was prepended to $pic_object above.
1373 non_pic_object="$pic_object"
1374 non_pic_objects="$non_pic_objects $non_pic_object"
1375 fi
1376 else
1377 # Only an error if not doing a dry-run.
1378 if test -z "$run"; then
1379 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1380 exit $EXIT_FAILURE
1381 else
1382 # Dry-run case.
1383
1384 # Extract subdirectory from the argument.
1385 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1386 if test "X$xdir" = "X$arg"; then
1387 xdir=
1388 else
1389 xdir="$xdir/"
1390 fi
1391
1392 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1393 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1394 libobjs="$libobjs $pic_object"
1395 non_pic_objects="$non_pic_objects $non_pic_object"
1396 fi
1397 fi
1398 done
1399 else
1400 $echo "$modename: link input file \`$save_arg' does not exist"
1401 exit $EXIT_FAILURE
1402 fi
1403 arg=$save_arg
1404 prev=
1405 continue
1406 ;;
1407 rpath | xrpath)
1408 # We need an absolute path.
1409 case $arg in
1410 [\\/]* | [A-Za-z]:[\\/]*) ;;
1411 *)
1412 $echo "$modename: only absolute run-paths are allowed" 1>&2
1413 exit $EXIT_FAILURE
1414 ;;
1415 esac
1416 if test "$prev" = rpath; then
1417 case "$rpath " in
1418 *" $arg "*) ;;
1419 *) rpath="$rpath $arg" ;;
1420 esac
1421 else
1422 case "$xrpath " in
1423 *" $arg "*) ;;
1424 *) xrpath="$xrpath $arg" ;;
1425 esac
1426 fi
1427 prev=
1428 continue
1429 ;;
1430 xcompiler)
1431 compiler_flags="$compiler_flags $qarg"
1432 prev=
1433 compile_command="$compile_command $qarg"
1434 finalize_command="$finalize_command $qarg"
1435 continue
1436 ;;
1437 xlinker)
1438 linker_flags="$linker_flags $qarg"
1439 compiler_flags="$compiler_flags $wl$qarg"
1440 prev=
1441 compile_command="$compile_command $wl$qarg"
1442 finalize_command="$finalize_command $wl$qarg"
1443 continue
1444 ;;
1445 xcclinker)
1446 linker_flags="$linker_flags $qarg"
1447 compiler_flags="$compiler_flags $qarg"
1448 prev=
1449 compile_command="$compile_command $qarg"
1450 finalize_command="$finalize_command $qarg"
1451 continue
1452 ;;
1453 shrext)
1454 shrext_cmds="$arg"
1455 prev=
1456 continue
1457 ;;
1458 darwin_framework|darwin_framework_skip)
1459 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1460 compile_command="$compile_command $arg"
1461 finalize_command="$finalize_command $arg"
1462 prev=
1463 continue
1464 ;;
1465 *)
1466 eval "$prev=\"\$arg\""
1467 prev=
1468 continue
1469 ;;
1470 esac
1471 fi # test -n "$prev"
1472
1473 prevarg="$arg"
1474
1475 case $arg in
1476 -all-static)
1477 if test -n "$link_static_flag"; then
1478 compile_command="$compile_command $link_static_flag"
1479 finalize_command="$finalize_command $link_static_flag"
1480 fi
1481 continue
1482 ;;
1483
1484 -allow-undefined)
1485 # FIXME: remove this flag sometime in the future.
1486 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1487 continue
1488 ;;
1489
1490 -avoid-version)
1491 avoid_version=yes
1492 continue
1493 ;;
1494
1495 -dlopen)
1496 prev=dlfiles
1497 continue
1498 ;;
1499
1500 -dlpreopen)
1501 prev=dlprefiles
1502 continue
1503 ;;
1504
1505 -export-dynamic)
1506 export_dynamic=yes
1507 continue
1508 ;;
1509
1510 -export-symbols | -export-symbols-regex)
1511 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1512 $echo "$modename: more than one -exported-symbols argument is not allowed"
1513 exit $EXIT_FAILURE
1514 fi
1515 if test "X$arg" = "X-export-symbols"; then
1516 prev=expsyms
1517 else
1518 prev=expsyms_regex
1519 fi
1520 continue
1521 ;;
1522
1523 -framework|-arch|-isysroot)
1524 case " $CC " in
1525 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1526 prev=darwin_framework_skip ;;
1527 *) compiler_flags="$compiler_flags $arg"
1528 prev=darwin_framework ;;
1529 esac
1530 compile_command="$compile_command $arg"
1531 finalize_command="$finalize_command $arg"
1532 continue
1533 ;;
1534
1535 -inst-prefix-dir)
1536 prev=inst_prefix
1537 continue
1538 ;;
1539
1540 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1541 # so, if we see these flags be careful not to treat them like -L
1542 -L[A-Z][A-Z]*:*)
1543 case $with_gcc/$host in
1544 no/*-*-irix* | /*-*-irix*)
1545 compile_command="$compile_command $arg"
1546 finalize_command="$finalize_command $arg"
1547 ;;
1548 esac
1549 continue
1550 ;;
1551
1552 -L*)
1553 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1554 # We need an absolute path.
1555 case $dir in
1556 [\\/]* | [A-Za-z]:[\\/]*) ;;
1557 *)
1558 absdir=`cd "$dir" && pwd`
1559 if test -z "$absdir"; then
1560 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1561 absdir="$dir"
1562 notinst_path="$notinst_path $dir"
1563 fi
1564 dir="$absdir"
1565 ;;
1566 esac
1567 case "$deplibs " in
1568 *" -L$dir "*) ;;
1569 *)
1570 deplibs="$deplibs -L$dir"
1571 lib_search_path="$lib_search_path $dir"
1572 ;;
1573 esac
1574 case $host in
1575 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1576 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1577 case :$dllsearchpath: in
1578 *":$dir:"*) ;;
1579 *) dllsearchpath="$dllsearchpath:$dir";;
1580 esac
1581 case :$dllsearchpath: in
1582 *":$testbindir:"*) ;;
1583 *) dllsearchpath="$dllsearchpath:$testbindir";;
1584 esac
1585 ;;
1586 esac
1587 continue
1588 ;;
1589
1590 -l*)
1591 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1592 case $host in
1593 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1594 # These systems don't actually have a C or math library (as such)
1595 continue
1596 ;;
1597 *-*-os2*)
1598 # These systems don't actually have a C library (as such)
1599 test "X$arg" = "X-lc" && continue
1600 ;;
1601 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1602 # Do not include libc due to us having libc/libc_r.
1603 test "X$arg" = "X-lc" && continue
1604 ;;
1605 *-*-rhapsody* | *-*-darwin1.[012])
1606 # Rhapsody C and math libraries are in the System framework
1607 deplibs="$deplibs -framework System"
1608 continue
1609 ;;
1610 *-*-sco3.2v5* | *-*-sco5v6*)
1611 # Causes problems with __ctype
1612 test "X$arg" = "X-lc" && continue
1613 ;;
1614 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1615 # Compiler inserts libc in the correct place for threads to work
1616 test "X$arg" = "X-lc" && continue
1617 ;;
1618 esac
1619 elif test "X$arg" = "X-lc_r"; then
1620 case $host in
1621 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1622 # Do not include libc_r directly, use -pthread flag.
1623 continue
1624 ;;
1625 esac
1626 fi
1627 deplibs="$deplibs $arg"
1628 continue
1629 ;;
1630
1631 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1632 # classes, name mangling, and exception handling.
1633 -model)
1634 compile_command="$compile_command $arg"
1635 compiler_flags="$compiler_flags $arg"
1636 finalize_command="$finalize_command $arg"
1637 prev=xcompiler
1638 continue
1639 ;;
1640
1641 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1642 compiler_flags="$compiler_flags $arg"
1643 compile_command="$compile_command $arg"
1644 finalize_command="$finalize_command $arg"
1645 continue
1646 ;;
1647
1648 -module)
1649 module=yes
1650 continue
1651 ;;
1652
1653 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1654 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1655 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1656 # +DA*, +DD* enable 64-bit mode on the HP compiler
1657 # -q* pass through compiler args for the IBM compiler
1658 # -m* pass through architecture-specific compiler args for GCC
1659 # -m*, -t[45]*, -txscale* pass through architecture-specific
1660 # compiler args for GCC
1661 # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
1662 # -F/path gives path to uninstalled frameworks, gcc on darwin
1663 # @file GCC response files
1664 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
1665 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
1666
1667 # Unknown arguments in both finalize_command and compile_command need
1668 # to be aesthetically quoted because they are evaled later.
1669 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1670 case $arg in
1671 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1672 arg="\"$arg\""
1673 ;;
1674 esac
1675 compile_command="$compile_command $arg"
1676 finalize_command="$finalize_command $arg"
1677 compiler_flags="$compiler_flags $arg"
1678 continue
1679 ;;
1680
1681 -shrext)
1682 prev=shrext
1683 continue
1684 ;;
1685
1686 -no-fast-install)
1687 fast_install=no
1688 continue
1689 ;;
1690
1691 -no-install)
1692 case $host in
1693 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
1694 # The PATH hackery in wrapper scripts is required on Windows
1695 # and Darwin in order for the loader to find any dlls it needs.
1696 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1697 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1698 fast_install=no
1699 ;;
1700 *) no_install=yes ;;
1701 esac
1702 continue
1703 ;;
1704
1705 -no-undefined)
1706 allow_undefined=no
1707 continue
1708 ;;
1709
1710 -objectlist)
1711 prev=objectlist
1712 continue
1713 ;;
1714
1715 -o) prev=output ;;
1716
1717 -precious-files-regex)
1718 prev=precious_regex
1719 continue
1720 ;;
1721
1722 -release)
1723 prev=release
1724 continue
1725 ;;
1726
1727 -rpath)
1728 prev=rpath
1729 continue
1730 ;;
1731
1732 -R)
1733 prev=xrpath
1734 continue
1735 ;;
1736
1737 -R*)
1738 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1739 # We need an absolute path.
1740 case $dir in
1741 [\\/]* | [A-Za-z]:[\\/]*) ;;
1742 *)
1743 $echo "$modename: only absolute run-paths are allowed" 1>&2
1744 exit $EXIT_FAILURE
1745 ;;
1746 esac
1747 case "$xrpath " in
1748 *" $dir "*) ;;
1749 *) xrpath="$xrpath $dir" ;;
1750 esac
1751 continue
1752 ;;
1753
1754 -static | -static-libtool-libs)
1755 # The effects of -static are defined in a previous loop.
1756 # We used to do the same as -all-static on platforms that
1757 # didn't have a PIC flag, but the assumption that the effects
1758 # would be equivalent was wrong. It would break on at least
1759 # Digital Unix and AIX.
1760 continue
1761 ;;
1762
1763 -thread-safe)
1764 thread_safe=yes
1765 continue
1766 ;;
1767
1768 -version-info)
1769 prev=vinfo
1770 continue
1771 ;;
1772 -version-number)
1773 prev=vinfo
1774 vinfo_number=yes
1775 continue
1776 ;;
1777
1778 -Wc,*)
1779 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1780 arg=
1781 save_ifs="$IFS"; IFS=','
1782 for flag in $args; do
1783 IFS="$save_ifs"
1784 case $flag in
1785 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1786 flag="\"$flag\""
1787 ;;
1788 esac
1789 arg="$arg $wl$flag"
1790 compiler_flags="$compiler_flags $flag"
1791 done
1792 IFS="$save_ifs"
1793 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1794 ;;
1795
1796 -Wl,*)
1797 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1798 arg=
1799 save_ifs="$IFS"; IFS=','
1800 for flag in $args; do
1801 IFS="$save_ifs"
1802 case $flag in
1803 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1804 flag="\"$flag\""
1805 ;;
1806 esac
1807 arg="$arg $wl$flag"
1808 compiler_flags="$compiler_flags $wl$flag"
1809 linker_flags="$linker_flags $flag"
1810 done
1811 IFS="$save_ifs"
1812 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1813 ;;
1814
1815 -Xcompiler)
1816 prev=xcompiler
1817 continue
1818 ;;
1819
1820 -Xlinker)
1821 prev=xlinker
1822 continue
1823 ;;
1824
1825 -XCClinker)
1826 prev=xcclinker
1827 continue
1828 ;;
1829
1830 # Some other compiler flag.
1831 -* | +*)
1832 # Unknown arguments in both finalize_command and compile_command need
1833 # to be aesthetically quoted because they are evaled later.
1834 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1835 case $arg in
1836 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1837 arg="\"$arg\""
1838 ;;
1839 esac
1840 ;;
1841
1842 *.$objext)
1843 # A standard object.
1844 objs="$objs $arg"
1845 ;;
1846
1847 *.lo)
1848 # A libtool-controlled object.
1849
1850 # Check to see that this really is a libtool object.
1851 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1852 pic_object=
1853 non_pic_object=
1854
1855 # Read the .lo file
1856 # If there is no directory component, then add one.
1857 case $arg in
1858 */* | *\\*) . $arg ;;
1859 *) . ./$arg ;;
1860 esac
1861
1862 if test -z "$pic_object" || \
1863 test -z "$non_pic_object" ||
1864 test "$pic_object" = none && \
1865 test "$non_pic_object" = none; then
1866 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1867 exit $EXIT_FAILURE
1868 fi
1869
1870 # Extract subdirectory from the argument.
1871 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1872 if test "X$xdir" = "X$arg"; then
1873 xdir=
1874 else
1875 xdir="$xdir/"
1876 fi
1877
1878 if test "$pic_object" != none; then
1879 # Prepend the subdirectory the object is found in.
1880 pic_object="$xdir$pic_object"
1881
1882 if test "$prev" = dlfiles; then
1883 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1884 dlfiles="$dlfiles $pic_object"
1885 prev=
1886 continue
1887 else
1888 # If libtool objects are unsupported, then we need to preload.
1889 prev=dlprefiles
1890 fi
1891 fi
1892
1893 # CHECK ME: I think I busted this. -Ossama
1894 if test "$prev" = dlprefiles; then
1895 # Preload the old-style object.
1896 dlprefiles="$dlprefiles $pic_object"
1897 prev=
1898 fi
1899
1900 # A PIC object.
1901 libobjs="$libobjs $pic_object"
1902 arg="$pic_object"
1903 fi
1904
1905 # Non-PIC object.
1906 if test "$non_pic_object" != none; then
1907 # Prepend the subdirectory the object is found in.
1908 non_pic_object="$xdir$non_pic_object"
1909
1910 # A standard non-PIC object
1911 non_pic_objects="$non_pic_objects $non_pic_object"
1912 if test -z "$pic_object" || test "$pic_object" = none ; then
1913 arg="$non_pic_object"
1914 fi
1915 else
1916 # If the PIC object exists, use it instead.
1917 # $xdir was prepended to $pic_object above.
1918 non_pic_object="$pic_object"
1919 non_pic_objects="$non_pic_objects $non_pic_object"
1920 fi
1921 else
1922 # Only an error if not doing a dry-run.
1923 if test -z "$run"; then
1924 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1925 exit $EXIT_FAILURE
1926 else
1927 # Dry-run case.
1928
1929 # Extract subdirectory from the argument.
1930 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1931 if test "X$xdir" = "X$arg"; then
1932 xdir=
1933 else
1934 xdir="$xdir/"
1935 fi
1936
1937 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1938 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1939 libobjs="$libobjs $pic_object"
1940 non_pic_objects="$non_pic_objects $non_pic_object"
1941 fi
1942 fi
1943 ;;
1944
1945 *.$libext)
1946 # An archive.
1947 deplibs="$deplibs $arg"
1948 old_deplibs="$old_deplibs $arg"
1949 continue
1950 ;;
1951
1952 *.la)
1953 # A libtool-controlled library.
1954
1955 if test "$prev" = dlfiles; then
1956 # This library was specified with -dlopen.
1957 dlfiles="$dlfiles $arg"
1958 prev=
1959 elif test "$prev" = dlprefiles; then
1960 # The library was specified with -dlpreopen.
1961 dlprefiles="$dlprefiles $arg"
1962 prev=
1963 else
1964 deplibs="$deplibs $arg"
1965 fi
1966 continue
1967 ;;
1968
1969 # Some other compiler argument.
1970 *)
1971 # Unknown arguments in both finalize_command and compile_command need
1972 # to be aesthetically quoted because they are evaled later.
1973 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1974 case $arg in
1975 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1976 arg="\"$arg\""
1977 ;;
1978 esac
1979 ;;
1980 esac # arg
1981
1982 # Now actually substitute the argument into the commands.
1983 if test -n "$arg"; then
1984 compile_command="$compile_command $arg"
1985 finalize_command="$finalize_command $arg"
1986 fi
1987 done # argument parsing loop
1988
1989 if test -n "$prev"; then
1990 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1991 $echo "$help" 1>&2
1992 exit $EXIT_FAILURE
1993 fi
1994
1995 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1996 eval arg=\"$export_dynamic_flag_spec\"
1997 compile_command="$compile_command $arg"
1998 finalize_command="$finalize_command $arg"
1999 fi
2000
2001 oldlibs=
2002 # calculate the name of the file, without its directory
2003 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2004 libobjs_save="$libobjs"
2005
2006 if test -n "$shlibpath_var"; then
2007 # get the directories listed in $shlibpath_var
2008 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2009 else
2010 shlib_search_path=
2011 fi
2012 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2013 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2014
2015 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2016 if test "X$output_objdir" = "X$output"; then
2017 output_objdir="$objdir"
2018 else
2019 output_objdir="$output_objdir/$objdir"
2020 fi
2021 # Create the object directory.
2022 if test ! -d "$output_objdir"; then
2023 $show "$mkdir $output_objdir"
2024 $run $mkdir $output_objdir
2025 exit_status=$?
2026 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2027 exit $exit_status
2028 fi
2029 fi
2030
2031 # Determine the type of output
2032 case $output in
2033 "")
2034 $echo "$modename: you must specify an output file" 1>&2
2035 $echo "$help" 1>&2
2036 exit $EXIT_FAILURE
2037 ;;
2038 *.$libext) linkmode=oldlib ;;
2039 *.lo | *.$objext) linkmode=obj ;;
2040 *.la) linkmode=lib ;;
2041 *) linkmode=prog ;; # Anything else should be a program.
2042 esac
2043
2044 case $host in
2045 *cygwin* | *mingw* | *pw32*)
2046 # don't eliminate duplications in $postdeps and $predeps
2047 duplicate_compiler_generated_deps=yes
2048 ;;
2049 *)
2050 duplicate_compiler_generated_deps=$duplicate_deps
2051 ;;
2052 esac
2053 specialdeplibs=
2054
2055 libs=
2056 # Find all interdependent deplibs by searching for libraries
2057 # that are linked more than once (e.g. -la -lb -la)
2058 for deplib in $deplibs; do
2059 if test "X$duplicate_deps" = "Xyes" ; then
2060 case "$libs " in
2061 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2062 esac
2063 fi
2064 libs="$libs $deplib"
2065 done
2066
2067 if test "$linkmode" = lib; then
2068 libs="$predeps $libs $compiler_lib_search_path $postdeps"
2069
2070 # Compute libraries that are listed more than once in $predeps
2071 # $postdeps and mark them as special (i.e., whose duplicates are
2072 # not to be eliminated).
2073 pre_post_deps=
2074 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2075 for pre_post_dep in $predeps $postdeps; do
2076 case "$pre_post_deps " in
2077 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2078 esac
2079 pre_post_deps="$pre_post_deps $pre_post_dep"
2080 done
2081 fi
2082 pre_post_deps=
2083 fi
2084
2085 deplibs=
2086 newdependency_libs=
2087 newlib_search_path=
2088 need_relink=no # whether we're linking any uninstalled libtool libraries
2089 notinst_deplibs= # not-installed libtool libraries
2090 case $linkmode in
2091 lib)
2092 passes="conv link"
2093 for file in $dlfiles $dlprefiles; do
2094 case $file in
2095 *.la) ;;
2096 *)
2097 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2098 exit $EXIT_FAILURE
2099 ;;
2100 esac
2101 done
2102 ;;
2103 prog)
2104 compile_deplibs=
2105 finalize_deplibs=
2106 alldeplibs=no
2107 newdlfiles=
2108 newdlprefiles=
2109 passes="conv scan dlopen dlpreopen link"
2110 ;;
2111 *) passes="conv"
2112 ;;
2113 esac
2114 for pass in $passes; do
2115 if test "$linkmode,$pass" = "lib,link" ||
2116 test "$linkmode,$pass" = "prog,scan"; then
2117 libs="$deplibs"
2118 deplibs=
2119 fi
2120 if test "$linkmode" = prog; then
2121 case $pass in
2122 dlopen) libs="$dlfiles" ;;
2123 dlpreopen) libs="$dlprefiles" ;;
2124 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
2125 esac
2126 fi
2127 if test "$pass" = dlopen; then
2128 # Collect dlpreopened libraries
2129 save_deplibs="$deplibs"
2130 deplibs=
2131 fi
2132 for deplib in $libs; do
2133 lib=
2134 found=no
2135 case $deplib in
2136 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2137 if test "$linkmode,$pass" = "prog,link"; then
2138 compile_deplibs="$deplib $compile_deplibs"
2139 finalize_deplibs="$deplib $finalize_deplibs"
2140 else
2141 compiler_flags="$compiler_flags $deplib"
2142 fi
2143 continue
2144 ;;
2145 -l*)
2146 if test "$linkmode" != lib && test "$linkmode" != prog; then
2147 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2148 continue
2149 fi
2150 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2151 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2152 for search_ext in .la $std_shrext .so .a; do
2153 # Search the libtool library
2154 lib="$searchdir/lib${name}${search_ext}"
2155 if test -f "$lib"; then
2156 if test "$search_ext" = ".la"; then
2157 found=yes
2158 else
2159 found=no
2160 fi
2161 break 2
2162 fi
2163 done
2164 done
2165 if test "$found" != yes; then
2166 # deplib doesn't seem to be a libtool library
2167 if test "$linkmode,$pass" = "prog,link"; then
2168 compile_deplibs="$deplib $compile_deplibs"
2169 finalize_deplibs="$deplib $finalize_deplibs"
2170 else
2171 deplibs="$deplib $deplibs"
2172 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2173 fi
2174 continue
2175 else # deplib is a libtool library
2176 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2177 # We need to do some special things here, and not later.
2178 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2179 case " $predeps $postdeps " in
2180 *" $deplib "*)
2181 if (${SED} -e '2q' $lib |
2182 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2183 library_names=
2184 old_library=
2185 case $lib in
2186 */* | *\\*) . $lib ;;
2187 *) . ./$lib ;;
2188 esac
2189 for l in $old_library $library_names; do
2190 ll="$l"
2191 done
2192 if test "X$ll" = "X$old_library" ; then # only static version available
2193 found=no
2194 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2195 test "X$ladir" = "X$lib" && ladir="."
2196 lib=$ladir/$old_library
2197 if test "$linkmode,$pass" = "prog,link"; then
2198 compile_deplibs="$deplib $compile_deplibs"
2199 finalize_deplibs="$deplib $finalize_deplibs"
2200 else
2201 deplibs="$deplib $deplibs"
2202 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2203 fi
2204 continue
2205 fi
2206 fi
2207 ;;
2208 *) ;;
2209 esac
2210 fi
2211 fi
2212 ;; # -l
2213 -L*)
2214 case $linkmode in
2215 lib)
2216 deplibs="$deplib $deplibs"
2217 test "$pass" = conv && continue
2218 newdependency_libs="$deplib $newdependency_libs"
2219 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2220 ;;
2221 prog)
2222 if test "$pass" = conv; then
2223 deplibs="$deplib $deplibs"
2224 continue
2225 fi
2226 if test "$pass" = scan; then
2227 deplibs="$deplib $deplibs"
2228 else
2229 compile_deplibs="$deplib $compile_deplibs"
2230 finalize_deplibs="$deplib $finalize_deplibs"
2231 fi
2232 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2233 ;;
2234 *)
2235 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2236 ;;
2237 esac # linkmode
2238 continue
2239 ;; # -L
2240 -R*)
2241 if test "$pass" = link; then
2242 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2243 # Make sure the xrpath contains only unique directories.
2244 case "$xrpath " in
2245 *" $dir "*) ;;
2246 *) xrpath="$xrpath $dir" ;;
2247 esac
2248 fi
2249 deplibs="$deplib $deplibs"
2250 continue
2251 ;;
2252 *.la) lib="$deplib" ;;
2253 *.$libext)
2254 if test "$pass" = conv; then
2255 deplibs="$deplib $deplibs"
2256 continue
2257 fi
2258 case $linkmode in
2259 lib)
2260 valid_a_lib=no
2261 case $deplibs_check_method in
2262 match_pattern*)
2263 set dummy $deplibs_check_method
2264 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2265 if eval $echo \"$deplib\" 2>/dev/null \
2266 | $SED 10q \
2267 | $EGREP "$match_pattern_regex" > /dev/null; then
2268 valid_a_lib=yes
2269 fi
2270 ;;
2271 pass_all)
2272 valid_a_lib=yes
2273 ;;
2274 esac
2275 if test "$valid_a_lib" != yes; then
2276 $echo
2277 $echo "*** Warning: Trying to link with static lib archive $deplib."
2278 $echo "*** I have the capability to make that library automatically link in when"
2279 $echo "*** you link to this library. But I can only do this if you have a"
2280 $echo "*** shared version of the library, which you do not appear to have"
2281 $echo "*** because the file extensions .$libext of this argument makes me believe"
2282 $echo "*** that it is just a static archive that I should not used here."
2283 else
2284 $echo
2285 $echo "*** Warning: Linking the shared library $output against the"
2286 $echo "*** static library $deplib is not portable!"
2287 deplibs="$deplib $deplibs"
2288 fi
2289 continue
2290 ;;
2291 prog)
2292 if test "$pass" != link; then
2293 deplibs="$deplib $deplibs"
2294 else
2295 compile_deplibs="$deplib $compile_deplibs"
2296 finalize_deplibs="$deplib $finalize_deplibs"
2297 fi
2298 continue
2299 ;;
2300 esac # linkmode
2301 ;; # *.$libext
2302 *.lo | *.$objext)
2303 if test "$pass" = conv; then
2304 deplibs="$deplib $deplibs"
2305 elif test "$linkmode" = prog; then
2306 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2307 # If there is no dlopen support or we're linking statically,
2308 # we need to preload.
2309 newdlprefiles="$newdlprefiles $deplib"
2310 compile_deplibs="$deplib $compile_deplibs"
2311 finalize_deplibs="$deplib $finalize_deplibs"
2312 else
2313 newdlfiles="$newdlfiles $deplib"
2314 fi
2315 fi
2316 continue
2317 ;;
2318 %DEPLIBS%)
2319 alldeplibs=yes
2320 continue
2321 ;;
2322 esac # case $deplib
2323 if test "$found" = yes || test -f "$lib"; then :
2324 else
2325 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2326 exit $EXIT_FAILURE
2327 fi
2328
2329 # Check to see that this really is a libtool archive.
2330 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2331 else
2332 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2333 exit $EXIT_FAILURE
2334 fi
2335
2336 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2337 test "X$ladir" = "X$lib" && ladir="."
2338
2339 dlname=
2340 dlopen=
2341 dlpreopen=
2342 libdir=
2343 library_names=
2344 old_library=
2345 # If the library was installed with an old release of libtool,
2346 # it will not redefine variables installed, or shouldnotlink
2347 installed=yes
2348 shouldnotlink=no
2349 avoidtemprpath=
2350
2351
2352 # Read the .la file
2353 case $lib in
2354 */* | *\\*) . $lib ;;
2355 *) . ./$lib ;;
2356 esac
2357
2358 if test "$linkmode,$pass" = "lib,link" ||
2359 test "$linkmode,$pass" = "prog,scan" ||
2360 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2361 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2362 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2363 fi
2364
2365 if test "$pass" = conv; then
2366 # Only check for convenience libraries
2367 deplibs="$lib $deplibs"
2368 if test -z "$libdir"; then
2369 if test -z "$old_library"; then
2370 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2371 exit $EXIT_FAILURE
2372 fi
2373 # It is a libtool convenience library, so add in its objects.
2374 convenience="$convenience $ladir/$objdir/$old_library"
2375 old_convenience="$old_convenience $ladir/$objdir/$old_library"
2376 tmp_libs=
2377 for deplib in $dependency_libs; do
2378 deplibs="$deplib $deplibs"
2379 if test "X$duplicate_deps" = "Xyes" ; then
2380 case "$tmp_libs " in
2381 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2382 esac
2383 fi
2384 tmp_libs="$tmp_libs $deplib"
2385 done
2386 elif test "$linkmode" != prog && test "$linkmode" != lib; then
2387 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2388 exit $EXIT_FAILURE
2389 fi
2390 continue
2391 fi # $pass = conv
2392
2393
2394 # Get the name of the library we link against.
2395 linklib=
2396 for l in $old_library $library_names; do
2397 linklib="$l"
2398 done
2399 if test -z "$linklib"; then
2400 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2401 exit $EXIT_FAILURE
2402 fi
2403
2404 # This library was specified with -dlopen.
2405 if test "$pass" = dlopen; then
2406 if test -z "$libdir"; then
2407 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2408 exit $EXIT_FAILURE
2409 fi
2410 if test -z "$dlname" ||
2411 test "$dlopen_support" != yes ||
2412 test "$build_libtool_libs" = no; then
2413 # If there is no dlname, no dlopen support or we're linking
2414 # statically, we need to preload. We also need to preload any
2415 # dependent libraries so libltdl's deplib preloader doesn't
2416 # bomb out in the load deplibs phase.
2417 dlprefiles="$dlprefiles $lib $dependency_libs"
2418 else
2419 newdlfiles="$newdlfiles $lib"
2420 fi
2421 continue
2422 fi # $pass = dlopen
2423
2424 # We need an absolute path.
2425 case $ladir in
2426 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2427 *)
2428 abs_ladir=`cd "$ladir" && pwd`
2429 if test -z "$abs_ladir"; then
2430 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2431 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2432 abs_ladir="$ladir"
2433 fi
2434 ;;
2435 esac
2436 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2437
2438 # Find the relevant object directory and library name.
2439 if test "X$installed" = Xyes; then
2440 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2441 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2442 dir="$ladir"
2443 absdir="$abs_ladir"
2444 libdir="$abs_ladir"
2445 else
2446 dir="$libdir"
2447 absdir="$libdir"
2448 fi
2449 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2450 else
2451 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2452 dir="$ladir"
2453 absdir="$abs_ladir"
2454 # Remove this search path later
2455 notinst_path="$notinst_path $abs_ladir"
2456 else
2457 dir="$ladir/$objdir"
2458 absdir="$abs_ladir/$objdir"
2459 # Remove this search path later
2460 notinst_path="$notinst_path $abs_ladir"
2461 fi
2462 fi # $installed = yes
2463 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2464
2465 # This library was specified with -dlpreopen.
2466 if test "$pass" = dlpreopen; then
2467 if test -z "$libdir"; then
2468 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2469 exit $EXIT_FAILURE
2470 fi
2471 # Prefer using a static library (so that no silly _DYNAMIC symbols
2472 # are required to link).
2473 if test -n "$old_library"; then
2474 newdlprefiles="$newdlprefiles $dir/$old_library"
2475 # Otherwise, use the dlname, so that lt_dlopen finds it.
2476 elif test -n "$dlname"; then
2477 newdlprefiles="$newdlprefiles $dir/$dlname"
2478 else
2479 newdlprefiles="$newdlprefiles $dir/$linklib"
2480 fi
2481 fi # $pass = dlpreopen
2482
2483 if test -z "$libdir"; then
2484 # Link the convenience library
2485 if test "$linkmode" = lib; then
2486 deplibs="$dir/$old_library $deplibs"
2487 elif test "$linkmode,$pass" = "prog,link"; then
2488 compile_deplibs="$dir/$old_library $compile_deplibs"
2489 finalize_deplibs="$dir/$old_library $finalize_deplibs"
2490 else
2491 deplibs="$lib $deplibs" # used for prog,scan pass
2492 fi
2493 continue
2494 fi
2495
2496
2497 if test "$linkmode" = prog && test "$pass" != link; then
2498 newlib_search_path="$newlib_search_path $ladir"
2499 deplibs="$lib $deplibs"
2500
2501 linkalldeplibs=no
2502 if test "$link_all_deplibs" != no || test -z "$library_names" ||
2503 test "$build_libtool_libs" = no; then
2504 linkalldeplibs=yes
2505 fi
2506
2507 tmp_libs=
2508 for deplib in $dependency_libs; do
2509 case $deplib in
2510 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2511 esac
2512 # Need to link against all dependency_libs?
2513 if test "$linkalldeplibs" = yes; then
2514 deplibs="$deplib $deplibs"
2515 else
2516 # Need to hardcode shared library paths
2517 # or/and link against static libraries
2518 newdependency_libs="$deplib $newdependency_libs"
2519 fi
2520 if test "X$duplicate_deps" = "Xyes" ; then
2521 case "$tmp_libs " in
2522 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2523 esac
2524 fi
2525 tmp_libs="$tmp_libs $deplib"
2526 done # for deplib
2527 continue
2528 fi # $linkmode = prog...
2529
2530 if test "$linkmode,$pass" = "prog,link"; then
2531 if test -n "$library_names" &&
2532 { { test "$prefer_static_libs" = no ||
2533 test "$prefer_static_libs,$installed" = "built,yes"; } ||
2534 test -z "$old_library"; }; then
2535 # We need to hardcode the library path
2536 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2537 # Make sure the rpath contains only unique directories.
2538 case "$temp_rpath " in
2539 *" $dir "*) ;;
2540 *" $absdir "*) ;;
2541 *) temp_rpath="$temp_rpath $absdir" ;;
2542 esac
2543 fi
2544
2545 # Hardcode the library path.
2546 # Skip directories that are in the system default run-time
2547 # search path.
2548 case " $sys_lib_dlsearch_path " in
2549 *" $absdir "*) ;;
2550 *)
2551 case "$compile_rpath " in
2552 *" $absdir "*) ;;
2553 *) compile_rpath="$compile_rpath $absdir"
2554 esac
2555 ;;
2556 esac
2557 case " $sys_lib_dlsearch_path " in
2558 *" $libdir "*) ;;
2559 *)
2560 case "$finalize_rpath " in
2561 *" $libdir "*) ;;
2562 *) finalize_rpath="$finalize_rpath $libdir"
2563 esac
2564 ;;
2565 esac
2566 fi # $linkmode,$pass = prog,link...
2567
2568 if test "$alldeplibs" = yes &&
2569 { test "$deplibs_check_method" = pass_all ||
2570 { test "$build_libtool_libs" = yes &&
2571 test -n "$library_names"; }; }; then
2572 # We only need to search for static libraries
2573 continue
2574 fi
2575 fi
2576
2577 link_static=no # Whether the deplib will be linked statically
2578 use_static_libs=$prefer_static_libs
2579 if test "$use_static_libs" = built && test "$installed" = yes ; then
2580 use_static_libs=no
2581 fi
2582 if test -n "$library_names" &&
2583 { test "$use_static_libs" = no || test -z "$old_library"; }; then
2584 if test "$installed" = no; then
2585 notinst_deplibs="$notinst_deplibs $lib"
2586 need_relink=yes
2587 fi
2588 # This is a shared library
2589
2590 # Warn about portability, can't link against -module's on
2591 # some systems (darwin)
2592 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2593 $echo
2594 if test "$linkmode" = prog; then
2595 $echo "*** Warning: Linking the executable $output against the loadable module"
2596 else
2597 $echo "*** Warning: Linking the shared library $output against the loadable module"
2598 fi
2599 $echo "*** $linklib is not portable!"
2600 fi
2601 if test "$linkmode" = lib &&
2602 test "$hardcode_into_libs" = yes; then
2603 # Hardcode the library path.
2604 # Skip directories that are in the system default run-time
2605 # search path.
2606 case " $sys_lib_dlsearch_path " in
2607 *" $absdir "*) ;;
2608 *)
2609 case "$compile_rpath " in
2610 *" $absdir "*) ;;
2611 *) compile_rpath="$compile_rpath $absdir"
2612 esac
2613 ;;
2614 esac
2615 case " $sys_lib_dlsearch_path " in
2616 *" $libdir "*) ;;
2617 *)
2618 case "$finalize_rpath " in
2619 *" $libdir "*) ;;
2620 *) finalize_rpath="$finalize_rpath $libdir"
2621 esac
2622 ;;
2623 esac
2624 fi
2625
2626 if test -n "$old_archive_from_expsyms_cmds"; then
2627 # figure out the soname
2628 set dummy $library_names
2629 realname="$2"
2630 shift; shift
2631 libname=`eval \\$echo \"$libname_spec\"`
2632 # use dlname if we got it. it's perfectly good, no?
2633 if test -n "$dlname"; then
2634 soname="$dlname"
2635 elif test -n "$soname_spec"; then
2636 # bleh windows
2637 case $host in
2638 *cygwin* | mingw*)
2639 major=`expr $current - $age`
2640 versuffix="-$major"
2641 ;;
2642 esac
2643 eval soname=\"$soname_spec\"
2644 else
2645 soname="$realname"
2646 fi
2647
2648 # Make a new name for the extract_expsyms_cmds to use
2649 soroot="$soname"
2650 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2651 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2652
2653 # If the library has no export list, then create one now
2654 if test -f "$output_objdir/$soname-def"; then :
2655 else
2656 $show "extracting exported symbol list from \`$soname'"
2657 save_ifs="$IFS"; IFS='~'
2658 cmds=$extract_expsyms_cmds
2659 for cmd in $cmds; do
2660 IFS="$save_ifs"
2661 eval cmd=\"$cmd\"
2662 $show "$cmd"
2663 $run eval "$cmd" || exit $?
2664 done
2665 IFS="$save_ifs"
2666 fi
2667
2668 # Create $newlib
2669 if test -f "$output_objdir/$newlib"; then :; else
2670 $show "generating import library for \`$soname'"
2671 save_ifs="$IFS"; IFS='~'
2672 cmds=$old_archive_from_expsyms_cmds
2673 for cmd in $cmds; do
2674 IFS="$save_ifs"
2675 eval cmd=\"$cmd\"
2676 $show "$cmd"
2677 $run eval "$cmd" || exit $?
2678 done
2679 IFS="$save_ifs"
2680 fi
2681 # make sure the library variables are pointing to the new library
2682 dir=$output_objdir
2683 linklib=$newlib
2684 fi # test -n "$old_archive_from_expsyms_cmds"
2685
2686 if test "$linkmode" = prog || test "$mode" != relink; then
2687 add_shlibpath=
2688 add_dir=
2689 add=
2690 lib_linked=yes
2691 case $hardcode_action in
2692 immediate | unsupported)
2693 if test "$hardcode_direct" = no; then
2694 add="$dir/$linklib"
2695 case $host in
2696 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
2697 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
2698 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
2699 *-*-unixware7*) add_dir="-L$dir" ;;
2700 *-*-darwin* )
2701 # if the lib is a module then we can not link against
2702 # it, someone is ignoring the new warnings I added
2703 if /usr/bin/file -L $add 2> /dev/null |
2704 $EGREP ": [^:]* bundle" >/dev/null ; then
2705 $echo "** Warning, lib $linklib is a module, not a shared library"
2706 if test -z "$old_library" ; then
2707 $echo
2708 $echo "** And there doesn't seem to be a static archive available"
2709 $echo "** The link will probably fail, sorry"
2710 else
2711 add="$dir/$old_library"
2712 fi
2713 fi
2714 esac
2715 elif test "$hardcode_minus_L" = no; then
2716 case $host in
2717 *-*-sunos*) add_shlibpath="$dir" ;;
2718 esac
2719 add_dir="-L$dir"
2720 add="-l$name"
2721 elif test "$hardcode_shlibpath_var" = no; then
2722 add_shlibpath="$dir"
2723 add="-l$name"
2724 else
2725 lib_linked=no
2726 fi
2727 ;;
2728 relink)
2729 if test "$hardcode_direct" = yes; then
2730 add="$dir/$linklib"
2731 elif test "$hardcode_minus_L" = yes; then
2732 add_dir="-L$dir"
2733 # Try looking first in the location we're being installed to.
2734 if test -n "$inst_prefix_dir"; then
2735 case $libdir in
2736 [\\/]*)
2737 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2738 ;;
2739 esac
2740 fi
2741 add="-l$name"
2742 elif test "$hardcode_shlibpath_var" = yes; then
2743 add_shlibpath="$dir"
2744 add="-l$name"
2745 else
2746 lib_linked=no
2747 fi
2748 ;;
2749 *) lib_linked=no ;;
2750 esac
2751
2752 if test "$lib_linked" != yes; then
2753 $echo "$modename: configuration error: unsupported hardcode properties"
2754 exit $EXIT_FAILURE
2755 fi
2756
2757 if test -n "$add_shlibpath"; then
2758 case :$compile_shlibpath: in
2759 *":$add_shlibpath:"*) ;;
2760 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2761 esac
2762 fi
2763 if test "$linkmode" = prog; then
2764 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2765 test -n "$add" && compile_deplibs="$add $compile_deplibs"
2766 else
2767 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2768 test -n "$add" && deplibs="$add $deplibs"
2769 if test "$hardcode_direct" != yes && \
2770 test "$hardcode_minus_L" != yes && \
2771 test "$hardcode_shlibpath_var" = yes; then
2772 case :$finalize_shlibpath: in
2773 *":$libdir:"*) ;;
2774 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2775 esac
2776 fi
2777 fi
2778 fi
2779
2780 if test "$linkmode" = prog || test "$mode" = relink; then
2781 add_shlibpath=
2782 add_dir=
2783 add=
2784 # Finalize command for both is simple: just hardcode it.
2785 if test "$hardcode_direct" = yes; then
2786 add="$libdir/$linklib"
2787 elif test "$hardcode_minus_L" = yes; then
2788 add_dir="-L$libdir"
2789 add="-l$name"
2790 elif test "$hardcode_shlibpath_var" = yes; then
2791 case :$finalize_shlibpath: in
2792 *":$libdir:"*) ;;
2793 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2794 esac
2795 add="-l$name"
2796 elif test "$hardcode_automatic" = yes; then
2797 if test -n "$inst_prefix_dir" &&
2798 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2799 add="$inst_prefix_dir$libdir/$linklib"
2800 else
2801 add="$libdir/$linklib"
2802 fi
2803 else
2804 # We cannot seem to hardcode it, guess we'll fake it.
2805 add_dir="-L$libdir"
2806 # Try looking first in the location we're being installed to.
2807 if test -n "$inst_prefix_dir"; then
2808 case $libdir in
2809 [\\/]*)
2810 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2811 ;;
2812 esac
2813 fi
2814 add="-l$name"
2815 fi
2816
2817 if test "$linkmode" = prog; then
2818 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2819 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2820 else
2821 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2822 test -n "$add" && deplibs="$add $deplibs"
2823 fi
2824 fi
2825 elif test "$linkmode" = prog; then
2826 # Here we assume that one of hardcode_direct or hardcode_minus_L
2827 # is not unsupported. This is valid on all known static and
2828 # shared platforms.
2829 if test "$hardcode_direct" != unsupported; then
2830 test -n "$old_library" && linklib="$old_library"
2831 compile_deplibs="$dir/$linklib $compile_deplibs"
2832 finalize_deplibs="$dir/$linklib $finalize_deplibs"
2833 else
2834 compile_deplibs="-l$name -L$dir $compile_deplibs"
2835 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2836 fi
2837 elif test "$build_libtool_libs" = yes; then
2838 # Not a shared library
2839 if test "$deplibs_check_method" != pass_all; then
2840 # We're trying link a shared library against a static one
2841 # but the system doesn't support it.
2842
2843 # Just print a warning and add the library to dependency_libs so
2844 # that the program can be linked against the static library.
2845 $echo
2846 $echo "*** Warning: This system can not link to static lib archive $lib."
2847 $echo "*** I have the capability to make that library automatically link in when"
2848 $echo "*** you link to this library. But I can only do this if you have a"
2849 $echo "*** shared version of the library, which you do not appear to have."
2850 if test "$module" = yes; then
2851 $echo "*** But as you try to build a module library, libtool will still create "
2852 $echo "*** a static module, that should work as long as the dlopening application"
2853 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2854 if test -z "$global_symbol_pipe"; then
2855 $echo
2856 $echo "*** However, this would only work if libtool was able to extract symbol"
2857 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2858 $echo "*** not find such a program. So, this module is probably useless."
2859 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
2860 fi
2861 if test "$build_old_libs" = no; then
2862 build_libtool_libs=module
2863 build_old_libs=yes
2864 else
2865 build_libtool_libs=no
2866 fi
2867 fi
2868 else
2869 deplibs="$dir/$old_library $deplibs"
2870 link_static=yes
2871 fi
2872 fi # link shared/static library?
2873
2874 if test "$linkmode" = lib; then
2875 if test -n "$dependency_libs" &&
2876 { test "$hardcode_into_libs" != yes ||
2877 test "$build_old_libs" = yes ||
2878 test "$link_static" = yes; }; then
2879 # Extract -R from dependency_libs
2880 temp_deplibs=
2881 for libdir in $dependency_libs; do
2882 case $libdir in
2883 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2884 case " $xrpath " in
2885 *" $temp_xrpath "*) ;;
2886 *) xrpath="$xrpath $temp_xrpath";;
2887 esac;;
2888 *) temp_deplibs="$temp_deplibs $libdir";;
2889 esac
2890 done
2891 dependency_libs="$temp_deplibs"
2892 fi
2893
2894 newlib_search_path="$newlib_search_path $absdir"
2895 # Link against this library
2896 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2897 # ... and its dependency_libs
2898 tmp_libs=
2899 for deplib in $dependency_libs; do
2900 newdependency_libs="$deplib $newdependency_libs"
2901 if test "X$duplicate_deps" = "Xyes" ; then
2902 case "$tmp_libs " in
2903 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2904 esac
2905 fi
2906 tmp_libs="$tmp_libs $deplib"
2907 done
2908
2909 if test "$link_all_deplibs" != no; then
2910 # Add the search paths of all dependency libraries
2911 for deplib in $dependency_libs; do
2912 case $deplib in
2913 -L*) path="$deplib" ;;
2914 *.la)
2915 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2916 test "X$dir" = "X$deplib" && dir="."
2917 # We need an absolute path.
2918 case $dir in
2919 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2920 *)
2921 absdir=`cd "$dir" && pwd`
2922 if test -z "$absdir"; then
2923 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2924 absdir="$dir"
2925 fi
2926 ;;
2927 esac
2928 if grep "^installed=no" $deplib > /dev/null; then
2929 path="$absdir/$objdir"
2930 else
2931 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2932 if test -z "$libdir"; then
2933 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2934 exit $EXIT_FAILURE
2935 fi
2936 if test "$absdir" != "$libdir"; then
2937 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2938 fi
2939 path="$absdir"
2940 fi
2941 depdepl=
2942 case $host in
2943 *-*-darwin*)
2944 # we do not want to link against static libs,
2945 # but need to link against shared
2946 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2947 if test -n "$deplibrary_names" ; then
2948 for tmp in $deplibrary_names ; do
2949 depdepl=$tmp
2950 done
2951 if test -f "$path/$depdepl" ; then
2952 depdepl="$path/$depdepl"
2953 fi
2954 # do not add paths which are already there
2955 case " $newlib_search_path " in
2956 *" $path "*) ;;
2957 *) newlib_search_path="$newlib_search_path $path";;
2958 esac
2959 fi
2960 path=""
2961 ;;
2962 *)
2963 path="-L$path"
2964 ;;
2965 esac
2966 ;;
2967 -l*)
2968 case $host in
2969 *-*-darwin*)
2970 # Again, we only want to link against shared libraries
2971 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2972 for tmp in $newlib_search_path ; do
2973 if test -f "$tmp/lib$tmp_libs.dylib" ; then
2974 eval depdepl="$tmp/lib$tmp_libs.dylib"
2975 break
2976 fi
2977 done
2978 path=""
2979 ;;
2980 *) continue ;;
2981 esac
2982 ;;
2983 *) continue ;;
2984 esac
2985 case " $deplibs " in
2986 *" $path "*) ;;
2987 *) deplibs="$path $deplibs" ;;
2988 esac
2989 case " $deplibs " in
2990 *" $depdepl "*) ;;
2991 *) deplibs="$depdepl $deplibs" ;;
2992 esac
2993 done
2994 fi # link_all_deplibs != no
2995 fi # linkmode = lib
2996 done # for deplib in $libs
2997 dependency_libs="$newdependency_libs"
2998 if test "$pass" = dlpreopen; then
2999 # Link the dlpreopened libraries before other libraries
3000 for deplib in $save_deplibs; do
3001 deplibs="$deplib $deplibs"
3002 done
3003 fi
3004 if test "$pass" != dlopen; then
3005 if test "$pass" != conv; then
3006 # Make sure lib_search_path contains only unique directories.
3007 lib_search_path=
3008 for dir in $newlib_search_path; do
3009 case "$lib_search_path " in
3010 *" $dir "*) ;;
3011 *) lib_search_path="$lib_search_path $dir" ;;
3012 esac
3013 done
3014 newlib_search_path=
3015 fi
3016
3017 if test "$linkmode,$pass" != "prog,link"; then
3018 vars="deplibs"
3019 else
3020 vars="compile_deplibs finalize_deplibs"
3021 fi
3022 for var in $vars dependency_libs; do
3023 # Add libraries to $var in reverse order
3024 eval tmp_libs=\"\$$var\"
3025 new_libs=
3026 for deplib in $tmp_libs; do
3027 # FIXME: Pedantically, this is the right thing to do, so
3028 # that some nasty dependency loop isn't accidentally
3029 # broken:
3030 #new_libs="$deplib $new_libs"
3031 # Pragmatically, this seems to cause very few problems in
3032 # practice:
3033 case $deplib in
3034 -L*) new_libs="$deplib $new_libs" ;;
3035 -R*) ;;
3036 *)
3037 # And here is the reason: when a library appears more
3038 # than once as an explicit dependence of a library, or
3039 # is implicitly linked in more than once by the
3040 # compiler, it is considered special, and multiple
3041 # occurrences thereof are not removed. Compare this
3042 # with having the same library being listed as a
3043 # dependency of multiple other libraries: in this case,
3044 # we know (pedantically, we assume) the library does not
3045 # need to be listed more than once, so we keep only the
3046 # last copy. This is not always right, but it is rare
3047 # enough that we require users that really mean to play
3048 # such unportable linking tricks to link the library
3049 # using -Wl,-lname, so that libtool does not consider it
3050 # for duplicate removal.
3051 case " $specialdeplibs " in
3052 *" $deplib "*) new_libs="$deplib $new_libs" ;;
3053 *)
3054 case " $new_libs " in
3055 *" $deplib "*) ;;
3056 *) new_libs="$deplib $new_libs" ;;
3057 esac
3058 ;;
3059 esac
3060 ;;
3061 esac
3062 done
3063 tmp_libs=
3064 for deplib in $new_libs; do
3065 case $deplib in
3066 -L*)
3067 case " $tmp_libs " in
3068 *" $deplib "*) ;;
3069 *) tmp_libs="$tmp_libs $deplib" ;;
3070 esac
3071 ;;
3072 *) tmp_libs="$tmp_libs $deplib" ;;
3073 esac
3074 done
3075 eval $var=\"$tmp_libs\"
3076 done # for var
3077 fi
3078 # Last step: remove runtime libs from dependency_libs
3079 # (they stay in deplibs)
3080 tmp_libs=
3081 for i in $dependency_libs ; do
3082 case " $predeps $postdeps $compiler_lib_search_path " in
3083 *" $i "*)
3084 i=""
3085 ;;
3086 esac
3087 if test -n "$i" ; then
3088 tmp_libs="$tmp_libs $i"
3089 fi
3090 done
3091 dependency_libs=$tmp_libs
3092 done # for pass
3093 if test "$linkmode" = prog; then
3094 dlfiles="$newdlfiles"
3095 dlprefiles="$newdlprefiles"
3096 fi
3097
3098 case $linkmode in
3099 oldlib)
3100 if test -n "$deplibs"; then
3101 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3102 fi
3103
3104 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3105 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3106 fi
3107
3108 if test -n "$rpath"; then
3109 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3110 fi
3111
3112 if test -n "$xrpath"; then
3113 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3114 fi
3115
3116 if test -n "$vinfo"; then
3117 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3118 fi
3119
3120 if test -n "$release"; then
3121 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3122 fi
3123
3124 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3125 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3126 fi
3127
3128 # Now set the variables for building old libraries.
3129 build_libtool_libs=no
3130 oldlibs="$output"
3131 objs="$objs$old_deplibs"
3132 ;;
3133
3134 lib)
3135 # Make sure we only generate libraries of the form `libNAME.la'.
3136 case $outputname in
3137 lib*)
3138 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3139 eval shared_ext=\"$shrext_cmds\"
3140 eval libname=\"$libname_spec\"
3141 ;;
3142 *)
3143 if test "$module" = no; then
3144 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3145 $echo "$help" 1>&2
3146 exit $EXIT_FAILURE
3147 fi
3148 if test "$need_lib_prefix" != no; then
3149 # Add the "lib" prefix for modules if required
3150 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3151 eval shared_ext=\"$shrext_cmds\"
3152 eval libname=\"$libname_spec\"
3153 else
3154 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3155 fi
3156 ;;
3157 esac
3158
3159 if test -n "$objs"; then
3160 if test "$deplibs_check_method" != pass_all; then
3161 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3162 exit $EXIT_FAILURE
3163 else
3164 $echo
3165 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3166 $echo "*** objects $objs is not portable!"
3167 libobjs="$libobjs $objs"
3168 fi
3169 fi
3170
3171 if test "$dlself" != no; then
3172 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3173 fi
3174
3175 set dummy $rpath
3176 if test "$#" -gt 2; then
3177 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3178 fi
3179 install_libdir="$2"
3180
3181 oldlibs=
3182 if test -z "$rpath"; then
3183 if test "$build_libtool_libs" = yes; then
3184 # Building a libtool convenience library.
3185 # Some compilers have problems with a `.al' extension so
3186 # convenience libraries should have the same extension an
3187 # archive normally would.
3188 oldlibs="$output_objdir/$libname.$libext $oldlibs"
3189 build_libtool_libs=convenience
3190 build_old_libs=yes
3191 fi
3192
3193 if test -n "$vinfo"; then
3194 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3195 fi
3196
3197 if test -n "$release"; then
3198 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3199 fi
3200 else
3201
3202 # Parse the version information argument.
3203 save_ifs="$IFS"; IFS=':'
3204 set dummy $vinfo 0 0 0
3205 IFS="$save_ifs"
3206
3207 if test -n "$8"; then
3208 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3209 $echo "$help" 1>&2
3210 exit $EXIT_FAILURE
3211 fi
3212
3213 # convert absolute version numbers to libtool ages
3214 # this retains compatibility with .la files and attempts
3215 # to make the code below a bit more comprehensible
3216
3217 case $vinfo_number in
3218 yes)
3219 number_major="$2"
3220 number_minor="$3"
3221 number_revision="$4"
3222 #
3223 # There are really only two kinds -- those that
3224 # use the current revision as the major version
3225 # and those that subtract age and use age as
3226 # a minor version. But, then there is irix
3227 # which has an extra 1 added just for fun
3228 #
3229 case $version_type in
3230 darwin|linux|osf|windows|none)
3231 current=`expr $number_major + $number_minor`
3232 age="$number_minor"
3233 revision="$number_revision"
3234 ;;
3235 freebsd-aout|freebsd-elf|sunos)
3236 current="$number_major"
3237 revision="$number_minor"
3238 age="0"
3239 ;;
3240 irix|nonstopux)
3241 current=`expr $number_major + $number_minor`
3242 age="$number_minor"
3243 revision="$number_minor"
3244 lt_irix_increment=no
3245 ;;
3246 esac
3247 ;;
3248 no)
3249 current="$2"
3250 revision="$3"
3251 age="$4"
3252 ;;
3253 esac
3254
3255 # Check that each of the things are valid numbers.
3256 case $current in
3257 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3258 *)
3259 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3260 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3261 exit $EXIT_FAILURE
3262 ;;
3263 esac
3264
3265 case $revision in
3266 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3267 *)
3268 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3269 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3270 exit $EXIT_FAILURE
3271 ;;
3272 esac
3273
3274 case $age in
3275 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3276 *)
3277 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3278 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3279 exit $EXIT_FAILURE
3280 ;;
3281 esac
3282
3283 if test "$age" -gt "$current"; then
3284 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3285 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3286 exit $EXIT_FAILURE
3287 fi
3288
3289 # Calculate the version variables.
3290 major=
3291 versuffix=
3292 verstring=
3293 case $version_type in
3294 none) ;;
3295
3296 darwin)
3297 # Like Linux, but with the current version available in
3298 # verstring for coding it into the library header
3299 major=.`expr $current - $age`
3300 versuffix="$major.$age.$revision"
3301 # Darwin ld doesn't like 0 for these options...
3302 minor_current=`expr $current + 1`
3303 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3304 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3305 ;;
3306
3307 freebsd-aout)
3308 major=".$current"
3309 versuffix=".$current.$revision";
3310 ;;
3311
3312 freebsd-elf)
3313 major=".$current"
3314 versuffix=".$current";
3315 ;;
3316
3317 irix | nonstopux)
3318 if test "X$lt_irix_increment" = "Xno"; then
3319 major=`expr $current - $age`
3320 else
3321 major=`expr $current - $age + 1`
3322 fi
3323 case $version_type in
3324 nonstopux) verstring_prefix=nonstopux ;;
3325 *) verstring_prefix=sgi ;;
3326 esac
3327 verstring="$verstring_prefix$major.$revision"
3328
3329 # Add in all the interfaces that we are compatible with.
3330 loop=$revision
3331 while test "$loop" -ne 0; do
3332 iface=`expr $revision - $loop`
3333 loop=`expr $loop - 1`
3334 verstring="$verstring_prefix$major.$iface:$verstring"
3335 done
3336
3337 # Before this point, $major must not contain `.'.
3338 major=.$major
3339 versuffix="$major.$revision"
3340 ;;
3341
3342 linux)
3343 major=.`expr $current - $age`
3344 versuffix="$major.$age.$revision"
3345 ;;
3346
3347 osf)
3348 major=.`expr $current - $age`
3349 versuffix=".$current.$age.$revision"
3350 verstring="$current.$age.$revision"
3351
3352 # Add in all the interfaces that we are compatible with.
3353 loop=$age
3354 while test "$loop" -ne 0; do
3355 iface=`expr $current - $loop`
3356 loop=`expr $loop - 1`
3357 verstring="$verstring:${iface}.0"
3358 done
3359
3360 # Make executables depend on our current version.
3361 verstring="$verstring:${current}.0"
3362 ;;
3363
3364 sunos)
3365 major=".$current"
3366 versuffix=".$current.$revision"
3367 ;;
3368
3369 windows)
3370 # Use '-' rather than '.', since we only want one
3371 # extension on DOS 8.3 filesystems.
3372 major=`expr $current - $age`
3373 versuffix="-$major"
3374 ;;
3375
3376 *)
3377 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3378 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3379 exit $EXIT_FAILURE
3380 ;;
3381 esac
3382
3383 # Clear the version info if we defaulted, and they specified a release.
3384 if test -z "$vinfo" && test -n "$release"; then
3385 major=
3386 case $version_type in
3387 darwin)
3388 # we can't check for "0.0" in archive_cmds due to quoting
3389 # problems, so we reset it completely
3390 verstring=
3391 ;;
3392 *)
3393 verstring="0.0"
3394 ;;
3395 esac
3396 if test "$need_version" = no; then
3397 versuffix=
3398 else
3399 versuffix=".0.0"
3400 fi
3401 fi
3402
3403 # Remove version info from name if versioning should be avoided
3404 if test "$avoid_version" = yes && test "$need_version" = no; then
3405 major=
3406 versuffix=
3407 verstring=""
3408 fi
3409
3410 # Check to see if the archive will have undefined symbols.
3411 if test "$allow_undefined" = yes; then
3412 if test "$allow_undefined_flag" = unsupported; then
3413 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3414 build_libtool_libs=no
3415 build_old_libs=yes
3416 fi
3417 else
3418 # Don't allow undefined symbols.
3419 allow_undefined_flag="$no_undefined_flag"
3420 fi
3421 fi
3422
3423 if test "$mode" != relink; then
3424 # Remove our outputs, but don't remove object files since they
3425 # may have been created when compiling PIC objects.
3426 removelist=
3427 tempremovelist=`$echo "$output_objdir/*"`
3428 for p in $tempremovelist; do
3429 case $p in
3430 *.$objext)
3431 ;;
3432 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3433 if test "X$precious_files_regex" != "X"; then
3434 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3435 then
3436 continue
3437 fi
3438 fi
3439 removelist="$removelist $p"
3440 ;;
3441 *) ;;
3442 esac
3443 done
3444 if test -n "$removelist"; then
3445 $show "${rm}r $removelist"
3446 $run ${rm}r $removelist
3447 fi
3448 fi
3449
3450 # Now set the variables for building old libraries.
3451 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3452 oldlibs="$oldlibs $output_objdir/$libname.$libext"
3453
3454 # Transform .lo files to .o files.
3455 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3456 fi
3457
3458 # Eliminate all temporary directories.
3459 #for path in $notinst_path; do
3460 # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3461 # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3462 # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3463 #done
3464
3465 if test -n "$xrpath"; then
3466 # If the user specified any rpath flags, then add them.
3467 temp_xrpath=
3468 for libdir in $xrpath; do
3469 temp_xrpath="$temp_xrpath -R$libdir"
3470 case "$finalize_rpath " in
3471 *" $libdir "*) ;;
3472 *) finalize_rpath="$finalize_rpath $libdir" ;;
3473 esac
3474 done
3475 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3476 dependency_libs="$temp_xrpath $dependency_libs"
3477 fi
3478 fi
3479
3480 # Make sure dlfiles contains only unique files that won't be dlpreopened
3481 old_dlfiles="$dlfiles"
3482 dlfiles=
3483 for lib in $old_dlfiles; do
3484 case " $dlprefiles $dlfiles " in
3485 *" $lib "*) ;;
3486 *) dlfiles="$dlfiles $lib" ;;
3487 esac
3488 done
3489
3490 # Make sure dlprefiles contains only unique files
3491 old_dlprefiles="$dlprefiles"
3492 dlprefiles=
3493 for lib in $old_dlprefiles; do
3494 case "$dlprefiles " in
3495 *" $lib "*) ;;
3496 *) dlprefiles="$dlprefiles $lib" ;;
3497 esac
3498 done
3499
3500 if test "$build_libtool_libs" = yes; then
3501 if test -n "$rpath"; then
3502 case $host in
3503 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3504 # these systems don't actually have a c library (as such)!
3505 ;;
3506 *-*-rhapsody* | *-*-darwin1.[012])
3507 # Rhapsody C library is in the System framework
3508 deplibs="$deplibs -framework System"
3509 ;;
3510 *-*-netbsd*)
3511 # Don't link with libc until the a.out ld.so is fixed.
3512 ;;
3513 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3514 # Do not include libc due to us having libc/libc_r.
3515 ;;
3516 *-*-sco3.2v5* | *-*-sco5v6*)
3517 # Causes problems with __ctype
3518 ;;
3519 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3520 # Compiler inserts libc in the correct place for threads to work
3521 ;;
3522 *)
3523 # Add libc to deplibs on all other systems if necessary.
3524 if test "$build_libtool_need_lc" = "yes"; then
3525 deplibs="$deplibs -lc"
3526 fi
3527 ;;
3528 esac
3529 fi
3530
3531 # Transform deplibs into only deplibs that can be linked in shared.
3532 name_save=$name
3533 libname_save=$libname
3534 release_save=$release
3535 versuffix_save=$versuffix
3536 major_save=$major
3537 # I'm not sure if I'm treating the release correctly. I think
3538 # release should show up in the -l (ie -lgmp5) so we don't want to
3539 # add it in twice. Is that correct?
3540 release=""
3541 versuffix=""
3542 major=""
3543 newdeplibs=
3544 droppeddeps=no
3545 case $deplibs_check_method in
3546 pass_all)
3547 # Don't check for shared/static. Everything works.
3548 # This might be a little naive. We might want to check
3549 # whether the library exists or not. But this is on
3550 # osf3 & osf4 and I'm not really sure... Just
3551 # implementing what was already the behavior.
3552 newdeplibs=$deplibs
3553 ;;
3554 test_compile)
3555 # This code stresses the "libraries are programs" paradigm to its
3556 # limits. Maybe even breaks it. We compile a program, linking it
3557 # against the deplibs as a proxy for the library. Then we can check
3558 # whether they linked in statically or dynamically with ldd.
3559 $rm conftest.c
3560 cat > conftest.c <<EOF
3561 int main() { return 0; }
3562 EOF
3563 $rm conftest
3564 if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3565 ldd_output=`ldd conftest`
3566 for i in $deplibs; do
3567 name=`expr $i : '-l\(.*\)'`
3568 # If $name is empty we are operating on a -L argument.
3569 if test "$name" != "" && test "$name" != "0"; then
3570 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3571 case " $predeps $postdeps " in
3572 *" $i "*)
3573 newdeplibs="$newdeplibs $i"
3574 i=""
3575 ;;
3576 esac
3577 fi
3578 if test -n "$i" ; then
3579 libname=`eval \\$echo \"$libname_spec\"`
3580 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3581 set dummy $deplib_matches
3582 deplib_match=$2
3583 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3584 newdeplibs="$newdeplibs $i"
3585 else
3586 droppeddeps=yes
3587 $echo
3588 $echo "*** Warning: dynamic linker does not accept needed library $i."
3589 $echo "*** I have the capability to make that library automatically link in when"
3590 $echo "*** you link to this library. But I can only do this if you have a"
3591 $echo "*** shared version of the library, which I believe you do not have"
3592 $echo "*** because a test_compile did reveal that the linker did not use it for"
3593 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3594 fi
3595 fi
3596 else
3597 newdeplibs="$newdeplibs $i"
3598 fi
3599 done
3600 else
3601 # Error occurred in the first compile. Let's try to salvage
3602 # the situation: Compile a separate program for each library.
3603 for i in $deplibs; do
3604 name=`expr $i : '-l\(.*\)'`
3605 # If $name is empty we are operating on a -L argument.
3606 if test "$name" != "" && test "$name" != "0"; then
3607 $rm conftest
3608 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3609 ldd_output=`ldd conftest`
3610 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3611 case " $predeps $postdeps " in
3612 *" $i "*)
3613 newdeplibs="$newdeplibs $i"
3614 i=""
3615 ;;
3616 esac
3617 fi
3618 if test -n "$i" ; then
3619 libname=`eval \\$echo \"$libname_spec\"`
3620 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3621 set dummy $deplib_matches
3622 deplib_match=$2
3623 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3624 newdeplibs="$newdeplibs $i"
3625 else
3626 droppeddeps=yes
3627 $echo
3628 $echo "*** Warning: dynamic linker does not accept needed library $i."
3629 $echo "*** I have the capability to make that library automatically link in when"
3630 $echo "*** you link to this library. But I can only do this if you have a"
3631 $echo "*** shared version of the library, which you do not appear to have"
3632 $echo "*** because a test_compile did reveal that the linker did not use this one"
3633 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3634 fi
3635 fi
3636 else
3637 droppeddeps=yes
3638 $echo
3639 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3640 $echo "*** make it link in! You will probably need to install it or some"
3641 $echo "*** library that it depends on before this library will be fully"
3642 $echo "*** functional. Installing it before continuing would be even better."
3643 fi
3644 else
3645 newdeplibs="$newdeplibs $i"
3646 fi
3647 done
3648 fi
3649 ;;
3650 file_magic*)
3651 set dummy $deplibs_check_method
3652 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3653 for a_deplib in $deplibs; do
3654 name=`expr $a_deplib : '-l\(.*\)'`
3655 # If $name is empty we are operating on a -L argument.
3656 if test "$name" != "" && test "$name" != "0"; then
3657 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3658 case " $predeps $postdeps " in
3659 *" $a_deplib "*)
3660 newdeplibs="$newdeplibs $a_deplib"
3661 a_deplib=""
3662 ;;
3663 esac
3664 fi
3665 if test -n "$a_deplib" ; then
3666 libname=`eval \\$echo \"$libname_spec\"`
3667 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3668 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3669 for potent_lib in $potential_libs; do
3670 # Follow soft links.
3671 if ls -lLd "$potent_lib" 2>/dev/null \
3672 | grep " -> " >/dev/null; then
3673 continue
3674 fi
3675 # The statement above tries to avoid entering an
3676 # endless loop below, in case of cyclic links.
3677 # We might still enter an endless loop, since a link
3678 # loop can be closed while we follow links,
3679 # but so what?
3680 potlib="$potent_lib"
3681 while test -h "$potlib" 2>/dev/null; do
3682 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
3683 case $potliblink in
3684 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
3685 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3686 esac
3687 done
3688 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3689 | ${SED} 10q \
3690 | $EGREP "$file_magic_regex" > /dev/null; then
3691 newdeplibs="$newdeplibs $a_deplib"
3692 a_deplib=""
3693 break 2
3694 fi
3695 done
3696 done
3697 fi
3698 if test -n "$a_deplib" ; then
3699 droppeddeps=yes
3700 $echo
3701 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3702 $echo "*** I have the capability to make that library automatically link in when"
3703 $echo "*** you link to this library. But I can only do this if you have a"
3704 $echo "*** shared version of the library, which you do not appear to have"
3705 $echo "*** because I did check the linker path looking for a file starting"
3706 if test -z "$potlib" ; then
3707 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3708 else
3709 $echo "*** with $libname and none of the candidates passed a file format test"
3710 $echo "*** using a file magic. Last file checked: $potlib"
3711 fi
3712 fi
3713 else
3714 # Add a -L argument.
3715 newdeplibs="$newdeplibs $a_deplib"
3716 fi
3717 done # Gone through all deplibs.
3718 ;;
3719 match_pattern*)
3720 set dummy $deplibs_check_method
3721 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3722 for a_deplib in $deplibs; do
3723 name=`expr $a_deplib : '-l\(.*\)'`
3724 # If $name is empty we are operating on a -L argument.
3725 if test -n "$name" && test "$name" != "0"; then
3726 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3727 case " $predeps $postdeps " in
3728 *" $a_deplib "*)
3729 newdeplibs="$newdeplibs $a_deplib"
3730 a_deplib=""
3731 ;;
3732 esac
3733 fi
3734 if test -n "$a_deplib" ; then
3735 libname=`eval \\$echo \"$libname_spec\"`
3736 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3737 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3738 for potent_lib in $potential_libs; do
3739 potlib="$potent_lib" # see symlink-check above in file_magic test
3740 if eval $echo \"$potent_lib\" 2>/dev/null \
3741 | ${SED} 10q \
3742 | $EGREP "$match_pattern_regex" > /dev/null; then
3743 newdeplibs="$newdeplibs $a_deplib"
3744 a_deplib=""
3745 break 2
3746 fi
3747 done
3748 done
3749 fi
3750 if test -n "$a_deplib" ; then
3751 droppeddeps=yes
3752 $echo
3753 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3754 $echo "*** I have the capability to make that library automatically link in when"
3755 $echo "*** you link to this library. But I can only do this if you have a"
3756 $echo "*** shared version of the library, which you do not appear to have"
3757 $echo "*** because I did check the linker path looking for a file starting"
3758 if test -z "$potlib" ; then
3759 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3760 else
3761 $echo "*** with $libname and none of the candidates passed a file format test"
3762 $echo "*** using a regex pattern. Last file checked: $potlib"
3763 fi
3764 fi
3765 else
3766 # Add a -L argument.
3767 newdeplibs="$newdeplibs $a_deplib"
3768 fi
3769 done # Gone through all deplibs.
3770 ;;
3771 none | unknown | *)
3772 newdeplibs=""
3773 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3774 -e 's/ -[LR][^ ]*//g'`
3775 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3776 for i in $predeps $postdeps ; do
3777 # can't use Xsed below, because $i might contain '/'
3778 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3779 done
3780 fi
3781 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
3782 | grep . >/dev/null; then
3783 $echo
3784 if test "X$deplibs_check_method" = "Xnone"; then
3785 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3786 else
3787 $echo "*** Warning: inter-library dependencies are not known to be supported."
3788 fi
3789 $echo "*** All declared inter-library dependencies are being dropped."
3790 droppeddeps=yes
3791 fi
3792 ;;
3793 esac
3794 versuffix=$versuffix_save
3795 major=$major_save
3796 release=$release_save
3797 libname=$libname_save
3798 name=$name_save
3799
3800 case $host in
3801 *-*-rhapsody* | *-*-darwin1.[012])
3802 # On Rhapsody replace the C library is the System framework
3803 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3804 ;;
3805 esac
3806
3807 if test "$droppeddeps" = yes; then
3808 if test "$module" = yes; then
3809 $echo
3810 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3811 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3812 $echo "*** a static module, that should work as long as the dlopening"
3813 $echo "*** application is linked with the -dlopen flag."
3814 if test -z "$global_symbol_pipe"; then
3815 $echo
3816 $echo "*** However, this would only work if libtool was able to extract symbol"
3817 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3818 $echo "*** not find such a program. So, this module is probably useless."
3819 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3820 fi
3821 if test "$build_old_libs" = no; then
3822 oldlibs="$output_objdir/$libname.$libext"
3823 build_libtool_libs=module
3824 build_old_libs=yes
3825 else
3826 build_libtool_libs=no
3827 fi
3828 else
3829 $echo "*** The inter-library dependencies that have been dropped here will be"
3830 $echo "*** automatically added whenever a program is linked with this library"
3831 $echo "*** or is declared to -dlopen it."
3832
3833 if test "$allow_undefined" = no; then
3834 $echo
3835 $echo "*** Since this library must not contain undefined symbols,"
3836 $echo "*** because either the platform does not support them or"
3837 $echo "*** it was explicitly requested with -no-undefined,"
3838 $echo "*** libtool will only create a static version of it."
3839 if test "$build_old_libs" = no; then
3840 oldlibs="$output_objdir/$libname.$libext"
3841 build_libtool_libs=module
3842 build_old_libs=yes
3843 else
3844 build_libtool_libs=no
3845 fi
3846 fi
3847 fi
3848 fi
3849 # Done checking deplibs!
3850 deplibs=$newdeplibs
3851 fi
3852
3853
3854 # move library search paths that coincide with paths to not yet
3855 # installed libraries to the beginning of the library search list
3856 new_libs=
3857 for path in $notinst_path; do
3858 case " $new_libs " in
3859 *" -L$path/$objdir "*) ;;
3860 *)
3861 case " $deplibs " in
3862 *" -L$path/$objdir "*)
3863 new_libs="$new_libs -L$path/$objdir" ;;
3864 esac
3865 ;;
3866 esac
3867 done
3868 for deplib in $deplibs; do
3869 case $deplib in
3870 -L*)
3871 case " $new_libs " in
3872 *" $deplib "*) ;;
3873 *) new_libs="$new_libs $deplib" ;;
3874 esac
3875 ;;
3876 *) new_libs="$new_libs $deplib" ;;
3877 esac
3878 done
3879 deplibs="$new_libs"
3880
3881
3882 # All the library-specific variables (install_libdir is set above).
3883 library_names=
3884 old_library=
3885 dlname=
3886
3887 # Test again, we may have decided not to build it any more
3888 if test "$build_libtool_libs" = yes; then
3889 if test "$hardcode_into_libs" = yes; then
3890 # Hardcode the library paths
3891 hardcode_libdirs=
3892 dep_rpath=
3893 rpath="$finalize_rpath"
3894 test "$mode" != relink && rpath="$compile_rpath$rpath"
3895 for libdir in $rpath; do
3896 if test -n "$hardcode_libdir_flag_spec"; then
3897 if test -n "$hardcode_libdir_separator"; then
3898 if test -z "$hardcode_libdirs"; then
3899 hardcode_libdirs="$libdir"
3900 else
3901 # Just accumulate the unique libdirs.
3902 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3903 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3904 ;;
3905 *)
3906 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3907 ;;
3908 esac
3909 fi
3910 else
3911 eval flag=\"$hardcode_libdir_flag_spec\"
3912 dep_rpath="$dep_rpath $flag"
3913 fi
3914 elif test -n "$runpath_var"; then
3915 case "$perm_rpath " in
3916 *" $libdir "*) ;;
3917 *) perm_rpath="$perm_rpath $libdir" ;;
3918 esac
3919 fi
3920 done
3921 # Substitute the hardcoded libdirs into the rpath.
3922 if test -n "$hardcode_libdir_separator" &&
3923 test -n "$hardcode_libdirs"; then
3924 libdir="$hardcode_libdirs"
3925 if test -n "$hardcode_libdir_flag_spec_ld"; then
3926 case $archive_cmds in
3927 *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
3928 *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
3929 esac
3930 else
3931 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3932 fi
3933 fi
3934 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3935 # We should set the runpath_var.
3936 rpath=
3937 for dir in $perm_rpath; do
3938 rpath="$rpath$dir:"
3939 done
3940 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3941 fi
3942 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3943 fi
3944
3945 shlibpath="$finalize_shlibpath"
3946 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3947 if test -n "$shlibpath"; then
3948 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3949 fi
3950
3951 # Get the real and link names of the library.
3952 eval shared_ext=\"$shrext_cmds\"
3953 eval library_names=\"$library_names_spec\"
3954 set dummy $library_names
3955 realname="$2"
3956 shift; shift
3957
3958 if test -n "$soname_spec"; then
3959 eval soname=\"$soname_spec\"
3960 else
3961 soname="$realname"
3962 fi
3963 if test -z "$dlname"; then
3964 dlname=$soname
3965 fi
3966
3967 lib="$output_objdir/$realname"
3968 linknames=
3969 for link
3970 do
3971 linknames="$linknames $link"
3972 done
3973
3974 # Use standard objects if they are pic
3975 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3976
3977 # Prepare the list of exported symbols
3978 if test -z "$export_symbols"; then
3979 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3980 $show "generating symbol list for \`$libname.la'"
3981 export_symbols="$output_objdir/$libname.exp"
3982 $run $rm $export_symbols
3983 cmds=$export_symbols_cmds
3984 save_ifs="$IFS"; IFS='~'
3985 for cmd in $cmds; do
3986 IFS="$save_ifs"
3987 eval cmd=\"$cmd\"
3988 if len=`expr "X$cmd" : ".*"` &&
3989 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3990 $show "$cmd"
3991 $run eval "$cmd" || exit $?
3992 skipped_export=false
3993 else
3994 # The command line is too long to execute in one step.
3995 $show "using reloadable object file for export list..."
3996 skipped_export=:
3997 # Break out early, otherwise skipped_export may be
3998 # set to false by a later but shorter cmd.
3999 break
4000 fi
4001 done
4002 IFS="$save_ifs"
4003 if test -n "$export_symbols_regex"; then
4004 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4005 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4006 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4007 $run eval '$mv "${export_symbols}T" "$export_symbols"'
4008 fi
4009 fi
4010 fi
4011
4012 if test -n "$export_symbols" && test -n "$include_expsyms"; then
4013 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4014 fi
4015
4016 tmp_deplibs=
4017 for test_deplib in $deplibs; do
4018 case " $convenience " in
4019 *" $test_deplib "*) ;;
4020 *)
4021 tmp_deplibs="$tmp_deplibs $test_deplib"
4022 ;;
4023 esac
4024 done
4025 deplibs="$tmp_deplibs"
4026
4027 if test -n "$convenience"; then
4028 if test -n "$whole_archive_flag_spec"; then
4029 save_libobjs=$libobjs
4030 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4031 else
4032 gentop="$output_objdir/${outputname}x"
4033 generated="$generated $gentop"
4034
4035 func_extract_archives $gentop $convenience
4036 libobjs="$libobjs $func_extract_archives_result"
4037 fi
4038 fi
4039
4040 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4041 eval flag=\"$thread_safe_flag_spec\"
4042 linker_flags="$linker_flags $flag"
4043 fi
4044
4045 # Make a backup of the uninstalled library when relinking
4046 if test "$mode" = relink; then
4047 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4048 fi
4049
4050 # Do each of the archive commands.
4051 if test "$module" = yes && test -n "$module_cmds" ; then
4052 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4053 eval test_cmds=\"$module_expsym_cmds\"
4054 cmds=$module_expsym_cmds
4055 else
4056 eval test_cmds=\"$module_cmds\"
4057 cmds=$module_cmds
4058 fi
4059 else
4060 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4061 eval test_cmds=\"$archive_expsym_cmds\"
4062 cmds=$archive_expsym_cmds
4063 else
4064 eval test_cmds=\"$archive_cmds\"
4065 cmds=$archive_cmds
4066 fi
4067 fi
4068
4069 if test "X$skipped_export" != "X:" &&
4070 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4071 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4072 :
4073 else
4074 # The command line is too long to link in one step, link piecewise.
4075 $echo "creating reloadable object files..."
4076
4077 # Save the value of $output and $libobjs because we want to
4078 # use them later. If we have whole_archive_flag_spec, we
4079 # want to use save_libobjs as it was before
4080 # whole_archive_flag_spec was expanded, because we can't
4081 # assume the linker understands whole_archive_flag_spec.
4082 # This may have to be revisited, in case too many
4083 # convenience libraries get linked in and end up exceeding
4084 # the spec.
4085 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4086 save_libobjs=$libobjs
4087 fi
4088 save_output=$output
4089 output_la=`$echo "X$output" | $Xsed -e "$basename"`
4090
4091 # Clear the reloadable object creation command queue and
4092 # initialize k to one.
4093 test_cmds=
4094 concat_cmds=
4095 objlist=
4096 delfiles=
4097 last_robj=
4098 k=1
4099 output=$output_objdir/$output_la-${k}.$objext
4100 # Loop over the list of objects to be linked.
4101 for obj in $save_libobjs
4102 do
4103 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4104 if test "X$objlist" = X ||
4105 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4106 test "$len" -le "$max_cmd_len"; }; then
4107 objlist="$objlist $obj"
4108 else
4109 # The command $test_cmds is almost too long, add a
4110 # command to the queue.
4111 if test "$k" -eq 1 ; then
4112 # The first file doesn't have a previous command to add.
4113 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4114 else
4115 # All subsequent reloadable object files will link in
4116 # the last one created.
4117 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4118 fi
4119 last_robj=$output_objdir/$output_la-${k}.$objext
4120 k=`expr $k + 1`
4121 output=$output_objdir/$output_la-${k}.$objext
4122 objlist=$obj
4123 len=1
4124 fi
4125 done
4126 # Handle the remaining objects by creating one last
4127 # reloadable object file. All subsequent reloadable object
4128 # files will link in the last one created.
4129 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4130 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4131
4132 if ${skipped_export-false}; then
4133 $show "generating symbol list for \`$libname.la'"
4134 export_symbols="$output_objdir/$libname.exp"
4135 $run $rm $export_symbols
4136 libobjs=$output
4137 # Append the command to create the export file.
4138 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4139 fi
4140
4141 # Set up a command to remove the reloadable object files
4142 # after they are used.
4143 i=0
4144 while test "$i" -lt "$k"
4145 do
4146 i=`expr $i + 1`
4147 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4148 done
4149
4150 $echo "creating a temporary reloadable object file: $output"
4151
4152 # Loop through the commands generated above and execute them.
4153 save_ifs="$IFS"; IFS='~'
4154 for cmd in $concat_cmds; do
4155 IFS="$save_ifs"
4156 $show "$cmd"
4157 $run eval "$cmd" || exit $?
4158 done
4159 IFS="$save_ifs"
4160
4161 libobjs=$output
4162 # Restore the value of output.
4163 output=$save_output
4164
4165 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4166 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4167 fi
4168 # Expand the library linking commands again to reset the
4169 # value of $libobjs for piecewise linking.
4170
4171 # Do each of the archive commands.
4172 if test "$module" = yes && test -n "$module_cmds" ; then
4173 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4174 cmds=$module_expsym_cmds
4175 else
4176 cmds=$module_cmds
4177 fi
4178 else
4179 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4180 cmds=$archive_expsym_cmds
4181 else
4182 cmds=$archive_cmds
4183 fi
4184 fi
4185
4186 # Append the command to remove the reloadable object files
4187 # to the just-reset $cmds.
4188 eval cmds=\"\$cmds~\$rm $delfiles\"
4189 fi
4190 save_ifs="$IFS"; IFS='~'
4191 for cmd in $cmds; do
4192 IFS="$save_ifs"
4193 eval cmd=\"$cmd\"
4194 $show "$cmd"
4195 $run eval "$cmd" || {
4196 lt_exit=$?
4197
4198 # Restore the uninstalled library and exit
4199 if test "$mode" = relink; then
4200 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4201 fi
4202
4203 exit $lt_exit
4204 }
4205 done
4206 IFS="$save_ifs"
4207
4208 # Restore the uninstalled library and exit
4209 if test "$mode" = relink; then
4210 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4211
4212 if test -n "$convenience"; then
4213 if test -z "$whole_archive_flag_spec"; then
4214 $show "${rm}r $gentop"
4215 $run ${rm}r "$gentop"
4216 fi
4217 fi
4218
4219 exit $EXIT_SUCCESS
4220 fi
4221
4222 # Create links to the real library.
4223 for linkname in $linknames; do
4224 if test "$realname" != "$linkname"; then
4225 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4226 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4227 fi
4228 done
4229
4230 # If -module or -export-dynamic was specified, set the dlname.
4231 if test "$module" = yes || test "$export_dynamic" = yes; then
4232 # On all known operating systems, these are identical.
4233 dlname="$soname"
4234 fi
4235 fi
4236 ;;
4237
4238 obj)
4239 if test -n "$deplibs"; then
4240 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4241 fi
4242
4243 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4244 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4245 fi
4246
4247 if test -n "$rpath"; then
4248 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4249 fi
4250
4251 if test -n "$xrpath"; then
4252 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4253 fi
4254
4255 if test -n "$vinfo"; then
4256 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4257 fi
4258
4259 if test -n "$release"; then
4260 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4261 fi
4262
4263 case $output in
4264 *.lo)
4265 if test -n "$objs$old_deplibs"; then
4266 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4267 exit $EXIT_FAILURE
4268 fi
4269 libobj="$output"
4270 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4271 ;;
4272 *)
4273 libobj=
4274 obj="$output"
4275 ;;
4276 esac
4277
4278 # Delete the old objects.
4279 $run $rm $obj $libobj
4280
4281 # Objects from convenience libraries. This assumes
4282 # single-version convenience libraries. Whenever we create
4283 # different ones for PIC/non-PIC, this we'll have to duplicate
4284 # the extraction.
4285 reload_conv_objs=
4286 gentop=
4287 # reload_cmds runs $LD directly, so let us get rid of
4288 # -Wl from whole_archive_flag_spec and hope we can get by with
4289 # turning comma into space..
4290 wl=
4291
4292 if test -n "$convenience"; then
4293 if test -n "$whole_archive_flag_spec"; then
4294 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
4295 reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4296 else
4297 gentop="$output_objdir/${obj}x"
4298 generated="$generated $gentop"
4299
4300 func_extract_archives $gentop $convenience
4301 reload_conv_objs="$reload_objs $func_extract_archives_result"
4302 fi
4303 fi
4304
4305 # Create the old-style object.
4306 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
4307
4308 output="$obj"
4309 cmds=$reload_cmds
4310 save_ifs="$IFS"; IFS='~'
4311 for cmd in $cmds; do
4312 IFS="$save_ifs"
4313 eval cmd=\"$cmd\"
4314 $show "$cmd"
4315 $run eval "$cmd" || exit $?
4316 done
4317 IFS="$save_ifs"
4318
4319 # Exit if we aren't doing a library object file.
4320 if test -z "$libobj"; then
4321 if test -n "$gentop"; then
4322 $show "${rm}r $gentop"
4323 $run ${rm}r $gentop
4324 fi
4325
4326 exit $EXIT_SUCCESS
4327 fi
4328
4329 if test "$build_libtool_libs" != yes; then
4330 if test -n "$gentop"; then
4331 $show "${rm}r $gentop"
4332 $run ${rm}r $gentop
4333 fi
4334
4335 # Create an invalid libtool object if no PIC, so that we don't
4336 # accidentally link it into a program.
4337 # $show "echo timestamp > $libobj"
4338 # $run eval "echo timestamp > $libobj" || exit $?
4339 exit $EXIT_SUCCESS
4340 fi
4341
4342 if test -n "$pic_flag" || test "$pic_mode" != default; then
4343 # Only do commands if we really have different PIC objects.
4344 reload_objs="$libobjs $reload_conv_objs"
4345 output="$libobj"
4346 cmds=$reload_cmds
4347 save_ifs="$IFS"; IFS='~'
4348 for cmd in $cmds; do
4349 IFS="$save_ifs"
4350 eval cmd=\"$cmd\"
4351 $show "$cmd"
4352 $run eval "$cmd" || exit $?
4353 done
4354 IFS="$save_ifs"
4355 fi
4356
4357 if test -n "$gentop"; then
4358 $show "${rm}r $gentop"
4359 $run ${rm}r $gentop
4360 fi
4361
4362 exit $EXIT_SUCCESS
4363 ;;
4364
4365 prog)
4366 case $host in
4367 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4368 esac
4369 if test -n "$vinfo"; then
4370 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4371 fi
4372
4373 if test -n "$release"; then
4374 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4375 fi
4376
4377 if test "$preload" = yes; then
4378 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4379 test "$dlopen_self_static" = unknown; then
4380 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4381 fi
4382 fi
4383
4384 case $host in
4385 *-*-rhapsody* | *-*-darwin1.[012])
4386 # On Rhapsody replace the C library is the System framework
4387 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4388 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4389 ;;
4390 esac
4391
4392 case $host in
4393 *darwin*)
4394 # Don't allow lazy linking, it breaks C++ global constructors
4395 if test "$tagname" = CXX ; then
4396 compile_command="$compile_command ${wl}-bind_at_load"
4397 finalize_command="$finalize_command ${wl}-bind_at_load"
4398 fi
4399 ;;
4400 esac
4401
4402
4403 # move library search paths that coincide with paths to not yet
4404 # installed libraries to the beginning of the library search list
4405 new_libs=
4406 for path in $notinst_path; do
4407 case " $new_libs " in
4408 *" -L$path/$objdir "*) ;;
4409 *)
4410 case " $compile_deplibs " in
4411 *" -L$path/$objdir "*)
4412 new_libs="$new_libs -L$path/$objdir" ;;
4413 esac
4414 ;;
4415 esac
4416 done
4417 for deplib in $compile_deplibs; do
4418 case $deplib in
4419 -L*)
4420 case " $new_libs " in
4421 *" $deplib "*) ;;
4422 *) new_libs="$new_libs $deplib" ;;
4423 esac
4424 ;;
4425 *) new_libs="$new_libs $deplib" ;;
4426 esac
4427 done
4428 compile_deplibs="$new_libs"
4429
4430
4431 compile_command="$compile_command $compile_deplibs"
4432 finalize_command="$finalize_command $finalize_deplibs"
4433
4434 if test -n "$rpath$xrpath"; then
4435 # If the user specified any rpath flags, then add them.
4436 for libdir in $rpath $xrpath; do
4437 # This is the magic to use -rpath.
4438 case "$finalize_rpath " in
4439 *" $libdir "*) ;;
4440 *) finalize_rpath="$finalize_rpath $libdir" ;;
4441 esac
4442 done
4443 fi
4444
4445 # Now hardcode the library paths
4446 rpath=
4447 hardcode_libdirs=
4448 for libdir in $compile_rpath $finalize_rpath; do
4449 if test -n "$hardcode_libdir_flag_spec"; then
4450 if test -n "$hardcode_libdir_separator"; then
4451 if test -z "$hardcode_libdirs"; then
4452 hardcode_libdirs="$libdir"
4453 else
4454 # Just accumulate the unique libdirs.
4455 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4456 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4457 ;;
4458 *)
4459 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4460 ;;
4461 esac
4462 fi
4463 else
4464 eval flag=\"$hardcode_libdir_flag_spec\"
4465 rpath="$rpath $flag"
4466 fi
4467 elif test -n "$runpath_var"; then
4468 case "$perm_rpath " in
4469 *" $libdir "*) ;;
4470 *) perm_rpath="$perm_rpath $libdir" ;;
4471 esac
4472 fi
4473 case $host in
4474 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4475 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4476 case :$dllsearchpath: in
4477 *":$libdir:"*) ;;
4478 *) dllsearchpath="$dllsearchpath:$libdir";;
4479 esac
4480 case :$dllsearchpath: in
4481 *":$testbindir:"*) ;;
4482 *) dllsearchpath="$dllsearchpath:$testbindir";;
4483 esac
4484 ;;
4485 esac
4486 done
4487 # Substitute the hardcoded libdirs into the rpath.
4488 if test -n "$hardcode_libdir_separator" &&
4489 test -n "$hardcode_libdirs"; then
4490 libdir="$hardcode_libdirs"
4491 eval rpath=\" $hardcode_libdir_flag_spec\"
4492 fi
4493 compile_rpath="$rpath"
4494
4495 rpath=
4496 hardcode_libdirs=
4497 for libdir in $finalize_rpath; do
4498 if test -n "$hardcode_libdir_flag_spec"; then
4499 if test -n "$hardcode_libdir_separator"; then
4500 if test -z "$hardcode_libdirs"; then
4501 hardcode_libdirs="$libdir"
4502 else
4503 # Just accumulate the unique libdirs.
4504 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4505 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4506 ;;
4507 *)
4508 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4509 ;;
4510 esac
4511 fi
4512 else
4513 eval flag=\"$hardcode_libdir_flag_spec\"
4514 rpath="$rpath $flag"
4515 fi
4516 elif test -n "$runpath_var"; then
4517 case "$finalize_perm_rpath " in
4518 *" $libdir "*) ;;
4519 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4520 esac
4521 fi
4522 done
4523 # Substitute the hardcoded libdirs into the rpath.
4524 if test -n "$hardcode_libdir_separator" &&
4525 test -n "$hardcode_libdirs"; then
4526 libdir="$hardcode_libdirs"
4527 eval rpath=\" $hardcode_libdir_flag_spec\"
4528 fi
4529 finalize_rpath="$rpath"
4530
4531 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4532 # Transform all the library objects into standard objects.
4533 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4534 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4535 fi
4536
4537 dlsyms=
4538 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4539 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4540 dlsyms="${outputname}S.c"
4541 else
4542 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4543 fi
4544 fi
4545
4546 if test -n "$dlsyms"; then
4547 case $dlsyms in
4548 "") ;;
4549 *.c)
4550 # Discover the nlist of each of the dlfiles.
4551 nlist="$output_objdir/${outputname}.nm"
4552
4553 $show "$rm $nlist ${nlist}S ${nlist}T"
4554 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4555
4556 # Parse the name list into a source file.
4557 $show "creating $output_objdir/$dlsyms"
4558
4559 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4560 /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4561 /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4562
4563 #ifdef __cplusplus
4564 extern \"C\" {
4565 #endif
4566
4567 /* Prevent the only kind of declaration conflicts we can make. */
4568 #define lt_preloaded_symbols some_other_symbol
4569
4570 /* External symbol declarations for the compiler. */\
4571 "
4572
4573 if test "$dlself" = yes; then
4574 $show "generating symbol list for \`$output'"
4575
4576 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4577
4578 # Add our own program objects to the symbol list.
4579 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4580 for arg in $progfiles; do
4581 $show "extracting global C symbols from \`$arg'"
4582 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4583 done
4584
4585 if test -n "$exclude_expsyms"; then
4586 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4587 $run eval '$mv "$nlist"T "$nlist"'
4588 fi
4589
4590 if test -n "$export_symbols_regex"; then
4591 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4592 $run eval '$mv "$nlist"T "$nlist"'
4593 fi
4594
4595 # Prepare the list of exported symbols
4596 if test -z "$export_symbols"; then
4597 export_symbols="$output_objdir/$outputname.exp"
4598 $run $rm $export_symbols
4599 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4600 case $host in
4601 *cygwin* | *mingw* )
4602 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4603 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4604 ;;
4605 esac
4606 else
4607 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4608 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4609 $run eval 'mv "$nlist"T "$nlist"'
4610 case $host in
4611 *cygwin* | *mingw* )
4612 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4613 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4614 ;;
4615 esac
4616 fi
4617 fi
4618
4619 for arg in $dlprefiles; do
4620 $show "extracting global C symbols from \`$arg'"
4621 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4622 $run eval '$echo ": $name " >> "$nlist"'
4623 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4624 done
4625
4626 if test -z "$run"; then
4627 # Make sure we have at least an empty file.
4628 test -f "$nlist" || : > "$nlist"
4629
4630 if test -n "$exclude_expsyms"; then
4631 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4632 $mv "$nlist"T "$nlist"
4633 fi
4634
4635 # Try sorting and uniquifying the output.
4636 if grep -v "^: " < "$nlist" |
4637 if sort -k 3 </dev/null >/dev/null 2>&1; then
4638 sort -k 3
4639 else
4640 sort +2
4641 fi |
4642 uniq > "$nlist"S; then
4643 :
4644 else
4645 grep -v "^: " < "$nlist" > "$nlist"S
4646 fi
4647
4648 if test -f "$nlist"S; then
4649 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4650 else
4651 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4652 fi
4653
4654 $echo >> "$output_objdir/$dlsyms" "\
4655
4656 #undef lt_preloaded_symbols
4657
4658 #if defined (__STDC__) && __STDC__
4659 # define lt_ptr void *
4660 #else
4661 # define lt_ptr char *
4662 # define const
4663 #endif
4664
4665 /* The mapping between symbol names and symbols. */
4666 "
4667
4668 case $host in
4669 *cygwin* | *mingw* )
4670 $echo >> "$output_objdir/$dlsyms" "\
4671 /* DATA imports from DLLs on WIN32 can't be const, because
4672 runtime relocations are performed -- see ld's documentation
4673 on pseudo-relocs */
4674 struct {
4675 "
4676 ;;
4677 * )
4678 $echo >> "$output_objdir/$dlsyms" "\
4679 const struct {
4680 "
4681 ;;
4682 esac
4683
4684
4685 $echo >> "$output_objdir/$dlsyms" "\
4686 const char *name;
4687 lt_ptr address;
4688 }
4689 lt_preloaded_symbols[] =
4690 {\
4691 "
4692
4693 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4694
4695 $echo >> "$output_objdir/$dlsyms" "\
4696 {0, (lt_ptr) 0}
4697 };
4698
4699 /* This works around a problem in FreeBSD linker */
4700 #ifdef FREEBSD_WORKAROUND
4701 static const void *lt_preloaded_setup() {
4702 return lt_preloaded_symbols;
4703 }
4704 #endif
4705
4706 #ifdef __cplusplus
4707 }
4708 #endif\
4709 "
4710 fi
4711
4712 pic_flag_for_symtable=
4713 case $host in
4714 # compiling the symbol table file with pic_flag works around
4715 # a FreeBSD bug that causes programs to crash when -lm is
4716 # linked before any other PIC object. But we must not use
4717 # pic_flag when linking with -static. The problem exists in
4718 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4719 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4720 case "$compile_command " in
4721 *" -static "*) ;;
4722 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4723 esac;;
4724 *-*-hpux*)
4725 case "$compile_command " in
4726 *" -static "*) ;;
4727 *) pic_flag_for_symtable=" $pic_flag";;
4728 esac
4729 esac
4730
4731 # Now compile the dynamic symbol file.
4732 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4733 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4734
4735 # Clean up the generated files.
4736 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4737 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4738
4739 # Transform the symbol file into the correct name.
4740 case $host in
4741 *cygwin* | *mingw* )
4742 if test -f "$output_objdir/${outputname}.def" ; then
4743 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4744 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
4745 else
4746 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4747 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4748 fi
4749 ;;
4750 * )
4751 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4752 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
4753 ;;
4754 esac
4755 ;;
4756 *)
4757 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4758 exit $EXIT_FAILURE
4759 ;;
4760 esac
4761 else
4762 # We keep going just in case the user didn't refer to
4763 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4764 # really was required.
4765
4766 # Nullify the symbol file.
4767 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4768 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
4769 fi
4770
4771 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4772 # Replace the output file specification.
4773 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
4774 link_command="$compile_command$compile_rpath"
4775
4776 # We have no uninstalled library dependencies, so finalize right now.
4777 $show "$link_command"
4778 $run eval "$link_command"
4779 exit_status=$?
4780
4781 # Delete the generated files.
4782 if test -n "$dlsyms"; then
4783 $show "$rm $output_objdir/${outputname}S.${objext}"
4784 $run $rm "$output_objdir/${outputname}S.${objext}"
4785 fi
4786
4787 exit $exit_status
4788 fi
4789
4790 if test -n "$shlibpath_var"; then
4791 # We should set the shlibpath_var
4792 rpath=
4793 for dir in $temp_rpath; do
4794 case $dir in
4795 [\\/]* | [A-Za-z]:[\\/]*)
4796 # Absolute path.
4797 rpath="$rpath$dir:"
4798 ;;
4799 *)
4800 # Relative path: add a thisdir entry.
4801 rpath="$rpath\$thisdir/$dir:"
4802 ;;
4803 esac
4804 done
4805 temp_rpath="$rpath"
4806 fi
4807
4808 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4809 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4810 fi
4811 if test -n "$finalize_shlibpath"; then
4812 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4813 fi
4814
4815 compile_var=
4816 finalize_var=
4817 if test -n "$runpath_var"; then
4818 if test -n "$perm_rpath"; then
4819 # We should set the runpath_var.
4820 rpath=
4821 for dir in $perm_rpath; do
4822 rpath="$rpath$dir:"
4823 done
4824 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4825 fi
4826 if test -n "$finalize_perm_rpath"; then
4827 # We should set the runpath_var.
4828 rpath=
4829 for dir in $finalize_perm_rpath; do
4830 rpath="$rpath$dir:"
4831 done
4832 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4833 fi
4834 fi
4835
4836 if test "$no_install" = yes; then
4837 # We don't need to create a wrapper script.
4838 link_command="$compile_var$compile_command$compile_rpath"
4839 # Replace the output file specification.
4840 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4841 # Delete the old output file.
4842 $run $rm $output
4843 # Link the executable and exit
4844 $show "$link_command"
4845 $run eval "$link_command" || exit $?
4846 exit $EXIT_SUCCESS
4847 fi
4848
4849 if test "$hardcode_action" = relink; then
4850 # Fast installation is not supported
4851 link_command="$compile_var$compile_command$compile_rpath"
4852 relink_command="$finalize_var$finalize_command$finalize_rpath"
4853
4854 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4855 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4856 else
4857 if test "$fast_install" != no; then
4858 link_command="$finalize_var$compile_command$finalize_rpath"
4859 if test "$fast_install" = yes; then
4860 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
4861 else
4862 # fast_install is set to needless
4863 relink_command=
4864 fi
4865 else
4866 link_command="$compile_var$compile_command$compile_rpath"
4867 relink_command="$finalize_var$finalize_command$finalize_rpath"
4868 fi
4869 fi
4870
4871 # Replace the output file specification.
4872 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4873
4874 # Delete the old output files.
4875 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4876
4877 $show "$link_command"
4878 $run eval "$link_command" || exit $?
4879
4880 # Now create the wrapper script.
4881 $show "creating $output"
4882
4883 # Quote the relink command for shipping.
4884 if test -n "$relink_command"; then
4885 # Preserve any variables that may affect compiler behavior
4886 for var in $variables_saved_for_relink; do
4887 if eval test -z \"\${$var+set}\"; then
4888 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4889 elif eval var_value=\$$var; test -z "$var_value"; then
4890 relink_command="$var=; export $var; $relink_command"
4891 else
4892 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4893 relink_command="$var=\"$var_value\"; export $var; $relink_command"
4894 fi
4895 done
4896 relink_command="(cd `pwd`; $relink_command)"
4897 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
4898 fi
4899
4900 # Quote $echo for shipping.
4901 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4902 case $progpath in
4903 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4904 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4905 esac
4906 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4907 else
4908 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4909 fi
4910
4911 # Only actually do things if our run command is non-null.
4912 if test -z "$run"; then
4913 # win32 will think the script is a binary if it has
4914 # a .exe suffix, so we strip it off here.
4915 case $output in
4916 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4917 esac
4918 # test for cygwin because mv fails w/o .exe extensions
4919 case $host in
4920 *cygwin*)
4921 exeext=.exe
4922 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4923 *) exeext= ;;
4924 esac
4925 case $host in
4926 *cygwin* | *mingw* )
4927 output_name=`basename $output`
4928 output_path=`dirname $output`
4929 cwrappersource="$output_path/$objdir/lt-$output_name.c"
4930 cwrapper="$output_path/$output_name.exe"
4931 $rm $cwrappersource $cwrapper
4932 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4933
4934 cat > $cwrappersource <<EOF
4935
4936 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4937 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4938
4939 The $output program cannot be directly executed until all the libtool
4940 libraries that it depends on are installed.
4941
4942 This wrapper executable should never be moved out of the build directory.
4943 If it is, it will not operate correctly.
4944
4945 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4946 but could eventually absorb all of the scripts functionality and
4947 exec $objdir/$outputname directly.
4948 */
4949 EOF
4950 cat >> $cwrappersource<<"EOF"
4951 #include <stdio.h>
4952 #include <stdlib.h>
4953 #include <unistd.h>
4954 #include <malloc.h>
4955 #include <stdarg.h>
4956 #include <assert.h>
4957 #include <string.h>
4958 #include <ctype.h>
4959 #include <sys/stat.h>
4960
4961 #if defined(PATH_MAX)
4962 # define LT_PATHMAX PATH_MAX
4963 #elif defined(MAXPATHLEN)
4964 # define LT_PATHMAX MAXPATHLEN
4965 #else
4966 # define LT_PATHMAX 1024
4967 #endif
4968
4969 #ifndef DIR_SEPARATOR
4970 # define DIR_SEPARATOR '/'
4971 # define PATH_SEPARATOR ':'
4972 #endif
4973
4974 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4975 defined (__OS2__)
4976 # define HAVE_DOS_BASED_FILE_SYSTEM
4977 # ifndef DIR_SEPARATOR_2
4978 # define DIR_SEPARATOR_2 '\\'
4979 # endif
4980 # ifndef PATH_SEPARATOR_2
4981 # define PATH_SEPARATOR_2 ';'
4982 # endif
4983 #endif
4984
4985 #ifndef DIR_SEPARATOR_2
4986 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4987 #else /* DIR_SEPARATOR_2 */
4988 # define IS_DIR_SEPARATOR(ch) \
4989 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4990 #endif /* DIR_SEPARATOR_2 */
4991
4992 #ifndef PATH_SEPARATOR_2
4993 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
4994 #else /* PATH_SEPARATOR_2 */
4995 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
4996 #endif /* PATH_SEPARATOR_2 */
4997
4998 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4999 #define XFREE(stale) do { \
5000 if (stale) { free ((void *) stale); stale = 0; } \
5001 } while (0)
5002
5003 /* -DDEBUG is fairly common in CFLAGS. */
5004 #undef DEBUG
5005 #if defined DEBUGWRAPPER
5006 # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5007 #else
5008 # define DEBUG(format, ...)
5009 #endif
5010
5011 const char *program_name = NULL;
5012
5013 void * xmalloc (size_t num);
5014 char * xstrdup (const char *string);
5015 const char * base_name (const char *name);
5016 char * find_executable(const char *wrapper);
5017 int check_executable(const char *path);
5018 char * strendzap(char *str, const char *pat);
5019 void lt_fatal (const char *message, ...);
5020
5021 int
5022 main (int argc, char *argv[])
5023 {
5024 char **newargz;
5025 int i;
5026
5027 program_name = (char *) xstrdup (base_name (argv[0]));
5028 DEBUG("(main) argv[0] : %s\n",argv[0]);
5029 DEBUG("(main) program_name : %s\n",program_name);
5030 newargz = XMALLOC(char *, argc+2);
5031 EOF
5032
5033 cat >> $cwrappersource <<EOF
5034 newargz[0] = (char *) xstrdup("$SHELL");
5035 EOF
5036
5037 cat >> $cwrappersource <<"EOF"
5038 newargz[1] = find_executable(argv[0]);
5039 if (newargz[1] == NULL)
5040 lt_fatal("Couldn't find %s", argv[0]);
5041 DEBUG("(main) found exe at : %s\n",newargz[1]);
5042 /* we know the script has the same name, without the .exe */
5043 /* so make sure newargz[1] doesn't end in .exe */
5044 strendzap(newargz[1],".exe");
5045 for (i = 1; i < argc; i++)
5046 newargz[i+1] = xstrdup(argv[i]);
5047 newargz[argc+1] = NULL;
5048
5049 for (i=0; i<argc+1; i++)
5050 {
5051 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5052 ;
5053 }
5054
5055 EOF
5056
5057 case $host_os in
5058 mingw*)
5059 cat >> $cwrappersource <<EOF
5060 execv("$SHELL",(char const **)newargz);
5061 EOF
5062 ;;
5063 *)
5064 cat >> $cwrappersource <<EOF
5065 execv("$SHELL",newargz);
5066 EOF
5067 ;;
5068 esac
5069
5070 cat >> $cwrappersource <<"EOF"
5071 return 127;
5072 }
5073
5074 void *
5075 xmalloc (size_t num)
5076 {
5077 void * p = (void *) malloc (num);
5078 if (!p)
5079 lt_fatal ("Memory exhausted");
5080
5081 return p;
5082 }
5083
5084 char *
5085 xstrdup (const char *string)
5086 {
5087 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5088 ;
5089 }
5090
5091 const char *
5092 base_name (const char *name)
5093 {
5094 const char *base;
5095
5096 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5097 /* Skip over the disk name in MSDOS pathnames. */
5098 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5099 name += 2;
5100 #endif
5101
5102 for (base = name; *name; name++)
5103 if (IS_DIR_SEPARATOR (*name))
5104 base = name + 1;
5105 return base;
5106 }
5107
5108 int
5109 check_executable(const char * path)
5110 {
5111 struct stat st;
5112
5113 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5114 if ((!path) || (!*path))
5115 return 0;
5116
5117 if ((stat (path, &st) >= 0) &&
5118 (
5119 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5120 #if defined (S_IXOTH)
5121 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5122 #endif
5123 #if defined (S_IXGRP)
5124 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5125 #endif
5126 ((st.st_mode & S_IXUSR) == S_IXUSR))
5127 )
5128 return 1;
5129 else
5130 return 0;
5131 }
5132
5133 /* Searches for the full path of the wrapper. Returns
5134 newly allocated full path name if found, NULL otherwise */
5135 char *
5136 find_executable (const char* wrapper)
5137 {
5138 int has_slash = 0;
5139 const char* p;
5140 const char* p_next;
5141 /* static buffer for getcwd */
5142 char tmp[LT_PATHMAX + 1];
5143 int tmp_len;
5144 char* concat_name;
5145
5146 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5147
5148 if ((wrapper == NULL) || (*wrapper == '\0'))
5149 return NULL;
5150
5151 /* Absolute path? */
5152 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5153 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5154 {
5155 concat_name = xstrdup (wrapper);
5156 if (check_executable(concat_name))
5157 return concat_name;
5158 XFREE(concat_name);
5159 }
5160 else
5161 {
5162 #endif
5163 if (IS_DIR_SEPARATOR (wrapper[0]))
5164 {
5165 concat_name = xstrdup (wrapper);
5166 if (check_executable(concat_name))
5167 return concat_name;
5168 XFREE(concat_name);
5169 }
5170 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5171 }
5172 #endif
5173
5174 for (p = wrapper; *p; p++)
5175 if (*p == '/')
5176 {
5177 has_slash = 1;
5178 break;
5179 }
5180 if (!has_slash)
5181 {
5182 /* no slashes; search PATH */
5183 const char* path = getenv ("PATH");
5184 if (path != NULL)
5185 {
5186 for (p = path; *p; p = p_next)
5187 {
5188 const char* q;
5189 size_t p_len;
5190 for (q = p; *q; q++)
5191 if (IS_PATH_SEPARATOR(*q))
5192 break;
5193 p_len = q - p;
5194 p_next = (*q == '\0' ? q : q + 1);
5195 if (p_len == 0)
5196 {
5197 /* empty path: current directory */
5198 if (getcwd (tmp, LT_PATHMAX) == NULL)
5199 lt_fatal ("getcwd failed");
5200 tmp_len = strlen(tmp);
5201 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5202 memcpy (concat_name, tmp, tmp_len);
5203 concat_name[tmp_len] = '/';
5204 strcpy (concat_name + tmp_len + 1, wrapper);
5205 }
5206 else
5207 {
5208 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5209 memcpy (concat_name, p, p_len);
5210 concat_name[p_len] = '/';
5211 strcpy (concat_name + p_len + 1, wrapper);
5212 }
5213 if (check_executable(concat_name))
5214 return concat_name;
5215 XFREE(concat_name);
5216 }
5217 }
5218 /* not found in PATH; assume curdir */
5219 }
5220 /* Relative path | not found in path: prepend cwd */
5221 if (getcwd (tmp, LT_PATHMAX) == NULL)
5222 lt_fatal ("getcwd failed");
5223 tmp_len = strlen(tmp);
5224 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5225 memcpy (concat_name, tmp, tmp_len);
5226 concat_name[tmp_len] = '/';
5227 strcpy (concat_name + tmp_len + 1, wrapper);
5228
5229 if (check_executable(concat_name))
5230 return concat_name;
5231 XFREE(concat_name);
5232 return NULL;
5233 }
5234
5235 char *
5236 strendzap(char *str, const char *pat)
5237 {
5238 size_t len, patlen;
5239
5240 assert(str != NULL);
5241 assert(pat != NULL);
5242
5243 len = strlen(str);
5244 patlen = strlen(pat);
5245
5246 if (patlen <= len)
5247 {
5248 str += len - patlen;
5249 if (strcmp(str, pat) == 0)
5250 *str = '\0';
5251 }
5252 return str;
5253 }
5254
5255 static void
5256 lt_error_core (int exit_status, const char * mode,
5257 const char * message, va_list ap)
5258 {
5259 fprintf (stderr, "%s: %s: ", program_name, mode);
5260 vfprintf (stderr, message, ap);
5261 fprintf (stderr, ".\n");
5262
5263 if (exit_status >= 0)
5264 exit (exit_status);
5265 }
5266
5267 void
5268 lt_fatal (const char *message, ...)
5269 {
5270 va_list ap;
5271 va_start (ap, message);
5272 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5273 va_end (ap);
5274 }
5275 EOF
5276 # we should really use a build-platform specific compiler
5277 # here, but OTOH, the wrappers (shell script and this C one)
5278 # are only useful if you want to execute the "real" binary.
5279 # Since the "real" binary is built for $host, then this
5280 # wrapper might as well be built for $host, too.
5281 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5282 ;;
5283 esac
5284 $rm $output
5285 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5286
5287 $echo > $output "\
5288 #! $SHELL
5289
5290 # $output - temporary wrapper script for $objdir/$outputname
5291 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5292 #
5293 # The $output program cannot be directly executed until all the libtool
5294 # libraries that it depends on are installed.
5295 #
5296 # This wrapper script should never be moved out of the build directory.
5297 # If it is, it will not operate correctly.
5298
5299 # Sed substitution that helps us do robust quoting. It backslashifies
5300 # metacharacters that are still active within double-quoted strings.
5301 Xsed='${SED} -e 1s/^X//'
5302 sed_quote_subst='$sed_quote_subst'
5303
5304 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5305 if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5306 emulate sh
5307 NULLCMD=:
5308 # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5309 # is contrary to our usage. Disable this feature.
5310 alias -g '\${1+\"\$@\"}'='\"\$@\"'
5311 setopt NO_GLOB_SUBST
5312 else
5313 case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5314 fi
5315 BIN_SH=xpg4; export BIN_SH # for Tru64
5316 DUALCASE=1; export DUALCASE # for MKS sh
5317
5318 # The HP-UX ksh and POSIX shell print the target directory to stdout
5319 # if CDPATH is set.
5320 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5321
5322 relink_command=\"$relink_command\"
5323
5324 # This environment variable determines our operation mode.
5325 if test \"\$libtool_install_magic\" = \"$magic\"; then
5326 # install mode needs the following variable:
5327 notinst_deplibs='$notinst_deplibs'
5328 else
5329 # When we are sourced in execute mode, \$file and \$echo are already set.
5330 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5331 echo=\"$qecho\"
5332 file=\"\$0\"
5333 # Make sure echo works.
5334 if test \"X\$1\" = X--no-reexec; then
5335 # Discard the --no-reexec flag, and continue.
5336 shift
5337 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5338 # Yippee, \$echo works!
5339 :
5340 else
5341 # Restart under the correct shell, and then maybe \$echo will work.
5342 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5343 fi
5344 fi\
5345 "
5346 $echo >> $output "\
5347
5348 # Find the directory that this script lives in.
5349 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5350 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5351
5352 # Follow symbolic links until we get to the real thisdir.
5353 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5354 while test -n \"\$file\"; do
5355 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5356
5357 # If there was a directory component, then change thisdir.
5358 if test \"x\$destdir\" != \"x\$file\"; then
5359 case \"\$destdir\" in
5360 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5361 *) thisdir=\"\$thisdir/\$destdir\" ;;
5362 esac
5363 fi
5364
5365 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5366 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5367 done
5368
5369 # Try to get the absolute directory name.
5370 absdir=\`cd \"\$thisdir\" && pwd\`
5371 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5372 "
5373
5374 if test "$fast_install" = yes; then
5375 $echo >> $output "\
5376 program=lt-'$outputname'$exeext
5377 progdir=\"\$thisdir/$objdir\"
5378
5379 if test ! -f \"\$progdir/\$program\" || \\
5380 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5381 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5382
5383 file=\"\$\$-\$program\"
5384
5385 if test ! -d \"\$progdir\"; then
5386 $mkdir \"\$progdir\"
5387 else
5388 $rm \"\$progdir/\$file\"
5389 fi"
5390
5391 $echo >> $output "\
5392
5393 # relink executable if necessary
5394 if test -n \"\$relink_command\"; then
5395 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5396 else
5397 $echo \"\$relink_command_output\" >&2
5398 $rm \"\$progdir/\$file\"
5399 exit $EXIT_FAILURE
5400 fi
5401 fi
5402
5403 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5404 { $rm \"\$progdir/\$program\";
5405 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5406 $rm \"\$progdir/\$file\"
5407 fi"
5408 else
5409 $echo >> $output "\
5410 program='$outputname'
5411 progdir=\"\$thisdir/$objdir\"
5412 "
5413 fi
5414
5415 $echo >> $output "\
5416
5417 if test -f \"\$progdir/\$program\"; then"
5418
5419 # Export our shlibpath_var if we have one.
5420 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5421 $echo >> $output "\
5422 # Add our own library path to $shlibpath_var
5423 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5424
5425 # Some systems cannot cope with colon-terminated $shlibpath_var
5426 # The second colon is a workaround for a bug in BeOS R4 sed
5427 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5428
5429 export $shlibpath_var
5430 "
5431 fi
5432
5433 # fixup the dll searchpath if we need to.
5434 if test -n "$dllsearchpath"; then
5435 $echo >> $output "\
5436 # Add the dll search path components to the executable PATH
5437 PATH=$dllsearchpath:\$PATH
5438 "
5439 fi
5440
5441 $echo >> $output "\
5442 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5443 # Run the actual program with our arguments.
5444 "
5445 case $host in
5446 # Backslashes separate directories on plain windows
5447 *-*-mingw | *-*-os2*)
5448 $echo >> $output "\
5449 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5450 "
5451 ;;
5452
5453 *)
5454 $echo >> $output "\
5455 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5456 "
5457 ;;
5458 esac
5459 $echo >> $output "\
5460 \$echo \"\$0: cannot exec \$program \$*\"
5461 exit $EXIT_FAILURE
5462 fi
5463 else
5464 # The program doesn't exist.
5465 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5466 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5467 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5468 exit $EXIT_FAILURE
5469 fi
5470 fi\
5471 "
5472 chmod +x $output
5473 fi
5474 exit $EXIT_SUCCESS
5475 ;;
5476 esac
5477
5478 # See if we need to build an old-fashioned archive.
5479 for oldlib in $oldlibs; do
5480
5481 if test "$build_libtool_libs" = convenience; then
5482 oldobjs="$libobjs_save"
5483 addlibs="$convenience"
5484 build_libtool_libs=no
5485 else
5486 if test "$build_libtool_libs" = module; then
5487 oldobjs="$libobjs_save"
5488 build_libtool_libs=no
5489 else
5490 oldobjs="$old_deplibs $non_pic_objects"
5491 fi
5492 addlibs="$old_convenience"
5493 fi
5494
5495 if test -n "$addlibs"; then
5496 gentop="$output_objdir/${outputname}x"
5497 generated="$generated $gentop"
5498
5499 func_extract_archives $gentop $addlibs
5500 oldobjs="$oldobjs $func_extract_archives_result"
5501 fi
5502
5503 # Do each command in the archive commands.
5504 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5505 cmds=$old_archive_from_new_cmds
5506 else
5507 # POSIX demands no paths to be encoded in archives. We have
5508 # to avoid creating archives with duplicate basenames if we
5509 # might have to extract them afterwards, e.g., when creating a
5510 # static archive out of a convenience library, or when linking
5511 # the entirety of a libtool archive into another (currently
5512 # not supported by libtool).
5513 if (for obj in $oldobjs
5514 do
5515 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5516 done | sort | sort -uc >/dev/null 2>&1); then
5517 :
5518 else
5519 $echo "copying selected object files to avoid basename conflicts..."
5520
5521 if test -z "$gentop"; then
5522 gentop="$output_objdir/${outputname}x"
5523 generated="$generated $gentop"
5524
5525 $show "${rm}r $gentop"
5526 $run ${rm}r "$gentop"
5527 $show "$mkdir $gentop"
5528 $run $mkdir "$gentop"
5529 exit_status=$?
5530 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5531 exit $exit_status
5532 fi
5533 fi
5534
5535 save_oldobjs=$oldobjs
5536 oldobjs=
5537 counter=1
5538 for obj in $save_oldobjs
5539 do
5540 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5541 case " $oldobjs " in
5542 " ") oldobjs=$obj ;;
5543 *[\ /]"$objbase "*)
5544 while :; do
5545 # Make sure we don't pick an alternate name that also
5546 # overlaps.
5547 newobj=lt$counter-$objbase
5548 counter=`expr $counter + 1`
5549 case " $oldobjs " in
5550 *[\ /]"$newobj "*) ;;
5551 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5552 esac
5553 done
5554 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5555 $run ln "$obj" "$gentop/$newobj" ||
5556 $run cp "$obj" "$gentop/$newobj"
5557 oldobjs="$oldobjs $gentop/$newobj"
5558 ;;
5559 *) oldobjs="$oldobjs $obj" ;;
5560 esac
5561 done
5562 fi
5563
5564 eval cmds=\"$old_archive_cmds\"
5565
5566 if len=`expr "X$cmds" : ".*"` &&
5567 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5568 cmds=$old_archive_cmds
5569 else
5570 # the command line is too long to link in one step, link in parts
5571 $echo "using piecewise archive linking..."
5572 save_RANLIB=$RANLIB
5573 RANLIB=:
5574 objlist=
5575 concat_cmds=
5576 save_oldobjs=$oldobjs
5577
5578 # Is there a better way of finding the last object in the list?
5579 for obj in $save_oldobjs
5580 do
5581 last_oldobj=$obj
5582 done
5583 for obj in $save_oldobjs
5584 do
5585 oldobjs="$objlist $obj"
5586 objlist="$objlist $obj"
5587 eval test_cmds=\"$old_archive_cmds\"
5588 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5589 test "$len" -le "$max_cmd_len"; then
5590 :
5591 else
5592 # the above command should be used before it gets too long
5593 oldobjs=$objlist
5594 if test "$obj" = "$last_oldobj" ; then
5595 RANLIB=$save_RANLIB
5596 fi
5597 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5598 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5599 objlist=
5600 fi
5601 done
5602 RANLIB=$save_RANLIB
5603 oldobjs=$objlist
5604 if test "X$oldobjs" = "X" ; then
5605 eval cmds=\"\$concat_cmds\"
5606 else
5607 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5608 fi
5609 fi
5610 fi
5611 save_ifs="$IFS"; IFS='~'
5612 for cmd in $cmds; do
5613 eval cmd=\"$cmd\"
5614 IFS="$save_ifs"
5615 $show "$cmd"
5616 $run eval "$cmd" || exit $?
5617 done
5618 IFS="$save_ifs"
5619 done
5620
5621 if test -n "$generated"; then
5622 $show "${rm}r$generated"
5623 $run ${rm}r$generated
5624 fi
5625
5626 # Now create the libtool archive.
5627 case $output in
5628 *.la)
5629 old_library=
5630 test "$build_old_libs" = yes && old_library="$libname.$libext"
5631 $show "creating $output"
5632
5633 # Preserve any variables that may affect compiler behavior
5634 for var in $variables_saved_for_relink; do
5635 if eval test -z \"\${$var+set}\"; then
5636 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5637 elif eval var_value=\$$var; test -z "$var_value"; then
5638 relink_command="$var=; export $var; $relink_command"
5639 else
5640 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5641 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5642 fi
5643 done
5644 # Quote the link command for shipping.
5645 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5646 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5647 if test "$hardcode_automatic" = yes ; then
5648 relink_command=
5649 fi
5650
5651
5652 # Only create the output if not a dry run.
5653 if test -z "$run"; then
5654 for installed in no yes; do
5655 if test "$installed" = yes; then
5656 if test -z "$install_libdir"; then
5657 break
5658 fi
5659 output="$output_objdir/$outputname"i
5660 # Replace all uninstalled libtool libraries with the installed ones
5661 newdependency_libs=
5662 for deplib in $dependency_libs; do
5663 case $deplib in
5664 *.la)
5665 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5666 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5667 if test -z "$libdir"; then
5668 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5669 exit $EXIT_FAILURE
5670 fi
5671 newdependency_libs="$newdependency_libs $libdir/$name"
5672 ;;
5673 *) newdependency_libs="$newdependency_libs $deplib" ;;
5674 esac
5675 done
5676 dependency_libs="$newdependency_libs"
5677 newdlfiles=
5678 for lib in $dlfiles; do
5679 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5680 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5681 if test -z "$libdir"; then
5682 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5683 exit $EXIT_FAILURE
5684 fi
5685 newdlfiles="$newdlfiles $libdir/$name"
5686 done
5687 dlfiles="$newdlfiles"
5688 newdlprefiles=
5689 for lib in $dlprefiles; do
5690 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5691 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5692 if test -z "$libdir"; then
5693 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5694 exit $EXIT_FAILURE
5695 fi
5696 newdlprefiles="$newdlprefiles $libdir/$name"
5697 done
5698 dlprefiles="$newdlprefiles"
5699 else
5700 newdlfiles=
5701 for lib in $dlfiles; do
5702 case $lib in
5703 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5704 *) abs=`pwd`"/$lib" ;;
5705 esac
5706 newdlfiles="$newdlfiles $abs"
5707 done
5708 dlfiles="$newdlfiles"
5709 newdlprefiles=
5710 for lib in $dlprefiles; do
5711 case $lib in
5712 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5713 *) abs=`pwd`"/$lib" ;;
5714 esac
5715 newdlprefiles="$newdlprefiles $abs"
5716 done
5717 dlprefiles="$newdlprefiles"
5718 fi
5719 $rm $output
5720 # place dlname in correct position for cygwin
5721 tdlname=$dlname
5722 case $host,$output,$installed,$module,$dlname in
5723 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5724 esac
5725 $echo > $output "\
5726 # $outputname - a libtool library file
5727 # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5728 #
5729 # Please DO NOT delete this file!
5730 # It is necessary for linking the library.
5731
5732 # The name that we can dlopen(3).
5733 dlname='$tdlname'
5734
5735 # Names of this library.
5736 library_names='$library_names'
5737
5738 # The name of the static archive.
5739 old_library='$old_library'
5740
5741 # Libraries that this one depends upon.
5742 dependency_libs='$dependency_libs'
5743
5744 # Version information for $libname.
5745 current=$current
5746 age=$age
5747 revision=$revision
5748
5749 # Is this an already installed library?
5750 installed=$installed
5751
5752 # Should we warn about portability when linking against -modules?
5753 shouldnotlink=$module
5754
5755 # Files to dlopen/dlpreopen
5756 dlopen='$dlfiles'
5757 dlpreopen='$dlprefiles'
5758
5759 # Directory that this library needs to be installed in:
5760 libdir='$install_libdir'"
5761 if test "$installed" = no && test "$need_relink" = yes; then
5762 $echo >> $output "\
5763 relink_command=\"$relink_command\""
5764 fi
5765 done
5766 fi
5767
5768 # Do a symbolic link so that the libtool archive can be found in
5769 # LD_LIBRARY_PATH before the program is installed.
5770 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5771 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5772 ;;
5773 esac
5774 exit $EXIT_SUCCESS
5775 ;;
5776
5777 # libtool install mode
5778 install)
5779 modename="$modename: install"
5780
5781 # There may be an optional sh(1) argument at the beginning of
5782 # install_prog (especially on Windows NT).
5783 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5784 # Allow the use of GNU shtool's install command.
5785 $echo "X$nonopt" | grep shtool > /dev/null; then
5786 # Aesthetically quote it.
5787 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5788 case $arg in
5789 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5790 arg="\"$arg\""
5791 ;;
5792 esac
5793 install_prog="$arg "
5794 arg="$1"
5795 shift
5796 else
5797 install_prog=
5798 arg=$nonopt
5799 fi
5800
5801 # The real first argument should be the name of the installation program.
5802 # Aesthetically quote it.
5803 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5804 case $arg in
5805 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5806 arg="\"$arg\""
5807 ;;
5808 esac
5809 install_prog="$install_prog$arg"
5810
5811 # We need to accept at least all the BSD install flags.
5812 dest=
5813 files=
5814 opts=
5815 prev=
5816 install_type=
5817 isdir=no
5818 stripme=
5819 for arg
5820 do
5821 if test -n "$dest"; then
5822 files="$files $dest"
5823 dest=$arg
5824 continue
5825 fi
5826
5827 case $arg in
5828 -d) isdir=yes ;;
5829 -f)
5830 case " $install_prog " in
5831 *[\\\ /]cp\ *) ;;
5832 *) prev=$arg ;;
5833 esac
5834 ;;
5835 -g | -m | -o) prev=$arg ;;
5836 -s)
5837 stripme=" -s"
5838 continue
5839 ;;
5840 -*)
5841 ;;
5842 *)
5843 # If the previous option needed an argument, then skip it.
5844 if test -n "$prev"; then
5845 prev=
5846 else
5847 dest=$arg
5848 continue
5849 fi
5850 ;;
5851 esac
5852
5853 # Aesthetically quote the argument.
5854 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5855 case $arg in
5856 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5857 arg="\"$arg\""
5858 ;;
5859 esac
5860 install_prog="$install_prog $arg"
5861 done
5862
5863 if test -z "$install_prog"; then
5864 $echo "$modename: you must specify an install program" 1>&2
5865 $echo "$help" 1>&2
5866 exit $EXIT_FAILURE
5867 fi
5868
5869 if test -n "$prev"; then
5870 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5871 $echo "$help" 1>&2
5872 exit $EXIT_FAILURE
5873 fi
5874
5875 if test -z "$files"; then
5876 if test -z "$dest"; then
5877 $echo "$modename: no file or destination specified" 1>&2
5878 else
5879 $echo "$modename: you must specify a destination" 1>&2
5880 fi
5881 $echo "$help" 1>&2
5882 exit $EXIT_FAILURE
5883 fi
5884
5885 # Strip any trailing slash from the destination.
5886 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5887
5888 # Check to see that the destination is a directory.
5889 test -d "$dest" && isdir=yes
5890 if test "$isdir" = yes; then
5891 destdir="$dest"
5892 destname=
5893 else
5894 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5895 test "X$destdir" = "X$dest" && destdir=.
5896 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5897
5898 # Not a directory, so check to see that there is only one file specified.
5899 set dummy $files
5900 if test "$#" -gt 2; then
5901 $echo "$modename: \`$dest' is not a directory" 1>&2
5902 $echo "$help" 1>&2
5903 exit $EXIT_FAILURE
5904 fi
5905 fi
5906 case $destdir in
5907 [\\/]* | [A-Za-z]:[\\/]*) ;;
5908 *)
5909 for file in $files; do
5910 case $file in
5911 *.lo) ;;
5912 *)
5913 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5914 $echo "$help" 1>&2
5915 exit $EXIT_FAILURE
5916 ;;
5917 esac
5918 done
5919 ;;
5920 esac
5921
5922 # This variable tells wrapper scripts just to set variables rather
5923 # than running their programs.
5924 libtool_install_magic="$magic"
5925
5926 staticlibs=
5927 future_libdirs=
5928 current_libdirs=
5929 for file in $files; do
5930
5931 # Do each installation.
5932 case $file in
5933 *.$libext)
5934 # Do the static libraries later.
5935 staticlibs="$staticlibs $file"
5936 ;;
5937
5938 *.la)
5939 # Check to see that this really is a libtool archive.
5940 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5941 else
5942 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5943 $echo "$help" 1>&2
5944 exit $EXIT_FAILURE
5945 fi
5946
5947 library_names=
5948 old_library=
5949 relink_command=
5950 # If there is no directory component, then add one.
5951 case $file in
5952 */* | *\\*) . $file ;;
5953 *) . ./$file ;;
5954 esac
5955
5956 # Add the libdir to current_libdirs if it is the destination.
5957 if test "X$destdir" = "X$libdir"; then
5958 case "$current_libdirs " in
5959 *" $libdir "*) ;;
5960 *) current_libdirs="$current_libdirs $libdir" ;;
5961 esac
5962 else
5963 # Note the libdir as a future libdir.
5964 case "$future_libdirs " in
5965 *" $libdir "*) ;;
5966 *) future_libdirs="$future_libdirs $libdir" ;;
5967 esac
5968 fi
5969
5970 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5971 test "X$dir" = "X$file/" && dir=
5972 dir="$dir$objdir"
5973
5974 if test -n "$relink_command"; then
5975 # Determine the prefix the user has applied to our future dir.
5976 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5977
5978 # Don't allow the user to place us outside of our expected
5979 # location b/c this prevents finding dependent libraries that
5980 # are installed to the same prefix.
5981 # At present, this check doesn't affect windows .dll's that
5982 # are installed into $libdir/../bin (currently, that works fine)
5983 # but it's something to keep an eye on.
5984 if test "$inst_prefix_dir" = "$destdir"; then
5985 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5986 exit $EXIT_FAILURE
5987 fi
5988
5989 if test -n "$inst_prefix_dir"; then
5990 # Stick the inst_prefix_dir data into the link command.
5991 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
5992 else
5993 relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
5994 fi
5995
5996 $echo "$modename: warning: relinking \`$file'" 1>&2
5997 $show "$relink_command"
5998 if $run eval "$relink_command"; then :
5999 else
6000 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6001 exit $EXIT_FAILURE
6002 fi
6003 fi
6004
6005 # See the names of the shared library.
6006 set dummy $library_names
6007 if test -n "$2"; then
6008 realname="$2"
6009 shift
6010 shift
6011
6012 srcname="$realname"
6013 test -n "$relink_command" && srcname="$realname"T
6014
6015 # Install the shared library and build the symlinks.
6016 $show "$install_prog $dir/$srcname $destdir/$realname"
6017 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
6018 if test -n "$stripme" && test -n "$striplib"; then
6019 $show "$striplib $destdir/$realname"
6020 $run eval "$striplib $destdir/$realname" || exit $?
6021 fi
6022
6023 if test "$#" -gt 0; then
6024 # Delete the old symlinks, and create new ones.
6025 # Try `ln -sf' first, because the `ln' binary might depend on
6026 # the symlink we replace! Solaris /bin/ln does not understand -f,
6027 # so we also need to try rm && ln -s.
6028 for linkname
6029 do
6030 if test "$linkname" != "$realname"; then
6031 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6032 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6033 fi
6034 done
6035 fi
6036
6037 # Do each command in the postinstall commands.
6038 lib="$destdir/$realname"
6039 cmds=$postinstall_cmds
6040 save_ifs="$IFS"; IFS='~'
6041 for cmd in $cmds; do
6042 IFS="$save_ifs"
6043 eval cmd=\"$cmd\"
6044 $show "$cmd"
6045 $run eval "$cmd" || {
6046 lt_exit=$?
6047
6048 # Restore the uninstalled library and exit
6049 if test "$mode" = relink; then
6050 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6051 fi
6052
6053 exit $lt_exit
6054 }
6055 done
6056 IFS="$save_ifs"
6057 fi
6058
6059 # Install the pseudo-library for information purposes.
6060 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6061 instname="$dir/$name"i
6062 $show "$install_prog $instname $destdir/$name"
6063 $run eval "$install_prog $instname $destdir/$name" || exit $?
6064
6065 # Maybe install the static library, too.
6066 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
6067 ;;
6068
6069 *.lo)
6070 # Install (i.e. copy) a libtool object.
6071
6072 # Figure out destination file name, if it wasn't already specified.
6073 if test -n "$destname"; then
6074 destfile="$destdir/$destname"
6075 else
6076 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6077 destfile="$destdir/$destfile"
6078 fi
6079
6080 # Deduce the name of the destination old-style object file.
6081 case $destfile in
6082 *.lo)
6083 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6084 ;;
6085 *.$objext)
6086 staticdest="$destfile"
6087 destfile=
6088 ;;
6089 *)
6090 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6091 $echo "$help" 1>&2
6092 exit $EXIT_FAILURE
6093 ;;
6094 esac
6095
6096 # Install the libtool object if requested.
6097 if test -n "$destfile"; then
6098 $show "$install_prog $file $destfile"
6099 $run eval "$install_prog $file $destfile" || exit $?
6100 fi
6101
6102 # Install the old object if enabled.
6103 if test "$build_old_libs" = yes; then
6104 # Deduce the name of the old-style object file.
6105 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
6106
6107 $show "$install_prog $staticobj $staticdest"
6108 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
6109 fi
6110 exit $EXIT_SUCCESS
6111 ;;
6112
6113 *)
6114 # Figure out destination file name, if it wasn't already specified.
6115 if test -n "$destname"; then
6116 destfile="$destdir/$destname"
6117 else
6118 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6119 destfile="$destdir/$destfile"
6120 fi
6121
6122 # If the file is missing, and there is a .exe on the end, strip it
6123 # because it is most likely a libtool script we actually want to
6124 # install
6125 stripped_ext=""
6126 case $file in
6127 *.exe)
6128 if test ! -f "$file"; then
6129 file=`$echo $file|${SED} 's,.exe$,,'`
6130 stripped_ext=".exe"
6131 fi
6132 ;;
6133 esac
6134
6135 # Do a test to see if this is really a libtool program.
6136 case $host in
6137 *cygwin*|*mingw*)
6138 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6139 ;;
6140 *)
6141 wrapper=$file
6142 ;;
6143 esac
6144 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6145 notinst_deplibs=
6146 relink_command=
6147
6148 # Note that it is not necessary on cygwin/mingw to append a dot to
6149 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6150 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6151 # `FILE.' does not work on cygwin managed mounts.
6152 #
6153 # If there is no directory component, then add one.
6154 case $wrapper in
6155 */* | *\\*) . ${wrapper} ;;
6156 *) . ./${wrapper} ;;
6157 esac
6158
6159 # Check the variables that should have been set.
6160 if test -z "$notinst_deplibs"; then
6161 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6162 exit $EXIT_FAILURE
6163 fi
6164
6165 finalize=yes
6166 for lib in $notinst_deplibs; do
6167 # Check to see that each library is installed.
6168 libdir=
6169 if test -f "$lib"; then
6170 # If there is no directory component, then add one.
6171 case $lib in
6172 */* | *\\*) . $lib ;;
6173 *) . ./$lib ;;
6174 esac
6175 fi
6176 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6177 if test -n "$libdir" && test ! -f "$libfile"; then
6178 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6179 finalize=no
6180 fi
6181 done
6182
6183 relink_command=
6184 # Note that it is not necessary on cygwin/mingw to append a dot to
6185 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6186 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6187 # `FILE.' does not work on cygwin managed mounts.
6188 #
6189 # If there is no directory component, then add one.
6190 case $wrapper in
6191 */* | *\\*) . ${wrapper} ;;
6192 *) . ./${wrapper} ;;
6193 esac
6194
6195 outputname=
6196 if test "$fast_install" = no && test -n "$relink_command"; then
6197 if test "$finalize" = yes && test -z "$run"; then
6198 tmpdir=`func_mktempdir`
6199 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6200 outputname="$tmpdir/$file"
6201 # Replace the output file specification.
6202 relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6203
6204 $show "$relink_command"
6205 if $run eval "$relink_command"; then :
6206 else
6207 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6208 ${rm}r "$tmpdir"
6209 continue
6210 fi
6211 file="$outputname"
6212 else
6213 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6214 fi
6215 else
6216 # Install the binary that we compiled earlier.
6217 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6218 fi
6219 fi
6220
6221 # remove .exe since cygwin /usr/bin/install will append another
6222 # one anyway
6223 case $install_prog,$host in
6224 */usr/bin/install*,*cygwin*)
6225 case $file:$destfile in
6226 *.exe:*.exe)
6227 # this is ok
6228 ;;
6229 *.exe:*)
6230 destfile=$destfile.exe
6231 ;;
6232 *:*.exe)
6233 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6234 ;;
6235 esac
6236 ;;
6237 esac
6238 $show "$install_prog$stripme $file $destfile"
6239 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6240 test -n "$outputname" && ${rm}r "$tmpdir"
6241 ;;
6242 esac
6243 done
6244
6245 for file in $staticlibs; do
6246 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6247
6248 # Set up the ranlib parameters.
6249 oldlib="$destdir/$name"
6250
6251 $show "$install_prog $file $oldlib"
6252 $run eval "$install_prog \$file \$oldlib" || exit $?
6253
6254 if test -n "$stripme" && test -n "$old_striplib"; then
6255 $show "$old_striplib $oldlib"
6256 $run eval "$old_striplib $oldlib" || exit $?
6257 fi
6258
6259 # Do each command in the postinstall commands.
6260 cmds=$old_postinstall_cmds
6261 save_ifs="$IFS"; IFS='~'
6262 for cmd in $cmds; do
6263 IFS="$save_ifs"
6264 eval cmd=\"$cmd\"
6265 $show "$cmd"
6266 $run eval "$cmd" || exit $?
6267 done
6268 IFS="$save_ifs"
6269 done
6270
6271 if test -n "$future_libdirs"; then
6272 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6273 fi
6274
6275 if test -n "$current_libdirs"; then
6276 # Maybe just do a dry run.
6277 test -n "$run" && current_libdirs=" -n$current_libdirs"
6278 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6279 else
6280 exit $EXIT_SUCCESS
6281 fi
6282 ;;
6283
6284 # libtool finish mode
6285 finish)
6286 modename="$modename: finish"
6287 libdirs="$nonopt"
6288 admincmds=
6289
6290 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6291 for dir
6292 do
6293 libdirs="$libdirs $dir"
6294 done
6295
6296 for libdir in $libdirs; do
6297 if test -n "$finish_cmds"; then
6298 # Do each command in the finish commands.
6299 cmds=$finish_cmds
6300 save_ifs="$IFS"; IFS='~'
6301 for cmd in $cmds; do
6302 IFS="$save_ifs"
6303 eval cmd=\"$cmd\"
6304 $show "$cmd"
6305 $run eval "$cmd" || admincmds="$admincmds
6306 $cmd"
6307 done
6308 IFS="$save_ifs"
6309 fi
6310 if test -n "$finish_eval"; then
6311 # Do the single finish_eval.
6312 eval cmds=\"$finish_eval\"
6313 $run eval "$cmds" || admincmds="$admincmds
6314 $cmds"
6315 fi
6316 done
6317 fi
6318
6319 # Exit here if they wanted silent mode.
6320 test "$show" = : && exit $EXIT_SUCCESS
6321
6322 $echo "X----------------------------------------------------------------------" | $Xsed
6323 $echo "Libraries have been installed in:"
6324 for libdir in $libdirs; do
6325 $echo " $libdir"
6326 done
6327 $echo
6328 $echo "If you ever happen to want to link against installed libraries"
6329 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6330 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6331 $echo "flag during linking and do at least one of the following:"
6332 if test -n "$shlibpath_var"; then
6333 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6334 $echo " during execution"
6335 fi
6336 if test -n "$runpath_var"; then
6337 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6338 $echo " during linking"
6339 fi
6340 if test -n "$hardcode_libdir_flag_spec"; then
6341 libdir=LIBDIR
6342 eval flag=\"$hardcode_libdir_flag_spec\"
6343
6344 $echo " - use the \`$flag' linker flag"
6345 fi
6346 if test -n "$admincmds"; then
6347 $echo " - have your system administrator run these commands:$admincmds"
6348 fi
6349 if test -f /etc/ld.so.conf; then
6350 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6351 fi
6352 $echo
6353 $echo "See any operating system documentation about shared libraries for"
6354 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6355 $echo "X----------------------------------------------------------------------" | $Xsed
6356 exit $EXIT_SUCCESS
6357 ;;
6358
6359 # libtool execute mode
6360 execute)
6361 modename="$modename: execute"
6362
6363 # The first argument is the command name.
6364 cmd="$nonopt"
6365 if test -z "$cmd"; then
6366 $echo "$modename: you must specify a COMMAND" 1>&2
6367 $echo "$help"
6368 exit $EXIT_FAILURE
6369 fi
6370
6371 # Handle -dlopen flags immediately.
6372 for file in $execute_dlfiles; do
6373 if test ! -f "$file"; then
6374 $echo "$modename: \`$file' is not a file" 1>&2
6375 $echo "$help" 1>&2
6376 exit $EXIT_FAILURE
6377 fi
6378
6379 dir=
6380 case $file in
6381 *.la)
6382 # Check to see that this really is a libtool archive.
6383 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6384 else
6385 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6386 $echo "$help" 1>&2
6387 exit $EXIT_FAILURE
6388 fi
6389
6390 # Read the libtool library.
6391 dlname=
6392 library_names=
6393
6394 # If there is no directory component, then add one.
6395 case $file in
6396 */* | *\\*) . $file ;;
6397 *) . ./$file ;;
6398 esac
6399
6400 # Skip this library if it cannot be dlopened.
6401 if test -z "$dlname"; then
6402 # Warn if it was a shared library.
6403 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6404 continue
6405 fi
6406
6407 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6408 test "X$dir" = "X$file" && dir=.
6409
6410 if test -f "$dir/$objdir/$dlname"; then
6411 dir="$dir/$objdir"
6412 else
6413 if test ! -f "$dir/$dlname"; then
6414 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6415 exit $EXIT_FAILURE
6416 fi
6417 fi
6418 ;;
6419
6420 *.lo)
6421 # Just add the directory containing the .lo file.
6422 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6423 test "X$dir" = "X$file" && dir=.
6424 ;;
6425
6426 *)
6427 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6428 continue
6429 ;;
6430 esac
6431
6432 # Get the absolute pathname.
6433 absdir=`cd "$dir" && pwd`
6434 test -n "$absdir" && dir="$absdir"
6435
6436 # Now add the directory to shlibpath_var.
6437 if eval "test -z \"\$$shlibpath_var\""; then
6438 eval "$shlibpath_var=\"\$dir\""
6439 else
6440 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6441 fi
6442 done
6443
6444 # This variable tells wrapper scripts just to set shlibpath_var
6445 # rather than running their programs.
6446 libtool_execute_magic="$magic"
6447
6448 # Check if any of the arguments is a wrapper script.
6449 args=
6450 for file
6451 do
6452 case $file in
6453 -*) ;;
6454 *)
6455 # Do a test to see if this is really a libtool program.
6456 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6457 # If there is no directory component, then add one.
6458 case $file in
6459 */* | *\\*) . $file ;;
6460 *) . ./$file ;;
6461 esac
6462
6463 # Transform arg to wrapped name.
6464 file="$progdir/$program"
6465 fi
6466 ;;
6467 esac
6468 # Quote arguments (to preserve shell metacharacters).
6469 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6470 args="$args \"$file\""
6471 done
6472
6473 if test -z "$run"; then
6474 if test -n "$shlibpath_var"; then
6475 # Export the shlibpath_var.
6476 eval "export $shlibpath_var"
6477 fi
6478
6479 # Restore saved environment variables
6480 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6481 do
6482 eval "if test \"\${save_$lt_var+set}\" = set; then
6483 $lt_var=\$save_$lt_var; export $lt_var
6484 fi"
6485 done
6486
6487 # Now prepare to actually exec the command.
6488 exec_cmd="\$cmd$args"
6489 else
6490 # Display what would be done.
6491 if test -n "$shlibpath_var"; then
6492 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6493 $echo "export $shlibpath_var"
6494 fi
6495 $echo "$cmd$args"
6496 exit $EXIT_SUCCESS
6497 fi
6498 ;;
6499
6500 # libtool clean and uninstall mode
6501 clean | uninstall)
6502 modename="$modename: $mode"
6503 rm="$nonopt"
6504 files=
6505 rmforce=
6506 exit_status=0
6507
6508 # This variable tells wrapper scripts just to set variables rather
6509 # than running their programs.
6510 libtool_install_magic="$magic"
6511
6512 for arg
6513 do
6514 case $arg in
6515 -f) rm="$rm $arg"; rmforce=yes ;;
6516 -*) rm="$rm $arg" ;;
6517 *) files="$files $arg" ;;
6518 esac
6519 done
6520
6521 if test -z "$rm"; then
6522 $echo "$modename: you must specify an RM program" 1>&2
6523 $echo "$help" 1>&2
6524 exit $EXIT_FAILURE
6525 fi
6526
6527 rmdirs=
6528
6529 origobjdir="$objdir"
6530 for file in $files; do
6531 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6532 if test "X$dir" = "X$file"; then
6533 dir=.
6534 objdir="$origobjdir"
6535 else
6536 objdir="$dir/$origobjdir"
6537 fi
6538 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6539 test "$mode" = uninstall && objdir="$dir"
6540
6541 # Remember objdir for removal later, being careful to avoid duplicates
6542 if test "$mode" = clean; then
6543 case " $rmdirs " in
6544 *" $objdir "*) ;;
6545 *) rmdirs="$rmdirs $objdir" ;;
6546 esac
6547 fi
6548
6549 # Don't error if the file doesn't exist and rm -f was used.
6550 if (test -L "$file") >/dev/null 2>&1 \
6551 || (test -h "$file") >/dev/null 2>&1 \
6552 || test -f "$file"; then
6553 :
6554 elif test -d "$file"; then
6555 exit_status=1
6556 continue
6557 elif test "$rmforce" = yes; then
6558 continue
6559 fi
6560
6561 rmfiles="$file"
6562
6563 case $name in
6564 *.la)
6565 # Possibly a libtool archive, so verify it.
6566 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6567 . $dir/$name
6568
6569 # Delete the libtool libraries and symlinks.
6570 for n in $library_names; do
6571 rmfiles="$rmfiles $objdir/$n"
6572 done
6573 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6574
6575 case "$mode" in
6576 clean)
6577 case " $library_names " in
6578 # " " in the beginning catches empty $dlname
6579 *" $dlname "*) ;;
6580 *) rmfiles="$rmfiles $objdir/$dlname" ;;
6581 esac
6582 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6583 ;;
6584 uninstall)
6585 if test -n "$library_names"; then
6586 # Do each command in the postuninstall commands.
6587 cmds=$postuninstall_cmds
6588 save_ifs="$IFS"; IFS='~'
6589 for cmd in $cmds; do
6590 IFS="$save_ifs"
6591 eval cmd=\"$cmd\"
6592 $show "$cmd"
6593 $run eval "$cmd"
6594 if test "$?" -ne 0 && test "$rmforce" != yes; then
6595 exit_status=1
6596 fi
6597 done
6598 IFS="$save_ifs"
6599 fi
6600
6601 if test -n "$old_library"; then
6602 # Do each command in the old_postuninstall commands.
6603 cmds=$old_postuninstall_cmds
6604 save_ifs="$IFS"; IFS='~'
6605 for cmd in $cmds; do
6606 IFS="$save_ifs"
6607 eval cmd=\"$cmd\"
6608 $show "$cmd"
6609 $run eval "$cmd"
6610 if test "$?" -ne 0 && test "$rmforce" != yes; then
6611 exit_status=1
6612 fi
6613 done
6614 IFS="$save_ifs"
6615 fi
6616 # FIXME: should reinstall the best remaining shared library.
6617 ;;
6618 esac
6619 fi
6620 ;;
6621
6622 *.lo)
6623 # Possibly a libtool object, so verify it.
6624 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6625
6626 # Read the .lo file
6627 . $dir/$name
6628
6629 # Add PIC object to the list of files to remove.
6630 if test -n "$pic_object" \
6631 && test "$pic_object" != none; then
6632 rmfiles="$rmfiles $dir/$pic_object"
6633 fi
6634
6635 # Add non-PIC object to the list of files to remove.
6636 if test -n "$non_pic_object" \
6637 && test "$non_pic_object" != none; then
6638 rmfiles="$rmfiles $dir/$non_pic_object"
6639 fi
6640 fi
6641 ;;
6642
6643 *)
6644 if test "$mode" = clean ; then
6645 noexename=$name
6646 case $file in
6647 *.exe)
6648 file=`$echo $file|${SED} 's,.exe$,,'`
6649 noexename=`$echo $name|${SED} 's,.exe$,,'`
6650 # $file with .exe has already been added to rmfiles,
6651 # add $file without .exe
6652 rmfiles="$rmfiles $file"
6653 ;;
6654 esac
6655 # Do a test to see if this is a libtool program.
6656 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6657 relink_command=
6658 . $dir/$noexename
6659
6660 # note $name still contains .exe if it was in $file originally
6661 # as does the version of $file that was added into $rmfiles
6662 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6663 if test "$fast_install" = yes && test -n "$relink_command"; then
6664 rmfiles="$rmfiles $objdir/lt-$name"
6665 fi
6666 if test "X$noexename" != "X$name" ; then
6667 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6668 fi
6669 fi
6670 fi
6671 ;;
6672 esac
6673 $show "$rm $rmfiles"
6674 $run $rm $rmfiles || exit_status=1
6675 done
6676 objdir="$origobjdir"
6677
6678 # Try to remove the ${objdir}s in the directories where we deleted files
6679 for dir in $rmdirs; do
6680 if test -d "$dir"; then
6681 $show "rmdir $dir"
6682 $run rmdir $dir >/dev/null 2>&1
6683 fi
6684 done
6685
6686 exit $exit_status
6687 ;;
6688
6689 "")
6690 $echo "$modename: you must specify a MODE" 1>&2
6691 $echo "$generic_help" 1>&2
6692 exit $EXIT_FAILURE
6693 ;;
6694 esac
6695
6696 if test -z "$exec_cmd"; then
6697 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6698 $echo "$generic_help" 1>&2
6699 exit $EXIT_FAILURE
6700 fi
6701 fi # test -z "$show_help"
6702
6703 if test -n "$exec_cmd"; then
6704 eval exec $exec_cmd
6705 exit $EXIT_FAILURE
6706 fi
6707
6708 # We need to display help for each of the modes.
6709 case $mode in
6710 "") $echo \
6711 "Usage: $modename [OPTION]... [MODE-ARG]...
6712
6713 Provide generalized library-building support services.
6714
6715 --config show all configuration variables
6716 --debug enable verbose shell tracing
6717 -n, --dry-run display commands without modifying any files
6718 --features display basic configuration information and exit
6719 --finish same as \`--mode=finish'
6720 --help display this help message and exit
6721 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6722 --quiet same as \`--silent'
6723 --silent don't print informational messages
6724 --tag=TAG use configuration variables from tag TAG
6725 --version print version information
6726
6727 MODE must be one of the following:
6728
6729 clean remove files from the build directory
6730 compile compile a source file into a libtool object
6731 execute automatically set library path, then run a program
6732 finish complete the installation of libtool libraries
6733 install install libraries or executables
6734 link create a library or an executable
6735 uninstall remove libraries from an installed directory
6736
6737 MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6738 a more detailed description of MODE.
6739
6740 Report bugs to <bug-libtool@gnu.org>."
6741 exit $EXIT_SUCCESS
6742 ;;
6743
6744 clean)
6745 $echo \
6746 "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6747
6748 Remove files from the build directory.
6749
6750 RM is the name of the program to use to delete files associated with each FILE
6751 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6752 to RM.
6753
6754 If FILE is a libtool library, object or program, all the files associated
6755 with it are deleted. Otherwise, only FILE itself is deleted using RM."
6756 ;;
6757
6758 compile)
6759 $echo \
6760 "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6761
6762 Compile a source file into a libtool library object.
6763
6764 This mode accepts the following additional options:
6765
6766 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6767 -prefer-pic try to building PIC objects only
6768 -prefer-non-pic try to building non-PIC objects only
6769 -static always build a \`.o' file suitable for static linking
6770
6771 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6772 from the given SOURCEFILE.
6773
6774 The output file name is determined by removing the directory component from
6775 SOURCEFILE, then substituting the C source code suffix \`.c' with the
6776 library object suffix, \`.lo'."
6777 ;;
6778
6779 execute)
6780 $echo \
6781 "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6782
6783 Automatically set library path, then run a program.
6784
6785 This mode accepts the following additional options:
6786
6787 -dlopen FILE add the directory containing FILE to the library path
6788
6789 This mode sets the library path environment variable according to \`-dlopen'
6790 flags.
6791
6792 If any of the ARGS are libtool executable wrappers, then they are translated
6793 into their corresponding uninstalled binary, and any of their required library
6794 directories are added to the library path.
6795
6796 Then, COMMAND is executed, with ARGS as arguments."
6797 ;;
6798
6799 finish)
6800 $echo \
6801 "Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6802
6803 Complete the installation of libtool libraries.
6804
6805 Each LIBDIR is a directory that contains libtool libraries.
6806
6807 The commands that this mode executes may require superuser privileges. Use
6808 the \`--dry-run' option if you just want to see what would be executed."
6809 ;;
6810
6811 install)
6812 $echo \
6813 "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6814
6815 Install executables or libraries.
6816
6817 INSTALL-COMMAND is the installation command. The first component should be
6818 either the \`install' or \`cp' program.
6819
6820 The rest of the components are interpreted as arguments to that command (only
6821 BSD-compatible install options are recognized)."
6822 ;;
6823
6824 link)
6825 $echo \
6826 "Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6827
6828 Link object files or libraries together to form another library, or to
6829 create an executable program.
6830
6831 LINK-COMMAND is a command using the C compiler that you would use to create
6832 a program from several object files.
6833
6834 The following components of LINK-COMMAND are treated specially:
6835
6836 -all-static do not do any dynamic linking at all
6837 -avoid-version do not add a version suffix if possible
6838 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6839 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6840 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6841 -export-symbols SYMFILE
6842 try to export only the symbols listed in SYMFILE
6843 -export-symbols-regex REGEX
6844 try to export only the symbols matching REGEX
6845 -LLIBDIR search LIBDIR for required installed libraries
6846 -lNAME OUTPUT-FILE requires the installed library libNAME
6847 -module build a library that can dlopened
6848 -no-fast-install disable the fast-install mode
6849 -no-install link a not-installable executable
6850 -no-undefined declare that a library does not refer to external symbols
6851 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6852 -objectlist FILE Use a list of object files found in FILE to specify objects
6853 -precious-files-regex REGEX
6854 don't remove output files matching REGEX
6855 -release RELEASE specify package release information
6856 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6857 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6858 -static do not do any dynamic linking of uninstalled libtool libraries
6859 -static-libtool-libs
6860 do not do any dynamic linking of libtool libraries
6861 -version-info CURRENT[:REVISION[:AGE]]
6862 specify library version info [each variable defaults to 0]
6863
6864 All other options (arguments beginning with \`-') are ignored.
6865
6866 Every other argument is treated as a filename. Files ending in \`.la' are
6867 treated as uninstalled libtool libraries, other files are standard or library
6868 object files.
6869
6870 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6871 only library objects (\`.lo' files) may be specified, and \`-rpath' is
6872 required, except when creating a convenience library.
6873
6874 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6875 using \`ar' and \`ranlib', or on Windows using \`lib'.
6876
6877 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6878 is created, otherwise an executable program is created."
6879 ;;
6880
6881 uninstall)
6882 $echo \
6883 "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6884
6885 Remove libraries from an installation directory.
6886
6887 RM is the name of the program to use to delete files associated with each FILE
6888 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6889 to RM.
6890
6891 If FILE is a libtool library, all the files associated with it are deleted.
6892 Otherwise, only FILE itself is deleted using RM."
6893 ;;
6894
6895 *)
6896 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6897 $echo "$help" 1>&2
6898 exit $EXIT_FAILURE
6899 ;;
6900 esac
6901
6902 $echo
6903 $echo "Try \`$modename --help' for more information about other modes."
6904
6905 exit $?
6906
6907 # The TAGs below are defined such that we never get into a situation
6908 # in which we disable both kinds of libraries. Given conflicting
6909 # choices, we go for a static library, that is the most portable,
6910 # since we can't tell whether shared libraries were disabled because
6911 # the user asked for that or because the platform doesn't support
6912 # them. This is particularly important on AIX, because we don't
6913 # support having both static and shared libraries enabled at the same
6914 # time on that platform, so we default to a shared-only configuration.
6915 # If a disable-shared tag is given, we'll fallback to a static-only
6916 # configuration. But we'll never go from static-only to shared-only.
6917
6918 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6919 disable_libs=shared
6920 # ### END LIBTOOL TAG CONFIG: disable-shared
6921
6922 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
6923 disable_libs=static
6924 # ### END LIBTOOL TAG CONFIG: disable-static
6925
6926 # Local Variables:
6927 # mode:shell-script
6928 # sh-indentation:2
6929 # End:
0 #! /bin/sh
1 # Common stub for a few missing GNU programs while installing.
2
3 scriptversion=2006-05-10.23
4
5 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
6 # Free Software Foundation, Inc.
7 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 # 02110-1301, USA.
23
24 # As a special exception to the GNU General Public License, if you
25 # distribute this file as part of a program that contains a
26 # configuration script generated by Autoconf, you may include it under
27 # the same distribution terms that you use for the rest of that program.
28
29 if test $# -eq 0; then
30 echo 1>&2 "Try \`$0 --help' for more information"
31 exit 1
32 fi
33
34 run=:
35 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
36 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
37
38 # In the cases where this matters, `missing' is being run in the
39 # srcdir already.
40 if test -f configure.ac; then
41 configure_ac=configure.ac
42 else
43 configure_ac=configure.in
44 fi
45
46 msg="missing on your system"
47
48 case $1 in
49 --run)
50 # Try to run requested program, and just exit if it succeeds.
51 run=
52 shift
53 "$@" && exit 0
54 # Exit code 63 means version mismatch. This often happens
55 # when the user try to use an ancient version of a tool on
56 # a file that requires a minimum version. In this case we
57 # we should proceed has if the program had been absent, or
58 # if --run hadn't been passed.
59 if test $? = 63; then
60 run=:
61 msg="probably too old"
62 fi
63 ;;
64
65 -h|--h|--he|--hel|--help)
66 echo "\
67 $0 [OPTION]... PROGRAM [ARGUMENT]...
68
69 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
70 error status if there is no known handling for PROGRAM.
71
72 Options:
73 -h, --help display this help and exit
74 -v, --version output version information and exit
75 --run try to run the given command, and emulate it if it fails
76
77 Supported PROGRAM values:
78 aclocal touch file \`aclocal.m4'
79 autoconf touch file \`configure'
80 autoheader touch file \`config.h.in'
81 autom4te touch the output file, or create a stub one
82 automake touch all \`Makefile.in' files
83 bison create \`y.tab.[ch]', if possible, from existing .[ch]
84 flex create \`lex.yy.c', if possible, from existing .c
85 help2man touch the output file
86 lex create \`lex.yy.c', if possible, from existing .c
87 makeinfo touch the output file
88 tar try tar, gnutar, gtar, then tar without non-portable flags
89 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
90
91 Send bug reports to <bug-automake@gnu.org>."
92 exit $?
93 ;;
94
95 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
96 echo "missing $scriptversion (GNU Automake)"
97 exit $?
98 ;;
99
100 -*)
101 echo 1>&2 "$0: Unknown \`$1' option"
102 echo 1>&2 "Try \`$0 --help' for more information"
103 exit 1
104 ;;
105
106 esac
107
108 # Now exit if we have it, but it failed. Also exit now if we
109 # don't have it and --version was passed (most likely to detect
110 # the program).
111 case $1 in
112 lex|yacc)
113 # Not GNU programs, they don't have --version.
114 ;;
115
116 tar)
117 if test -n "$run"; then
118 echo 1>&2 "ERROR: \`tar' requires --run"
119 exit 1
120 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
121 exit 1
122 fi
123 ;;
124
125 *)
126 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
127 # We have it, but it failed.
128 exit 1
129 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
130 # Could not run --version or --help. This is probably someone
131 # running `$TOOL --version' or `$TOOL --help' to check whether
132 # $TOOL exists and not knowing $TOOL uses missing.
133 exit 1
134 fi
135 ;;
136 esac
137
138 # If it does not exist, or fails to run (possibly an outdated version),
139 # try to emulate it.
140 case $1 in
141 aclocal*)
142 echo 1>&2 "\
143 WARNING: \`$1' is $msg. You should only need it if
144 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
145 to install the \`Automake' and \`Perl' packages. Grab them from
146 any GNU archive site."
147 touch aclocal.m4
148 ;;
149
150 autoconf)
151 echo 1>&2 "\
152 WARNING: \`$1' is $msg. You should only need it if
153 you modified \`${configure_ac}'. You might want to install the
154 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
155 archive site."
156 touch configure
157 ;;
158
159 autoheader)
160 echo 1>&2 "\
161 WARNING: \`$1' is $msg. You should only need it if
162 you modified \`acconfig.h' or \`${configure_ac}'. You might want
163 to install the \`Autoconf' and \`GNU m4' packages. Grab them
164 from any GNU archive site."
165 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
166 test -z "$files" && files="config.h"
167 touch_files=
168 for f in $files; do
169 case $f in
170 *:*) touch_files="$touch_files "`echo "$f" |
171 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
172 *) touch_files="$touch_files $f.in";;
173 esac
174 done
175 touch $touch_files
176 ;;
177
178 automake*)
179 echo 1>&2 "\
180 WARNING: \`$1' is $msg. You should only need it if
181 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
182 You might want to install the \`Automake' and \`Perl' packages.
183 Grab them from any GNU archive site."
184 find . -type f -name Makefile.am -print |
185 sed 's/\.am$/.in/' |
186 while read f; do touch "$f"; done
187 ;;
188
189 autom4te)
190 echo 1>&2 "\
191 WARNING: \`$1' is needed, but is $msg.
192 You might have modified some files without having the
193 proper tools for further handling them.
194 You can get \`$1' as part of \`Autoconf' from any GNU
195 archive site."
196
197 file=`echo "$*" | sed -n "$sed_output"`
198 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
199 if test -f "$file"; then
200 touch $file
201 else
202 test -z "$file" || exec >$file
203 echo "#! /bin/sh"
204 echo "# Created by GNU Automake missing as a replacement of"
205 echo "# $ $@"
206 echo "exit 0"
207 chmod +x $file
208 exit 1
209 fi
210 ;;
211
212 bison|yacc)
213 echo 1>&2 "\
214 WARNING: \`$1' $msg. You should only need it if
215 you modified a \`.y' file. You may need the \`Bison' package
216 in order for those modifications to take effect. You can get
217 \`Bison' from any GNU archive site."
218 rm -f y.tab.c y.tab.h
219 if test $# -ne 1; then
220 eval LASTARG="\${$#}"
221 case $LASTARG in
222 *.y)
223 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
224 if test -f "$SRCFILE"; then
225 cp "$SRCFILE" y.tab.c
226 fi
227 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
228 if test -f "$SRCFILE"; then
229 cp "$SRCFILE" y.tab.h
230 fi
231 ;;
232 esac
233 fi
234 if test ! -f y.tab.h; then
235 echo >y.tab.h
236 fi
237 if test ! -f y.tab.c; then
238 echo 'main() { return 0; }' >y.tab.c
239 fi
240 ;;
241
242 lex|flex)
243 echo 1>&2 "\
244 WARNING: \`$1' is $msg. You should only need it if
245 you modified a \`.l' file. You may need the \`Flex' package
246 in order for those modifications to take effect. You can get
247 \`Flex' from any GNU archive site."
248 rm -f lex.yy.c
249 if test $# -ne 1; then
250 eval LASTARG="\${$#}"
251 case $LASTARG in
252 *.l)
253 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
254 if test -f "$SRCFILE"; then
255 cp "$SRCFILE" lex.yy.c
256 fi
257 ;;
258 esac
259 fi
260 if test ! -f lex.yy.c; then
261 echo 'main() { return 0; }' >lex.yy.c
262 fi
263 ;;
264
265 help2man)
266 echo 1>&2 "\
267 WARNING: \`$1' is $msg. You should only need it if
268 you modified a dependency of a manual page. You may need the
269 \`Help2man' package in order for those modifications to take
270 effect. You can get \`Help2man' from any GNU archive site."
271
272 file=`echo "$*" | sed -n "$sed_output"`
273 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
274 if test -f "$file"; then
275 touch $file
276 else
277 test -z "$file" || exec >$file
278 echo ".ab help2man is required to generate this page"
279 exit 1
280 fi
281 ;;
282
283 makeinfo)
284 echo 1>&2 "\
285 WARNING: \`$1' is $msg. You should only need it if
286 you modified a \`.texi' or \`.texinfo' file, or any other file
287 indirectly affecting the aspect of the manual. The spurious
288 call might also be the consequence of using a buggy \`make' (AIX,
289 DU, IRIX). You might want to install the \`Texinfo' package or
290 the \`GNU make' package. Grab either from any GNU archive site."
291 # The file to touch is that specified with -o ...
292 file=`echo "$*" | sed -n "$sed_output"`
293 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
294 if test -z "$file"; then
295 # ... or it is the one specified with @setfilename ...
296 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
297 file=`sed -n '
298 /^@setfilename/{
299 s/.* \([^ ]*\) *$/\1/
300 p
301 q
302 }' $infile`
303 # ... or it is derived from the source name (dir/f.texi becomes f.info)
304 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
305 fi
306 # If the file does not exist, the user really needs makeinfo;
307 # let's fail without touching anything.
308 test -f $file || exit 1
309 touch $file
310 ;;
311
312 tar)
313 shift
314
315 # We have already tried tar in the generic part.
316 # Look for gnutar/gtar before invocation to avoid ugly error
317 # messages.
318 if (gnutar --version > /dev/null 2>&1); then
319 gnutar "$@" && exit 0
320 fi
321 if (gtar --version > /dev/null 2>&1); then
322 gtar "$@" && exit 0
323 fi
324 firstarg="$1"
325 if shift; then
326 case $firstarg in
327 *o*)
328 firstarg=`echo "$firstarg" | sed s/o//`
329 tar "$firstarg" "$@" && exit 0
330 ;;
331 esac
332 case $firstarg in
333 *h*)
334 firstarg=`echo "$firstarg" | sed s/h//`
335 tar "$firstarg" "$@" && exit 0
336 ;;
337 esac
338 fi
339
340 echo 1>&2 "\
341 WARNING: I can't seem to be able to run \`tar' with the given arguments.
342 You may want to install GNU tar or Free paxutils, or check the
343 command line arguments."
344 exit 1
345 ;;
346
347 *)
348 echo 1>&2 "\
349 WARNING: \`$1' is needed, and is $msg.
350 You might have modified some files without having the
351 proper tools for further handling them. Check the \`README' file,
352 it often tells you about the needed prerequisites for installing
353 this package. You may also peek at any GNU archive site, in case
354 some other package would contain this missing \`$1' program."
355 exit 1
356 ;;
357 esac
358
359 exit 0
360
361 # Local variables:
362 # eval: (add-hook 'write-file-hooks 'time-stamp)
363 # time-stamp-start: "scriptversion="
364 # time-stamp-format: "%:y-%02m-%02d.%02H"
365 # time-stamp-end: "$"
366 # End:
0 #! /bin/sh
1 # mkinstalldirs --- make directory hierarchy
2
3 scriptversion=2006-05-11.19
4
5 # Original author: Noah Friedman <friedman@prep.ai.mit.edu>
6 # Created: 1993-05-16
7 # Public domain.
8 #
9 # This file is maintained in Automake, please report
10 # bugs to <bug-automake@gnu.org> or send patches to
11 # <automake-patches@gnu.org>.
12
13 nl='
14 '
15 IFS=" "" $nl"
16 errstatus=0
17 dirmode=
18
19 usage="\
20 Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
21
22 Create each directory DIR (with mode MODE, if specified), including all
23 leading file name components.
24
25 Report bugs to <bug-automake@gnu.org>."
26
27 # process command line arguments
28 while test $# -gt 0 ; do
29 case $1 in
30 -h | --help | --h*) # -h for help
31 echo "$usage"
32 exit $?
33 ;;
34 -m) # -m PERM arg
35 shift
36 test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
37 dirmode=$1
38 shift
39 ;;
40 --version)
41 echo "$0 $scriptversion"
42 exit $?
43 ;;
44 --) # stop option processing
45 shift
46 break
47 ;;
48 -*) # unknown option
49 echo "$usage" 1>&2
50 exit 1
51 ;;
52 *) # first non-opt arg
53 break
54 ;;
55 esac
56 done
57
58 for file
59 do
60 if test -d "$file"; then
61 shift
62 else
63 break
64 fi
65 done
66
67 case $# in
68 0) exit 0 ;;
69 esac
70
71 # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
72 # mkdir -p a/c at the same time, both will detect that a is missing,
73 # one will create a, then the other will try to create a and die with
74 # a "File exists" error. This is a problem when calling mkinstalldirs
75 # from a parallel make. We use --version in the probe to restrict
76 # ourselves to GNU mkdir, which is thread-safe.
77 case $dirmode in
78 '')
79 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
80 echo "mkdir -p -- $*"
81 exec mkdir -p -- "$@"
82 else
83 # On NextStep and OpenStep, the `mkdir' command does not
84 # recognize any option. It will interpret all options as
85 # directories to create, and then abort because `.' already
86 # exists.
87 test -d ./-p && rmdir ./-p
88 test -d ./--version && rmdir ./--version
89 fi
90 ;;
91 *)
92 if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
93 test ! -d ./--version; then
94 echo "mkdir -m $dirmode -p -- $*"
95 exec mkdir -m "$dirmode" -p -- "$@"
96 else
97 # Clean up after NextStep and OpenStep mkdir.
98 for d in ./-m ./-p ./--version "./$dirmode";
99 do
100 test -d $d && rmdir $d
101 done
102 fi
103 ;;
104 esac
105
106 for file
107 do
108 case $file in
109 /*) pathcomp=/ ;;
110 *) pathcomp= ;;
111 esac
112 oIFS=$IFS
113 IFS=/
114 set fnord $file
115 shift
116 IFS=$oIFS
117
118 for d
119 do
120 test "x$d" = x && continue
121
122 pathcomp=$pathcomp$d
123 case $pathcomp in
124 -*) pathcomp=./$pathcomp ;;
125 esac
126
127 if test ! -d "$pathcomp"; then
128 echo "mkdir $pathcomp"
129
130 mkdir "$pathcomp" || lasterr=$?
131
132 if test ! -d "$pathcomp"; then
133 errstatus=$lasterr
134 else
135 if test ! -z "$dirmode"; then
136 echo "chmod $dirmode $pathcomp"
137 lasterr=
138 chmod "$dirmode" "$pathcomp" || lasterr=$?
139
140 if test ! -z "$lasterr"; then
141 errstatus=$lasterr
142 fi
143 fi
144 fi
145 fi
146
147 pathcomp=$pathcomp/
148 done
149 done
150
151 exit $errstatus
152
153 # Local Variables:
154 # mode: shell-script
155 # sh-indentation: 2
156 # eval: (add-hook 'write-file-hooks 'time-stamp)
157 # time-stamp-start: "scriptversion="
158 # time-stamp-format: "%:y-%02m-%02d.%02H"
159 # time-stamp-end: "$"
160 # End:
0 2007-08-01 David Zeuthen <davidz@redhat.com>
1
2 * da.po: Added Danish translations (feel free to fix these, I just
3 added them to ensure that i18n works)
4
0 # please keep this list sorted alphabetically
1 #
2 da
3
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 #
3 # This file file be copied and used freely without restrictions. It can
4 # be used in projects which are not available under the GNU Public License
5 # but which still want to provide support for the GNU gettext functionality.
6 # Please note that the actual code is *not* freely available.
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@novell.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 = /bin/sh
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) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
52 GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) 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; 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`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
59
60 USE_LINGUAS=$(shell if test -n "$(USER_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="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
63
64 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
65 EXTRA_DISTFILES = 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 .po.pox:
76 $(MAKE) $(GETTEXT_PACKAGE).pot
77 $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
78
79 .po.mo:
80 $(MSGFMT) -o $@ $<
81
82 .po.gmo:
83 file=`echo $* | sed 's,.*/,,'`.gmo \
84 && rm -f $$file && $(GMSGFMT) -o $$file $<
85
86 .po.cat:
87 sed -f ../intl/po2msg.sed < $< > $*.msg \
88 && rm -f $@ && gencat $@ $*.msg
89
90
91 all: all-@USE_NLS@
92
93 all-yes: $(CATALOGS)
94 all-no:
95
96 $(GETTEXT_PACKAGE).pot: $(POTFILES)
97 $(GENPOT)
98
99 install: install-data
100 install-data: install-data-@USE_NLS@
101 install-data-no: all
102 install-data-yes: all
103 $(mkdir_p) $(DESTDIR)$(itlocaledir)
104 linguas="$(USE_LINGUAS)"; \
105 for lang in $$linguas; do \
106 dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
107 $(mkdir_p) $$dir; \
108 if test -r $$lang.gmo; then \
109 $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
110 echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
111 else \
112 $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
113 echo "installing $(srcdir)/$$lang.gmo as" \
114 "$$dir/$(GETTEXT_PACKAGE).mo"; \
115 fi; \
116 if test -r $$lang.gmo.m; then \
117 $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
118 echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
119 else \
120 if test -r $(srcdir)/$$lang.gmo.m ; then \
121 $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
122 $$dir/$(GETTEXT_PACKAGE).mo.m; \
123 echo "installing $(srcdir)/$$lang.gmo.m as" \
124 "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
125 else \
126 true; \
127 fi; \
128 fi; \
129 done
130
131 # Empty stubs to satisfy archaic automake needs
132 dvi info tags TAGS ID:
133
134 # Define this as empty until I found a useful application.
135 install-exec installcheck:
136
137 uninstall:
138 linguas="$(USE_LINGUAS)"; \
139 for lang in $$linguas; do \
140 rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
141 rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
142 done
143
144 check: all $(GETTEXT_PACKAGE).pot
145 rm -f missing notexist
146 srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
147 if [ -r missing -o -r notexist ]; then \
148 exit 1; \
149 fi
150
151 mostlyclean:
152 rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
153 rm -f .intltool-merge-cache
154
155 clean: mostlyclean
156
157 distclean: clean
158 rm -f Makefile Makefile.in POTFILES stamp-it
159 rm -f *.mo *.msg *.cat *.cat.m *.gmo
160
161 maintainer-clean: distclean
162 @echo "This command is intended for maintainers to use;"
163 @echo "it deletes files that may require special tools to rebuild."
164 rm -f Makefile.in.in
165
166 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
167 dist distdir: $(DISTFILES)
168 dists="$(DISTFILES)"; \
169 extra_dists="$(EXTRA_DISTFILES)"; \
170 for file in $$extra_dists; do \
171 test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
172 done; \
173 for file in $$dists; do \
174 test -f $$file || file="$(srcdir)/$$file"; \
175 ln $$file $(distdir) 2> /dev/null \
176 || cp -p $$file $(distdir); \
177 done
178
179 update-po: Makefile
180 $(MAKE) $(GETTEXT_PACKAGE).pot
181 tmpdir=`pwd`; \
182 linguas="$(USE_LINGUAS)"; \
183 for lang in $$linguas; do \
184 echo "$$lang:"; \
185 result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
186 if $$result; then \
187 if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
188 rm -f $$tmpdir/$$lang.new.po; \
189 else \
190 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
191 :; \
192 else \
193 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
194 rm -f $$tmpdir/$$lang.new.po; \
195 exit 1; \
196 fi; \
197 fi; \
198 else \
199 echo "msgmerge for $$lang.gmo failed!"; \
200 rm -f $$tmpdir/$$lang.new.po; \
201 fi; \
202 done
203
204 Makefile POTFILES: stamp-it
205 @if test ! -f $@; then \
206 rm -f stamp-it; \
207 $(MAKE) stamp-it; \
208 fi
209
210 stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
211 cd $(top_builddir) \
212 && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
213 $(SHELL) ./config.status
214
215 # Tell versions [3.59,3.63) of GNU make not to export all variables.
216 # Otherwise a system limit (for SysV at least) may be exceeded.
217 .NOEXPORT:
0 # List of source files containing translatable strings.
1 # Please keep this file sorted alphabetically.
2 examples/polkit-gnome-example.c
3 examples/polkit-gnome-example.policy.in
4 src/main.c
5 src/polkit-gnome-auth-dialog.c
6 src/polkit-gnome-manager.c
0 # Danish translation of PolicyKit-gnome.
1 # Copyright (C) 2007 David Zeuthen
2 # This file is distributed under the same license as the PACKAGE package.
3 # David Zeuthen <davidz@redhat.com>, 2007.
4 #
5 #, fuzzy
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PolicyKit-gnome\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2007-08-31 16:01-0400\n"
11 "PO-Revision-Date: 2007-07-31 17:43-0400\n"
12 "Last-Translator: David Zeuthen <davidz@redhat.com>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #: ../examples/polkit-gnome-example.c:213
19 msgid "This action is not permitted"
20 msgstr "Denne handling er ikke tilladt"
21
22 #: ../examples/polkit-gnome-example.c:225
23 #, c-format
24 msgid "This action requires authentication (%s)"
25 msgstr "Denne handling kræver autorisering"
26
27 #: ../examples/polkit-gnome-example.c:234
28 msgid "This action is permitted"
29 msgstr "Denne handling er tilladt"
30
31 #: ../examples/polkit-gnome-example.c:355
32 msgid "Making the helper <b>Frobnicate</b> requires the user to authenticate."
33 msgstr ""
34 "Brugeren er påkrævet at indtaste sit kodeord for at få hjælpe-programmet til "
35 "at <b>Frobnikere</b>"
36
37 #: ../examples/polkit-gnome-example.c:359
38 msgid "Frobnicate!"
39 msgstr "Frobniker!"
40
41 #: ../examples/polkit-gnome-example.c:370
42 msgid ""
43 "Making the helper <b>Tweak</b> requires a system administrator to "
44 "authenticate."
45 msgstr ""
46 "Brugeren er påkrævet at indtaste et administrativt kodeord for at få hjælpe-"
47 "programmet til at <b>Tvække</b>"
48
49 #: ../examples/polkit-gnome-example.c:374
50 msgid "Tweak!"
51 msgstr "Tvæk!"
52
53 #: ../examples/polkit-gnome-example.c:384
54 msgid ""
55 "Making the helper <b>Twiddle</b> requires a system administrator to "
56 "authenticate. Once authenticated, this privilege can be retained "
57 "indefinitely."
58 msgstr ""
59 "Brugeren er påkrævet at indtaste et administrativt kodeord for at få hjælpe-"
60 "programmet til at <b>Tviddle</b>. Dette privilegie kan blive husket for "
61 "evigt."
62
63 #: ../examples/polkit-gnome-example.c:388
64 msgid "Twiddle!"
65 msgstr "Tvidl!"
66
67 #: ../examples/polkit-gnome-example.c:398
68 msgid ""
69 "Making the helper <b>Punch</b> requires the user to authenticate. Once "
70 "authenticated, this privilege can be retained for the remainder of the "
71 "desktop session."
72 msgstr ""
73 "Brugeren er påkrævet at indtaste et kodeord for at få hjælpe-programmet til "
74 "at <b>Smadre</b>. Dette privilegie kan blive husket indtil log ud."
75
76 #: ../examples/polkit-gnome-example.c:402
77 msgid "Punch!"
78 msgstr "Smadre!"
79
80 #: ../examples/polkit-gnome-example.c:412
81 msgid ""
82 "Making the helper <b>Kick</b> can be done in different ways (this "
83 "demonstrates <i>annotations</i>). Select what to kick below and then press "
84 "the Kick button.."
85 msgstr ""
86 "Hjælpe-programmet kan <b>Sparke</b> på forskellige måder (dette "
87 "demonstrerer<i>annoteringer</i>. Vælg hvad du vil sparke nedenfor og tryk "
88 "derefter på Spark knappen.."
89
90 #: ../examples/polkit-gnome-example.c:416
91 msgid "Kick!"
92 msgstr "Spark!"
93
94 #: ../examples/polkit-gnome-example.c:430
95 msgid "PolicyKit-gnome demo"
96 msgstr "PolicyKit-gnome demonstrations program"
97
98 #: ../examples/polkit-gnome-example.policy.in.h:1
99 msgid "Frobnicate"
100 msgstr "Frobniker"
101
102 #: ../examples/polkit-gnome-example.policy.in.h:2
103 msgid "Punch"
104 msgstr "Smadre"
105
106 #: ../examples/polkit-gnome-example.policy.in.h:3
107 msgid ""
108 "System policy prevents the PolicyKit-gnome example helper from Frobnicating"
109 msgstr ""
110 "System indstillinger forhindrer PolicyKit-gnome eksempel hjælper i at "
111 "Frobnikere!"
112
113 #: ../examples/polkit-gnome-example.policy.in.h:4
114 msgid ""
115 "System policy prevents the PolicyKit-gnome example helper from Kicking bar"
116 msgstr ""
117 "System indstillinger forhindrer PolicyKit-gnome eksempel hjælper fra at "
118 "Sparke bar!"
119
120 #: ../examples/polkit-gnome-example.policy.in.h:5
121 msgid ""
122 "System policy prevents the PolicyKit-gnome example helper from Kicking baz"
123 msgstr ""
124 "System indstillinger forhindrer PolicyKit-gnome eksempel hjælper fra at "
125 "Sparke baz!"
126
127 #: ../examples/polkit-gnome-example.policy.in.h:6
128 msgid ""
129 "System policy prevents the PolicyKit-gnome example helper from Kicking foo"
130 msgstr ""
131 "System indstillinger forhindrer PolicyKit-gnome eksempel hjælper fra at "
132 "Sparke foo!"
133
134 #: ../examples/polkit-gnome-example.policy.in.h:7
135 msgid "System policy prevents the PolicyKit-gnome example helper from Punching"
136 msgstr ""
137 "System indstillinger forhindrer PolicyKit-gnome eksempel hjælper i at Smadre!"
138
139 #: ../examples/polkit-gnome-example.policy.in.h:8
140 msgid "System policy prevents the PolicyKit-gnome example helper from Tweaking"
141 msgstr ""
142 "System indstillinger forhindrer PolicyKit-gnome eksempel hjælper i at Tvække!"
143
144 #: ../examples/polkit-gnome-example.policy.in.h:9
145 msgid ""
146 "System policy prevents the PolicyKit-gnome example helper from Twiddling"
147 msgstr ""
148 "System indstillinger forhindrer PolicyKit-gnome eksempel hjælper i at Tvidle!"
149
150 #: ../examples/polkit-gnome-example.policy.in.h:10
151 msgid "Tweak"
152 msgstr "Tvæk"
153
154 #: ../examples/polkit-gnome-example.policy.in.h:11
155 msgid "Twiddle"
156 msgstr "Tvidl"
157
158 #: ../src/main.c:143
159 msgid "Enable debugging code"
160 msgstr "Slå debug kode til"
161
162 #: ../src/main.c:144
163 msgid "Don't become a daemon"
164 msgstr "Unlad at dæmonisere"
165
166 #: ../src/main.c:157
167 msgid "PolicyKit GNOME session daemon"
168 msgstr "PolicyKit GNOME session dæmon"
169
170 #: ../src/main.c:178
171 #, c-format
172 msgid "Starting PolicyKit GNOME session daemon version %s"
173 msgstr "Starter PolicyKit GNOME session dæmon version %s"
174
175 #: ../src/polkit-gnome-auth-dialog.c:178
176 msgid "Select user..."
177 msgstr "Vælg bruger..."
178
179 #: ../src/polkit-gnome-auth-dialog.c:199
180 #, c-format
181 msgid "%s (%s)"
182 msgstr "%s (%s)"
183
184 #: ../src/polkit-gnome-auth-dialog.c:280
185 msgid "_Remember authorization for this session"
186 msgstr "Husk autorisation indtil _log ud"
187
188 #: ../src/polkit-gnome-auth-dialog.c:286
189 msgid "_Remember authorization"
190 msgstr "_Husk autorisation"
191
192 #: ../src/polkit-gnome-auth-dialog.c:301
193 msgid ""
194 "An application is attempting to perform an action that requires privileges. "
195 "Authentication as one of the users below is required to perform this action."
196 msgstr ""
197 "Et program forsøger at udføre en handling der kræver privilegier. "
198 "Autorisering som en af brugerne nedenfor er påkrævet."
199
200 #: ../src/polkit-gnome-auth-dialog.c:308
201 msgid ""
202 "An application is attempting to perform an action that requires privileges. "
203 "Authentication as the super user is required to perform this action."
204 msgstr ""
205 "Et program forsøger at udføre en handling der kræver privilegier. "
206 "Autorisering som super bruger er påkrævet."
207
208 #: ../src/polkit-gnome-auth-dialog.c:312
209 msgid ""
210 "An application is attempting to perform an action that requires privileges. "
211 "Authentication is required to perform this action."
212 msgstr ""
213 "Et program forsøger at udføre en handling der kræver privilegier. "
214 "Autorisering er påkrævet."
215
216 #: ../src/polkit-gnome-auth-dialog.c:446
217 msgid "_Authenticate"
218 msgstr "Aut_orisering"
219
220 #: ../src/polkit-gnome-auth-dialog.c:505 ../src/polkit-gnome-manager.c:587
221 #: ../src/polkit-gnome-manager.c:634
222 msgid "_Password:"
223 msgstr "_Kodeord:"
224
225 #: ../src/polkit-gnome-auth-dialog.c:527
226 msgid "For this _session only"
227 msgstr "_Indtil log ud"
228
229 #: ../src/polkit-gnome-auth-dialog.c:535
230 msgid "<small><b>_Details</b></small>"
231 msgstr "<small><b>_Detaljer</b></small>"
232
233 #: ../src/polkit-gnome-auth-dialog.c:556
234 msgid "<small><b>Application:</b></small>"
235 msgstr "<small><b>Program:</b></small>"
236
237 #: ../src/polkit-gnome-auth-dialog.c:560
238 msgid "<small><b>Action:</b></small>"
239 msgstr "<small><b>Handling:</b></small>"
240
241 #: ../src/polkit-gnome-auth-dialog.c:654
242 msgid "Authenticate"
243 msgstr "Autorisering"
244
245 #: ../src/polkit-gnome-manager.c:629
246 #, c-format
247 msgid "_Password for %s:"
248 msgstr "_Kodeord for %s:"
249
250 #: ../src/polkit-gnome-manager.c:631
251 msgid "_Password for root:"
252 msgstr "_Kodeord for root:"
0
1 BUILT_SOURCES = \
2 polkit-gnome-manager-glue.h
3
4 polkit-gnome-manager-glue.h: polkit-gnome-manager.xml Makefile.am
5 dbus-binding-tool --prefix=polkit_gnome_manager --mode=glib-server --output=polkit-gnome-manager-glue.h polkit-gnome-manager.xml
6
7 libexec_PROGRAMS = polkit-gnome-manager
8
9 polkit_gnome_manager_SOURCES = \
10 polkit-gnome-manager.h polkit-gnome-manager.c \
11 polkit-gnome-auth-dialog.h polkit-gnome-auth-dialog.c \
12 main.c \
13 $(BUILT_SOURCES)
14
15 polkit_gnome_manager_CPPFLAGS = \
16 -I$(top_srcdir) \
17 -DG_LOG_DOMAIN=\"PolicyKitGnome\" \
18 -DDATADIR=\""$(pkgdatadir)"\" \
19 -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
20 $(DISABLE_DEPRECATED) \
21 $(AM_CPPFLAGS)
22
23 polkit_gnome_manager_CFLAGS = \
24 $(POLKIT_GNOME_CFLAGS) \
25 $(WARN_CFLAGS) \
26 $(AM_CFLAGS)
27
28 polkit_gnome_manager_LDFLAGS = \
29 $(AM_LDFLAGS)
30
31 polkit_gnome_manager_LDADD = \
32 $(POLKIT_GNOME_LIBS) \
33 $(INTLLIBS)
34
35 CLEANFILES = $(BUILT_SOURCES)
36
37 EXTRA_DIST = polkit-gnome-manager.xml
38
39 clean-local :
40 rm -f *~
0 # Makefile.in generated by automake 1.10 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 pkgdatadir = $(datadir)/@PACKAGE@
18 pkglibdir = $(libdir)/@PACKAGE@
19 pkgincludedir = $(includedir)/@PACKAGE@
20 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
21 install_sh_DATA = $(install_sh) -c -m 644
22 install_sh_PROGRAM = $(install_sh) -c
23 install_sh_SCRIPT = $(install_sh) -c
24 INSTALL_HEADER = $(INSTALL_DATA)
25 transform = $(program_transform_name)
26 NORMAL_INSTALL = :
27 PRE_INSTALL = :
28 POST_INSTALL = :
29 NORMAL_UNINSTALL = :
30 PRE_UNINSTALL = :
31 POST_UNINSTALL = :
32 build_triplet = @build@
33 host_triplet = @host@
34 libexec_PROGRAMS = polkit-gnome-manager$(EXEEXT)
35 subdir = src
36 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
37 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
38 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
39 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
40 $(ACLOCAL_M4)
41 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
42 CONFIG_HEADER = $(top_builddir)/config.h
43 CONFIG_CLEAN_FILES =
44 am__installdirs = "$(DESTDIR)$(libexecdir)"
45 libexecPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
46 PROGRAMS = $(libexec_PROGRAMS)
47 am__objects_1 =
48 am_polkit_gnome_manager_OBJECTS = \
49 polkit_gnome_manager-polkit-gnome-manager.$(OBJEXT) \
50 polkit_gnome_manager-polkit-gnome-auth-dialog.$(OBJEXT) \
51 polkit_gnome_manager-main.$(OBJEXT) $(am__objects_1)
52 polkit_gnome_manager_OBJECTS = $(am_polkit_gnome_manager_OBJECTS)
53 am__DEPENDENCIES_1 =
54 polkit_gnome_manager_DEPENDENCIES = $(am__DEPENDENCIES_1) \
55 $(am__DEPENDENCIES_1)
56 polkit_gnome_manager_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
57 $(LIBTOOLFLAGS) --mode=link $(CCLD) \
58 $(polkit_gnome_manager_CFLAGS) $(CFLAGS) \
59 $(polkit_gnome_manager_LDFLAGS) $(LDFLAGS) -o $@
60 DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
61 depcomp = $(SHELL) $(top_srcdir)/depcomp
62 am__depfiles_maybe = depfiles
63 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
64 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
65 LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
66 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
67 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
68 CCLD = $(CC)
69 LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
70 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
71 $(LDFLAGS) -o $@
72 SOURCES = $(polkit_gnome_manager_SOURCES)
73 DIST_SOURCES = $(polkit_gnome_manager_SOURCES)
74 ETAGS = etags
75 CTAGS = ctags
76 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
77 ACLOCAL = @ACLOCAL@
78 ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
79 ALL_LINGUAS = @ALL_LINGUAS@
80 AMTAR = @AMTAR@
81 AM_CFLAGS = @AM_CFLAGS@
82 AM_CPPFLAGS = @AM_CPPFLAGS@
83 AM_CXXFLAGS = @AM_CXXFLAGS@
84 AM_LDFLAGS = @AM_LDFLAGS@
85 AR = @AR@
86 AUTOCONF = @AUTOCONF@
87 AUTOHEADER = @AUTOHEADER@
88 AUTOMAKE = @AUTOMAKE@
89 AWK = @AWK@
90 CATALOGS = @CATALOGS@
91 CATOBJEXT = @CATOBJEXT@
92 CC = @CC@
93 CCDEPMODE = @CCDEPMODE@
94 CFLAGS = @CFLAGS@
95 CPP = @CPP@
96 CPPFLAGS = @CPPFLAGS@
97 CXX = @CXX@
98 CXXCPP = @CXXCPP@
99 CXXDEPMODE = @CXXDEPMODE@
100 CXXFLAGS = @CXXFLAGS@
101 CYGPATH_W = @CYGPATH_W@
102 DATADIRNAME = @DATADIRNAME@
103 DEFS = @DEFS@
104 DEPDIR = @DEPDIR@
105 DISABLE_DEPRECATED = @DISABLE_DEPRECATED@
106 DOC_USER_FORMATS = @DOC_USER_FORMATS@
107 ECHO = @ECHO@
108 ECHO_C = @ECHO_C@
109 ECHO_N = @ECHO_N@
110 ECHO_T = @ECHO_T@
111 EGREP = @EGREP@
112 EXEEXT = @EXEEXT@
113 F77 = @F77@
114 FFLAGS = @FFLAGS@
115 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
116 GMOFILES = @GMOFILES@
117 GMSGFMT = @GMSGFMT@
118 GREP = @GREP@
119 HELP_DIR = @HELP_DIR@
120 INSTALL = @INSTALL@
121 INSTALL_DATA = @INSTALL_DATA@
122 INSTALL_PROGRAM = @INSTALL_PROGRAM@
123 INSTALL_SCRIPT = @INSTALL_SCRIPT@
124 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
125 INSTOBJEXT = @INSTOBJEXT@
126 INTLLIBS = @INTLLIBS@
127 INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
128 INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
129 INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
130 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
131 INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
132 INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
133 INTLTOOL_MERGE = @INTLTOOL_MERGE@
134 INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
135 INTLTOOL_PERL = @INTLTOOL_PERL@
136 INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
137 INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
138 INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
139 INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
140 INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
141 INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
142 INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
143 INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
144 INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
145 INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
146 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
147 INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
148 INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
149 INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
150 LDFLAGS = @LDFLAGS@
151 LIBOBJS = @LIBOBJS@
152 LIBS = @LIBS@
153 LIBTOOL = @LIBTOOL@
154 LN_S = @LN_S@
155 LTLIBOBJS = @LTLIBOBJS@
156 MAINT = @MAINT@
157 MAKEINFO = @MAKEINFO@
158 MKDIR_P = @MKDIR_P@
159 MKINSTALLDIRS = @MKINSTALLDIRS@
160 MSGFMT = @MSGFMT@
161 MSGFMT_OPTS = @MSGFMT_OPTS@
162 OBJEXT = @OBJEXT@
163 OMF_DIR = @OMF_DIR@
164 PACKAGE = @PACKAGE@
165 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
166 PACKAGE_NAME = @PACKAGE_NAME@
167 PACKAGE_STRING = @PACKAGE_STRING@
168 PACKAGE_TARNAME = @PACKAGE_TARNAME@
169 PACKAGE_VERSION = @PACKAGE_VERSION@
170 PATH_SEPARATOR = @PATH_SEPARATOR@
171 PKG_CONFIG = @PKG_CONFIG@
172 POFILES = @POFILES@
173 POLKIT_GNOME_CFLAGS = @POLKIT_GNOME_CFLAGS@
174 POLKIT_GNOME_LIBS = @POLKIT_GNOME_LIBS@
175 POLKIT_POLICY_FILE_VALIDATE = @POLKIT_POLICY_FILE_VALIDATE@
176 POSUB = @POSUB@
177 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
178 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
179 RANLIB = @RANLIB@
180 SED = @SED@
181 SET_MAKE = @SET_MAKE@
182 SHELL = @SHELL@
183 STRIP = @STRIP@
184 USE_NLS = @USE_NLS@
185 VERSION = @VERSION@
186 WARN_CFLAGS = @WARN_CFLAGS@
187 XGETTEXT = @XGETTEXT@
188 abs_builddir = @abs_builddir@
189 abs_srcdir = @abs_srcdir@
190 abs_top_builddir = @abs_top_builddir@
191 abs_top_srcdir = @abs_top_srcdir@
192 ac_ct_CC = @ac_ct_CC@
193 ac_ct_CXX = @ac_ct_CXX@
194 ac_ct_F77 = @ac_ct_F77@
195 am__include = @am__include@
196 am__leading_dot = @am__leading_dot@
197 am__quote = @am__quote@
198 am__tar = @am__tar@
199 am__untar = @am__untar@
200 bindir = @bindir@
201 build = @build@
202 build_alias = @build_alias@
203 build_cpu = @build_cpu@
204 build_os = @build_os@
205 build_vendor = @build_vendor@
206 builddir = @builddir@
207 datadir = @datadir@
208 datarootdir = @datarootdir@
209 docdir = @docdir@
210 dvidir = @dvidir@
211 exec_prefix = @exec_prefix@
212 host = @host@
213 host_alias = @host_alias@
214 host_cpu = @host_cpu@
215 host_os = @host_os@
216 host_vendor = @host_vendor@
217 htmldir = @htmldir@
218 includedir = @includedir@
219 infodir = @infodir@
220 install_sh = @install_sh@
221 libdir = @libdir@
222 libexecdir = @libexecdir@
223 localedir = @localedir@
224 localstatedir = @localstatedir@
225 mandir = @mandir@
226 mkdir_p = @mkdir_p@
227 oldincludedir = @oldincludedir@
228 pdfdir = @pdfdir@
229 prefix = @prefix@
230 program_transform_name = @program_transform_name@
231 psdir = @psdir@
232 sbindir = @sbindir@
233 sharedstatedir = @sharedstatedir@
234 srcdir = @srcdir@
235 sysconfdir = @sysconfdir@
236 target_alias = @target_alias@
237 top_builddir = @top_builddir@
238 top_srcdir = @top_srcdir@
239 BUILT_SOURCES = \
240 polkit-gnome-manager-glue.h
241
242 polkit_gnome_manager_SOURCES = \
243 polkit-gnome-manager.h polkit-gnome-manager.c \
244 polkit-gnome-auth-dialog.h polkit-gnome-auth-dialog.c \
245 main.c \
246 $(BUILT_SOURCES)
247
248 polkit_gnome_manager_CPPFLAGS = \
249 -I$(top_srcdir) \
250 -DG_LOG_DOMAIN=\"PolicyKitGnome\" \
251 -DDATADIR=\""$(pkgdatadir)"\" \
252 -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
253 $(DISABLE_DEPRECATED) \
254 $(AM_CPPFLAGS)
255
256 polkit_gnome_manager_CFLAGS = \
257 $(POLKIT_GNOME_CFLAGS) \
258 $(WARN_CFLAGS) \
259 $(AM_CFLAGS)
260
261 polkit_gnome_manager_LDFLAGS = \
262 $(AM_LDFLAGS)
263
264 polkit_gnome_manager_LDADD = \
265 $(POLKIT_GNOME_LIBS) \
266 $(INTLLIBS)
267
268 CLEANFILES = $(BUILT_SOURCES)
269 EXTRA_DIST = polkit-gnome-manager.xml
270 all: $(BUILT_SOURCES)
271 $(MAKE) $(AM_MAKEFLAGS) all-am
272
273 .SUFFIXES:
274 .SUFFIXES: .c .lo .o .obj
275 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
276 @for dep in $?; do \
277 case '$(am__configure_deps)' in \
278 *$$dep*) \
279 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
280 && exit 0; \
281 exit 1;; \
282 esac; \
283 done; \
284 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
285 cd $(top_srcdir) && \
286 $(AUTOMAKE) --foreign src/Makefile
287 .PRECIOUS: Makefile
288 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
289 @case '$?' in \
290 *config.status*) \
291 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
292 *) \
293 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
294 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
295 esac;
296
297 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
298 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
299
300 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
301 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
302 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
303 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
304 install-libexecPROGRAMS: $(libexec_PROGRAMS)
305 @$(NORMAL_INSTALL)
306 test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
307 @list='$(libexec_PROGRAMS)'; for p in $$list; do \
308 p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
309 if test -f $$p \
310 || test -f $$p1 \
311 ; then \
312 f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
313 echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(libexecdir)/$$f'"; \
314 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(libexecPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(libexecdir)/$$f" || exit 1; \
315 else :; fi; \
316 done
317
318 uninstall-libexecPROGRAMS:
319 @$(NORMAL_UNINSTALL)
320 @list='$(libexec_PROGRAMS)'; for p in $$list; do \
321 f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
322 echo " rm -f '$(DESTDIR)$(libexecdir)/$$f'"; \
323 rm -f "$(DESTDIR)$(libexecdir)/$$f"; \
324 done
325
326 clean-libexecPROGRAMS:
327 @list='$(libexec_PROGRAMS)'; for p in $$list; do \
328 f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
329 echo " rm -f $$p $$f"; \
330 rm -f $$p $$f ; \
331 done
332 polkit-gnome-manager$(EXEEXT): $(polkit_gnome_manager_OBJECTS) $(polkit_gnome_manager_DEPENDENCIES)
333 @rm -f polkit-gnome-manager$(EXEEXT)
334 $(polkit_gnome_manager_LINK) $(polkit_gnome_manager_OBJECTS) $(polkit_gnome_manager_LDADD) $(LIBS)
335
336 mostlyclean-compile:
337 -rm -f *.$(OBJEXT)
338
339 distclean-compile:
340 -rm -f *.tab.c
341
342 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polkit_gnome_manager-main.Po@am__quote@
343 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polkit_gnome_manager-polkit-gnome-auth-dialog.Po@am__quote@
344 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polkit_gnome_manager-polkit-gnome-manager.Po@am__quote@
345
346 .c.o:
347 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
348 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
349 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
350 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
351 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
352
353 .c.obj:
354 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
355 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
356 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
357 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
358 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
359
360 .c.lo:
361 @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
362 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
363 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
364 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
365 @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
366
367 polkit_gnome_manager-polkit-gnome-manager.o: polkit-gnome-manager.c
368 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -MT polkit_gnome_manager-polkit-gnome-manager.o -MD -MP -MF $(DEPDIR)/polkit_gnome_manager-polkit-gnome-manager.Tpo -c -o polkit_gnome_manager-polkit-gnome-manager.o `test -f 'polkit-gnome-manager.c' || echo '$(srcdir)/'`polkit-gnome-manager.c
369 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/polkit_gnome_manager-polkit-gnome-manager.Tpo $(DEPDIR)/polkit_gnome_manager-polkit-gnome-manager.Po
370 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkit-gnome-manager.c' object='polkit_gnome_manager-polkit-gnome-manager.o' libtool=no @AMDEPBACKSLASH@
371 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
372 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -c -o polkit_gnome_manager-polkit-gnome-manager.o `test -f 'polkit-gnome-manager.c' || echo '$(srcdir)/'`polkit-gnome-manager.c
373
374 polkit_gnome_manager-polkit-gnome-manager.obj: polkit-gnome-manager.c
375 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -MT polkit_gnome_manager-polkit-gnome-manager.obj -MD -MP -MF $(DEPDIR)/polkit_gnome_manager-polkit-gnome-manager.Tpo -c -o polkit_gnome_manager-polkit-gnome-manager.obj `if test -f 'polkit-gnome-manager.c'; then $(CYGPATH_W) 'polkit-gnome-manager.c'; else $(CYGPATH_W) '$(srcdir)/polkit-gnome-manager.c'; fi`
376 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/polkit_gnome_manager-polkit-gnome-manager.Tpo $(DEPDIR)/polkit_gnome_manager-polkit-gnome-manager.Po
377 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkit-gnome-manager.c' object='polkit_gnome_manager-polkit-gnome-manager.obj' libtool=no @AMDEPBACKSLASH@
378 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
379 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -c -o polkit_gnome_manager-polkit-gnome-manager.obj `if test -f 'polkit-gnome-manager.c'; then $(CYGPATH_W) 'polkit-gnome-manager.c'; else $(CYGPATH_W) '$(srcdir)/polkit-gnome-manager.c'; fi`
380
381 polkit_gnome_manager-polkit-gnome-auth-dialog.o: polkit-gnome-auth-dialog.c
382 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -MT polkit_gnome_manager-polkit-gnome-auth-dialog.o -MD -MP -MF $(DEPDIR)/polkit_gnome_manager-polkit-gnome-auth-dialog.Tpo -c -o polkit_gnome_manager-polkit-gnome-auth-dialog.o `test -f 'polkit-gnome-auth-dialog.c' || echo '$(srcdir)/'`polkit-gnome-auth-dialog.c
383 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/polkit_gnome_manager-polkit-gnome-auth-dialog.Tpo $(DEPDIR)/polkit_gnome_manager-polkit-gnome-auth-dialog.Po
384 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkit-gnome-auth-dialog.c' object='polkit_gnome_manager-polkit-gnome-auth-dialog.o' libtool=no @AMDEPBACKSLASH@
385 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
386 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -c -o polkit_gnome_manager-polkit-gnome-auth-dialog.o `test -f 'polkit-gnome-auth-dialog.c' || echo '$(srcdir)/'`polkit-gnome-auth-dialog.c
387
388 polkit_gnome_manager-polkit-gnome-auth-dialog.obj: polkit-gnome-auth-dialog.c
389 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -MT polkit_gnome_manager-polkit-gnome-auth-dialog.obj -MD -MP -MF $(DEPDIR)/polkit_gnome_manager-polkit-gnome-auth-dialog.Tpo -c -o polkit_gnome_manager-polkit-gnome-auth-dialog.obj `if test -f 'polkit-gnome-auth-dialog.c'; then $(CYGPATH_W) 'polkit-gnome-auth-dialog.c'; else $(CYGPATH_W) '$(srcdir)/polkit-gnome-auth-dialog.c'; fi`
390 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/polkit_gnome_manager-polkit-gnome-auth-dialog.Tpo $(DEPDIR)/polkit_gnome_manager-polkit-gnome-auth-dialog.Po
391 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='polkit-gnome-auth-dialog.c' object='polkit_gnome_manager-polkit-gnome-auth-dialog.obj' libtool=no @AMDEPBACKSLASH@
392 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
393 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -c -o polkit_gnome_manager-polkit-gnome-auth-dialog.obj `if test -f 'polkit-gnome-auth-dialog.c'; then $(CYGPATH_W) 'polkit-gnome-auth-dialog.c'; else $(CYGPATH_W) '$(srcdir)/polkit-gnome-auth-dialog.c'; fi`
394
395 polkit_gnome_manager-main.o: main.c
396 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -MT polkit_gnome_manager-main.o -MD -MP -MF $(DEPDIR)/polkit_gnome_manager-main.Tpo -c -o polkit_gnome_manager-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
397 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/polkit_gnome_manager-main.Tpo $(DEPDIR)/polkit_gnome_manager-main.Po
398 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='polkit_gnome_manager-main.o' libtool=no @AMDEPBACKSLASH@
399 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
400 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -c -o polkit_gnome_manager-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c
401
402 polkit_gnome_manager-main.obj: main.c
403 @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -MT polkit_gnome_manager-main.obj -MD -MP -MF $(DEPDIR)/polkit_gnome_manager-main.Tpo -c -o polkit_gnome_manager-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
404 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/polkit_gnome_manager-main.Tpo $(DEPDIR)/polkit_gnome_manager-main.Po
405 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='polkit_gnome_manager-main.obj' libtool=no @AMDEPBACKSLASH@
406 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
407 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(polkit_gnome_manager_CPPFLAGS) $(CPPFLAGS) $(polkit_gnome_manager_CFLAGS) $(CFLAGS) -c -o polkit_gnome_manager-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`
408
409 mostlyclean-libtool:
410 -rm -f *.lo
411
412 clean-libtool:
413 -rm -rf .libs _libs
414
415 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
416 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
417 unique=`for i in $$list; do \
418 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
419 done | \
420 $(AWK) ' { files[$$0] = 1; } \
421 END { for (i in files) print i; }'`; \
422 mkid -fID $$unique
423 tags: TAGS
424
425 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
426 $(TAGS_FILES) $(LISP)
427 tags=; \
428 here=`pwd`; \
429 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
430 unique=`for i in $$list; do \
431 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
432 done | \
433 $(AWK) ' { files[$$0] = 1; } \
434 END { for (i in files) print i; }'`; \
435 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
436 test -n "$$unique" || unique=$$empty_fix; \
437 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
438 $$tags $$unique; \
439 fi
440 ctags: CTAGS
441 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
442 $(TAGS_FILES) $(LISP)
443 tags=; \
444 here=`pwd`; \
445 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
446 unique=`for i in $$list; do \
447 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
448 done | \
449 $(AWK) ' { files[$$0] = 1; } \
450 END { for (i in files) print i; }'`; \
451 test -z "$(CTAGS_ARGS)$$tags$$unique" \
452 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
453 $$tags $$unique
454
455 GTAGS:
456 here=`$(am__cd) $(top_builddir) && pwd` \
457 && cd $(top_srcdir) \
458 && gtags -i $(GTAGS_ARGS) $$here
459
460 distclean-tags:
461 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
462
463 distdir: $(DISTFILES)
464 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
465 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
466 list='$(DISTFILES)'; \
467 dist_files=`for file in $$list; do echo $$file; done | \
468 sed -e "s|^$$srcdirstrip/||;t" \
469 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
470 case $$dist_files in \
471 */*) $(MKDIR_P) `echo "$$dist_files" | \
472 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
473 sort -u` ;; \
474 esac; \
475 for file in $$dist_files; do \
476 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
477 if test -d $$d/$$file; then \
478 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
479 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
480 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
481 fi; \
482 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
483 else \
484 test -f $(distdir)/$$file \
485 || cp -p $$d/$$file $(distdir)/$$file \
486 || exit 1; \
487 fi; \
488 done
489 check-am: all-am
490 check: $(BUILT_SOURCES)
491 $(MAKE) $(AM_MAKEFLAGS) check-am
492 all-am: Makefile $(PROGRAMS)
493 installdirs:
494 for dir in "$(DESTDIR)$(libexecdir)"; do \
495 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
496 done
497 install: $(BUILT_SOURCES)
498 $(MAKE) $(AM_MAKEFLAGS) install-am
499 install-exec: install-exec-am
500 install-data: install-data-am
501 uninstall: uninstall-am
502
503 install-am: all-am
504 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
505
506 installcheck: installcheck-am
507 install-strip:
508 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
509 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
510 `test -z '$(STRIP)' || \
511 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
512 mostlyclean-generic:
513
514 clean-generic:
515 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
516
517 distclean-generic:
518 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
519
520 maintainer-clean-generic:
521 @echo "This command is intended for maintainers to use"
522 @echo "it deletes files that may require special tools to rebuild."
523 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
524 clean: clean-am
525
526 clean-am: clean-generic clean-libexecPROGRAMS clean-libtool \
527 clean-local mostlyclean-am
528
529 distclean: distclean-am
530 -rm -rf ./$(DEPDIR)
531 -rm -f Makefile
532 distclean-am: clean-am distclean-compile distclean-generic \
533 distclean-tags
534
535 dvi: dvi-am
536
537 dvi-am:
538
539 html: html-am
540
541 info: info-am
542
543 info-am:
544
545 install-data-am:
546
547 install-dvi: install-dvi-am
548
549 install-exec-am: install-libexecPROGRAMS
550
551 install-html: install-html-am
552
553 install-info: install-info-am
554
555 install-man:
556
557 install-pdf: install-pdf-am
558
559 install-ps: install-ps-am
560
561 installcheck-am:
562
563 maintainer-clean: maintainer-clean-am
564 -rm -rf ./$(DEPDIR)
565 -rm -f Makefile
566 maintainer-clean-am: distclean-am maintainer-clean-generic
567
568 mostlyclean: mostlyclean-am
569
570 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
571 mostlyclean-libtool
572
573 pdf: pdf-am
574
575 pdf-am:
576
577 ps: ps-am
578
579 ps-am:
580
581 uninstall-am: uninstall-libexecPROGRAMS
582
583 .MAKE: install-am install-strip
584
585 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
586 clean-libexecPROGRAMS clean-libtool clean-local ctags \
587 distclean distclean-compile distclean-generic \
588 distclean-libtool distclean-tags distdir dvi dvi-am html \
589 html-am info info-am install install-am install-data \
590 install-data-am install-dvi install-dvi-am install-exec \
591 install-exec-am install-html install-html-am install-info \
592 install-info-am install-libexecPROGRAMS install-man \
593 install-pdf install-pdf-am install-ps install-ps-am \
594 install-strip installcheck installcheck-am installdirs \
595 maintainer-clean maintainer-clean-generic mostlyclean \
596 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
597 pdf pdf-am ps ps-am tags uninstall uninstall-am \
598 uninstall-libexecPROGRAMS
599
600
601 polkit-gnome-manager-glue.h: polkit-gnome-manager.xml Makefile.am
602 dbus-binding-tool --prefix=polkit_gnome_manager --mode=glib-server --output=polkit-gnome-manager-glue.h polkit-gnome-manager.xml
603
604 clean-local :
605 rm -f *~
606 # Tell versions [3.59,3.63) of GNU make to not export all variables.
607 # Otherwise a system limit (for SysV at least) may be exceeded.
608 .NOEXPORT:
0 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
1 *
2 * Copyright (C) 2007 David Zeuthen <david@fubar.dk>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 */
19
20 #ifdef HAVE_CONFIG_H
21 # include "config.h"
22 #endif
23
24 #include <stdlib.h>
25 #include <stdio.h>
26 #include <unistd.h>
27 #include <signal.h>
28 #include <errno.h>
29 #include <string.h>
30 #include <sys/types.h>
31 #include <sys/stat.h>
32 #include <fcntl.h>
33
34 #include <glib.h>
35 #include <glib/gi18n-lib.h>
36 #include <glib-object.h>
37
38 #include <gtk/gtk.h>
39
40 #define DBUS_API_SUBJECT_TO_CHANGE
41 #include <dbus/dbus-glib.h>
42 #include <dbus/dbus-glib-lowlevel.h>
43
44 #include "polkit-gnome-manager.h"
45
46 #define POLKIT_GNOME_DBUS_NAME "org.gnome.PolicyKit"
47
48 static DBusGProxy *
49 get_bus_proxy (DBusGConnection *connection)
50 {
51 DBusGProxy *bus_proxy;
52
53 bus_proxy = dbus_g_proxy_new_for_name (connection,
54 DBUS_SERVICE_DBUS,
55 DBUS_PATH_DBUS,
56 DBUS_INTERFACE_DBUS);
57 return bus_proxy;
58 }
59
60 static gboolean
61 acquire_name_on_proxy (DBusGProxy *bus_proxy)
62 {
63 GError *error;
64 guint result;
65 gboolean res;
66 gboolean ret;
67
68 ret = FALSE;
69
70 if (bus_proxy == NULL) {
71 goto out;
72 }
73
74 error = NULL;
75 res = dbus_g_proxy_call (bus_proxy,
76 "RequestName",
77 &error,
78 G_TYPE_STRING, POLKIT_GNOME_DBUS_NAME,
79 G_TYPE_UINT, 0,
80 G_TYPE_INVALID,
81 G_TYPE_UINT, &result,
82 G_TYPE_INVALID);
83 if (! res) {
84 if (error != NULL) {
85 g_warning ("Failed to acquire %s: %s", POLKIT_GNOME_DBUS_NAME, error->message);
86 g_error_free (error);
87 } else {
88 g_warning ("Failed to acquire %s", POLKIT_GNOME_DBUS_NAME);
89 }
90 goto out;
91 }
92
93 if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
94 if (error != NULL) {
95 g_warning ("Failed to acquire %s: %s", POLKIT_GNOME_DBUS_NAME, error->message);
96 g_error_free (error);
97 } else {
98 g_warning ("Failed to acquire %s", POLKIT_GNOME_DBUS_NAME);
99 }
100 goto out;
101 }
102
103 ret = TRUE;
104
105 out:
106 return ret;
107 }
108
109 static DBusGConnection *
110 get_session_bus (void)
111 {
112 GError *error;
113 DBusGConnection *bus;
114 DBusConnection *connection;
115
116 error = NULL;
117 bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
118 if (bus == NULL) {
119 g_warning ("Couldn't connect to session bus: %s", error->message);
120 g_error_free (error);
121 goto out;
122 }
123
124 connection = dbus_g_connection_get_connection (bus);
125 out:
126 return bus;
127 }
128
129 int
130 main (int argc, char **argv)
131 {
132 GMainLoop *loop;
133 PolKitGnomeManager *manager;
134 GOptionContext *context;
135 DBusGProxy *bus_proxy;
136 DBusGConnection *connection;
137 int ret;
138
139 static gboolean debug = FALSE;
140 static gboolean no_daemon = FALSE;
141 static GOptionEntry entries [] = {
142 { "debug", 0, 0, G_OPTION_ARG_NONE, &debug, N_("Enable debugging code"), NULL },
143 { "no-daemon", 0, 0, G_OPTION_ARG_NONE, &no_daemon, N_("Don't become a daemon"), NULL },
144 { NULL }
145 };
146
147 ret = 1;
148
149 if (! g_thread_supported ()) {
150 g_thread_init (NULL);
151 }
152 dbus_g_thread_init ();
153 g_type_init ();
154 gtk_init (&argc, &argv);
155
156 context = g_option_context_new (_("PolicyKit GNOME session daemon"));
157 g_option_context_add_main_entries (context, entries, NULL);
158 g_option_context_parse (context, &argc, &argv, NULL);
159 g_option_context_free (context);
160
161 connection = get_session_bus ();
162 if (connection == NULL) {
163 goto out;
164 }
165
166 bus_proxy = get_bus_proxy (connection);
167 if (bus_proxy == NULL) {
168 g_warning ("Could not construct bus_proxy object; bailing out");
169 goto out;
170 }
171
172 if (!acquire_name_on_proxy (bus_proxy) ) {
173 g_warning ("Could not acquire name; bailing out");
174 goto out;
175 }
176
177 g_debug (_("Starting PolicyKit GNOME session daemon version %s"), VERSION);
178
179 manager = polkit_gnome_manager_new ();
180
181 if (manager == NULL) {
182 goto out;
183 }
184
185 loop = g_main_loop_new (NULL, FALSE);
186
187 g_main_loop_run (loop);
188
189 g_object_unref (manager);
190 g_main_loop_unref (loop);
191 ret = 0;
192
193 out:
194 return ret;
195 }
0 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
1 *
2 * Copyright (C) 2007 David Zeuthen <david@fubar.dk>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 */
19
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #define _GNU_SOURCE
25 #include <unistd.h>
26 #include <sys/types.h>
27 #include <sys/stat.h>
28 #include <fcntl.h>
29 #include <string.h>
30 #include <stdio.h>
31 #include <stdlib.h>
32 #include <pwd.h>
33 #include <errno.h>
34
35 #include <glib/gi18n-lib.h>
36 #include <gtk/gtk.h>
37
38 #include "polkit-gnome-auth-dialog.h"
39
40 struct _PolkitGnomeAuthDialogPrivate
41 {
42 GtkWidget *keep_privilege_check_button;
43 GtkWidget *keep_privilege_session_only_check_button;
44 GtkWidget *message_label;
45 GtkWidget *message_label_secondary;
46 GtkWidget *user_combobox;
47 GtkWidget *app_desc_label;
48 GtkWidget *privilege_desc_label;
49 GtkWidget *prompt_label;
50 GtkWidget *password_entry;
51 char *message;
52
53 gboolean can_do_always;
54 gboolean can_do_session;
55
56 GtkListStore *store;
57 };
58
59 G_DEFINE_TYPE (PolkitGnomeAuthDialog, polkit_gnome_auth_dialog, GTK_TYPE_DIALOG);
60
61 enum {
62 USER_SELECTED,
63 LAST_SIGNAL
64 };
65
66 static guint signals[LAST_SIGNAL] = { 0 };
67
68 enum {
69 PROP_0,
70 PROP_PROGRAM,
71 PROP_ACTION_ID,
72 PROP_MESSAGE,
73 };
74
75 enum {
76 PIXBUF_COL,
77 TEXT_COL,
78 USERNAME_COL,
79 N_COL
80 };
81
82 static void
83 user_combobox_set_sensitive (GtkCellLayout *cell_layout,
84 GtkCellRenderer *cell,
85 GtkTreeModel *tree_model,
86 GtkTreeIter *iter,
87 gpointer user_data)
88 {
89 GtkTreePath *path;
90 gint *indices;
91 gboolean sensitive;
92
93 path = gtk_tree_model_get_path (tree_model, iter);
94 indices = gtk_tree_path_get_indices (path);
95 if (indices[0] == 0)
96 sensitive = FALSE;
97 else
98 sensitive = TRUE;
99 gtk_tree_path_free (path);
100
101 g_object_set (cell, "sensitive", sensitive, NULL);
102 }
103
104
105 void
106 polkit_gnome_auth_dialog_select_admin_user (PolkitGnomeAuthDialog *auth_dialog, const char *admin_user)
107 {
108 GtkTreeIter iter;
109 gboolean done;
110 gboolean valid;
111
112 /* make the password and "Keep.." widgets sensitive again */
113 gtk_widget_set_sensitive (auth_dialog->priv->prompt_label, TRUE);
114 gtk_widget_set_sensitive (auth_dialog->priv->password_entry, TRUE);
115 gtk_widget_set_sensitive (auth_dialog->priv->keep_privilege_check_button, TRUE);
116 gtk_widget_set_sensitive (auth_dialog->priv->keep_privilege_session_only_check_button, TRUE);
117
118 /* select appropriate item in combobox */
119 valid = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (auth_dialog->priv->store), &iter);
120 done = FALSE;
121 while (valid && !done) {
122 char *str_data;
123 gtk_tree_model_get (GTK_TREE_MODEL (auth_dialog->priv->store),
124 &iter,
125 USERNAME_COL, &str_data,
126 -1);
127 if (str_data != NULL && strcmp (admin_user, str_data) == 0) {
128 gtk_combo_box_set_active_iter (GTK_COMBO_BOX (auth_dialog->priv->user_combobox),
129 &iter);
130 done = TRUE;
131 }
132 g_free (str_data);
133
134 valid = gtk_tree_model_iter_next (GTK_TREE_MODEL (auth_dialog->priv->store), &iter);
135 }
136 }
137
138 static void
139 user_combobox_changed (GtkComboBox *widget,
140 gpointer user_data)
141 {
142 char *user_name;
143 PolkitGnomeAuthDialog *auth_dialog = POLKIT_GNOME_AUTH_DIALOG (user_data);
144 GtkTreeIter iter;
145
146 if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter)) {
147 gtk_tree_model_get (GTK_TREE_MODEL (auth_dialog->priv->store), &iter, USERNAME_COL, &user_name, -1);
148 g_signal_emit (auth_dialog, signals[USER_SELECTED], 0, user_name);
149
150 polkit_gnome_auth_dialog_select_admin_user (auth_dialog, user_name);
151
152 g_free (user_name);
153 }
154 }
155
156 static void
157 create_user_combobox (PolkitGnomeAuthDialog *auth_dialog, char **admin_users)
158 {
159 int n;
160 GtkComboBox *combo;
161 GtkTreeIter iter;
162 GtkCellRenderer *renderer;
163
164 /* if we've already built the list of admin users once, then avoid
165 * doing it again.. (this is mainly used when the user entered the
166 * wrong password and the dialog is recycled)
167 */
168 if (auth_dialog->priv->store != NULL)
169 return;
170
171 combo = GTK_COMBO_BOX (auth_dialog->priv->user_combobox);
172 auth_dialog->priv->store = gtk_list_store_new (3, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
173
174 gtk_list_store_append (auth_dialog->priv->store, &iter);
175 gtk_list_store_set (auth_dialog->priv->store, &iter,
176 PIXBUF_COL, NULL,
177 TEXT_COL, _("Select user..."),
178 USERNAME_COL, NULL,
179 -1);
180
181
182 /* For each user */
183 for (n = 0; admin_users[n] != NULL; n++) {
184 char *real_name;
185 GdkPixbuf *pixbuf;
186 struct passwd *passwd;
187
188 /* we're single threaded so this is fine */
189 errno = 0;
190 passwd = getpwnam (admin_users[n]);
191 if (passwd == NULL) {
192 g_warning ("Error doing getpwnam(\"%s\"): %s", admin_users[n], strerror (errno));
193 continue;
194 }
195
196 /* Real name */
197 if (passwd->pw_gecos != NULL)
198 real_name = g_strdup_printf (_("%s (%s)"), passwd->pw_gecos, admin_users[n]);
199 else
200 real_name = g_strdup (admin_users[n]);
201
202 /* Load users face */
203 pixbuf = NULL;
204 if (passwd->pw_dir != NULL) {
205 char *path;
206 path = g_strdup_printf ("%s/.face", passwd->pw_dir);
207 /* TODO: we probably shouldn't hard-code the size to 24x24*/
208 pixbuf = gdk_pixbuf_new_from_file_at_scale (path, 24, 24, TRUE, NULL);
209 g_free (path);
210 }
211
212 /* fall back to stock_person icon */
213 if (pixbuf == NULL)
214 pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
215 "stock_person", GTK_ICON_SIZE_MENU, 0, NULL);
216
217 gtk_list_store_append (auth_dialog->priv->store, &iter);
218 gtk_list_store_set (auth_dialog->priv->store, &iter,
219 PIXBUF_COL, pixbuf,
220 TEXT_COL, real_name,
221 USERNAME_COL, admin_users[n],
222 -1);
223
224 g_free (real_name);
225 g_object_unref (pixbuf);
226
227 }
228
229 gtk_combo_box_set_model (combo, GTK_TREE_MODEL (auth_dialog->priv->store));
230
231 renderer = gtk_cell_renderer_pixbuf_new ();
232 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, FALSE);
233 gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
234 "pixbuf", PIXBUF_COL,
235 NULL);
236 gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
237 renderer,
238 user_combobox_set_sensitive,
239 NULL, NULL);
240
241 renderer = gtk_cell_renderer_text_new ();
242 gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
243 gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo), renderer,
244 "text", TEXT_COL,
245 NULL);
246 gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (combo),
247 renderer,
248 user_combobox_set_sensitive,
249 NULL, NULL);
250
251 /* Initially select the "Select user..." ... */
252 gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
253
254 /* Listen when a new user is selected */
255 g_signal_connect (GTK_WIDGET (combo), "changed",
256 G_CALLBACK (user_combobox_changed), auth_dialog);
257
258 /* ... and make the password and "Keep.." widgets insensitive */
259 gtk_widget_set_sensitive (auth_dialog->priv->prompt_label, FALSE);
260 gtk_widget_set_sensitive (auth_dialog->priv->password_entry, FALSE);
261 gtk_widget_set_sensitive (auth_dialog->priv->keep_privilege_check_button, FALSE);
262 gtk_widget_set_sensitive (auth_dialog->priv->keep_privilege_session_only_check_button, FALSE);
263 }
264
265 void
266 polkit_gnome_auth_dialog_set_options (PolkitGnomeAuthDialog *auth_dialog,
267 gboolean session,
268 gboolean always,
269 gboolean requires_admin,
270 char **admin_users)
271 {
272 const char *message_markup_secondary;
273
274 auth_dialog->priv->can_do_always = always;
275 auth_dialog->priv->can_do_session = session;
276
277 if (auth_dialog->priv->can_do_session) {
278 gtk_button_set_label (GTK_BUTTON (auth_dialog->priv->keep_privilege_check_button),
279 _("_Remember authorization for this session"));
280
281 gtk_widget_set_no_show_all (auth_dialog->priv->keep_privilege_check_button, FALSE);
282 gtk_widget_set_no_show_all (auth_dialog->priv->keep_privilege_session_only_check_button, TRUE);
283 } else if (auth_dialog->priv->can_do_always) {
284 gtk_button_set_label (GTK_BUTTON (auth_dialog->priv->keep_privilege_check_button),
285 _("_Remember authorization"));
286
287 gtk_widget_set_no_show_all (auth_dialog->priv->keep_privilege_check_button, FALSE);
288 gtk_widget_set_no_show_all (auth_dialog->priv->keep_privilege_session_only_check_button, FALSE);
289
290 } else {
291 gtk_widget_set_no_show_all (auth_dialog->priv->keep_privilege_check_button, TRUE);
292 gtk_widget_set_no_show_all (auth_dialog->priv->keep_privilege_session_only_check_button, TRUE);
293 }
294
295 gtk_widget_set_no_show_all (auth_dialog->priv->user_combobox, TRUE);
296
297 if (requires_admin) {
298 if (admin_users != NULL) {
299 message_markup_secondary =
300 _("An application is attempting to perform an action that requires privileges. Authentication as one of the users below is required to perform this action.");
301
302 create_user_combobox (auth_dialog, admin_users);
303 gtk_widget_set_no_show_all (auth_dialog->priv->user_combobox, FALSE);
304
305 } else {
306 message_markup_secondary =
307 _("An application is attempting to perform an action that requires privileges. Authentication as the super user is required to perform this action.");
308 }
309 } else {
310 message_markup_secondary =
311 _("An application is attempting to perform an action that requires privileges. Authentication is required to perform this action.");
312 }
313 gtk_label_set_markup (GTK_LABEL (auth_dialog->priv->message_label_secondary), message_markup_secondary);
314 }
315
316 static void
317 polkit_gnome_auth_dialog_set_message (PolkitGnomeAuthDialog *auth_dialog, const char *markup)
318 {
319 char *str;
320 str = g_strdup_printf ("<big><b>%s</b></big>", markup);
321 gtk_label_set_markup (GTK_LABEL (auth_dialog->priv->message_label), str);
322 g_free (str);
323 }
324
325 static void
326 polkit_gnome_auth_dialog_set_action_id (PolkitGnomeAuthDialog *auth_dialog, const char *action_id)
327 {
328 char *str;
329 str = g_strdup_printf ("<small>%s</small>", action_id);
330 gtk_label_set_markup (GTK_LABEL (auth_dialog->priv->privilege_desc_label), str);
331 g_free (str);
332 }
333
334 static void
335 polkit_gnome_auth_dialog_set_program (PolkitGnomeAuthDialog *auth_dialog, const char *program)
336 {
337 char *str;
338 str = g_strdup_printf ("<small>%s</small>", program);
339 gtk_label_set_markup (GTK_LABEL (auth_dialog->priv->app_desc_label), str);
340 g_free (str);
341 }
342
343
344 void
345 polkit_gnome_auth_dialog_set_prompt (PolkitGnomeAuthDialog *auth_dialog,
346 const char *prompt,
347 gboolean show_chars)
348 {
349 gtk_label_set_text_with_mnemonic (GTK_LABEL (auth_dialog->priv->prompt_label), prompt);
350 gtk_entry_set_visibility (GTK_ENTRY (auth_dialog->priv->password_entry), show_chars);
351 gtk_entry_set_text (GTK_ENTRY (auth_dialog->priv->password_entry), "");
352 gtk_widget_grab_focus (auth_dialog->priv->password_entry);
353 }
354
355 static void
356 polkit_gnome_auth_dialog_set_property (GObject *object,
357 guint prop_id,
358 const GValue *value,
359 GParamSpec *pspec)
360 {
361 PolkitGnomeAuthDialog *auth_dialog = POLKIT_GNOME_AUTH_DIALOG (object);
362 switch (prop_id)
363 {
364 case PROP_PROGRAM:
365 polkit_gnome_auth_dialog_set_program (auth_dialog, g_value_get_string (value));
366 break;
367
368 case PROP_ACTION_ID:
369 polkit_gnome_auth_dialog_set_action_id (auth_dialog, g_value_get_string (value));
370 break;
371
372 case PROP_MESSAGE:
373 if (auth_dialog->priv->message)
374 g_free (auth_dialog->priv->message);
375 auth_dialog->priv->message = g_strdup (g_value_get_string (value));
376 polkit_gnome_auth_dialog_set_message (auth_dialog, auth_dialog->priv->message);
377 break;
378
379 default:
380 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
381 break;
382 }
383 }
384
385 static void
386 polkit_gnome_auth_dialog_get_property (GObject *object,
387 guint prop_id,
388 GValue *value,
389 GParamSpec *pspec)
390 {
391 PolkitGnomeAuthDialog *auth_dialog = POLKIT_GNOME_AUTH_DIALOG (object);
392
393 switch (prop_id)
394 {
395 case PROP_MESSAGE:
396 g_value_set_string (value, auth_dialog->priv->message);
397 break;
398
399 default:
400 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
401 break;
402 }
403
404 }
405
406 static GtkWidget *
407 add_row (GtkWidget *table, int row, const char *label_text, GtkWidget *entry)
408 {
409 GtkWidget *label;
410
411 label = gtk_label_new_with_mnemonic (label_text);
412 gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
413 gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
414
415 gtk_table_attach (GTK_TABLE (table), label,
416 0, 1, row, row + 1,
417 GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
418 gtk_table_attach_defaults (GTK_TABLE (table), entry,
419 1, 2, row, row + 1);
420 gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
421
422 return label;
423 }
424
425 static void
426 remember_check_button_toggled (GtkWidget *widget, PolkitGnomeAuthDialog *auth_dialog)
427 {
428 gboolean toggled;
429
430 toggled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
431 if (auth_dialog->priv->keep_privilege_session_only_check_button != NULL) {
432 gtk_widget_set_sensitive (auth_dialog->priv->keep_privilege_session_only_check_button, toggled);
433 }
434 }
435
436 static void
437 polkit_gnome_auth_dialog_init (PolkitGnomeAuthDialog *auth_dialog)
438 {
439 GtkDialog *dialog = GTK_DIALOG (auth_dialog);
440 PolkitGnomeAuthDialogPrivate *priv;
441
442 priv = auth_dialog->priv = g_new0 (PolkitGnomeAuthDialogPrivate, 1);
443
444 gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
445 gtk_dialog_add_button (dialog, _("_Authenticate"), GTK_RESPONSE_OK);
446 gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
447
448 gtk_dialog_set_has_separator (dialog, FALSE);
449 gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
450 gtk_box_set_spacing (GTK_BOX (dialog->vbox), 2); /* 2 * 5 + 2 = 12 */
451 gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 5);
452 gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
453 gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
454 gtk_window_set_icon_name (GTK_WINDOW (dialog), GTK_STOCK_DIALOG_AUTHENTICATION);
455
456 GtkWidget *hbox, *main_vbox, *vbox, *icon;
457
458 hbox = gtk_hbox_new (FALSE, 12);
459 gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
460 gtk_box_pack_start (GTK_BOX (dialog->vbox), hbox, TRUE, TRUE, 0);
461
462 icon = gtk_image_new_from_stock (GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG);
463 gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0.0);
464 gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
465
466 main_vbox = gtk_vbox_new (FALSE, 10);
467 gtk_box_pack_start (GTK_BOX (hbox), main_vbox, TRUE, TRUE, 0);
468
469 /* main message */
470 priv->message_label = gtk_label_new (NULL);
471 polkit_gnome_auth_dialog_set_message (auth_dialog, "");
472 gtk_misc_set_alignment (GTK_MISC (priv->message_label), 0.0, 0.5);
473 gtk_label_set_line_wrap (GTK_LABEL (priv->message_label), TRUE);
474 gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (priv->message_label),
475 FALSE, FALSE, 0);
476
477
478 /* secondary message */
479 priv->message_label_secondary = gtk_label_new (NULL);
480 gtk_label_set_markup (GTK_LABEL (priv->message_label_secondary), "");
481 gtk_misc_set_alignment (GTK_MISC (priv->message_label_secondary), 0.0, 0.5);
482 gtk_label_set_line_wrap (GTK_LABEL (priv->message_label_secondary), TRUE);
483 gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (priv->message_label_secondary),
484 FALSE, FALSE, 0);
485
486 /* user combobox */
487 priv->user_combobox = gtk_combo_box_new ();
488 gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET (priv->user_combobox), FALSE, FALSE, 0);
489
490 /* password entry */
491 vbox = gtk_vbox_new (FALSE, 6);
492 gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
493
494 GtkWidget *table_alignment;
495 GtkWidget *table;
496 table_alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0);
497 gtk_box_pack_start (GTK_BOX (vbox), table_alignment, FALSE, FALSE, 0);
498 table = gtk_table_new (1, 2, FALSE);
499 gtk_table_set_col_spacings (GTK_TABLE (table), 12);
500 gtk_table_set_row_spacings (GTK_TABLE (table), 6);
501 gtk_container_add (GTK_CONTAINER (table_alignment), table);
502 priv->password_entry = gtk_entry_new ();
503 gtk_entry_set_visibility (GTK_ENTRY (priv->password_entry), FALSE);
504 priv->prompt_label = add_row (table, 0, _("_Password:"), priv->password_entry);
505
506 g_signal_connect_swapped (priv->password_entry, "activate",
507 G_CALLBACK (gtk_window_activate_default),
508 dialog);
509
510 priv->keep_privilege_check_button = gtk_check_button_new_with_mnemonic ("");
511 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->keep_privilege_check_button), TRUE);
512 gtk_box_pack_start (GTK_BOX (vbox), priv->keep_privilege_check_button, FALSE, FALSE, 0);
513 g_signal_connect (priv->keep_privilege_check_button, "toggled",
514 G_CALLBACK (remember_check_button_toggled), auth_dialog);
515
516 GtkWidget *keep_alignment;
517 keep_alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0);
518 gtk_alignment_set_padding (GTK_ALIGNMENT (keep_alignment), 0, 0, 10, 0);
519
520 gtk_box_pack_start (GTK_BOX (vbox), keep_alignment, FALSE, FALSE, 0);
521 GtkWidget *vbox3;
522 vbox3 = gtk_vbox_new (FALSE, 6);
523 gtk_container_add (GTK_CONTAINER (keep_alignment), vbox3);
524
525 priv->keep_privilege_session_only_check_button =
526 gtk_check_button_new_with_mnemonic (_("For this _session only"));
527 gtk_box_pack_start (GTK_BOX (vbox3), priv->keep_privilege_session_only_check_button, FALSE, FALSE, 0);
528
529 gtk_widget_set_no_show_all (auth_dialog->priv->keep_privilege_check_button, TRUE);
530 gtk_widget_set_no_show_all (auth_dialog->priv->keep_privilege_session_only_check_button, TRUE);
531
532
533 GtkWidget *details_expander;
534 details_expander = gtk_expander_new_with_mnemonic (_("<small><b>_Details</b></small>"));
535 gtk_expander_set_use_markup (GTK_EXPANDER (details_expander), TRUE);
536 gtk_box_pack_start (GTK_BOX (dialog->vbox), details_expander, FALSE, FALSE, 0);
537 //gtk_box_pack_start (GTK_BOX (vbox), details_expander, FALSE, FALSE, 0);
538
539 GtkWidget *details_vbox;
540 details_vbox = gtk_vbox_new (FALSE, 10);
541 gtk_container_add (GTK_CONTAINER (details_expander), details_vbox);
542
543 //GtkWidget *table_alignment;
544 //GtkWidget *table;
545 table_alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0);
546 gtk_box_pack_start (GTK_BOX (details_vbox), table_alignment, FALSE, FALSE, 0);
547 table = gtk_table_new (1, 2, FALSE);
548 gtk_table_set_col_spacings (GTK_TABLE (table), 12);
549 gtk_table_set_row_spacings (GTK_TABLE (table), 6);
550 gtk_container_add (GTK_CONTAINER (table_alignment), table);
551
552
553 priv->app_desc_label = gtk_label_new (NULL);
554 gtk_misc_set_alignment (GTK_MISC (priv->app_desc_label), 0, 1.0);
555 add_row (table, 0, _("<small><b>Application:</b></small>"), priv->app_desc_label);
556
557 priv->privilege_desc_label = gtk_label_new (NULL);
558 gtk_misc_set_alignment (GTK_MISC (priv->privilege_desc_label), 0, 1.0);
559 add_row (table, 1, _("<small><b>Action:</b></small>"), priv->privilege_desc_label);
560 }
561
562 static void
563 polkit_gnome_auth_dialog_finalize (GObject *object)
564 {
565 PolkitGnomeAuthDialog *auth_dialog = POLKIT_GNOME_AUTH_DIALOG (object);
566
567 g_free (auth_dialog->priv);
568
569 G_OBJECT_CLASS (polkit_gnome_auth_dialog_parent_class)->finalize (object);
570 }
571
572 #define PARAM_STATIC G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB
573
574 static void
575 polkit_gnome_auth_dialog_class_init (PolkitGnomeAuthDialogClass * klass)
576 {
577 GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
578
579 polkit_gnome_auth_dialog_parent_class = (GObjectClass *) g_type_class_peek_parent (klass);
580
581 gobject_class->finalize = polkit_gnome_auth_dialog_finalize;
582 gobject_class->get_property = polkit_gnome_auth_dialog_get_property;
583 gobject_class->set_property = polkit_gnome_auth_dialog_set_property;
584
585 g_object_class_install_property
586 (gobject_class,
587 PROP_PROGRAM,
588 g_param_spec_string ("program",
589 "program",
590 "program",
591 NULL,
592 G_PARAM_READWRITE | PARAM_STATIC));
593
594 g_object_class_install_property
595 (gobject_class,
596 PROP_ACTION_ID,
597 g_param_spec_string ("action-id",
598 "action-id",
599 "action-id",
600 NULL,
601 G_PARAM_READWRITE | PARAM_STATIC));
602
603 g_object_class_install_property
604 (gobject_class,
605 PROP_MESSAGE,
606 g_param_spec_string ("message",
607 "message",
608 "message",
609 NULL,
610 G_PARAM_READWRITE | PARAM_STATIC));
611
612
613 signals[USER_SELECTED] =
614 g_signal_new ("user-selected",
615 G_TYPE_FROM_CLASS (klass),
616 G_SIGNAL_RUN_LAST,
617 G_STRUCT_OFFSET (PolkitGnomeAuthDialogClass,
618 user_selected),
619 NULL, NULL,
620 g_cclosure_marshal_VOID__STRING,
621 G_TYPE_NONE, 1,
622 G_TYPE_STRING);
623
624 }
625
626 /**
627 * polkit_gnome_auth_dialog_new:
628 *
629 * Yada yada yada...
630 *
631 * Returns: A new password dialog.
632 **/
633 GtkWidget *
634 polkit_gnome_auth_dialog_new (const char *path_to_program,
635 const char *action_id,
636 const char *message_markup)
637 {
638 PolkitGnomeAuthDialog *auth_dialog;
639 GtkWindow *window;
640
641 auth_dialog = g_object_new (POLKIT_GNOME_TYPE_AUTH_DIALOG,
642 "program", path_to_program,
643 "action-id", action_id,
644 "message", message_markup,
645 NULL);
646
647 window = GTK_WINDOW (auth_dialog);
648
649 gtk_window_set_position (window, GTK_WIN_POS_CENTER);
650 gtk_window_set_modal (window, TRUE);
651 gtk_window_set_resizable (window, FALSE);
652 gtk_window_set_keep_above (window, TRUE);
653 gtk_window_set_title (window, _("Authenticate"));
654 g_signal_connect (auth_dialog, "close",
655 G_CALLBACK (gtk_widget_hide), NULL);
656
657 return GTK_WIDGET (auth_dialog);
658 }
659
660 const char *
661 polkit_gnome_auth_dialog_get_password (PolkitGnomeAuthDialog *auth_dialog)
662 {
663 return gtk_entry_get_text (GTK_ENTRY (auth_dialog->priv->password_entry));
664 }
665
666 gboolean
667 polkit_gnome_auth_dialog_get_remember_session (PolkitGnomeAuthDialog *auth_dialog)
668 {
669 gboolean ret;
670 gboolean remember;
671
672 remember = gtk_toggle_button_get_active (
673 GTK_TOGGLE_BUTTON (auth_dialog->priv->keep_privilege_check_button));
674
675 if (auth_dialog->priv->can_do_always) {
676 gboolean session_only;
677 session_only = gtk_toggle_button_get_active (
678 GTK_TOGGLE_BUTTON (auth_dialog->priv->keep_privilege_session_only_check_button));
679
680 ret = remember && session_only;
681 } else {
682 ret = remember;
683 }
684 return ret;
685 }
686
687 gboolean
688 polkit_gnome_auth_dialog_get_remember_always (PolkitGnomeAuthDialog *auth_dialog)
689 {
690 gboolean ret;
691 gboolean remember;
692
693 remember = gtk_toggle_button_get_active (
694 GTK_TOGGLE_BUTTON (auth_dialog->priv->keep_privilege_check_button));
695
696 if (auth_dialog->priv->can_do_always) {
697 gboolean session_only;
698 session_only = gtk_toggle_button_get_active (
699 GTK_TOGGLE_BUTTON (auth_dialog->priv->keep_privilege_session_only_check_button));
700
701 ret = remember && (!session_only);
702 } else {
703 ret = FALSE;
704 }
705 return ret;
706 }
707
708 /**
709 * polkit_gnome_auth_dialog_indicate_auth_error:
710 * @auth_dialog: the auth dialog
711 *
712 * Call this function to indicate an authentication error; typically shakes the window
713 **/
714 void
715 polkit_gnome_auth_dialog_indicate_auth_error (PolkitGnomeAuthDialog *auth_dialog)
716 {
717 int x, y;
718 int n;
719 int diff;
720
721 /* TODO: detect compositing manager and do fancy stuff here */
722
723 gtk_window_get_position (GTK_WINDOW (auth_dialog), &x, &y);
724 for (n = 0; n < 10; n++) {
725 if (n % 2 == 0)
726 diff = -15;
727 else
728 diff = 15;
729
730 gtk_window_move (GTK_WINDOW (auth_dialog), x + diff, y);
731
732 while (gtk_events_pending ()) {
733 gtk_main_iteration ();
734 }
735
736 g_usleep (10000);
737 }
738 gtk_window_move (GTK_WINDOW (auth_dialog), x, y);
739 }
0 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*-
1 *
2 * Copyright (C) 2007 David Zeuthen <david@fubar.dk>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 */
19
20 #ifndef POLKIT_GNOME_AUTH_DIALOG_H
21 #define POLKIT_GNOME_AUTH_DIALOG_H
22
23 #include <gtk/gtkdialog.h>
24
25 G_BEGIN_DECLS
26
27 #define POLKIT_GNOME_TYPE_AUTH_DIALOG (polkit_gnome_auth_dialog_get_type ())
28 #define POLKIT_GNOME_AUTH_DIALOG(obj) (GTK_CHECK_CAST ((obj), POLKIT_GNOME_TYPE_AUTH_DIALOG, PolkitGnomeAuthDialog))
29 #define POLKIT_GNOME_AUTH_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), POLKIT_GNOME_TYPE_AUTH_DIALOG, PolkitGnomeAuthDialogClass))
30 #define POLKIT_GNOME_IS_AUTH_DIALOG(obj) (GTK_CHECK_TYPE ((obj), POLKIT_GNOME_TYPE_AUTH_DIALOG))
31 #define POLKIT_GNOME_IS_AUTH_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), POLKIT_GNOME_TYPE_AUTH_DIALOG))
32
33 typedef struct _PolkitGnomeAuthDialog PolkitGnomeAuthDialog;
34 typedef struct _PolkitGnomeAuthDialogClass PolkitGnomeAuthDialogClass;
35 typedef struct _PolkitGnomeAuthDialogPrivate PolkitGnomeAuthDialogPrivate;
36
37 struct _PolkitGnomeAuthDialog
38 {
39 GtkDialog gtk_dialog;
40 PolkitGnomeAuthDialogPrivate *priv;
41 };
42
43 struct _PolkitGnomeAuthDialogClass
44 {
45 GtkDialogClass parent_class;
46
47 /* Signals: */
48
49 void (*user_selected) (PolkitGnomeAuthDialog *auth_dialog, const char *user_name);
50 };
51
52 GtkType polkit_gnome_auth_dialog_get_type (void);
53 GtkWidget *polkit_gnome_auth_dialog_new (const char *path_to_program,
54 const char *action_id,
55 const char *message_markup);
56
57 void polkit_gnome_auth_dialog_set_prompt (PolkitGnomeAuthDialog *auth_dialog,
58 const char *prompt,
59 gboolean show_chars);
60
61 const char *polkit_gnome_auth_dialog_get_password (PolkitGnomeAuthDialog *auth_dialog);
62
63 void polkit_gnome_auth_dialog_set_options (PolkitGnomeAuthDialog *auth_dialog,
64 gboolean session,
65 gboolean always,
66 gboolean requires_admin,
67 char **admin_users);
68
69 gboolean polkit_gnome_auth_dialog_get_remember_session (PolkitGnomeAuthDialog *auth_dialog);
70 gboolean polkit_gnome_auth_dialog_get_remember_always (PolkitGnomeAuthDialog *auth_dialog);
71 gboolean polkit_gnome_auth_dialog_get_apply_all (PolkitGnomeAuthDialog *auth_dialog);
72
73 void polkit_gnome_auth_dialog_select_admin_user (PolkitGnomeAuthDialog *auth_dialog, const char *admin_user);
74
75 void polkit_gnome_auth_dialog_indicate_auth_error (PolkitGnomeAuthDialog *auth_dialog);
76
77 G_END_DECLS
78
79 #endif /* POLKIT_GNOME_AUTH_DIALOG_H */
0 /* Generated by dbus-binding-tool; do not edit! */
1
2
3 #ifndef __dbus_glib_marshal_polkit_gnome_manager_MARSHAL_H__
4 #define __dbus_glib_marshal_polkit_gnome_manager_MARSHAL_H__
5
6 #include <glib-object.h>
7
8 G_BEGIN_DECLS
9
10 #ifdef G_ENABLE_DEBUG
11 #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v)
12 #define g_marshal_value_peek_char(v) g_value_get_char (v)
13 #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v)
14 #define g_marshal_value_peek_int(v) g_value_get_int (v)
15 #define g_marshal_value_peek_uint(v) g_value_get_uint (v)
16 #define g_marshal_value_peek_long(v) g_value_get_long (v)
17 #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v)
18 #define g_marshal_value_peek_int64(v) g_value_get_int64 (v)
19 #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v)
20 #define g_marshal_value_peek_enum(v) g_value_get_enum (v)
21 #define g_marshal_value_peek_flags(v) g_value_get_flags (v)
22 #define g_marshal_value_peek_float(v) g_value_get_float (v)
23 #define g_marshal_value_peek_double(v) g_value_get_double (v)
24 #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v)
25 #define g_marshal_value_peek_param(v) g_value_get_param (v)
26 #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v)
27 #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v)
28 #define g_marshal_value_peek_object(v) g_value_get_object (v)
29 #else /* !G_ENABLE_DEBUG */
30 /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
31 * Do not access GValues directly in your code. Instead, use the
32 * g_value_get_*() functions
33 */
34 #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int
35 #define g_marshal_value_peek_char(v) (v)->data[0].v_int
36 #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint
37 #define g_marshal_value_peek_int(v) (v)->data[0].v_int
38 #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint
39 #define g_marshal_value_peek_long(v) (v)->data[0].v_long
40 #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong
41 #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64
42 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64
43 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long
44 #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong
45 #define g_marshal_value_peek_float(v) (v)->data[0].v_float
46 #define g_marshal_value_peek_double(v) (v)->data[0].v_double
47 #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer
48 #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer
49 #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer
50 #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer
51 #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer
52 #endif /* !G_ENABLE_DEBUG */
53
54
55 /* NONE:STRING,UINT,POINTER (/tmp/dbus-binding-tool-c-marshallers.XE8PXT:1) */
56 extern void dbus_glib_marshal_polkit_gnome_manager_VOID__STRING_UINT_POINTER (GClosure *closure,
57 GValue *return_value,
58 guint n_param_values,
59 const GValue *param_values,
60 gpointer invocation_hint,
61 gpointer marshal_data);
62 void
63 dbus_glib_marshal_polkit_gnome_manager_VOID__STRING_UINT_POINTER (GClosure *closure,
64 GValue *return_value,
65 guint n_param_values,
66 const GValue *param_values,
67 gpointer invocation_hint,
68 gpointer marshal_data)
69 {
70 typedef void (*GMarshalFunc_VOID__STRING_UINT_POINTER) (gpointer data1,
71 gpointer arg_1,
72 guint arg_2,
73 gpointer arg_3,
74 gpointer data2);
75 register GMarshalFunc_VOID__STRING_UINT_POINTER callback;
76 register GCClosure *cc = (GCClosure*) closure;
77 register gpointer data1, data2;
78
79 g_return_if_fail (n_param_values == 4);
80
81 if (G_CCLOSURE_SWAP_DATA (closure))
82 {
83 data1 = closure->data;
84 data2 = g_value_peek_pointer (param_values + 0);
85 }
86 else
87 {
88 data1 = g_value_peek_pointer (param_values + 0);
89 data2 = closure->data;
90 }
91 callback = (GMarshalFunc_VOID__STRING_UINT_POINTER) (marshal_data ? marshal_data : cc->callback);
92
93 callback (data1,
94 g_marshal_value_peek_string (param_values + 1),
95 g_marshal_value_peek_uint (param_values + 2),
96 g_marshal_value_peek_pointer (param_values + 3),
97 data2);
98 }
99 #define dbus_glib_marshal_polkit_gnome_manager_NONE__STRING_UINT_POINTER dbus_glib_marshal_polkit_gnome_manager_VOID__STRING_UINT_POINTER
100
101 G_END_DECLS
102
103 #endif /* __dbus_glib_marshal_polkit_gnome_manager_MARSHAL_H__ */
104
105 #include <dbus/dbus-glib.h>
106 static const DBusGMethodInfo dbus_glib_polkit_gnome_manager_methods[] = {
107 { (GCallback) polkit_gnome_manager_show_dialog, dbus_glib_marshal_polkit_gnome_manager_NONE__STRING_UINT_POINTER, 0 },
108 };
109
110 const DBusGObjectInfo dbus_glib_polkit_gnome_manager_object_info = {
111 0,
112 dbus_glib_polkit_gnome_manager_methods,
113 1,
114 "org.gnome.PolicyKit.Manager\0ShowDialog\0A\0action_id\0I\0s\0xid\0I\0u\0gained_privilege\0O\0F\0N\0b\0\0\0",
115 "\0",
116 "\0"
117 };
118
0 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
1 *
2 * Copyright (C) 2007 David Zeuthen <david@fubar.dk>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 */
19
20 #ifdef HAVE_CONFIG_H
21 # include "config.h"
22 #endif
23
24 #include <stdlib.h>
25 #include <stdio.h>
26 #include <fcntl.h>
27 #include <unistd.h>
28 #include <string.h>
29 #include <sys/wait.h>
30
31 #include <glib.h>
32 #include <glib/gi18n-lib.h>
33 #include <glib-object.h>
34
35 #define DBUS_API_SUBJECT_TO_CHANGE
36 #include <dbus/dbus-glib.h>
37 #include <dbus/dbus-glib-lowlevel.h>
38
39 #include <polkit/polkit.h>
40 #include <polkit-dbus/polkit-dbus.h>
41 #include <polkit-grant/polkit-grant.h>
42
43 #include "polkit-gnome-manager.h"
44 #include "polkit-gnome-manager-glue.h"
45
46 #include "polkit-gnome-auth-dialog.h"
47
48 #define POLKIT_GNOME_MANAGER_DBUS_PATH "/org/gnome/PolicyKit/Manager"
49
50 static void do_cancel_auth (void);
51
52 static gboolean
53 do_polkit_auth (PolKitContext *pk_context,
54 DBusConnection *system_bus_connection,
55 const char *caller_exe_name,
56 const char *action_id,
57 guint32 xid,
58 pid_t caller_pid);
59
60 struct PolKitGnomeManagerPrivate
61 {
62 DBusGConnection *session_bus_connection;
63 DBusGProxy *session_bus_proxy;
64
65 DBusGConnection *system_bus_connection;
66
67 PolKitContext *pk_context;
68
69 gboolean auth_in_progress;
70 char *session_bus_unique_name_of_client;
71 };
72
73 static void polkit_gnome_manager_class_init (PolKitGnomeManagerClass *klass);
74 static void polkit_gnome_manager_init (PolKitGnomeManager *seat);
75 static void polkit_gnome_manager_finalize (GObject *object);
76
77 G_DEFINE_TYPE (PolKitGnomeManager, polkit_gnome_manager, G_TYPE_OBJECT)
78
79 #define POLKIT_GNOME_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), POLKIT_GNOME_TYPE_MANAGER, PolKitGnomeManagerPrivate))
80
81 GQuark
82 polkit_gnome_manager_error_quark (void)
83 {
84 static GQuark ret = 0;
85
86 #if 0
87 if (etype == 0) {
88 static const GEnumValue values[] = {
89 ENUM_ENTRY (POLKIT_MANAGER_ERROR_NO_SUCH_USER, "NoSuchUser"),
90 ENUM_ENTRY (POLKIT_MANAGER_ERROR_NO_SUCH_PRIVILEGE, "NoSuchPrivilege"),
91 ENUM_ENTRY (POLKIT_MANAGER_ERROR_NOT_PRIVILEGED, "NotPrivileged"),
92 ENUM_ENTRY (POLKIT_MANAGER_ERROR_CANNOT_OBTAIN_PRIVILEGE, "CannotObtainPrivilege"),
93 ENUM_ENTRY (POLKIT_MANAGER_ERROR_ERROR, "Error"),
94 { 0, 0, 0 }
95 };
96
97 g_assert (POLKIT_MANAGER_NUM_ERRORS == G_N_ELEMENTS (values) - 1);
98
99 etype = g_enum_register_static ("PolkitManagerError", values);
100 }
101 #endif
102
103 if (ret == 0) {
104 ret = g_quark_from_static_string ("polkit_gnome_manager_error");
105 }
106
107 return ret;
108 }
109
110 static GObject *
111 polkit_gnome_manager_constructor (GType type,
112 guint n_construct_properties,
113 GObjectConstructParam *construct_properties)
114 {
115 PolKitGnomeManager *manager;
116 PolKitGnomeManagerClass *klass;
117
118 klass = POLKIT_GNOME_MANAGER_CLASS (g_type_class_peek (POLKIT_GNOME_TYPE_MANAGER));
119
120 manager = POLKIT_GNOME_MANAGER (G_OBJECT_CLASS (polkit_gnome_manager_parent_class)->constructor (
121 type,
122 n_construct_properties,
123 construct_properties));
124
125 return G_OBJECT (manager);
126 }
127
128 static void
129 polkit_gnome_manager_class_init (PolKitGnomeManagerClass *klass)
130 {
131 GObjectClass *object_class = G_OBJECT_CLASS (klass);
132
133 object_class->constructor = polkit_gnome_manager_constructor;
134 object_class->finalize = polkit_gnome_manager_finalize;
135
136 g_type_class_add_private (klass, sizeof (PolKitGnomeManagerPrivate));
137
138 dbus_g_object_type_install_info (POLKIT_GNOME_TYPE_MANAGER, &dbus_glib_polkit_gnome_manager_object_info);
139 }
140
141 static void
142 polkit_gnome_manager_init (PolKitGnomeManager *manager)
143 {
144 manager->priv = POLKIT_GNOME_MANAGER_GET_PRIVATE (manager);
145
146 }
147
148 static void
149 polkit_gnome_manager_finalize (GObject *object)
150 {
151 PolKitGnomeManager *manager;
152
153 g_return_if_fail (object != NULL);
154 g_return_if_fail (POLKIT_GNOME_IS_MANAGER (object));
155
156 manager = POLKIT_GNOME_MANAGER (object);
157
158 g_return_if_fail (manager->priv != NULL);
159
160 g_object_unref (manager->priv->session_bus_proxy);
161
162 G_OBJECT_CLASS (polkit_gnome_manager_parent_class)->finalize (object);
163 }
164
165
166 static void
167 _polkit_config_changed_cb (PolKitContext *pk_context, gpointer user_data)
168 {
169 g_debug ("PolicyKit reports that the config have changed");
170 }
171
172
173 static void
174 session_bus_name_owner_changed (DBusGProxy *bus_proxy,
175 const char *service_name,
176 const char *old_service_name,
177 const char *new_service_name,
178 gpointer user_data)
179 {
180 PolKitGnomeManager *manager = user_data;
181
182 if (strlen (new_service_name) == 0 &&
183 manager->priv->auth_in_progress &&
184 manager->priv->session_bus_unique_name_of_client != NULL &&
185 strcmp (manager->priv->session_bus_unique_name_of_client, old_service_name) == 0) {
186 do_cancel_auth ();
187 }
188
189 }
190
191
192 static gboolean
193 pk_io_watch_have_data (GIOChannel *channel, GIOCondition condition, gpointer user_data)
194 {
195 int fd;
196 PolKitContext *pk_context = user_data;
197 fd = g_io_channel_unix_get_fd (channel);
198 polkit_context_io_func (pk_context, fd);
199 return TRUE;
200 }
201
202 static int
203 pk_io_add_watch (PolKitContext *pk_context, int fd)
204 {
205 guint id = 0;
206 GIOChannel *channel;
207 channel = g_io_channel_unix_new (fd);
208 if (channel == NULL)
209 goto out;
210 id = g_io_add_watch (channel, G_IO_IN, pk_io_watch_have_data, pk_context);
211 if (id == 0) {
212 g_io_channel_unref (channel);
213 goto out;
214 }
215 g_io_channel_unref (channel);
216 out:
217 return id;
218 }
219
220 static void
221 pk_io_remove_watch (PolKitContext *pk_context, int watch_id)
222 {
223 g_source_remove (watch_id);
224 }
225
226 static gboolean
227 register_manager (PolKitGnomeManager *manager)
228 {
229 GError *error = NULL;
230 PolKitError *pk_error;
231
232 error = NULL;
233 manager->priv->session_bus_connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
234 if (manager->priv->session_bus_connection == NULL) {
235 if (error != NULL) {
236 g_critical ("error getting session bus: %s", error->message);
237 g_error_free (error);
238 }
239 goto error;
240 }
241
242 manager->priv->system_bus_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
243 if (manager->priv->system_bus_connection == NULL) {
244 if (error != NULL) {
245 g_critical ("error getting system bus: %s", error->message);
246 g_error_free (error);
247 }
248 goto error;
249 }
250
251 dbus_g_connection_register_g_object (manager->priv->session_bus_connection, POLKIT_GNOME_MANAGER_DBUS_PATH,
252 G_OBJECT (manager));
253
254 manager->priv->session_bus_proxy = dbus_g_proxy_new_for_name (manager->priv->session_bus_connection,
255 DBUS_SERVICE_DBUS,
256 DBUS_PATH_DBUS,
257 DBUS_INTERFACE_DBUS);
258
259 dbus_g_proxy_add_signal (manager->priv->session_bus_proxy,
260 "NameOwnerChanged",
261 G_TYPE_STRING,
262 G_TYPE_STRING,
263 G_TYPE_STRING,
264 G_TYPE_INVALID);
265 dbus_g_proxy_connect_signal (manager->priv->session_bus_proxy,
266 "NameOwnerChanged",
267 G_CALLBACK (session_bus_name_owner_changed),
268 manager,
269 NULL);
270
271 manager->priv->pk_context = polkit_context_new ();
272 if (manager->priv->pk_context == NULL) {
273 g_critical ("error creating PK context");
274 goto error;
275 }
276 polkit_context_set_load_descriptions (manager->priv->pk_context);
277 polkit_context_set_config_changed (manager->priv->pk_context,
278 _polkit_config_changed_cb,
279 NULL);
280 polkit_context_set_io_watch_functions (manager->priv->pk_context, pk_io_add_watch, pk_io_remove_watch);
281 pk_error = NULL;
282 if (!polkit_context_init (manager->priv->pk_context, &pk_error)) {
283 g_critical ("error creating PK context: %s", polkit_error_get_error_message (pk_error));
284 polkit_error_free (pk_error);
285 goto error;
286 }
287
288 return TRUE;
289
290 error:
291 return FALSE;
292 }
293
294
295 PolKitGnomeManager *
296 polkit_gnome_manager_new (void)
297 {
298 GObject *object;
299 gboolean res;
300
301 object = g_object_new (POLKIT_GNOME_TYPE_MANAGER, NULL);
302
303 res = register_manager (POLKIT_GNOME_MANAGER (object));
304 if (! res) {
305 g_object_unref (object);
306 return NULL;
307 }
308
309 return POLKIT_GNOME_MANAGER (object);
310 }
311
312 /* TODO: this is right now Linux specific */
313
314 static char *
315 get_exe_for_pid (pid_t pid)
316 {
317 char *result;
318 char buf[PATH_MAX];
319 ssize_t len;
320 char proc_name[32];
321
322 result = NULL;
323
324 snprintf (proc_name, sizeof (proc_name), "/proc/%d/exe", pid);
325 len = readlink (proc_name, buf, sizeof (buf) - 1);
326 if (len == -1) {
327 goto out;
328 }
329 g_assert (len >= 0 && len < PATH_MAX - 1);
330
331 buf[len] = '\0';
332 result = g_strdup (buf);
333
334 out:
335 return result;
336 }
337
338 typedef struct
339 {
340 PolKitGnomeManager *manager;
341 char *action_id;
342 guint32 xid;
343 DBusGMethodInvocation *context;
344 } WorkClosure;
345
346 static gboolean
347 do_auth (gpointer user_data)
348 {
349 WorkClosure *wc = user_data;
350 const char *sender;
351 pid_t caller_pid;
352 char *caller_exe;
353 gboolean gained_privilege;
354 GError *error;
355
356 if (wc->manager->priv->auth_in_progress) {
357 error = g_error_new (POLKIT_GNOME_MANAGER_ERROR,
358 POLKIT_GNOME_MANAGER_ERROR_AUTH_IN_PROGRESS,
359 "Another client is already authenticating. Please try again later.");
360 dbus_g_method_return_error (wc->context, error);
361 g_error_free (error);
362 goto out;
363 }
364
365 g_debug ("in show_dialog action_id='%s'", wc->action_id);
366
367 sender = dbus_g_method_get_sender (wc->context);
368
369 error = NULL;
370 if (! dbus_g_proxy_call (wc->manager->priv->session_bus_proxy, "GetConnectionUnixProcessID", &error,
371 G_TYPE_STRING, sender,
372 G_TYPE_INVALID,
373 G_TYPE_UINT, &caller_pid,
374 G_TYPE_INVALID)) {
375 g_debug ("GetConnectionUnixProcessID() failed: %s", error->message);
376 g_error_free (error);
377
378 error = g_error_new (POLKIT_GNOME_MANAGER_ERROR,
379 POLKIT_GNOME_MANAGER_ERROR_GENERAL,
380 "Unable to lookup process ID for caller");
381 dbus_g_method_return_error (wc->context, error);
382 g_error_free (error);
383 goto out;
384 }
385
386 g_debug ("process id = %d", caller_pid);
387
388 caller_exe = get_exe_for_pid (caller_pid);
389 if (caller_exe == NULL) {
390 error = g_error_new (POLKIT_GNOME_MANAGER_ERROR,
391 POLKIT_GNOME_MANAGER_ERROR_GENERAL,
392 "Unable to lookup exe for caller");
393 dbus_g_method_return_error (wc->context, error);
394 g_error_free (error);
395 goto out;
396 }
397
398 g_debug ("exe = '%s'", caller_exe);
399
400 wc->manager->priv->auth_in_progress = TRUE;
401 wc->manager->priv->session_bus_unique_name_of_client = g_strdup (sender);
402
403 gained_privilege = do_polkit_auth (wc->manager->priv->pk_context,
404 dbus_g_connection_get_connection (wc->manager->priv->system_bus_connection),
405 caller_exe,
406 wc->action_id,
407 wc->xid,
408 caller_pid);
409
410 g_free (caller_exe);
411
412 dbus_g_method_return (wc->context, gained_privilege);
413
414 wc->manager->priv->auth_in_progress = FALSE;
415 g_free (wc->manager->priv->session_bus_unique_name_of_client);
416 wc->manager->priv->session_bus_unique_name_of_client = NULL;
417 out:
418 g_free (wc->action_id);
419 g_free (wc);
420 return FALSE;
421 }
422
423 /* exported methods */
424
425 gboolean
426 polkit_gnome_manager_show_dialog (PolKitGnomeManager *manager,
427 const char *action_id,
428 guint32 xid,
429 DBusGMethodInvocation *context)
430 {
431 WorkClosure *wc;
432
433 wc = g_new0 (WorkClosure, 1);
434 wc->manager = manager;
435 wc->action_id = g_strdup (action_id);
436 wc->xid = xid;
437 wc->context = context;
438
439 g_idle_add (do_auth, wc);
440 return TRUE;
441 }
442
443
444 /*----------------------------------------------------------------------------------------------------*/
445
446 typedef struct {
447 GMainLoop *loop;
448 GtkWidget *dialog;
449 PolKitGrant *polkit_grant;
450
451 gboolean gained_privilege;
452 gboolean was_cancelled;
453 gboolean was_bogus;
454 gboolean new_user_selected;
455
456 gboolean remember_session;
457 gboolean remember_always;
458 gboolean requires_admin;
459 char **admin_users;
460
461 char *admin_user_selected;
462 } UserData;
463
464 static void
465 conversation_type (PolKitGrant *polkit_grant, PolKitResult auth_type, void *user_data)
466 {
467 UserData *ud = user_data;
468
469 ud->remember_session = FALSE;
470 ud->remember_always = FALSE;
471 ud->requires_admin = FALSE;
472
473 switch (auth_type) {
474 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH:
475 ud->requires_admin = TRUE;
476 break;
477
478 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_SESSION:
479 ud->requires_admin = TRUE;
480 ud->remember_session = TRUE;
481 break;
482
483 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_ALWAYS:
484 ud->requires_admin = TRUE;
485 ud->remember_always = TRUE;
486 break;
487
488 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH:
489 break;
490
491 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_SESSION:
492 ud->remember_session = TRUE;
493 break;
494
495 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_ALWAYS:
496 ud->remember_always = TRUE;
497 break;
498 default:
499 g_assert_not_reached ();
500 break;
501 }
502
503 polkit_gnome_auth_dialog_set_options (POLKIT_GNOME_AUTH_DIALOG (ud->dialog),
504 ud->remember_session,
505 ud->remember_always,
506 ud->requires_admin,
507 ud->admin_users);
508 }
509
510 /*--------------------------------------------------------------------------------------------------------------*/
511
512 static void
513 dialog_response (GtkDialog *dialog, gint response_id, gpointer user_data)
514 {
515 UserData *ud = user_data;
516
517 g_debug ("dialog response %d", response_id);
518 if (ud->admin_user_selected == NULL)
519 ud->admin_user_selected = g_strdup ("");
520 }
521
522 static void
523 user_selected (PolkitGnomeAuthDialog *auth_dialog, const char *user_name, gpointer user_data)
524 {
525 UserData *ud = user_data;
526
527 g_debug ("In user_selected, user_name=%s", user_name);
528
529 if (ud->admin_user_selected == NULL) {
530 /* happens when we're invoked from conversation_select_admin_user() */
531 ud->admin_user_selected = g_strdup (user_name);
532 } else {
533 g_debug ("Restart auth as new user...");
534 g_free (ud->admin_user_selected);
535 ud->admin_user_selected = g_strdup (user_name);
536 ud->new_user_selected = TRUE;
537 polkit_grant_cancel_auth (ud->polkit_grant);
538 /* break out of gtk_dialog_run() ... */
539 gtk_dialog_response (GTK_DIALOG (ud->dialog), GTK_RESPONSE_OK);
540 }
541 }
542
543 static char *
544 conversation_select_admin_user (PolKitGrant *polkit_grant, char **admin_users, void *user_data)
545 {
546 UserData *ud = user_data;
547 gulong response_id;
548 char *result;
549 int n;
550 const char *user_name;
551
552 /* if we've already selected the admin user.. then reuse the same one (this
553 * is mainly when the user entered the wrong password)
554 */
555 if (ud->admin_user_selected != NULL) {
556 result = strdup (ud->admin_user_selected);
557 goto out;
558 }
559
560 ud->admin_users = g_strdupv (admin_users);
561
562 /* show the auth dialog with the given admin users */
563 polkit_gnome_auth_dialog_set_options (POLKIT_GNOME_AUTH_DIALOG (ud->dialog),
564 ud->remember_session,
565 ud->remember_always,
566 ud->requires_admin,
567 ud->admin_users);
568
569 /* if we are running as one of the users in admin_users then preselect that user... */
570 user_name = g_get_user_name ();
571 if (user_name != NULL) {
572 for (n = 0; admin_users[n] != NULL; n++) {
573 if (strcmp (user_name, admin_users[n]) == 0) {
574 ud->admin_user_selected = g_strdup (user_name);
575 result = strdup (ud->admin_user_selected);
576
577 polkit_gnome_auth_dialog_select_admin_user (POLKIT_GNOME_AUTH_DIALOG (ud->dialog),
578 ud->admin_user_selected);
579
580 g_debug ("Preselecting ourselves as admin_user");
581 goto out;
582 }
583 }
584 }
585
586 polkit_gnome_auth_dialog_set_prompt (POLKIT_GNOME_AUTH_DIALOG (ud->dialog), _("_Password:"), FALSE);
587 response_id = g_signal_connect (GTK_WIDGET (ud->dialog), "response", G_CALLBACK (dialog_response), ud);
588 gtk_widget_show_all (ud->dialog);
589
590 /* run the mainloop waiting for the user to be selected */
591 while (ud->admin_user_selected == NULL)
592 g_main_context_iteration (g_main_loop_get_context (ud->loop), TRUE);
593
594 g_signal_handler_disconnect (GTK_WIDGET (ud->dialog), response_id);
595
596 /* if admin_user_selected is the empty string.. it means the dialog was
597 * cancelled (see dialog_response() above)
598 */
599 if (strcmp (ud->admin_user_selected, "") == 0) {
600 ud->was_cancelled = TRUE;
601 polkit_grant_cancel_auth (polkit_grant);
602 result = NULL;
603 } else {
604 result = strdup (ud->admin_user_selected);
605 }
606 out:
607 return result;
608 }
609
610 /*--------------------------------------------------------------------------------------------------------------*/
611
612 static char *
613 conversation_pam_prompt (PolKitGrant *polkit_grant, const char *request, void *user_data, gboolean echo_on)
614 {
615 UserData *ud = user_data;
616 char *password;
617 char *request2;
618 int response;
619
620 password = NULL;
621
622 g_debug ("in conversation_pam_prompt, request='%s', echo_on=%d", request, echo_on);
623
624 /* Fix up, and localize, password prompt if it's password auth */
625 if (g_ascii_strncasecmp (request, "password", 8) == 0) {
626 if (ud->requires_admin) {
627 if (ud->admin_user_selected != NULL) {
628 request2 = g_strdup_printf (_("_Password for %s:"), ud->admin_user_selected);
629 } else {
630 request2 = g_strdup (_("_Password for root:"));
631 }
632 } else {
633 request2 = g_strdup (_("_Password:"));
634 }
635 } else {
636 request2 = g_strdup (request);
637 }
638
639 polkit_gnome_auth_dialog_set_prompt (POLKIT_GNOME_AUTH_DIALOG (ud->dialog), request2, echo_on);
640 g_free (request2);
641
642 gtk_widget_show_all (ud->dialog);
643
644 response = gtk_dialog_run (GTK_DIALOG (ud->dialog));
645
646 /* cancel auth unless user clicked "Authenticate" */
647 if (response != GTK_RESPONSE_OK) {
648 ud->was_cancelled = TRUE;
649 polkit_grant_cancel_auth (polkit_grant);
650 goto out;
651 }
652
653 password = strdup (polkit_gnome_auth_dialog_get_password (POLKIT_GNOME_AUTH_DIALOG (ud->dialog)));
654 out:
655 return password;
656 }
657
658 static char *
659 conversation_pam_prompt_echo_off (PolKitGrant *polkit_grant, const char *request, void *user_data)
660 {
661 return conversation_pam_prompt (polkit_grant, request, user_data, FALSE);
662 }
663
664 static char *
665 conversation_pam_prompt_echo_on (PolKitGrant *polkit_grant, const char *request, void *user_data)
666 {
667 return conversation_pam_prompt (polkit_grant, request, user_data, TRUE);
668 }
669
670 static void
671 conversation_pam_error_msg (PolKitGrant *polkit_grant, const char *msg, void *user_data)
672 {
673 g_debug ("error_msg='%s'", msg);
674 }
675
676 static void
677 conversation_pam_text_info (PolKitGrant *polkit_grant, const char *msg, void *user_data)
678 {
679 g_debug ("text_info='%s'", msg);
680 }
681
682 static PolKitResult
683 conversation_override_grant_type (PolKitGrant *polkit_grant, PolKitResult auth_type, void *user_data)
684 {
685 polkit_bool_t keep_session = FALSE;
686 polkit_bool_t keep_always = FALSE;
687 PolKitResult overridden_auth_type;
688 UserData *ud = user_data;
689
690 switch (auth_type) {
691 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH:
692 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH:
693 break;
694 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_SESSION:
695 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_SESSION:
696 keep_session =
697 polkit_gnome_auth_dialog_get_remember_session (POLKIT_GNOME_AUTH_DIALOG (ud->dialog));
698 break;
699 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_ALWAYS:
700 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_ALWAYS:
701 keep_always =
702 polkit_gnome_auth_dialog_get_remember_always (POLKIT_GNOME_AUTH_DIALOG (ud->dialog));
703 keep_session =
704 polkit_gnome_auth_dialog_get_remember_session (POLKIT_GNOME_AUTH_DIALOG (ud->dialog));
705 break;
706 default:
707 g_assert_not_reached ();
708 }
709
710 g_debug ("keep_always = %d", keep_always);
711 g_debug ("keep_session = %d", keep_session);
712
713 switch (auth_type) {
714 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH:
715 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_SESSION:
716 case POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_ALWAYS:
717 overridden_auth_type = POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH;
718 if (keep_session)
719 overridden_auth_type = POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_SESSION;
720 else if (keep_always)
721 overridden_auth_type = POLKIT_RESULT_ONLY_VIA_ADMIN_AUTH_KEEP_ALWAYS;
722 break;
723
724 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH:
725 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_SESSION:
726 case POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_ALWAYS:
727 overridden_auth_type = POLKIT_RESULT_ONLY_VIA_SELF_AUTH;
728 if (keep_session)
729 overridden_auth_type = POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_SESSION;
730 else if (keep_always)
731 overridden_auth_type = POLKIT_RESULT_ONLY_VIA_SELF_AUTH_KEEP_ALWAYS;
732 break;
733
734 default:
735 g_assert_not_reached ();
736 }
737
738 return overridden_auth_type;
739 }
740
741
742 static void
743 conversation_done (PolKitGrant *polkit_grant,
744 polkit_bool_t gained_privilege,
745 polkit_bool_t input_was_bogus,
746 void *user_data)
747 {
748 UserData *ud = user_data;
749 ud->gained_privilege = gained_privilege;
750 ud->was_bogus = input_was_bogus;
751
752 g_debug ("in conversation_done gained=%d, bogus=%d", gained_privilege, input_was_bogus);
753
754 if ((ud->was_bogus || ud->was_cancelled) && ud->dialog != NULL) {
755 gtk_widget_destroy (ud->dialog);
756 ud->dialog = NULL;
757 }
758
759 g_main_loop_quit (ud->loop);
760 }
761
762 static void
763 child_watch_func (GPid pid,
764 gint status,
765 gpointer user_data)
766 {
767 PolKitGrant *polkit_grant = user_data;
768 polkit_grant_child_func (polkit_grant, pid, WEXITSTATUS (status));
769 }
770
771 static int
772 add_child_watch (PolKitGrant *polkit_grant, pid_t pid)
773 {
774 return g_child_watch_add (pid, child_watch_func, polkit_grant);
775 }
776
777 static gboolean
778 io_watch_have_data (GIOChannel *channel, GIOCondition condition, gpointer user_data)
779 {
780 int fd;
781 PolKitGrant *polkit_grant = user_data;
782 fd = g_io_channel_unix_get_fd (channel);
783 polkit_grant_io_func (polkit_grant, fd);
784 return TRUE;
785 }
786
787 static int
788 add_io_watch (PolKitGrant *polkit_grant, int fd)
789 {
790 guint id = 0;
791 GIOChannel *channel;
792 channel = g_io_channel_unix_new (fd);
793 if (channel == NULL)
794 goto out;
795 id = g_io_add_watch (channel, G_IO_IN, io_watch_have_data, polkit_grant);
796 if (id == 0) {
797 g_io_channel_unref (channel);
798 goto out;
799 }
800 g_io_channel_unref (channel);
801 out:
802 return id;
803 }
804
805 static void
806 remove_watch (PolKitGrant *polkit_auth, int watch_id)
807 {
808 g_source_remove (watch_id);
809 }
810
811 static PolKitGrant *grant = NULL;
812 static UserData *ud = NULL;
813
814 static gboolean
815 do_polkit_auth (PolKitContext *pk_context,
816 DBusConnection *system_bus_connection,
817 const char *caller_exe_name,
818 const char *action_id,
819 guint32 xid,
820 pid_t caller_pid)
821 {
822 PolKitAction *action = NULL;
823 PolKitCaller *caller = NULL;
824 DBusError error;
825 gboolean ret;
826 int num_tries;
827 PolKitPolicyCache *pk_cache;
828 PolKitPolicyFileEntry *pfe;
829 const char *message_markup;
830
831 ret = FALSE;
832
833 ud = g_new0 (UserData, 1);
834
835 ud->requires_admin = FALSE;
836
837 action = polkit_action_new ();
838 polkit_action_set_action_id (action, action_id);
839
840 dbus_error_init (&error);
841 caller = polkit_caller_new_from_pid (system_bus_connection,
842 caller_pid,
843 &error);
844 if (caller == NULL) {
845 if (dbus_error_is_set (&error)) {
846 fprintf (stderr, "error: polkit_caller_new_from_pid(): %s: %s\n",
847 error.name, error.message);
848 goto error;
849 }
850 }
851
852 ud->dialog = NULL;
853 ud->loop = g_main_loop_new (NULL, TRUE);
854 ud->gained_privilege = FALSE;
855
856 pk_cache = polkit_context_get_policy_cache (pk_context);
857 if (pk_cache == NULL) {
858 g_warning ("Cannot load policy files");
859 goto error;
860 }
861 pfe = polkit_policy_cache_get_entry (pk_cache, action);
862 if (pfe == NULL) {
863 g_warning ("No policy file entry for given action");
864 goto error;
865 }
866
867 message_markup = polkit_policy_file_entry_get_action_message (pfe);
868 if (message_markup == NULL) {
869 g_warning ("No message markup for given action");
870 goto error;
871 }
872
873 ud->dialog = polkit_gnome_auth_dialog_new (
874 caller_exe_name,
875 action_id,
876 message_markup);
877
878 /* XID zero is used to mean "universal null resource or null atom" ... so if the
879 * caller is not an X11 client he can pass in 0 and we won't even attempt to
880 * find an X11 window that we're transient for.
881 */
882 if (xid != 0) {
883 GdkWindow *foreign_window;
884 foreign_window = gdk_window_foreign_new (xid);
885 if (foreign_window != NULL) {
886 gtk_widget_realize (ud->dialog);
887 gdk_window_set_transient_for (ud->dialog->window, foreign_window);
888 }
889 }
890
891
892 g_signal_connect (GTK_WIDGET (ud->dialog), "user-selected", G_CALLBACK (user_selected), ud);
893
894 num_tries = 0;
895 try_again:
896 grant = polkit_grant_new ();
897 ud->polkit_grant = grant;
898 polkit_grant_set_functions (grant,
899 add_io_watch,
900 add_child_watch,
901 remove_watch,
902 conversation_type,
903 conversation_select_admin_user,
904 conversation_pam_prompt_echo_off,
905 conversation_pam_prompt_echo_on,
906 conversation_pam_error_msg,
907 conversation_pam_text_info,
908 conversation_override_grant_type,
909 conversation_done,
910 ud);
911 ud->was_cancelled = FALSE;
912 ud->was_bogus = FALSE;
913 ud->new_user_selected = FALSE;
914
915 if (!polkit_grant_initiate_auth (grant,
916 action,
917 caller)) {
918 g_warning ("Failed to initiate privilege grant.");
919 ret = 1;
920 goto error;
921 }
922 g_main_loop_run (ud->loop);
923
924 if (ud->new_user_selected) {
925 g_debug ("new user selected so restarting auth..");
926 polkit_grant_unref (grant);
927 grant = NULL;
928 goto try_again;
929 }
930
931 num_tries++;
932
933 g_debug ("gained_privilege=%d was_cancelled=%d was_bogus=%d.",
934 ud->gained_privilege, ud->was_cancelled, ud->was_bogus);
935
936 if (!ud->gained_privilege && !ud->was_cancelled && !ud->was_bogus) {
937 if (ud->dialog != NULL) {
938
939 /* shake the dialog to indicate error */
940 polkit_gnome_auth_dialog_indicate_auth_error (POLKIT_GNOME_AUTH_DIALOG (ud->dialog));
941
942 if (num_tries < 3) {
943 polkit_grant_unref (grant);
944 grant = NULL;
945 goto try_again;
946 }
947 }
948 }
949
950 ret = ud->gained_privilege;
951
952 error:
953 if (ud->dialog != NULL) {
954 gtk_widget_destroy (ud->dialog);
955 ud->dialog = NULL;
956 }
957 if (ud->loop != NULL)
958 g_main_loop_unref (ud->loop);
959 if (ud->admin_users != NULL)
960 g_strfreev (ud->admin_users);
961 if (ud->admin_user_selected != NULL)
962 g_free (ud->admin_user_selected);
963
964 if (grant != NULL)
965 polkit_grant_unref (grant);
966 if (action != NULL)
967 polkit_action_unref (action);
968 if (caller != NULL)
969 polkit_caller_unref (caller);
970
971 ud = NULL;
972 grant = NULL;
973
974 return ret;
975 }
976
977 static void
978 do_cancel_auth (void)
979 {
980 g_return_if_fail (ud != NULL);
981 g_return_if_fail (grant != NULL);
982
983 ud->was_cancelled = TRUE;
984 polkit_grant_cancel_auth (grant);
985 }
0 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
1 *
2 * Copyright (C) 2007 David Zeuthen <david@fubar.dk>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 */
19
20 #ifndef POLKIT_GNOME_MANAGER_H
21 #define POLKIT_GNOME_MANAGER_H
22
23 #include <glib-object.h>
24 #include <dbus/dbus-glib.h>
25
26 G_BEGIN_DECLS
27
28 #define POLKIT_GNOME_TYPE_MANAGER (polkit_gnome_manager_get_type ())
29 #define POLKIT_GNOME_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), POLKIT_GNOME_TYPE_MANAGER, PolKitGnomeManager))
30 #define POLKIT_GNOME_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), POLKIT_GNOME_TYPE_MANAGER, PolKitGnomeManagerClass))
31 #define POLKIT_GNOME_IS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), POLKIT_GNOME_TYPE_MANAGER))
32 #define POLKIT_GNOME_IS_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), POLKIT_GNOME_TYPE_MANAGER))
33 #define POLKIT_GNOME_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), POLKIT_GNOME_TYPE_MANAGER, PolKitGnomeManagerClass))
34
35 typedef struct PolKitGnomeManagerPrivate PolKitGnomeManagerPrivate;
36
37 typedef struct
38 {
39 GObject parent;
40 PolKitGnomeManagerPrivate *priv;
41 } PolKitGnomeManager;
42
43 typedef struct
44 {
45 GObjectClass parent_class;
46 } PolKitGnomeManagerClass;
47
48 typedef enum
49 {
50 POLKIT_GNOME_MANAGER_ERROR_GENERAL,
51 POLKIT_GNOME_MANAGER_ERROR_AUTH_IN_PROGRESS
52 } PolKitGnomeManagerError;
53
54 #define POLKIT_GNOME_MANAGER_ERROR polkit_gnome_manager_error_quark ()
55
56 GQuark polkit_gnome_manager_error_quark (void);
57 GType polkit_gnome_manager_get_type (void);
58 PolKitGnomeManager *polkit_gnome_manager_new (void);
59
60 /* exported methods */
61 gboolean polkit_gnome_manager_show_dialog (PolKitGnomeManager *manager,
62 const char *action_id,
63 guint32 xid,
64 DBusGMethodInvocation *context);
65
66 G_END_DECLS
67
68 #endif /* POLKIT_GNOME_MANAGER_H */
0 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
1 <node name="/org/gnome/PolicyKit/Manager">
2 <interface name="org.gnome.PolicyKit.Manager">
3 <method name="ShowDialog">
4 <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
5 <arg name="action_id" direction="in" type="s"/>
6 <arg name="xid" direction="in" type="u"/>
7 <arg name="gained_privilege" direction="out" type="b"/>
8 </method>
9 </interface>
10 </node>