Codebase list realmd / a39f390
Imported Upstream version 0.1 Laurent Bigonville 11 years ago
88 changed file(s) with 30428 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 Stef Walter <stefw@gnome.org>
0 GNU LIBRARY GENERAL PUBLIC LICENSE
1 Version 2, June 1991
2
3 Copyright (C) 1991 Free Software Foundation, Inc.
4 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 [This is the first released version of the library GPL. It is
9 numbered 2 because it goes with version 2 of the ordinary GPL.]
10
11 Preamble
12
13 The licenses for most software are designed to take away your
14 freedom to share and change it. By contrast, the GNU General Public
15 Licenses are intended to guarantee your freedom to share and change
16 free software--to make sure the software is free for all its users.
17
18 This license, the Library General Public License, applies to some
19 specially designated Free Software Foundation software, and to any
20 other libraries whose authors decide to use it. You can use it for
21 your libraries, too.
22
23 When we speak of free software, we are referring to freedom, not
24 price. Our General Public Licenses are designed to make sure that you
25 have the freedom to distribute copies of free software (and charge for
26 this service if you wish), that you receive source code or can get it
27 if you want it, that you can change the software or use pieces of it
28 in new free programs; and that you know you can do these things.
29
30 To protect your rights, we need to make restrictions that forbid
31 anyone to deny you these rights or to ask you to surrender the rights.
32 These restrictions translate to certain responsibilities for you if
33 you distribute copies of the library, or if you modify it.
34
35 For example, if you distribute copies of the library, whether gratis
36 or for a fee, you must give the recipients all the rights that we gave
37 you. You must make sure that they, too, receive or can get the source
38 code. If you link a program with the library, you must provide
39 complete object files to the recipients so that they can relink them
40 with the library, after making changes to the library and recompiling
41 it. And you must show them these terms so they know their rights.
42
43 Our method of protecting your rights has two steps: (1) copyright
44 the library, and (2) offer you this license which gives you legal
45 permission to copy, distribute and/or modify the library.
46
47 Also, for each distributor's protection, we want to make certain
48 that everyone understands that there is no warranty for this free
49 library. If the library is modified by someone else and passed on, we
50 want its recipients to know that what they have is not the original
51 version, so that any problems introduced by others will not reflect on
52 the original authors' reputations.
53
54 Finally, any free program is threatened constantly by software
55 patents. We wish to avoid the danger that companies distributing free
56 software will individually obtain patent licenses, thus in effect
57 transforming the program into proprietary software. To prevent this,
58 we have made it clear that any patent must be licensed for everyone's
59 free use or not licensed at all.
60
61 Most GNU software, including some libraries, is covered by the ordinary
62 GNU General Public License, which was designed for utility programs. This
63 license, the GNU Library General Public License, applies to certain
64 designated libraries. This license is quite different from the ordinary
65 one; be sure to read it in full, and don't assume that anything in it is
66 the same as in the ordinary license.
67
68 The reason we have a separate public license for some libraries is that
69 they blur the distinction we usually make between modifying or adding to a
70 program and simply using it. Linking a program with a library, without
71 changing the library, is in some sense simply using the library, and is
72 analogous to running a utility program or application program. However, in
73 a textual and legal sense, the linked executable is a combined work, a
74 derivative of the original library, and the ordinary General Public License
75 treats it as such.
76
77 Because of this blurred distinction, using the ordinary General
78 Public License for libraries did not effectively promote software
79 sharing, because most developers did not use the libraries. We
80 concluded that weaker conditions might promote sharing better.
81
82 However, unrestricted linking of non-free programs would deprive the
83 users of those programs of all benefit from the free status of the
84 libraries themselves. This Library General Public License is intended to
85 permit developers of non-free programs to use free libraries, while
86 preserving your freedom as a user of such programs to change the free
87 libraries that are incorporated in them. (We have not seen how to achieve
88 this as regards changes in header files, but we have achieved it as regards
89 changes in the actual functions of the Library.) The hope is that this
90 will lead to faster development of free libraries.
91
92 The precise terms and conditions for copying, distribution and
93 modification follow. Pay close attention to the difference between a
94 "work based on the library" and a "work that uses the library". The
95 former contains code derived from the library, while the latter only
96 works together with the library.
97
98 Note that it is possible for a library to be covered by the ordinary
99 General Public License rather than by this special one.
100
101 GNU LIBRARY GENERAL PUBLIC LICENSE
102 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
103
104 0. This License Agreement applies to any software library which
105 contains a notice placed by the copyright holder or other authorized
106 party saying it may be distributed under the terms of this Library
107 General Public License (also called "this License"). Each licensee is
108 addressed as "you".
109
110 A "library" means a collection of software functions and/or data
111 prepared so as to be conveniently linked with application programs
112 (which use some of those functions and data) to form executables.
113
114 The "Library", below, refers to any such software library or work
115 which has been distributed under these terms. A "work based on the
116 Library" means either the Library or any derivative work under
117 copyright law: that is to say, a work containing the Library or a
118 portion of it, either verbatim or with modifications and/or translated
119 straightforwardly into another language. (Hereinafter, translation is
120 included without limitation in the term "modification".)
121
122 "Source code" for a work means the preferred form of the work for
123 making modifications to it. For a library, complete source code means
124 all the source code for all modules it contains, plus any associated
125 interface definition files, plus the scripts used to control compilation
126 and installation of the library.
127
128 Activities other than copying, distribution and modification are not
129 covered by this License; they are outside its scope. The act of
130 running a program using the Library is not restricted, and output from
131 such a program is covered only if its contents constitute a work based
132 on the Library (independent of the use of the Library in a tool for
133 writing it). Whether that is true depends on what the Library does
134 and what the program that uses the Library does.
135
136 1. You may copy and distribute verbatim copies of the Library's
137 complete source code as you receive it, in any medium, provided that
138 you conspicuously and appropriately publish on each copy an
139 appropriate copyright notice and disclaimer of warranty; keep intact
140 all the notices that refer to this License and to the absence of any
141 warranty; and distribute a copy of this License along with the
142 Library.
143
144 You may charge a fee for the physical act of transferring a copy,
145 and you may at your option offer warranty protection in exchange for a
146 fee.
147
148 2. You may modify your copy or copies of the Library or any portion
149 of it, thus forming a work based on the Library, and copy and
150 distribute such modifications or work under the terms of Section 1
151 above, provided that you also meet all of these conditions:
152
153 a) The modified work must itself be a software library.
154
155 b) You must cause the files modified to carry prominent notices
156 stating that you changed the files and the date of any change.
157
158 c) You must cause the whole of the work to be licensed at no
159 charge to all third parties under the terms of this License.
160
161 d) If a facility in the modified Library refers to a function or a
162 table of data to be supplied by an application program that uses
163 the facility, other than as an argument passed when the facility
164 is invoked, then you must make a good faith effort to ensure that,
165 in the event an application does not supply such function or
166 table, the facility still operates, and performs whatever part of
167 its purpose remains meaningful.
168
169 (For example, a function in a library to compute square roots has
170 a purpose that is entirely well-defined independent of the
171 application. Therefore, Subsection 2d requires that any
172 application-supplied function or table used by this function must
173 be optional: if the application does not supply it, the square
174 root function must still compute square roots.)
175
176 These requirements apply to the modified work as a whole. If
177 identifiable sections of that work are not derived from the Library,
178 and can be reasonably considered independent and separate works in
179 themselves, then this License, and its terms, do not apply to those
180 sections when you distribute them as separate works. But when you
181 distribute the same sections as part of a whole which is a work based
182 on the Library, the distribution of the whole must be on the terms of
183 this License, whose permissions for other licensees extend to the
184 entire whole, and thus to each and every part regardless of who wrote
185 it.
186
187 Thus, it is not the intent of this section to claim rights or contest
188 your rights to work written entirely by you; rather, the intent is to
189 exercise the right to control the distribution of derivative or
190 collective works based on the Library.
191
192 In addition, mere aggregation of another work not based on the Library
193 with the Library (or with a work based on the Library) on a volume of
194 a storage or distribution medium does not bring the other work under
195 the scope of this License.
196
197 3. You may opt to apply the terms of the ordinary GNU General Public
198 License instead of this License to a given copy of the Library. To do
199 this, you must alter all the notices that refer to this License, so
200 that they refer to the ordinary GNU General Public License, version 2,
201 instead of to this License. (If a newer version than version 2 of the
202 ordinary GNU General Public License has appeared, then you can specify
203 that version instead if you wish.) Do not make any other change in
204 these notices.
205
206 Once this change is made in a given copy, it is irreversible for
207 that copy, so the ordinary GNU General Public License applies to all
208 subsequent copies and derivative works made from that copy.
209
210 This option is useful when you wish to copy part of the code of
211 the Library into a program that is not a library.
212
213 4. You may copy and distribute the Library (or a portion or
214 derivative of it, under Section 2) in object code or executable form
215 under the terms of Sections 1 and 2 above provided that you accompany
216 it with the complete corresponding machine-readable source code, which
217 must be distributed under the terms of Sections 1 and 2 above on a
218 medium customarily used for software interchange.
219
220 If distribution of object code is made by offering access to copy
221 from a designated place, then offering equivalent access to copy the
222 source code from the same place satisfies the requirement to
223 distribute the source code, even though third parties are not
224 compelled to copy the source along with the object code.
225
226 5. A program that contains no derivative of any portion of the
227 Library, but is designed to work with the Library by being compiled or
228 linked with it, is called a "work that uses the Library". Such a
229 work, in isolation, is not a derivative work of the Library, and
230 therefore falls outside the scope of this License.
231
232 However, linking a "work that uses the Library" with the Library
233 creates an executable that is a derivative of the Library (because it
234 contains portions of the Library), rather than a "work that uses the
235 library". The executable is therefore covered by this License.
236 Section 6 states terms for distribution of such executables.
237
238 When a "work that uses the Library" uses material from a header file
239 that is part of the Library, the object code for the work may be a
240 derivative work of the Library even though the source code is not.
241 Whether this is true is especially significant if the work can be
242 linked without the Library, or if the work is itself a library. The
243 threshold for this to be true is not precisely defined by law.
244
245 If such an object file uses only numerical parameters, data
246 structure layouts and accessors, and small macros and small inline
247 functions (ten lines or less in length), then the use of the object
248 file is unrestricted, regardless of whether it is legally a derivative
249 work. (Executables containing this object code plus portions of the
250 Library will still fall under Section 6.)
251
252 Otherwise, if the work is a derivative of the Library, you may
253 distribute the object code for the work under the terms of Section 6.
254 Any executables containing that work also fall under Section 6,
255 whether or not they are linked directly with the Library itself.
256
257 6. As an exception to the Sections above, you may also compile or
258 link a "work that uses the Library" with the Library to produce a
259 work containing portions of the Library, and distribute that work
260 under terms of your choice, provided that the terms permit
261 modification of the work for the customer's own use and reverse
262 engineering for debugging such modifications.
263
264 You must give prominent notice with each copy of the work that the
265 Library is used in it and that the Library and its use are covered by
266 this License. You must supply a copy of this License. If the work
267 during execution displays copyright notices, you must include the
268 copyright notice for the Library among them, as well as a reference
269 directing the user to the copy of this License. Also, you must do one
270 of these things:
271
272 a) Accompany the work with the complete corresponding
273 machine-readable source code for the Library including whatever
274 changes were used in the work (which must be distributed under
275 Sections 1 and 2 above); and, if the work is an executable linked
276 with the Library, with the complete machine-readable "work that
277 uses the Library", as object code and/or source code, so that the
278 user can modify the Library and then relink to produce a modified
279 executable containing the modified Library. (It is understood
280 that the user who changes the contents of definitions files in the
281 Library will not necessarily be able to recompile the application
282 to use the modified definitions.)
283
284 b) Accompany the work with a written offer, valid for at
285 least three years, to give the same user the materials
286 specified in Subsection 6a, above, for a charge no more
287 than the cost of performing this distribution.
288
289 c) If distribution of the work is made by offering access to copy
290 from a designated place, offer equivalent access to copy the above
291 specified materials from the same place.
292
293 d) Verify that the user has already received a copy of these
294 materials or that you have already sent this user a copy.
295
296 For an executable, the required form of the "work that uses the
297 Library" must include any data and utility programs needed for
298 reproducing the executable from it. However, as a special exception,
299 the source code distributed need not include anything that is normally
300 distributed (in either source or binary form) with the major
301 components (compiler, kernel, and so on) of the operating system on
302 which the executable runs, unless that component itself accompanies
303 the executable.
304
305 It may happen that this requirement contradicts the license
306 restrictions of other proprietary libraries that do not normally
307 accompany the operating system. Such a contradiction means you cannot
308 use both them and the Library together in an executable that you
309 distribute.
310
311 7. You may place library facilities that are a work based on the
312 Library side-by-side in a single library together with other library
313 facilities not covered by this License, and distribute such a combined
314 library, provided that the separate distribution of the work based on
315 the Library and of the other library facilities is otherwise
316 permitted, and provided that you do these two things:
317
318 a) Accompany the combined library with a copy of the same work
319 based on the Library, uncombined with any other library
320 facilities. This must be distributed under the terms of the
321 Sections above.
322
323 b) Give prominent notice with the combined library of the fact
324 that part of it is a work based on the Library, and explaining
325 where to find the accompanying uncombined form of the same work.
326
327 8. You may not copy, modify, sublicense, link with, or distribute
328 the Library except as expressly provided under this License. Any
329 attempt otherwise to copy, modify, sublicense, link with, or
330 distribute the Library is void, and will automatically terminate your
331 rights under this License. However, parties who have received copies,
332 or rights, from you under this License will not have their licenses
333 terminated so long as such parties remain in full compliance.
334
335 9. You are not required to accept this License, since you have not
336 signed it. However, nothing else grants you permission to modify or
337 distribute the Library or its derivative works. These actions are
338 prohibited by law if you do not accept this License. Therefore, by
339 modifying or distributing the Library (or any work based on the
340 Library), you indicate your acceptance of this License to do so, and
341 all its terms and conditions for copying, distributing or modifying
342 the Library or works based on it.
343
344 10. Each time you redistribute the Library (or any work based on the
345 Library), the recipient automatically receives a license from the
346 original licensor to copy, distribute, link with or modify the Library
347 subject to these terms and conditions. You may not impose any further
348 restrictions on the recipients' exercise of the rights granted herein.
349 You are not responsible for enforcing compliance by third parties to
350 this License.
351
352 11. If, as a consequence of a court judgment or allegation of patent
353 infringement or for any other reason (not limited to patent issues),
354 conditions are imposed on you (whether by court order, agreement or
355 otherwise) that contradict the conditions of this License, they do not
356 excuse you from the conditions of this License. If you cannot
357 distribute so as to satisfy simultaneously your obligations under this
358 License and any other pertinent obligations, then as a consequence you
359 may not distribute the Library at all. For example, if a patent
360 license would not permit royalty-free redistribution of the Library by
361 all those who receive copies directly or indirectly through you, then
362 the only way you could satisfy both it and this License would be to
363 refrain entirely from distribution of the Library.
364
365 If any portion of this section is held invalid or unenforceable under any
366 particular circumstance, the balance of the section is intended to apply,
367 and the section as a whole is intended to apply in other circumstances.
368
369 It is not the purpose of this section to induce you to infringe any
370 patents or other property right claims or to contest validity of any
371 such claims; this section has the sole purpose of protecting the
372 integrity of the free software distribution system which is
373 implemented by public license practices. Many people have made
374 generous contributions to the wide range of software distributed
375 through that system in reliance on consistent application of that
376 system; it is up to the author/donor to decide if he or she is willing
377 to distribute software through any other system and a licensee cannot
378 impose that choice.
379
380 This section is intended to make thoroughly clear what is believed to
381 be a consequence of the rest of this License.
382
383 12. If the distribution and/or use of the Library is restricted in
384 certain countries either by patents or by copyrighted interfaces, the
385 original copyright holder who places the Library under this License may add
386 an explicit geographical distribution limitation excluding those countries,
387 so that distribution is permitted only in or among countries not thus
388 excluded. In such case, this License incorporates the limitation as if
389 written in the body of this License.
390
391 13. The Free Software Foundation may publish revised and/or new
392 versions of the Library General Public License from time to time.
393 Such new versions will be similar in spirit to the present version,
394 but may differ in detail to address new problems or concerns.
395
396 Each version is given a distinguishing version number. If the Library
397 specifies a version number of this License which applies to it and
398 "any later version", you have the option of following the terms and
399 conditions either of that version or of any later version published by
400 the Free Software Foundation. If the Library does not specify a
401 license version number, you may choose any version ever published by
402 the Free Software Foundation.
403
404 14. If you wish to incorporate parts of the Library into other free
405 programs whose distribution conditions are incompatible with these,
406 write to the author to ask for permission. For software which is
407 copyrighted by the Free Software Foundation, write to the Free
408 Software Foundation; we sometimes make exceptions for this. Our
409 decision will be guided by the two goals of preserving the free status
410 of all derivatives of our free software and of promoting the sharing
411 and reuse of software generally.
412
413 NO WARRANTY
414
415 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
416 WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
417 EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
418 OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
419 KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
420 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
421 PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
422 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
423 THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
424
425 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
426 WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
427 AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
428 FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
429 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
430 LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
431 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
432 FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
433 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
434 DAMAGES.
435
436 END OF TERMS AND CONDITIONS
437
438 How to Apply These Terms to Your New Libraries
439
440 If you develop a new library, and you want it to be of the greatest
441 possible use to the public, we recommend making it free software that
442 everyone can redistribute and change. You can do so by permitting
443 redistribution under these terms (or, alternatively, under the terms of the
444 ordinary General Public License).
445
446 To apply these terms, attach the following notices to the library. It is
447 safest to attach them to the start of each source file to most effectively
448 convey the exclusion of warranty; and each file should have at least the
449 "copyright" line and a pointer to where the full notice is found.
450
451 <one line to give the library's name and a brief idea of what it does.>
452 Copyright (C) <year> <name of author>
453
454 This library is free software; you can redistribute it and/or
455 modify it under the terms of the GNU Library General Public
456 License as published by the Free Software Foundation; either
457 version 2 of the License, or (at your option) any later version.
458
459 This library is distributed in the hope that it will be useful,
460 but WITHOUT ANY WARRANTY; without even the implied warranty of
461 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
462 Library General Public License for more details.
463
464 You should have received a copy of the GNU Library General Public
465 License along with this library; if not, write to the
466 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
467 Boston, MA 02111-1307 USA.
468
469 Also add information on how to contact you by electronic and paper mail.
470
471 You should also get your employer (if you work as a programmer) or your
472 school, if any, to sign a "copyright disclaimer" for the library, if
473 necessary. Here is a sample; alter the names:
474
475 Yoyodyne, Inc., hereby disclaims all copyright interest in the
476 library `Frob' (a library for tweaking knobs) written by James Random Hacker.
477
478 <signature of Ty Coon>, 1 April 1990
479 Ty Coon, President of Vice
480
481 That's all there is to it!
0 # Generate automatically. Do not edit.
1
2 commit 024b6985e54ce5392c4665aa273b223f0e7f3bbe
3 Author: Stef Walter <stefw@gnome.org>
4 Date: 2012-06-13
5
6 Release 0.1
7
8 .gitignore | 2 ++
9 NEWS | 4 +---
10 configure.ac | 4 ++--
11 dbus/Makefile.am | 4 ++++
12 service/Makefile.am | 2 ++
13 tools/Makefile.am | 3 ++-
14 6 files changed, 13 insertions(+), 6 deletions(-)
15
16 commit 0de0c0a8fd4a7006930a91a141404e95f0b44ecf
17 Author: Stef Walter <stefw@gnome.org>
18 Date: 2012-06-12
19
20 Fix a crasher when enrolling or unenrolling
21
22 service/realm-service.c | 13 ++++++++-----
23 1 file changed, 8 insertions(+), 5 deletions(-)
24
25 commit e27a442eafbad8e2dfa47ccf815bd1d76ae70e8b
26 Author: Stef Walter <stefw@gnome.org>
27 Date: 2012-06-12
28
29 Try to guess when administrative credentials are needed
30
31 Samba's 'net' command and AD itself don't make it very easy to tell
32 when administrative credentials are needed to enroll. We try to
33 detect this by scraping the output of 'net ads join'
34
35 service/realm-samba-enroll.c | 31 +++++++++++++++++++++++++++----
36 1 file changed, 27 insertions(+), 4 deletions(-)
37
38 commit 7b8b8eb3b271edcfc3a4f17defad5abc4f4d8e36
39 Author: Stef Walter <stefw@gnome.org>
40 Date: 2012-06-11
41
42 Another instance of PK_PROGRESS_TYPE_SUBPERCENTAGE
43
44 tests/frob-install-packages.c | 4 ----
45 1 file changed, 4 deletions(-)
46
47 commit 3bbd5674ce77d16e6b7fa85eff3a887c6c60d8b8
48 Author: Stef Walter <stefw@gnome.org>
49 Date: 2012-06-11
50
51 Remove use of PK_PROGRESS_TYPE_SUBPERCENTAGE
52
53 Isn't yet released
54
55 service/realm-packages.c | 4 ----
56 1 file changed, 4 deletions(-)
57
58 commit 1f0590d97118434822409a0b5c3f231281a07033
59 Author: Stef Walter <stefw@gnome.org>
60 Date: 2012-06-11
61
62 Fix mistake in the enroll-machine.py test script
63
64 tests/enroll-machine.py | 3 ++-
65 1 file changed, 2 insertions(+), 1 deletion(-)
66
67 commit 2c5ec55f2a0ac57e5059c49810f582fa4688f33b
68 Author: Stef Walter <stefw@gnome.org>
69 Date: 2012-06-11
70
71 Add initial customization for debian based OS's
72
73 configure.ac | 4 +---
74 service/realmd-debian.conf | 26 ++++++++++++++++++++++++++
75 2 files changed, 27 insertions(+), 3 deletions(-)
76
77 commit 665ab55445211d1a75cec53dfed8d7074580e0a8
78 Author: Stef Walter <stefw@gnome.org>
79 Date: 2012-06-11
80
81 Avoid package-kit sync method in our tests
82
83 * Were only used in tests
84 * Not yet released on major distros
85
86 tests/frob-install-packages.c | 41 ++++++++++++++++++++++++++++++++++-------
87 1 file changed, 34 insertions(+), 7 deletions(-)
88
89 commit d1ab1f998f11f5a9a93441991040c1a8622be706
90 Author: Stef Walter <stefw@gnome.org>
91 Date: 2012-06-08
92
93 Add support for Upstart to enable/disable system services
94
95 dbus/Makefile.am | 11 +-
96 dbus/org.freedesktop.systemd1.xml | 224 ----------------
97 service/Makefile.am | 4 +-
98 service/realm-command.c | 22 ++
99 service/realm-packages.c | 29 ++-
100 service/realm-samba-winbind.c | 16 +-
101 service/realm-service-systemd.c | 307 ++++++++++++++++++++++
102 service/realm-service-systemd.h | 41 +++
103 service/realm-service-upstart.c | 364 ++++++++++++++++++++++++++
104 service/realm-service-upstart.h | 41 +++
105 service/realm-service.c | 508 +++++++++++++++++++++++++++++++++++++
106 service/realm-service.h | 143 +++++++++++
107 service/realm-system.c | 273 --------------------
108 service/realm-system.h | 42 ---
109 service/realmd-defaults.conf | 2 +-
110 15 files changed, 1459 insertions(+), 568 deletions(-)
111
112 commit efb02e781e1e8d5a02550e6536c53646ad9fdb72
113 Author: Stef Walter <stefw@gnome.org>
114 Date: 2012-06-06
115
116 Fix autogen.sh regression due to file rename
117
118 autogen.sh | 2 +-
119 1 file changed, 1 insertion(+), 1 deletion(-)
120
121 commit 70ceb87f8f12482b61f42ae08bcdda9bb1c13272
122 Author: Stef Walter <stefw@gnome.org>
123 Date: 2012-06-06
124
125 Always store Samba permitted logins in lower case
126
127 * Since windows logins are case insensitive
128
129 service/realm-samba.c | 4 +++-
130 1 file changed, 3 insertions(+), 1 deletion(-)
131
132 commit 8f74060d812211870475e86592fbd59d0bd00d4e
133 Author: Stef Walter <stefw@gnome.org>
134 Date: 2012-06-06
135
136 Better docs for PermittedLogin stuff
137
138 dbus/org.freedesktop.realmd.xml | 10 +++++-----
139 1 file changed, 5 insertions(+), 5 deletions(-)
140
141 commit 8c96f022fec9ed52921e4cd9bddb4ba6c8f9c534
142 Author: Stef Walter <stefw@gnome.org>
143 Date: 2012-06-05
144
145 Refactor how changing list values in the samba config works
146
147 service/realm-ini-config.c | 137 ++++++++++++++++++++++++++++++++++++++++--
148 service/realm-ini-config.h | 25 +++++++-
149 service/realm-samba-config.c | 12 ++--
150 service/realm-samba.c | 13 ++--
151 tests/test-ini-config.c | 20 +++---
152 5 files changed, 179 insertions(+), 28 deletions(-)
153
154 commit b18f241888b54aa24388082ef75ad99941653b41
155 Author: Stef Walter <stefw@gnome.org>
156 Date: 2012-06-05
157
158 Implement list of permitted logins
159
160 * This is not actually enforced by winbind, but will be enforced
161 by sssd.
162
163 dbus/org.freedesktop.realmd.xml | 30 +++++--
164 service/org.freedesktop.realmd.policy.in | 10 +++
165 service/realm-ini-config.c | 77 +++++++++++++---
166 service/realm-ini-config.h | 15 +++-
167 service/realm-kerberos.c | 58 +++++++++++-
168 service/realm-kerberos.h | 6 ++
169 service/realm-samba-config.c | 75 ++++++++++++++++
170 service/realm-samba-config.h | 7 ++
171 service/realm-samba-enroll.c | 18 +++-
172 service/realm-samba.c | 142 ++++++++++++++++++++++++++----
173 tests/change-permitted.py | 77 ++++++++++++++++
174 tests/test-ini-config.c | 113 ++++++++++++++++++++++++
175 12 files changed, 584 insertions(+), 44 deletions(-)
176
177 commit 26537d8533edc649761f33f7a85a8cca0e4eac9d
178 Author: Stef Walter <stefw@gnome.org>
179 Date: 2012-06-04
180
181 Allow leaving a domain even if the computer account is broken
182
183 service/realm-samba-enroll.c | 16 +++++++++-------
184 service/realm-samba.c | 15 +++++----------
185 2 files changed, 14 insertions(+), 17 deletions(-)
186
187 commit 226f634dbbacc6fd7530ec3e3643523a7b76df59
188 Author: Stef Walter <stefw@gnome.org>
189 Date: 2012-06-04
190
191 Add SuggestedAdiministrator property to kerberos domains
192
193 dbus/org.freedesktop.realmd.xml | 5 +++++
194 dbus/realm-dbus-constants.h | 1 -
195 service/realm-samba.c | 2 +-
196 3 files changed, 6 insertions(+), 2 deletions(-)
197
198 commit eea477b7e23fc55347cf82738bbca0720ba83679
199 Author: Stef Walter <stefw@gnome.org>
200 Date: 2012-06-01
201
202 Rename KerberosRealm to Kerberos
203
204 * Makes for much more intelligent function calls and types
205
206 dbus/org.freedesktop.realmd.xml | 4 +--
207 dbus/realm-dbus-constants.h | 2 +-
208 service/realm-kerberos.c | 17 ++++++------
209 service/realm-kerberos.h | 4 +--
210 tools/realm-enroll.c | 54 +++++++++++++++++++--------------------
211 5 files changed, 40 insertions(+), 41 deletions(-)
212
213 commit b55faf00b81d6c68570ba87c29e7530f13dc1d67
214 Author: Stef Walter <stefw@gnome.org>
215 Date: 2012-05-31
216
217 Add 'Domain' property to realm objects
218
219 dbus/org.freedesktop.realmd.xml | 5 +++++
220 service/realm-samba.c | 5 +++++
221 2 files changed, 10 insertions(+)
222
223 commit cdd70be7dffe5dd5a0f8f8916168375bbffa016d
224 Author: Stef Walter <stefw@gnome.org>
225 Date: 2012-05-31
226
227 Return an array of realms on discover
228
229 * Discover can return multiple realms
230 * This allows us to chain calls better, and have mulitple
231 discovered realms returned by a provider
232 * No longer returned the discovered information
233 * Cleanup and testing
234
235 dbus/org.freedesktop.realmd.xml | 7 +---
236 service/realm-all-provider.c | 83 ++++++++++++++++++++++-----------------
237 service/realm-errors.c | 1 -
238 service/realm-errors.h | 1 -
239 service/realm-provider.c | 41 +++++++++----------
240 service/realm-provider.h | 3 +-
241 service/realm-samba-provider.c | 30 ++++++--------
242 tests/discover-python.py | 17 ++++----
243 tests/enroll-machine.py | 16 +++++---
244 tools/realm-enroll.c | 33 ++++++++++++----
245 10 files changed, 123 insertions(+), 109 deletions(-)
246
247 commit 994f66d9d579f7a2e9492236dec5fc9aa881b0fc
248 Author: Stef Walter <stefw@gnome.org>
249 Date: 2012-05-31
250
251 Support discovering the default domain
252
253 * Pass an empty string to Discover()
254
255 service/Makefile.am | 1 +
256 service/realm-ad-discover.c | 91 +++++++++++----
257 service/realm-network.c | 269 +++++++++++++++++++++++++++++++++++++++++++
258 service/realm-network.h | 33 ++++++
259 4 files changed, 371 insertions(+), 23 deletions(-)
260
261 commit 8079a239e696a8f999260547e5263eacc20b5e91
262 Author: Stef Walter <stefw@gnome.org>
263 Date: 2012-05-31
264
265 Fix initialization of samba realms
266
267 * Broken by a previous commit
268
269 service/realm-provider.c | 4 +++-
270 service/realm-samba-provider.c | 29 +++++++++++++++++++++++++++++
271 service/realm-samba.c | 30 ++++++++++++++----------------
272 service/realm-samba.h | 4 ++--
273 4 files changed, 48 insertions(+), 19 deletions(-)
274
275 commit 24fbeb77d9ceed18be1721de624338aef1b234ee
276 Author: Stef Walter <stefw@gnome.org>
277 Date: 2012-05-30
278
279 Add a{sv} options to enroll/unenroll, currently unused
280
281 dbus/org.freedesktop.realmd.xml | 4 ++++
282 service/realm-kerberos.c | 12 ++++++++----
283 tools/realm-enroll.c | 8 ++++++--
284 3 files changed, 18 insertions(+), 6 deletions(-)
285
286 commit aa5c4aff689dd7d91b469651d4c089f96eec85cc
287 Author: Stef Walter <stefw@gnome.org>
288 Date: 2012-05-29
289
290 Rename realm_platform_xxx to realm_settings_xxx
291
292 service/Makefile.am | 2 +-
293 service/realm-command.c | 4 +-
294 service/realm-daemon.c | 6 +-
295 service/realm-ini-config.c | 2 +-
296 service/realm-packages.c | 4 +-
297 service/realm-platform.c | 178 -----------------------------------------
298 service/realm-platform.h | 47 -----------
299 service/realm-samba-config.c | 4 +-
300 service/realm-samba-enroll.c | 4 +-
301 service/realm-samba-winbind.c | 8 +-
302 service/realm-settings.c | 178 +++++++++++++++++++++++++++++++++++++++++
303 service/realm-settings.h | 47 +++++++++++
304 tests/Makefile.am | 2 +-
305 tests/test-ini-config.c | 6 +-
306 14 files changed, 246 insertions(+), 246 deletions(-)
307
308 commit 4d5b6b14d56f1b3d0573129db5e06661cc8aa8f2
309 Author: Stef Walter <stefw@gnome.org>
310 Date: 2012-05-29
311
312 Refactor to make simpler to add different realms
313
314 service/Makefile.am | 4 +-
315 service/realm-kerberos-realm.c | 548 ----------------------------------------
316 service/realm-kerberos-realm.h | 75 ------
317 service/realm-kerberos.c | 548 ++++++++++++++++++++++++++++++++++++++++
318 service/realm-kerberos.h | 75 ++++++
319 service/realm-provider.c | 107 ++++++++
320 service/realm-provider.h | 12 +-
321 service/realm-samba-provider.c | 105 +-------
322 service/realm-samba-realm.c | 456 ---------------------------------
323 service/realm-samba-realm.h | 40 ---
324 service/realm-samba.c | 456 +++++++++++++++++++++++++++++++++
325 service/realm-samba.h | 40 +++
326 12 files changed, 1248 insertions(+), 1218 deletions(-)
327
328 commit 9124a14808cf7b5cef665b250b88b894643dabcc
329 Author: Stef Walter <stefw@gnome.org>
330 Date: 2012-05-04
331
332 Unbreak the enroll test script
333
334 tests/enroll-machine.py | 2 +-
335 1 file changed, 1 insertion(+), 1 deletion(-)
336
337 commit 78ef978300867029a679ef0d8e018670cbe1a612
338 Author: Stef Walter <stefw@gnome.org>
339 Date: 2012-05-04
340
341 Fix up property access for RealmKerberosRealm
342
343 service/realm-kerberos-realm.c | 7 ++++++-
344 1 file changed, 6 insertions(+), 1 deletion(-)
345
346 commit c08ad49a315448facaa24806d7fb9785aa57fadb
347 Author: Stef Walter <stefw@gnome.org>
348 Date: 2012-05-04
349
350 No need to authorize property accesses
351
352 service/realm-kerberos-realm.c | 15 +++------------
353 service/realm-provider.c | 15 +++------------
354 2 files changed, 6 insertions(+), 24 deletions(-)
355
356 commit c5415e3a0cc8d037aabf4075267127fbc7868c17
357 Author: Stef Walter <stefw@gnome.org>
358 Date: 2012-05-04
359
360 Use vfuncs for handling dbus calls instead of signals
361
362 service/realm-kerberos-realm.c | 55 ++++++++++++++++++++++------------------
363 service/realm-provider.c | 29 +++++++++++++--------
364 2 files changed, 49 insertions(+), 35 deletions(-)
365
366 commit 21bbf19db193a811ca9a13481078e7f1492d9a47
367 Author: Stef Walter <stefw@gnome.org>
368 Date: 2012-05-04
369
370 A number of tweaks and cleanups
371
372 ChangeLog | 2 +-
373 autogen.sh | 2 +-
374 service/realm-all-provider.c | 15 ++++---
375 service/realm-samba-provider.c | 86 ++++++++++++++--------------------------
376 service/realm-samba-realm.c | 1 -
377 5 files changed, 41 insertions(+), 65 deletions(-)
378
379 commit b0c80f2d6344439f59af59baf086b42bc9ec3895
380 Author: Stef Walter <stefw@gnome.org>
381 Date: 2012-05-04
382
383 Better formatted diagnostic error messages
384
385 service/realm-diagnostics.c | 4 ++--
386 1 file changed, 2 insertions(+), 2 deletions(-)
387
388 commit 5a36879376a902731951d4ef7a9a70e03a6bf5d7
389 Author: Stef Walter <stefw@gnome.org>
390 Date: 2012-05-04
391
392 Correctly return an error when discovered nothing
393
394 service/realm-samba-provider.c | 5 ++++-
395 1 file changed, 4 insertions(+), 1 deletion(-)
396
397 commit d9e04340f87ea2c5940dba4b9a7df00ff33828cc
398 Author: Stef Walter <stefw@gnome.org>
399 Date: 2012-05-04
400
401 Add methods for enroll with passwords, and rename credential cache ones
402
403 dbus/org.freedesktop.realmd.xml | 22 +++-
404 dbus/realm-dbus-constants.h | 2 +-
405 service/Makefile.am | 2 +
406 service/realm-errors.c | 2 +-
407 service/realm-errors.h | 2 +-
408 service/realm-kerberos-realm.c | 246 ++++++++++++++++++++++++++++++++++++---
409 service/realm-samba-enroll.c | 6 +-
410 tests/enroll-machine.py | 104 +++++++++++------
411 tools/realm-enroll.c | 20 ++--
412 9 files changed, 336 insertions(+), 70 deletions(-)
413
414 commit e70c4dbdabc6710db2524de40b14d842e88ca9ba
415 Author: Stef Walter <stefw@gnome.org>
416 Date: 2012-05-04
417
418 Interface documentation
419
420 dbus/org.freedesktop.realmd.xml | 61 +++++++++++++++++++++++++++++++++++++++
421 1 file changed, 61 insertions(+)
422
423 commit 9358e812f8341b9b604d9dd9f0792990f0353f06
424 Author: Stef Walter <stefw@gnome.org>
425 Date: 2012-05-04
426
427 Return correct errors if already or not enrolled in realm
428
429 dbus/realm-dbus-constants.h | 2 ++
430 service/realm-errors.c | 2 ++
431 service/realm-errors.h | 2 ++
432 service/realm-kerberos-realm.c | 11 +++++++++
433 service/realm-samba-realm.c | 51 +++++++++++++++++++++++++++-------------
434 5 files changed, 52 insertions(+), 16 deletions(-)
435
436 commit d52ab95fd1f4fdac10397a42c42261944b57897b
437 Author: Stef Walter <stefw@gnome.org>
438 Date: 2012-05-04
439
440 Properly track changes to the samba config file
441
442 * And propagate changes to realm properties via PropertiesChanged
443
444 service/realm-ini-config.c | 248 ++++++++++++++++++++++++++++++++++------
445 service/realm-ini-config.h | 12 +-
446 service/realm-kerberos-realm.c | 8 --
447 service/realm-samba-config.c | 33 ++++--
448 service/realm-samba-config.h | 3 +
449 service/realm-samba-provider.c | 8 +-
450 service/realm-samba-realm.c | 115 +++++++++++++------
451 service/realm-samba-realm.h | 4 +-
452 tests/Makefile.am | 6 +
453 tests/test-ini-config.c | 102 ++++++++++++++---
454 10 files changed, 427 insertions(+), 112 deletions(-)
455
456 commit b34988b6b47238e7768e0d9a21534a822ced8592
457 Author: Stef Walter <stefw@gnome.org>
458 Date: 2012-05-04
459
460 Add the realm-enroll tool
461
462 .gitignore | 2 +
463 Makefile.am | 2 +-
464 configure.ac | 38 ++++
465 tools/Makefile.am | 21 +++
466 tools/realm-enroll.c | 468 ++++++++++++++++++++++++++++++++++++++++++++++++++
467 5 files changed, 530 insertions(+), 1 deletion(-)
468
469 commit f0e7c8c9b346cb4101f0a2ca1b3baef4459558ef
470 Author: Stef Walter <stefw@gnome.org>
471 Date: 2012-05-03
472
473 Refactor the interface and add aggregate provider
474
475 * The all provider aggregates the results from other
476 providers
477 * Discover is a provider level interface
478 * Realms are discovered
479
480 .gitignore | 7 +-
481 configure.ac | 7 +-
482 dbus/Makefile.am | 4 +
483 dbus/org.freedesktop.realmd.xml | 36 +-
484 dbus/realm-dbus-constants.h | 10 +-
485 dbus/realm-dbus-generated.c | 3537 -----------
486 dbus/realm-dbus-generated.h | 504 --
487 dbus/realm-dbus-systemd.c |12596 -------------------------------------
488 dbus/realm-dbus-systemd.h | 1609 -----
489 service/Makefile.am | 8 +-
490 service/realm-ad-discover.c | 39 +-
491 service/realm-ad-discover.h | 10 +-
492 service/realm-all-provider.c | 523 ++
493 service/realm-all-provider.h | 38 +
494 service/realm-daemon.c | 6 +-
495 service/realm-debug.h | 3 +-
496 service/realm-diagnostics.c | 12 +-
497 service/realm-errors.c | 1 +
498 service/realm-errors.h | 1 +
499 service/realm-kerberos-provider.c | 347 -
500 service/realm-kerberos-provider.h | 86 -
501 service/realm-kerberos-realm.c | 330 +
502 service/realm-kerberos-realm.h | 75 +
503 service/realm-provider.c | 180 +
504 service/realm-provider.h | 66 +
505 service/realm-samba-enroll.h | 2 -
506 service/realm-samba-provider.c | 362 +-
507 service/realm-samba-provider.h | 2 +-
508 service/realm-samba-realm.c | 387 ++
509 service/realm-samba-realm.h | 38 +
510 service/realm-service.c | 208 -
511 service/realm-service.h | 38 -
512 tests/discover-python.py | 34 +-
513 tests/enroll-machine.py | 38 +-
514 tests/provider-props.py | 8 +-
515 tests/service-list.py | 38 -
516 36 files changed, 1885 insertions(+), 19305 deletions(-)
517
518 commit 3fdabbe9762455c180475aeb72a556b5b30133e6
519 Author: Stef Walter <stefw@gnome.org>
520 Date: 2012-05-03
521
522 Factor the generated dbus stuff into own directory
523
524 .gitignore | 1 +
525 Makefile.am | 2 +-
526 configure.ac | 2 +
527 dbus/Makefile.am | 46 +
528 dbus/org.freedesktop.realmd.conf | 17 +
529 dbus/org.freedesktop.realmd.xml | 47 +
530 dbus/org.freedesktop.systemd1.xml | 224 +
531 dbus/realm-dbus-constants.h | 54 +
532 dbus/realm-dbus-generated.c | 3537 ++++++++++
533 dbus/realm-dbus-generated.h | 504 ++
534 dbus/realm-dbus-systemd.c |12596 ++++++++++++++++++++++++++++++++++
535 dbus/realm-dbus-systemd.h | 1609 +++++
536 service/Makefile.am | 28 +-
537 service/org.freedesktop.realmd.conf | 17 -
538 service/org.freedesktop.realmd.xml | 47 -
539 service/org.freedesktop.systemd1.xml | 224 -
540 service/realm-dbus-constants.h | 54 -
541 service/realm-dbus-systemd.c |12596 ----------------------------------
542 service/realm-dbus-systemd.h | 1609 -----
543 19 files changed, 18640 insertions(+), 14574 deletions(-)
544
545 commit acba5ff456494914c265d5ae727622596c886de3
546 Author: Stef Walter <stefw@gnome.org>
547 Date: 2012-05-03
548
549 Add the Service object, list providers from files
550
551 service/Makefile.am | 11 +-
552 service/org.freedesktop.realmd.Samba.provider | 4 +
553 service/org.freedesktop.realmd.conf | 4 +-
554 service/org.freedesktop.realmd.xml | 18 +-
555 service/realm-daemon.c | 3 +
556 service/realm-dbus-constants.h | 3 +
557 service/realm-samba-winbind.c | 20 +-
558 service/realm-service.c | 339 ++++++++++---------------
559 service/realm-service.h | 20 +-
560 service/realm-system.c | 273 ++++++++++++++++++++
561 service/realm-system.h | 42 +++
562 tests/service-list.py | 38 +++
563 12 files changed, 546 insertions(+), 229 deletions(-)
564
565 commit d8273d94f56f62b981c4e0d9bcee04257227b653
566 Author: Stef Walter <stefw@gnome.org>
567 Date: 2012-05-03
568
569 Rename AdSamba to Samba provider
570
571 * Interfaces, config and so on updated
572
573 service/org.freedesktop.realmd.conf | 4 ++--
574 service/realm-daemon.c | 2 +-
575 service/realm-dbus-constants.h | 4 ++--
576 service/realm-samba-provider.c | 2 +-
577 service/realmd-defaults.conf | 2 +-
578 5 files changed, 7 insertions(+), 7 deletions(-)
579
580 commit df957c69918edaab0a30f06933185f23eeb12d8f
581 Author: Stef Walter <stefw@gnome.org>
582 Date: 2012-05-03
583
584 Rename RealmSambaConfig to RealmIniConfig
585
586 * So we can use the same stuff for sssd
587
588 .gitignore | 1 +
589 service/Makefile.am | 1 +
590 service/realm-ini-config.c | 659 ++++++++++++++++++++++++++++++++++++++++
591 service/realm-ini-config.h | 78 +++++
592 service/realm-samba-config.c | 645 ++-------------------------------------
593 service/realm-samba-config.h | 50 +--
594 service/realm-samba-enroll.c | 8 +-
595 service/realm-samba-provider.c | 10 +-
596 tests/Makefile.am | 9 +-
597 tests/test-ini-config.c | 455 +++++++++++++++++++++++++++
598 tests/test-samba-config.c | 527 --------------------------------
599 11 files changed, 1229 insertions(+), 1214 deletions(-)
600
601 commit 2daa2c6d48a86d1e367384dcf2cf2b53859c71d5
602 Author: Stef Walter <stefw@gnome.org>
603 Date: 2012-05-02
604
605 Setup offline logins, and refresh tickets for winbind by default
606
607 service/realm-samba-winbind.c | 2 ++
608 1 file changed, 2 insertions(+)
609
610 commit 317d6c7c54439216eb5c904f06cf6bee362476e4
611 Author: Stef Walter <stefw@gnome.org>
612 Date: 2012-05-02
613
614 Remove concept of enabling realm logins separately
615
616 * This works/doesn't work on different distros, and is contrary
617 to general purpose use.
618 * Obviously admins can still do this manually for their platform
619 as necessary.
620
621 service/org.freedesktop.realmd.policy.in | 10 ------
622 service/org.freedesktop.realmd.xml | 7 ----
623 service/realm-kerberos-provider.c | 54 ------------------------------
624 service/realm-kerberos-provider.h | 10 ------
625 service/realm-samba-winbind.c | 4 +--
626 service/realmd-redhat.conf | 6 ++--
627 6 files changed, 4 insertions(+), 87 deletions(-)
628
629 commit efe9c4c7bf6ef87aa1078dd469be258701b4b5e7
630 Author: Stef Walter <stefw@gnome.org>
631 Date: 2012-05-02
632
633 Implement the EnrolledRealms property in Samba provider
634
635 * smb.conf params are stripped of whitespace when read
636
637 service/realm-samba-config.c | 2 +-
638 service/realm-samba-provider.c | 74 ++++++++++++++++++++++++++++++++++++++++
639 tests/files/smb-one.conf | 1 +
640 tests/provider-props.py | 39 +++++++++++++++++++++
641 tests/test-samba-config.c | 3 ++
642 5 files changed, 118 insertions(+), 1 deletion(-)
643
644 commit 68cb73f63c28ed38b4634bdd559f0d13bb7de8b4
645 Author: Stef Walter <stefw@gnome.org>
646 Date: 2012-05-02
647
648 Rename the AD provider to the Samba provider
649
650 service/Makefile.am | 4 +-
651 .../org.freedesktop.realmd.ActiveDirectory.conf | 15 -
652 service/org.freedesktop.realmd.conf | 15 +
653 service/realm-ad-provider.c | 352 --------------------
654 service/realm-ad-provider.h | 49 ---
655 service/realm-daemon.c | 6 +-
656 service/realm-dbus-constants.h | 4 +-
657 service/realm-samba-enroll.c | 2 +-
658 service/realm-samba-provider.c | 351 +++++++++++++++++++
659 service/realm-samba-provider.h | 40 +++
660 tests/discover-python.py | 4 +-
661 tests/enroll-machine.py | 4 +-
662 12 files changed, 418 insertions(+), 428 deletions(-)
663
664 commit 62e11c9e4b6a0a98835b8e65929d2f2fd1643150
665 Author: Stef Walter <stefw@gnome.org>
666 Date: 2012-05-02
667
668 Fix 'make distcheck'
669
670 .gitignore | 1 +
671 service/Makefile.am | 8 +++++++-
672 tests/Makefile.am | 3 +++
673 3 files changed, 11 insertions(+), 1 deletion(-)
674
675 commit 146f948b6679e4d9fc0fd9b6e10611ba736fe0bb
676 Author: Stef Walter <stefw@gnome.org>
677 Date: 2012-05-02
678
679 Fix 'make check'
680
681 .gitignore | 3 +++
682 po/POTFILES.in | 1 +
683 service/realm-command.c | 4 ++--
684 service/realm-packages.c | 2 +-
685 4 files changed, 7 insertions(+), 3 deletions(-)
686
687 commit 16165543255342c9d150bf77d2490ba7d64a2218
688 Author: Stef Walter <stefw@gnome.org>
689 Date: 2012-05-02
690
691 Rename samba specific stuff to include 'samba' in name
692
693 service/Makefile.am | 4 +-
694 service/realm-ad-enroll.c | 412 ----------------------------------------
695 service/realm-ad-enroll.h | 46 -----
696 service/realm-ad-provider.c | 31 +--
697 service/realm-dbus-constants.h | 2 +-
698 service/realm-errors.h | 2 +-
699 service/realm-samba-enroll.c | 412 ++++++++++++++++++++++++++++++++++++++++
700 service/realm-samba-enroll.h | 46 +++++
701 service/realm-samba-winbind.c | 194 +++++++++++++++++++
702 service/realm-samba-winbind.h | 40 ++++
703 service/realm-winbind.c | 194 -------------------
704 service/realm-winbind.h | 45 -----
705 12 files changed, 712 insertions(+), 716 deletions(-)
706
707 commit f3f22934f9da9b030454a6647bb1c056bf616bc6
708 Author: Stef Walter <stefw@gnome.org>
709 Date: 2012-05-02
710
711 Modify global smb.conf on join/leave domain
712
713 * Use the workgroup discovered by the net command
714
715 service/Makefile.am | 2 +-
716 service/ad-provider-smb.conf | 2 -
717 service/net-ads-smb.conf | 2 +
718 service/realm-ad-enroll.c | 104 +++++++++++++++++++++++++++++++++---------
719 service/realm-samba-config.c | 96 ++++++++++++++++++++++++++++++--------
720 service/realm-samba-config.h | 7 +++
721 tests/test-samba-config.c | 39 ++++++++++++----
722 7 files changed, 198 insertions(+), 54 deletions(-)
723
724 commit c1cb859408a888f10a03ae9f43a920b58ef3e34e
725 Author: Stef Walter <stefw@gnome.org>
726 Date: 2012-05-02
727
728 Read and write to smb.conf files directly
729
730 * Preserve the contents well even when modifying
731 * Add tests for the reading/writing code
732 * Factor out the platform setting stuff into its own files
733 so that we can use it in tests
734
735 .gitignore | 5 +
736 Makefile.decl | 13 +
737 configure.ac | 42 ++-
738 service/Makefile.am | 3 +-
739 service/realm-ad-enroll.c | 50 +--
740 service/realm-command.c | 3 +-
741 service/realm-daemon.c | 139 +-------
742 service/realm-daemon.h | 10 -
743 service/realm-packages.c | 3 +-
744 service/realm-platform.c | 178 ++++++++++
745 service/realm-platform.h | 47 +++
746 service/realm-samba-config.c | 681 ++++++++++++++++++++++++++++++++------
747 service/realm-samba-config.h | 56 +++-
748 service/realm-winbind.c | 52 ++-
749 service/realmd-defaults.conf | 1 +
750 service/realmd-redhat.conf | 2 +
751 tests/Makefile.am | 10 +
752 tests/files/realmd-defaults.conf | 1 +
753 tests/files/realmd-distro.conf | 1 +
754 tests/files/smb-one.conf | 17 +
755 tests/test-samba-config.c | 503 ++++++++++++++++++++++++++++
756 21 files changed, 1494 insertions(+), 323 deletions(-)
757
758 commit a83a12db61ade0dcdc020561532dcaaa411fdb80
759 Author: Stef Walter <stefw@gnome.org>
760 Date: 2012-04-30
761
762 Remove incomplete SSSD stuff
763
764 service/Makefile.am | 1 -
765 service/ad-provider-sssd | 134 -------------------------------------
766 service/realm-ad-sssd.c | 167 ----------------------------------------------
767 service/realm-ad-sssd.h | 42 ------------
768 4 files changed, 344 deletions(-)
769
770 commit a7ecf9b6c2e90883ef4e1470ec11279bcee55f64
771 Author: Stef Walter <stefw@gnome.org>
772 Date: 2012-04-30
773
774 Use authconfig on redhat to enable winbind nsswitch support
775
776 service/realm-command.c | 48 ++++++++++++++++++++++++---
777 service/realm-command.h | 7 ++++
778 service/realm-packages.c | 16 ++++-----
779 service/realm-winbind.c | 79 ++++++++++++++++++++++++++++++++++++--------
780 service/realmd-redhat.conf | 8 ++---
781 5 files changed, 128 insertions(+), 30 deletions(-)
782
783 commit 45f8752f1adde9079069bbc79182b5456e1518a6
784 Author: Stef Walter <stefw@gnome.org>
785 Date: 2012-04-30
786
787 Move to data driven package installation
788
789 * Use default/distro/admin conf files to lookup settings and
790 commands
791 * Fix bugs in the package installation, and quiet down
792
793 configure.ac | 26 ++++
794 service/Makefile.am | 17 ++-
795 .../org.freedesktop.realmd.ActiveDirectory.conf | 15 +++
796 service/realm-ad-enroll.c | 3 +-
797 service/realm-ad-provider.c | 42 +-----
798 service/realm-constants.h | 40 ------
799 service/realm-daemon.c | 141 ++++++++++++++++++++
800 service/realm-daemon.h | 12 +-
801 service/realm-debug.c | 1 +
802 service/realm-debug.h | 1 +
803 service/realm-packages.c | 136 ++++++++++++++-----
804 service/realm-packages.h | 3 +-
805 service/realm-samba-config.c | 3 +-
806 service/realm-service.c | 2 +-
807 service/realm-winbind.c | 7 +-
808 service/realmd-dbus.conf | 16 ---
809 service/realmd-defaults.conf | 15 +++
810 service/realmd-redhat.conf | 11 ++
811 18 files changed, 350 insertions(+), 141 deletions(-)
812
813 commit 0a78123f8fa55b1f63693a51b0d5fe76c787fb43
814 Author: Stef Walter <stefw@gnome.org>
815 Date: 2012-04-30
816
817 Fix unenroll from domain, and add to test script
818
819 service/realm-ad-enroll.c | 4 +---
820 tests/enroll-machine.py | 29 ++++++++++++++++++++---------
821 2 files changed, 21 insertions(+), 12 deletions(-)
822
823 commit 567cb7ebbf0187733c071232a691622943074bbe
824 Author: Stef Walter <stefw@gnome.org>
825 Date: 2012-04-30
826
827 Implement interaction with systemd
828
829 * And use it to enable and start winbind
830
831 service/Makefile.am | 18 +-
832 service/org.freedesktop.systemd1.xml | 224 +
833 service/realm-ad-enroll.c | 3 +-
834 service/realm-ad-provider.c | 57 +-
835 service/realm-ad-sssd.c | 4 +-
836 service/realm-constants.h | 40 +
837 service/realm-daemon.c | 292 +
838 service/realm-daemon.h | 41 +
839 service/realm-dbus-systemd.c |12596 ++++++++++++++++++++++++++++++++++
840 service/realm-dbus-systemd.h | 1609 +++++
841 service/realm-kerberos-provider.c | 16 +-
842 service/realm-paths.h | 32 -
843 service/realm-samba-config.c | 4 +-
844 service/realm-service.c | 412 +-
845 service/realm-service.h | 23 +-
846 service/realm-winbind.c | 156 +
847 service/realm-winbind.h | 45 +
848 17 files changed, 15261 insertions(+), 311 deletions(-)
849
850 commit 601fc1c8482bd446ca4846247cc05b80f369c6ed
851 Author: Stef Walter <stefw@gnome.org>
852 Date: 2012-04-25
853
854 Factor out the smbconf into its own file
855
856 * Right now using smbconf registry, maybe switch to
857 smb.conf file format later.
858
859 service/Makefile.am | 1 +
860 service/realm-ad-enroll.c | 50 ++++---------
861 service/realm-ad-provider.c | 11 +--
862 service/realm-ad-provider.h | 8 --
863 service/realm-command.c | 8 ++
864 service/realm-paths.h | 32 ++++++++
865 service/realm-samba-config.c | 166 ++++++++++++++++++++++++++++++++++++++++++
866 service/realm-samba-config.h | 35 +++++++++
867 8 files changed, 263 insertions(+), 48 deletions(-)
868
869 commit 11e6c7e7071bce2ca89719e6212d9188989f68ab
870 Author: Stef Walter <stefw@gnome.org>
871 Date: 2012-04-25
872
873 Tweaks to the enroll-machine.py script
874
875 tests/enroll-machine.py | 4 ++--
876 1 file changed, 2 insertions(+), 2 deletions(-)
877
878 commit 9e86c7aa9905d708b88f8601e5af4efa908e0458
879 Author: Stef Walter <stefw@gnome.org>
880 Date: 2012-04-25
881
882 Unbreak autogen.sh after file rename
883
884 autogen.sh | 2 +-
885 1 file changed, 1 insertion(+), 1 deletion(-)
886
887 commit 619301384003ef6322a227722917baa1eb320228
888 Author: Stef Walter <stefw@gnome.org>
889 Date: 2012-04-20
890
891 Fix bugs for enrolling machine
892
893 service/org.freedesktop.realmd.xml | 8 +++-
894 service/realm-ad-enroll.c | 31 ++++++++-----
895 service/realm-ad-provider.c | 55 +++++++++++------------
896 service/realm-ad-provider.h | 17 +++++++
897 service/realm-command.c | 9 ++--
898 tests/enroll-machine.py | 87 ++++++++++++++++++++++++++++++++++++
899 6 files changed, 163 insertions(+), 44 deletions(-)
900
901 commit 5ca0ca3ad297a584a3e4a79e0b4b08aea1a716ea
902 Author: Stef Walter <stefw@gnome.org>
903 Date: 2012-04-20
904
905 Add polkit checks for the various kerberos actions
906
907 .gitignore | 5 ++-
908 configure.ac | 16 +++++--
909 service/Makefile.am | 12 +++--
910 service/org.freedesktop.realmd.policy.in | 57 ++++++++++++++++++++++++
911 service/realm-dbus-constants.h | 5 +++
912 service/realm-kerberos-provider.c | 55 +++++++++++++++++++++++
913 service/realm-service.c | 70 ++++++++++++++++++++++++++++++
914 service/realm-service.h | 3 ++
915 tests/discover-python.py | 2 +-
916 9 files changed, 217 insertions(+), 8 deletions(-)
917
918 commit d44df9d8b6b7d96c74e50ce3364f0ecad8636196
919 Author: Stef Walter <stefw@gnome.org>
920 Date: 2012-04-19
921
922 Add tool for DiscoverRealm and fix bugs
923
924 service/org.freedesktop.realmd.xml | 2 +-
925 service/realm-ad-discover.c | 10 ++---
926 service/realm-ad-enroll.c | 2 +-
927 service/realm-dbus-constants.h | 2 +-
928 service/realm-diagnostics.c | 8 ++--
929 service/realm-discovery.c | 5 ++-
930 service/realm-kerberos-provider.c | 2 +-
931 tests/discover-python.py | 72 ++++++++++++++++++++++++++++++++++++
932 8 files changed, 88 insertions(+), 15 deletions(-)
933
934 commit 7d4db65a9032a888045ee9075e7eeda04e1ac9f4
935 Author: Stef Walter <stefw@gnome.org>
936 Date: 2012-04-19
937
938 Install dbus configuration file, fix connectiong to system service
939
940 configure.ac | 17 +++++------------
941 service/Makefile.am | 6 ++++++
942 service/realm-ad-provider.c | 3 ++-
943 service/realm-dbus-constants.h | 20 ++++++++++----------
944 service/realm-kerberos-provider.c | 2 +-
945 service/realm-service.c | 2 +-
946 service/realmd-dbus.conf | 16 ++++++++++++++++
947 7 files changed, 41 insertions(+), 25 deletions(-)
948
949 commit 4f41caa935315188ed75eade1829bf2318aa0d64
950 Author: Stef Walter <stefw@gnome.org>
951 Date: 2012-04-19
952
953 Add service timeouts and figure out service startup and exit
954
955 configure.ac | 2 +-
956 service/Makefile.am | 1 -
957 service/realm-ad-discover.c | 22 +++---
958 service/realm-ad-provider.c | 63 +++++++++++++++--
959 service/realm-ad-provider.h | 4 ++
960 service/realm-debug.c | 8 +--
961 service/realm-debug.h | 2 +-
962 service/realm-main.c | 58 ----------------
963 service/realm-service.c | 157 +++++++++++++++++++++++++++++++++++++++++++
964 service/realm-service.h | 12 +++-
965 10 files changed, 243 insertions(+), 86 deletions(-)
966
967 commit 2e6e5010ff0eea706f170baeb6b613bed0fda9f9
968 Author: Stef Walter <stefw@gnome.org>
969 Date: 2012-04-19
970
971 Update debug code
972
973 * Handle G_MESSAGES_DEBUG properly for glib changes
974
975 service/realm-debug.c | 83 ++++++++++++++++++++++++++++++++++++++++++-------
976 service/realm-debug.h | 1 +
977 service/realm-main.c | 3 ++
978 3 files changed, 76 insertions(+), 11 deletions(-)
979
980 commit f579a41c2373ab412e799c46525bfc5a8ce1a9e5
981 Author: Stef Walter <stefw@gnome.org>
982 Date: 2012-04-17
983
984 Rename to realmd
985
986 .gitignore | 3 +
987 autogen.sh | 2 +-
988 configure.ac | 10 +-
989 service/Makefile.am | 52 +-
990 service/ic-ad-discover.c | 240 ---
991 service/ic-ad-discover.h | 39 -
992 service/ic-ad-enroll.c | 383 ----
993 service/ic-ad-enroll.h | 46 -
994 service/ic-ad-provider.c | 348 ----
995 service/ic-ad-provider.h | 36 -
996 service/ic-ad-sssd.c | 167 --
997 service/ic-ad-sssd.h | 42 -
998 service/ic-command.c | 556 ------
999 service/ic-command.h | 51 -
1000 service/ic-dbus-constants.h | 46 -
1001 service/ic-dbus-generated.c | 2964 ----------------------------
1002 service/ic-dbus-generated.h | 421 ----
1003 service/ic-debug.c | 113 --
1004 service/ic-debug.h | 89 -
1005 service/ic-diagnostics.c | 180 --
1006 service/ic-diagnostics.h | 47 -
1007 service/ic-discovery.c | 75 -
1008 service/ic-discovery.h | 38 -
1009 service/ic-errors.c | 48 -
1010 service/ic-errors.h | 40 -
1011 service/ic-kerberos-provider.c | 346 ----
1012 service/ic-kerberos-provider.h | 96 -
1013 service/ic-main.c | 55 -
1014 service/ic-packages.c | 275 ---
1015 service/ic-packages.h | 38 -
1016 service/ic-service.c | 58 -
1017 service/ic-service.h | 32 -
1018 service/org.freedesktop.IdentityConfig.xml | 38 -
1019 service/org.freedesktop.realmd.xml | 38 +
1020 service/realm-ad-discover.c | 240 +++
1021 service/realm-ad-discover.h | 39 +
1022 service/realm-ad-enroll.c | 383 ++++
1023 service/realm-ad-enroll.h | 46 +
1024 service/realm-ad-provider.c | 348 ++++
1025 service/realm-ad-provider.h | 36 +
1026 service/realm-ad-sssd.c | 167 ++
1027 service/realm-ad-sssd.h | 42 +
1028 service/realm-command.c | 556 ++++++
1029 service/realm-command.h | 51 +
1030 service/realm-dbus-constants.h | 46 +
1031 service/realm-debug.c | 117 ++
1032 service/realm-debug.h | 89 +
1033 service/realm-diagnostics.c | 180 ++
1034 service/realm-diagnostics.h | 41 +
1035 service/realm-discovery.c | 75 +
1036 service/realm-discovery.h | 38 +
1037 service/realm-errors.c | 48 +
1038 service/realm-errors.h | 40 +
1039 service/realm-kerberos-provider.c | 346 ++++
1040 service/realm-kerberos-provider.h | 96 +
1041 service/realm-main.c | 55 +
1042 service/realm-packages.c | 275 +++
1043 service/realm-packages.h | 38 +
1044 service/realm-service.c | 58 +
1045 service/realm-service.h | 32 +
1046 tests/discover-ad-realm | 62 -
1047 tests/frob-install-packages.c | 2 +-
1048 62 files changed, 3556 insertions(+), 7002 deletions(-)
1049
1050 commit f4406a8ae989515825fdfa31dca2c5fefe99af90
1051 Author: Stef Walter <stefw@gnome.org>
1052 Date: 2012-03-23
1053
1054 More rough work on IC
1055
1056 .gitignore | 1 +
1057 Makefile.am | 2 +-
1058 configure.ac | 21 +-
1059 service/Makefile.am | 27 +-
1060 service/ad-provider-smb.conf | 2 +
1061 service/ad-provider-sssd | 134 ++
1062 service/ic-ad-discover.c | 240 +++
1063 service/ic-ad-discover.h | 39 +
1064 service/ic-ad-enroll.c | 383 +++++
1065 service/ic-ad-enroll.h | 46 +
1066 service/ic-ad-provider.c | 348 ++++
1067 service/ic-ad-provider.h | 36 +
1068 service/ic-ad-sssd.c | 167 ++
1069 service/ic-ad-sssd.h | 42 +
1070 service/ic-ads-provider.c | 286 ----
1071 service/ic-ads-provider.h | 38 -
1072 service/ic-command.c | 556 +++++++
1073 service/ic-command.h | 51 +
1074 service/ic-dbus-constants.h | 12 +-
1075 service/ic-dbus-generated.c | 2389 ++++++++--------------------
1076 service/ic-dbus-generated.h | 302 ++--
1077 service/ic-discovery.c | 75 +
1078 service/ic-discovery.h | 38 +
1079 service/ic-errors.c | 5 +
1080 service/ic-errors.h | 7 +-
1081 service/ic-kerberos-provider.c | 346 ++++
1082 service/ic-kerberos-provider.h | 96 ++
1083 service/ic-main.c | 6 +-
1084 service/ic-packages.c | 275 ++++
1085 service/ic-packages.h | 38 +
1086 service/ic-service.c | 58 +
1087 service/ic-service.h | 32 +
1088 service/ic-unix-process.c | 908 -----------
1089 service/ic-unix-process.h | 85 -
1090 service/org.freedesktop.IdentityConfig.xml | 51 +-
1091 tests/Makefile.am | 53 +
1092 tests/discover-ad-realm | 62 +
1093 tests/discover-ad-realm.py | 62 -
1094 tests/frob-install-packages.c | 182 +++
1095 39 files changed, 4152 insertions(+), 3349 deletions(-)
1096
1097 commit 85fadcb38de5551f1eb5aecd27980331c1bb44f1
1098 Author: Stef Walter <stefw@gnome.org>
1099 Date: 2012-03-22
1100
1101 Implement initial ads provider and discovery
1102
1103 * And lots of infrastructure along the way
1104
1105 .gitignore | 1 +
1106 configure.ac | 10 +
1107 service/Makefile.am | 10 +-
1108 service/ic-ads-provider.c | 286 ++
1109 service/ic-ads-provider.h | 38 +
1110 service/ic-dbus-constants.h | 36 +
1111 service/ic-dbus-generated.c | 4027 ++++++++++++++++++++++++++++
1112 service/ic-dbus-generated.h | 523 ++++
1113 service/ic-debug.c | 18 +-
1114 service/ic-debug.h | 3 +
1115 service/ic-diagnostics.c | 180 ++
1116 service/ic-diagnostics.h | 47 +
1117 service/ic-errors.c | 43 +
1118 service/ic-errors.h | 35 +
1119 service/ic-main.c | 35 +
1120 service/ic-unix-process.c | 31 +-
1121 service/ic-unix-process.h | 2 +-
1122 service/org.freedesktop.IdentityConfig.xml | 43 +
1123 tests/discover-ad-realm.py | 62 +
1124 19 files changed, 5401 insertions(+), 29 deletions(-)
1125
1126 commit c467f99da29b4927a38b6f3939f64074c63c6cd1
1127 Author: Stef Walter <stefw@gnome.org>
1128 Date: 2012-03-20
1129
1130 Include m4 directory by default
1131
1132 .gitignore | 2 --
1133 build/m4/.gitignore | 1 +
1134 2 files changed, 1 insertion(+), 2 deletions(-)
1135
1136 commit b95f0532f9f8bf90d1f21fb1a3f466be757b3258
1137 Author: Stef Walter <stefw@gnome.org>
1138 Date: 2012-03-20
1139
1140 Add unix process class
1141
1142 * Brought over from gcr library
1143
1144 .gitignore | 1 +
1145 service/Makefile.am | 5 +-
1146 service/ic-debug.c | 107 ++++++
1147 service/ic-debug.h | 86 +++++
1148 service/ic-unix-process.c | 917 +++++++++++++++++++++++++++++++++++++++++++++
1149 service/ic-unix-process.h | 85 +++++
1150 6 files changed, 1200 insertions(+), 1 deletion(-)
1151
1152 commit 4b6b502d694bfe419c9a0140b96dcec4c96a87f1
1153 Author: Stef Walter <stefw@gnome.org>
1154 Date: 2012-03-20
1155
1156 Initial commit
1157
1158 .gitignore | 29 ++++
1159 AUTHORS | 1 +
1160 COPYING | 482 +++++++++++++++++++++++++++++++++++++++++++++++++++
1161 ChangeLog | 32 ++++
1162 Makefile.am | 32 ++++
1163 Makefile.decl | 14 ++
1164 NEWS | 4 +
1165 README | 1 +
1166 autogen.sh | 81 +++++++++
1167 build/Makefile.am | 1 +
1168 configure.ac | 131 ++++++++++++++
1169 service/Makefile.am | 29 ++++
1170 service/ic-main.c | 20 +++
1171 13 files changed, 857 insertions(+)
(New empty file)
0 ## Process this file with automake to produce Makefile.in
1 include $(top_srcdir)/Makefile.decl
2
3 ACLOCAL_AMFLAGS = -I build/m4 ${ACLOCAL_FLAGS}
4
5 SUBDIRS = build dbus service tools tests po
6
7 DISTCHECK_CONFIGURE_FLAGS = \
8 --enable-debug=yes \
9 --disable-coverage \
10 --enable-strict \
11 --disable-silent-rules
12
13 dist-hook:
14 @if test -d "$(srcdir)/.git"; \
15 then \
16 echo Creating ChangeLog && \
17 ( cd "$(top_srcdir)" && \
18 echo '# Generate automatically. Do not edit.'; echo; \
19 $(top_srcdir)/missing --run git log --stat --date=short ) > ChangeLog.tmp \
20 && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
21 || ( rm -f ChangeLog.tmp ; \
22 echo Failed to generate ChangeLog >&2 ); \
23 else \
24 echo A git clone is required to generate a ChangeLog >&2; \
25 fi
26
27 check-memory:
28 @for subdir in $(SUBDIRS); do \
29 test -d $(builddir)/$$subdir/tests && \
30 make -C $(builddir)/$$subdir/tests check-memory; \
31 done
0 NULL =
1
2 TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions
3
4 perform-memcheck: $(TEST_PROGS) $(TEST_SUPPRESSIONS)
5 @make -C $(top_builddir)/build all
6 @for test in $(TEST_PROGS); do \
7 G_SLICE=always-malloc libtool --mode=execute \
8 valgrind --trace-children=no --gen-suppressions=all \
9 --suppressions=$(TEST_SUPPRESSIONS) \
10 --leak-check=full --show-reachable=yes --num-callers=16 \
11 --quiet --error-exitcode=33 \
12 $(builddir)/$$test; \
13 done
14
15 if WITH_COVERAGE
16 coverage:
17 mkdir -p $(top_builddir)/build/coverage
18 $(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
19 $(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
20 $(LCOV) --directory . --zerocounters
21 @echo "file://$(abs_top_builddir)/build/coverage/index.html"
22
23 clear-coverage:
24 $(LCOV) --directory . --zerocounters
25
26 endif
0 # Makefile.in generated by automake 1.11.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16 VPATH = @srcdir@
17 pkgdatadir = $(datadir)/@PACKAGE@
18 pkgincludedir = $(includedir)/@PACKAGE@
19 pkglibdir = $(libdir)/@PACKAGE@
20 pkglibexecdir = $(libexecdir)/@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 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
34 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
35 $(top_srcdir)/Makefile.decl $(top_srcdir)/configure AUTHORS \
36 COPYING ChangeLog INSTALL NEWS compile depcomp install-sh \
37 missing
38 subdir = .
39 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40 am__aclocal_m4_deps = $(top_srcdir)/build/m4/intltool.m4 \
41 $(top_srcdir)/configure.ac
42 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
43 $(ACLOCAL_M4)
44 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
45 configure.lineno config.status.lineno
46 mkinstalldirs = $(install_sh) -d
47 CONFIG_HEADER = config.h
48 CONFIG_CLEAN_FILES =
49 CONFIG_CLEAN_VPATH_FILES =
50 AM_V_GEN = $(am__v_GEN_@AM_V@)
51 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
52 am__v_GEN_0 = @echo " GEN " $@;
53 AM_V_at = $(am__v_at_@AM_V@)
54 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
55 am__v_at_0 = @
56 SOURCES =
57 DIST_SOURCES =
58 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
59 html-recursive info-recursive install-data-recursive \
60 install-dvi-recursive install-exec-recursive \
61 install-html-recursive install-info-recursive \
62 install-pdf-recursive install-ps-recursive install-recursive \
63 installcheck-recursive installdirs-recursive pdf-recursive \
64 ps-recursive uninstall-recursive
65 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
66 distclean-recursive maintainer-clean-recursive
67 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
68 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
69 distdir dist dist-all distcheck
70 ETAGS = etags
71 CTAGS = ctags
72 DIST_SUBDIRS = $(SUBDIRS)
73 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
74 distdir = $(PACKAGE)-$(VERSION)
75 top_distdir = $(distdir)
76 am__remove_distdir = \
77 if test -d "$(distdir)"; then \
78 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
79 && rm -rf "$(distdir)" \
80 || { sleep 5 && rm -rf "$(distdir)"; }; \
81 else :; fi
82 am__relativize = \
83 dir0=`pwd`; \
84 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
85 sed_rest='s,^[^/]*/*,,'; \
86 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
87 sed_butlast='s,/*[^/]*$$,,'; \
88 while test -n "$$dir1"; do \
89 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
90 if test "$$first" != "."; then \
91 if test "$$first" = ".."; then \
92 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
93 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
94 else \
95 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
96 if test "$$first2" = "$$first"; then \
97 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
98 else \
99 dir2="../$$dir2"; \
100 fi; \
101 dir0="$$dir0"/"$$first"; \
102 fi; \
103 fi; \
104 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
105 done; \
106 reldir="$$dir2"
107 DIST_ARCHIVES = $(distdir).tar.gz
108 GZIP_ENV = --best
109 distuninstallcheck_listfiles = find . -type f -print
110 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
111 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
112 distcleancheck_listfiles = find . -type f -print
113 ACLOCAL = @ACLOCAL@
114 ALL_LINGUAS = @ALL_LINGUAS@
115 AMTAR = @AMTAR@
116 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
117 AUTOCONF = @AUTOCONF@
118 AUTOHEADER = @AUTOHEADER@
119 AUTOMAKE = @AUTOMAKE@
120 AWK = @AWK@
121 CATALOGS = @CATALOGS@
122 CATOBJEXT = @CATOBJEXT@
123 CC = @CC@
124 CCDEPMODE = @CCDEPMODE@
125 CFLAGS = @CFLAGS@
126 CPP = @CPP@
127 CPPFLAGS = @CPPFLAGS@
128 CYGPATH_W = @CYGPATH_W@
129 DATADIRNAME = @DATADIRNAME@
130 DBUS_POLICY_DIR = @DBUS_POLICY_DIR@
131 DEFS = @DEFS@
132 DEPDIR = @DEPDIR@
133 DISTRO = @DISTRO@
134 ECHO_C = @ECHO_C@
135 ECHO_N = @ECHO_N@
136 ECHO_T = @ECHO_T@
137 EGREP = @EGREP@
138 EXEEXT = @EXEEXT@
139 GCOV = @GCOV@
140 GENHTML = @GENHTML@
141 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
142 GLIB_CFLAGS = @GLIB_CFLAGS@
143 GLIB_LIBS = @GLIB_LIBS@
144 GMOFILES = @GMOFILES@
145 GMSGFMT = @GMSGFMT@
146 GREP = @GREP@
147 INSTALL = @INSTALL@
148 INSTALL_DATA = @INSTALL_DATA@
149 INSTALL_PROGRAM = @INSTALL_PROGRAM@
150 INSTALL_SCRIPT = @INSTALL_SCRIPT@
151 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
152 INSTOBJEXT = @INSTOBJEXT@
153 INTLLIBS = @INTLLIBS@
154 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
155 INTLTOOL_MERGE = @INTLTOOL_MERGE@
156 INTLTOOL_PERL = @INTLTOOL_PERL@
157 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
158 INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
159 INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
160 INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
161 INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
162 KRB5_CFLAGS = @KRB5_CFLAGS@
163 KRB5_CONFIG = @KRB5_CONFIG@
164 KRB5_LIBS = @KRB5_LIBS@
165 LCOV = @LCOV@
166 LDFLAGS = @LDFLAGS@
167 LIBOBJS = @LIBOBJS@
168 LIBS = @LIBS@
169 LN_S = @LN_S@
170 LTLIBOBJS = @LTLIBOBJS@
171 MAINT = @MAINT@
172 MAKEINFO = @MAKEINFO@
173 MKDIR_P = @MKDIR_P@
174 MKINSTALLDIRS = @MKINSTALLDIRS@
175 MSGFMT = @MSGFMT@
176 MSGFMT_OPTS = @MSGFMT_OPTS@
177 MSGMERGE = @MSGMERGE@
178 OBJEXT = @OBJEXT@
179 PACKAGE = @PACKAGE@
180 PACKAGEKIT_CFLAGS = @PACKAGEKIT_CFLAGS@
181 PACKAGEKIT_LIBS = @PACKAGEKIT_LIBS@
182 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
183 PACKAGE_NAME = @PACKAGE_NAME@
184 PACKAGE_STRING = @PACKAGE_STRING@
185 PACKAGE_TARNAME = @PACKAGE_TARNAME@
186 PACKAGE_URL = @PACKAGE_URL@
187 PACKAGE_VERSION = @PACKAGE_VERSION@
188 PATH_SEPARATOR = @PATH_SEPARATOR@
189 PKG_CONFIG = @PKG_CONFIG@
190 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
191 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
192 POFILES = @POFILES@
193 POLKIT_ACTION_DIR = @POLKIT_ACTION_DIR@
194 POLKIT_CFLAGS = @POLKIT_CFLAGS@
195 POLKIT_LIBS = @POLKIT_LIBS@
196 POSUB = @POSUB@
197 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
198 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
199 RANLIB = @RANLIB@
200 SERVICE_DIR = @SERVICE_DIR@
201 SET_MAKE = @SET_MAKE@
202 SHELL = @SHELL@
203 STRIP = @STRIP@
204 TEST_MODE = @TEST_MODE@
205 USE_NLS = @USE_NLS@
206 VERSION = @VERSION@
207 XGETTEXT = @XGETTEXT@
208 abs_builddir = @abs_builddir@
209 abs_srcdir = @abs_srcdir@
210 abs_top_builddir = @abs_top_builddir@
211 abs_top_srcdir = @abs_top_srcdir@
212 ac_ct_CC = @ac_ct_CC@
213 am__include = @am__include@
214 am__leading_dot = @am__leading_dot@
215 am__quote = @am__quote@
216 am__tar = @am__tar@
217 am__untar = @am__untar@
218 bindir = @bindir@
219 build_alias = @build_alias@
220 builddir = @builddir@
221 datadir = @datadir@
222 datarootdir = @datarootdir@
223 docdir = @docdir@
224 dvidir = @dvidir@
225 exec_prefix = @exec_prefix@
226 host_alias = @host_alias@
227 htmldir = @htmldir@
228 includedir = @includedir@
229 infodir = @infodir@
230 install_sh = @install_sh@
231 intltool__v_merge_options_ = @intltool__v_merge_options_@
232 intltool__v_merge_options_0 = @intltool__v_merge_options_0@
233 libdir = @libdir@
234 libexecdir = @libexecdir@
235 localedir = @localedir@
236 localstatedir = @localstatedir@
237 mandir = @mandir@
238 mkdir_p = @mkdir_p@
239 oldincludedir = @oldincludedir@
240 pdfdir = @pdfdir@
241 prefix = @prefix@
242 program_transform_name = @program_transform_name@
243 psdir = @psdir@
244 sbindir = @sbindir@
245 sharedstatedir = @sharedstatedir@
246 srcdir = @srcdir@
247 sysconfdir = @sysconfdir@
248 target_alias = @target_alias@
249 top_build_prefix = @top_build_prefix@
250 top_builddir = @top_builddir@
251 top_srcdir = @top_srcdir@
252 NULL =
253 TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions
254 ACLOCAL_AMFLAGS = -I build/m4 ${ACLOCAL_FLAGS}
255 SUBDIRS = build dbus service tools tests po
256 DISTCHECK_CONFIGURE_FLAGS = \
257 --enable-debug=yes \
258 --disable-coverage \
259 --enable-strict \
260 --disable-silent-rules
261
262 all: config.h
263 $(MAKE) $(AM_MAKEFLAGS) all-recursive
264
265 .SUFFIXES:
266 am--refresh: Makefile
267 @:
268 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps)
269 @for dep in $?; do \
270 case '$(am__configure_deps)' in \
271 *$$dep*) \
272 echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
273 $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
274 && exit 0; \
275 exit 1;; \
276 esac; \
277 done; \
278 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
279 $(am__cd) $(top_srcdir) && \
280 $(AUTOMAKE) --foreign Makefile
281 .PRECIOUS: Makefile
282 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
283 @case '$?' in \
284 *config.status*) \
285 echo ' $(SHELL) ./config.status'; \
286 $(SHELL) ./config.status;; \
287 *) \
288 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
289 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
290 esac;
291 $(top_srcdir)/Makefile.decl:
292
293 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
294 $(SHELL) ./config.status --recheck
295
296 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
297 $(am__cd) $(srcdir) && $(AUTOCONF)
298 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
299 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
300 $(am__aclocal_m4_deps):
301
302 config.h: stamp-h1
303 @if test ! -f $@; then rm -f stamp-h1; else :; fi
304 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
305
306 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
307 @rm -f stamp-h1
308 cd $(top_builddir) && $(SHELL) ./config.status config.h
309 $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
310 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
311 rm -f stamp-h1
312 touch $@
313
314 distclean-hdr:
315 -rm -f config.h stamp-h1
316
317 # This directory's subdirectories are mostly independent; you can cd
318 # into them and run `make' without going through this Makefile.
319 # To change the values of `make' variables: instead of editing Makefiles,
320 # (1) if the variable is set in `config.status', edit `config.status'
321 # (which will cause the Makefiles to be regenerated when you run `make');
322 # (2) otherwise, pass the desired values on the `make' command line.
323 $(RECURSIVE_TARGETS):
324 @fail= failcom='exit 1'; \
325 for f in x $$MAKEFLAGS; do \
326 case $$f in \
327 *=* | --[!k]*);; \
328 *k*) failcom='fail=yes';; \
329 esac; \
330 done; \
331 dot_seen=no; \
332 target=`echo $@ | sed s/-recursive//`; \
333 list='$(SUBDIRS)'; for subdir in $$list; do \
334 echo "Making $$target in $$subdir"; \
335 if test "$$subdir" = "."; then \
336 dot_seen=yes; \
337 local_target="$$target-am"; \
338 else \
339 local_target="$$target"; \
340 fi; \
341 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
342 || eval $$failcom; \
343 done; \
344 if test "$$dot_seen" = "no"; then \
345 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
346 fi; test -z "$$fail"
347
348 $(RECURSIVE_CLEAN_TARGETS):
349 @fail= failcom='exit 1'; \
350 for f in x $$MAKEFLAGS; do \
351 case $$f in \
352 *=* | --[!k]*);; \
353 *k*) failcom='fail=yes';; \
354 esac; \
355 done; \
356 dot_seen=no; \
357 case "$@" in \
358 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
359 *) list='$(SUBDIRS)' ;; \
360 esac; \
361 rev=''; for subdir in $$list; do \
362 if test "$$subdir" = "."; then :; else \
363 rev="$$subdir $$rev"; \
364 fi; \
365 done; \
366 rev="$$rev ."; \
367 target=`echo $@ | sed s/-recursive//`; \
368 for subdir in $$rev; do \
369 echo "Making $$target in $$subdir"; \
370 if test "$$subdir" = "."; then \
371 local_target="$$target-am"; \
372 else \
373 local_target="$$target"; \
374 fi; \
375 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
376 || eval $$failcom; \
377 done && test -z "$$fail"
378 tags-recursive:
379 list='$(SUBDIRS)'; for subdir in $$list; do \
380 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
381 done
382 ctags-recursive:
383 list='$(SUBDIRS)'; for subdir in $$list; do \
384 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
385 done
386
387 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
388 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
389 unique=`for i in $$list; do \
390 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
391 done | \
392 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
393 END { if (nonempty) { for (i in files) print i; }; }'`; \
394 mkid -fID $$unique
395 tags: TAGS
396
397 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
398 $(TAGS_FILES) $(LISP)
399 set x; \
400 here=`pwd`; \
401 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
402 include_option=--etags-include; \
403 empty_fix=.; \
404 else \
405 include_option=--include; \
406 empty_fix=; \
407 fi; \
408 list='$(SUBDIRS)'; for subdir in $$list; do \
409 if test "$$subdir" = .; then :; else \
410 test ! -f $$subdir/TAGS || \
411 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
412 fi; \
413 done; \
414 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
415 unique=`for i in $$list; do \
416 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
417 done | \
418 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
419 END { if (nonempty) { for (i in files) print i; }; }'`; \
420 shift; \
421 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
422 test -n "$$unique" || unique=$$empty_fix; \
423 if test $$# -gt 0; then \
424 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
425 "$$@" $$unique; \
426 else \
427 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
428 $$unique; \
429 fi; \
430 fi
431 ctags: CTAGS
432 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
433 $(TAGS_FILES) $(LISP)
434 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
435 unique=`for i in $$list; do \
436 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
437 done | \
438 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
439 END { if (nonempty) { for (i in files) print i; }; }'`; \
440 test -z "$(CTAGS_ARGS)$$unique" \
441 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
442 $$unique
443
444 GTAGS:
445 here=`$(am__cd) $(top_builddir) && pwd` \
446 && $(am__cd) $(top_srcdir) \
447 && gtags -i $(GTAGS_ARGS) "$$here"
448
449 distclean-tags:
450 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
451
452 distdir: $(DISTFILES)
453 $(am__remove_distdir)
454 test -d "$(distdir)" || mkdir "$(distdir)"
455 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
456 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
457 list='$(DISTFILES)'; \
458 dist_files=`for file in $$list; do echo $$file; done | \
459 sed -e "s|^$$srcdirstrip/||;t" \
460 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
461 case $$dist_files in \
462 */*) $(MKDIR_P) `echo "$$dist_files" | \
463 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
464 sort -u` ;; \
465 esac; \
466 for file in $$dist_files; do \
467 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
468 if test -d $$d/$$file; then \
469 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
470 if test -d "$(distdir)/$$file"; then \
471 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
472 fi; \
473 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
474 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
475 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
476 fi; \
477 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
478 else \
479 test -f "$(distdir)/$$file" \
480 || cp -p $$d/$$file "$(distdir)/$$file" \
481 || exit 1; \
482 fi; \
483 done
484 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
485 if test "$$subdir" = .; then :; else \
486 test -d "$(distdir)/$$subdir" \
487 || $(MKDIR_P) "$(distdir)/$$subdir" \
488 || exit 1; \
489 fi; \
490 done
491 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
492 if test "$$subdir" = .; then :; else \
493 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
494 $(am__relativize); \
495 new_distdir=$$reldir; \
496 dir1=$$subdir; dir2="$(top_distdir)"; \
497 $(am__relativize); \
498 new_top_distdir=$$reldir; \
499 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
500 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
501 ($(am__cd) $$subdir && \
502 $(MAKE) $(AM_MAKEFLAGS) \
503 top_distdir="$$new_top_distdir" \
504 distdir="$$new_distdir" \
505 am__remove_distdir=: \
506 am__skip_length_check=: \
507 am__skip_mode_fix=: \
508 distdir) \
509 || exit 1; \
510 fi; \
511 done
512 $(MAKE) $(AM_MAKEFLAGS) \
513 top_distdir="$(top_distdir)" distdir="$(distdir)" \
514 dist-hook
515 -test -n "$(am__skip_mode_fix)" \
516 || find "$(distdir)" -type d ! -perm -755 \
517 -exec chmod u+rwx,go+rx {} \; -o \
518 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
519 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
520 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
521 || chmod -R a+r "$(distdir)"
522 dist-gzip: distdir
523 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
524 $(am__remove_distdir)
525
526 dist-bzip2: distdir
527 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
528 $(am__remove_distdir)
529
530 dist-lzip: distdir
531 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
532 $(am__remove_distdir)
533
534 dist-lzma: distdir
535 tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
536 $(am__remove_distdir)
537
538 dist-xz: distdir
539 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
540 $(am__remove_distdir)
541
542 dist-tarZ: distdir
543 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
544 $(am__remove_distdir)
545
546 dist-shar: distdir
547 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
548 $(am__remove_distdir)
549
550 dist-zip: distdir
551 -rm -f $(distdir).zip
552 zip -rq $(distdir).zip $(distdir)
553 $(am__remove_distdir)
554
555 dist dist-all: distdir
556 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
557 $(am__remove_distdir)
558
559 # This target untars the dist file and tries a VPATH configuration. Then
560 # it guarantees that the distribution is self-contained by making another
561 # tarfile.
562 distcheck: dist
563 case '$(DIST_ARCHIVES)' in \
564 *.tar.gz*) \
565 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
566 *.tar.bz2*) \
567 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
568 *.tar.lzma*) \
569 lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
570 *.tar.lz*) \
571 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
572 *.tar.xz*) \
573 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
574 *.tar.Z*) \
575 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
576 *.shar.gz*) \
577 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
578 *.zip*) \
579 unzip $(distdir).zip ;;\
580 esac
581 chmod -R a-w $(distdir); chmod a+w $(distdir)
582 mkdir $(distdir)/_build
583 mkdir $(distdir)/_inst
584 chmod a-w $(distdir)
585 test -d $(distdir)/_build || exit 0; \
586 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
587 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
588 && am__cwd=`pwd` \
589 && $(am__cd) $(distdir)/_build \
590 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
591 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
592 $(DISTCHECK_CONFIGURE_FLAGS) \
593 && $(MAKE) $(AM_MAKEFLAGS) \
594 && $(MAKE) $(AM_MAKEFLAGS) dvi \
595 && $(MAKE) $(AM_MAKEFLAGS) check \
596 && $(MAKE) $(AM_MAKEFLAGS) install \
597 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
598 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
599 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
600 distuninstallcheck \
601 && chmod -R a-w "$$dc_install_base" \
602 && ({ \
603 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
604 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
605 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
606 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
607 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
608 } || { rm -rf "$$dc_destdir"; exit 1; }) \
609 && rm -rf "$$dc_destdir" \
610 && $(MAKE) $(AM_MAKEFLAGS) dist \
611 && rm -rf $(DIST_ARCHIVES) \
612 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
613 && cd "$$am__cwd" \
614 || exit 1
615 $(am__remove_distdir)
616 @(echo "$(distdir) archives ready for distribution: "; \
617 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
618 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
619 distuninstallcheck:
620 @test -n '$(distuninstallcheck_dir)' || { \
621 echo 'ERROR: trying to run $@ with an empty' \
622 '$$(distuninstallcheck_dir)' >&2; \
623 exit 1; \
624 }; \
625 $(am__cd) '$(distuninstallcheck_dir)' || { \
626 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
627 exit 1; \
628 }; \
629 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
630 || { echo "ERROR: files left after uninstall:" ; \
631 if test -n "$(DESTDIR)"; then \
632 echo " (check DESTDIR support)"; \
633 fi ; \
634 $(distuninstallcheck_listfiles) ; \
635 exit 1; } >&2
636 distcleancheck: distclean
637 @if test '$(srcdir)' = . ; then \
638 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
639 exit 1 ; \
640 fi
641 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
642 || { echo "ERROR: files left in build directory after distclean:" ; \
643 $(distcleancheck_listfiles) ; \
644 exit 1; } >&2
645 check-am: all-am
646 check: check-recursive
647 all-am: Makefile config.h
648 installdirs: installdirs-recursive
649 installdirs-am:
650 install: install-recursive
651 install-exec: install-exec-recursive
652 install-data: install-data-recursive
653 uninstall: uninstall-recursive
654
655 install-am: all-am
656 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
657
658 installcheck: installcheck-recursive
659 install-strip:
660 if test -z '$(STRIP)'; then \
661 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
662 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
663 install; \
664 else \
665 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
666 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
667 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
668 fi
669 mostlyclean-generic:
670
671 clean-generic:
672
673 distclean-generic:
674 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
675 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
676
677 maintainer-clean-generic:
678 @echo "This command is intended for maintainers to use"
679 @echo "it deletes files that may require special tools to rebuild."
680 clean: clean-recursive
681
682 clean-am: clean-generic mostlyclean-am
683
684 distclean: distclean-recursive
685 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
686 -rm -f Makefile
687 distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
688
689 dvi: dvi-recursive
690
691 dvi-am:
692
693 html: html-recursive
694
695 html-am:
696
697 info: info-recursive
698
699 info-am:
700
701 install-data-am:
702
703 install-dvi: install-dvi-recursive
704
705 install-dvi-am:
706
707 install-exec-am:
708
709 install-html: install-html-recursive
710
711 install-html-am:
712
713 install-info: install-info-recursive
714
715 install-info-am:
716
717 install-man:
718
719 install-pdf: install-pdf-recursive
720
721 install-pdf-am:
722
723 install-ps: install-ps-recursive
724
725 install-ps-am:
726
727 installcheck-am:
728
729 maintainer-clean: maintainer-clean-recursive
730 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
731 -rm -rf $(top_srcdir)/autom4te.cache
732 -rm -f Makefile
733 maintainer-clean-am: distclean-am maintainer-clean-generic
734
735 mostlyclean: mostlyclean-recursive
736
737 mostlyclean-am: mostlyclean-generic
738
739 pdf: pdf-recursive
740
741 pdf-am:
742
743 ps: ps-recursive
744
745 ps-am:
746
747 uninstall-am:
748
749 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
750 ctags-recursive install-am install-strip tags-recursive
751
752 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
753 all all-am am--refresh check check-am clean clean-generic \
754 ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
755 dist-hook dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
756 dist-zip distcheck distclean distclean-generic distclean-hdr \
757 distclean-tags distcleancheck distdir distuninstallcheck dvi \
758 dvi-am html html-am info info-am install install-am \
759 install-data install-data-am install-dvi install-dvi-am \
760 install-exec install-exec-am install-html install-html-am \
761 install-info install-info-am install-man install-pdf \
762 install-pdf-am install-ps install-ps-am install-strip \
763 installcheck installcheck-am installdirs installdirs-am \
764 maintainer-clean maintainer-clean-generic mostlyclean \
765 mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
766 uninstall uninstall-am
767
768
769 perform-memcheck: $(TEST_PROGS) $(TEST_SUPPRESSIONS)
770 @make -C $(top_builddir)/build all
771 @for test in $(TEST_PROGS); do \
772 G_SLICE=always-malloc libtool --mode=execute \
773 valgrind --trace-children=no --gen-suppressions=all \
774 --suppressions=$(TEST_SUPPRESSIONS) \
775 --leak-check=full --show-reachable=yes --num-callers=16 \
776 --quiet --error-exitcode=33 \
777 $(builddir)/$$test; \
778 done
779
780 @WITH_COVERAGE_TRUE@coverage:
781 @WITH_COVERAGE_TRUE@ mkdir -p $(top_builddir)/build/coverage
782 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
783 @WITH_COVERAGE_TRUE@ $(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
784 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
785 @WITH_COVERAGE_TRUE@ @echo "file://$(abs_top_builddir)/build/coverage/index.html"
786
787 @WITH_COVERAGE_TRUE@clear-coverage:
788 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
789
790 dist-hook:
791 @if test -d "$(srcdir)/.git"; \
792 then \
793 echo Creating ChangeLog && \
794 ( cd "$(top_srcdir)" && \
795 echo '# Generate automatically. Do not edit.'; echo; \
796 $(top_srcdir)/missing --run git log --stat --date=short ) > ChangeLog.tmp \
797 && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
798 || ( rm -f ChangeLog.tmp ; \
799 echo Failed to generate ChangeLog >&2 ); \
800 else \
801 echo A git clone is required to generate a ChangeLog >&2; \
802 fi
803
804 check-memory:
805 @for subdir in $(SUBDIRS); do \
806 test -d $(builddir)/$$subdir/tests && \
807 make -C $(builddir)/$$subdir/tests check-memory; \
808 done
809
810 # Tell versions [3.59,3.63) of GNU make to not export all variables.
811 # Otherwise a system limit (for SysV at least) may be exceeded.
812 .NOEXPORT:
0 0.1
1 * Initial release
0 DBus service for configuring kerberos and other online identities.
0 # generated automatically by aclocal 1.11.3 -*- Autoconf -*-
1
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
4 # Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17 [m4_warning([this file was generated for autoconf 2.68.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
23 # Foundation, Inc.
24 #
25 # This file is free software; the Free Software Foundation
26 # gives unlimited permission to copy and/or distribute it,
27 # with or without modifications, as long as this notice is preserved.
28
29 # serial 1
30
31 # AM_AUTOMAKE_VERSION(VERSION)
32 # ----------------------------
33 # Automake X.Y traces this macro to ensure aclocal.m4 has been
34 # generated from the m4 files accompanying Automake X.Y.
35 # (This private macro should not be called outside this file.)
36 AC_DEFUN([AM_AUTOMAKE_VERSION],
37 [am__api_version='1.11'
38 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
39 dnl require some minimum version. Point them to the right macro.
40 m4_if([$1], [1.11.3], [],
41 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
42 ])
43
44 # _AM_AUTOCONF_VERSION(VERSION)
45 # -----------------------------
46 # aclocal traces this macro to find the Autoconf version.
47 # This is a private macro too. Using m4_define simplifies
48 # the logic in aclocal, which can simply ignore this definition.
49 m4_define([_AM_AUTOCONF_VERSION], [])
50
51 # AM_SET_CURRENT_AUTOMAKE_VERSION
52 # -------------------------------
53 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
54 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
55 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
56 [AM_AUTOMAKE_VERSION([1.11.3])dnl
57 m4_ifndef([AC_AUTOCONF_VERSION],
58 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
59 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
60
61 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
62
63 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
64 #
65 # This file is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
67 # with or without modifications, as long as this notice is preserved.
68
69 # serial 1
70
71 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
72 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
73 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
74 #
75 # Of course, Automake must honor this variable whenever it calls a
76 # tool from the auxiliary directory. The problem is that $srcdir (and
77 # therefore $ac_aux_dir as well) can be either absolute or relative,
78 # depending on how configure is run. This is pretty annoying, since
79 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
80 # source directory, any form will work fine, but in subdirectories a
81 # relative path needs to be adjusted first.
82 #
83 # $ac_aux_dir/missing
84 # fails when called from a subdirectory if $ac_aux_dir is relative
85 # $top_srcdir/$ac_aux_dir/missing
86 # fails if $ac_aux_dir is absolute,
87 # fails when called from a subdirectory in a VPATH build with
88 # a relative $ac_aux_dir
89 #
90 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
91 # are both prefixed by $srcdir. In an in-source build this is usually
92 # harmless because $srcdir is `.', but things will broke when you
93 # start a VPATH build or use an absolute $srcdir.
94 #
95 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
96 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
97 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
98 # and then we would define $MISSING as
99 # MISSING="\${SHELL} $am_aux_dir/missing"
100 # This will work as long as MISSING is not called from configure, because
101 # unfortunately $(top_srcdir) has no meaning in configure.
102 # However there are other variables, like CC, which are often used in
103 # configure, and could therefore not use this "fixed" $ac_aux_dir.
104 #
105 # Another solution, used here, is to always expand $ac_aux_dir to an
106 # absolute PATH. The drawback is that using absolute paths prevent a
107 # configured tree to be moved without reconfiguration.
108
109 AC_DEFUN([AM_AUX_DIR_EXPAND],
110 [dnl Rely on autoconf to set up CDPATH properly.
111 AC_PREREQ([2.50])dnl
112 # expand $ac_aux_dir to an absolute path
113 am_aux_dir=`cd $ac_aux_dir && pwd`
114 ])
115
116 # AM_CONDITIONAL -*- Autoconf -*-
117
118 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
119 # Free Software Foundation, Inc.
120 #
121 # This file is free software; the Free Software Foundation
122 # gives unlimited permission to copy and/or distribute it,
123 # with or without modifications, as long as this notice is preserved.
124
125 # serial 9
126
127 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
128 # -------------------------------------
129 # Define a conditional.
130 AC_DEFUN([AM_CONDITIONAL],
131 [AC_PREREQ(2.52)dnl
132 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
133 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
134 AC_SUBST([$1_TRUE])dnl
135 AC_SUBST([$1_FALSE])dnl
136 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
137 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
138 m4_define([_AM_COND_VALUE_$1], [$2])dnl
139 if $2; then
140 $1_TRUE=
141 $1_FALSE='#'
142 else
143 $1_TRUE='#'
144 $1_FALSE=
145 fi
146 AC_CONFIG_COMMANDS_PRE(
147 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
148 AC_MSG_ERROR([[conditional "$1" was never defined.
149 Usually this means the macro was only invoked conditionally.]])
150 fi])])
151
152 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
153 # 2010, 2011 Free Software Foundation, Inc.
154 #
155 # This file is free software; the Free Software Foundation
156 # gives unlimited permission to copy and/or distribute it,
157 # with or without modifications, as long as this notice is preserved.
158
159 # serial 12
160
161 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
162 # written in clear, in which case automake, when reading aclocal.m4,
163 # will think it sees a *use*, and therefore will trigger all it's
164 # C support machinery. Also note that it means that autoscan, seeing
165 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
166
167
168 # _AM_DEPENDENCIES(NAME)
169 # ----------------------
170 # See how the compiler implements dependency checking.
171 # NAME is "CC", "CXX", "GCJ", or "OBJC".
172 # We try a few techniques and use that to set a single cache variable.
173 #
174 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
175 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
176 # dependency, and given that the user is not expected to run this macro,
177 # just rely on AC_PROG_CC.
178 AC_DEFUN([_AM_DEPENDENCIES],
179 [AC_REQUIRE([AM_SET_DEPDIR])dnl
180 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
181 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
182 AC_REQUIRE([AM_DEP_TRACK])dnl
183
184 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
185 [$1], CXX, [depcc="$CXX" am_compiler_list=],
186 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
187 [$1], UPC, [depcc="$UPC" am_compiler_list=],
188 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
189 [depcc="$$1" am_compiler_list=])
190
191 AC_CACHE_CHECK([dependency style of $depcc],
192 [am_cv_$1_dependencies_compiler_type],
193 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
194 # We make a subdir and do the tests there. Otherwise we can end up
195 # making bogus files that we don't know about and never remove. For
196 # instance it was reported that on HP-UX the gcc test will end up
197 # making a dummy file named `D' -- because `-MD' means `put the output
198 # in D'.
199 rm -rf conftest.dir
200 mkdir conftest.dir
201 # Copy depcomp to subdir because otherwise we won't find it if we're
202 # using a relative directory.
203 cp "$am_depcomp" conftest.dir
204 cd conftest.dir
205 # We will build objects and dependencies in a subdirectory because
206 # it helps to detect inapplicable dependency modes. For instance
207 # both Tru64's cc and ICC support -MD to output dependencies as a
208 # side effect of compilation, but ICC will put the dependencies in
209 # the current directory while Tru64 will put them in the object
210 # directory.
211 mkdir sub
212
213 am_cv_$1_dependencies_compiler_type=none
214 if test "$am_compiler_list" = ""; then
215 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
216 fi
217 am__universal=false
218 m4_case([$1], [CC],
219 [case " $depcc " in #(
220 *\ -arch\ *\ -arch\ *) am__universal=true ;;
221 esac],
222 [CXX],
223 [case " $depcc " in #(
224 *\ -arch\ *\ -arch\ *) am__universal=true ;;
225 esac])
226
227 for depmode in $am_compiler_list; do
228 # Setup a source with many dependencies, because some compilers
229 # like to wrap large dependency lists on column 80 (with \), and
230 # we should not choose a depcomp mode which is confused by this.
231 #
232 # We need to recreate these files for each test, as the compiler may
233 # overwrite some of them when testing with obscure command lines.
234 # This happens at least with the AIX C compiler.
235 : > sub/conftest.c
236 for i in 1 2 3 4 5 6; do
237 echo '#include "conftst'$i'.h"' >> sub/conftest.c
238 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
239 # Solaris 8's {/usr,}/bin/sh.
240 touch sub/conftst$i.h
241 done
242 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
243
244 # We check with `-c' and `-o' for the sake of the "dashmstdout"
245 # mode. It turns out that the SunPro C++ compiler does not properly
246 # handle `-M -o', and we need to detect this. Also, some Intel
247 # versions had trouble with output in subdirs
248 am__obj=sub/conftest.${OBJEXT-o}
249 am__minus_obj="-o $am__obj"
250 case $depmode in
251 gcc)
252 # This depmode causes a compiler race in universal mode.
253 test "$am__universal" = false || continue
254 ;;
255 nosideeffect)
256 # after this tag, mechanisms are not by side-effect, so they'll
257 # only be used when explicitly requested
258 if test "x$enable_dependency_tracking" = xyes; then
259 continue
260 else
261 break
262 fi
263 ;;
264 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
265 # This compiler won't grok `-c -o', but also, the minuso test has
266 # not run yet. These depmodes are late enough in the game, and
267 # so weak that their functioning should not be impacted.
268 am__obj=conftest.${OBJEXT-o}
269 am__minus_obj=
270 ;;
271 none) break ;;
272 esac
273 if depmode=$depmode \
274 source=sub/conftest.c object=$am__obj \
275 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
276 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
277 >/dev/null 2>conftest.err &&
278 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
279 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
280 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
281 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
282 # icc doesn't choke on unknown options, it will just issue warnings
283 # or remarks (even with -Werror). So we grep stderr for any message
284 # that says an option was ignored or not supported.
285 # When given -MP, icc 7.0 and 7.1 complain thusly:
286 # icc: Command line warning: ignoring option '-M'; no argument required
287 # The diagnosis changed in icc 8.0:
288 # icc: Command line remark: option '-MP' not supported
289 if (grep 'ignoring option' conftest.err ||
290 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
291 am_cv_$1_dependencies_compiler_type=$depmode
292 break
293 fi
294 fi
295 done
296
297 cd ..
298 rm -rf conftest.dir
299 else
300 am_cv_$1_dependencies_compiler_type=none
301 fi
302 ])
303 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
304 AM_CONDITIONAL([am__fastdep$1], [
305 test "x$enable_dependency_tracking" != xno \
306 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
307 ])
308
309
310 # AM_SET_DEPDIR
311 # -------------
312 # Choose a directory name for dependency files.
313 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
314 AC_DEFUN([AM_SET_DEPDIR],
315 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
316 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
317 ])
318
319
320 # AM_DEP_TRACK
321 # ------------
322 AC_DEFUN([AM_DEP_TRACK],
323 [AC_ARG_ENABLE(dependency-tracking,
324 [ --disable-dependency-tracking speeds up one-time build
325 --enable-dependency-tracking do not reject slow dependency extractors])
326 if test "x$enable_dependency_tracking" != xno; then
327 am_depcomp="$ac_aux_dir/depcomp"
328 AMDEPBACKSLASH='\'
329 am__nodep='_no'
330 fi
331 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
332 AC_SUBST([AMDEPBACKSLASH])dnl
333 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
334 AC_SUBST([am__nodep])dnl
335 _AM_SUBST_NOTMAKE([am__nodep])dnl
336 ])
337
338 # Generate code to set up dependency tracking. -*- Autoconf -*-
339
340 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
341 # Free Software Foundation, Inc.
342 #
343 # This file is free software; the Free Software Foundation
344 # gives unlimited permission to copy and/or distribute it,
345 # with or without modifications, as long as this notice is preserved.
346
347 #serial 5
348
349 # _AM_OUTPUT_DEPENDENCY_COMMANDS
350 # ------------------------------
351 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
352 [{
353 # Autoconf 2.62 quotes --file arguments for eval, but not when files
354 # are listed without --file. Let's play safe and only enable the eval
355 # if we detect the quoting.
356 case $CONFIG_FILES in
357 *\'*) eval set x "$CONFIG_FILES" ;;
358 *) set x $CONFIG_FILES ;;
359 esac
360 shift
361 for mf
362 do
363 # Strip MF so we end up with the name of the file.
364 mf=`echo "$mf" | sed -e 's/:.*$//'`
365 # Check whether this is an Automake generated Makefile or not.
366 # We used to match only the files named `Makefile.in', but
367 # some people rename them; so instead we look at the file content.
368 # Grep'ing the first line is not enough: some people post-process
369 # each Makefile.in and add a new line on top of each file to say so.
370 # Grep'ing the whole file is not good either: AIX grep has a line
371 # limit of 2048, but all sed's we know have understand at least 4000.
372 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
373 dirpart=`AS_DIRNAME("$mf")`
374 else
375 continue
376 fi
377 # Extract the definition of DEPDIR, am__include, and am__quote
378 # from the Makefile without running `make'.
379 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
380 test -z "$DEPDIR" && continue
381 am__include=`sed -n 's/^am__include = //p' < "$mf"`
382 test -z "am__include" && continue
383 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
384 # When using ansi2knr, U may be empty or an underscore; expand it
385 U=`sed -n 's/^U = //p' < "$mf"`
386 # Find all dependency output files, they are included files with
387 # $(DEPDIR) in their names. We invoke sed twice because it is the
388 # simplest approach to changing $(DEPDIR) to its actual value in the
389 # expansion.
390 for file in `sed -n "
391 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
392 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
393 # Make sure the directory exists.
394 test -f "$dirpart/$file" && continue
395 fdir=`AS_DIRNAME(["$file"])`
396 AS_MKDIR_P([$dirpart/$fdir])
397 # echo "creating $dirpart/$file"
398 echo '# dummy' > "$dirpart/$file"
399 done
400 done
401 }
402 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
403
404
405 # AM_OUTPUT_DEPENDENCY_COMMANDS
406 # -----------------------------
407 # This macro should only be invoked once -- use via AC_REQUIRE.
408 #
409 # This code is only required when automatic dependency tracking
410 # is enabled. FIXME. This creates each `.P' file that we will
411 # need in order to bootstrap the dependency handling code.
412 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
413 [AC_CONFIG_COMMANDS([depfiles],
414 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
415 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
416 ])
417
418 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
419 # Free Software Foundation, Inc.
420 #
421 # This file is free software; the Free Software Foundation
422 # gives unlimited permission to copy and/or distribute it,
423 # with or without modifications, as long as this notice is preserved.
424
425 # serial 8
426
427 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
428 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
429
430 # Do all the work for Automake. -*- Autoconf -*-
431
432 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
433 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
434 #
435 # This file is free software; the Free Software Foundation
436 # gives unlimited permission to copy and/or distribute it,
437 # with or without modifications, as long as this notice is preserved.
438
439 # serial 16
440
441 # This macro actually does too much. Some checks are only needed if
442 # your package does certain things. But this isn't really a big deal.
443
444 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
445 # AM_INIT_AUTOMAKE([OPTIONS])
446 # -----------------------------------------------
447 # The call with PACKAGE and VERSION arguments is the old style
448 # call (pre autoconf-2.50), which is being phased out. PACKAGE
449 # and VERSION should now be passed to AC_INIT and removed from
450 # the call to AM_INIT_AUTOMAKE.
451 # We support both call styles for the transition. After
452 # the next Automake release, Autoconf can make the AC_INIT
453 # arguments mandatory, and then we can depend on a new Autoconf
454 # release and drop the old call support.
455 AC_DEFUN([AM_INIT_AUTOMAKE],
456 [AC_PREREQ([2.62])dnl
457 dnl Autoconf wants to disallow AM_ names. We explicitly allow
458 dnl the ones we care about.
459 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
460 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
461 AC_REQUIRE([AC_PROG_INSTALL])dnl
462 if test "`cd $srcdir && pwd`" != "`pwd`"; then
463 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
464 # is not polluted with repeated "-I."
465 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
466 # test to see if srcdir already configured
467 if test -f $srcdir/config.status; then
468 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
469 fi
470 fi
471
472 # test whether we have cygpath
473 if test -z "$CYGPATH_W"; then
474 if (cygpath --version) >/dev/null 2>/dev/null; then
475 CYGPATH_W='cygpath -w'
476 else
477 CYGPATH_W=echo
478 fi
479 fi
480 AC_SUBST([CYGPATH_W])
481
482 # Define the identity of the package.
483 dnl Distinguish between old-style and new-style calls.
484 m4_ifval([$2],
485 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
486 AC_SUBST([PACKAGE], [$1])dnl
487 AC_SUBST([VERSION], [$2])],
488 [_AM_SET_OPTIONS([$1])dnl
489 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
490 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
491 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
492 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
493 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
494
495 _AM_IF_OPTION([no-define],,
496 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
497 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
498
499 # Some tools Automake needs.
500 AC_REQUIRE([AM_SANITY_CHECK])dnl
501 AC_REQUIRE([AC_ARG_PROGRAM])dnl
502 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
503 AM_MISSING_PROG(AUTOCONF, autoconf)
504 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
505 AM_MISSING_PROG(AUTOHEADER, autoheader)
506 AM_MISSING_PROG(MAKEINFO, makeinfo)
507 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
508 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
509 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
510 # We need awk for the "check" target. The system "awk" is bad on
511 # some platforms.
512 AC_REQUIRE([AC_PROG_AWK])dnl
513 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
514 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
515 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
516 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
517 [_AM_PROG_TAR([v7])])])
518 _AM_IF_OPTION([no-dependencies],,
519 [AC_PROVIDE_IFELSE([AC_PROG_CC],
520 [_AM_DEPENDENCIES(CC)],
521 [define([AC_PROG_CC],
522 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
523 AC_PROVIDE_IFELSE([AC_PROG_CXX],
524 [_AM_DEPENDENCIES(CXX)],
525 [define([AC_PROG_CXX],
526 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
527 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
528 [_AM_DEPENDENCIES(OBJC)],
529 [define([AC_PROG_OBJC],
530 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
531 ])
532 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
533 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
534 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
535 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
536 AC_CONFIG_COMMANDS_PRE(dnl
537 [m4_provide_if([_AM_COMPILER_EXEEXT],
538 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
539 ])
540
541 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
542 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
543 dnl mangled by Autoconf and run in a shell conditional statement.
544 m4_define([_AC_COMPILER_EXEEXT],
545 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
546
547
548 # When config.status generates a header, we must update the stamp-h file.
549 # This file resides in the same directory as the config header
550 # that is generated. The stamp files are numbered to have different names.
551
552 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
553 # loop where config.status creates the headers, so we can generate
554 # our stamp files there.
555 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
556 [# Compute $1's index in $config_headers.
557 _am_arg=$1
558 _am_stamp_count=1
559 for _am_header in $config_headers :; do
560 case $_am_header in
561 $_am_arg | $_am_arg:* )
562 break ;;
563 * )
564 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
565 esac
566 done
567 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
568
569 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
570 # Inc.
571 #
572 # This file is free software; the Free Software Foundation
573 # gives unlimited permission to copy and/or distribute it,
574 # with or without modifications, as long as this notice is preserved.
575
576 # serial 1
577
578 # AM_PROG_INSTALL_SH
579 # ------------------
580 # Define $install_sh.
581 AC_DEFUN([AM_PROG_INSTALL_SH],
582 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
583 if test x"${install_sh}" != xset; then
584 case $am_aux_dir in
585 *\ * | *\ *)
586 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
587 *)
588 install_sh="\${SHELL} $am_aux_dir/install-sh"
589 esac
590 fi
591 AC_SUBST(install_sh)])
592
593 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
594 #
595 # This file is free software; the Free Software Foundation
596 # gives unlimited permission to copy and/or distribute it,
597 # with or without modifications, as long as this notice is preserved.
598
599 # serial 2
600
601 # Check whether the underlying file-system supports filenames
602 # with a leading dot. For instance MS-DOS doesn't.
603 AC_DEFUN([AM_SET_LEADING_DOT],
604 [rm -rf .tst 2>/dev/null
605 mkdir .tst 2>/dev/null
606 if test -d .tst; then
607 am__leading_dot=.
608 else
609 am__leading_dot=_
610 fi
611 rmdir .tst 2>/dev/null
612 AC_SUBST([am__leading_dot])])
613
614 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
615 # From Jim Meyering
616
617 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
618 # 2011 Free Software Foundation, Inc.
619 #
620 # This file is free software; the Free Software Foundation
621 # gives unlimited permission to copy and/or distribute it,
622 # with or without modifications, as long as this notice is preserved.
623
624 # serial 5
625
626 # AM_MAINTAINER_MODE([DEFAULT-MODE])
627 # ----------------------------------
628 # Control maintainer-specific portions of Makefiles.
629 # Default is to disable them, unless `enable' is passed literally.
630 # For symmetry, `disable' may be passed as well. Anyway, the user
631 # can override the default with the --enable/--disable switch.
632 AC_DEFUN([AM_MAINTAINER_MODE],
633 [m4_case(m4_default([$1], [disable]),
634 [enable], [m4_define([am_maintainer_other], [disable])],
635 [disable], [m4_define([am_maintainer_other], [enable])],
636 [m4_define([am_maintainer_other], [enable])
637 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
638 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
639 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
640 AC_ARG_ENABLE([maintainer-mode],
641 [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
642 (and sometimes confusing) to the casual installer],
643 [USE_MAINTAINER_MODE=$enableval],
644 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
645 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
646 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
647 MAINT=$MAINTAINER_MODE_TRUE
648 AC_SUBST([MAINT])dnl
649 ]
650 )
651
652 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
653
654 # Check to see how 'make' treats includes. -*- Autoconf -*-
655
656 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
657 #
658 # This file is free software; the Free Software Foundation
659 # gives unlimited permission to copy and/or distribute it,
660 # with or without modifications, as long as this notice is preserved.
661
662 # serial 4
663
664 # AM_MAKE_INCLUDE()
665 # -----------------
666 # Check to see how make treats includes.
667 AC_DEFUN([AM_MAKE_INCLUDE],
668 [am_make=${MAKE-make}
669 cat > confinc << 'END'
670 am__doit:
671 @echo this is the am__doit target
672 .PHONY: am__doit
673 END
674 # If we don't find an include directive, just comment out the code.
675 AC_MSG_CHECKING([for style of include used by $am_make])
676 am__include="#"
677 am__quote=
678 _am_result=none
679 # First try GNU make style include.
680 echo "include confinc" > confmf
681 # Ignore all kinds of additional output from `make'.
682 case `$am_make -s -f confmf 2> /dev/null` in #(
683 *the\ am__doit\ target*)
684 am__include=include
685 am__quote=
686 _am_result=GNU
687 ;;
688 esac
689 # Now try BSD make style include.
690 if test "$am__include" = "#"; then
691 echo '.include "confinc"' > confmf
692 case `$am_make -s -f confmf 2> /dev/null` in #(
693 *the\ am__doit\ target*)
694 am__include=.include
695 am__quote="\""
696 _am_result=BSD
697 ;;
698 esac
699 fi
700 AC_SUBST([am__include])
701 AC_SUBST([am__quote])
702 AC_MSG_RESULT([$_am_result])
703 rm -f confinc confmf
704 ])
705
706 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
707 # Free Software Foundation, Inc.
708 #
709 # This file is free software; the Free Software Foundation
710 # gives unlimited permission to copy and/or distribute it,
711 # with or without modifications, as long as this notice is preserved.
712
713 # serial 6
714
715 # AM_PROG_CC_C_O
716 # --------------
717 # Like AC_PROG_CC_C_O, but changed for automake.
718 AC_DEFUN([AM_PROG_CC_C_O],
719 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
720 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
721 AC_REQUIRE_AUX_FILE([compile])dnl
722 # FIXME: we rely on the cache variable name because
723 # there is no other way.
724 set dummy $CC
725 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
726 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
727 if test "$am_t" != yes; then
728 # Losing compiler, so override with the script.
729 # FIXME: It is wrong to rewrite CC.
730 # But if we don't then we get into trouble of one sort or another.
731 # A longer-term fix would be to have automake use am__CC in this case,
732 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
733 CC="$am_aux_dir/compile $CC"
734 fi
735 dnl Make sure AC_PROG_CC is never called again, or it will override our
736 dnl setting of CC.
737 m4_define([AC_PROG_CC],
738 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
739 ])
740
741 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
742
743 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
744 # Free Software Foundation, Inc.
745 #
746 # This file is free software; the Free Software Foundation
747 # gives unlimited permission to copy and/or distribute it,
748 # with or without modifications, as long as this notice is preserved.
749
750 # serial 6
751
752 # AM_MISSING_PROG(NAME, PROGRAM)
753 # ------------------------------
754 AC_DEFUN([AM_MISSING_PROG],
755 [AC_REQUIRE([AM_MISSING_HAS_RUN])
756 $1=${$1-"${am_missing_run}$2"}
757 AC_SUBST($1)])
758
759
760 # AM_MISSING_HAS_RUN
761 # ------------------
762 # Define MISSING if not defined so far and test if it supports --run.
763 # If it does, set am_missing_run to use it, otherwise, to nothing.
764 AC_DEFUN([AM_MISSING_HAS_RUN],
765 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
766 AC_REQUIRE_AUX_FILE([missing])dnl
767 if test x"${MISSING+set}" != xset; then
768 case $am_aux_dir in
769 *\ * | *\ *)
770 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
771 *)
772 MISSING="\${SHELL} $am_aux_dir/missing" ;;
773 esac
774 fi
775 # Use eval to expand $SHELL
776 if eval "$MISSING --run true"; then
777 am_missing_run="$MISSING --run "
778 else
779 am_missing_run=
780 AC_MSG_WARN([`missing' script is too old or missing])
781 fi
782 ])
783
784 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
785 # Inc.
786 #
787 # This file is free software; the Free Software Foundation
788 # gives unlimited permission to copy and/or distribute it,
789 # with or without modifications, as long as this notice is preserved.
790
791 # serial 1
792
793 # AM_PROG_MKDIR_P
794 # ---------------
795 # Check for `mkdir -p'.
796 AC_DEFUN([AM_PROG_MKDIR_P],
797 [AC_PREREQ([2.60])dnl
798 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
799 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
800 dnl while keeping a definition of mkdir_p for backward compatibility.
801 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
802 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
803 dnl Makefile.ins that do not define MKDIR_P, so we do our own
804 dnl adjustment using top_builddir (which is defined more often than
805 dnl MKDIR_P).
806 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
807 case $mkdir_p in
808 [[\\/$]]* | ?:[[\\/]]*) ;;
809 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
810 esac
811 ])
812
813 # Helper functions for option handling. -*- Autoconf -*-
814
815 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
816 # Foundation, Inc.
817 #
818 # This file is free software; the Free Software Foundation
819 # gives unlimited permission to copy and/or distribute it,
820 # with or without modifications, as long as this notice is preserved.
821
822 # serial 5
823
824 # _AM_MANGLE_OPTION(NAME)
825 # -----------------------
826 AC_DEFUN([_AM_MANGLE_OPTION],
827 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
828
829 # _AM_SET_OPTION(NAME)
830 # --------------------
831 # Set option NAME. Presently that only means defining a flag for this option.
832 AC_DEFUN([_AM_SET_OPTION],
833 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
834
835 # _AM_SET_OPTIONS(OPTIONS)
836 # ------------------------
837 # OPTIONS is a space-separated list of Automake options.
838 AC_DEFUN([_AM_SET_OPTIONS],
839 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
840
841 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
842 # -------------------------------------------
843 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
844 AC_DEFUN([_AM_IF_OPTION],
845 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
846
847 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
848 #
849 # This file is free software; the Free Software Foundation
850 # gives unlimited permission to copy and/or distribute it,
851 # with or without modifications, as long as this notice is preserved.
852
853 # serial 1
854
855 # AM_RUN_LOG(COMMAND)
856 # -------------------
857 # Run COMMAND, save the exit status in ac_status, and log it.
858 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
859 AC_DEFUN([AM_RUN_LOG],
860 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
861 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
862 ac_status=$?
863 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
864 (exit $ac_status); }])
865
866 # Check to make sure that the build environment is sane. -*- Autoconf -*-
867
868 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
869 # Free Software Foundation, Inc.
870 #
871 # This file is free software; the Free Software Foundation
872 # gives unlimited permission to copy and/or distribute it,
873 # with or without modifications, as long as this notice is preserved.
874
875 # serial 5
876
877 # AM_SANITY_CHECK
878 # ---------------
879 AC_DEFUN([AM_SANITY_CHECK],
880 [AC_MSG_CHECKING([whether build environment is sane])
881 # Just in case
882 sleep 1
883 echo timestamp > conftest.file
884 # Reject unsafe characters in $srcdir or the absolute working directory
885 # name. Accept space and tab only in the latter.
886 am_lf='
887 '
888 case `pwd` in
889 *[[\\\"\#\$\&\'\`$am_lf]]*)
890 AC_MSG_ERROR([unsafe absolute working directory name]);;
891 esac
892 case $srcdir in
893 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
894 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
895 esac
896
897 # Do `set' in a subshell so we don't clobber the current shell's
898 # arguments. Must try -L first in case configure is actually a
899 # symlink; some systems play weird games with the mod time of symlinks
900 # (eg FreeBSD returns the mod time of the symlink's containing
901 # directory).
902 if (
903 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
904 if test "$[*]" = "X"; then
905 # -L didn't work.
906 set X `ls -t "$srcdir/configure" conftest.file`
907 fi
908 rm -f conftest.file
909 if test "$[*]" != "X $srcdir/configure conftest.file" \
910 && test "$[*]" != "X conftest.file $srcdir/configure"; then
911
912 # If neither matched, then we have a broken ls. This can happen
913 # if, for instance, CONFIG_SHELL is bash and it inherits a
914 # broken ls alias from the environment. This has actually
915 # happened. Such a system could not be considered "sane".
916 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
917 alias in your environment])
918 fi
919
920 test "$[2]" = conftest.file
921 )
922 then
923 # Ok.
924 :
925 else
926 AC_MSG_ERROR([newly created file is older than distributed files!
927 Check your system clock])
928 fi
929 AC_MSG_RESULT(yes)])
930
931 # Copyright (C) 2009, 2011 Free Software Foundation, Inc.
932 #
933 # This file is free software; the Free Software Foundation
934 # gives unlimited permission to copy and/or distribute it,
935 # with or without modifications, as long as this notice is preserved.
936
937 # serial 2
938
939 # AM_SILENT_RULES([DEFAULT])
940 # --------------------------
941 # Enable less verbose build rules; with the default set to DEFAULT
942 # (`yes' being less verbose, `no' or empty being verbose).
943 AC_DEFUN([AM_SILENT_RULES],
944 [AC_ARG_ENABLE([silent-rules],
945 [ --enable-silent-rules less verbose build output (undo: `make V=1')
946 --disable-silent-rules verbose build output (undo: `make V=0')])
947 case $enable_silent_rules in
948 yes) AM_DEFAULT_VERBOSITY=0;;
949 no) AM_DEFAULT_VERBOSITY=1;;
950 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
951 esac
952 dnl
953 dnl A few `make' implementations (e.g., NonStop OS and NextStep)
954 dnl do not support nested variable expansions.
955 dnl See automake bug#9928 and bug#10237.
956 am_make=${MAKE-make}
957 AC_CACHE_CHECK([whether $am_make supports nested variables],
958 [am_cv_make_support_nested_variables],
959 [if AS_ECHO([['TRUE=$(BAR$(V))
960 BAR0=false
961 BAR1=true
962 V=1
963 am__doit:
964 @$(TRUE)
965 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
966 am_cv_make_support_nested_variables=yes
967 else
968 am_cv_make_support_nested_variables=no
969 fi])
970 if test $am_cv_make_support_nested_variables = yes; then
971 dnl Using `$V' instead of `$(V)' breaks IRIX make.
972 AM_V='$(V)'
973 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
974 else
975 AM_V=$AM_DEFAULT_VERBOSITY
976 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
977 fi
978 AC_SUBST([AM_V])dnl
979 AM_SUBST_NOTMAKE([AM_V])dnl
980 AC_SUBST([AM_DEFAULT_V])dnl
981 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
982 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
983 AM_BACKSLASH='\'
984 AC_SUBST([AM_BACKSLASH])dnl
985 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
986 ])
987
988 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
989 #
990 # This file is free software; the Free Software Foundation
991 # gives unlimited permission to copy and/or distribute it,
992 # with or without modifications, as long as this notice is preserved.
993
994 # serial 1
995
996 # AM_PROG_INSTALL_STRIP
997 # ---------------------
998 # One issue with vendor `install' (even GNU) is that you can't
999 # specify the program used to strip binaries. This is especially
1000 # annoying in cross-compiling environments, where the build's strip
1001 # is unlikely to handle the host's binaries.
1002 # Fortunately install-sh will honor a STRIPPROG variable, so we
1003 # always use install-sh in `make install-strip', and initialize
1004 # STRIPPROG with the value of the STRIP variable (set by the user).
1005 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1006 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1007 # Installed binaries are usually stripped using `strip' when the user
1008 # run `make install-strip'. However `strip' might not be the right
1009 # tool to use in cross-compilation environments, therefore Automake
1010 # will honor the `STRIP' environment variable to overrule this program.
1011 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1012 if test "$cross_compiling" != no; then
1013 AC_CHECK_TOOL([STRIP], [strip], :)
1014 fi
1015 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1016 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1017
1018 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
1019 #
1020 # This file is free software; the Free Software Foundation
1021 # gives unlimited permission to copy and/or distribute it,
1022 # with or without modifications, as long as this notice is preserved.
1023
1024 # serial 3
1025
1026 # _AM_SUBST_NOTMAKE(VARIABLE)
1027 # ---------------------------
1028 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1029 # This macro is traced by Automake.
1030 AC_DEFUN([_AM_SUBST_NOTMAKE])
1031
1032 # AM_SUBST_NOTMAKE(VARIABLE)
1033 # --------------------------
1034 # Public sister of _AM_SUBST_NOTMAKE.
1035 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1036
1037 # Check how to create a tarball. -*- Autoconf -*-
1038
1039 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
1040 #
1041 # This file is free software; the Free Software Foundation
1042 # gives unlimited permission to copy and/or distribute it,
1043 # with or without modifications, as long as this notice is preserved.
1044
1045 # serial 2
1046
1047 # _AM_PROG_TAR(FORMAT)
1048 # --------------------
1049 # Check how to create a tarball in format FORMAT.
1050 # FORMAT should be one of `v7', `ustar', or `pax'.
1051 #
1052 # Substitute a variable $(am__tar) that is a command
1053 # writing to stdout a FORMAT-tarball containing the directory
1054 # $tardir.
1055 # tardir=directory && $(am__tar) > result.tar
1056 #
1057 # Substitute a variable $(am__untar) that extract such
1058 # a tarball read from stdin.
1059 # $(am__untar) < result.tar
1060 AC_DEFUN([_AM_PROG_TAR],
1061 [# Always define AMTAR for backward compatibility. Yes, it's still used
1062 # in the wild :-( We should find a proper way to deprecate it ...
1063 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1064 m4_if([$1], [v7],
1065 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1066 [m4_case([$1], [ustar],, [pax],,
1067 [m4_fatal([Unknown tar format])])
1068 AC_MSG_CHECKING([how to create a $1 tar archive])
1069 # Loop over all known methods to create a tar archive until one works.
1070 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1071 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1072 # Do not fold the above two line into one, because Tru64 sh and
1073 # Solaris sh will not grok spaces in the rhs of `-'.
1074 for _am_tool in $_am_tools
1075 do
1076 case $_am_tool in
1077 gnutar)
1078 for _am_tar in tar gnutar gtar;
1079 do
1080 AM_RUN_LOG([$_am_tar --version]) && break
1081 done
1082 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1083 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1084 am__untar="$_am_tar -xf -"
1085 ;;
1086 plaintar)
1087 # Must skip GNU tar: if it does not support --format= it doesn't create
1088 # ustar tarball either.
1089 (tar --version) >/dev/null 2>&1 && continue
1090 am__tar='tar chf - "$$tardir"'
1091 am__tar_='tar chf - "$tardir"'
1092 am__untar='tar xf -'
1093 ;;
1094 pax)
1095 am__tar='pax -L -x $1 -w "$$tardir"'
1096 am__tar_='pax -L -x $1 -w "$tardir"'
1097 am__untar='pax -r'
1098 ;;
1099 cpio)
1100 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1101 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1102 am__untar='cpio -i -H $1 -d'
1103 ;;
1104 none)
1105 am__tar=false
1106 am__tar_=false
1107 am__untar=false
1108 ;;
1109 esac
1110
1111 # If the value was cached, stop now. We just wanted to have am__tar
1112 # and am__untar set.
1113 test -n "${am_cv_prog_tar_$1}" && break
1114
1115 # tar/untar a dummy directory, and stop if the command works
1116 rm -rf conftest.dir
1117 mkdir conftest.dir
1118 echo GrepMe > conftest.dir/file
1119 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1120 rm -rf conftest.dir
1121 if test -s conftest.tar; then
1122 AM_RUN_LOG([$am__untar <conftest.tar])
1123 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1124 fi
1125 done
1126 rm -rf conftest.dir
1127
1128 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1129 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1130 AC_SUBST([am__tar])
1131 AC_SUBST([am__untar])
1132 ]) # _AM_PROG_TAR
1133
1134 # nls.m4 serial 5 (gettext-0.18)
1135 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1136 dnl Inc.
1137 dnl This file is free software; the Free Software Foundation
1138 dnl gives unlimited permission to copy and/or distribute it,
1139 dnl with or without modifications, as long as this notice is preserved.
1140 dnl
1141 dnl This file can can be used in projects which are not available under
1142 dnl the GNU General Public License or the GNU Library General Public
1143 dnl License but which still want to provide support for the GNU gettext
1144 dnl functionality.
1145 dnl Please note that the actual code of the GNU gettext library is covered
1146 dnl by the GNU Library General Public License, and the rest of the GNU
1147 dnl gettext package package is covered by the GNU General Public License.
1148 dnl They are *not* in the public domain.
1149
1150 dnl Authors:
1151 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1152 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1153
1154 AC_PREREQ([2.50])
1155
1156 AC_DEFUN([AM_NLS],
1157 [
1158 AC_MSG_CHECKING([whether NLS is requested])
1159 dnl Default is enabled NLS
1160 AC_ARG_ENABLE([nls],
1161 [ --disable-nls do not use Native Language Support],
1162 USE_NLS=$enableval, USE_NLS=yes)
1163 AC_MSG_RESULT([$USE_NLS])
1164 AC_SUBST([USE_NLS])
1165 ])
1166
1167 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
1168 # serial 1 (pkg-config-0.24)
1169 #
1170 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1171 #
1172 # This program is free software; you can redistribute it and/or modify
1173 # it under the terms of the GNU General Public License as published by
1174 # the Free Software Foundation; either version 2 of the License, or
1175 # (at your option) any later version.
1176 #
1177 # This program is distributed in the hope that it will be useful, but
1178 # WITHOUT ANY WARRANTY; without even the implied warranty of
1179 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1180 # General Public License for more details.
1181 #
1182 # You should have received a copy of the GNU General Public License
1183 # along with this program; if not, write to the Free Software
1184 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1185 #
1186 # As a special exception to the GNU General Public License, if you
1187 # distribute this file as part of a program that contains a
1188 # configuration script generated by Autoconf, you may include it under
1189 # the same distribution terms that you use for the rest of that program.
1190
1191 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
1192 # ----------------------------------
1193 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1194 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1195 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1196 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1197 AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1198 AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1199
1200 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1201 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1202 fi
1203 if test -n "$PKG_CONFIG"; then
1204 _pkg_min_version=m4_default([$1], [0.9.0])
1205 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1206 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1207 AC_MSG_RESULT([yes])
1208 else
1209 AC_MSG_RESULT([no])
1210 PKG_CONFIG=""
1211 fi
1212 fi[]dnl
1213 ])# PKG_PROG_PKG_CONFIG
1214
1215 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1216 #
1217 # Check to see whether a particular set of modules exists. Similar
1218 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
1219 #
1220 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1221 # only at the first occurence in configure.ac, so if the first place
1222 # it's called might be skipped (such as if it is within an "if", you
1223 # have to call PKG_CHECK_EXISTS manually
1224 # --------------------------------------------------------------
1225 AC_DEFUN([PKG_CHECK_EXISTS],
1226 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1227 if test -n "$PKG_CONFIG" && \
1228 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1229 m4_default([$2], [:])
1230 m4_ifvaln([$3], [else
1231 $3])dnl
1232 fi])
1233
1234 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1235 # ---------------------------------------------
1236 m4_define([_PKG_CONFIG],
1237 [if test -n "$$1"; then
1238 pkg_cv_[]$1="$$1"
1239 elif test -n "$PKG_CONFIG"; then
1240 PKG_CHECK_EXISTS([$3],
1241 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1242 [pkg_failed=yes])
1243 else
1244 pkg_failed=untried
1245 fi[]dnl
1246 ])# _PKG_CONFIG
1247
1248 # _PKG_SHORT_ERRORS_SUPPORTED
1249 # -----------------------------
1250 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1251 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1252 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1253 _pkg_short_errors_supported=yes
1254 else
1255 _pkg_short_errors_supported=no
1256 fi[]dnl
1257 ])# _PKG_SHORT_ERRORS_SUPPORTED
1258
1259
1260 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1261 # [ACTION-IF-NOT-FOUND])
1262 #
1263 #
1264 # Note that if there is a possibility the first call to
1265 # PKG_CHECK_MODULES might not happen, you should be sure to include an
1266 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1267 #
1268 #
1269 # --------------------------------------------------------------
1270 AC_DEFUN([PKG_CHECK_MODULES],
1271 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1272 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1273 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1274
1275 pkg_failed=no
1276 AC_MSG_CHECKING([for $1])
1277
1278 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1279 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
1280
1281 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1282 and $1[]_LIBS to avoid the need to call pkg-config.
1283 See the pkg-config man page for more details.])
1284
1285 if test $pkg_failed = yes; then
1286 AC_MSG_RESULT([no])
1287 _PKG_SHORT_ERRORS_SUPPORTED
1288 if test $_pkg_short_errors_supported = yes; then
1289 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1290 else
1291 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1292 fi
1293 # Put the nasty error message in config.log where it belongs
1294 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1295
1296 m4_default([$4], [AC_MSG_ERROR(
1297 [Package requirements ($2) were not met:
1298
1299 $$1_PKG_ERRORS
1300
1301 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1302 installed software in a non-standard prefix.
1303
1304 _PKG_TEXT])
1305 ])
1306 elif test $pkg_failed = untried; then
1307 AC_MSG_RESULT([no])
1308 m4_default([$4], [AC_MSG_FAILURE(
1309 [The pkg-config script could not be found or is too old. Make sure it
1310 is in your PATH or set the PKG_CONFIG environment variable to the full
1311 path to pkg-config.
1312
1313 _PKG_TEXT
1314
1315 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
1316 ])
1317 else
1318 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1319 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1320 AC_MSG_RESULT([yes])
1321 $3
1322 fi[]dnl
1323 ])# PKG_CHECK_MODULES
1324
1325 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
1326 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
1327 #
1328 # This file is free software, distributed under the terms of the GNU
1329 # General Public License. As a special exception to the GNU General
1330 # Public License, this file may be distributed as part of a program
1331 # that contains a configuration script generated by Autoconf, under
1332 # the same distribution terms as the rest of that program.
1333 #
1334 # This file can be copied and used freely without restrictions. It can
1335 # be used in projects which are not available under the GNU Public License
1336 # but which still want to provide support for the GNU gettext functionality.
1337 #
1338 # Macro to add for using GNU gettext.
1339 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
1340 #
1341 # Modified to never use included libintl.
1342 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
1343 #
1344 # Major rework to remove unused code
1345 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
1346 #
1347 # Added better handling of ALL_LINGUAS from GNU gettext version
1348 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
1349 #
1350 # Modified to require ngettext
1351 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
1352 #
1353 # We need this here as well, since someone might use autoconf-2.5x
1354 # to configure GLib then an older version to configure a package
1355 # using AM_GLIB_GNU_GETTEXT
1356 AC_PREREQ(2.53)
1357
1358 dnl
1359 dnl We go to great lengths to make sure that aclocal won't
1360 dnl try to pull in the installed version of these macros
1361 dnl when running aclocal in the glib directory.
1362 dnl
1363 m4_copy([AC_DEFUN],[glib_DEFUN])
1364 m4_copy([AC_REQUIRE],[glib_REQUIRE])
1365 dnl
1366 dnl At the end, if we're not within glib, we'll define the public
1367 dnl definitions in terms of our private definitions.
1368 dnl
1369
1370 # GLIB_LC_MESSAGES
1371 #--------------------
1372 glib_DEFUN([GLIB_LC_MESSAGES],
1373 [AC_CHECK_HEADERS([locale.h])
1374 if test $ac_cv_header_locale_h = yes; then
1375 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1376 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1377 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1378 if test $am_cv_val_LC_MESSAGES = yes; then
1379 AC_DEFINE(HAVE_LC_MESSAGES, 1,
1380 [Define if your <locale.h> file defines LC_MESSAGES.])
1381 fi
1382 fi])
1383
1384 # GLIB_PATH_PROG_WITH_TEST
1385 #----------------------------
1386 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1387 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1388 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
1389 [# Extract the first word of "$2", so it can be a program name with args.
1390 set dummy $2; ac_word=[$]2
1391 AC_MSG_CHECKING([for $ac_word])
1392 AC_CACHE_VAL(ac_cv_path_$1,
1393 [case "[$]$1" in
1394 /*)
1395 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1396 ;;
1397 *)
1398 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1399 for ac_dir in ifelse([$5], , $PATH, [$5]); do
1400 test -z "$ac_dir" && ac_dir=.
1401 if test -f $ac_dir/$ac_word; then
1402 if [$3]; then
1403 ac_cv_path_$1="$ac_dir/$ac_word"
1404 break
1405 fi
1406 fi
1407 done
1408 IFS="$ac_save_ifs"
1409 dnl If no 4th arg is given, leave the cache variable unset,
1410 dnl so AC_PATH_PROGS will keep looking.
1411 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1412 ])dnl
1413 ;;
1414 esac])dnl
1415 $1="$ac_cv_path_$1"
1416 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
1417 AC_MSG_RESULT([$]$1)
1418 else
1419 AC_MSG_RESULT(no)
1420 fi
1421 AC_SUBST($1)dnl
1422 ])
1423
1424 # GLIB_WITH_NLS
1425 #-----------------
1426 glib_DEFUN([GLIB_WITH_NLS],
1427 dnl NLS is obligatory
1428 [USE_NLS=yes
1429 AC_SUBST(USE_NLS)
1430
1431 gt_cv_have_gettext=no
1432
1433 CATOBJEXT=NONE
1434 XGETTEXT=:
1435 INTLLIBS=
1436
1437 AC_CHECK_HEADER(libintl.h,
1438 [gt_cv_func_dgettext_libintl="no"
1439 libintl_extra_libs=""
1440
1441 #
1442 # First check in libc
1443 #
1444 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
1445 [AC_TRY_LINK([
1446 #include <libintl.h>
1447 ],
1448 [return !ngettext ("","", 1)],
1449 gt_cv_func_ngettext_libc=yes,
1450 gt_cv_func_ngettext_libc=no)
1451 ])
1452
1453 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1454 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
1455 [AC_TRY_LINK([
1456 #include <libintl.h>
1457 ],
1458 [return !dgettext ("","")],
1459 gt_cv_func_dgettext_libc=yes,
1460 gt_cv_func_dgettext_libc=no)
1461 ])
1462 fi
1463
1464 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
1465 AC_CHECK_FUNCS(bind_textdomain_codeset)
1466 fi
1467
1468 #
1469 # If we don't have everything we want, check in libintl
1470 #
1471 if test "$gt_cv_func_dgettext_libc" != "yes" \
1472 || test "$gt_cv_func_ngettext_libc" != "yes" \
1473 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
1474
1475 AC_CHECK_LIB(intl, bindtextdomain,
1476 [AC_CHECK_LIB(intl, ngettext,
1477 [AC_CHECK_LIB(intl, dgettext,
1478 gt_cv_func_dgettext_libintl=yes)])])
1479
1480 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
1481 AC_MSG_CHECKING([if -liconv is needed to use gettext])
1482 AC_MSG_RESULT([])
1483 AC_CHECK_LIB(intl, ngettext,
1484 [AC_CHECK_LIB(intl, dcgettext,
1485 [gt_cv_func_dgettext_libintl=yes
1486 libintl_extra_libs=-liconv],
1487 :,-liconv)],
1488 :,-liconv)
1489 fi
1490
1491 #
1492 # If we found libintl, then check in it for bind_textdomain_codeset();
1493 # we'll prefer libc if neither have bind_textdomain_codeset(),
1494 # and both have dgettext and ngettext
1495 #
1496 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
1497 glib_save_LIBS="$LIBS"
1498 LIBS="$LIBS -lintl $libintl_extra_libs"
1499 unset ac_cv_func_bind_textdomain_codeset
1500 AC_CHECK_FUNCS(bind_textdomain_codeset)
1501 LIBS="$glib_save_LIBS"
1502
1503 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
1504 gt_cv_func_dgettext_libc=no
1505 else
1506 if test "$gt_cv_func_dgettext_libc" = "yes" \
1507 && test "$gt_cv_func_ngettext_libc" = "yes"; then
1508 gt_cv_func_dgettext_libintl=no
1509 fi
1510 fi
1511 fi
1512 fi
1513
1514 if test "$gt_cv_func_dgettext_libc" = "yes" \
1515 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
1516 gt_cv_have_gettext=yes
1517 fi
1518
1519 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
1520 INTLLIBS="-lintl $libintl_extra_libs"
1521 fi
1522
1523 if test "$gt_cv_have_gettext" = "yes"; then
1524 AC_DEFINE(HAVE_GETTEXT,1,
1525 [Define if the GNU gettext() function is already present or preinstalled.])
1526 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1527 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
1528 if test "$MSGFMT" != "no"; then
1529 glib_save_LIBS="$LIBS"
1530 LIBS="$LIBS $INTLLIBS"
1531 AC_CHECK_FUNCS(dcgettext)
1532 MSGFMT_OPTS=
1533 AC_MSG_CHECKING([if msgfmt accepts -c])
1534 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
1535 msgid ""
1536 msgstr ""
1537 "Content-Type: text/plain; charset=UTF-8\n"
1538 "Project-Id-Version: test 1.0\n"
1539 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
1540 "Last-Translator: test <foo@bar.xx>\n"
1541 "Language-Team: C <LL@li.org>\n"
1542 "MIME-Version: 1.0\n"
1543 "Content-Transfer-Encoding: 8bit\n"
1544 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
1545 AC_SUBST(MSGFMT_OPTS)
1546 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1547 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1548 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
1549 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
1550 return _nl_msg_cat_cntr],
1551 [CATOBJEXT=.gmo
1552 DATADIRNAME=share],
1553 [case $host in
1554 *-*-solaris*)
1555 dnl On Solaris, if bind_textdomain_codeset is in libc,
1556 dnl GNU format message catalog is always supported,
1557 dnl since both are added to the libc all together.
1558 dnl Hence, we'd like to go with DATADIRNAME=share and
1559 dnl and CATOBJEXT=.gmo in this case.
1560 AC_CHECK_FUNC(bind_textdomain_codeset,
1561 [CATOBJEXT=.gmo
1562 DATADIRNAME=share],
1563 [CATOBJEXT=.mo
1564 DATADIRNAME=lib])
1565 ;;
1566 *-*-openbsd*)
1567 CATOBJEXT=.mo
1568 DATADIRNAME=share
1569 ;;
1570 *)
1571 CATOBJEXT=.mo
1572 DATADIRNAME=lib
1573 ;;
1574 esac])
1575 LIBS="$glib_save_LIBS"
1576 INSTOBJEXT=.mo
1577 else
1578 gt_cv_have_gettext=no
1579 fi
1580 fi
1581 ])
1582
1583 if test "$gt_cv_have_gettext" = "yes" ; then
1584 AC_DEFINE(ENABLE_NLS, 1,
1585 [always defined to indicate that i18n is enabled])
1586 fi
1587
1588 dnl Test whether we really found GNU xgettext.
1589 if test "$XGETTEXT" != ":"; then
1590 dnl If it is not GNU xgettext we define it as : so that the
1591 dnl Makefiles still can work.
1592 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
1593 : ;
1594 else
1595 AC_MSG_RESULT(
1596 [found xgettext program is not GNU xgettext; ignore it])
1597 XGETTEXT=":"
1598 fi
1599 fi
1600
1601 # We need to process the po/ directory.
1602 POSUB=po
1603
1604 AC_OUTPUT_COMMANDS(
1605 [case "$CONFIG_FILES" in *po/Makefile.in*)
1606 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
1607 esac])
1608
1609 dnl These rules are solely for the distribution goal. While doing this
1610 dnl we only have to keep exactly one list of the available catalogs
1611 dnl in configure.ac.
1612 for lang in $ALL_LINGUAS; do
1613 GMOFILES="$GMOFILES $lang.gmo"
1614 POFILES="$POFILES $lang.po"
1615 done
1616
1617 dnl Make all variables we use known to autoconf.
1618 AC_SUBST(CATALOGS)
1619 AC_SUBST(CATOBJEXT)
1620 AC_SUBST(DATADIRNAME)
1621 AC_SUBST(GMOFILES)
1622 AC_SUBST(INSTOBJEXT)
1623 AC_SUBST(INTLLIBS)
1624 AC_SUBST(PO_IN_DATADIR_TRUE)
1625 AC_SUBST(PO_IN_DATADIR_FALSE)
1626 AC_SUBST(POFILES)
1627 AC_SUBST(POSUB)
1628 ])
1629
1630 # AM_GLIB_GNU_GETTEXT
1631 # -------------------
1632 # Do checks necessary for use of gettext. If a suitable implementation
1633 # of gettext is found in either in libintl or in the C library,
1634 # it will set INTLLIBS to the libraries needed for use of gettext
1635 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
1636 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
1637 # on various variables needed by the Makefile.in.in installed by
1638 # glib-gettextize.
1639 dnl
1640 glib_DEFUN([GLIB_GNU_GETTEXT],
1641 [AC_REQUIRE([AC_PROG_CC])dnl
1642 AC_REQUIRE([AC_HEADER_STDC])dnl
1643
1644 GLIB_LC_MESSAGES
1645 GLIB_WITH_NLS
1646
1647 if test "$gt_cv_have_gettext" = "yes"; then
1648 if test "x$ALL_LINGUAS" = "x"; then
1649 LINGUAS=
1650 else
1651 AC_MSG_CHECKING(for catalogs to be installed)
1652 NEW_LINGUAS=
1653 for presentlang in $ALL_LINGUAS; do
1654 useit=no
1655 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
1656 desiredlanguages="$LINGUAS"
1657 else
1658 desiredlanguages="$ALL_LINGUAS"
1659 fi
1660 for desiredlang in $desiredlanguages; do
1661 # Use the presentlang catalog if desiredlang is
1662 # a. equal to presentlang, or
1663 # b. a variant of presentlang (because in this case,
1664 # presentlang can be used as a fallback for messages
1665 # which are not translated in the desiredlang catalog).
1666 case "$desiredlang" in
1667 "$presentlang"*) useit=yes;;
1668 esac
1669 done
1670 if test $useit = yes; then
1671 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
1672 fi
1673 done
1674 LINGUAS=$NEW_LINGUAS
1675 AC_MSG_RESULT($LINGUAS)
1676 fi
1677
1678 dnl Construct list of names of catalog files to be constructed.
1679 if test -n "$LINGUAS"; then
1680 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1681 fi
1682 fi
1683
1684 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
1685 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
1686 dnl Try to locate is.
1687 MKINSTALLDIRS=
1688 if test -n "$ac_aux_dir"; then
1689 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
1690 fi
1691 if test -z "$MKINSTALLDIRS"; then
1692 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
1693 fi
1694 AC_SUBST(MKINSTALLDIRS)
1695
1696 dnl Generate list of files to be processed by xgettext which will
1697 dnl be included in po/Makefile.
1698 test -d po || mkdir po
1699 if test "x$srcdir" != "x."; then
1700 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1701 posrcprefix="$srcdir/"
1702 else
1703 posrcprefix="../$srcdir/"
1704 fi
1705 else
1706 posrcprefix="../"
1707 fi
1708 rm -f po/POTFILES
1709 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1710 < $srcdir/po/POTFILES.in > po/POTFILES
1711 ])
1712
1713 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
1714 # -------------------------------
1715 # Define VARIABLE to the location where catalog files will
1716 # be installed by po/Makefile.
1717 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
1718 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
1719 glib_save_prefix="$prefix"
1720 glib_save_exec_prefix="$exec_prefix"
1721 glib_save_datarootdir="$datarootdir"
1722 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1723 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
1724 datarootdir=`eval echo "${datarootdir}"`
1725 if test "x$CATOBJEXT" = "x.mo" ; then
1726 localedir=`eval echo "${libdir}/locale"`
1727 else
1728 localedir=`eval echo "${datadir}/locale"`
1729 fi
1730 prefix="$glib_save_prefix"
1731 exec_prefix="$glib_save_exec_prefix"
1732 datarootdir="$glib_save_datarootdir"
1733 AC_DEFINE_UNQUOTED($1, "$localedir",
1734 [Define the location where the catalogs will be installed])
1735 ])
1736
1737 dnl
1738 dnl Now the definitions that aclocal will find
1739 dnl
1740 ifdef(glib_configure_ac,[],[
1741 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
1742 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
1743 ])dnl
1744
1745 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
1746 #
1747 # Create a temporary file with TEST-FILE as its contents and pass the
1748 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
1749 # 0 and perform ACTION-IF-FAIL for any other exit status.
1750 AC_DEFUN([GLIB_RUN_PROG],
1751 [cat >conftest.foo <<_ACEOF
1752 $2
1753 _ACEOF
1754 if AC_RUN_LOG([$1 conftest.foo]); then
1755 m4_ifval([$3], [$3], [:])
1756 m4_ifvaln([$4], [else $4])dnl
1757 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
1758 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
1759 fi])
1760
1761
1762 m4_include([build/m4/intltool.m4])
0 include $(top_srcdir)/Makefile.decl
0 # Makefile.in generated by automake 1.11.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16 VPATH = @srcdir@
17 pkgdatadir = $(datadir)/@PACKAGE@
18 pkgincludedir = $(includedir)/@PACKAGE@
19 pkglibdir = $(libdir)/@PACKAGE@
20 pkglibexecdir = $(libexecdir)/@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 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
34 $(top_srcdir)/Makefile.decl
35 subdir = build
36 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
37 am__aclocal_m4_deps = $(top_srcdir)/build/m4/intltool.m4 \
38 $(top_srcdir)/configure.ac
39 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
40 $(ACLOCAL_M4)
41 mkinstalldirs = $(install_sh) -d
42 CONFIG_HEADER = $(top_builddir)/config.h
43 CONFIG_CLEAN_FILES =
44 CONFIG_CLEAN_VPATH_FILES =
45 AM_V_GEN = $(am__v_GEN_@AM_V@)
46 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
47 am__v_GEN_0 = @echo " GEN " $@;
48 AM_V_at = $(am__v_at_@AM_V@)
49 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
50 am__v_at_0 = @
51 SOURCES =
52 DIST_SOURCES =
53 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
54 ACLOCAL = @ACLOCAL@
55 ALL_LINGUAS = @ALL_LINGUAS@
56 AMTAR = @AMTAR@
57 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
58 AUTOCONF = @AUTOCONF@
59 AUTOHEADER = @AUTOHEADER@
60 AUTOMAKE = @AUTOMAKE@
61 AWK = @AWK@
62 CATALOGS = @CATALOGS@
63 CATOBJEXT = @CATOBJEXT@
64 CC = @CC@
65 CCDEPMODE = @CCDEPMODE@
66 CFLAGS = @CFLAGS@
67 CPP = @CPP@
68 CPPFLAGS = @CPPFLAGS@
69 CYGPATH_W = @CYGPATH_W@
70 DATADIRNAME = @DATADIRNAME@
71 DBUS_POLICY_DIR = @DBUS_POLICY_DIR@
72 DEFS = @DEFS@
73 DEPDIR = @DEPDIR@
74 DISTRO = @DISTRO@
75 ECHO_C = @ECHO_C@
76 ECHO_N = @ECHO_N@
77 ECHO_T = @ECHO_T@
78 EGREP = @EGREP@
79 EXEEXT = @EXEEXT@
80 GCOV = @GCOV@
81 GENHTML = @GENHTML@
82 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
83 GLIB_CFLAGS = @GLIB_CFLAGS@
84 GLIB_LIBS = @GLIB_LIBS@
85 GMOFILES = @GMOFILES@
86 GMSGFMT = @GMSGFMT@
87 GREP = @GREP@
88 INSTALL = @INSTALL@
89 INSTALL_DATA = @INSTALL_DATA@
90 INSTALL_PROGRAM = @INSTALL_PROGRAM@
91 INSTALL_SCRIPT = @INSTALL_SCRIPT@
92 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
93 INSTOBJEXT = @INSTOBJEXT@
94 INTLLIBS = @INTLLIBS@
95 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
96 INTLTOOL_MERGE = @INTLTOOL_MERGE@
97 INTLTOOL_PERL = @INTLTOOL_PERL@
98 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
99 INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
100 INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
101 INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
102 INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
103 KRB5_CFLAGS = @KRB5_CFLAGS@
104 KRB5_CONFIG = @KRB5_CONFIG@
105 KRB5_LIBS = @KRB5_LIBS@
106 LCOV = @LCOV@
107 LDFLAGS = @LDFLAGS@
108 LIBOBJS = @LIBOBJS@
109 LIBS = @LIBS@
110 LN_S = @LN_S@
111 LTLIBOBJS = @LTLIBOBJS@
112 MAINT = @MAINT@
113 MAKEINFO = @MAKEINFO@
114 MKDIR_P = @MKDIR_P@
115 MKINSTALLDIRS = @MKINSTALLDIRS@
116 MSGFMT = @MSGFMT@
117 MSGFMT_OPTS = @MSGFMT_OPTS@
118 MSGMERGE = @MSGMERGE@
119 OBJEXT = @OBJEXT@
120 PACKAGE = @PACKAGE@
121 PACKAGEKIT_CFLAGS = @PACKAGEKIT_CFLAGS@
122 PACKAGEKIT_LIBS = @PACKAGEKIT_LIBS@
123 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
124 PACKAGE_NAME = @PACKAGE_NAME@
125 PACKAGE_STRING = @PACKAGE_STRING@
126 PACKAGE_TARNAME = @PACKAGE_TARNAME@
127 PACKAGE_URL = @PACKAGE_URL@
128 PACKAGE_VERSION = @PACKAGE_VERSION@
129 PATH_SEPARATOR = @PATH_SEPARATOR@
130 PKG_CONFIG = @PKG_CONFIG@
131 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
132 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
133 POFILES = @POFILES@
134 POLKIT_ACTION_DIR = @POLKIT_ACTION_DIR@
135 POLKIT_CFLAGS = @POLKIT_CFLAGS@
136 POLKIT_LIBS = @POLKIT_LIBS@
137 POSUB = @POSUB@
138 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
139 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
140 RANLIB = @RANLIB@
141 SERVICE_DIR = @SERVICE_DIR@
142 SET_MAKE = @SET_MAKE@
143 SHELL = @SHELL@
144 STRIP = @STRIP@
145 TEST_MODE = @TEST_MODE@
146 USE_NLS = @USE_NLS@
147 VERSION = @VERSION@
148 XGETTEXT = @XGETTEXT@
149 abs_builddir = @abs_builddir@
150 abs_srcdir = @abs_srcdir@
151 abs_top_builddir = @abs_top_builddir@
152 abs_top_srcdir = @abs_top_srcdir@
153 ac_ct_CC = @ac_ct_CC@
154 am__include = @am__include@
155 am__leading_dot = @am__leading_dot@
156 am__quote = @am__quote@
157 am__tar = @am__tar@
158 am__untar = @am__untar@
159 bindir = @bindir@
160 build_alias = @build_alias@
161 builddir = @builddir@
162 datadir = @datadir@
163 datarootdir = @datarootdir@
164 docdir = @docdir@
165 dvidir = @dvidir@
166 exec_prefix = @exec_prefix@
167 host_alias = @host_alias@
168 htmldir = @htmldir@
169 includedir = @includedir@
170 infodir = @infodir@
171 install_sh = @install_sh@
172 intltool__v_merge_options_ = @intltool__v_merge_options_@
173 intltool__v_merge_options_0 = @intltool__v_merge_options_0@
174 libdir = @libdir@
175 libexecdir = @libexecdir@
176 localedir = @localedir@
177 localstatedir = @localstatedir@
178 mandir = @mandir@
179 mkdir_p = @mkdir_p@
180 oldincludedir = @oldincludedir@
181 pdfdir = @pdfdir@
182 prefix = @prefix@
183 program_transform_name = @program_transform_name@
184 psdir = @psdir@
185 sbindir = @sbindir@
186 sharedstatedir = @sharedstatedir@
187 srcdir = @srcdir@
188 sysconfdir = @sysconfdir@
189 target_alias = @target_alias@
190 top_build_prefix = @top_build_prefix@
191 top_builddir = @top_builddir@
192 top_srcdir = @top_srcdir@
193 NULL =
194 TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions
195 all: all-am
196
197 .SUFFIXES:
198 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps)
199 @for dep in $?; do \
200 case '$(am__configure_deps)' in \
201 *$$dep*) \
202 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
203 && { if test -f $@; then exit 0; else break; fi; }; \
204 exit 1;; \
205 esac; \
206 done; \
207 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign build/Makefile'; \
208 $(am__cd) $(top_srcdir) && \
209 $(AUTOMAKE) --foreign build/Makefile
210 .PRECIOUS: Makefile
211 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
212 @case '$?' in \
213 *config.status*) \
214 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
215 *) \
216 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
217 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
218 esac;
219 $(top_srcdir)/Makefile.decl:
220
221 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
222 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
223
224 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
225 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
226 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
227 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
228 $(am__aclocal_m4_deps):
229 tags: TAGS
230 TAGS:
231
232 ctags: CTAGS
233 CTAGS:
234
235
236 distdir: $(DISTFILES)
237 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
238 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
239 list='$(DISTFILES)'; \
240 dist_files=`for file in $$list; do echo $$file; done | \
241 sed -e "s|^$$srcdirstrip/||;t" \
242 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
243 case $$dist_files in \
244 */*) $(MKDIR_P) `echo "$$dist_files" | \
245 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
246 sort -u` ;; \
247 esac; \
248 for file in $$dist_files; do \
249 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
250 if test -d $$d/$$file; then \
251 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
252 if test -d "$(distdir)/$$file"; then \
253 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
254 fi; \
255 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
256 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
257 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
258 fi; \
259 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
260 else \
261 test -f "$(distdir)/$$file" \
262 || cp -p $$d/$$file "$(distdir)/$$file" \
263 || exit 1; \
264 fi; \
265 done
266 check-am: all-am
267 check: check-am
268 all-am: Makefile
269 installdirs:
270 install: install-am
271 install-exec: install-exec-am
272 install-data: install-data-am
273 uninstall: uninstall-am
274
275 install-am: all-am
276 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
277
278 installcheck: installcheck-am
279 install-strip:
280 if test -z '$(STRIP)'; then \
281 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
282 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
283 install; \
284 else \
285 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
286 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
287 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
288 fi
289 mostlyclean-generic:
290
291 clean-generic:
292
293 distclean-generic:
294 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
295 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
296
297 maintainer-clean-generic:
298 @echo "This command is intended for maintainers to use"
299 @echo "it deletes files that may require special tools to rebuild."
300 clean: clean-am
301
302 clean-am: clean-generic mostlyclean-am
303
304 distclean: distclean-am
305 -rm -f Makefile
306 distclean-am: clean-am distclean-generic
307
308 dvi: dvi-am
309
310 dvi-am:
311
312 html: html-am
313
314 html-am:
315
316 info: info-am
317
318 info-am:
319
320 install-data-am:
321
322 install-dvi: install-dvi-am
323
324 install-dvi-am:
325
326 install-exec-am:
327
328 install-html: install-html-am
329
330 install-html-am:
331
332 install-info: install-info-am
333
334 install-info-am:
335
336 install-man:
337
338 install-pdf: install-pdf-am
339
340 install-pdf-am:
341
342 install-ps: install-ps-am
343
344 install-ps-am:
345
346 installcheck-am:
347
348 maintainer-clean: maintainer-clean-am
349 -rm -f Makefile
350 maintainer-clean-am: distclean-am maintainer-clean-generic
351
352 mostlyclean: mostlyclean-am
353
354 mostlyclean-am: mostlyclean-generic
355
356 pdf: pdf-am
357
358 pdf-am:
359
360 ps: ps-am
361
362 ps-am:
363
364 uninstall-am:
365
366 .MAKE: install-am install-strip
367
368 .PHONY: all all-am check check-am clean clean-generic distclean \
369 distclean-generic distdir dvi dvi-am html html-am info info-am \
370 install install-am install-data install-data-am install-dvi \
371 install-dvi-am install-exec install-exec-am install-html \
372 install-html-am install-info install-info-am install-man \
373 install-pdf install-pdf-am install-ps install-ps-am \
374 install-strip installcheck installcheck-am installdirs \
375 maintainer-clean maintainer-clean-generic mostlyclean \
376 mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
377
378
379 perform-memcheck: $(TEST_PROGS) $(TEST_SUPPRESSIONS)
380 @make -C $(top_builddir)/build all
381 @for test in $(TEST_PROGS); do \
382 G_SLICE=always-malloc libtool --mode=execute \
383 valgrind --trace-children=no --gen-suppressions=all \
384 --suppressions=$(TEST_SUPPRESSIONS) \
385 --leak-check=full --show-reachable=yes --num-callers=16 \
386 --quiet --error-exitcode=33 \
387 $(builddir)/$$test; \
388 done
389
390 @WITH_COVERAGE_TRUE@coverage:
391 @WITH_COVERAGE_TRUE@ mkdir -p $(top_builddir)/build/coverage
392 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
393 @WITH_COVERAGE_TRUE@ $(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
394 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
395 @WITH_COVERAGE_TRUE@ @echo "file://$(abs_top_builddir)/build/coverage/index.html"
396
397 @WITH_COVERAGE_TRUE@clear-coverage:
398 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
399
400 # Tell versions [3.59,3.63) of GNU make to not export all variables.
401 # Otherwise a system limit (for SysV at least) may be exceeded.
402 .NOEXPORT:
0 ## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
1 ## Copyright (C) 2001 Eazel, Inc.
2 ## Author: Maciej Stachowiak <mjs@noisehavoc.org>
3 ## Kenneth Christiansen <kenneth@gnu.org>
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ##
19 ## As a special exception to the GNU General Public License, if you
20 ## distribute this file as part of a program that contains a
21 ## configuration script generated by Autoconf, you may include it under
22 ## the same distribution terms that you use for the rest of that program.
23
24 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
25 # serial 42 IT_PROG_INTLTOOL
26 AC_DEFUN([IT_PROG_INTLTOOL], [
27 AC_PREREQ([2.50])dnl
28 AC_REQUIRE([AM_NLS])dnl
29
30 case "$am__api_version" in
31 1.[01234])
32 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
33 ;;
34 *)
35 ;;
36 esac
37
38 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
39 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
40 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
41 if test -n "$1"; then
42 AC_MSG_CHECKING([for intltool >= $1])
43 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
44 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
45 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
46 fi
47
48 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
49 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
50 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
51 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
52 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
53 fi
54
55 if test -z "$AM_DEFAULT_VERBOSITY"; then
56 AM_DEFAULT_VERBOSITY=1
57 fi
58 AC_SUBST([AM_DEFAULT_VERBOSITY])
59
60 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
61 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
62 INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
63 AC_SUBST(INTLTOOL_V_MERGE)
64 AC_SUBST(INTLTOOL__v_MERGE_)
65 AC_SUBST(INTLTOOL__v_MERGE_0)
66
67 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
68 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
69 intltool__v_merge_options_0='-q'
70 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
71 AC_SUBST(intltool__v_merge_options_)
72 AC_SUBST(intltool__v_merge_options_0)
73
74 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
75 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
76 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
77 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
78 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
79 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
80 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
81 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
82 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
83 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
84 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
85 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
86 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
87 else
88 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
89 fi
90 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
91 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
92 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
93 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
94 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
95 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
96 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
97
98 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
99 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
100 _IT_SUBST(INTLTOOL_KEYS_RULE)
101 _IT_SUBST(INTLTOOL_PROP_RULE)
102 _IT_SUBST(INTLTOOL_OAF_RULE)
103 _IT_SUBST(INTLTOOL_PONG_RULE)
104 _IT_SUBST(INTLTOOL_SERVER_RULE)
105 _IT_SUBST(INTLTOOL_SHEET_RULE)
106 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
107 _IT_SUBST(INTLTOOL_UI_RULE)
108 _IT_SUBST(INTLTOOL_XAM_RULE)
109 _IT_SUBST(INTLTOOL_KBD_RULE)
110 _IT_SUBST(INTLTOOL_XML_RULE)
111 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
112 _IT_SUBST(INTLTOOL_CAVES_RULE)
113 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
114 _IT_SUBST(INTLTOOL_THEME_RULE)
115 _IT_SUBST(INTLTOOL_SERVICE_RULE)
116 _IT_SUBST(INTLTOOL_POLICY_RULE)
117
118 # Check the gettext tools to make sure they are GNU
119 AC_PATH_PROG(XGETTEXT, xgettext)
120 AC_PATH_PROG(MSGMERGE, msgmerge)
121 AC_PATH_PROG(MSGFMT, msgfmt)
122 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
123 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
124 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
125 fi
126 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
127 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
128 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
129 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
130 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
131 fi
132
133 AC_PATH_PROG(INTLTOOL_PERL, perl)
134 if test -z "$INTLTOOL_PERL"; then
135 AC_MSG_ERROR([perl not found])
136 fi
137 AC_MSG_CHECKING([for perl >= 5.8.1])
138 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
139 if test $? -ne 0; then
140 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
141 else
142 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
143 AC_MSG_RESULT([$IT_PERL_VERSION])
144 fi
145 if test "x$2" != "xno-xml"; then
146 AC_MSG_CHECKING([for XML::Parser])
147 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
148 AC_MSG_RESULT([ok])
149 else
150 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
151 fi
152 fi
153
154 # Substitute ALL_LINGUAS so we can use it in po/Makefile
155 AC_SUBST(ALL_LINGUAS)
156
157 # Set DATADIRNAME correctly if it is not set yet
158 # (copied from glib-gettext.m4)
159 if test -z "$DATADIRNAME"; then
160 AC_LINK_IFELSE(
161 [AC_LANG_PROGRAM([[]],
162 [[extern int _nl_msg_cat_cntr;
163 return _nl_msg_cat_cntr]])],
164 [DATADIRNAME=share],
165 [case $host in
166 *-*-solaris*)
167 dnl On Solaris, if bind_textdomain_codeset is in libc,
168 dnl GNU format message catalog is always supported,
169 dnl since both are added to the libc all together.
170 dnl Hence, we'd like to go with DATADIRNAME=share
171 dnl in this case.
172 AC_CHECK_FUNC(bind_textdomain_codeset,
173 [DATADIRNAME=share], [DATADIRNAME=lib])
174 ;;
175 *)
176 [DATADIRNAME=lib]
177 ;;
178 esac])
179 fi
180 AC_SUBST(DATADIRNAME)
181
182 IT_PO_SUBDIR([po])
183
184 ])
185
186
187 # IT_PO_SUBDIR(DIRNAME)
188 # ---------------------
189 # All po subdirs have to be declared with this macro; the subdir "po" is
190 # declared by IT_PROG_INTLTOOL.
191 #
192 AC_DEFUN([IT_PO_SUBDIR],
193 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
194 dnl
195 dnl The following CONFIG_COMMANDS should be executed at the very end
196 dnl of config.status.
197 AC_CONFIG_COMMANDS_PRE([
198 AC_CONFIG_COMMANDS([$1/stamp-it], [
199 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
200 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
201 fi
202 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
203 >"$1/stamp-it.tmp"
204 [sed '/^#/d
205 s/^[[].*] *//
206 /^[ ]*$/d
207 '"s|^| $ac_top_srcdir/|" \
208 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
209 ]
210 [sed '/^POTFILES =/,/[^\\]$/ {
211 /^POTFILES =/!d
212 r $1/POTFILES
213 }
214 ' "$1/Makefile.in" >"$1/Makefile"]
215 rm -f "$1/Makefile.tmp"
216 mv "$1/stamp-it.tmp" "$1/stamp-it"
217 ])
218 ])dnl
219 ])
220
221 # _IT_SUBST(VARIABLE)
222 # -------------------
223 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
224 #
225 AC_DEFUN([_IT_SUBST],
226 [
227 AC_SUBST([$1])
228 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
229 ]
230 )
231
232 # deprecated macros
233 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
234 # A hint is needed for aclocal from Automake <= 1.9.4:
235 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
236
0 #! /bin/sh
1 # Wrapper for compilers which do not understand '-c -o'.
2
3 scriptversion=2012-01-04.17; # UTC
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
6 # Software Foundation, Inc.
7 # Written by Tom Tromey <tromey@cygnus.com>.
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, see <http://www.gnu.org/licenses/>.
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 # This file is maintained in Automake, please report
28 # bugs to <bug-automake@gnu.org> or send patches to
29 # <automake-patches@gnu.org>.
30
31 nl='
32 '
33
34 # We need space, tab and new line, in precisely that order. Quoting is
35 # there to prevent tools from complaining about whitespace usage.
36 IFS=" "" $nl"
37
38 file_conv=
39
40 # func_file_conv build_file lazy
41 # Convert a $build file to $host form and store it in $file
42 # Currently only supports Windows hosts. If the determined conversion
43 # type is listed in (the comma separated) LAZY, no conversion will
44 # take place.
45 func_file_conv ()
46 {
47 file=$1
48 case $file in
49 / | /[!/]*) # absolute file, and not a UNC file
50 if test -z "$file_conv"; then
51 # lazily determine how to convert abs files
52 case `uname -s` in
53 MINGW*)
54 file_conv=mingw
55 ;;
56 CYGWIN*)
57 file_conv=cygwin
58 ;;
59 *)
60 file_conv=wine
61 ;;
62 esac
63 fi
64 case $file_conv/,$2, in
65 *,$file_conv,*)
66 ;;
67 mingw/*)
68 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
69 ;;
70 cygwin/*)
71 file=`cygpath -m "$file" || echo "$file"`
72 ;;
73 wine/*)
74 file=`winepath -w "$file" || echo "$file"`
75 ;;
76 esac
77 ;;
78 esac
79 }
80
81 # func_cl_wrapper cl arg...
82 # Adjust compile command to suit cl
83 func_cl_wrapper ()
84 {
85 # Assume a capable shell
86 lib_path=
87 shared=:
88 linker_opts=
89 for arg
90 do
91 if test -n "$eat"; then
92 eat=
93 else
94 case $1 in
95 -o)
96 # configure might choose to run compile as 'compile cc -o foo foo.c'.
97 eat=1
98 case $2 in
99 *.o | *.[oO][bB][jJ])
100 func_file_conv "$2"
101 set x "$@" -Fo"$file"
102 shift
103 ;;
104 *)
105 func_file_conv "$2"
106 set x "$@" -Fe"$file"
107 shift
108 ;;
109 esac
110 ;;
111 -I*)
112 func_file_conv "${1#-I}" mingw
113 set x "$@" -I"$file"
114 shift
115 ;;
116 -l*)
117 lib=${1#-l}
118 found=no
119 save_IFS=$IFS
120 IFS=';'
121 for dir in $lib_path $LIB
122 do
123 IFS=$save_IFS
124 if $shared && test -f "$dir/$lib.dll.lib"; then
125 found=yes
126 set x "$@" "$dir/$lib.dll.lib"
127 break
128 fi
129 if test -f "$dir/$lib.lib"; then
130 found=yes
131 set x "$@" "$dir/$lib.lib"
132 break
133 fi
134 done
135 IFS=$save_IFS
136
137 test "$found" != yes && set x "$@" "$lib.lib"
138 shift
139 ;;
140 -L*)
141 func_file_conv "${1#-L}"
142 if test -z "$lib_path"; then
143 lib_path=$file
144 else
145 lib_path="$lib_path;$file"
146 fi
147 linker_opts="$linker_opts -LIBPATH:$file"
148 ;;
149 -static)
150 shared=false
151 ;;
152 -Wl,*)
153 arg=${1#-Wl,}
154 save_ifs="$IFS"; IFS=','
155 for flag in $arg; do
156 IFS="$save_ifs"
157 linker_opts="$linker_opts $flag"
158 done
159 IFS="$save_ifs"
160 ;;
161 -Xlinker)
162 eat=1
163 linker_opts="$linker_opts $2"
164 ;;
165 -*)
166 set x "$@" "$1"
167 shift
168 ;;
169 *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
170 func_file_conv "$1"
171 set x "$@" -Tp"$file"
172 shift
173 ;;
174 *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
175 func_file_conv "$1" mingw
176 set x "$@" "$file"
177 shift
178 ;;
179 *)
180 set x "$@" "$1"
181 shift
182 ;;
183 esac
184 fi
185 shift
186 done
187 if test -n "$linker_opts"; then
188 linker_opts="-link$linker_opts"
189 fi
190 exec "$@" $linker_opts
191 exit 1
192 }
193
194 eat=
195
196 case $1 in
197 '')
198 echo "$0: No command. Try '$0 --help' for more information." 1>&2
199 exit 1;
200 ;;
201 -h | --h*)
202 cat <<\EOF
203 Usage: compile [--help] [--version] PROGRAM [ARGS]
204
205 Wrapper for compilers which do not understand '-c -o'.
206 Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
207 arguments, and rename the output as expected.
208
209 If you are trying to build a whole package this is not the
210 right script to run: please start by reading the file 'INSTALL'.
211
212 Report bugs to <bug-automake@gnu.org>.
213 EOF
214 exit $?
215 ;;
216 -v | --v*)
217 echo "compile $scriptversion"
218 exit $?
219 ;;
220 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
221 func_cl_wrapper "$@" # Doesn't return...
222 ;;
223 esac
224
225 ofile=
226 cfile=
227
228 for arg
229 do
230 if test -n "$eat"; then
231 eat=
232 else
233 case $1 in
234 -o)
235 # configure might choose to run compile as 'compile cc -o foo foo.c'.
236 # So we strip '-o arg' only if arg is an object.
237 eat=1
238 case $2 in
239 *.o | *.obj)
240 ofile=$2
241 ;;
242 *)
243 set x "$@" -o "$2"
244 shift
245 ;;
246 esac
247 ;;
248 *.c)
249 cfile=$1
250 set x "$@" "$1"
251 shift
252 ;;
253 *)
254 set x "$@" "$1"
255 shift
256 ;;
257 esac
258 fi
259 shift
260 done
261
262 if test -z "$ofile" || test -z "$cfile"; then
263 # If no '-o' option was seen then we might have been invoked from a
264 # pattern rule where we don't need one. That is ok -- this is a
265 # normal compilation that the losing compiler can handle. If no
266 # '.c' file was seen then we are probably linking. That is also
267 # ok.
268 exec "$@"
269 fi
270
271 # Name of file we expect compiler to create.
272 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
273
274 # Create the lock directory.
275 # Note: use '[/\\:.-]' here to ensure that we don't use the same name
276 # that we are using for the .o file. Also, base the name on the expected
277 # object file name, since that is what matters with a parallel build.
278 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
279 while true; do
280 if mkdir "$lockdir" >/dev/null 2>&1; then
281 break
282 fi
283 sleep 1
284 done
285 # FIXME: race condition here if user kills between mkdir and trap.
286 trap "rmdir '$lockdir'; exit 1" 1 2 15
287
288 # Run the compile.
289 "$@"
290 ret=$?
291
292 if test -f "$cofile"; then
293 test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
294 elif test -f "${cofile}bj"; then
295 test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
296 fi
297
298 rmdir "$lockdir"
299 exit $ret
300
301 # Local Variables:
302 # mode: shell-script
303 # sh-indentation: 2
304 # eval: (add-hook 'write-file-hooks 'time-stamp)
305 # time-stamp-start: "scriptversion="
306 # time-stamp-format: "%:y-%02m-%02d.%02H"
307 # time-stamp-time-zone: "UTC"
308 # time-stamp-end: "; # UTC"
309 # 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 /* The gettext domain name */
6 #undef GETTEXT_PACKAGE
7
8 /* Disable glib assertions */
9 #undef G_DISABLE_ASSERT
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 if the GNU gettext() function is already present or preinstalled. */
18 #undef HAVE_GETTEXT
19
20 /* Define to 1 if you have the <inttypes.h> header file. */
21 #undef HAVE_INTTYPES_H
22
23 /* Define if your <locale.h> file defines LC_MESSAGES. */
24 #undef HAVE_LC_MESSAGES
25
26 /* Define to 1 if you have the <locale.h> header file. */
27 #undef HAVE_LOCALE_H
28
29 /* Define to 1 if you have the <memory.h> header file. */
30 #undef HAVE_MEMORY_H
31
32 /* Define to 1 if you have the <stdint.h> header file. */
33 #undef HAVE_STDINT_H
34
35 /* Define to 1 if you have the <stdlib.h> header file. */
36 #undef HAVE_STDLIB_H
37
38 /* Define to 1 if you have the <strings.h> header file. */
39 #undef HAVE_STRINGS_H
40
41 /* Define to 1 if you have the <string.h> header file. */
42 #undef HAVE_STRING_H
43
44 /* Define to 1 if you have the <sys/stat.h> header file. */
45 #undef HAVE_SYS_STAT_H
46
47 /* Define to 1 if you have the <sys/types.h> header file. */
48 #undef HAVE_SYS_TYPES_H
49
50 /* Define to 1 if you have the <unistd.h> header file. */
51 #undef HAVE_UNISTD_H
52
53 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
54 #undef NO_MINUS_C_MINUS_O
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 home page for this package. */
72 #undef PACKAGE_URL
73
74 /* Define to the version of this package. */
75 #undef PACKAGE_VERSION
76
77 /* Define to 1 if you have the ANSI C header files. */
78 #undef STDC_HEADERS
79
80 /* Enable extensions on AIX 3, Interix. */
81 #ifndef _ALL_SOURCE
82 # undef _ALL_SOURCE
83 #endif
84 /* Enable GNU extensions on systems that have them. */
85 #ifndef _GNU_SOURCE
86 # undef _GNU_SOURCE
87 #endif
88 /* Enable threading extensions on Solaris. */
89 #ifndef _POSIX_PTHREAD_SEMANTICS
90 # undef _POSIX_PTHREAD_SEMANTICS
91 #endif
92 /* Enable extensions on HP NonStop. */
93 #ifndef _TANDEM_SOURCE
94 # undef _TANDEM_SOURCE
95 #endif
96 /* Enable general extensions on Solaris. */
97 #ifndef __EXTENSIONS__
98 # undef __EXTENSIONS__
99 #endif
100
101
102 /* Version number of package */
103 #undef VERSION
104
105 /* Print debug output */
106 #undef WITH_DEBUG
107
108 /* In debug mode */
109 #undef _DEBUG
110
111 /* Define to 1 if on MINIX. */
112 #undef _MINIX
113
114 /* Define to 2 if the system does not provide POSIX.1 features except with
115 this defined. */
116 #undef _POSIX_1_SOURCE
117
118 /* Define to 1 if you need to in order for `stat' and other things to work. */
119 #undef _POSIX_SOURCE
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.68 for realmd 0.1.
3 #
4 # Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=realmd>.
5 #
6 #
7 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
8 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
9 # Foundation, Inc.
10 #
11 #
12 # This configure script is free software; the Free Software Foundation
13 # gives unlimited permission to copy, distribute and modify it.
14 ## -------------------- ##
15 ## M4sh Initialization. ##
16 ## -------------------- ##
17
18 # Be more Bourne compatible
19 DUALCASE=1; export DUALCASE # for MKS sh
20 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21 emulate sh
22 NULLCMD=:
23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
26 setopt NO_GLOB_SUBST
27 else
28 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
33 esac
34 fi
35
36
37 as_nl='
38 '
39 export as_nl
40 # Printing a long string crashes Solaris 7 /usr/bin/printf.
41 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44 # Prefer a ksh shell builtin over an external printf program on Solaris,
45 # but without wasting forks for bash or zsh.
46 if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53 else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73 fi
74
75 # The user is always right.
76 if test "${PATH_SEPARATOR+set}" != set; then
77 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
82 fi
83
84
85 # IFS
86 # We need space, tab and new line, in precisely that order. Quoting is
87 # there to prevent editors from complaining about space-tab.
88 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
89 # splitting by setting IFS to empty value.)
90 IFS=" "" $as_nl"
91
92 # Find who we are. Look in the path if we contain no directory separator.
93 as_myself=
94 case $0 in #((
95 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97 for as_dir in $PATH
98 do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
103 IFS=$as_save_IFS
104
105 ;;
106 esac
107 # We did not find ourselves, most probably we were run as `sh COMMAND'
108 # in which case we are not to be found in the path.
109 if test "x$as_myself" = x; then
110 as_myself=$0
111 fi
112 if test ! -f "$as_myself"; then
113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
115 fi
116
117 # Unset variables that we do not need and which cause bugs (e.g. in
118 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119 # suppresses any "Segmentation fault" message there. '((' could
120 # trigger a bug in pdksh 5.2.14.
121 for as_var in BASH_ENV ENV MAIL MAILPATH
122 do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124 done
125 PS1='$ '
126 PS2='> '
127 PS4='+ '
128
129 # NLS nuisances.
130 LC_ALL=C
131 export LC_ALL
132 LANGUAGE=C
133 export LANGUAGE
134
135 # CDPATH.
136 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138 if test "x$CONFIG_SHELL" = x; then
139 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140 emulate sh
141 NULLCMD=:
142 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143 # is contrary to our usage. Disable this feature.
144 alias -g '\${1+\"\$@\"}'='\"\$@\"'
145 setopt NO_GLOB_SUBST
146 else
147 case \`(set -o) 2>/dev/null\` in #(
148 *posix*) :
149 set -o posix ;; #(
150 *) :
151 ;;
152 esac
153 fi
154 "
155 as_required="as_fn_return () { (exit \$1); }
156 as_fn_success () { as_fn_return 0; }
157 as_fn_failure () { as_fn_return 1; }
158 as_fn_ret_success () { return 0; }
159 as_fn_ret_failure () { return 1; }
160
161 exitcode=0
162 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168 else
169 exitcode=1; echo positional parameters were not saved.
170 fi
171 test x\$exitcode = x0 || exit 1"
172 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176 test \$(( 1 + 1 )) = 2 || exit 1"
177 if (eval "$as_required") 2>/dev/null; then :
178 as_have_required=yes
179 else
180 as_have_required=no
181 fi
182 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184 else
185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186 as_found=false
187 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188 do
189 IFS=$as_save_IFS
190 test -z "$as_dir" && as_dir=.
191 as_found=:
192 case $as_dir in #(
193 /*)
194 for as_base in sh bash ksh sh5; do
195 # Try only shells that exist, to save several forks.
196 as_shell=$as_dir/$as_base
197 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199 CONFIG_SHELL=$as_shell as_have_required=yes
200 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201 break 2
202 fi
203 fi
204 done;;
205 esac
206 as_found=false
207 done
208 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210 CONFIG_SHELL=$SHELL as_have_required=yes
211 fi; }
212 IFS=$as_save_IFS
213
214
215 if test "x$CONFIG_SHELL" != x; then :
216 # We cannot yet assume a decent shell, so we have to provide a
217 # neutralization value for shells without unset; and this also
218 # works around shells that cannot unset nonexistent variables.
219 # Preserve -v and -x to the replacement shell.
220 BASH_ENV=/dev/null
221 ENV=/dev/null
222 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
223 export CONFIG_SHELL
224 case $- in # ((((
225 *v*x* | *x*v* ) as_opts=-vx ;;
226 *v* ) as_opts=-v ;;
227 *x* ) as_opts=-x ;;
228 * ) as_opts= ;;
229 esac
230 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
231 fi
232
233 if test x$as_have_required = xno; then :
234 $as_echo "$0: This script requires a shell more modern than all"
235 $as_echo "$0: the shells that I found on your system."
236 if test x${ZSH_VERSION+set} = xset ; then
237 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
238 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
239 else
240 $as_echo "$0: Please tell bug-autoconf@gnu.org and
241 $0: http://bugs.freedesktop.org/enter_bug.cgi?product=realmd
242 $0: about your system, including any error possibly output
243 $0: before this message. Then install a modern shell, or
244 $0: manually run the script under such a shell if you do
245 $0: have one."
246 fi
247 exit 1
248 fi
249 fi
250 fi
251 SHELL=${CONFIG_SHELL-/bin/sh}
252 export SHELL
253 # Unset more variables known to interfere with behavior of common tools.
254 CLICOLOR_FORCE= GREP_OPTIONS=
255 unset CLICOLOR_FORCE GREP_OPTIONS
256
257 ## --------------------- ##
258 ## M4sh Shell Functions. ##
259 ## --------------------- ##
260 # as_fn_unset VAR
261 # ---------------
262 # Portably unset VAR.
263 as_fn_unset ()
264 {
265 { eval $1=; unset $1;}
266 }
267 as_unset=as_fn_unset
268
269 # as_fn_set_status STATUS
270 # -----------------------
271 # Set $? to STATUS, without forking.
272 as_fn_set_status ()
273 {
274 return $1
275 } # as_fn_set_status
276
277 # as_fn_exit STATUS
278 # -----------------
279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
280 as_fn_exit ()
281 {
282 set +e
283 as_fn_set_status $1
284 exit $1
285 } # as_fn_exit
286
287 # as_fn_mkdir_p
288 # -------------
289 # Create "$as_dir" as a directory, including parents if necessary.
290 as_fn_mkdir_p ()
291 {
292
293 case $as_dir in #(
294 -*) as_dir=./$as_dir;;
295 esac
296 test -d "$as_dir" || eval $as_mkdir_p || {
297 as_dirs=
298 while :; do
299 case $as_dir in #(
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
301 *) as_qdir=$as_dir;;
302 esac
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309 $as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
311 s//\1/
312 q
313 }
314 /^X\(\/\/\)[^/].*/{
315 s//\1/
316 q
317 }
318 /^X\(\/\/\)$/{
319 s//\1/
320 q
321 }
322 /^X\(\/\).*/{
323 s//\1/
324 q
325 }
326 s/.*/./; q'`
327 test -d "$as_dir" && break
328 done
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
331
332
333 } # as_fn_mkdir_p
334 # as_fn_append VAR VALUE
335 # ----------------------
336 # Append the text in VALUE to the end of the definition contained in VAR. Take
337 # advantage of any shell optimizations that allow amortized linear growth over
338 # repeated appends, instead of the typical quadratic growth present in naive
339 # implementations.
340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
342 {
343 eval $1+=\$2
344 }'
345 else
346 as_fn_append ()
347 {
348 eval $1=\$$1\$2
349 }
350 fi # as_fn_append
351
352 # as_fn_arith ARG...
353 # ------------------
354 # Perform arithmetic evaluation on the ARGs, and store the result in the
355 # global $as_val. Take advantage of shells that can avoid forks. The arguments
356 # must be portable across $(()) and expr.
357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
358 eval 'as_fn_arith ()
359 {
360 as_val=$(( $* ))
361 }'
362 else
363 as_fn_arith ()
364 {
365 as_val=`expr "$@" || test $? -eq 1`
366 }
367 fi # as_fn_arith
368
369
370 # as_fn_error STATUS ERROR [LINENO LOG_FD]
371 # ----------------------------------------
372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
374 # script with STATUS, using 1 if that was 0.
375 as_fn_error ()
376 {
377 as_status=$1; test $as_status -eq 0 && as_status=1
378 if test "$4"; then
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
381 fi
382 $as_echo "$as_me: error: $2" >&2
383 as_fn_exit $as_status
384 } # as_fn_error
385
386 if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
388 as_expr=expr
389 else
390 as_expr=false
391 fi
392
393 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
394 as_basename=basename
395 else
396 as_basename=false
397 fi
398
399 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
400 as_dirname=dirname
401 else
402 as_dirname=false
403 fi
404
405 as_me=`$as_basename -- "$0" ||
406 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
409 $as_echo X/"$0" |
410 sed '/^.*\/\([^/][^/]*\)\/*$/{
411 s//\1/
412 q
413 }
414 /^X\/\(\/\/\)$/{
415 s//\1/
416 q
417 }
418 /^X\/\(\/\).*/{
419 s//\1/
420 q
421 }
422 s/.*/./; q'`
423
424 # Avoid depending upon Character Ranges.
425 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428 as_cr_digits='0123456789'
429 as_cr_alnum=$as_cr_Letters$as_cr_digits
430
431
432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
437 sed -n '
438 p
439 /[$]LINENO/=
440 ' <$as_myself |
441 sed '
442 s/[$]LINENO.*/&-/
443 t lineno
444 b
445 :lineno
446 N
447 :loop
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
449 t loop
450 s/-\n.*//
451 ' >$as_me.lineno &&
452 chmod +x "$as_me.lineno" ||
453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
454
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
457 # original and so on. Autoconf is especially sensitive to this).
458 . "./$as_me.lineno"
459 # Exit status is that of the last command.
460 exit
461 }
462
463 ECHO_C= ECHO_N= ECHO_T=
464 case `echo -n x` in #(((((
465 -n*)
466 case `echo 'xy\c'` in
467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
468 xy) ECHO_C='\c';;
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
470 ECHO_T=' ';;
471 esac;;
472 *)
473 ECHO_N='-n';;
474 esac
475
476 rm -f conf$$ conf$$.exe conf$$.file
477 if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
479 else
480 rm -f conf$$.dir
481 mkdir conf$$.dir 2>/dev/null
482 fi
483 if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
485 as_ln_s='ln -s'
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489 # In both cases, we have to default to `cp -p'.
490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
491 as_ln_s='cp -p'
492 elif ln conf$$.file conf$$ 2>/dev/null; then
493 as_ln_s=ln
494 else
495 as_ln_s='cp -p'
496 fi
497 else
498 as_ln_s='cp -p'
499 fi
500 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501 rmdir conf$$.dir 2>/dev/null
502
503 if mkdir -p . 2>/dev/null; then
504 as_mkdir_p='mkdir -p "$as_dir"'
505 else
506 test -d ./-p && rmdir ./-p
507 as_mkdir_p=false
508 fi
509
510 if test -x / >/dev/null 2>&1; then
511 as_test_x='test -x'
512 else
513 if ls -dL / >/dev/null 2>&1; then
514 as_ls_L_option=L
515 else
516 as_ls_L_option=
517 fi
518 as_test_x='
519 eval sh -c '\''
520 if test -d "$1"; then
521 test -d "$1/.";
522 else
523 case $1 in #(
524 -*)set "./$1";;
525 esac;
526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527 ???[sx]*):;;*)false;;esac;fi
528 '\'' sh
529 '
530 fi
531 as_executable_p=$as_test_x
532
533 # Sed expression to map a string onto a valid CPP name.
534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
535
536 # Sed expression to map a string onto a valid variable name.
537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
538
539
540 test -n "$DJDIR" || exec 7<&0 </dev/null
541 exec 6>&1
542
543 # Name of the host.
544 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
545 # so uname gets run too.
546 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
547
548 #
549 # Initializations.
550 #
551 ac_default_prefix=/usr/local
552 ac_clean_files=
553 ac_config_libobj_dir=.
554 LIBOBJS=
555 cross_compiling=no
556 subdirs=
557 MFLAGS=
558 MAKEFLAGS=
559
560 # Identity of this package.
561 PACKAGE_NAME='realmd'
562 PACKAGE_TARNAME='realmd'
563 PACKAGE_VERSION='0.1'
564 PACKAGE_STRING='realmd 0.1'
565 PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=realmd'
566 PACKAGE_URL=''
567
568 ac_unique_file="service/realm-daemon.c"
569 # Factoring default headers for most tests.
570 ac_includes_default="\
571 #include <stdio.h>
572 #ifdef HAVE_SYS_TYPES_H
573 # include <sys/types.h>
574 #endif
575 #ifdef HAVE_SYS_STAT_H
576 # include <sys/stat.h>
577 #endif
578 #ifdef STDC_HEADERS
579 # include <stdlib.h>
580 # include <stddef.h>
581 #else
582 # ifdef HAVE_STDLIB_H
583 # include <stdlib.h>
584 # endif
585 #endif
586 #ifdef HAVE_STRING_H
587 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
588 # include <memory.h>
589 # endif
590 # include <string.h>
591 #endif
592 #ifdef HAVE_STRINGS_H
593 # include <strings.h>
594 #endif
595 #ifdef HAVE_INTTYPES_H
596 # include <inttypes.h>
597 #endif
598 #ifdef HAVE_STDINT_H
599 # include <stdint.h>
600 #endif
601 #ifdef HAVE_UNISTD_H
602 # include <unistd.h>
603 #endif"
604
605 ac_subst_vars='am__EXEEXT_FALSE
606 am__EXEEXT_TRUE
607 LTLIBOBJS
608 LIBOBJS
609 SERVICE_DIR
610 WITH_COVERAGE_FALSE
611 WITH_COVERAGE_TRUE
612 GENHTML
613 LCOV
614 GCOV
615 TEST_MODE
616 POLKIT_ACTION_DIR
617 DBUS_POLICY_DIR
618 KRB5_LIBS
619 KRB5_CFLAGS
620 KRB5_CONFIG
621 POLKIT_LIBS
622 POLKIT_CFLAGS
623 PACKAGEKIT_LIBS
624 PACKAGEKIT_CFLAGS
625 GLIB_LIBS
626 GLIB_CFLAGS
627 PKG_CONFIG_LIBDIR
628 PKG_CONFIG_PATH
629 MKINSTALLDIRS
630 POSUB
631 POFILES
632 PO_IN_DATADIR_FALSE
633 PO_IN_DATADIR_TRUE
634 INTLLIBS
635 INSTOBJEXT
636 GMOFILES
637 CATOBJEXT
638 CATALOGS
639 MSGFMT_OPTS
640 GETTEXT_PACKAGE
641 PKG_CONFIG
642 DATADIRNAME
643 ALL_LINGUAS
644 INTLTOOL_PERL
645 GMSGFMT
646 MSGFMT
647 MSGMERGE
648 XGETTEXT
649 INTLTOOL_POLICY_RULE
650 INTLTOOL_SERVICE_RULE
651 INTLTOOL_THEME_RULE
652 INTLTOOL_SCHEMAS_RULE
653 INTLTOOL_CAVES_RULE
654 INTLTOOL_XML_NOMERGE_RULE
655 INTLTOOL_XML_RULE
656 INTLTOOL_KBD_RULE
657 INTLTOOL_XAM_RULE
658 INTLTOOL_UI_RULE
659 INTLTOOL_SOUNDLIST_RULE
660 INTLTOOL_SHEET_RULE
661 INTLTOOL_SERVER_RULE
662 INTLTOOL_PONG_RULE
663 INTLTOOL_OAF_RULE
664 INTLTOOL_PROP_RULE
665 INTLTOOL_KEYS_RULE
666 INTLTOOL_DIRECTORY_RULE
667 INTLTOOL_DESKTOP_RULE
668 intltool__v_merge_options_0
669 intltool__v_merge_options_
670 INTLTOOL_V_MERGE_OPTIONS
671 INTLTOOL__v_MERGE_0
672 INTLTOOL__v_MERGE_
673 INTLTOOL_V_MERGE
674 INTLTOOL_EXTRACT
675 INTLTOOL_MERGE
676 INTLTOOL_UPDATE
677 USE_NLS
678 RANLIB
679 LN_S
680 EGREP
681 GREP
682 CPP
683 am__fastdepCC_FALSE
684 am__fastdepCC_TRUE
685 CCDEPMODE
686 am__nodep
687 AMDEPBACKSLASH
688 AMDEP_FALSE
689 AMDEP_TRUE
690 am__quote
691 am__include
692 DEPDIR
693 OBJEXT
694 EXEEXT
695 ac_ct_CC
696 CPPFLAGS
697 LDFLAGS
698 CFLAGS
699 CC
700 DISTRO
701 MAINT
702 MAINTAINER_MODE_FALSE
703 MAINTAINER_MODE_TRUE
704 AM_BACKSLASH
705 AM_DEFAULT_VERBOSITY
706 AM_DEFAULT_V
707 AM_V
708 am__untar
709 am__tar
710 AMTAR
711 am__leading_dot
712 SET_MAKE
713 AWK
714 mkdir_p
715 MKDIR_P
716 INSTALL_STRIP_PROGRAM
717 STRIP
718 install_sh
719 MAKEINFO
720 AUTOHEADER
721 AUTOMAKE
722 AUTOCONF
723 ACLOCAL
724 VERSION
725 PACKAGE
726 CYGPATH_W
727 am__isrc
728 INSTALL_DATA
729 INSTALL_SCRIPT
730 INSTALL_PROGRAM
731 target_alias
732 host_alias
733 build_alias
734 LIBS
735 ECHO_T
736 ECHO_N
737 ECHO_C
738 DEFS
739 mandir
740 localedir
741 libdir
742 psdir
743 pdfdir
744 dvidir
745 htmldir
746 infodir
747 docdir
748 oldincludedir
749 includedir
750 localstatedir
751 sharedstatedir
752 sysconfdir
753 datadir
754 datarootdir
755 libexecdir
756 sbindir
757 bindir
758 program_transform_name
759 prefix
760 exec_prefix
761 PACKAGE_URL
762 PACKAGE_BUGREPORT
763 PACKAGE_STRING
764 PACKAGE_VERSION
765 PACKAGE_TARNAME
766 PACKAGE_NAME
767 PATH_SEPARATOR
768 SHELL'
769 ac_subst_files=''
770 ac_user_opts='
771 enable_option_checking
772 enable_silent_rules
773 enable_maintainer_mode
774 with_distro
775 enable_dependency_tracking
776 enable_nls
777 enable_strict
778 enable_debug
779 enable_coverage
780 '
781 ac_precious_vars='build_alias
782 host_alias
783 target_alias
784 CC
785 CFLAGS
786 LDFLAGS
787 LIBS
788 CPPFLAGS
789 CPP
790 PKG_CONFIG
791 PKG_CONFIG_PATH
792 PKG_CONFIG_LIBDIR
793 GLIB_CFLAGS
794 GLIB_LIBS
795 PACKAGEKIT_CFLAGS
796 PACKAGEKIT_LIBS
797 POLKIT_CFLAGS
798 POLKIT_LIBS
799 KRB5_CFLAGS
800 KRB5_LIBS'
801
802
803 # Initialize some variables set by options.
804 ac_init_help=
805 ac_init_version=false
806 ac_unrecognized_opts=
807 ac_unrecognized_sep=
808 # The variables have the same names as the options, with
809 # dashes changed to underlines.
810 cache_file=/dev/null
811 exec_prefix=NONE
812 no_create=
813 no_recursion=
814 prefix=NONE
815 program_prefix=NONE
816 program_suffix=NONE
817 program_transform_name=s,x,x,
818 silent=
819 site=
820 srcdir=
821 verbose=
822 x_includes=NONE
823 x_libraries=NONE
824
825 # Installation directory options.
826 # These are left unexpanded so users can "make install exec_prefix=/foo"
827 # and all the variables that are supposed to be based on exec_prefix
828 # by default will actually change.
829 # Use braces instead of parens because sh, perl, etc. also accept them.
830 # (The list follows the same order as the GNU Coding Standards.)
831 bindir='${exec_prefix}/bin'
832 sbindir='${exec_prefix}/sbin'
833 libexecdir='${exec_prefix}/libexec'
834 datarootdir='${prefix}/share'
835 datadir='${datarootdir}'
836 sysconfdir='${prefix}/etc'
837 sharedstatedir='${prefix}/com'
838 localstatedir='${prefix}/var'
839 includedir='${prefix}/include'
840 oldincludedir='/usr/include'
841 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
842 infodir='${datarootdir}/info'
843 htmldir='${docdir}'
844 dvidir='${docdir}'
845 pdfdir='${docdir}'
846 psdir='${docdir}'
847 libdir='${exec_prefix}/lib'
848 localedir='${datarootdir}/locale'
849 mandir='${datarootdir}/man'
850
851 ac_prev=
852 ac_dashdash=
853 for ac_option
854 do
855 # If the previous option needs an argument, assign it.
856 if test -n "$ac_prev"; then
857 eval $ac_prev=\$ac_option
858 ac_prev=
859 continue
860 fi
861
862 case $ac_option in
863 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
864 *=) ac_optarg= ;;
865 *) ac_optarg=yes ;;
866 esac
867
868 # Accept the important Cygnus configure options, so we can diagnose typos.
869
870 case $ac_dashdash$ac_option in
871 --)
872 ac_dashdash=yes ;;
873
874 -bindir | --bindir | --bindi | --bind | --bin | --bi)
875 ac_prev=bindir ;;
876 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
877 bindir=$ac_optarg ;;
878
879 -build | --build | --buil | --bui | --bu)
880 ac_prev=build_alias ;;
881 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
882 build_alias=$ac_optarg ;;
883
884 -cache-file | --cache-file | --cache-fil | --cache-fi \
885 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
886 ac_prev=cache_file ;;
887 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
888 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
889 cache_file=$ac_optarg ;;
890
891 --config-cache | -C)
892 cache_file=config.cache ;;
893
894 -datadir | --datadir | --datadi | --datad)
895 ac_prev=datadir ;;
896 -datadir=* | --datadir=* | --datadi=* | --datad=*)
897 datadir=$ac_optarg ;;
898
899 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
900 | --dataroo | --dataro | --datar)
901 ac_prev=datarootdir ;;
902 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
903 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
904 datarootdir=$ac_optarg ;;
905
906 -disable-* | --disable-*)
907 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
908 # Reject names that are not valid shell variable names.
909 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
910 as_fn_error $? "invalid feature name: $ac_useropt"
911 ac_useropt_orig=$ac_useropt
912 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
913 case $ac_user_opts in
914 *"
915 "enable_$ac_useropt"
916 "*) ;;
917 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
918 ac_unrecognized_sep=', ';;
919 esac
920 eval enable_$ac_useropt=no ;;
921
922 -docdir | --docdir | --docdi | --doc | --do)
923 ac_prev=docdir ;;
924 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
925 docdir=$ac_optarg ;;
926
927 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
928 ac_prev=dvidir ;;
929 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
930 dvidir=$ac_optarg ;;
931
932 -enable-* | --enable-*)
933 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
934 # Reject names that are not valid shell variable names.
935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
936 as_fn_error $? "invalid feature name: $ac_useropt"
937 ac_useropt_orig=$ac_useropt
938 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
939 case $ac_user_opts in
940 *"
941 "enable_$ac_useropt"
942 "*) ;;
943 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
944 ac_unrecognized_sep=', ';;
945 esac
946 eval enable_$ac_useropt=\$ac_optarg ;;
947
948 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
949 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
950 | --exec | --exe | --ex)
951 ac_prev=exec_prefix ;;
952 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
953 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
954 | --exec=* | --exe=* | --ex=*)
955 exec_prefix=$ac_optarg ;;
956
957 -gas | --gas | --ga | --g)
958 # Obsolete; use --with-gas.
959 with_gas=yes ;;
960
961 -help | --help | --hel | --he | -h)
962 ac_init_help=long ;;
963 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
964 ac_init_help=recursive ;;
965 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
966 ac_init_help=short ;;
967
968 -host | --host | --hos | --ho)
969 ac_prev=host_alias ;;
970 -host=* | --host=* | --hos=* | --ho=*)
971 host_alias=$ac_optarg ;;
972
973 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
974 ac_prev=htmldir ;;
975 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
976 | --ht=*)
977 htmldir=$ac_optarg ;;
978
979 -includedir | --includedir | --includedi | --included | --include \
980 | --includ | --inclu | --incl | --inc)
981 ac_prev=includedir ;;
982 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
983 | --includ=* | --inclu=* | --incl=* | --inc=*)
984 includedir=$ac_optarg ;;
985
986 -infodir | --infodir | --infodi | --infod | --info | --inf)
987 ac_prev=infodir ;;
988 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
989 infodir=$ac_optarg ;;
990
991 -libdir | --libdir | --libdi | --libd)
992 ac_prev=libdir ;;
993 -libdir=* | --libdir=* | --libdi=* | --libd=*)
994 libdir=$ac_optarg ;;
995
996 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
997 | --libexe | --libex | --libe)
998 ac_prev=libexecdir ;;
999 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1000 | --libexe=* | --libex=* | --libe=*)
1001 libexecdir=$ac_optarg ;;
1002
1003 -localedir | --localedir | --localedi | --localed | --locale)
1004 ac_prev=localedir ;;
1005 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1006 localedir=$ac_optarg ;;
1007
1008 -localstatedir | --localstatedir | --localstatedi | --localstated \
1009 | --localstate | --localstat | --localsta | --localst | --locals)
1010 ac_prev=localstatedir ;;
1011 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1012 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1013 localstatedir=$ac_optarg ;;
1014
1015 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1016 ac_prev=mandir ;;
1017 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1018 mandir=$ac_optarg ;;
1019
1020 -nfp | --nfp | --nf)
1021 # Obsolete; use --without-fp.
1022 with_fp=no ;;
1023
1024 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1025 | --no-cr | --no-c | -n)
1026 no_create=yes ;;
1027
1028 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1029 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1030 no_recursion=yes ;;
1031
1032 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1033 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1034 | --oldin | --oldi | --old | --ol | --o)
1035 ac_prev=oldincludedir ;;
1036 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1037 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1038 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1039 oldincludedir=$ac_optarg ;;
1040
1041 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1042 ac_prev=prefix ;;
1043 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1044 prefix=$ac_optarg ;;
1045
1046 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1047 | --program-pre | --program-pr | --program-p)
1048 ac_prev=program_prefix ;;
1049 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1050 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1051 program_prefix=$ac_optarg ;;
1052
1053 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1054 | --program-suf | --program-su | --program-s)
1055 ac_prev=program_suffix ;;
1056 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1057 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1058 program_suffix=$ac_optarg ;;
1059
1060 -program-transform-name | --program-transform-name \
1061 | --program-transform-nam | --program-transform-na \
1062 | --program-transform-n | --program-transform- \
1063 | --program-transform | --program-transfor \
1064 | --program-transfo | --program-transf \
1065 | --program-trans | --program-tran \
1066 | --progr-tra | --program-tr | --program-t)
1067 ac_prev=program_transform_name ;;
1068 -program-transform-name=* | --program-transform-name=* \
1069 | --program-transform-nam=* | --program-transform-na=* \
1070 | --program-transform-n=* | --program-transform-=* \
1071 | --program-transform=* | --program-transfor=* \
1072 | --program-transfo=* | --program-transf=* \
1073 | --program-trans=* | --program-tran=* \
1074 | --progr-tra=* | --program-tr=* | --program-t=*)
1075 program_transform_name=$ac_optarg ;;
1076
1077 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1078 ac_prev=pdfdir ;;
1079 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1080 pdfdir=$ac_optarg ;;
1081
1082 -psdir | --psdir | --psdi | --psd | --ps)
1083 ac_prev=psdir ;;
1084 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1085 psdir=$ac_optarg ;;
1086
1087 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1088 | -silent | --silent | --silen | --sile | --sil)
1089 silent=yes ;;
1090
1091 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1092 ac_prev=sbindir ;;
1093 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1094 | --sbi=* | --sb=*)
1095 sbindir=$ac_optarg ;;
1096
1097 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1098 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1099 | --sharedst | --shareds | --shared | --share | --shar \
1100 | --sha | --sh)
1101 ac_prev=sharedstatedir ;;
1102 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1103 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1104 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1105 | --sha=* | --sh=*)
1106 sharedstatedir=$ac_optarg ;;
1107
1108 -site | --site | --sit)
1109 ac_prev=site ;;
1110 -site=* | --site=* | --sit=*)
1111 site=$ac_optarg ;;
1112
1113 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1114 ac_prev=srcdir ;;
1115 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1116 srcdir=$ac_optarg ;;
1117
1118 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1119 | --syscon | --sysco | --sysc | --sys | --sy)
1120 ac_prev=sysconfdir ;;
1121 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1122 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1123 sysconfdir=$ac_optarg ;;
1124
1125 -target | --target | --targe | --targ | --tar | --ta | --t)
1126 ac_prev=target_alias ;;
1127 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1128 target_alias=$ac_optarg ;;
1129
1130 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1131 verbose=yes ;;
1132
1133 -version | --version | --versio | --versi | --vers | -V)
1134 ac_init_version=: ;;
1135
1136 -with-* | --with-*)
1137 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1138 # Reject names that are not valid shell variable names.
1139 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1140 as_fn_error $? "invalid package name: $ac_useropt"
1141 ac_useropt_orig=$ac_useropt
1142 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1143 case $ac_user_opts in
1144 *"
1145 "with_$ac_useropt"
1146 "*) ;;
1147 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1148 ac_unrecognized_sep=', ';;
1149 esac
1150 eval with_$ac_useropt=\$ac_optarg ;;
1151
1152 -without-* | --without-*)
1153 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1154 # Reject names that are not valid shell variable names.
1155 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1156 as_fn_error $? "invalid package name: $ac_useropt"
1157 ac_useropt_orig=$ac_useropt
1158 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1159 case $ac_user_opts in
1160 *"
1161 "with_$ac_useropt"
1162 "*) ;;
1163 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1164 ac_unrecognized_sep=', ';;
1165 esac
1166 eval with_$ac_useropt=no ;;
1167
1168 --x)
1169 # Obsolete; use --with-x.
1170 with_x=yes ;;
1171
1172 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1173 | --x-incl | --x-inc | --x-in | --x-i)
1174 ac_prev=x_includes ;;
1175 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1176 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1177 x_includes=$ac_optarg ;;
1178
1179 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1180 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1181 ac_prev=x_libraries ;;
1182 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1183 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1184 x_libraries=$ac_optarg ;;
1185
1186 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1187 Try \`$0 --help' for more information"
1188 ;;
1189
1190 *=*)
1191 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1192 # Reject names that are not valid shell variable names.
1193 case $ac_envvar in #(
1194 '' | [0-9]* | *[!_$as_cr_alnum]* )
1195 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1196 esac
1197 eval $ac_envvar=\$ac_optarg
1198 export $ac_envvar ;;
1199
1200 *)
1201 # FIXME: should be removed in autoconf 3.0.
1202 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1203 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1204 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1205 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1206 ;;
1207
1208 esac
1209 done
1210
1211 if test -n "$ac_prev"; then
1212 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1213 as_fn_error $? "missing argument to $ac_option"
1214 fi
1215
1216 if test -n "$ac_unrecognized_opts"; then
1217 case $enable_option_checking in
1218 no) ;;
1219 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1220 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1221 esac
1222 fi
1223
1224 # Check all directory arguments for consistency.
1225 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1226 datadir sysconfdir sharedstatedir localstatedir includedir \
1227 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1228 libdir localedir mandir
1229 do
1230 eval ac_val=\$$ac_var
1231 # Remove trailing slashes.
1232 case $ac_val in
1233 */ )
1234 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1235 eval $ac_var=\$ac_val;;
1236 esac
1237 # Be sure to have absolute directory names.
1238 case $ac_val in
1239 [\\/$]* | ?:[\\/]* ) continue;;
1240 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1241 esac
1242 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1243 done
1244
1245 # There might be people who depend on the old broken behavior: `$host'
1246 # used to hold the argument of --host etc.
1247 # FIXME: To remove some day.
1248 build=$build_alias
1249 host=$host_alias
1250 target=$target_alias
1251
1252 # FIXME: To remove some day.
1253 if test "x$host_alias" != x; then
1254 if test "x$build_alias" = x; then
1255 cross_compiling=maybe
1256 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1257 If a cross compiler is detected then cross compile mode will be used" >&2
1258 elif test "x$build_alias" != "x$host_alias"; then
1259 cross_compiling=yes
1260 fi
1261 fi
1262
1263 ac_tool_prefix=
1264 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1265
1266 test "$silent" = yes && exec 6>/dev/null
1267
1268
1269 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1270 ac_ls_di=`ls -di .` &&
1271 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1272 as_fn_error $? "working directory cannot be determined"
1273 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1274 as_fn_error $? "pwd does not report name of working directory"
1275
1276
1277 # Find the source files, if location was not specified.
1278 if test -z "$srcdir"; then
1279 ac_srcdir_defaulted=yes
1280 # Try the directory containing this script, then the parent directory.
1281 ac_confdir=`$as_dirname -- "$as_myself" ||
1282 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1283 X"$as_myself" : 'X\(//\)[^/]' \| \
1284 X"$as_myself" : 'X\(//\)$' \| \
1285 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1286 $as_echo X"$as_myself" |
1287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1288 s//\1/
1289 q
1290 }
1291 /^X\(\/\/\)[^/].*/{
1292 s//\1/
1293 q
1294 }
1295 /^X\(\/\/\)$/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\).*/{
1300 s//\1/
1301 q
1302 }
1303 s/.*/./; q'`
1304 srcdir=$ac_confdir
1305 if test ! -r "$srcdir/$ac_unique_file"; then
1306 srcdir=..
1307 fi
1308 else
1309 ac_srcdir_defaulted=no
1310 fi
1311 if test ! -r "$srcdir/$ac_unique_file"; then
1312 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1313 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1314 fi
1315 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1316 ac_abs_confdir=`(
1317 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1318 pwd)`
1319 # When building in place, set srcdir=.
1320 if test "$ac_abs_confdir" = "$ac_pwd"; then
1321 srcdir=.
1322 fi
1323 # Remove unnecessary trailing slashes from srcdir.
1324 # Double slashes in file names in object file debugging info
1325 # mess up M-x gdb in Emacs.
1326 case $srcdir in
1327 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1328 esac
1329 for ac_var in $ac_precious_vars; do
1330 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1331 eval ac_env_${ac_var}_value=\$${ac_var}
1332 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1333 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1334 done
1335
1336 #
1337 # Report the --help message.
1338 #
1339 if test "$ac_init_help" = "long"; then
1340 # Omit some internal or obsolete options to make the list less imposing.
1341 # This message is too long to be a string in the A/UX 3.1 sh.
1342 cat <<_ACEOF
1343 \`configure' configures realmd 0.1 to adapt to many kinds of systems.
1344
1345 Usage: $0 [OPTION]... [VAR=VALUE]...
1346
1347 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1348 VAR=VALUE. See below for descriptions of some of the useful variables.
1349
1350 Defaults for the options are specified in brackets.
1351
1352 Configuration:
1353 -h, --help display this help and exit
1354 --help=short display options specific to this package
1355 --help=recursive display the short help of all the included packages
1356 -V, --version display version information and exit
1357 -q, --quiet, --silent do not print \`checking ...' messages
1358 --cache-file=FILE cache test results in FILE [disabled]
1359 -C, --config-cache alias for \`--cache-file=config.cache'
1360 -n, --no-create do not create output files
1361 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1362
1363 Installation directories:
1364 --prefix=PREFIX install architecture-independent files in PREFIX
1365 [$ac_default_prefix]
1366 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1367 [PREFIX]
1368
1369 By default, \`make install' will install all the files in
1370 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1371 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1372 for instance \`--prefix=\$HOME'.
1373
1374 For better control, use the options below.
1375
1376 Fine tuning of the installation directories:
1377 --bindir=DIR user executables [EPREFIX/bin]
1378 --sbindir=DIR system admin executables [EPREFIX/sbin]
1379 --libexecdir=DIR program executables [EPREFIX/libexec]
1380 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1381 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1382 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1383 --libdir=DIR object code libraries [EPREFIX/lib]
1384 --includedir=DIR C header files [PREFIX/include]
1385 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1386 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1387 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1388 --infodir=DIR info documentation [DATAROOTDIR/info]
1389 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1390 --mandir=DIR man documentation [DATAROOTDIR/man]
1391 --docdir=DIR documentation root [DATAROOTDIR/doc/realmd]
1392 --htmldir=DIR html documentation [DOCDIR]
1393 --dvidir=DIR dvi documentation [DOCDIR]
1394 --pdfdir=DIR pdf documentation [DOCDIR]
1395 --psdir=DIR ps documentation [DOCDIR]
1396 _ACEOF
1397
1398 cat <<\_ACEOF
1399
1400 Program names:
1401 --program-prefix=PREFIX prepend PREFIX to installed program names
1402 --program-suffix=SUFFIX append SUFFIX to installed program names
1403 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1404 _ACEOF
1405 fi
1406
1407 if test -n "$ac_init_help"; then
1408 case $ac_init_help in
1409 short | recursive ) echo "Configuration of realmd 0.1:";;
1410 esac
1411 cat <<\_ACEOF
1412
1413 Optional Features:
1414 --disable-option-checking ignore unrecognized --enable/--with options
1415 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1416 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1417 --enable-silent-rules less verbose build output (undo: `make V=1')
1418 --disable-silent-rules verbose build output (undo: `make V=0')
1419 --disable-maintainer-mode disable make rules and dependencies not useful
1420 (and sometimes confusing) to the casual installer
1421 --disable-dependency-tracking speeds up one-time build
1422 --enable-dependency-tracking do not reject slow dependency extractors
1423 --disable-nls do not use Native Language Support
1424
1425 --enable-strict Strict code compilation
1426
1427 --enable-debug=no/default/yes
1428 Turn on or off debugging
1429
1430 --enable-coverage Whether to enable coverage testing
1431
1432 Optional Packages:
1433 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1434 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1435 --with-distro Configure for a specific distribution (eg: redhat)
1436
1437 Some influential environment variables:
1438 CC C compiler command
1439 CFLAGS C compiler flags
1440 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1441 nonstandard directory <lib dir>
1442 LIBS libraries to pass to the linker, e.g. -l<library>
1443 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1444 you have headers in a nonstandard directory <include dir>
1445 CPP C preprocessor
1446 PKG_CONFIG path to pkg-config utility
1447 PKG_CONFIG_PATH
1448 directories to add to pkg-config's search path
1449 PKG_CONFIG_LIBDIR
1450 path overriding pkg-config's built-in search path
1451 GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config
1452 GLIB_LIBS linker flags for GLIB, overriding pkg-config
1453 PACKAGEKIT_CFLAGS
1454 C compiler flags for PACKAGEKIT, overriding pkg-config
1455 PACKAGEKIT_LIBS
1456 linker flags for PACKAGEKIT, overriding pkg-config
1457 POLKIT_CFLAGS
1458 C compiler flags for POLKIT, overriding pkg-config
1459 POLKIT_LIBS linker flags for POLKIT, overriding pkg-config
1460 KRB5_CFLAGS C compiler flags for kerberos, overriding krb5-config
1461 KRB5_LIBS linker flags for kerberos, overriding krb5-config
1462
1463 Use these variables to override the choices made by `configure' or to help
1464 it to find libraries and programs with nonstandard names/locations.
1465
1466 Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=realmd>.
1467 _ACEOF
1468 ac_status=$?
1469 fi
1470
1471 if test "$ac_init_help" = "recursive"; then
1472 # If there are subdirs, report their specific --help.
1473 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1474 test -d "$ac_dir" ||
1475 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1476 continue
1477 ac_builddir=.
1478
1479 case "$ac_dir" in
1480 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1481 *)
1482 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1483 # A ".." for each directory in $ac_dir_suffix.
1484 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1485 case $ac_top_builddir_sub in
1486 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1487 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1488 esac ;;
1489 esac
1490 ac_abs_top_builddir=$ac_pwd
1491 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1492 # for backward compatibility:
1493 ac_top_builddir=$ac_top_build_prefix
1494
1495 case $srcdir in
1496 .) # We are building in place.
1497 ac_srcdir=.
1498 ac_top_srcdir=$ac_top_builddir_sub
1499 ac_abs_top_srcdir=$ac_pwd ;;
1500 [\\/]* | ?:[\\/]* ) # Absolute name.
1501 ac_srcdir=$srcdir$ac_dir_suffix;
1502 ac_top_srcdir=$srcdir
1503 ac_abs_top_srcdir=$srcdir ;;
1504 *) # Relative name.
1505 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1506 ac_top_srcdir=$ac_top_build_prefix$srcdir
1507 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1508 esac
1509 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1510
1511 cd "$ac_dir" || { ac_status=$?; continue; }
1512 # Check for guested configure.
1513 if test -f "$ac_srcdir/configure.gnu"; then
1514 echo &&
1515 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1516 elif test -f "$ac_srcdir/configure"; then
1517 echo &&
1518 $SHELL "$ac_srcdir/configure" --help=recursive
1519 else
1520 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1521 fi || ac_status=$?
1522 cd "$ac_pwd" || { ac_status=$?; break; }
1523 done
1524 fi
1525
1526 test -n "$ac_init_help" && exit $ac_status
1527 if $ac_init_version; then
1528 cat <<\_ACEOF
1529 realmd configure 0.1
1530 generated by GNU Autoconf 2.68
1531
1532 Copyright (C) 2010 Free Software Foundation, Inc.
1533 This configure script is free software; the Free Software Foundation
1534 gives unlimited permission to copy, distribute and modify it.
1535 _ACEOF
1536 exit
1537 fi
1538
1539 ## ------------------------ ##
1540 ## Autoconf initialization. ##
1541 ## ------------------------ ##
1542
1543 # ac_fn_c_try_compile LINENO
1544 # --------------------------
1545 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1546 ac_fn_c_try_compile ()
1547 {
1548 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1549 rm -f conftest.$ac_objext
1550 if { { ac_try="$ac_compile"
1551 case "(($ac_try" in
1552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1553 *) ac_try_echo=$ac_try;;
1554 esac
1555 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1556 $as_echo "$ac_try_echo"; } >&5
1557 (eval "$ac_compile") 2>conftest.err
1558 ac_status=$?
1559 if test -s conftest.err; then
1560 grep -v '^ *+' conftest.err >conftest.er1
1561 cat conftest.er1 >&5
1562 mv -f conftest.er1 conftest.err
1563 fi
1564 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1565 test $ac_status = 0; } && {
1566 test -z "$ac_c_werror_flag" ||
1567 test ! -s conftest.err
1568 } && test -s conftest.$ac_objext; then :
1569 ac_retval=0
1570 else
1571 $as_echo "$as_me: failed program was:" >&5
1572 sed 's/^/| /' conftest.$ac_ext >&5
1573
1574 ac_retval=1
1575 fi
1576 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1577 as_fn_set_status $ac_retval
1578
1579 } # ac_fn_c_try_compile
1580
1581 # ac_fn_c_try_cpp LINENO
1582 # ----------------------
1583 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1584 ac_fn_c_try_cpp ()
1585 {
1586 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1587 if { { ac_try="$ac_cpp conftest.$ac_ext"
1588 case "(($ac_try" in
1589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1590 *) ac_try_echo=$ac_try;;
1591 esac
1592 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1593 $as_echo "$ac_try_echo"; } >&5
1594 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1595 ac_status=$?
1596 if test -s conftest.err; then
1597 grep -v '^ *+' conftest.err >conftest.er1
1598 cat conftest.er1 >&5
1599 mv -f conftest.er1 conftest.err
1600 fi
1601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1602 test $ac_status = 0; } > conftest.i && {
1603 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1604 test ! -s conftest.err
1605 }; then :
1606 ac_retval=0
1607 else
1608 $as_echo "$as_me: failed program was:" >&5
1609 sed 's/^/| /' conftest.$ac_ext >&5
1610
1611 ac_retval=1
1612 fi
1613 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1614 as_fn_set_status $ac_retval
1615
1616 } # ac_fn_c_try_cpp
1617
1618 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1619 # -------------------------------------------------------
1620 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1621 # the include files in INCLUDES and setting the cache variable VAR
1622 # accordingly.
1623 ac_fn_c_check_header_mongrel ()
1624 {
1625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1626 if eval \${$3+:} false; then :
1627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1628 $as_echo_n "checking for $2... " >&6; }
1629 if eval \${$3+:} false; then :
1630 $as_echo_n "(cached) " >&6
1631 fi
1632 eval ac_res=\$$3
1633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1634 $as_echo "$ac_res" >&6; }
1635 else
1636 # Is the header compilable?
1637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1638 $as_echo_n "checking $2 usability... " >&6; }
1639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1640 /* end confdefs.h. */
1641 $4
1642 #include <$2>
1643 _ACEOF
1644 if ac_fn_c_try_compile "$LINENO"; then :
1645 ac_header_compiler=yes
1646 else
1647 ac_header_compiler=no
1648 fi
1649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1651 $as_echo "$ac_header_compiler" >&6; }
1652
1653 # Is the header present?
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1655 $as_echo_n "checking $2 presence... " >&6; }
1656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1657 /* end confdefs.h. */
1658 #include <$2>
1659 _ACEOF
1660 if ac_fn_c_try_cpp "$LINENO"; then :
1661 ac_header_preproc=yes
1662 else
1663 ac_header_preproc=no
1664 fi
1665 rm -f conftest.err conftest.i conftest.$ac_ext
1666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1667 $as_echo "$ac_header_preproc" >&6; }
1668
1669 # So? What about this header?
1670 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1671 yes:no: )
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1673 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1675 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1676 ;;
1677 no:yes:* )
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1679 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1681 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1682 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1683 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1684 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1685 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1687 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1688 ( $as_echo "## ----------------------------------------------------------------------- ##
1689 ## Report this to http://bugs.freedesktop.org/enter_bug.cgi?product=realmd ##
1690 ## ----------------------------------------------------------------------- ##"
1691 ) | sed "s/^/$as_me: WARNING: /" >&2
1692 ;;
1693 esac
1694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1695 $as_echo_n "checking for $2... " >&6; }
1696 if eval \${$3+:} false; then :
1697 $as_echo_n "(cached) " >&6
1698 else
1699 eval "$3=\$ac_header_compiler"
1700 fi
1701 eval ac_res=\$$3
1702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1703 $as_echo "$ac_res" >&6; }
1704 fi
1705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1706
1707 } # ac_fn_c_check_header_mongrel
1708
1709 # ac_fn_c_try_run LINENO
1710 # ----------------------
1711 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1712 # that executables *can* be run.
1713 ac_fn_c_try_run ()
1714 {
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1716 if { { ac_try="$ac_link"
1717 case "(($ac_try" in
1718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1719 *) ac_try_echo=$ac_try;;
1720 esac
1721 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1722 $as_echo "$ac_try_echo"; } >&5
1723 (eval "$ac_link") 2>&5
1724 ac_status=$?
1725 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1726 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1727 { { case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730 esac
1731 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1732 $as_echo "$ac_try_echo"; } >&5
1733 (eval "$ac_try") 2>&5
1734 ac_status=$?
1735 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1736 test $ac_status = 0; }; }; then :
1737 ac_retval=0
1738 else
1739 $as_echo "$as_me: program exited with status $ac_status" >&5
1740 $as_echo "$as_me: failed program was:" >&5
1741 sed 's/^/| /' conftest.$ac_ext >&5
1742
1743 ac_retval=$ac_status
1744 fi
1745 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1746 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1747 as_fn_set_status $ac_retval
1748
1749 } # ac_fn_c_try_run
1750
1751 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1752 # -------------------------------------------------------
1753 # Tests whether HEADER exists and can be compiled using the include files in
1754 # INCLUDES, setting the cache variable VAR accordingly.
1755 ac_fn_c_check_header_compile ()
1756 {
1757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1759 $as_echo_n "checking for $2... " >&6; }
1760 if eval \${$3+:} false; then :
1761 $as_echo_n "(cached) " >&6
1762 else
1763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1764 /* end confdefs.h. */
1765 $4
1766 #include <$2>
1767 _ACEOF
1768 if ac_fn_c_try_compile "$LINENO"; then :
1769 eval "$3=yes"
1770 else
1771 eval "$3=no"
1772 fi
1773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1774 fi
1775 eval ac_res=\$$3
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1777 $as_echo "$ac_res" >&6; }
1778 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1779
1780 } # ac_fn_c_check_header_compile
1781
1782 # ac_fn_c_try_link LINENO
1783 # -----------------------
1784 # Try to link conftest.$ac_ext, and return whether this succeeded.
1785 ac_fn_c_try_link ()
1786 {
1787 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1788 rm -f conftest.$ac_objext conftest$ac_exeext
1789 if { { ac_try="$ac_link"
1790 case "(($ac_try" in
1791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1792 *) ac_try_echo=$ac_try;;
1793 esac
1794 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1795 $as_echo "$ac_try_echo"; } >&5
1796 (eval "$ac_link") 2>conftest.err
1797 ac_status=$?
1798 if test -s conftest.err; then
1799 grep -v '^ *+' conftest.err >conftest.er1
1800 cat conftest.er1 >&5
1801 mv -f conftest.er1 conftest.err
1802 fi
1803 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1804 test $ac_status = 0; } && {
1805 test -z "$ac_c_werror_flag" ||
1806 test ! -s conftest.err
1807 } && test -s conftest$ac_exeext && {
1808 test "$cross_compiling" = yes ||
1809 $as_test_x conftest$ac_exeext
1810 }; then :
1811 ac_retval=0
1812 else
1813 $as_echo "$as_me: failed program was:" >&5
1814 sed 's/^/| /' conftest.$ac_ext >&5
1815
1816 ac_retval=1
1817 fi
1818 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1819 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1820 # interfere with the next link command; also delete a directory that is
1821 # left behind by Apple's compiler. We do this before executing the actions.
1822 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1823 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1824 as_fn_set_status $ac_retval
1825
1826 } # ac_fn_c_try_link
1827
1828 # ac_fn_c_check_func LINENO FUNC VAR
1829 # ----------------------------------
1830 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1831 ac_fn_c_check_func ()
1832 {
1833 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1835 $as_echo_n "checking for $2... " >&6; }
1836 if eval \${$3+:} false; then :
1837 $as_echo_n "(cached) " >&6
1838 else
1839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1840 /* end confdefs.h. */
1841 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1842 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1843 #define $2 innocuous_$2
1844
1845 /* System header to define __stub macros and hopefully few prototypes,
1846 which can conflict with char $2 (); below.
1847 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1848 <limits.h> exists even on freestanding compilers. */
1849
1850 #ifdef __STDC__
1851 # include <limits.h>
1852 #else
1853 # include <assert.h>
1854 #endif
1855
1856 #undef $2
1857
1858 /* Override any GCC internal prototype to avoid an error.
1859 Use char because int might match the return type of a GCC
1860 builtin and then its argument prototype would still apply. */
1861 #ifdef __cplusplus
1862 extern "C"
1863 #endif
1864 char $2 ();
1865 /* The GNU C library defines this for functions which it implements
1866 to always fail with ENOSYS. Some functions are actually named
1867 something starting with __ and the normal name is an alias. */
1868 #if defined __stub_$2 || defined __stub___$2
1869 choke me
1870 #endif
1871
1872 int
1873 main ()
1874 {
1875 return $2 ();
1876 ;
1877 return 0;
1878 }
1879 _ACEOF
1880 if ac_fn_c_try_link "$LINENO"; then :
1881 eval "$3=yes"
1882 else
1883 eval "$3=no"
1884 fi
1885 rm -f core conftest.err conftest.$ac_objext \
1886 conftest$ac_exeext conftest.$ac_ext
1887 fi
1888 eval ac_res=\$$3
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1890 $as_echo "$ac_res" >&6; }
1891 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1892
1893 } # ac_fn_c_check_func
1894 cat >config.log <<_ACEOF
1895 This file contains any messages produced by compilers while
1896 running configure, to aid debugging if configure makes a mistake.
1897
1898 It was created by realmd $as_me 0.1, which was
1899 generated by GNU Autoconf 2.68. Invocation command line was
1900
1901 $ $0 $@
1902
1903 _ACEOF
1904 exec 5>>config.log
1905 {
1906 cat <<_ASUNAME
1907 ## --------- ##
1908 ## Platform. ##
1909 ## --------- ##
1910
1911 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1912 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1913 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1914 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1915 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1916
1917 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1918 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1919
1920 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1921 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1922 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1923 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1924 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1925 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1926 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1927
1928 _ASUNAME
1929
1930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1931 for as_dir in $PATH
1932 do
1933 IFS=$as_save_IFS
1934 test -z "$as_dir" && as_dir=.
1935 $as_echo "PATH: $as_dir"
1936 done
1937 IFS=$as_save_IFS
1938
1939 } >&5
1940
1941 cat >&5 <<_ACEOF
1942
1943
1944 ## ----------- ##
1945 ## Core tests. ##
1946 ## ----------- ##
1947
1948 _ACEOF
1949
1950
1951 # Keep a trace of the command line.
1952 # Strip out --no-create and --no-recursion so they do not pile up.
1953 # Strip out --silent because we don't want to record it for future runs.
1954 # Also quote any args containing shell meta-characters.
1955 # Make two passes to allow for proper duplicate-argument suppression.
1956 ac_configure_args=
1957 ac_configure_args0=
1958 ac_configure_args1=
1959 ac_must_keep_next=false
1960 for ac_pass in 1 2
1961 do
1962 for ac_arg
1963 do
1964 case $ac_arg in
1965 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1966 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1967 | -silent | --silent | --silen | --sile | --sil)
1968 continue ;;
1969 *\'*)
1970 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1971 esac
1972 case $ac_pass in
1973 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1974 2)
1975 as_fn_append ac_configure_args1 " '$ac_arg'"
1976 if test $ac_must_keep_next = true; then
1977 ac_must_keep_next=false # Got value, back to normal.
1978 else
1979 case $ac_arg in
1980 *=* | --config-cache | -C | -disable-* | --disable-* \
1981 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1982 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1983 | -with-* | --with-* | -without-* | --without-* | --x)
1984 case "$ac_configure_args0 " in
1985 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1986 esac
1987 ;;
1988 -* ) ac_must_keep_next=true ;;
1989 esac
1990 fi
1991 as_fn_append ac_configure_args " '$ac_arg'"
1992 ;;
1993 esac
1994 done
1995 done
1996 { ac_configure_args0=; unset ac_configure_args0;}
1997 { ac_configure_args1=; unset ac_configure_args1;}
1998
1999 # When interrupted or exit'd, cleanup temporary files, and complete
2000 # config.log. We remove comments because anyway the quotes in there
2001 # would cause problems or look ugly.
2002 # WARNING: Use '\'' to represent an apostrophe within the trap.
2003 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2004 trap 'exit_status=$?
2005 # Save into config.log some information that might help in debugging.
2006 {
2007 echo
2008
2009 $as_echo "## ---------------- ##
2010 ## Cache variables. ##
2011 ## ---------------- ##"
2012 echo
2013 # The following way of writing the cache mishandles newlines in values,
2014 (
2015 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2016 eval ac_val=\$$ac_var
2017 case $ac_val in #(
2018 *${as_nl}*)
2019 case $ac_var in #(
2020 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2021 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2022 esac
2023 case $ac_var in #(
2024 _ | IFS | as_nl) ;; #(
2025 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2026 *) { eval $ac_var=; unset $ac_var;} ;;
2027 esac ;;
2028 esac
2029 done
2030 (set) 2>&1 |
2031 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2032 *${as_nl}ac_space=\ *)
2033 sed -n \
2034 "s/'\''/'\''\\\\'\'''\''/g;
2035 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2036 ;; #(
2037 *)
2038 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2039 ;;
2040 esac |
2041 sort
2042 )
2043 echo
2044
2045 $as_echo "## ----------------- ##
2046 ## Output variables. ##
2047 ## ----------------- ##"
2048 echo
2049 for ac_var in $ac_subst_vars
2050 do
2051 eval ac_val=\$$ac_var
2052 case $ac_val in
2053 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2054 esac
2055 $as_echo "$ac_var='\''$ac_val'\''"
2056 done | sort
2057 echo
2058
2059 if test -n "$ac_subst_files"; then
2060 $as_echo "## ------------------- ##
2061 ## File substitutions. ##
2062 ## ------------------- ##"
2063 echo
2064 for ac_var in $ac_subst_files
2065 do
2066 eval ac_val=\$$ac_var
2067 case $ac_val in
2068 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2069 esac
2070 $as_echo "$ac_var='\''$ac_val'\''"
2071 done | sort
2072 echo
2073 fi
2074
2075 if test -s confdefs.h; then
2076 $as_echo "## ----------- ##
2077 ## confdefs.h. ##
2078 ## ----------- ##"
2079 echo
2080 cat confdefs.h
2081 echo
2082 fi
2083 test "$ac_signal" != 0 &&
2084 $as_echo "$as_me: caught signal $ac_signal"
2085 $as_echo "$as_me: exit $exit_status"
2086 } >&5
2087 rm -f core *.core core.conftest.* &&
2088 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2089 exit $exit_status
2090 ' 0
2091 for ac_signal in 1 2 13 15; do
2092 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2093 done
2094 ac_signal=0
2095
2096 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2097 rm -f -r conftest* confdefs.h
2098
2099 $as_echo "/* confdefs.h */" > confdefs.h
2100
2101 # Predefined preprocessor variables.
2102
2103 cat >>confdefs.h <<_ACEOF
2104 #define PACKAGE_NAME "$PACKAGE_NAME"
2105 _ACEOF
2106
2107 cat >>confdefs.h <<_ACEOF
2108 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2109 _ACEOF
2110
2111 cat >>confdefs.h <<_ACEOF
2112 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2113 _ACEOF
2114
2115 cat >>confdefs.h <<_ACEOF
2116 #define PACKAGE_STRING "$PACKAGE_STRING"
2117 _ACEOF
2118
2119 cat >>confdefs.h <<_ACEOF
2120 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2121 _ACEOF
2122
2123 cat >>confdefs.h <<_ACEOF
2124 #define PACKAGE_URL "$PACKAGE_URL"
2125 _ACEOF
2126
2127
2128 # Let the site file select an alternate cache file if it wants to.
2129 # Prefer an explicitly selected file to automatically selected ones.
2130 ac_site_file1=NONE
2131 ac_site_file2=NONE
2132 if test -n "$CONFIG_SITE"; then
2133 # We do not want a PATH search for config.site.
2134 case $CONFIG_SITE in #((
2135 -*) ac_site_file1=./$CONFIG_SITE;;
2136 */*) ac_site_file1=$CONFIG_SITE;;
2137 *) ac_site_file1=./$CONFIG_SITE;;
2138 esac
2139 elif test "x$prefix" != xNONE; then
2140 ac_site_file1=$prefix/share/config.site
2141 ac_site_file2=$prefix/etc/config.site
2142 else
2143 ac_site_file1=$ac_default_prefix/share/config.site
2144 ac_site_file2=$ac_default_prefix/etc/config.site
2145 fi
2146 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2147 do
2148 test "x$ac_site_file" = xNONE && continue
2149 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2150 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2151 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2152 sed 's/^/| /' "$ac_site_file" >&5
2153 . "$ac_site_file" \
2154 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2155 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2156 as_fn_error $? "failed to load site script $ac_site_file
2157 See \`config.log' for more details" "$LINENO" 5; }
2158 fi
2159 done
2160
2161 if test -r "$cache_file"; then
2162 # Some versions of bash will fail to source /dev/null (special files
2163 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2164 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2165 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2166 $as_echo "$as_me: loading cache $cache_file" >&6;}
2167 case $cache_file in
2168 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2169 *) . "./$cache_file";;
2170 esac
2171 fi
2172 else
2173 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2174 $as_echo "$as_me: creating cache $cache_file" >&6;}
2175 >$cache_file
2176 fi
2177
2178 # Check that the precious variables saved in the cache have kept the same
2179 # value.
2180 ac_cache_corrupted=false
2181 for ac_var in $ac_precious_vars; do
2182 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2183 eval ac_new_set=\$ac_env_${ac_var}_set
2184 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2185 eval ac_new_val=\$ac_env_${ac_var}_value
2186 case $ac_old_set,$ac_new_set in
2187 set,)
2188 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2189 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2190 ac_cache_corrupted=: ;;
2191 ,set)
2192 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2193 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2194 ac_cache_corrupted=: ;;
2195 ,);;
2196 *)
2197 if test "x$ac_old_val" != "x$ac_new_val"; then
2198 # differences in whitespace do not lead to failure.
2199 ac_old_val_w=`echo x $ac_old_val`
2200 ac_new_val_w=`echo x $ac_new_val`
2201 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2203 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2204 ac_cache_corrupted=:
2205 else
2206 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2207 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2208 eval $ac_var=\$ac_old_val
2209 fi
2210 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2211 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2212 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2213 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2214 fi;;
2215 esac
2216 # Pass precious variables to config.status.
2217 if test "$ac_new_set" = set; then
2218 case $ac_new_val in
2219 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2220 *) ac_arg=$ac_var=$ac_new_val ;;
2221 esac
2222 case " $ac_configure_args " in
2223 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2224 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2225 esac
2226 fi
2227 done
2228 if $ac_cache_corrupted; then
2229 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2230 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2232 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2233 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2234 fi
2235 ## -------------------- ##
2236 ## Main body of script. ##
2237 ## -------------------- ##
2238
2239 ac_ext=c
2240 ac_cpp='$CPP $CPPFLAGS'
2241 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2242 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2243 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2244
2245
2246
2247 # -----------------------------------------------------------------------------
2248
2249
2250 am__api_version='1.11'
2251
2252 ac_aux_dir=
2253 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2254 if test -f "$ac_dir/install-sh"; then
2255 ac_aux_dir=$ac_dir
2256 ac_install_sh="$ac_aux_dir/install-sh -c"
2257 break
2258 elif test -f "$ac_dir/install.sh"; then
2259 ac_aux_dir=$ac_dir
2260 ac_install_sh="$ac_aux_dir/install.sh -c"
2261 break
2262 elif test -f "$ac_dir/shtool"; then
2263 ac_aux_dir=$ac_dir
2264 ac_install_sh="$ac_aux_dir/shtool install -c"
2265 break
2266 fi
2267 done
2268 if test -z "$ac_aux_dir"; then
2269 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2270 fi
2271
2272 # These three variables are undocumented and unsupported,
2273 # and are intended to be withdrawn in a future Autoconf release.
2274 # They can cause serious problems if a builder's source tree is in a directory
2275 # whose full name contains unusual characters.
2276 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2277 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2278 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2279
2280
2281 # Find a good install program. We prefer a C program (faster),
2282 # so one script is as good as another. But avoid the broken or
2283 # incompatible versions:
2284 # SysV /etc/install, /usr/sbin/install
2285 # SunOS /usr/etc/install
2286 # IRIX /sbin/install
2287 # AIX /bin/install
2288 # AmigaOS /C/install, which installs bootblocks on floppy discs
2289 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2290 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2291 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2292 # OS/2's system install, which has a completely different semantic
2293 # ./install, which can be erroneously created by make from ./install.sh.
2294 # Reject install programs that cannot install multiple files.
2295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2296 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2297 if test -z "$INSTALL"; then
2298 if ${ac_cv_path_install+:} false; then :
2299 $as_echo_n "(cached) " >&6
2300 else
2301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2302 for as_dir in $PATH
2303 do
2304 IFS=$as_save_IFS
2305 test -z "$as_dir" && as_dir=.
2306 # Account for people who put trailing slashes in PATH elements.
2307 case $as_dir/ in #((
2308 ./ | .// | /[cC]/* | \
2309 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2310 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2311 /usr/ucb/* ) ;;
2312 *)
2313 # OSF1 and SCO ODT 3.0 have their own names for install.
2314 # Don't use installbsd from OSF since it installs stuff as root
2315 # by default.
2316 for ac_prog in ginstall scoinst install; do
2317 for ac_exec_ext in '' $ac_executable_extensions; do
2318 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
2319 if test $ac_prog = install &&
2320 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2321 # AIX install. It has an incompatible calling convention.
2322 :
2323 elif test $ac_prog = install &&
2324 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2325 # program-specific install script used by HP pwplus--don't use.
2326 :
2327 else
2328 rm -rf conftest.one conftest.two conftest.dir
2329 echo one > conftest.one
2330 echo two > conftest.two
2331 mkdir conftest.dir
2332 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2333 test -s conftest.one && test -s conftest.two &&
2334 test -s conftest.dir/conftest.one &&
2335 test -s conftest.dir/conftest.two
2336 then
2337 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2338 break 3
2339 fi
2340 fi
2341 fi
2342 done
2343 done
2344 ;;
2345 esac
2346
2347 done
2348 IFS=$as_save_IFS
2349
2350 rm -rf conftest.one conftest.two conftest.dir
2351
2352 fi
2353 if test "${ac_cv_path_install+set}" = set; then
2354 INSTALL=$ac_cv_path_install
2355 else
2356 # As a last resort, use the slow shell script. Don't cache a
2357 # value for INSTALL within a source directory, because that will
2358 # break other packages using the cache if that directory is
2359 # removed, or if the value is a relative name.
2360 INSTALL=$ac_install_sh
2361 fi
2362 fi
2363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2364 $as_echo "$INSTALL" >&6; }
2365
2366 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2367 # It thinks the first close brace ends the variable substitution.
2368 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2369
2370 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2371
2372 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2373
2374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2375 $as_echo_n "checking whether build environment is sane... " >&6; }
2376 # Just in case
2377 sleep 1
2378 echo timestamp > conftest.file
2379 # Reject unsafe characters in $srcdir or the absolute working directory
2380 # name. Accept space and tab only in the latter.
2381 am_lf='
2382 '
2383 case `pwd` in
2384 *[\\\"\#\$\&\'\`$am_lf]*)
2385 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2386 esac
2387 case $srcdir in
2388 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2389 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
2390 esac
2391
2392 # Do `set' in a subshell so we don't clobber the current shell's
2393 # arguments. Must try -L first in case configure is actually a
2394 # symlink; some systems play weird games with the mod time of symlinks
2395 # (eg FreeBSD returns the mod time of the symlink's containing
2396 # directory).
2397 if (
2398 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2399 if test "$*" = "X"; then
2400 # -L didn't work.
2401 set X `ls -t "$srcdir/configure" conftest.file`
2402 fi
2403 rm -f conftest.file
2404 if test "$*" != "X $srcdir/configure conftest.file" \
2405 && test "$*" != "X conftest.file $srcdir/configure"; then
2406
2407 # If neither matched, then we have a broken ls. This can happen
2408 # if, for instance, CONFIG_SHELL is bash and it inherits a
2409 # broken ls alias from the environment. This has actually
2410 # happened. Such a system could not be considered "sane".
2411 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2412 alias in your environment" "$LINENO" 5
2413 fi
2414
2415 test "$2" = conftest.file
2416 )
2417 then
2418 # Ok.
2419 :
2420 else
2421 as_fn_error $? "newly created file is older than distributed files!
2422 Check your system clock" "$LINENO" 5
2423 fi
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2425 $as_echo "yes" >&6; }
2426 test "$program_prefix" != NONE &&
2427 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2428 # Use a double $ so make ignores it.
2429 test "$program_suffix" != NONE &&
2430 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2431 # Double any \ or $.
2432 # By default was `s,x,x', remove it if useless.
2433 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2434 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2435
2436 # expand $ac_aux_dir to an absolute path
2437 am_aux_dir=`cd $ac_aux_dir && pwd`
2438
2439 if test x"${MISSING+set}" != xset; then
2440 case $am_aux_dir in
2441 *\ * | *\ *)
2442 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2443 *)
2444 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2445 esac
2446 fi
2447 # Use eval to expand $SHELL
2448 if eval "$MISSING --run true"; then
2449 am_missing_run="$MISSING --run "
2450 else
2451 am_missing_run=
2452 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
2453 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2454 fi
2455
2456 if test x"${install_sh}" != xset; then
2457 case $am_aux_dir in
2458 *\ * | *\ *)
2459 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2460 *)
2461 install_sh="\${SHELL} $am_aux_dir/install-sh"
2462 esac
2463 fi
2464
2465 # Installed binaries are usually stripped using `strip' when the user
2466 # run `make install-strip'. However `strip' might not be the right
2467 # tool to use in cross-compilation environments, therefore Automake
2468 # will honor the `STRIP' environment variable to overrule this program.
2469 if test "$cross_compiling" != no; then
2470 if test -n "$ac_tool_prefix"; then
2471 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2472 set dummy ${ac_tool_prefix}strip; ac_word=$2
2473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2474 $as_echo_n "checking for $ac_word... " >&6; }
2475 if ${ac_cv_prog_STRIP+:} false; then :
2476 $as_echo_n "(cached) " >&6
2477 else
2478 if test -n "$STRIP"; then
2479 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2480 else
2481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2482 for as_dir in $PATH
2483 do
2484 IFS=$as_save_IFS
2485 test -z "$as_dir" && as_dir=.
2486 for ac_exec_ext in '' $ac_executable_extensions; do
2487 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2488 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2489 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2490 break 2
2491 fi
2492 done
2493 done
2494 IFS=$as_save_IFS
2495
2496 fi
2497 fi
2498 STRIP=$ac_cv_prog_STRIP
2499 if test -n "$STRIP"; then
2500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2501 $as_echo "$STRIP" >&6; }
2502 else
2503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2504 $as_echo "no" >&6; }
2505 fi
2506
2507
2508 fi
2509 if test -z "$ac_cv_prog_STRIP"; then
2510 ac_ct_STRIP=$STRIP
2511 # Extract the first word of "strip", so it can be a program name with args.
2512 set dummy strip; ac_word=$2
2513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2514 $as_echo_n "checking for $ac_word... " >&6; }
2515 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2516 $as_echo_n "(cached) " >&6
2517 else
2518 if test -n "$ac_ct_STRIP"; then
2519 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2520 else
2521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2522 for as_dir in $PATH
2523 do
2524 IFS=$as_save_IFS
2525 test -z "$as_dir" && as_dir=.
2526 for ac_exec_ext in '' $ac_executable_extensions; do
2527 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2528 ac_cv_prog_ac_ct_STRIP="strip"
2529 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2530 break 2
2531 fi
2532 done
2533 done
2534 IFS=$as_save_IFS
2535
2536 fi
2537 fi
2538 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2539 if test -n "$ac_ct_STRIP"; then
2540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2541 $as_echo "$ac_ct_STRIP" >&6; }
2542 else
2543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2544 $as_echo "no" >&6; }
2545 fi
2546
2547 if test "x$ac_ct_STRIP" = x; then
2548 STRIP=":"
2549 else
2550 case $cross_compiling:$ac_tool_warned in
2551 yes:)
2552 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2553 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2554 ac_tool_warned=yes ;;
2555 esac
2556 STRIP=$ac_ct_STRIP
2557 fi
2558 else
2559 STRIP="$ac_cv_prog_STRIP"
2560 fi
2561
2562 fi
2563 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2564
2565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
2566 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2567 if test -z "$MKDIR_P"; then
2568 if ${ac_cv_path_mkdir+:} false; then :
2569 $as_echo_n "(cached) " >&6
2570 else
2571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2572 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2573 do
2574 IFS=$as_save_IFS
2575 test -z "$as_dir" && as_dir=.
2576 for ac_prog in mkdir gmkdir; do
2577 for ac_exec_ext in '' $ac_executable_extensions; do
2578 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
2579 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2580 'mkdir (GNU coreutils) '* | \
2581 'mkdir (coreutils) '* | \
2582 'mkdir (fileutils) '4.1*)
2583 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2584 break 3;;
2585 esac
2586 done
2587 done
2588 done
2589 IFS=$as_save_IFS
2590
2591 fi
2592
2593 test -d ./--version && rmdir ./--version
2594 if test "${ac_cv_path_mkdir+set}" = set; then
2595 MKDIR_P="$ac_cv_path_mkdir -p"
2596 else
2597 # As a last resort, use the slow shell script. Don't cache a
2598 # value for MKDIR_P within a source directory, because that will
2599 # break other packages using the cache if that directory is
2600 # removed, or if the value is a relative name.
2601 MKDIR_P="$ac_install_sh -d"
2602 fi
2603 fi
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
2605 $as_echo "$MKDIR_P" >&6; }
2606
2607 mkdir_p="$MKDIR_P"
2608 case $mkdir_p in
2609 [\\/$]* | ?:[\\/]*) ;;
2610 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
2611 esac
2612
2613 for ac_prog in gawk mawk nawk awk
2614 do
2615 # Extract the first word of "$ac_prog", so it can be a program name with args.
2616 set dummy $ac_prog; ac_word=$2
2617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2618 $as_echo_n "checking for $ac_word... " >&6; }
2619 if ${ac_cv_prog_AWK+:} false; then :
2620 $as_echo_n "(cached) " >&6
2621 else
2622 if test -n "$AWK"; then
2623 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2624 else
2625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2626 for as_dir in $PATH
2627 do
2628 IFS=$as_save_IFS
2629 test -z "$as_dir" && as_dir=.
2630 for ac_exec_ext in '' $ac_executable_extensions; do
2631 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2632 ac_cv_prog_AWK="$ac_prog"
2633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2634 break 2
2635 fi
2636 done
2637 done
2638 IFS=$as_save_IFS
2639
2640 fi
2641 fi
2642 AWK=$ac_cv_prog_AWK
2643 if test -n "$AWK"; then
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2645 $as_echo "$AWK" >&6; }
2646 else
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2648 $as_echo "no" >&6; }
2649 fi
2650
2651
2652 test -n "$AWK" && break
2653 done
2654
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2656 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2657 set x ${MAKE-make}
2658 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2659 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
2660 $as_echo_n "(cached) " >&6
2661 else
2662 cat >conftest.make <<\_ACEOF
2663 SHELL = /bin/sh
2664 all:
2665 @echo '@@@%%%=$(MAKE)=@@@%%%'
2666 _ACEOF
2667 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2668 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2669 *@@@%%%=?*=@@@%%%*)
2670 eval ac_cv_prog_make_${ac_make}_set=yes;;
2671 *)
2672 eval ac_cv_prog_make_${ac_make}_set=no;;
2673 esac
2674 rm -f conftest.make
2675 fi
2676 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2678 $as_echo "yes" >&6; }
2679 SET_MAKE=
2680 else
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2682 $as_echo "no" >&6; }
2683 SET_MAKE="MAKE=${MAKE-make}"
2684 fi
2685
2686 rm -rf .tst 2>/dev/null
2687 mkdir .tst 2>/dev/null
2688 if test -d .tst; then
2689 am__leading_dot=.
2690 else
2691 am__leading_dot=_
2692 fi
2693 rmdir .tst 2>/dev/null
2694
2695 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2696 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2697 # is not polluted with repeated "-I."
2698 am__isrc=' -I$(srcdir)'
2699 # test to see if srcdir already configured
2700 if test -f $srcdir/config.status; then
2701 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2702 fi
2703 fi
2704
2705 # test whether we have cygpath
2706 if test -z "$CYGPATH_W"; then
2707 if (cygpath --version) >/dev/null 2>/dev/null; then
2708 CYGPATH_W='cygpath -w'
2709 else
2710 CYGPATH_W=echo
2711 fi
2712 fi
2713
2714
2715 # Define the identity of the package.
2716 PACKAGE='realmd'
2717 VERSION='0.1'
2718
2719
2720 cat >>confdefs.h <<_ACEOF
2721 #define PACKAGE "$PACKAGE"
2722 _ACEOF
2723
2724
2725 cat >>confdefs.h <<_ACEOF
2726 #define VERSION "$VERSION"
2727 _ACEOF
2728
2729 # Some tools Automake needs.
2730
2731 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2732
2733
2734 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2735
2736
2737 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2738
2739
2740 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2741
2742
2743 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2744
2745 # We need awk for the "check" target. The system "awk" is bad on
2746 # some platforms.
2747 # Always define AMTAR for backward compatibility. Yes, it's still used
2748 # in the wild :-( We should find a proper way to deprecate it ...
2749 AMTAR='$${TAR-tar}'
2750
2751
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
2753 $as_echo_n "checking how to create a ustar tar archive... " >&6; }
2754 # Loop over all known methods to create a tar archive until one works.
2755 _am_tools='gnutar plaintar pax cpio none'
2756 _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
2757 # Do not fold the above two line into one, because Tru64 sh and
2758 # Solaris sh will not grok spaces in the rhs of `-'.
2759 for _am_tool in $_am_tools
2760 do
2761 case $_am_tool in
2762 gnutar)
2763 for _am_tar in tar gnutar gtar;
2764 do
2765 { echo "$as_me:$LINENO: $_am_tar --version" >&5
2766 ($_am_tar --version) >&5 2>&5
2767 ac_status=$?
2768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2769 (exit $ac_status); } && break
2770 done
2771 am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
2772 am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
2773 am__untar="$_am_tar -xf -"
2774 ;;
2775 plaintar)
2776 # Must skip GNU tar: if it does not support --format= it doesn't create
2777 # ustar tarball either.
2778 (tar --version) >/dev/null 2>&1 && continue
2779 am__tar='tar chf - "$$tardir"'
2780 am__tar_='tar chf - "$tardir"'
2781 am__untar='tar xf -'
2782 ;;
2783 pax)
2784 am__tar='pax -L -x ustar -w "$$tardir"'
2785 am__tar_='pax -L -x ustar -w "$tardir"'
2786 am__untar='pax -r'
2787 ;;
2788 cpio)
2789 am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
2790 am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
2791 am__untar='cpio -i -H ustar -d'
2792 ;;
2793 none)
2794 am__tar=false
2795 am__tar_=false
2796 am__untar=false
2797 ;;
2798 esac
2799
2800 # If the value was cached, stop now. We just wanted to have am__tar
2801 # and am__untar set.
2802 test -n "${am_cv_prog_tar_ustar}" && break
2803
2804 # tar/untar a dummy directory, and stop if the command works
2805 rm -rf conftest.dir
2806 mkdir conftest.dir
2807 echo GrepMe > conftest.dir/file
2808 { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
2809 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
2810 ac_status=$?
2811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2812 (exit $ac_status); }
2813 rm -rf conftest.dir
2814 if test -s conftest.tar; then
2815 { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
2816 ($am__untar <conftest.tar) >&5 2>&5
2817 ac_status=$?
2818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2819 (exit $ac_status); }
2820 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2821 fi
2822 done
2823 rm -rf conftest.dir
2824
2825 if ${am_cv_prog_tar_ustar+:} false; then :
2826 $as_echo_n "(cached) " >&6
2827 else
2828 am_cv_prog_tar_ustar=$_am_tool
2829 fi
2830
2831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
2832 $as_echo "$am_cv_prog_tar_ustar" >&6; }
2833
2834
2835
2836
2837
2838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2839 $as_echo_n "checking whether build environment is sane... " >&6; }
2840 # Just in case
2841 sleep 1
2842 echo timestamp > conftest.file
2843 # Reject unsafe characters in $srcdir or the absolute working directory
2844 # name. Accept space and tab only in the latter.
2845 am_lf='
2846 '
2847 case `pwd` in
2848 *[\\\"\#\$\&\'\`$am_lf]*)
2849 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2850 esac
2851 case $srcdir in
2852 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2853 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
2854 esac
2855
2856 # Do `set' in a subshell so we don't clobber the current shell's
2857 # arguments. Must try -L first in case configure is actually a
2858 # symlink; some systems play weird games with the mod time of symlinks
2859 # (eg FreeBSD returns the mod time of the symlink's containing
2860 # directory).
2861 if (
2862 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2863 if test "$*" = "X"; then
2864 # -L didn't work.
2865 set X `ls -t "$srcdir/configure" conftest.file`
2866 fi
2867 rm -f conftest.file
2868 if test "$*" != "X $srcdir/configure conftest.file" \
2869 && test "$*" != "X conftest.file $srcdir/configure"; then
2870
2871 # If neither matched, then we have a broken ls. This can happen
2872 # if, for instance, CONFIG_SHELL is bash and it inherits a
2873 # broken ls alias from the environment. This has actually
2874 # happened. Such a system could not be considered "sane".
2875 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2876 alias in your environment" "$LINENO" 5
2877 fi
2878
2879 test "$2" = conftest.file
2880 )
2881 then
2882 # Ok.
2883 :
2884 else
2885 as_fn_error $? "newly created file is older than distributed files!
2886 Check your system clock" "$LINENO" 5
2887 fi
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2889 $as_echo "yes" >&6; }
2890 ac_config_headers="$ac_config_headers config.h"
2891
2892
2893 # Check whether --enable-silent-rules was given.
2894 if test "${enable_silent_rules+set}" = set; then :
2895 enableval=$enable_silent_rules;
2896 fi
2897
2898 case $enable_silent_rules in
2899 yes) AM_DEFAULT_VERBOSITY=0;;
2900 no) AM_DEFAULT_VERBOSITY=1;;
2901 *) AM_DEFAULT_VERBOSITY=0;;
2902 esac
2903 am_make=${MAKE-make}
2904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
2905 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
2906 if ${am_cv_make_support_nested_variables+:} false; then :
2907 $as_echo_n "(cached) " >&6
2908 else
2909 if $as_echo 'TRUE=$(BAR$(V))
2910 BAR0=false
2911 BAR1=true
2912 V=1
2913 am__doit:
2914 @$(TRUE)
2915 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
2916 am_cv_make_support_nested_variables=yes
2917 else
2918 am_cv_make_support_nested_variables=no
2919 fi
2920 fi
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
2922 $as_echo "$am_cv_make_support_nested_variables" >&6; }
2923 if test $am_cv_make_support_nested_variables = yes; then
2924 AM_V='$(V)'
2925 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2926 else
2927 AM_V=$AM_DEFAULT_VERBOSITY
2928 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2929 fi
2930 AM_BACKSLASH='\'
2931
2932
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2934 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2935 # Check whether --enable-maintainer-mode was given.
2936 if test "${enable_maintainer_mode+set}" = set; then :
2937 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2938 else
2939 USE_MAINTAINER_MODE=yes
2940 fi
2941
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2943 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2944 if test $USE_MAINTAINER_MODE = yes; then
2945 MAINTAINER_MODE_TRUE=
2946 MAINTAINER_MODE_FALSE='#'
2947 else
2948 MAINTAINER_MODE_TRUE='#'
2949 MAINTAINER_MODE_FALSE=
2950 fi
2951
2952 MAINT=$MAINTAINER_MODE_TRUE
2953
2954
2955
2956 # -----------------------------------------------------------------------------
2957 # Distro Detection
2958
2959
2960 # Check whether --with-distro was given.
2961 if test "${with_distro+set}" = set; then :
2962 withval=$with_distro; DISTRO=$withval
2963 fi
2964
2965
2966 if test -z $DISTRO; then
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /etc/redhat-release" >&5
2968 $as_echo_n "checking for /etc/redhat-release... " >&6; }
2969 if ${ac_cv_file__etc_redhat_release+:} false; then :
2970 $as_echo_n "(cached) " >&6
2971 else
2972 test "$cross_compiling" = yes &&
2973 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
2974 if test -r "/etc/redhat-release"; then
2975 ac_cv_file__etc_redhat_release=yes
2976 else
2977 ac_cv_file__etc_redhat_release=no
2978 fi
2979 fi
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__etc_redhat_release" >&5
2981 $as_echo "$ac_cv_file__etc_redhat_release" >&6; }
2982 if test "x$ac_cv_file__etc_redhat_release" = xyes; then :
2983 DISTRO="redhat"
2984 fi
2985
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /etc/debian_version" >&5
2987 $as_echo_n "checking for /etc/debian_version... " >&6; }
2988 if ${ac_cv_file__etc_debian_version+:} false; then :
2989 $as_echo_n "(cached) " >&6
2990 else
2991 test "$cross_compiling" = yes &&
2992 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
2993 if test -r "/etc/debian_version"; then
2994 ac_cv_file__etc_debian_version=yes
2995 else
2996 ac_cv_file__etc_debian_version=no
2997 fi
2998 fi
2999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__etc_debian_version" >&5
3000 $as_echo "$ac_cv_file__etc_debian_version" >&6; }
3001 if test "x$ac_cv_file__etc_debian_version" = xyes; then :
3002 DISTRO="debian"
3003 fi
3004
3005 # Not customized for these yet
3006 fi
3007
3008 if test -z $DISTRO; then
3009 as_fn_error $? "Couldn't detect the distro to configure for. Specify one with --with-distro" "$LINENO" 5
3010 fi
3011
3012
3013
3014 # -----------------------------------------------------------------------------
3015 # Basic tools
3016
3017 DEPDIR="${am__leading_dot}deps"
3018
3019 ac_config_commands="$ac_config_commands depfiles"
3020
3021
3022 am_make=${MAKE-make}
3023 cat > confinc << 'END'
3024 am__doit:
3025 @echo this is the am__doit target
3026 .PHONY: am__doit
3027 END
3028 # If we don't find an include directive, just comment out the code.
3029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3030 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3031 am__include="#"
3032 am__quote=
3033 _am_result=none
3034 # First try GNU make style include.
3035 echo "include confinc" > confmf
3036 # Ignore all kinds of additional output from `make'.
3037 case `$am_make -s -f confmf 2> /dev/null` in #(
3038 *the\ am__doit\ target*)
3039 am__include=include
3040 am__quote=
3041 _am_result=GNU
3042 ;;
3043 esac
3044 # Now try BSD make style include.
3045 if test "$am__include" = "#"; then
3046 echo '.include "confinc"' > confmf
3047 case `$am_make -s -f confmf 2> /dev/null` in #(
3048 *the\ am__doit\ target*)
3049 am__include=.include
3050 am__quote="\""
3051 _am_result=BSD
3052 ;;
3053 esac
3054 fi
3055
3056
3057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3058 $as_echo "$_am_result" >&6; }
3059 rm -f confinc confmf
3060
3061 # Check whether --enable-dependency-tracking was given.
3062 if test "${enable_dependency_tracking+set}" = set; then :
3063 enableval=$enable_dependency_tracking;
3064 fi
3065
3066 if test "x$enable_dependency_tracking" != xno; then
3067 am_depcomp="$ac_aux_dir/depcomp"
3068 AMDEPBACKSLASH='\'
3069 am__nodep='_no'
3070 fi
3071 if test "x$enable_dependency_tracking" != xno; then
3072 AMDEP_TRUE=
3073 AMDEP_FALSE='#'
3074 else
3075 AMDEP_TRUE='#'
3076 AMDEP_FALSE=
3077 fi
3078
3079
3080 ac_ext=c
3081 ac_cpp='$CPP $CPPFLAGS'
3082 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3083 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3085 if test -n "$ac_tool_prefix"; then
3086 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3087 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3089 $as_echo_n "checking for $ac_word... " >&6; }
3090 if ${ac_cv_prog_CC+:} false; then :
3091 $as_echo_n "(cached) " >&6
3092 else
3093 if test -n "$CC"; then
3094 ac_cv_prog_CC="$CC" # Let the user override the test.
3095 else
3096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3097 for as_dir in $PATH
3098 do
3099 IFS=$as_save_IFS
3100 test -z "$as_dir" && as_dir=.
3101 for ac_exec_ext in '' $ac_executable_extensions; do
3102 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3103 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3105 break 2
3106 fi
3107 done
3108 done
3109 IFS=$as_save_IFS
3110
3111 fi
3112 fi
3113 CC=$ac_cv_prog_CC
3114 if test -n "$CC"; then
3115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3116 $as_echo "$CC" >&6; }
3117 else
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3119 $as_echo "no" >&6; }
3120 fi
3121
3122
3123 fi
3124 if test -z "$ac_cv_prog_CC"; then
3125 ac_ct_CC=$CC
3126 # Extract the first word of "gcc", so it can be a program name with args.
3127 set dummy gcc; ac_word=$2
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3129 $as_echo_n "checking for $ac_word... " >&6; }
3130 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3131 $as_echo_n "(cached) " >&6
3132 else
3133 if test -n "$ac_ct_CC"; then
3134 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3135 else
3136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3137 for as_dir in $PATH
3138 do
3139 IFS=$as_save_IFS
3140 test -z "$as_dir" && as_dir=.
3141 for ac_exec_ext in '' $ac_executable_extensions; do
3142 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3143 ac_cv_prog_ac_ct_CC="gcc"
3144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3145 break 2
3146 fi
3147 done
3148 done
3149 IFS=$as_save_IFS
3150
3151 fi
3152 fi
3153 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3154 if test -n "$ac_ct_CC"; then
3155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3156 $as_echo "$ac_ct_CC" >&6; }
3157 else
3158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3159 $as_echo "no" >&6; }
3160 fi
3161
3162 if test "x$ac_ct_CC" = x; then
3163 CC=""
3164 else
3165 case $cross_compiling:$ac_tool_warned in
3166 yes:)
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3168 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3169 ac_tool_warned=yes ;;
3170 esac
3171 CC=$ac_ct_CC
3172 fi
3173 else
3174 CC="$ac_cv_prog_CC"
3175 fi
3176
3177 if test -z "$CC"; then
3178 if test -n "$ac_tool_prefix"; then
3179 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3180 set dummy ${ac_tool_prefix}cc; ac_word=$2
3181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3182 $as_echo_n "checking for $ac_word... " >&6; }
3183 if ${ac_cv_prog_CC+:} false; then :
3184 $as_echo_n "(cached) " >&6
3185 else
3186 if test -n "$CC"; then
3187 ac_cv_prog_CC="$CC" # Let the user override the test.
3188 else
3189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3190 for as_dir in $PATH
3191 do
3192 IFS=$as_save_IFS
3193 test -z "$as_dir" && as_dir=.
3194 for ac_exec_ext in '' $ac_executable_extensions; do
3195 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3196 ac_cv_prog_CC="${ac_tool_prefix}cc"
3197 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3198 break 2
3199 fi
3200 done
3201 done
3202 IFS=$as_save_IFS
3203
3204 fi
3205 fi
3206 CC=$ac_cv_prog_CC
3207 if test -n "$CC"; then
3208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3209 $as_echo "$CC" >&6; }
3210 else
3211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3212 $as_echo "no" >&6; }
3213 fi
3214
3215
3216 fi
3217 fi
3218 if test -z "$CC"; then
3219 # Extract the first word of "cc", so it can be a program name with args.
3220 set dummy cc; ac_word=$2
3221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3222 $as_echo_n "checking for $ac_word... " >&6; }
3223 if ${ac_cv_prog_CC+:} false; then :
3224 $as_echo_n "(cached) " >&6
3225 else
3226 if test -n "$CC"; then
3227 ac_cv_prog_CC="$CC" # Let the user override the test.
3228 else
3229 ac_prog_rejected=no
3230 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3231 for as_dir in $PATH
3232 do
3233 IFS=$as_save_IFS
3234 test -z "$as_dir" && as_dir=.
3235 for ac_exec_ext in '' $ac_executable_extensions; do
3236 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3237 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3238 ac_prog_rejected=yes
3239 continue
3240 fi
3241 ac_cv_prog_CC="cc"
3242 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3243 break 2
3244 fi
3245 done
3246 done
3247 IFS=$as_save_IFS
3248
3249 if test $ac_prog_rejected = yes; then
3250 # We found a bogon in the path, so make sure we never use it.
3251 set dummy $ac_cv_prog_CC
3252 shift
3253 if test $# != 0; then
3254 # We chose a different compiler from the bogus one.
3255 # However, it has the same basename, so the bogon will be chosen
3256 # first if we set CC to just the basename; use the full file name.
3257 shift
3258 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3259 fi
3260 fi
3261 fi
3262 fi
3263 CC=$ac_cv_prog_CC
3264 if test -n "$CC"; then
3265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3266 $as_echo "$CC" >&6; }
3267 else
3268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3269 $as_echo "no" >&6; }
3270 fi
3271
3272
3273 fi
3274 if test -z "$CC"; then
3275 if test -n "$ac_tool_prefix"; then
3276 for ac_prog in cl.exe
3277 do
3278 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3279 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3281 $as_echo_n "checking for $ac_word... " >&6; }
3282 if ${ac_cv_prog_CC+:} false; then :
3283 $as_echo_n "(cached) " >&6
3284 else
3285 if test -n "$CC"; then
3286 ac_cv_prog_CC="$CC" # Let the user override the test.
3287 else
3288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3289 for as_dir in $PATH
3290 do
3291 IFS=$as_save_IFS
3292 test -z "$as_dir" && as_dir=.
3293 for ac_exec_ext in '' $ac_executable_extensions; do
3294 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3295 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3297 break 2
3298 fi
3299 done
3300 done
3301 IFS=$as_save_IFS
3302
3303 fi
3304 fi
3305 CC=$ac_cv_prog_CC
3306 if test -n "$CC"; then
3307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3308 $as_echo "$CC" >&6; }
3309 else
3310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3311 $as_echo "no" >&6; }
3312 fi
3313
3314
3315 test -n "$CC" && break
3316 done
3317 fi
3318 if test -z "$CC"; then
3319 ac_ct_CC=$CC
3320 for ac_prog in cl.exe
3321 do
3322 # Extract the first word of "$ac_prog", so it can be a program name with args.
3323 set dummy $ac_prog; ac_word=$2
3324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3325 $as_echo_n "checking for $ac_word... " >&6; }
3326 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3327 $as_echo_n "(cached) " >&6
3328 else
3329 if test -n "$ac_ct_CC"; then
3330 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3331 else
3332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3333 for as_dir in $PATH
3334 do
3335 IFS=$as_save_IFS
3336 test -z "$as_dir" && as_dir=.
3337 for ac_exec_ext in '' $ac_executable_extensions; do
3338 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3339 ac_cv_prog_ac_ct_CC="$ac_prog"
3340 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3341 break 2
3342 fi
3343 done
3344 done
3345 IFS=$as_save_IFS
3346
3347 fi
3348 fi
3349 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3350 if test -n "$ac_ct_CC"; then
3351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3352 $as_echo "$ac_ct_CC" >&6; }
3353 else
3354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3355 $as_echo "no" >&6; }
3356 fi
3357
3358
3359 test -n "$ac_ct_CC" && break
3360 done
3361
3362 if test "x$ac_ct_CC" = x; then
3363 CC=""
3364 else
3365 case $cross_compiling:$ac_tool_warned in
3366 yes:)
3367 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3368 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3369 ac_tool_warned=yes ;;
3370 esac
3371 CC=$ac_ct_CC
3372 fi
3373 fi
3374
3375 fi
3376
3377
3378 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3379 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3380 as_fn_error $? "no acceptable C compiler found in \$PATH
3381 See \`config.log' for more details" "$LINENO" 5; }
3382
3383 # Provide some information about the compiler.
3384 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3385 set X $ac_compile
3386 ac_compiler=$2
3387 for ac_option in --version -v -V -qversion; do
3388 { { ac_try="$ac_compiler $ac_option >&5"
3389 case "(($ac_try" in
3390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3391 *) ac_try_echo=$ac_try;;
3392 esac
3393 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3394 $as_echo "$ac_try_echo"; } >&5
3395 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3396 ac_status=$?
3397 if test -s conftest.err; then
3398 sed '10a\
3399 ... rest of stderr output deleted ...
3400 10q' conftest.err >conftest.er1
3401 cat conftest.er1 >&5
3402 fi
3403 rm -f conftest.er1 conftest.err
3404 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3405 test $ac_status = 0; }
3406 done
3407
3408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3409 /* end confdefs.h. */
3410
3411 int
3412 main ()
3413 {
3414
3415 ;
3416 return 0;
3417 }
3418 _ACEOF
3419 ac_clean_files_save=$ac_clean_files
3420 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3421 # Try to create an executable without -o first, disregard a.out.
3422 # It will help us diagnose broken compilers, and finding out an intuition
3423 # of exeext.
3424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3425 $as_echo_n "checking whether the C compiler works... " >&6; }
3426 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3427
3428 # The possible output files:
3429 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3430
3431 ac_rmfiles=
3432 for ac_file in $ac_files
3433 do
3434 case $ac_file in
3435 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3436 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3437 esac
3438 done
3439 rm -f $ac_rmfiles
3440
3441 if { { ac_try="$ac_link_default"
3442 case "(($ac_try" in
3443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3444 *) ac_try_echo=$ac_try;;
3445 esac
3446 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3447 $as_echo "$ac_try_echo"; } >&5
3448 (eval "$ac_link_default") 2>&5
3449 ac_status=$?
3450 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3451 test $ac_status = 0; }; then :
3452 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3453 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3454 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3455 # so that the user can short-circuit this test for compilers unknown to
3456 # Autoconf.
3457 for ac_file in $ac_files ''
3458 do
3459 test -f "$ac_file" || continue
3460 case $ac_file in
3461 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3462 ;;
3463 [ab].out )
3464 # We found the default executable, but exeext='' is most
3465 # certainly right.
3466 break;;
3467 *.* )
3468 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3469 then :; else
3470 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3471 fi
3472 # We set ac_cv_exeext here because the later test for it is not
3473 # safe: cross compilers may not add the suffix if given an `-o'
3474 # argument, so we may need to know it at that point already.
3475 # Even if this section looks crufty: it has the advantage of
3476 # actually working.
3477 break;;
3478 * )
3479 break;;
3480 esac
3481 done
3482 test "$ac_cv_exeext" = no && ac_cv_exeext=
3483
3484 else
3485 ac_file=''
3486 fi
3487 if test -z "$ac_file"; then :
3488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3489 $as_echo "no" >&6; }
3490 $as_echo "$as_me: failed program was:" >&5
3491 sed 's/^/| /' conftest.$ac_ext >&5
3492
3493 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3494 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3495 as_fn_error 77 "C compiler cannot create executables
3496 See \`config.log' for more details" "$LINENO" 5; }
3497 else
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3499 $as_echo "yes" >&6; }
3500 fi
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3502 $as_echo_n "checking for C compiler default output file name... " >&6; }
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3504 $as_echo "$ac_file" >&6; }
3505 ac_exeext=$ac_cv_exeext
3506
3507 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3508 ac_clean_files=$ac_clean_files_save
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3510 $as_echo_n "checking for suffix of executables... " >&6; }
3511 if { { ac_try="$ac_link"
3512 case "(($ac_try" in
3513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3514 *) ac_try_echo=$ac_try;;
3515 esac
3516 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3517 $as_echo "$ac_try_echo"; } >&5
3518 (eval "$ac_link") 2>&5
3519 ac_status=$?
3520 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3521 test $ac_status = 0; }; then :
3522 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3523 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3524 # work properly (i.e., refer to `conftest.exe'), while it won't with
3525 # `rm'.
3526 for ac_file in conftest.exe conftest conftest.*; do
3527 test -f "$ac_file" || continue
3528 case $ac_file in
3529 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3530 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3531 break;;
3532 * ) break;;
3533 esac
3534 done
3535 else
3536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3537 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3538 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3539 See \`config.log' for more details" "$LINENO" 5; }
3540 fi
3541 rm -f conftest conftest$ac_cv_exeext
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3543 $as_echo "$ac_cv_exeext" >&6; }
3544
3545 rm -f conftest.$ac_ext
3546 EXEEXT=$ac_cv_exeext
3547 ac_exeext=$EXEEXT
3548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3549 /* end confdefs.h. */
3550 #include <stdio.h>
3551 int
3552 main ()
3553 {
3554 FILE *f = fopen ("conftest.out", "w");
3555 return ferror (f) || fclose (f) != 0;
3556
3557 ;
3558 return 0;
3559 }
3560 _ACEOF
3561 ac_clean_files="$ac_clean_files conftest.out"
3562 # Check that the compiler produces executables we can run. If not, either
3563 # the compiler is broken, or we cross compile.
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3565 $as_echo_n "checking whether we are cross compiling... " >&6; }
3566 if test "$cross_compiling" != yes; then
3567 { { ac_try="$ac_link"
3568 case "(($ac_try" in
3569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3570 *) ac_try_echo=$ac_try;;
3571 esac
3572 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3573 $as_echo "$ac_try_echo"; } >&5
3574 (eval "$ac_link") 2>&5
3575 ac_status=$?
3576 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3577 test $ac_status = 0; }
3578 if { ac_try='./conftest$ac_cv_exeext'
3579 { { case "(($ac_try" in
3580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3581 *) ac_try_echo=$ac_try;;
3582 esac
3583 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3584 $as_echo "$ac_try_echo"; } >&5
3585 (eval "$ac_try") 2>&5
3586 ac_status=$?
3587 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3588 test $ac_status = 0; }; }; then
3589 cross_compiling=no
3590 else
3591 if test "$cross_compiling" = maybe; then
3592 cross_compiling=yes
3593 else
3594 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3595 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3596 as_fn_error $? "cannot run C compiled programs.
3597 If you meant to cross compile, use \`--host'.
3598 See \`config.log' for more details" "$LINENO" 5; }
3599 fi
3600 fi
3601 fi
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3603 $as_echo "$cross_compiling" >&6; }
3604
3605 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3606 ac_clean_files=$ac_clean_files_save
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3608 $as_echo_n "checking for suffix of object files... " >&6; }
3609 if ${ac_cv_objext+:} false; then :
3610 $as_echo_n "(cached) " >&6
3611 else
3612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3613 /* end confdefs.h. */
3614
3615 int
3616 main ()
3617 {
3618
3619 ;
3620 return 0;
3621 }
3622 _ACEOF
3623 rm -f conftest.o conftest.obj
3624 if { { ac_try="$ac_compile"
3625 case "(($ac_try" in
3626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3627 *) ac_try_echo=$ac_try;;
3628 esac
3629 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3630 $as_echo "$ac_try_echo"; } >&5
3631 (eval "$ac_compile") 2>&5
3632 ac_status=$?
3633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3634 test $ac_status = 0; }; then :
3635 for ac_file in conftest.o conftest.obj conftest.*; do
3636 test -f "$ac_file" || continue;
3637 case $ac_file in
3638 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3639 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3640 break;;
3641 esac
3642 done
3643 else
3644 $as_echo "$as_me: failed program was:" >&5
3645 sed 's/^/| /' conftest.$ac_ext >&5
3646
3647 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3648 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3649 as_fn_error $? "cannot compute suffix of object files: cannot compile
3650 See \`config.log' for more details" "$LINENO" 5; }
3651 fi
3652 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3653 fi
3654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3655 $as_echo "$ac_cv_objext" >&6; }
3656 OBJEXT=$ac_cv_objext
3657 ac_objext=$OBJEXT
3658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3659 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3660 if ${ac_cv_c_compiler_gnu+:} false; then :
3661 $as_echo_n "(cached) " >&6
3662 else
3663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3664 /* end confdefs.h. */
3665
3666 int
3667 main ()
3668 {
3669 #ifndef __GNUC__
3670 choke me
3671 #endif
3672
3673 ;
3674 return 0;
3675 }
3676 _ACEOF
3677 if ac_fn_c_try_compile "$LINENO"; then :
3678 ac_compiler_gnu=yes
3679 else
3680 ac_compiler_gnu=no
3681 fi
3682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3683 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3684
3685 fi
3686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3687 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3688 if test $ac_compiler_gnu = yes; then
3689 GCC=yes
3690 else
3691 GCC=
3692 fi
3693 ac_test_CFLAGS=${CFLAGS+set}
3694 ac_save_CFLAGS=$CFLAGS
3695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3696 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3697 if ${ac_cv_prog_cc_g+:} false; then :
3698 $as_echo_n "(cached) " >&6
3699 else
3700 ac_save_c_werror_flag=$ac_c_werror_flag
3701 ac_c_werror_flag=yes
3702 ac_cv_prog_cc_g=no
3703 CFLAGS="-g"
3704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3705 /* end confdefs.h. */
3706
3707 int
3708 main ()
3709 {
3710
3711 ;
3712 return 0;
3713 }
3714 _ACEOF
3715 if ac_fn_c_try_compile "$LINENO"; then :
3716 ac_cv_prog_cc_g=yes
3717 else
3718 CFLAGS=""
3719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3720 /* end confdefs.h. */
3721
3722 int
3723 main ()
3724 {
3725
3726 ;
3727 return 0;
3728 }
3729 _ACEOF
3730 if ac_fn_c_try_compile "$LINENO"; then :
3731
3732 else
3733 ac_c_werror_flag=$ac_save_c_werror_flag
3734 CFLAGS="-g"
3735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3736 /* end confdefs.h. */
3737
3738 int
3739 main ()
3740 {
3741
3742 ;
3743 return 0;
3744 }
3745 _ACEOF
3746 if ac_fn_c_try_compile "$LINENO"; then :
3747 ac_cv_prog_cc_g=yes
3748 fi
3749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3750 fi
3751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3752 fi
3753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3754 ac_c_werror_flag=$ac_save_c_werror_flag
3755 fi
3756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3757 $as_echo "$ac_cv_prog_cc_g" >&6; }
3758 if test "$ac_test_CFLAGS" = set; then
3759 CFLAGS=$ac_save_CFLAGS
3760 elif test $ac_cv_prog_cc_g = yes; then
3761 if test "$GCC" = yes; then
3762 CFLAGS="-g -O2"
3763 else
3764 CFLAGS="-g"
3765 fi
3766 else
3767 if test "$GCC" = yes; then
3768 CFLAGS="-O2"
3769 else
3770 CFLAGS=
3771 fi
3772 fi
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3774 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3775 if ${ac_cv_prog_cc_c89+:} false; then :
3776 $as_echo_n "(cached) " >&6
3777 else
3778 ac_cv_prog_cc_c89=no
3779 ac_save_CC=$CC
3780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3781 /* end confdefs.h. */
3782 #include <stdarg.h>
3783 #include <stdio.h>
3784 #include <sys/types.h>
3785 #include <sys/stat.h>
3786 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3787 struct buf { int x; };
3788 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3789 static char *e (p, i)
3790 char **p;
3791 int i;
3792 {
3793 return p[i];
3794 }
3795 static char *f (char * (*g) (char **, int), char **p, ...)
3796 {
3797 char *s;
3798 va_list v;
3799 va_start (v,p);
3800 s = g (p, va_arg (v,int));
3801 va_end (v);
3802 return s;
3803 }
3804
3805 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3806 function prototypes and stuff, but not '\xHH' hex character constants.
3807 These don't provoke an error unfortunately, instead are silently treated
3808 as 'x'. The following induces an error, until -std is added to get
3809 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3810 array size at least. It's necessary to write '\x00'==0 to get something
3811 that's true only with -std. */
3812 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3813
3814 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3815 inside strings and character constants. */
3816 #define FOO(x) 'x'
3817 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3818
3819 int test (int i, double x);
3820 struct s1 {int (*f) (int a);};
3821 struct s2 {int (*f) (double a);};
3822 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3823 int argc;
3824 char **argv;
3825 int
3826 main ()
3827 {
3828 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3829 ;
3830 return 0;
3831 }
3832 _ACEOF
3833 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3834 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3835 do
3836 CC="$ac_save_CC $ac_arg"
3837 if ac_fn_c_try_compile "$LINENO"; then :
3838 ac_cv_prog_cc_c89=$ac_arg
3839 fi
3840 rm -f core conftest.err conftest.$ac_objext
3841 test "x$ac_cv_prog_cc_c89" != "xno" && break
3842 done
3843 rm -f conftest.$ac_ext
3844 CC=$ac_save_CC
3845
3846 fi
3847 # AC_CACHE_VAL
3848 case "x$ac_cv_prog_cc_c89" in
3849 x)
3850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3851 $as_echo "none needed" >&6; } ;;
3852 xno)
3853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3854 $as_echo "unsupported" >&6; } ;;
3855 *)
3856 CC="$CC $ac_cv_prog_cc_c89"
3857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3858 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3859 esac
3860 if test "x$ac_cv_prog_cc_c89" != xno; then :
3861
3862 fi
3863
3864 ac_ext=c
3865 ac_cpp='$CPP $CPPFLAGS'
3866 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3867 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3868 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3869
3870 depcc="$CC" am_compiler_list=
3871
3872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
3873 $as_echo_n "checking dependency style of $depcc... " >&6; }
3874 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
3875 $as_echo_n "(cached) " >&6
3876 else
3877 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3878 # We make a subdir and do the tests there. Otherwise we can end up
3879 # making bogus files that we don't know about and never remove. For
3880 # instance it was reported that on HP-UX the gcc test will end up
3881 # making a dummy file named `D' -- because `-MD' means `put the output
3882 # in D'.
3883 rm -rf conftest.dir
3884 mkdir conftest.dir
3885 # Copy depcomp to subdir because otherwise we won't find it if we're
3886 # using a relative directory.
3887 cp "$am_depcomp" conftest.dir
3888 cd conftest.dir
3889 # We will build objects and dependencies in a subdirectory because
3890 # it helps to detect inapplicable dependency modes. For instance
3891 # both Tru64's cc and ICC support -MD to output dependencies as a
3892 # side effect of compilation, but ICC will put the dependencies in
3893 # the current directory while Tru64 will put them in the object
3894 # directory.
3895 mkdir sub
3896
3897 am_cv_CC_dependencies_compiler_type=none
3898 if test "$am_compiler_list" = ""; then
3899 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3900 fi
3901 am__universal=false
3902 case " $depcc " in #(
3903 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3904 esac
3905
3906 for depmode in $am_compiler_list; do
3907 # Setup a source with many dependencies, because some compilers
3908 # like to wrap large dependency lists on column 80 (with \), and
3909 # we should not choose a depcomp mode which is confused by this.
3910 #
3911 # We need to recreate these files for each test, as the compiler may
3912 # overwrite some of them when testing with obscure command lines.
3913 # This happens at least with the AIX C compiler.
3914 : > sub/conftest.c
3915 for i in 1 2 3 4 5 6; do
3916 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3917 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3918 # Solaris 8's {/usr,}/bin/sh.
3919 touch sub/conftst$i.h
3920 done
3921 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3922
3923 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3924 # mode. It turns out that the SunPro C++ compiler does not properly
3925 # handle `-M -o', and we need to detect this. Also, some Intel
3926 # versions had trouble with output in subdirs
3927 am__obj=sub/conftest.${OBJEXT-o}
3928 am__minus_obj="-o $am__obj"
3929 case $depmode in
3930 gcc)
3931 # This depmode causes a compiler race in universal mode.
3932 test "$am__universal" = false || continue
3933 ;;
3934 nosideeffect)
3935 # after this tag, mechanisms are not by side-effect, so they'll
3936 # only be used when explicitly requested
3937 if test "x$enable_dependency_tracking" = xyes; then
3938 continue
3939 else
3940 break
3941 fi
3942 ;;
3943 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3944 # This compiler won't grok `-c -o', but also, the minuso test has
3945 # not run yet. These depmodes are late enough in the game, and
3946 # so weak that their functioning should not be impacted.
3947 am__obj=conftest.${OBJEXT-o}
3948 am__minus_obj=
3949 ;;
3950 none) break ;;
3951 esac
3952 if depmode=$depmode \
3953 source=sub/conftest.c object=$am__obj \
3954 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3955 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3956 >/dev/null 2>conftest.err &&
3957 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3958 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3959 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3960 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3961 # icc doesn't choke on unknown options, it will just issue warnings
3962 # or remarks (even with -Werror). So we grep stderr for any message
3963 # that says an option was ignored or not supported.
3964 # When given -MP, icc 7.0 and 7.1 complain thusly:
3965 # icc: Command line warning: ignoring option '-M'; no argument required
3966 # The diagnosis changed in icc 8.0:
3967 # icc: Command line remark: option '-MP' not supported
3968 if (grep 'ignoring option' conftest.err ||
3969 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3970 am_cv_CC_dependencies_compiler_type=$depmode
3971 break
3972 fi
3973 fi
3974 done
3975
3976 cd ..
3977 rm -rf conftest.dir
3978 else
3979 am_cv_CC_dependencies_compiler_type=none
3980 fi
3981
3982 fi
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
3984 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
3985 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3986
3987 if
3988 test "x$enable_dependency_tracking" != xno \
3989 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
3990 am__fastdepCC_TRUE=
3991 am__fastdepCC_FALSE='#'
3992 else
3993 am__fastdepCC_TRUE='#'
3994 am__fastdepCC_FALSE=
3995 fi
3996
3997
3998
3999 ac_ext=c
4000 ac_cpp='$CPP $CPPFLAGS'
4001 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4002 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4003 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4005 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4006 # On Suns, sometimes $CPP names a directory.
4007 if test -n "$CPP" && test -d "$CPP"; then
4008 CPP=
4009 fi
4010 if test -z "$CPP"; then
4011 if ${ac_cv_prog_CPP+:} false; then :
4012 $as_echo_n "(cached) " >&6
4013 else
4014 # Double quotes because CPP needs to be expanded
4015 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4016 do
4017 ac_preproc_ok=false
4018 for ac_c_preproc_warn_flag in '' yes
4019 do
4020 # Use a header file that comes with gcc, so configuring glibc
4021 # with a fresh cross-compiler works.
4022 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4023 # <limits.h> exists even on freestanding compilers.
4024 # On the NeXT, cc -E runs the code through the compiler's parser,
4025 # not just through cpp. "Syntax error" is here to catch this case.
4026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4027 /* end confdefs.h. */
4028 #ifdef __STDC__
4029 # include <limits.h>
4030 #else
4031 # include <assert.h>
4032 #endif
4033 Syntax error
4034 _ACEOF
4035 if ac_fn_c_try_cpp "$LINENO"; then :
4036
4037 else
4038 # Broken: fails on valid input.
4039 continue
4040 fi
4041 rm -f conftest.err conftest.i conftest.$ac_ext
4042
4043 # OK, works on sane cases. Now check whether nonexistent headers
4044 # can be detected and how.
4045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4046 /* end confdefs.h. */
4047 #include <ac_nonexistent.h>
4048 _ACEOF
4049 if ac_fn_c_try_cpp "$LINENO"; then :
4050 # Broken: success on invalid input.
4051 continue
4052 else
4053 # Passes both tests.
4054 ac_preproc_ok=:
4055 break
4056 fi
4057 rm -f conftest.err conftest.i conftest.$ac_ext
4058
4059 done
4060 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4061 rm -f conftest.i conftest.err conftest.$ac_ext
4062 if $ac_preproc_ok; then :
4063 break
4064 fi
4065
4066 done
4067 ac_cv_prog_CPP=$CPP
4068
4069 fi
4070 CPP=$ac_cv_prog_CPP
4071 else
4072 ac_cv_prog_CPP=$CPP
4073 fi
4074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4075 $as_echo "$CPP" >&6; }
4076 ac_preproc_ok=false
4077 for ac_c_preproc_warn_flag in '' yes
4078 do
4079 # Use a header file that comes with gcc, so configuring glibc
4080 # with a fresh cross-compiler works.
4081 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4082 # <limits.h> exists even on freestanding compilers.
4083 # On the NeXT, cc -E runs the code through the compiler's parser,
4084 # not just through cpp. "Syntax error" is here to catch this case.
4085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4086 /* end confdefs.h. */
4087 #ifdef __STDC__
4088 # include <limits.h>
4089 #else
4090 # include <assert.h>
4091 #endif
4092 Syntax error
4093 _ACEOF
4094 if ac_fn_c_try_cpp "$LINENO"; then :
4095
4096 else
4097 # Broken: fails on valid input.
4098 continue
4099 fi
4100 rm -f conftest.err conftest.i conftest.$ac_ext
4101
4102 # OK, works on sane cases. Now check whether nonexistent headers
4103 # can be detected and how.
4104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4105 /* end confdefs.h. */
4106 #include <ac_nonexistent.h>
4107 _ACEOF
4108 if ac_fn_c_try_cpp "$LINENO"; then :
4109 # Broken: success on invalid input.
4110 continue
4111 else
4112 # Passes both tests.
4113 ac_preproc_ok=:
4114 break
4115 fi
4116 rm -f conftest.err conftest.i conftest.$ac_ext
4117
4118 done
4119 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4120 rm -f conftest.i conftest.err conftest.$ac_ext
4121 if $ac_preproc_ok; then :
4122
4123 else
4124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4125 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4126 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4127 See \`config.log' for more details" "$LINENO" 5; }
4128 fi
4129
4130 ac_ext=c
4131 ac_cpp='$CPP $CPPFLAGS'
4132 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4133 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4134 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4135
4136
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4138 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4139 if ${ac_cv_path_GREP+:} false; then :
4140 $as_echo_n "(cached) " >&6
4141 else
4142 if test -z "$GREP"; then
4143 ac_path_GREP_found=false
4144 # Loop through the user's path and test for each of PROGNAME-LIST
4145 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4146 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4147 do
4148 IFS=$as_save_IFS
4149 test -z "$as_dir" && as_dir=.
4150 for ac_prog in grep ggrep; do
4151 for ac_exec_ext in '' $ac_executable_extensions; do
4152 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4153 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4154 # Check for GNU ac_path_GREP and select it if it is found.
4155 # Check for GNU $ac_path_GREP
4156 case `"$ac_path_GREP" --version 2>&1` in
4157 *GNU*)
4158 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4159 *)
4160 ac_count=0
4161 $as_echo_n 0123456789 >"conftest.in"
4162 while :
4163 do
4164 cat "conftest.in" "conftest.in" >"conftest.tmp"
4165 mv "conftest.tmp" "conftest.in"
4166 cp "conftest.in" "conftest.nl"
4167 $as_echo 'GREP' >> "conftest.nl"
4168 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4169 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4170 as_fn_arith $ac_count + 1 && ac_count=$as_val
4171 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4172 # Best one so far, save it but keep looking for a better one
4173 ac_cv_path_GREP="$ac_path_GREP"
4174 ac_path_GREP_max=$ac_count
4175 fi
4176 # 10*(2^10) chars as input seems more than enough
4177 test $ac_count -gt 10 && break
4178 done
4179 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4180 esac
4181
4182 $ac_path_GREP_found && break 3
4183 done
4184 done
4185 done
4186 IFS=$as_save_IFS
4187 if test -z "$ac_cv_path_GREP"; then
4188 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4189 fi
4190 else
4191 ac_cv_path_GREP=$GREP
4192 fi
4193
4194 fi
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4196 $as_echo "$ac_cv_path_GREP" >&6; }
4197 GREP="$ac_cv_path_GREP"
4198
4199
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4201 $as_echo_n "checking for egrep... " >&6; }
4202 if ${ac_cv_path_EGREP+:} false; then :
4203 $as_echo_n "(cached) " >&6
4204 else
4205 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4206 then ac_cv_path_EGREP="$GREP -E"
4207 else
4208 if test -z "$EGREP"; then
4209 ac_path_EGREP_found=false
4210 # Loop through the user's path and test for each of PROGNAME-LIST
4211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4212 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4213 do
4214 IFS=$as_save_IFS
4215 test -z "$as_dir" && as_dir=.
4216 for ac_prog in egrep; do
4217 for ac_exec_ext in '' $ac_executable_extensions; do
4218 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4219 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4220 # Check for GNU ac_path_EGREP and select it if it is found.
4221 # Check for GNU $ac_path_EGREP
4222 case `"$ac_path_EGREP" --version 2>&1` in
4223 *GNU*)
4224 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4225 *)
4226 ac_count=0
4227 $as_echo_n 0123456789 >"conftest.in"
4228 while :
4229 do
4230 cat "conftest.in" "conftest.in" >"conftest.tmp"
4231 mv "conftest.tmp" "conftest.in"
4232 cp "conftest.in" "conftest.nl"
4233 $as_echo 'EGREP' >> "conftest.nl"
4234 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4235 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4236 as_fn_arith $ac_count + 1 && ac_count=$as_val
4237 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4238 # Best one so far, save it but keep looking for a better one
4239 ac_cv_path_EGREP="$ac_path_EGREP"
4240 ac_path_EGREP_max=$ac_count
4241 fi
4242 # 10*(2^10) chars as input seems more than enough
4243 test $ac_count -gt 10 && break
4244 done
4245 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4246 esac
4247
4248 $ac_path_EGREP_found && break 3
4249 done
4250 done
4251 done
4252 IFS=$as_save_IFS
4253 if test -z "$ac_cv_path_EGREP"; then
4254 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4255 fi
4256 else
4257 ac_cv_path_EGREP=$EGREP
4258 fi
4259
4260 fi
4261 fi
4262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4263 $as_echo "$ac_cv_path_EGREP" >&6; }
4264 EGREP="$ac_cv_path_EGREP"
4265
4266
4267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4268 $as_echo_n "checking for ANSI C header files... " >&6; }
4269 if ${ac_cv_header_stdc+:} false; then :
4270 $as_echo_n "(cached) " >&6
4271 else
4272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4273 /* end confdefs.h. */
4274 #include <stdlib.h>
4275 #include <stdarg.h>
4276 #include <string.h>
4277 #include <float.h>
4278
4279 int
4280 main ()
4281 {
4282
4283 ;
4284 return 0;
4285 }
4286 _ACEOF
4287 if ac_fn_c_try_compile "$LINENO"; then :
4288 ac_cv_header_stdc=yes
4289 else
4290 ac_cv_header_stdc=no
4291 fi
4292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4293
4294 if test $ac_cv_header_stdc = yes; then
4295 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4297 /* end confdefs.h. */
4298 #include <string.h>
4299
4300 _ACEOF
4301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4302 $EGREP "memchr" >/dev/null 2>&1; then :
4303
4304 else
4305 ac_cv_header_stdc=no
4306 fi
4307 rm -f conftest*
4308
4309 fi
4310
4311 if test $ac_cv_header_stdc = yes; then
4312 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4314 /* end confdefs.h. */
4315 #include <stdlib.h>
4316
4317 _ACEOF
4318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4319 $EGREP "free" >/dev/null 2>&1; then :
4320
4321 else
4322 ac_cv_header_stdc=no
4323 fi
4324 rm -f conftest*
4325
4326 fi
4327
4328 if test $ac_cv_header_stdc = yes; then
4329 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4330 if test "$cross_compiling" = yes; then :
4331 :
4332 else
4333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4334 /* end confdefs.h. */
4335 #include <ctype.h>
4336 #include <stdlib.h>
4337 #if ((' ' & 0x0FF) == 0x020)
4338 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4339 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4340 #else
4341 # define ISLOWER(c) \
4342 (('a' <= (c) && (c) <= 'i') \
4343 || ('j' <= (c) && (c) <= 'r') \
4344 || ('s' <= (c) && (c) <= 'z'))
4345 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4346 #endif
4347
4348 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4349 int
4350 main ()
4351 {
4352 int i;
4353 for (i = 0; i < 256; i++)
4354 if (XOR (islower (i), ISLOWER (i))
4355 || toupper (i) != TOUPPER (i))
4356 return 2;
4357 return 0;
4358 }
4359 _ACEOF
4360 if ac_fn_c_try_run "$LINENO"; then :
4361
4362 else
4363 ac_cv_header_stdc=no
4364 fi
4365 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4366 conftest.$ac_objext conftest.beam conftest.$ac_ext
4367 fi
4368
4369 fi
4370 fi
4371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4372 $as_echo "$ac_cv_header_stdc" >&6; }
4373 if test $ac_cv_header_stdc = yes; then
4374
4375 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4376
4377 fi
4378
4379 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4380 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4381 inttypes.h stdint.h unistd.h
4382 do :
4383 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4384 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4385 "
4386 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4387 cat >>confdefs.h <<_ACEOF
4388 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4389 _ACEOF
4390
4391 fi
4392
4393 done
4394
4395
4396
4397 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4398 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4399 MINIX=yes
4400 else
4401 MINIX=
4402 fi
4403
4404
4405 if test "$MINIX" = yes; then
4406
4407 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4408
4409
4410 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4411
4412
4413 $as_echo "#define _MINIX 1" >>confdefs.h
4414
4415 fi
4416
4417
4418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4419 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4420 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4421 $as_echo_n "(cached) " >&6
4422 else
4423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4424 /* end confdefs.h. */
4425
4426 # define __EXTENSIONS__ 1
4427 $ac_includes_default
4428 int
4429 main ()
4430 {
4431
4432 ;
4433 return 0;
4434 }
4435 _ACEOF
4436 if ac_fn_c_try_compile "$LINENO"; then :
4437 ac_cv_safe_to_define___extensions__=yes
4438 else
4439 ac_cv_safe_to_define___extensions__=no
4440 fi
4441 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4442 fi
4443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4444 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4445 test $ac_cv_safe_to_define___extensions__ = yes &&
4446 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4447
4448 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4449
4450 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4451
4452 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4453
4454 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4455
4456
4457
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
4459 $as_echo_n "checking for library containing strerror... " >&6; }
4460 if ${ac_cv_search_strerror+:} false; then :
4461 $as_echo_n "(cached) " >&6
4462 else
4463 ac_func_search_save_LIBS=$LIBS
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465 /* end confdefs.h. */
4466
4467 /* Override any GCC internal prototype to avoid an error.
4468 Use char because int might match the return type of a GCC
4469 builtin and then its argument prototype would still apply. */
4470 #ifdef __cplusplus
4471 extern "C"
4472 #endif
4473 char strerror ();
4474 int
4475 main ()
4476 {
4477 return strerror ();
4478 ;
4479 return 0;
4480 }
4481 _ACEOF
4482 for ac_lib in '' cposix; do
4483 if test -z "$ac_lib"; then
4484 ac_res="none required"
4485 else
4486 ac_res=-l$ac_lib
4487 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4488 fi
4489 if ac_fn_c_try_link "$LINENO"; then :
4490 ac_cv_search_strerror=$ac_res
4491 fi
4492 rm -f core conftest.err conftest.$ac_objext \
4493 conftest$ac_exeext
4494 if ${ac_cv_search_strerror+:} false; then :
4495 break
4496 fi
4497 done
4498 if ${ac_cv_search_strerror+:} false; then :
4499
4500 else
4501 ac_cv_search_strerror=no
4502 fi
4503 rm conftest.$ac_ext
4504 LIBS=$ac_func_search_save_LIBS
4505 fi
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
4507 $as_echo "$ac_cv_search_strerror" >&6; }
4508 ac_res=$ac_cv_search_strerror
4509 if test "$ac_res" != no; then :
4510 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4511
4512 fi
4513
4514 ac_ext=c
4515 ac_cpp='$CPP $CPPFLAGS'
4516 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4517 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4518 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4519 if test -n "$ac_tool_prefix"; then
4520 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4521 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4523 $as_echo_n "checking for $ac_word... " >&6; }
4524 if ${ac_cv_prog_CC+:} false; then :
4525 $as_echo_n "(cached) " >&6
4526 else
4527 if test -n "$CC"; then
4528 ac_cv_prog_CC="$CC" # Let the user override the test.
4529 else
4530 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4531 for as_dir in $PATH
4532 do
4533 IFS=$as_save_IFS
4534 test -z "$as_dir" && as_dir=.
4535 for ac_exec_ext in '' $ac_executable_extensions; do
4536 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4537 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4538 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4539 break 2
4540 fi
4541 done
4542 done
4543 IFS=$as_save_IFS
4544
4545 fi
4546 fi
4547 CC=$ac_cv_prog_CC
4548 if test -n "$CC"; then
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4550 $as_echo "$CC" >&6; }
4551 else
4552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4553 $as_echo "no" >&6; }
4554 fi
4555
4556
4557 fi
4558 if test -z "$ac_cv_prog_CC"; then
4559 ac_ct_CC=$CC
4560 # Extract the first word of "gcc", so it can be a program name with args.
4561 set dummy gcc; ac_word=$2
4562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4563 $as_echo_n "checking for $ac_word... " >&6; }
4564 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4565 $as_echo_n "(cached) " >&6
4566 else
4567 if test -n "$ac_ct_CC"; then
4568 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4569 else
4570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4571 for as_dir in $PATH
4572 do
4573 IFS=$as_save_IFS
4574 test -z "$as_dir" && as_dir=.
4575 for ac_exec_ext in '' $ac_executable_extensions; do
4576 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4577 ac_cv_prog_ac_ct_CC="gcc"
4578 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4579 break 2
4580 fi
4581 done
4582 done
4583 IFS=$as_save_IFS
4584
4585 fi
4586 fi
4587 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4588 if test -n "$ac_ct_CC"; then
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4590 $as_echo "$ac_ct_CC" >&6; }
4591 else
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4593 $as_echo "no" >&6; }
4594 fi
4595
4596 if test "x$ac_ct_CC" = x; then
4597 CC=""
4598 else
4599 case $cross_compiling:$ac_tool_warned in
4600 yes:)
4601 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4602 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4603 ac_tool_warned=yes ;;
4604 esac
4605 CC=$ac_ct_CC
4606 fi
4607 else
4608 CC="$ac_cv_prog_CC"
4609 fi
4610
4611 if test -z "$CC"; then
4612 if test -n "$ac_tool_prefix"; then
4613 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4614 set dummy ${ac_tool_prefix}cc; ac_word=$2
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616 $as_echo_n "checking for $ac_word... " >&6; }
4617 if ${ac_cv_prog_CC+:} false; then :
4618 $as_echo_n "(cached) " >&6
4619 else
4620 if test -n "$CC"; then
4621 ac_cv_prog_CC="$CC" # Let the user override the test.
4622 else
4623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4624 for as_dir in $PATH
4625 do
4626 IFS=$as_save_IFS
4627 test -z "$as_dir" && as_dir=.
4628 for ac_exec_ext in '' $ac_executable_extensions; do
4629 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4630 ac_cv_prog_CC="${ac_tool_prefix}cc"
4631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4632 break 2
4633 fi
4634 done
4635 done
4636 IFS=$as_save_IFS
4637
4638 fi
4639 fi
4640 CC=$ac_cv_prog_CC
4641 if test -n "$CC"; then
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4643 $as_echo "$CC" >&6; }
4644 else
4645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4646 $as_echo "no" >&6; }
4647 fi
4648
4649
4650 fi
4651 fi
4652 if test -z "$CC"; then
4653 # Extract the first word of "cc", so it can be a program name with args.
4654 set dummy cc; ac_word=$2
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656 $as_echo_n "checking for $ac_word... " >&6; }
4657 if ${ac_cv_prog_CC+:} false; then :
4658 $as_echo_n "(cached) " >&6
4659 else
4660 if test -n "$CC"; then
4661 ac_cv_prog_CC="$CC" # Let the user override the test.
4662 else
4663 ac_prog_rejected=no
4664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4665 for as_dir in $PATH
4666 do
4667 IFS=$as_save_IFS
4668 test -z "$as_dir" && as_dir=.
4669 for ac_exec_ext in '' $ac_executable_extensions; do
4670 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4671 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4672 ac_prog_rejected=yes
4673 continue
4674 fi
4675 ac_cv_prog_CC="cc"
4676 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4677 break 2
4678 fi
4679 done
4680 done
4681 IFS=$as_save_IFS
4682
4683 if test $ac_prog_rejected = yes; then
4684 # We found a bogon in the path, so make sure we never use it.
4685 set dummy $ac_cv_prog_CC
4686 shift
4687 if test $# != 0; then
4688 # We chose a different compiler from the bogus one.
4689 # However, it has the same basename, so the bogon will be chosen
4690 # first if we set CC to just the basename; use the full file name.
4691 shift
4692 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4693 fi
4694 fi
4695 fi
4696 fi
4697 CC=$ac_cv_prog_CC
4698 if test -n "$CC"; then
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4700 $as_echo "$CC" >&6; }
4701 else
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703 $as_echo "no" >&6; }
4704 fi
4705
4706
4707 fi
4708 if test -z "$CC"; then
4709 if test -n "$ac_tool_prefix"; then
4710 for ac_prog in cl.exe
4711 do
4712 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4713 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715 $as_echo_n "checking for $ac_word... " >&6; }
4716 if ${ac_cv_prog_CC+:} false; then :
4717 $as_echo_n "(cached) " >&6
4718 else
4719 if test -n "$CC"; then
4720 ac_cv_prog_CC="$CC" # Let the user override the test.
4721 else
4722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4723 for as_dir in $PATH
4724 do
4725 IFS=$as_save_IFS
4726 test -z "$as_dir" && as_dir=.
4727 for ac_exec_ext in '' $ac_executable_extensions; do
4728 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4729 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4731 break 2
4732 fi
4733 done
4734 done
4735 IFS=$as_save_IFS
4736
4737 fi
4738 fi
4739 CC=$ac_cv_prog_CC
4740 if test -n "$CC"; then
4741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4742 $as_echo "$CC" >&6; }
4743 else
4744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4745 $as_echo "no" >&6; }
4746 fi
4747
4748
4749 test -n "$CC" && break
4750 done
4751 fi
4752 if test -z "$CC"; then
4753 ac_ct_CC=$CC
4754 for ac_prog in cl.exe
4755 do
4756 # Extract the first word of "$ac_prog", so it can be a program name with args.
4757 set dummy $ac_prog; ac_word=$2
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4759 $as_echo_n "checking for $ac_word... " >&6; }
4760 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4761 $as_echo_n "(cached) " >&6
4762 else
4763 if test -n "$ac_ct_CC"; then
4764 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4765 else
4766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4767 for as_dir in $PATH
4768 do
4769 IFS=$as_save_IFS
4770 test -z "$as_dir" && as_dir=.
4771 for ac_exec_ext in '' $ac_executable_extensions; do
4772 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4773 ac_cv_prog_ac_ct_CC="$ac_prog"
4774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4775 break 2
4776 fi
4777 done
4778 done
4779 IFS=$as_save_IFS
4780
4781 fi
4782 fi
4783 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4784 if test -n "$ac_ct_CC"; then
4785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4786 $as_echo "$ac_ct_CC" >&6; }
4787 else
4788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4789 $as_echo "no" >&6; }
4790 fi
4791
4792
4793 test -n "$ac_ct_CC" && break
4794 done
4795
4796 if test "x$ac_ct_CC" = x; then
4797 CC=""
4798 else
4799 case $cross_compiling:$ac_tool_warned in
4800 yes:)
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4802 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4803 ac_tool_warned=yes ;;
4804 esac
4805 CC=$ac_ct_CC
4806 fi
4807 fi
4808
4809 fi
4810
4811
4812 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4813 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4814 as_fn_error $? "no acceptable C compiler found in \$PATH
4815 See \`config.log' for more details" "$LINENO" 5; }
4816
4817 # Provide some information about the compiler.
4818 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4819 set X $ac_compile
4820 ac_compiler=$2
4821 for ac_option in --version -v -V -qversion; do
4822 { { ac_try="$ac_compiler $ac_option >&5"
4823 case "(($ac_try" in
4824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4825 *) ac_try_echo=$ac_try;;
4826 esac
4827 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4828 $as_echo "$ac_try_echo"; } >&5
4829 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4830 ac_status=$?
4831 if test -s conftest.err; then
4832 sed '10a\
4833 ... rest of stderr output deleted ...
4834 10q' conftest.err >conftest.er1
4835 cat conftest.er1 >&5
4836 fi
4837 rm -f conftest.er1 conftest.err
4838 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4839 test $ac_status = 0; }
4840 done
4841
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4843 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4844 if ${ac_cv_c_compiler_gnu+:} false; then :
4845 $as_echo_n "(cached) " >&6
4846 else
4847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4848 /* end confdefs.h. */
4849
4850 int
4851 main ()
4852 {
4853 #ifndef __GNUC__
4854 choke me
4855 #endif
4856
4857 ;
4858 return 0;
4859 }
4860 _ACEOF
4861 if ac_fn_c_try_compile "$LINENO"; then :
4862 ac_compiler_gnu=yes
4863 else
4864 ac_compiler_gnu=no
4865 fi
4866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4867 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4868
4869 fi
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4871 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4872 if test $ac_compiler_gnu = yes; then
4873 GCC=yes
4874 else
4875 GCC=
4876 fi
4877 ac_test_CFLAGS=${CFLAGS+set}
4878 ac_save_CFLAGS=$CFLAGS
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4880 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4881 if ${ac_cv_prog_cc_g+:} false; then :
4882 $as_echo_n "(cached) " >&6
4883 else
4884 ac_save_c_werror_flag=$ac_c_werror_flag
4885 ac_c_werror_flag=yes
4886 ac_cv_prog_cc_g=no
4887 CFLAGS="-g"
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4890
4891 int
4892 main ()
4893 {
4894
4895 ;
4896 return 0;
4897 }
4898 _ACEOF
4899 if ac_fn_c_try_compile "$LINENO"; then :
4900 ac_cv_prog_cc_g=yes
4901 else
4902 CFLAGS=""
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h. */
4905
4906 int
4907 main ()
4908 {
4909
4910 ;
4911 return 0;
4912 }
4913 _ACEOF
4914 if ac_fn_c_try_compile "$LINENO"; then :
4915
4916 else
4917 ac_c_werror_flag=$ac_save_c_werror_flag
4918 CFLAGS="-g"
4919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4920 /* end confdefs.h. */
4921
4922 int
4923 main ()
4924 {
4925
4926 ;
4927 return 0;
4928 }
4929 _ACEOF
4930 if ac_fn_c_try_compile "$LINENO"; then :
4931 ac_cv_prog_cc_g=yes
4932 fi
4933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934 fi
4935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4936 fi
4937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4938 ac_c_werror_flag=$ac_save_c_werror_flag
4939 fi
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4941 $as_echo "$ac_cv_prog_cc_g" >&6; }
4942 if test "$ac_test_CFLAGS" = set; then
4943 CFLAGS=$ac_save_CFLAGS
4944 elif test $ac_cv_prog_cc_g = yes; then
4945 if test "$GCC" = yes; then
4946 CFLAGS="-g -O2"
4947 else
4948 CFLAGS="-g"
4949 fi
4950 else
4951 if test "$GCC" = yes; then
4952 CFLAGS="-O2"
4953 else
4954 CFLAGS=
4955 fi
4956 fi
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4958 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4959 if ${ac_cv_prog_cc_c89+:} false; then :
4960 $as_echo_n "(cached) " >&6
4961 else
4962 ac_cv_prog_cc_c89=no
4963 ac_save_CC=$CC
4964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4965 /* end confdefs.h. */
4966 #include <stdarg.h>
4967 #include <stdio.h>
4968 #include <sys/types.h>
4969 #include <sys/stat.h>
4970 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4971 struct buf { int x; };
4972 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4973 static char *e (p, i)
4974 char **p;
4975 int i;
4976 {
4977 return p[i];
4978 }
4979 static char *f (char * (*g) (char **, int), char **p, ...)
4980 {
4981 char *s;
4982 va_list v;
4983 va_start (v,p);
4984 s = g (p, va_arg (v,int));
4985 va_end (v);
4986 return s;
4987 }
4988
4989 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4990 function prototypes and stuff, but not '\xHH' hex character constants.
4991 These don't provoke an error unfortunately, instead are silently treated
4992 as 'x'. The following induces an error, until -std is added to get
4993 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4994 array size at least. It's necessary to write '\x00'==0 to get something
4995 that's true only with -std. */
4996 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4997
4998 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4999 inside strings and character constants. */
5000 #define FOO(x) 'x'
5001 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5002
5003 int test (int i, double x);
5004 struct s1 {int (*f) (int a);};
5005 struct s2 {int (*f) (double a);};
5006 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5007 int argc;
5008 char **argv;
5009 int
5010 main ()
5011 {
5012 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5013 ;
5014 return 0;
5015 }
5016 _ACEOF
5017 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5018 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5019 do
5020 CC="$ac_save_CC $ac_arg"
5021 if ac_fn_c_try_compile "$LINENO"; then :
5022 ac_cv_prog_cc_c89=$ac_arg
5023 fi
5024 rm -f core conftest.err conftest.$ac_objext
5025 test "x$ac_cv_prog_cc_c89" != "xno" && break
5026 done
5027 rm -f conftest.$ac_ext
5028 CC=$ac_save_CC
5029
5030 fi
5031 # AC_CACHE_VAL
5032 case "x$ac_cv_prog_cc_c89" in
5033 x)
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5035 $as_echo "none needed" >&6; } ;;
5036 xno)
5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5038 $as_echo "unsupported" >&6; } ;;
5039 *)
5040 CC="$CC $ac_cv_prog_cc_c89"
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5042 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5043 esac
5044 if test "x$ac_cv_prog_cc_c89" != xno; then :
5045
5046 fi
5047
5048 ac_ext=c
5049 ac_cpp='$CPP $CPPFLAGS'
5050 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5051 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5052 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5053
5054 depcc="$CC" am_compiler_list=
5055
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5057 $as_echo_n "checking dependency style of $depcc... " >&6; }
5058 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5059 $as_echo_n "(cached) " >&6
5060 else
5061 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5062 # We make a subdir and do the tests there. Otherwise we can end up
5063 # making bogus files that we don't know about and never remove. For
5064 # instance it was reported that on HP-UX the gcc test will end up
5065 # making a dummy file named `D' -- because `-MD' means `put the output
5066 # in D'.
5067 rm -rf conftest.dir
5068 mkdir conftest.dir
5069 # Copy depcomp to subdir because otherwise we won't find it if we're
5070 # using a relative directory.
5071 cp "$am_depcomp" conftest.dir
5072 cd conftest.dir
5073 # We will build objects and dependencies in a subdirectory because
5074 # it helps to detect inapplicable dependency modes. For instance
5075 # both Tru64's cc and ICC support -MD to output dependencies as a
5076 # side effect of compilation, but ICC will put the dependencies in
5077 # the current directory while Tru64 will put them in the object
5078 # directory.
5079 mkdir sub
5080
5081 am_cv_CC_dependencies_compiler_type=none
5082 if test "$am_compiler_list" = ""; then
5083 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5084 fi
5085 am__universal=false
5086 case " $depcc " in #(
5087 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5088 esac
5089
5090 for depmode in $am_compiler_list; do
5091 # Setup a source with many dependencies, because some compilers
5092 # like to wrap large dependency lists on column 80 (with \), and
5093 # we should not choose a depcomp mode which is confused by this.
5094 #
5095 # We need to recreate these files for each test, as the compiler may
5096 # overwrite some of them when testing with obscure command lines.
5097 # This happens at least with the AIX C compiler.
5098 : > sub/conftest.c
5099 for i in 1 2 3 4 5 6; do
5100 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5101 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5102 # Solaris 8's {/usr,}/bin/sh.
5103 touch sub/conftst$i.h
5104 done
5105 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5106
5107 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5108 # mode. It turns out that the SunPro C++ compiler does not properly
5109 # handle `-M -o', and we need to detect this. Also, some Intel
5110 # versions had trouble with output in subdirs
5111 am__obj=sub/conftest.${OBJEXT-o}
5112 am__minus_obj="-o $am__obj"
5113 case $depmode in
5114 gcc)
5115 # This depmode causes a compiler race in universal mode.
5116 test "$am__universal" = false || continue
5117 ;;
5118 nosideeffect)
5119 # after this tag, mechanisms are not by side-effect, so they'll
5120 # only be used when explicitly requested
5121 if test "x$enable_dependency_tracking" = xyes; then
5122 continue
5123 else
5124 break
5125 fi
5126 ;;
5127 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5128 # This compiler won't grok `-c -o', but also, the minuso test has
5129 # not run yet. These depmodes are late enough in the game, and
5130 # so weak that their functioning should not be impacted.
5131 am__obj=conftest.${OBJEXT-o}
5132 am__minus_obj=
5133 ;;
5134 none) break ;;
5135 esac
5136 if depmode=$depmode \
5137 source=sub/conftest.c object=$am__obj \
5138 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5139 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5140 >/dev/null 2>conftest.err &&
5141 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5142 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5143 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5144 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5145 # icc doesn't choke on unknown options, it will just issue warnings
5146 # or remarks (even with -Werror). So we grep stderr for any message
5147 # that says an option was ignored or not supported.
5148 # When given -MP, icc 7.0 and 7.1 complain thusly:
5149 # icc: Command line warning: ignoring option '-M'; no argument required
5150 # The diagnosis changed in icc 8.0:
5151 # icc: Command line remark: option '-MP' not supported
5152 if (grep 'ignoring option' conftest.err ||
5153 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5154 am_cv_CC_dependencies_compiler_type=$depmode
5155 break
5156 fi
5157 fi
5158 done
5159
5160 cd ..
5161 rm -rf conftest.dir
5162 else
5163 am_cv_CC_dependencies_compiler_type=none
5164 fi
5165
5166 fi
5167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5168 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5169 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5170
5171 if
5172 test "x$enable_dependency_tracking" != xno \
5173 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5174 am__fastdepCC_TRUE=
5175 am__fastdepCC_FALSE='#'
5176 else
5177 am__fastdepCC_TRUE='#'
5178 am__fastdepCC_FALSE=
5179 fi
5180
5181
5182 ac_ext=c
5183 ac_cpp='$CPP $CPPFLAGS'
5184 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5185 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5186 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5188 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5189 # On Suns, sometimes $CPP names a directory.
5190 if test -n "$CPP" && test -d "$CPP"; then
5191 CPP=
5192 fi
5193 if test -z "$CPP"; then
5194 if ${ac_cv_prog_CPP+:} false; then :
5195 $as_echo_n "(cached) " >&6
5196 else
5197 # Double quotes because CPP needs to be expanded
5198 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5199 do
5200 ac_preproc_ok=false
5201 for ac_c_preproc_warn_flag in '' yes
5202 do
5203 # Use a header file that comes with gcc, so configuring glibc
5204 # with a fresh cross-compiler works.
5205 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5206 # <limits.h> exists even on freestanding compilers.
5207 # On the NeXT, cc -E runs the code through the compiler's parser,
5208 # not just through cpp. "Syntax error" is here to catch this case.
5209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5210 /* end confdefs.h. */
5211 #ifdef __STDC__
5212 # include <limits.h>
5213 #else
5214 # include <assert.h>
5215 #endif
5216 Syntax error
5217 _ACEOF
5218 if ac_fn_c_try_cpp "$LINENO"; then :
5219
5220 else
5221 # Broken: fails on valid input.
5222 continue
5223 fi
5224 rm -f conftest.err conftest.i conftest.$ac_ext
5225
5226 # OK, works on sane cases. Now check whether nonexistent headers
5227 # can be detected and how.
5228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5229 /* end confdefs.h. */
5230 #include <ac_nonexistent.h>
5231 _ACEOF
5232 if ac_fn_c_try_cpp "$LINENO"; then :
5233 # Broken: success on invalid input.
5234 continue
5235 else
5236 # Passes both tests.
5237 ac_preproc_ok=:
5238 break
5239 fi
5240 rm -f conftest.err conftest.i conftest.$ac_ext
5241
5242 done
5243 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5244 rm -f conftest.i conftest.err conftest.$ac_ext
5245 if $ac_preproc_ok; then :
5246 break
5247 fi
5248
5249 done
5250 ac_cv_prog_CPP=$CPP
5251
5252 fi
5253 CPP=$ac_cv_prog_CPP
5254 else
5255 ac_cv_prog_CPP=$CPP
5256 fi
5257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5258 $as_echo "$CPP" >&6; }
5259 ac_preproc_ok=false
5260 for ac_c_preproc_warn_flag in '' yes
5261 do
5262 # Use a header file that comes with gcc, so configuring glibc
5263 # with a fresh cross-compiler works.
5264 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5265 # <limits.h> exists even on freestanding compilers.
5266 # On the NeXT, cc -E runs the code through the compiler's parser,
5267 # not just through cpp. "Syntax error" is here to catch this case.
5268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5269 /* end confdefs.h. */
5270 #ifdef __STDC__
5271 # include <limits.h>
5272 #else
5273 # include <assert.h>
5274 #endif
5275 Syntax error
5276 _ACEOF
5277 if ac_fn_c_try_cpp "$LINENO"; then :
5278
5279 else
5280 # Broken: fails on valid input.
5281 continue
5282 fi
5283 rm -f conftest.err conftest.i conftest.$ac_ext
5284
5285 # OK, works on sane cases. Now check whether nonexistent headers
5286 # can be detected and how.
5287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5288 /* end confdefs.h. */
5289 #include <ac_nonexistent.h>
5290 _ACEOF
5291 if ac_fn_c_try_cpp "$LINENO"; then :
5292 # Broken: success on invalid input.
5293 continue
5294 else
5295 # Passes both tests.
5296 ac_preproc_ok=:
5297 break
5298 fi
5299 rm -f conftest.err conftest.i conftest.$ac_ext
5300
5301 done
5302 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5303 rm -f conftest.i conftest.err conftest.$ac_ext
5304 if $ac_preproc_ok; then :
5305
5306 else
5307 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5308 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5309 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5310 See \`config.log' for more details" "$LINENO" 5; }
5311 fi
5312
5313 ac_ext=c
5314 ac_cpp='$CPP $CPPFLAGS'
5315 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5316 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5317 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5318
5319 if test "x$CC" != xcc; then
5320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5321 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5322 else
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5324 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5325 fi
5326 set dummy $CC; ac_cc=`$as_echo "$2" |
5327 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5328 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
5329 $as_echo_n "(cached) " >&6
5330 else
5331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5332 /* end confdefs.h. */
5333
5334 int
5335 main ()
5336 {
5337
5338 ;
5339 return 0;
5340 }
5341 _ACEOF
5342 # Make sure it works both with $CC and with simple cc.
5343 # We do the test twice because some compilers refuse to overwrite an
5344 # existing .o file with -o, though they will create one.
5345 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5346 rm -f conftest2.*
5347 if { { case "(($ac_try" in
5348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5349 *) ac_try_echo=$ac_try;;
5350 esac
5351 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5352 $as_echo "$ac_try_echo"; } >&5
5353 (eval "$ac_try") 2>&5
5354 ac_status=$?
5355 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5356 test $ac_status = 0; } &&
5357 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5359 *) ac_try_echo=$ac_try;;
5360 esac
5361 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5362 $as_echo "$ac_try_echo"; } >&5
5363 (eval "$ac_try") 2>&5
5364 ac_status=$?
5365 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5366 test $ac_status = 0; };
5367 then
5368 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5369 if test "x$CC" != xcc; then
5370 # Test first that cc exists at all.
5371 if { ac_try='cc -c conftest.$ac_ext >&5'
5372 { { case "(($ac_try" in
5373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5374 *) ac_try_echo=$ac_try;;
5375 esac
5376 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5377 $as_echo "$ac_try_echo"; } >&5
5378 (eval "$ac_try") 2>&5
5379 ac_status=$?
5380 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5381 test $ac_status = 0; }; }; then
5382 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5383 rm -f conftest2.*
5384 if { { case "(($ac_try" in
5385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5386 *) ac_try_echo=$ac_try;;
5387 esac
5388 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5389 $as_echo "$ac_try_echo"; } >&5
5390 (eval "$ac_try") 2>&5
5391 ac_status=$?
5392 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5393 test $ac_status = 0; } &&
5394 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5396 *) ac_try_echo=$ac_try;;
5397 esac
5398 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5399 $as_echo "$ac_try_echo"; } >&5
5400 (eval "$ac_try") 2>&5
5401 ac_status=$?
5402 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5403 test $ac_status = 0; };
5404 then
5405 # cc works too.
5406 :
5407 else
5408 # cc exists but doesn't like -o.
5409 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5410 fi
5411 fi
5412 fi
5413 else
5414 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5415 fi
5416 rm -f core conftest*
5417
5418 fi
5419 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5421 $as_echo "yes" >&6; }
5422 else
5423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5424 $as_echo "no" >&6; }
5425
5426 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5427
5428 fi
5429
5430 # FIXME: we rely on the cache variable name because
5431 # there is no other way.
5432 set dummy $CC
5433 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5434 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5435 if test "$am_t" != yes; then
5436 # Losing compiler, so override with the script.
5437 # FIXME: It is wrong to rewrite CC.
5438 # But if we don't then we get into trouble of one sort or another.
5439 # A longer-term fix would be to have automake use am__CC in this case,
5440 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5441 CC="$am_aux_dir/compile $CC"
5442 fi
5443
5444
5445
5446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5447 $as_echo_n "checking whether ln -s works... " >&6; }
5448 LN_S=$as_ln_s
5449 if test "$LN_S" = "ln -s"; then
5450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5451 $as_echo "yes" >&6; }
5452 else
5453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5454 $as_echo "no, using $LN_S" >&6; }
5455 fi
5456
5457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
5458 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
5459 set x ${MAKE-make}
5460 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
5461 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
5462 $as_echo_n "(cached) " >&6
5463 else
5464 cat >conftest.make <<\_ACEOF
5465 SHELL = /bin/sh
5466 all:
5467 @echo '@@@%%%=$(MAKE)=@@@%%%'
5468 _ACEOF
5469 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
5470 case `${MAKE-make} -f conftest.make 2>/dev/null` in
5471 *@@@%%%=?*=@@@%%%*)
5472 eval ac_cv_prog_make_${ac_make}_set=yes;;
5473 *)
5474 eval ac_cv_prog_make_${ac_make}_set=no;;
5475 esac
5476 rm -f conftest.make
5477 fi
5478 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
5479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5480 $as_echo "yes" >&6; }
5481 SET_MAKE=
5482 else
5483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5484 $as_echo "no" >&6; }
5485 SET_MAKE="MAKE=${MAKE-make}"
5486 fi
5487
5488 if test -n "$ac_tool_prefix"; then
5489 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5490 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5492 $as_echo_n "checking for $ac_word... " >&6; }
5493 if ${ac_cv_prog_RANLIB+:} false; then :
5494 $as_echo_n "(cached) " >&6
5495 else
5496 if test -n "$RANLIB"; then
5497 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5498 else
5499 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5500 for as_dir in $PATH
5501 do
5502 IFS=$as_save_IFS
5503 test -z "$as_dir" && as_dir=.
5504 for ac_exec_ext in '' $ac_executable_extensions; do
5505 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5506 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5507 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5508 break 2
5509 fi
5510 done
5511 done
5512 IFS=$as_save_IFS
5513
5514 fi
5515 fi
5516 RANLIB=$ac_cv_prog_RANLIB
5517 if test -n "$RANLIB"; then
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5519 $as_echo "$RANLIB" >&6; }
5520 else
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5522 $as_echo "no" >&6; }
5523 fi
5524
5525
5526 fi
5527 if test -z "$ac_cv_prog_RANLIB"; then
5528 ac_ct_RANLIB=$RANLIB
5529 # Extract the first word of "ranlib", so it can be a program name with args.
5530 set dummy ranlib; ac_word=$2
5531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5532 $as_echo_n "checking for $ac_word... " >&6; }
5533 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5534 $as_echo_n "(cached) " >&6
5535 else
5536 if test -n "$ac_ct_RANLIB"; then
5537 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5538 else
5539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5540 for as_dir in $PATH
5541 do
5542 IFS=$as_save_IFS
5543 test -z "$as_dir" && as_dir=.
5544 for ac_exec_ext in '' $ac_executable_extensions; do
5545 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5546 ac_cv_prog_ac_ct_RANLIB="ranlib"
5547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5548 break 2
5549 fi
5550 done
5551 done
5552 IFS=$as_save_IFS
5553
5554 fi
5555 fi
5556 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5557 if test -n "$ac_ct_RANLIB"; then
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5559 $as_echo "$ac_ct_RANLIB" >&6; }
5560 else
5561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5562 $as_echo "no" >&6; }
5563 fi
5564
5565 if test "x$ac_ct_RANLIB" = x; then
5566 RANLIB=":"
5567 else
5568 case $cross_compiling:$ac_tool_warned in
5569 yes:)
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5571 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5572 ac_tool_warned=yes ;;
5573 esac
5574 RANLIB=$ac_ct_RANLIB
5575 fi
5576 else
5577 RANLIB="$ac_cv_prog_RANLIB"
5578 fi
5579
5580
5581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
5582 $as_echo_n "checking whether NLS is requested... " >&6; }
5583 # Check whether --enable-nls was given.
5584 if test "${enable_nls+set}" = set; then :
5585 enableval=$enable_nls; USE_NLS=$enableval
5586 else
5587 USE_NLS=yes
5588 fi
5589
5590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
5591 $as_echo "$USE_NLS" >&6; }
5592
5593
5594
5595
5596 case "$am__api_version" in
5597 1.01234)
5598 as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
5599 ;;
5600 *)
5601 ;;
5602 esac
5603
5604 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
5605 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
5606 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
5607 if test -n "0.35.0"; then
5608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.35.0" >&5
5609 $as_echo_n "checking for intltool >= 0.35.0... " >&6; }
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_APPLIED_VERSION found" >&5
5611 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; }
5612 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
5613 as_fn_error $? "Your intltool is too old. You need intltool 0.35.0 or later." "$LINENO" 5
5614 fi
5615
5616 # Extract the first word of "intltool-update", so it can be a program name with args.
5617 set dummy intltool-update; ac_word=$2
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619 $as_echo_n "checking for $ac_word... " >&6; }
5620 if ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
5621 $as_echo_n "(cached) " >&6
5622 else
5623 case $INTLTOOL_UPDATE in
5624 [\\/]* | ?:[\\/]*)
5625 ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
5626 ;;
5627 *)
5628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5629 for as_dir in $PATH
5630 do
5631 IFS=$as_save_IFS
5632 test -z "$as_dir" && as_dir=.
5633 for ac_exec_ext in '' $ac_executable_extensions; do
5634 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5635 ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
5636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5637 break 2
5638 fi
5639 done
5640 done
5641 IFS=$as_save_IFS
5642
5643 ;;
5644 esac
5645 fi
5646 INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
5647 if test -n "$INTLTOOL_UPDATE"; then
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
5649 $as_echo "$INTLTOOL_UPDATE" >&6; }
5650 else
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5652 $as_echo "no" >&6; }
5653 fi
5654
5655
5656 # Extract the first word of "intltool-merge", so it can be a program name with args.
5657 set dummy intltool-merge; ac_word=$2
5658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659 $as_echo_n "checking for $ac_word... " >&6; }
5660 if ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
5661 $as_echo_n "(cached) " >&6
5662 else
5663 case $INTLTOOL_MERGE in
5664 [\\/]* | ?:[\\/]*)
5665 ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
5666 ;;
5667 *)
5668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669 for as_dir in $PATH
5670 do
5671 IFS=$as_save_IFS
5672 test -z "$as_dir" && as_dir=.
5673 for ac_exec_ext in '' $ac_executable_extensions; do
5674 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5675 ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
5676 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677 break 2
5678 fi
5679 done
5680 done
5681 IFS=$as_save_IFS
5682
5683 ;;
5684 esac
5685 fi
5686 INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
5687 if test -n "$INTLTOOL_MERGE"; then
5688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
5689 $as_echo "$INTLTOOL_MERGE" >&6; }
5690 else
5691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692 $as_echo "no" >&6; }
5693 fi
5694
5695
5696 # Extract the first word of "intltool-extract", so it can be a program name with args.
5697 set dummy intltool-extract; ac_word=$2
5698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5699 $as_echo_n "checking for $ac_word... " >&6; }
5700 if ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
5701 $as_echo_n "(cached) " >&6
5702 else
5703 case $INTLTOOL_EXTRACT in
5704 [\\/]* | ?:[\\/]*)
5705 ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
5706 ;;
5707 *)
5708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5709 for as_dir in $PATH
5710 do
5711 IFS=$as_save_IFS
5712 test -z "$as_dir" && as_dir=.
5713 for ac_exec_ext in '' $ac_executable_extensions; do
5714 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5715 ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
5716 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5717 break 2
5718 fi
5719 done
5720 done
5721 IFS=$as_save_IFS
5722
5723 ;;
5724 esac
5725 fi
5726 INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
5727 if test -n "$INTLTOOL_EXTRACT"; then
5728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
5729 $as_echo "$INTLTOOL_EXTRACT" >&6; }
5730 else
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5732 $as_echo "no" >&6; }
5733 fi
5734
5735
5736 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
5737 as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
5738 fi
5739
5740 if test -z "$AM_DEFAULT_VERBOSITY"; then
5741 AM_DEFAULT_VERBOSITY=1
5742 fi
5743
5744
5745 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
5746 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
5747 INTLTOOL__v_MERGE_0='@echo " ITMRG " $@;'
5748
5749
5750
5751
5752 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
5753 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
5754 intltool__v_merge_options_0='-q'
5755
5756
5757
5758
5759 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5760 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5761 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5762 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5763 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< $@'
5764 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5765 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5766 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5767 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5768 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5769 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5770 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
5771 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< $@'
5772 else
5773 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.$$RANDOM && mkdir $$_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u $$_it_tmp_dir $< $@ && rmdir $$_it_tmp_dir'
5774 fi
5775 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5776 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5777 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5778 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5779 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5780 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5781 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@'
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879 # Check the gettext tools to make sure they are GNU
5880 # Extract the first word of "xgettext", so it can be a program name with args.
5881 set dummy xgettext; ac_word=$2
5882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5883 $as_echo_n "checking for $ac_word... " >&6; }
5884 if ${ac_cv_path_XGETTEXT+:} false; then :
5885 $as_echo_n "(cached) " >&6
5886 else
5887 case $XGETTEXT in
5888 [\\/]* | ?:[\\/]*)
5889 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
5890 ;;
5891 *)
5892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5893 for as_dir in $PATH
5894 do
5895 IFS=$as_save_IFS
5896 test -z "$as_dir" && as_dir=.
5897 for ac_exec_ext in '' $ac_executable_extensions; do
5898 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5899 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
5900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5901 break 2
5902 fi
5903 done
5904 done
5905 IFS=$as_save_IFS
5906
5907 ;;
5908 esac
5909 fi
5910 XGETTEXT=$ac_cv_path_XGETTEXT
5911 if test -n "$XGETTEXT"; then
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
5913 $as_echo "$XGETTEXT" >&6; }
5914 else
5915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5916 $as_echo "no" >&6; }
5917 fi
5918
5919
5920 # Extract the first word of "msgmerge", so it can be a program name with args.
5921 set dummy msgmerge; ac_word=$2
5922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5923 $as_echo_n "checking for $ac_word... " >&6; }
5924 if ${ac_cv_path_MSGMERGE+:} false; then :
5925 $as_echo_n "(cached) " >&6
5926 else
5927 case $MSGMERGE in
5928 [\\/]* | ?:[\\/]*)
5929 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
5930 ;;
5931 *)
5932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5933 for as_dir in $PATH
5934 do
5935 IFS=$as_save_IFS
5936 test -z "$as_dir" && as_dir=.
5937 for ac_exec_ext in '' $ac_executable_extensions; do
5938 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5939 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
5940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5941 break 2
5942 fi
5943 done
5944 done
5945 IFS=$as_save_IFS
5946
5947 ;;
5948 esac
5949 fi
5950 MSGMERGE=$ac_cv_path_MSGMERGE
5951 if test -n "$MSGMERGE"; then
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
5953 $as_echo "$MSGMERGE" >&6; }
5954 else
5955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956 $as_echo "no" >&6; }
5957 fi
5958
5959
5960 # Extract the first word of "msgfmt", so it can be a program name with args.
5961 set dummy msgfmt; ac_word=$2
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5963 $as_echo_n "checking for $ac_word... " >&6; }
5964 if ${ac_cv_path_MSGFMT+:} false; then :
5965 $as_echo_n "(cached) " >&6
5966 else
5967 case $MSGFMT in
5968 [\\/]* | ?:[\\/]*)
5969 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
5970 ;;
5971 *)
5972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5973 for as_dir in $PATH
5974 do
5975 IFS=$as_save_IFS
5976 test -z "$as_dir" && as_dir=.
5977 for ac_exec_ext in '' $ac_executable_extensions; do
5978 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5979 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
5980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5981 break 2
5982 fi
5983 done
5984 done
5985 IFS=$as_save_IFS
5986
5987 ;;
5988 esac
5989 fi
5990 MSGFMT=$ac_cv_path_MSGFMT
5991 if test -n "$MSGFMT"; then
5992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
5993 $as_echo "$MSGFMT" >&6; }
5994 else
5995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5996 $as_echo "no" >&6; }
5997 fi
5998
5999
6000 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6001 set dummy gmsgfmt; ac_word=$2
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6003 $as_echo_n "checking for $ac_word... " >&6; }
6004 if ${ac_cv_path_GMSGFMT+:} false; then :
6005 $as_echo_n "(cached) " >&6
6006 else
6007 case $GMSGFMT in
6008 [\\/]* | ?:[\\/]*)
6009 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6010 ;;
6011 *)
6012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6013 for as_dir in $PATH
6014 do
6015 IFS=$as_save_IFS
6016 test -z "$as_dir" && as_dir=.
6017 for ac_exec_ext in '' $ac_executable_extensions; do
6018 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6019 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
6020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6021 break 2
6022 fi
6023 done
6024 done
6025 IFS=$as_save_IFS
6026
6027 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6028 ;;
6029 esac
6030 fi
6031 GMSGFMT=$ac_cv_path_GMSGFMT
6032 if test -n "$GMSGFMT"; then
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
6034 $as_echo "$GMSGFMT" >&6; }
6035 else
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037 $as_echo "no" >&6; }
6038 fi
6039
6040
6041 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
6042 as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
6043 fi
6044 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
6045 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
6046 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
6047 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
6048 as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
6049 fi
6050
6051 # Extract the first word of "perl", so it can be a program name with args.
6052 set dummy perl; ac_word=$2
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054 $as_echo_n "checking for $ac_word... " >&6; }
6055 if ${ac_cv_path_INTLTOOL_PERL+:} false; then :
6056 $as_echo_n "(cached) " >&6
6057 else
6058 case $INTLTOOL_PERL in
6059 [\\/]* | ?:[\\/]*)
6060 ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
6061 ;;
6062 *)
6063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6064 for as_dir in $PATH
6065 do
6066 IFS=$as_save_IFS
6067 test -z "$as_dir" && as_dir=.
6068 for ac_exec_ext in '' $ac_executable_extensions; do
6069 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6070 ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
6071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6072 break 2
6073 fi
6074 done
6075 done
6076 IFS=$as_save_IFS
6077
6078 ;;
6079 esac
6080 fi
6081 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
6082 if test -n "$INTLTOOL_PERL"; then
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5
6084 $as_echo "$INTLTOOL_PERL" >&6; }
6085 else
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6087 $as_echo "no" >&6; }
6088 fi
6089
6090
6091 if test -z "$INTLTOOL_PERL"; then
6092 as_fn_error $? "perl not found" "$LINENO" 5
6093 fi
6094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5
6095 $as_echo_n "checking for perl >= 5.8.1... " >&6; }
6096 $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
6097 if test $? -ne 0; then
6098 as_fn_error $? "perl 5.8.1 is required for intltool" "$LINENO" 5
6099 else
6100 IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
6101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5
6102 $as_echo "$IT_PERL_VERSION" >&6; }
6103 fi
6104 if test "x" != "xno-xml"; then
6105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5
6106 $as_echo_n "checking for XML::Parser... " >&6; }
6107 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
6108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
6109 $as_echo "ok" >&6; }
6110 else
6111 as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5
6112 fi
6113 fi
6114
6115 # Substitute ALL_LINGUAS so we can use it in po/Makefile
6116
6117
6118 # Set DATADIRNAME correctly if it is not set yet
6119 # (copied from glib-gettext.m4)
6120 if test -z "$DATADIRNAME"; then
6121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6122 /* end confdefs.h. */
6123
6124 int
6125 main ()
6126 {
6127 extern int _nl_msg_cat_cntr;
6128 return _nl_msg_cat_cntr
6129 ;
6130 return 0;
6131 }
6132 _ACEOF
6133 if ac_fn_c_try_link "$LINENO"; then :
6134 DATADIRNAME=share
6135 else
6136 case $host in
6137 *-*-solaris*)
6138 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
6139 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
6140 DATADIRNAME=share
6141 else
6142 DATADIRNAME=lib
6143 fi
6144
6145 ;;
6146 *)
6147 DATADIRNAME=lib
6148 ;;
6149 esac
6150 fi
6151 rm -f core conftest.err conftest.$ac_objext \
6152 conftest$ac_exeext conftest.$ac_ext
6153 fi
6154
6155
6156
6157
6158
6159 # Extract the first word of "pkg-config", so it can be a program name with args.
6160 set dummy pkg-config; ac_word=$2
6161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6162 $as_echo_n "checking for $ac_word... " >&6; }
6163 if ${ac_cv_path_PKG_CONFIG+:} false; then :
6164 $as_echo_n "(cached) " >&6
6165 else
6166 case $PKG_CONFIG in
6167 [\\/]* | ?:[\\/]*)
6168 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6169 ;;
6170 *)
6171 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6172 for as_dir in $PATH
6173 do
6174 IFS=$as_save_IFS
6175 test -z "$as_dir" && as_dir=.
6176 for ac_exec_ext in '' $ac_executable_extensions; do
6177 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6178 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6179 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6180 break 2
6181 fi
6182 done
6183 done
6184 IFS=$as_save_IFS
6185
6186 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6187 ;;
6188 esac
6189 fi
6190 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6191 if test -n "$PKG_CONFIG"; then
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6193 $as_echo "$PKG_CONFIG" >&6; }
6194 else
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196 $as_echo "no" >&6; }
6197 fi
6198
6199
6200
6201 GETTEXT_PACKAGE=realmd
6202
6203
6204 cat >>confdefs.h <<_ACEOF
6205 #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
6206 _ACEOF
6207
6208
6209 for ac_header in locale.h
6210 do :
6211 ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
6212 if test "x$ac_cv_header_locale_h" = xyes; then :
6213 cat >>confdefs.h <<_ACEOF
6214 #define HAVE_LOCALE_H 1
6215 _ACEOF
6216
6217 fi
6218
6219 done
6220
6221 if test $ac_cv_header_locale_h = yes; then
6222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
6223 $as_echo_n "checking for LC_MESSAGES... " >&6; }
6224 if ${am_cv_val_LC_MESSAGES+:} false; then :
6225 $as_echo_n "(cached) " >&6
6226 else
6227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6228 /* end confdefs.h. */
6229 #include <locale.h>
6230 int
6231 main ()
6232 {
6233 return LC_MESSAGES
6234 ;
6235 return 0;
6236 }
6237 _ACEOF
6238 if ac_fn_c_try_link "$LINENO"; then :
6239 am_cv_val_LC_MESSAGES=yes
6240 else
6241 am_cv_val_LC_MESSAGES=no
6242 fi
6243 rm -f core conftest.err conftest.$ac_objext \
6244 conftest$ac_exeext conftest.$ac_ext
6245 fi
6246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
6247 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
6248 if test $am_cv_val_LC_MESSAGES = yes; then
6249
6250 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
6251
6252 fi
6253 fi
6254 USE_NLS=yes
6255
6256
6257 gt_cv_have_gettext=no
6258
6259 CATOBJEXT=NONE
6260 XGETTEXT=:
6261 INTLLIBS=
6262
6263 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
6264 if test "x$ac_cv_header_libintl_h" = xyes; then :
6265 gt_cv_func_dgettext_libintl="no"
6266 libintl_extra_libs=""
6267
6268 #
6269 # First check in libc
6270 #
6271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
6272 $as_echo_n "checking for ngettext in libc... " >&6; }
6273 if ${gt_cv_func_ngettext_libc+:} false; then :
6274 $as_echo_n "(cached) " >&6
6275 else
6276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6277 /* end confdefs.h. */
6278
6279 #include <libintl.h>
6280
6281 int
6282 main ()
6283 {
6284 return !ngettext ("","", 1)
6285 ;
6286 return 0;
6287 }
6288 _ACEOF
6289 if ac_fn_c_try_link "$LINENO"; then :
6290 gt_cv_func_ngettext_libc=yes
6291 else
6292 gt_cv_func_ngettext_libc=no
6293 fi
6294 rm -f core conftest.err conftest.$ac_objext \
6295 conftest$ac_exeext conftest.$ac_ext
6296
6297 fi
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
6299 $as_echo "$gt_cv_func_ngettext_libc" >&6; }
6300
6301 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
6303 $as_echo_n "checking for dgettext in libc... " >&6; }
6304 if ${gt_cv_func_dgettext_libc+:} false; then :
6305 $as_echo_n "(cached) " >&6
6306 else
6307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6308 /* end confdefs.h. */
6309
6310 #include <libintl.h>
6311
6312 int
6313 main ()
6314 {
6315 return !dgettext ("","")
6316 ;
6317 return 0;
6318 }
6319 _ACEOF
6320 if ac_fn_c_try_link "$LINENO"; then :
6321 gt_cv_func_dgettext_libc=yes
6322 else
6323 gt_cv_func_dgettext_libc=no
6324 fi
6325 rm -f core conftest.err conftest.$ac_objext \
6326 conftest$ac_exeext conftest.$ac_ext
6327
6328 fi
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
6330 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
6331 fi
6332
6333 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
6334 for ac_func in bind_textdomain_codeset
6335 do :
6336 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
6337 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
6338 cat >>confdefs.h <<_ACEOF
6339 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
6340 _ACEOF
6341
6342 fi
6343 done
6344
6345 fi
6346
6347 #
6348 # If we don't have everything we want, check in libintl
6349 #
6350 if test "$gt_cv_func_dgettext_libc" != "yes" \
6351 || test "$gt_cv_func_ngettext_libc" != "yes" \
6352 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
6353
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
6355 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
6356 if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
6357 $as_echo_n "(cached) " >&6
6358 else
6359 ac_check_lib_save_LIBS=$LIBS
6360 LIBS="-lintl $LIBS"
6361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6362 /* end confdefs.h. */
6363
6364 /* Override any GCC internal prototype to avoid an error.
6365 Use char because int might match the return type of a GCC
6366 builtin and then its argument prototype would still apply. */
6367 #ifdef __cplusplus
6368 extern "C"
6369 #endif
6370 char bindtextdomain ();
6371 int
6372 main ()
6373 {
6374 return bindtextdomain ();
6375 ;
6376 return 0;
6377 }
6378 _ACEOF
6379 if ac_fn_c_try_link "$LINENO"; then :
6380 ac_cv_lib_intl_bindtextdomain=yes
6381 else
6382 ac_cv_lib_intl_bindtextdomain=no
6383 fi
6384 rm -f core conftest.err conftest.$ac_objext \
6385 conftest$ac_exeext conftest.$ac_ext
6386 LIBS=$ac_check_lib_save_LIBS
6387 fi
6388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
6389 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
6390 if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
6392 $as_echo_n "checking for ngettext in -lintl... " >&6; }
6393 if ${ac_cv_lib_intl_ngettext+:} false; then :
6394 $as_echo_n "(cached) " >&6
6395 else
6396 ac_check_lib_save_LIBS=$LIBS
6397 LIBS="-lintl $LIBS"
6398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6399 /* end confdefs.h. */
6400
6401 /* Override any GCC internal prototype to avoid an error.
6402 Use char because int might match the return type of a GCC
6403 builtin and then its argument prototype would still apply. */
6404 #ifdef __cplusplus
6405 extern "C"
6406 #endif
6407 char ngettext ();
6408 int
6409 main ()
6410 {
6411 return ngettext ();
6412 ;
6413 return 0;
6414 }
6415 _ACEOF
6416 if ac_fn_c_try_link "$LINENO"; then :
6417 ac_cv_lib_intl_ngettext=yes
6418 else
6419 ac_cv_lib_intl_ngettext=no
6420 fi
6421 rm -f core conftest.err conftest.$ac_objext \
6422 conftest$ac_exeext conftest.$ac_ext
6423 LIBS=$ac_check_lib_save_LIBS
6424 fi
6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
6426 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
6427 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
6429 $as_echo_n "checking for dgettext in -lintl... " >&6; }
6430 if ${ac_cv_lib_intl_dgettext+:} false; then :
6431 $as_echo_n "(cached) " >&6
6432 else
6433 ac_check_lib_save_LIBS=$LIBS
6434 LIBS="-lintl $LIBS"
6435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6436 /* end confdefs.h. */
6437
6438 /* Override any GCC internal prototype to avoid an error.
6439 Use char because int might match the return type of a GCC
6440 builtin and then its argument prototype would still apply. */
6441 #ifdef __cplusplus
6442 extern "C"
6443 #endif
6444 char dgettext ();
6445 int
6446 main ()
6447 {
6448 return dgettext ();
6449 ;
6450 return 0;
6451 }
6452 _ACEOF
6453 if ac_fn_c_try_link "$LINENO"; then :
6454 ac_cv_lib_intl_dgettext=yes
6455 else
6456 ac_cv_lib_intl_dgettext=no
6457 fi
6458 rm -f core conftest.err conftest.$ac_objext \
6459 conftest$ac_exeext conftest.$ac_ext
6460 LIBS=$ac_check_lib_save_LIBS
6461 fi
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
6463 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
6464 if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
6465 gt_cv_func_dgettext_libintl=yes
6466 fi
6467
6468 fi
6469
6470 fi
6471
6472
6473 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
6475 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
6477 $as_echo "" >&6; }
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
6479 $as_echo_n "checking for ngettext in -lintl... " >&6; }
6480 if ${ac_cv_lib_intl_ngettext+:} false; then :
6481 $as_echo_n "(cached) " >&6
6482 else
6483 ac_check_lib_save_LIBS=$LIBS
6484 LIBS="-lintl -liconv $LIBS"
6485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6486 /* end confdefs.h. */
6487
6488 /* Override any GCC internal prototype to avoid an error.
6489 Use char because int might match the return type of a GCC
6490 builtin and then its argument prototype would still apply. */
6491 #ifdef __cplusplus
6492 extern "C"
6493 #endif
6494 char ngettext ();
6495 int
6496 main ()
6497 {
6498 return ngettext ();
6499 ;
6500 return 0;
6501 }
6502 _ACEOF
6503 if ac_fn_c_try_link "$LINENO"; then :
6504 ac_cv_lib_intl_ngettext=yes
6505 else
6506 ac_cv_lib_intl_ngettext=no
6507 fi
6508 rm -f core conftest.err conftest.$ac_objext \
6509 conftest$ac_exeext conftest.$ac_ext
6510 LIBS=$ac_check_lib_save_LIBS
6511 fi
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
6513 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
6514 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
6516 $as_echo_n "checking for dcgettext in -lintl... " >&6; }
6517 if ${ac_cv_lib_intl_dcgettext+:} false; then :
6518 $as_echo_n "(cached) " >&6
6519 else
6520 ac_check_lib_save_LIBS=$LIBS
6521 LIBS="-lintl -liconv $LIBS"
6522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6523 /* end confdefs.h. */
6524
6525 /* Override any GCC internal prototype to avoid an error.
6526 Use char because int might match the return type of a GCC
6527 builtin and then its argument prototype would still apply. */
6528 #ifdef __cplusplus
6529 extern "C"
6530 #endif
6531 char dcgettext ();
6532 int
6533 main ()
6534 {
6535 return dcgettext ();
6536 ;
6537 return 0;
6538 }
6539 _ACEOF
6540 if ac_fn_c_try_link "$LINENO"; then :
6541 ac_cv_lib_intl_dcgettext=yes
6542 else
6543 ac_cv_lib_intl_dcgettext=no
6544 fi
6545 rm -f core conftest.err conftest.$ac_objext \
6546 conftest$ac_exeext conftest.$ac_ext
6547 LIBS=$ac_check_lib_save_LIBS
6548 fi
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
6550 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
6551 if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
6552 gt_cv_func_dgettext_libintl=yes
6553 libintl_extra_libs=-liconv
6554 else
6555 :
6556 fi
6557
6558 else
6559 :
6560 fi
6561
6562 fi
6563
6564 #
6565 # If we found libintl, then check in it for bind_textdomain_codeset();
6566 # we'll prefer libc if neither have bind_textdomain_codeset(),
6567 # and both have dgettext and ngettext
6568 #
6569 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
6570 glib_save_LIBS="$LIBS"
6571 LIBS="$LIBS -lintl $libintl_extra_libs"
6572 unset ac_cv_func_bind_textdomain_codeset
6573 for ac_func in bind_textdomain_codeset
6574 do :
6575 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
6576 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
6577 cat >>confdefs.h <<_ACEOF
6578 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
6579 _ACEOF
6580
6581 fi
6582 done
6583
6584 LIBS="$glib_save_LIBS"
6585
6586 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
6587 gt_cv_func_dgettext_libc=no
6588 else
6589 if test "$gt_cv_func_dgettext_libc" = "yes" \
6590 && test "$gt_cv_func_ngettext_libc" = "yes"; then
6591 gt_cv_func_dgettext_libintl=no
6592 fi
6593 fi
6594 fi
6595 fi
6596
6597 if test "$gt_cv_func_dgettext_libc" = "yes" \
6598 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
6599 gt_cv_have_gettext=yes
6600 fi
6601
6602 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
6603 INTLLIBS="-lintl $libintl_extra_libs"
6604 fi
6605
6606 if test "$gt_cv_have_gettext" = "yes"; then
6607
6608 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
6609
6610 # Extract the first word of "msgfmt", so it can be a program name with args.
6611 set dummy msgfmt; ac_word=$2
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6613 $as_echo_n "checking for $ac_word... " >&6; }
6614 if ${ac_cv_path_MSGFMT+:} false; then :
6615 $as_echo_n "(cached) " >&6
6616 else
6617 case "$MSGFMT" in
6618 /*)
6619 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
6620 ;;
6621 *)
6622 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6623 for ac_dir in $PATH; do
6624 test -z "$ac_dir" && ac_dir=.
6625 if test -f $ac_dir/$ac_word; then
6626 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
6627 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
6628 break
6629 fi
6630 fi
6631 done
6632 IFS="$ac_save_ifs"
6633 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
6634 ;;
6635 esac
6636 fi
6637 MSGFMT="$ac_cv_path_MSGFMT"
6638 if test "$MSGFMT" != "no"; then
6639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
6640 $as_echo "$MSGFMT" >&6; }
6641 else
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643 $as_echo "no" >&6; }
6644 fi
6645 if test "$MSGFMT" != "no"; then
6646 glib_save_LIBS="$LIBS"
6647 LIBS="$LIBS $INTLLIBS"
6648 for ac_func in dcgettext
6649 do :
6650 ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
6651 if test "x$ac_cv_func_dcgettext" = xyes; then :
6652 cat >>confdefs.h <<_ACEOF
6653 #define HAVE_DCGETTEXT 1
6654 _ACEOF
6655
6656 fi
6657 done
6658
6659 MSGFMT_OPTS=
6660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
6661 $as_echo_n "checking if msgfmt accepts -c... " >&6; }
6662 cat >conftest.foo <<_ACEOF
6663
6664 msgid ""
6665 msgstr ""
6666 "Content-Type: text/plain; charset=UTF-8\n"
6667 "Project-Id-Version: test 1.0\n"
6668 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
6669 "Last-Translator: test <foo@bar.xx>\n"
6670 "Language-Team: C <LL@li.org>\n"
6671 "MIME-Version: 1.0\n"
6672 "Content-Transfer-Encoding: 8bit\n"
6673
6674 _ACEOF
6675 if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
6676 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
6677 ac_status=$?
6678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6679 test $ac_status = 0; }; then
6680 MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6681 $as_echo "yes" >&6; }
6682 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6683 $as_echo "no" >&6; }
6684 echo "$as_me: failed input was:" >&5
6685 sed 's/^/| /' conftest.foo >&5
6686 fi
6687
6688 # Extract the first word of "gmsgfmt", so it can be a program name with args.
6689 set dummy gmsgfmt; ac_word=$2
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6691 $as_echo_n "checking for $ac_word... " >&6; }
6692 if ${ac_cv_path_GMSGFMT+:} false; then :
6693 $as_echo_n "(cached) " >&6
6694 else
6695 case $GMSGFMT in
6696 [\\/]* | ?:[\\/]*)
6697 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
6698 ;;
6699 *)
6700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6701 for as_dir in $PATH
6702 do
6703 IFS=$as_save_IFS
6704 test -z "$as_dir" && as_dir=.
6705 for ac_exec_ext in '' $ac_executable_extensions; do
6706 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6707 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
6708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6709 break 2
6710 fi
6711 done
6712 done
6713 IFS=$as_save_IFS
6714
6715 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
6716 ;;
6717 esac
6718 fi
6719 GMSGFMT=$ac_cv_path_GMSGFMT
6720 if test -n "$GMSGFMT"; then
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
6722 $as_echo "$GMSGFMT" >&6; }
6723 else
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6725 $as_echo "no" >&6; }
6726 fi
6727
6728
6729 # Extract the first word of "xgettext", so it can be a program name with args.
6730 set dummy xgettext; ac_word=$2
6731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6732 $as_echo_n "checking for $ac_word... " >&6; }
6733 if ${ac_cv_path_XGETTEXT+:} false; then :
6734 $as_echo_n "(cached) " >&6
6735 else
6736 case "$XGETTEXT" in
6737 /*)
6738 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
6739 ;;
6740 *)
6741 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6742 for ac_dir in $PATH; do
6743 test -z "$ac_dir" && ac_dir=.
6744 if test -f $ac_dir/$ac_word; then
6745 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
6746 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
6747 break
6748 fi
6749 fi
6750 done
6751 IFS="$ac_save_ifs"
6752 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
6753 ;;
6754 esac
6755 fi
6756 XGETTEXT="$ac_cv_path_XGETTEXT"
6757 if test "$XGETTEXT" != ":"; then
6758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
6759 $as_echo "$XGETTEXT" >&6; }
6760 else
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6762 $as_echo "no" >&6; }
6763 fi
6764
6765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6766 /* end confdefs.h. */
6767
6768 int
6769 main ()
6770 {
6771 extern int _nl_msg_cat_cntr;
6772 return _nl_msg_cat_cntr
6773 ;
6774 return 0;
6775 }
6776 _ACEOF
6777 if ac_fn_c_try_link "$LINENO"; then :
6778 CATOBJEXT=.gmo
6779 DATADIRNAME=share
6780 else
6781 case $host in
6782 *-*-solaris*)
6783 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
6784 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
6785 CATOBJEXT=.gmo
6786 DATADIRNAME=share
6787 else
6788 CATOBJEXT=.mo
6789 DATADIRNAME=lib
6790 fi
6791
6792 ;;
6793 *-*-openbsd*)
6794 CATOBJEXT=.mo
6795 DATADIRNAME=share
6796 ;;
6797 *)
6798 CATOBJEXT=.mo
6799 DATADIRNAME=lib
6800 ;;
6801 esac
6802 fi
6803 rm -f core conftest.err conftest.$ac_objext \
6804 conftest$ac_exeext conftest.$ac_ext
6805 LIBS="$glib_save_LIBS"
6806 INSTOBJEXT=.mo
6807 else
6808 gt_cv_have_gettext=no
6809 fi
6810 fi
6811
6812 fi
6813
6814
6815
6816 if test "$gt_cv_have_gettext" = "yes" ; then
6817
6818 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6819
6820 fi
6821
6822 if test "$XGETTEXT" != ":"; then
6823 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
6824 : ;
6825 else
6826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
6827 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
6828 XGETTEXT=":"
6829 fi
6830 fi
6831
6832 # We need to process the po/ directory.
6833 POSUB=po
6834
6835 ac_config_commands="$ac_config_commands default-1"
6836
6837
6838 for lang in $ALL_LINGUAS; do
6839 GMOFILES="$GMOFILES $lang.gmo"
6840 POFILES="$POFILES $lang.po"
6841 done
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855 if test "$gt_cv_have_gettext" = "yes"; then
6856 if test "x$ALL_LINGUAS" = "x"; then
6857 LINGUAS=
6858 else
6859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6860 $as_echo_n "checking for catalogs to be installed... " >&6; }
6861 NEW_LINGUAS=
6862 for presentlang in $ALL_LINGUAS; do
6863 useit=no
6864 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
6865 desiredlanguages="$LINGUAS"
6866 else
6867 desiredlanguages="$ALL_LINGUAS"
6868 fi
6869 for desiredlang in $desiredlanguages; do
6870 # Use the presentlang catalog if desiredlang is
6871 # a. equal to presentlang, or
6872 # b. a variant of presentlang (because in this case,
6873 # presentlang can be used as a fallback for messages
6874 # which are not translated in the desiredlang catalog).
6875 case "$desiredlang" in
6876 "$presentlang"*) useit=yes;;
6877 esac
6878 done
6879 if test $useit = yes; then
6880 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
6881 fi
6882 done
6883 LINGUAS=$NEW_LINGUAS
6884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6885 $as_echo "$LINGUAS" >&6; }
6886 fi
6887
6888 if test -n "$LINGUAS"; then
6889 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
6890 fi
6891 fi
6892
6893 MKINSTALLDIRS=
6894 if test -n "$ac_aux_dir"; then
6895 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
6896 fi
6897 if test -z "$MKINSTALLDIRS"; then
6898 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
6899 fi
6900
6901
6902 test -d po || mkdir po
6903 if test "x$srcdir" != "x."; then
6904 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
6905 posrcprefix="$srcdir/"
6906 else
6907 posrcprefix="../$srcdir/"
6908 fi
6909 else
6910 posrcprefix="../"
6911 fi
6912 rm -f po/POTFILES
6913 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
6914 < $srcdir/po/POTFILES.in > po/POTFILES
6915
6916
6917 # --------------------------------------------------------------------
6918 # GLib
6919
6920
6921
6922
6923
6924
6925
6926 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6927 if test -n "$ac_tool_prefix"; then
6928 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6929 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6931 $as_echo_n "checking for $ac_word... " >&6; }
6932 if ${ac_cv_path_PKG_CONFIG+:} false; then :
6933 $as_echo_n "(cached) " >&6
6934 else
6935 case $PKG_CONFIG in
6936 [\\/]* | ?:[\\/]*)
6937 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6938 ;;
6939 *)
6940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6941 for as_dir in $PATH
6942 do
6943 IFS=$as_save_IFS
6944 test -z "$as_dir" && as_dir=.
6945 for ac_exec_ext in '' $ac_executable_extensions; do
6946 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6947 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6949 break 2
6950 fi
6951 done
6952 done
6953 IFS=$as_save_IFS
6954
6955 ;;
6956 esac
6957 fi
6958 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6959 if test -n "$PKG_CONFIG"; then
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6961 $as_echo "$PKG_CONFIG" >&6; }
6962 else
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6964 $as_echo "no" >&6; }
6965 fi
6966
6967
6968 fi
6969 if test -z "$ac_cv_path_PKG_CONFIG"; then
6970 ac_pt_PKG_CONFIG=$PKG_CONFIG
6971 # Extract the first word of "pkg-config", so it can be a program name with args.
6972 set dummy pkg-config; ac_word=$2
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6974 $as_echo_n "checking for $ac_word... " >&6; }
6975 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6976 $as_echo_n "(cached) " >&6
6977 else
6978 case $ac_pt_PKG_CONFIG in
6979 [\\/]* | ?:[\\/]*)
6980 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6981 ;;
6982 *)
6983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6984 for as_dir in $PATH
6985 do
6986 IFS=$as_save_IFS
6987 test -z "$as_dir" && as_dir=.
6988 for ac_exec_ext in '' $ac_executable_extensions; do
6989 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6990 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6992 break 2
6993 fi
6994 done
6995 done
6996 IFS=$as_save_IFS
6997
6998 ;;
6999 esac
7000 fi
7001 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7002 if test -n "$ac_pt_PKG_CONFIG"; then
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7004 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7005 else
7006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7007 $as_echo "no" >&6; }
7008 fi
7009
7010 if test "x$ac_pt_PKG_CONFIG" = x; then
7011 PKG_CONFIG=""
7012 else
7013 case $cross_compiling:$ac_tool_warned in
7014 yes:)
7015 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7016 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7017 ac_tool_warned=yes ;;
7018 esac
7019 PKG_CONFIG=$ac_pt_PKG_CONFIG
7020 fi
7021 else
7022 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7023 fi
7024
7025 fi
7026 if test -n "$PKG_CONFIG"; then
7027 _pkg_min_version=0.9.0
7028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7029 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7030 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7032 $as_echo "yes" >&6; }
7033 else
7034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7035 $as_echo "no" >&6; }
7036 PKG_CONFIG=""
7037 fi
7038 fi
7039
7040 pkg_failed=no
7041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
7042 $as_echo_n "checking for GLIB... " >&6; }
7043
7044 if test -n "$GLIB_CFLAGS"; then
7045 pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
7046 elif test -n "$PKG_CONFIG"; then
7047 if test -n "$PKG_CONFIG" && \
7048 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.33.0
7049 gio-2.0 >= 2.33.0
7050 gio-unix-2.0\""; } >&5
7051 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.33.0
7052 gio-2.0 >= 2.33.0
7053 gio-unix-2.0") 2>&5
7054 ac_status=$?
7055 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7056 test $ac_status = 0; }; then
7057 pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.33.0
7058 gio-2.0 >= 2.33.0
7059 gio-unix-2.0" 2>/dev/null`
7060 else
7061 pkg_failed=yes
7062 fi
7063 else
7064 pkg_failed=untried
7065 fi
7066 if test -n "$GLIB_LIBS"; then
7067 pkg_cv_GLIB_LIBS="$GLIB_LIBS"
7068 elif test -n "$PKG_CONFIG"; then
7069 if test -n "$PKG_CONFIG" && \
7070 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.33.0
7071 gio-2.0 >= 2.33.0
7072 gio-unix-2.0\""; } >&5
7073 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.33.0
7074 gio-2.0 >= 2.33.0
7075 gio-unix-2.0") 2>&5
7076 ac_status=$?
7077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7078 test $ac_status = 0; }; then
7079 pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.33.0
7080 gio-2.0 >= 2.33.0
7081 gio-unix-2.0" 2>/dev/null`
7082 else
7083 pkg_failed=yes
7084 fi
7085 else
7086 pkg_failed=untried
7087 fi
7088
7089
7090
7091 if test $pkg_failed = yes; then
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7093 $as_echo "no" >&6; }
7094
7095 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7096 _pkg_short_errors_supported=yes
7097 else
7098 _pkg_short_errors_supported=no
7099 fi
7100 if test $_pkg_short_errors_supported = yes; then
7101 GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.33.0
7102 gio-2.0 >= 2.33.0
7103 gio-unix-2.0" 2>&1`
7104 else
7105 GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.33.0
7106 gio-2.0 >= 2.33.0
7107 gio-unix-2.0" 2>&1`
7108 fi
7109 # Put the nasty error message in config.log where it belongs
7110 echo "$GLIB_PKG_ERRORS" >&5
7111
7112 as_fn_error $? "Package requirements (glib-2.0 >= 2.33.0
7113 gio-2.0 >= 2.33.0
7114 gio-unix-2.0) were not met:
7115
7116 $GLIB_PKG_ERRORS
7117
7118 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7119 installed software in a non-standard prefix.
7120
7121 Alternatively, you may set the environment variables GLIB_CFLAGS
7122 and GLIB_LIBS to avoid the need to call pkg-config.
7123 See the pkg-config man page for more details." "$LINENO" 5
7124
7125 elif test $pkg_failed = untried; then
7126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7127 $as_echo "no" >&6; }
7128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7129 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7130 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7131 is in your PATH or set the PKG_CONFIG environment variable to the full
7132 path to pkg-config.
7133
7134 Alternatively, you may set the environment variables GLIB_CFLAGS
7135 and GLIB_LIBS to avoid the need to call pkg-config.
7136 See the pkg-config man page for more details.
7137
7138 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7139 See \`config.log' for more details" "$LINENO" 5; }
7140
7141 else
7142 GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS
7143 GLIB_LIBS=$pkg_cv_GLIB_LIBS
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7145 $as_echo "yes" >&6; }
7146
7147 fi
7148
7149
7150
7151
7152 # --------------------------------------------------------------------
7153 # PackageKit
7154
7155
7156 pkg_failed=no
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PACKAGEKIT" >&5
7158 $as_echo_n "checking for PACKAGEKIT... " >&6; }
7159
7160 if test -n "$PACKAGEKIT_CFLAGS"; then
7161 pkg_cv_PACKAGEKIT_CFLAGS="$PACKAGEKIT_CFLAGS"
7162 elif test -n "$PKG_CONFIG"; then
7163 if test -n "$PKG_CONFIG" && \
7164 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"packagekit-glib2\""; } >&5
7165 ($PKG_CONFIG --exists --print-errors "packagekit-glib2") 2>&5
7166 ac_status=$?
7167 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7168 test $ac_status = 0; }; then
7169 pkg_cv_PACKAGEKIT_CFLAGS=`$PKG_CONFIG --cflags "packagekit-glib2" 2>/dev/null`
7170 else
7171 pkg_failed=yes
7172 fi
7173 else
7174 pkg_failed=untried
7175 fi
7176 if test -n "$PACKAGEKIT_LIBS"; then
7177 pkg_cv_PACKAGEKIT_LIBS="$PACKAGEKIT_LIBS"
7178 elif test -n "$PKG_CONFIG"; then
7179 if test -n "$PKG_CONFIG" && \
7180 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"packagekit-glib2\""; } >&5
7181 ($PKG_CONFIG --exists --print-errors "packagekit-glib2") 2>&5
7182 ac_status=$?
7183 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7184 test $ac_status = 0; }; then
7185 pkg_cv_PACKAGEKIT_LIBS=`$PKG_CONFIG --libs "packagekit-glib2" 2>/dev/null`
7186 else
7187 pkg_failed=yes
7188 fi
7189 else
7190 pkg_failed=untried
7191 fi
7192
7193
7194
7195 if test $pkg_failed = yes; then
7196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7197 $as_echo "no" >&6; }
7198
7199 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7200 _pkg_short_errors_supported=yes
7201 else
7202 _pkg_short_errors_supported=no
7203 fi
7204 if test $_pkg_short_errors_supported = yes; then
7205 PACKAGEKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "packagekit-glib2" 2>&1`
7206 else
7207 PACKAGEKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "packagekit-glib2" 2>&1`
7208 fi
7209 # Put the nasty error message in config.log where it belongs
7210 echo "$PACKAGEKIT_PKG_ERRORS" >&5
7211
7212 as_fn_error $? "Package requirements (packagekit-glib2) were not met:
7213
7214 $PACKAGEKIT_PKG_ERRORS
7215
7216 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7217 installed software in a non-standard prefix.
7218
7219 Alternatively, you may set the environment variables PACKAGEKIT_CFLAGS
7220 and PACKAGEKIT_LIBS to avoid the need to call pkg-config.
7221 See the pkg-config man page for more details." "$LINENO" 5
7222
7223 elif test $pkg_failed = untried; then
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7225 $as_echo "no" >&6; }
7226 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7227 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7228 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7229 is in your PATH or set the PKG_CONFIG environment variable to the full
7230 path to pkg-config.
7231
7232 Alternatively, you may set the environment variables PACKAGEKIT_CFLAGS
7233 and PACKAGEKIT_LIBS to avoid the need to call pkg-config.
7234 See the pkg-config man page for more details.
7235
7236 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7237 See \`config.log' for more details" "$LINENO" 5; }
7238
7239 else
7240 PACKAGEKIT_CFLAGS=$pkg_cv_PACKAGEKIT_CFLAGS
7241 PACKAGEKIT_LIBS=$pkg_cv_PACKAGEKIT_LIBS
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7243 $as_echo "yes" >&6; }
7244
7245 fi
7246
7247
7248
7249 # --------------------------------------------------------------------
7250 # PolicyKit
7251
7252
7253 pkg_failed=no
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POLKIT" >&5
7255 $as_echo_n "checking for POLKIT... " >&6; }
7256
7257 if test -n "$POLKIT_CFLAGS"; then
7258 pkg_cv_POLKIT_CFLAGS="$POLKIT_CFLAGS"
7259 elif test -n "$PKG_CONFIG"; then
7260 if test -n "$PKG_CONFIG" && \
7261 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"polkit-gobject-1\""; } >&5
7262 ($PKG_CONFIG --exists --print-errors "polkit-gobject-1") 2>&5
7263 ac_status=$?
7264 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7265 test $ac_status = 0; }; then
7266 pkg_cv_POLKIT_CFLAGS=`$PKG_CONFIG --cflags "polkit-gobject-1" 2>/dev/null`
7267 else
7268 pkg_failed=yes
7269 fi
7270 else
7271 pkg_failed=untried
7272 fi
7273 if test -n "$POLKIT_LIBS"; then
7274 pkg_cv_POLKIT_LIBS="$POLKIT_LIBS"
7275 elif test -n "$PKG_CONFIG"; then
7276 if test -n "$PKG_CONFIG" && \
7277 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"polkit-gobject-1\""; } >&5
7278 ($PKG_CONFIG --exists --print-errors "polkit-gobject-1") 2>&5
7279 ac_status=$?
7280 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7281 test $ac_status = 0; }; then
7282 pkg_cv_POLKIT_LIBS=`$PKG_CONFIG --libs "polkit-gobject-1" 2>/dev/null`
7283 else
7284 pkg_failed=yes
7285 fi
7286 else
7287 pkg_failed=untried
7288 fi
7289
7290
7291
7292 if test $pkg_failed = yes; then
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7294 $as_echo "no" >&6; }
7295
7296 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7297 _pkg_short_errors_supported=yes
7298 else
7299 _pkg_short_errors_supported=no
7300 fi
7301 if test $_pkg_short_errors_supported = yes; then
7302 POLKIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "polkit-gobject-1" 2>&1`
7303 else
7304 POLKIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "polkit-gobject-1" 2>&1`
7305 fi
7306 # Put the nasty error message in config.log where it belongs
7307 echo "$POLKIT_PKG_ERRORS" >&5
7308
7309 as_fn_error $? "Package requirements (polkit-gobject-1) were not met:
7310
7311 $POLKIT_PKG_ERRORS
7312
7313 Consider adjusting the PKG_CONFIG_PATH environment variable if you
7314 installed software in a non-standard prefix.
7315
7316 Alternatively, you may set the environment variables POLKIT_CFLAGS
7317 and POLKIT_LIBS to avoid the need to call pkg-config.
7318 See the pkg-config man page for more details." "$LINENO" 5
7319
7320 elif test $pkg_failed = untried; then
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7322 $as_echo "no" >&6; }
7323 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7324 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7325 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
7326 is in your PATH or set the PKG_CONFIG environment variable to the full
7327 path to pkg-config.
7328
7329 Alternatively, you may set the environment variables POLKIT_CFLAGS
7330 and POLKIT_LIBS to avoid the need to call pkg-config.
7331 See the pkg-config man page for more details.
7332
7333 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
7334 See \`config.log' for more details" "$LINENO" 5; }
7335
7336 else
7337 POLKIT_CFLAGS=$pkg_cv_POLKIT_CFLAGS
7338 POLKIT_LIBS=$pkg_cv_POLKIT_LIBS
7339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7340 $as_echo "yes" >&6; }
7341
7342 fi
7343
7344
7345
7346 # -------------------------------------------------------------------
7347 # Kerberos
7348
7349 if test "$KRB5_LIBS" != ""; then
7350 KRB5_PASSED_LIBS=$KRB5_LIBS
7351 fi
7352
7353 if test "$KRB5_CFLAGS" != ""; then
7354 KRB5_PASSED_CFLAGS=$KRB5_CFLAGS
7355 fi
7356
7357 # Extract the first word of "krb5-config", so it can be a program name with args.
7358 set dummy krb5-config; ac_word=$2
7359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7360 $as_echo_n "checking for $ac_word... " >&6; }
7361 if ${ac_cv_path_KRB5_CONFIG+:} false; then :
7362 $as_echo_n "(cached) " >&6
7363 else
7364 case $KRB5_CONFIG in
7365 [\\/]* | ?:[\\/]*)
7366 ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path.
7367 ;;
7368 *)
7369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7370 for as_dir in $PATH
7371 do
7372 IFS=$as_save_IFS
7373 test -z "$as_dir" && as_dir=.
7374 for ac_exec_ext in '' $ac_executable_extensions; do
7375 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7376 ac_cv_path_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7377 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7378 break 2
7379 fi
7380 done
7381 done
7382 IFS=$as_save_IFS
7383
7384 ;;
7385 esac
7386 fi
7387 KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG
7388 if test -n "$KRB5_CONFIG"; then
7389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5_CONFIG" >&5
7390 $as_echo "$KRB5_CONFIG" >&6; }
7391 else
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7393 $as_echo "no" >&6; }
7394 fi
7395
7396
7397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working krb5-config" >&5
7398 $as_echo_n "checking for working krb5-config... " >&6; }
7399 if test -x "$KRB5_CONFIG"; then
7400 KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
7401 KRB5_LIBS="`$KRB5_CONFIG --libs`"
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7403 $as_echo "yes" >&6; }
7404 else
7405 if test x$KRB5_PASSED_LIBS = x; then
7406 as_fn_error $? "no. Please install MIT kerberos devel package" "$LINENO" 5
7407 fi
7408 fi
7409
7410 if test x$KRB5_PASSED_LIBS != x; then
7411 KRB5_LIBS=$KRB5_PASSED_LIBS
7412 fi
7413
7414 if test x$KRB5_PASSED_CFLAGS != x; then
7415 KRB5_CFLAGS=$KRB5_PASSED_CFLAGS
7416 fi
7417
7418
7419
7420
7421
7422 # -------------------------------------------------------------------
7423 # Directories
7424
7425 DBUS_POLICY_DIR="${sysconfdir}/dbus-1/system.d"
7426
7427
7428 POLKIT_ACTION_DIR="${datadir}/polkit-1/actions"
7429
7430
7431 # --------------------------------------------------------------------
7432 # Compilation options
7433
7434 if test "$GCC" = "yes"; then
7435 CFLAGS="$CFLAGS \
7436 -Wall -Wmissing-declarations \
7437 -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
7438 -Wdeclaration-after-statement -Wformat=2 -Winit-self \
7439 -Waggregate-return -Wmissing-format-attribute"
7440
7441 for option in -Wmissing-include-dirs -Wundef; do
7442 SAVE_CFLAGS="$CFLAGS"
7443 CFLAGS="$CFLAGS $option"
7444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands $option" >&5
7445 $as_echo_n "checking whether gcc understands $option... " >&6; }
7446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7447 /* end confdefs.h. */
7448
7449 int
7450 main ()
7451 {
7452
7453 ;
7454 return 0;
7455 }
7456 _ACEOF
7457 if ac_fn_c_try_compile "$LINENO"; then :
7458 has_option=yes
7459 else
7460 has_option=no
7461 fi
7462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5
7464 $as_echo "$has_option" >&6; }
7465 if test $has_option = no; then
7466 CFLAGS="$SAVE_CFLAGS"
7467 fi
7468 done
7469 fi
7470
7471 # Check whether --enable-strict was given.
7472 if test "${enable_strict+set}" = set; then :
7473 enableval=$enable_strict;
7474 fi
7475
7476
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build strict" >&5
7478 $as_echo_n "checking build strict... " >&6; }
7479
7480 if test "$enable_strict" = "yes"; then
7481 CFLAGS="$CFLAGS -Werror \
7482 -DG_DISABLE_DEPRECATED"
7483 TEST_MODE="thorough"
7484 else
7485 CFLAGS="$CFLAGS -Wno-error"
7486 TEST_MODE="quick"
7487 enable_strict="no"
7488 fi
7489
7490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_strict" >&5
7491 $as_echo "$enable_strict" >&6; }
7492
7493
7494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug mode" >&5
7495 $as_echo_n "checking for debug mode... " >&6; }
7496 # Check whether --enable-debug was given.
7497 if test "${enable_debug+set}" = set; then :
7498 enableval=$enable_debug;
7499 fi
7500
7501
7502 if test "$enable_debug" != "no"; then
7503
7504 cat >>confdefs.h <<_ACEOF
7505 #define WITH_DEBUG 1
7506 _ACEOF
7507
7508
7509 cat >>confdefs.h <<_ACEOF
7510 #define _DEBUG 1
7511 _ACEOF
7512
7513 CFLAGS="$CFLAGS -g"
7514 fi
7515 if test "$enable_debug" = "yes"; then
7516 debug_status="yes"
7517 CFLAGS="$CFLAGS -O0"
7518 elif test "$enable_debug" = "no"; then
7519 debug_status="no"
7520 CFLAGS="$CFLAGS -O2"
7521
7522 cat >>confdefs.h <<_ACEOF
7523 #define G_DISABLE_ASSERT 1
7524 _ACEOF
7525
7526 else
7527 debug_status="default"
7528 fi
7529
7530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $debug_status" >&5
7531 $as_echo "$debug_status" >&6; }
7532
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with gcov testing" >&5
7534 $as_echo_n "checking whether to build with gcov testing... " >&6; }
7535 # Check whether --enable-coverage was given.
7536 if test "${enable_coverage+set}" = set; then :
7537 enableval=$enable_coverage;
7538 else
7539 enable_coverage=no
7540 fi
7541
7542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_coverage" >&5
7543 $as_echo "$enable_coverage" >&6; }
7544
7545 if test "$enable_coverage" = "yes"; then
7546 if test "$GCC" != "yes"; then
7547 as_fn_error $? "Coverage testing requires GCC" "$LINENO" 5
7548 fi
7549
7550 # Extract the first word of "gcov", so it can be a program name with args.
7551 set dummy gcov; ac_word=$2
7552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7553 $as_echo_n "checking for $ac_word... " >&6; }
7554 if ${ac_cv_path_GCOV+:} false; then :
7555 $as_echo_n "(cached) " >&6
7556 else
7557 case $GCOV in
7558 [\\/]* | ?:[\\/]*)
7559 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
7560 ;;
7561 *)
7562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7563 for as_dir in $PATH
7564 do
7565 IFS=$as_save_IFS
7566 test -z "$as_dir" && as_dir=.
7567 for ac_exec_ext in '' $ac_executable_extensions; do
7568 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7569 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
7570 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7571 break 2
7572 fi
7573 done
7574 done
7575 IFS=$as_save_IFS
7576
7577 test -z "$ac_cv_path_GCOV" && ac_cv_path_GCOV="no"
7578 ;;
7579 esac
7580 fi
7581 GCOV=$ac_cv_path_GCOV
7582 if test -n "$GCOV"; then
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
7584 $as_echo "$GCOV" >&6; }
7585 else
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7587 $as_echo "no" >&6; }
7588 fi
7589
7590
7591 if test "$GCOV" = "no" ; then
7592 as_fn_error $? "gcov tool is not available" "$LINENO" 5
7593 fi
7594
7595 # Extract the first word of "lcov", so it can be a program name with args.
7596 set dummy lcov; ac_word=$2
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7598 $as_echo_n "checking for $ac_word... " >&6; }
7599 if ${ac_cv_path_LCOV+:} false; then :
7600 $as_echo_n "(cached) " >&6
7601 else
7602 case $LCOV in
7603 [\\/]* | ?:[\\/]*)
7604 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
7605 ;;
7606 *)
7607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7608 for as_dir in $PATH
7609 do
7610 IFS=$as_save_IFS
7611 test -z "$as_dir" && as_dir=.
7612 for ac_exec_ext in '' $ac_executable_extensions; do
7613 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7614 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
7615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7616 break 2
7617 fi
7618 done
7619 done
7620 IFS=$as_save_IFS
7621
7622 test -z "$ac_cv_path_LCOV" && ac_cv_path_LCOV="no"
7623 ;;
7624 esac
7625 fi
7626 LCOV=$ac_cv_path_LCOV
7627 if test -n "$LCOV"; then
7628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
7629 $as_echo "$LCOV" >&6; }
7630 else
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7632 $as_echo "no" >&6; }
7633 fi
7634
7635
7636 if test "$LCOV" = "no" ; then
7637 as_fn_error $? "lcov tool is not installed" "$LINENO" 5
7638 fi
7639
7640 # Extract the first word of "genhtml", so it can be a program name with args.
7641 set dummy genhtml; ac_word=$2
7642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7643 $as_echo_n "checking for $ac_word... " >&6; }
7644 if ${ac_cv_path_GENHTML+:} false; then :
7645 $as_echo_n "(cached) " >&6
7646 else
7647 case $GENHTML in
7648 [\\/]* | ?:[\\/]*)
7649 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
7650 ;;
7651 *)
7652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7653 for as_dir in $PATH
7654 do
7655 IFS=$as_save_IFS
7656 test -z "$as_dir" && as_dir=.
7657 for ac_exec_ext in '' $ac_executable_extensions; do
7658 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7659 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
7660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7661 break 2
7662 fi
7663 done
7664 done
7665 IFS=$as_save_IFS
7666
7667 test -z "$ac_cv_path_GENHTML" && ac_cv_path_GENHTML="no"
7668 ;;
7669 esac
7670 fi
7671 GENHTML=$ac_cv_path_GENHTML
7672 if test -n "$GENHTML"; then
7673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
7674 $as_echo "$GENHTML" >&6; }
7675 else
7676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7677 $as_echo "no" >&6; }
7678 fi
7679
7680
7681 if test "$GENHTML" = "no" ; then
7682 as_fn_error $? "lcov's genhtml tool is not installed" "$LINENO" 5
7683 fi
7684
7685 CFLAGS="$CFLAGS -O0 -g -fprofile-arcs -ftest-coverage"
7686 LDFLAGS="$LDFLAGS -lgcov"
7687 fi
7688
7689 if test "$enable_coverage" = "yes"; then
7690 WITH_COVERAGE_TRUE=
7691 WITH_COVERAGE_FALSE='#'
7692 else
7693 WITH_COVERAGE_TRUE='#'
7694 WITH_COVERAGE_FALSE=
7695 fi
7696
7697
7698
7699
7700
7701 # ------------------------------------------------------------------------------
7702 # Results
7703
7704 SERVICE_DIR=$libdir/realmd
7705
7706
7707 ac_config_files="$ac_config_files Makefile build/Makefile dbus/Makefile po/Makefile.in po/Makefile service/Makefile tests/Makefile tools/Makefile"
7708
7709 cat >confcache <<\_ACEOF
7710 # This file is a shell script that caches the results of configure
7711 # tests run on this system so they can be shared between configure
7712 # scripts and configure runs, see configure's option --config-cache.
7713 # It is not useful on other systems. If it contains results you don't
7714 # want to keep, you may remove or edit it.
7715 #
7716 # config.status only pays attention to the cache file if you give it
7717 # the --recheck option to rerun configure.
7718 #
7719 # `ac_cv_env_foo' variables (set or unset) will be overridden when
7720 # loading this file, other *unset* `ac_cv_foo' will be assigned the
7721 # following values.
7722
7723 _ACEOF
7724
7725 # The following way of writing the cache mishandles newlines in values,
7726 # but we know of no workaround that is simple, portable, and efficient.
7727 # So, we kill variables containing newlines.
7728 # Ultrix sh set writes to stderr and can't be redirected directly,
7729 # and sets the high bit in the cache file unless we assign to the vars.
7730 (
7731 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
7732 eval ac_val=\$$ac_var
7733 case $ac_val in #(
7734 *${as_nl}*)
7735 case $ac_var in #(
7736 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
7737 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
7738 esac
7739 case $ac_var in #(
7740 _ | IFS | as_nl) ;; #(
7741 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
7742 *) { eval $ac_var=; unset $ac_var;} ;;
7743 esac ;;
7744 esac
7745 done
7746
7747 (set) 2>&1 |
7748 case $as_nl`(ac_space=' '; set) 2>&1` in #(
7749 *${as_nl}ac_space=\ *)
7750 # `set' does not quote correctly, so add quotes: double-quote
7751 # substitution turns \\\\ into \\, and sed turns \\ into \.
7752 sed -n \
7753 "s/'/'\\\\''/g;
7754 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
7755 ;; #(
7756 *)
7757 # `set' quotes correctly as required by POSIX, so do not add quotes.
7758 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
7759 ;;
7760 esac |
7761 sort
7762 ) |
7763 sed '
7764 /^ac_cv_env_/b end
7765 t clear
7766 :clear
7767 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
7768 t end
7769 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
7770 :end' >>confcache
7771 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
7772 if test -w "$cache_file"; then
7773 if test "x$cache_file" != "x/dev/null"; then
7774 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
7775 $as_echo "$as_me: updating cache $cache_file" >&6;}
7776 if test ! -f "$cache_file" || test -h "$cache_file"; then
7777 cat confcache >"$cache_file"
7778 else
7779 case $cache_file in #(
7780 */* | ?:*)
7781 mv -f confcache "$cache_file"$$ &&
7782 mv -f "$cache_file"$$ "$cache_file" ;; #(
7783 *)
7784 mv -f confcache "$cache_file" ;;
7785 esac
7786 fi
7787 fi
7788 else
7789 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
7790 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
7791 fi
7792 fi
7793 rm -f confcache
7794
7795 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7796 # Let make expand exec_prefix.
7797 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7798
7799 DEFS=-DHAVE_CONFIG_H
7800
7801 ac_libobjs=
7802 ac_ltlibobjs=
7803 U=
7804 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
7805 # 1. Remove the extension, and $U if already installed.
7806 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
7807 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
7808 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
7809 # will be set to the directory where LIBOBJS objects are built.
7810 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
7811 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
7812 done
7813 LIBOBJS=$ac_libobjs
7814
7815 LTLIBOBJS=$ac_ltlibobjs
7816
7817
7818 if test -n "$EXEEXT"; then
7819 am__EXEEXT_TRUE=
7820 am__EXEEXT_FALSE='#'
7821 else
7822 am__EXEEXT_TRUE='#'
7823 am__EXEEXT_FALSE=
7824 fi
7825
7826 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
7827 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
7828 Usually this means the macro was only invoked conditionally." "$LINENO" 5
7829 fi
7830 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
7831 as_fn_error $? "conditional \"AMDEP\" was never defined.
7832 Usually this means the macro was only invoked conditionally." "$LINENO" 5
7833 fi
7834 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
7835 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
7836 Usually this means the macro was only invoked conditionally." "$LINENO" 5
7837 fi
7838 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
7839 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
7840 Usually this means the macro was only invoked conditionally." "$LINENO" 5
7841 fi
7842
7843 ac_config_commands="$ac_config_commands po/stamp-it"
7844
7845
7846 if test -z "${WITH_COVERAGE_TRUE}" && test -z "${WITH_COVERAGE_FALSE}"; then
7847 as_fn_error $? "conditional \"WITH_COVERAGE\" was never defined.
7848 Usually this means the macro was only invoked conditionally." "$LINENO" 5
7849 fi
7850
7851 : "${CONFIG_STATUS=./config.status}"
7852 ac_write_fail=0
7853 ac_clean_files_save=$ac_clean_files
7854 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
7855 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
7856 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
7857 as_write_fail=0
7858 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
7859 #! $SHELL
7860 # Generated by $as_me.
7861 # Run this file to recreate the current configuration.
7862 # Compiler output produced by configure, useful for debugging
7863 # configure, is in config.log if it exists.
7864
7865 debug=false
7866 ac_cs_recheck=false
7867 ac_cs_silent=false
7868
7869 SHELL=\${CONFIG_SHELL-$SHELL}
7870 export SHELL
7871 _ASEOF
7872 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
7873 ## -------------------- ##
7874 ## M4sh Initialization. ##
7875 ## -------------------- ##
7876
7877 # Be more Bourne compatible
7878 DUALCASE=1; export DUALCASE # for MKS sh
7879 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
7880 emulate sh
7881 NULLCMD=:
7882 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
7883 # is contrary to our usage. Disable this feature.
7884 alias -g '${1+"$@"}'='"$@"'
7885 setopt NO_GLOB_SUBST
7886 else
7887 case `(set -o) 2>/dev/null` in #(
7888 *posix*) :
7889 set -o posix ;; #(
7890 *) :
7891 ;;
7892 esac
7893 fi
7894
7895
7896 as_nl='
7897 '
7898 export as_nl
7899 # Printing a long string crashes Solaris 7 /usr/bin/printf.
7900 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7901 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
7902 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
7903 # Prefer a ksh shell builtin over an external printf program on Solaris,
7904 # but without wasting forks for bash or zsh.
7905 if test -z "$BASH_VERSION$ZSH_VERSION" \
7906 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
7907 as_echo='print -r --'
7908 as_echo_n='print -rn --'
7909 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
7910 as_echo='printf %s\n'
7911 as_echo_n='printf %s'
7912 else
7913 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
7914 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
7915 as_echo_n='/usr/ucb/echo -n'
7916 else
7917 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
7918 as_echo_n_body='eval
7919 arg=$1;
7920 case $arg in #(
7921 *"$as_nl"*)
7922 expr "X$arg" : "X\\(.*\\)$as_nl";
7923 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
7924 esac;
7925 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
7926 '
7927 export as_echo_n_body
7928 as_echo_n='sh -c $as_echo_n_body as_echo'
7929 fi
7930 export as_echo_body
7931 as_echo='sh -c $as_echo_body as_echo'
7932 fi
7933
7934 # The user is always right.
7935 if test "${PATH_SEPARATOR+set}" != set; then
7936 PATH_SEPARATOR=:
7937 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
7938 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
7939 PATH_SEPARATOR=';'
7940 }
7941 fi
7942
7943
7944 # IFS
7945 # We need space, tab and new line, in precisely that order. Quoting is
7946 # there to prevent editors from complaining about space-tab.
7947 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
7948 # splitting by setting IFS to empty value.)
7949 IFS=" "" $as_nl"
7950
7951 # Find who we are. Look in the path if we contain no directory separator.
7952 as_myself=
7953 case $0 in #((
7954 *[\\/]* ) as_myself=$0 ;;
7955 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7956 for as_dir in $PATH
7957 do
7958 IFS=$as_save_IFS
7959 test -z "$as_dir" && as_dir=.
7960 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
7961 done
7962 IFS=$as_save_IFS
7963
7964 ;;
7965 esac
7966 # We did not find ourselves, most probably we were run as `sh COMMAND'
7967 # in which case we are not to be found in the path.
7968 if test "x$as_myself" = x; then
7969 as_myself=$0
7970 fi
7971 if test ! -f "$as_myself"; then
7972 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
7973 exit 1
7974 fi
7975
7976 # Unset variables that we do not need and which cause bugs (e.g. in
7977 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
7978 # suppresses any "Segmentation fault" message there. '((' could
7979 # trigger a bug in pdksh 5.2.14.
7980 for as_var in BASH_ENV ENV MAIL MAILPATH
7981 do eval test x\${$as_var+set} = xset \
7982 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
7983 done
7984 PS1='$ '
7985 PS2='> '
7986 PS4='+ '
7987
7988 # NLS nuisances.
7989 LC_ALL=C
7990 export LC_ALL
7991 LANGUAGE=C
7992 export LANGUAGE
7993
7994 # CDPATH.
7995 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
7996
7997
7998 # as_fn_error STATUS ERROR [LINENO LOG_FD]
7999 # ----------------------------------------
8000 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
8001 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
8002 # script with STATUS, using 1 if that was 0.
8003 as_fn_error ()
8004 {
8005 as_status=$1; test $as_status -eq 0 && as_status=1
8006 if test "$4"; then
8007 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
8008 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
8009 fi
8010 $as_echo "$as_me: error: $2" >&2
8011 as_fn_exit $as_status
8012 } # as_fn_error
8013
8014
8015 # as_fn_set_status STATUS
8016 # -----------------------
8017 # Set $? to STATUS, without forking.
8018 as_fn_set_status ()
8019 {
8020 return $1
8021 } # as_fn_set_status
8022
8023 # as_fn_exit STATUS
8024 # -----------------
8025 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
8026 as_fn_exit ()
8027 {
8028 set +e
8029 as_fn_set_status $1
8030 exit $1
8031 } # as_fn_exit
8032
8033 # as_fn_unset VAR
8034 # ---------------
8035 # Portably unset VAR.
8036 as_fn_unset ()
8037 {
8038 { eval $1=; unset $1;}
8039 }
8040 as_unset=as_fn_unset
8041 # as_fn_append VAR VALUE
8042 # ----------------------
8043 # Append the text in VALUE to the end of the definition contained in VAR. Take
8044 # advantage of any shell optimizations that allow amortized linear growth over
8045 # repeated appends, instead of the typical quadratic growth present in naive
8046 # implementations.
8047 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
8048 eval 'as_fn_append ()
8049 {
8050 eval $1+=\$2
8051 }'
8052 else
8053 as_fn_append ()
8054 {
8055 eval $1=\$$1\$2
8056 }
8057 fi # as_fn_append
8058
8059 # as_fn_arith ARG...
8060 # ------------------
8061 # Perform arithmetic evaluation on the ARGs, and store the result in the
8062 # global $as_val. Take advantage of shells that can avoid forks. The arguments
8063 # must be portable across $(()) and expr.
8064 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
8065 eval 'as_fn_arith ()
8066 {
8067 as_val=$(( $* ))
8068 }'
8069 else
8070 as_fn_arith ()
8071 {
8072 as_val=`expr "$@" || test $? -eq 1`
8073 }
8074 fi # as_fn_arith
8075
8076
8077 if expr a : '\(a\)' >/dev/null 2>&1 &&
8078 test "X`expr 00001 : '.*\(...\)'`" = X001; then
8079 as_expr=expr
8080 else
8081 as_expr=false
8082 fi
8083
8084 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
8085 as_basename=basename
8086 else
8087 as_basename=false
8088 fi
8089
8090 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
8091 as_dirname=dirname
8092 else
8093 as_dirname=false
8094 fi
8095
8096 as_me=`$as_basename -- "$0" ||
8097 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
8098 X"$0" : 'X\(//\)$' \| \
8099 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
8100 $as_echo X/"$0" |
8101 sed '/^.*\/\([^/][^/]*\)\/*$/{
8102 s//\1/
8103 q
8104 }
8105 /^X\/\(\/\/\)$/{
8106 s//\1/
8107 q
8108 }
8109 /^X\/\(\/\).*/{
8110 s//\1/
8111 q
8112 }
8113 s/.*/./; q'`
8114
8115 # Avoid depending upon Character Ranges.
8116 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
8117 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
8118 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
8119 as_cr_digits='0123456789'
8120 as_cr_alnum=$as_cr_Letters$as_cr_digits
8121
8122 ECHO_C= ECHO_N= ECHO_T=
8123 case `echo -n x` in #(((((
8124 -n*)
8125 case `echo 'xy\c'` in
8126 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
8127 xy) ECHO_C='\c';;
8128 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
8129 ECHO_T=' ';;
8130 esac;;
8131 *)
8132 ECHO_N='-n';;
8133 esac
8134
8135 rm -f conf$$ conf$$.exe conf$$.file
8136 if test -d conf$$.dir; then
8137 rm -f conf$$.dir/conf$$.file
8138 else
8139 rm -f conf$$.dir
8140 mkdir conf$$.dir 2>/dev/null
8141 fi
8142 if (echo >conf$$.file) 2>/dev/null; then
8143 if ln -s conf$$.file conf$$ 2>/dev/null; then
8144 as_ln_s='ln -s'
8145 # ... but there are two gotchas:
8146 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
8147 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
8148 # In both cases, we have to default to `cp -p'.
8149 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
8150 as_ln_s='cp -p'
8151 elif ln conf$$.file conf$$ 2>/dev/null; then
8152 as_ln_s=ln
8153 else
8154 as_ln_s='cp -p'
8155 fi
8156 else
8157 as_ln_s='cp -p'
8158 fi
8159 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
8160 rmdir conf$$.dir 2>/dev/null
8161
8162
8163 # as_fn_mkdir_p
8164 # -------------
8165 # Create "$as_dir" as a directory, including parents if necessary.
8166 as_fn_mkdir_p ()
8167 {
8168
8169 case $as_dir in #(
8170 -*) as_dir=./$as_dir;;
8171 esac
8172 test -d "$as_dir" || eval $as_mkdir_p || {
8173 as_dirs=
8174 while :; do
8175 case $as_dir in #(
8176 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
8177 *) as_qdir=$as_dir;;
8178 esac
8179 as_dirs="'$as_qdir' $as_dirs"
8180 as_dir=`$as_dirname -- "$as_dir" ||
8181 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8182 X"$as_dir" : 'X\(//\)[^/]' \| \
8183 X"$as_dir" : 'X\(//\)$' \| \
8184 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
8185 $as_echo X"$as_dir" |
8186 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8187 s//\1/
8188 q
8189 }
8190 /^X\(\/\/\)[^/].*/{
8191 s//\1/
8192 q
8193 }
8194 /^X\(\/\/\)$/{
8195 s//\1/
8196 q
8197 }
8198 /^X\(\/\).*/{
8199 s//\1/
8200 q
8201 }
8202 s/.*/./; q'`
8203 test -d "$as_dir" && break
8204 done
8205 test -z "$as_dirs" || eval "mkdir $as_dirs"
8206 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
8207
8208
8209 } # as_fn_mkdir_p
8210 if mkdir -p . 2>/dev/null; then
8211 as_mkdir_p='mkdir -p "$as_dir"'
8212 else
8213 test -d ./-p && rmdir ./-p
8214 as_mkdir_p=false
8215 fi
8216
8217 if test -x / >/dev/null 2>&1; then
8218 as_test_x='test -x'
8219 else
8220 if ls -dL / >/dev/null 2>&1; then
8221 as_ls_L_option=L
8222 else
8223 as_ls_L_option=
8224 fi
8225 as_test_x='
8226 eval sh -c '\''
8227 if test -d "$1"; then
8228 test -d "$1/.";
8229 else
8230 case $1 in #(
8231 -*)set "./$1";;
8232 esac;
8233 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
8234 ???[sx]*):;;*)false;;esac;fi
8235 '\'' sh
8236 '
8237 fi
8238 as_executable_p=$as_test_x
8239
8240 # Sed expression to map a string onto a valid CPP name.
8241 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
8242
8243 # Sed expression to map a string onto a valid variable name.
8244 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
8245
8246
8247 exec 6>&1
8248 ## ----------------------------------- ##
8249 ## Main body of $CONFIG_STATUS script. ##
8250 ## ----------------------------------- ##
8251 _ASEOF
8252 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
8253
8254 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8255 # Save the log message, to keep $0 and so on meaningful, and to
8256 # report actual input values of CONFIG_FILES etc. instead of their
8257 # values after options handling.
8258 ac_log="
8259 This file was extended by realmd $as_me 0.1, which was
8260 generated by GNU Autoconf 2.68. Invocation command line was
8261
8262 CONFIG_FILES = $CONFIG_FILES
8263 CONFIG_HEADERS = $CONFIG_HEADERS
8264 CONFIG_LINKS = $CONFIG_LINKS
8265 CONFIG_COMMANDS = $CONFIG_COMMANDS
8266 $ $0 $@
8267
8268 on `(hostname || uname -n) 2>/dev/null | sed 1q`
8269 "
8270
8271 _ACEOF
8272
8273 case $ac_config_files in *"
8274 "*) set x $ac_config_files; shift; ac_config_files=$*;;
8275 esac
8276
8277 case $ac_config_headers in *"
8278 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
8279 esac
8280
8281
8282 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8283 # Files that config.status was made for.
8284 config_files="$ac_config_files"
8285 config_headers="$ac_config_headers"
8286 config_commands="$ac_config_commands"
8287
8288 _ACEOF
8289
8290 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8291 ac_cs_usage="\
8292 \`$as_me' instantiates files and other configuration actions
8293 from templates according to the current configuration. Unless the files
8294 and actions are specified as TAGs, all are instantiated by default.
8295
8296 Usage: $0 [OPTION]... [TAG]...
8297
8298 -h, --help print this help, then exit
8299 -V, --version print version number and configuration settings, then exit
8300 --config print configuration, then exit
8301 -q, --quiet, --silent
8302 do not print progress messages
8303 -d, --debug don't remove temporary files
8304 --recheck update $as_me by reconfiguring in the same conditions
8305 --file=FILE[:TEMPLATE]
8306 instantiate the configuration file FILE
8307 --header=FILE[:TEMPLATE]
8308 instantiate the configuration header FILE
8309
8310 Configuration files:
8311 $config_files
8312
8313 Configuration headers:
8314 $config_headers
8315
8316 Configuration commands:
8317 $config_commands
8318
8319 Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=realmd>."
8320
8321 _ACEOF
8322 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8323 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
8324 ac_cs_version="\\
8325 realmd config.status 0.1
8326 configured by $0, generated by GNU Autoconf 2.68,
8327 with options \\"\$ac_cs_config\\"
8328
8329 Copyright (C) 2010 Free Software Foundation, Inc.
8330 This config.status script is free software; the Free Software Foundation
8331 gives unlimited permission to copy, distribute and modify it."
8332
8333 ac_pwd='$ac_pwd'
8334 srcdir='$srcdir'
8335 INSTALL='$INSTALL'
8336 MKDIR_P='$MKDIR_P'
8337 AWK='$AWK'
8338 test -n "\$AWK" || AWK=awk
8339 _ACEOF
8340
8341 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8342 # The default lists apply if the user does not specify any file.
8343 ac_need_defaults=:
8344 while test $# != 0
8345 do
8346 case $1 in
8347 --*=?*)
8348 ac_option=`expr "X$1" : 'X\([^=]*\)='`
8349 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
8350 ac_shift=:
8351 ;;
8352 --*=)
8353 ac_option=`expr "X$1" : 'X\([^=]*\)='`
8354 ac_optarg=
8355 ac_shift=:
8356 ;;
8357 *)
8358 ac_option=$1
8359 ac_optarg=$2
8360 ac_shift=shift
8361 ;;
8362 esac
8363
8364 case $ac_option in
8365 # Handling of the options.
8366 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8367 ac_cs_recheck=: ;;
8368 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
8369 $as_echo "$ac_cs_version"; exit ;;
8370 --config | --confi | --conf | --con | --co | --c )
8371 $as_echo "$ac_cs_config"; exit ;;
8372 --debug | --debu | --deb | --de | --d | -d )
8373 debug=: ;;
8374 --file | --fil | --fi | --f )
8375 $ac_shift
8376 case $ac_optarg in
8377 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
8378 '') as_fn_error $? "missing file argument" ;;
8379 esac
8380 as_fn_append CONFIG_FILES " '$ac_optarg'"
8381 ac_need_defaults=false;;
8382 --header | --heade | --head | --hea )
8383 $ac_shift
8384 case $ac_optarg in
8385 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
8386 esac
8387 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
8388 ac_need_defaults=false;;
8389 --he | --h)
8390 # Conflict between --help and --header
8391 as_fn_error $? "ambiguous option: \`$1'
8392 Try \`$0 --help' for more information.";;
8393 --help | --hel | -h )
8394 $as_echo "$ac_cs_usage"; exit ;;
8395 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
8396 | -silent | --silent | --silen | --sile | --sil | --si | --s)
8397 ac_cs_silent=: ;;
8398
8399 # This is an error.
8400 -*) as_fn_error $? "unrecognized option: \`$1'
8401 Try \`$0 --help' for more information." ;;
8402
8403 *) as_fn_append ac_config_targets " $1"
8404 ac_need_defaults=false ;;
8405
8406 esac
8407 shift
8408 done
8409
8410 ac_configure_extra_args=
8411
8412 if $ac_cs_silent; then
8413 exec 6>/dev/null
8414 ac_configure_extra_args="$ac_configure_extra_args --silent"
8415 fi
8416
8417 _ACEOF
8418 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8419 if \$ac_cs_recheck; then
8420 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
8421 shift
8422 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
8423 CONFIG_SHELL='$SHELL'
8424 export CONFIG_SHELL
8425 exec "\$@"
8426 fi
8427
8428 _ACEOF
8429 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8430 exec 5>>config.log
8431 {
8432 echo
8433 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
8434 ## Running $as_me. ##
8435 _ASBOX
8436 $as_echo "$ac_log"
8437 } >&5
8438
8439 _ACEOF
8440 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8441 #
8442 # INIT-COMMANDS
8443 #
8444 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
8445
8446
8447 _ACEOF
8448
8449 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8450
8451 # Handling of arguments.
8452 for ac_config_target in $ac_config_targets
8453 do
8454 case $ac_config_target in
8455 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
8456 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
8457 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
8458 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
8459 "build/Makefile") CONFIG_FILES="$CONFIG_FILES build/Makefile" ;;
8460 "dbus/Makefile") CONFIG_FILES="$CONFIG_FILES dbus/Makefile" ;;
8461 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
8462 "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
8463 "service/Makefile") CONFIG_FILES="$CONFIG_FILES service/Makefile" ;;
8464 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
8465 "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
8466 "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
8467
8468 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
8469 esac
8470 done
8471
8472
8473 # If the user did not use the arguments to specify the items to instantiate,
8474 # then the envvar interface is used. Set only those that are not.
8475 # We use the long form for the default assignment because of an extremely
8476 # bizarre bug on SunOS 4.1.3.
8477 if $ac_need_defaults; then
8478 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
8479 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
8480 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
8481 fi
8482
8483 # Have a temporary directory for convenience. Make it in the build tree
8484 # simply because there is no reason against having it here, and in addition,
8485 # creating and moving files from /tmp can sometimes cause problems.
8486 # Hook for its removal unless debugging.
8487 # Note that there is a small window in which the directory will not be cleaned:
8488 # after its creation but before its name has been assigned to `$tmp'.
8489 $debug ||
8490 {
8491 tmp= ac_tmp=
8492 trap 'exit_status=$?
8493 : "${ac_tmp:=$tmp}"
8494 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
8495 ' 0
8496 trap 'as_fn_exit 1' 1 2 13 15
8497 }
8498 # Create a (secure) tmp directory for tmp files.
8499
8500 {
8501 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
8502 test -d "$tmp"
8503 } ||
8504 {
8505 tmp=./conf$$-$RANDOM
8506 (umask 077 && mkdir "$tmp")
8507 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
8508 ac_tmp=$tmp
8509
8510 # Set up the scripts for CONFIG_FILES section.
8511 # No need to generate them if there are no CONFIG_FILES.
8512 # This happens for instance with `./config.status config.h'.
8513 if test -n "$CONFIG_FILES"; then
8514
8515
8516 ac_cr=`echo X | tr X '\015'`
8517 # On cygwin, bash can eat \r inside `` if the user requested igncr.
8518 # But we know of no other shell where ac_cr would be empty at this
8519 # point, so we can use a bashism as a fallback.
8520 if test "x$ac_cr" = x; then
8521 eval ac_cr=\$\'\\r\'
8522 fi
8523 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
8524 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
8525 ac_cs_awk_cr='\\r'
8526 else
8527 ac_cs_awk_cr=$ac_cr
8528 fi
8529
8530 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
8531 _ACEOF
8532
8533
8534 {
8535 echo "cat >conf$$subs.awk <<_ACEOF" &&
8536 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
8537 echo "_ACEOF"
8538 } >conf$$subs.sh ||
8539 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
8540 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
8541 ac_delim='%!_!# '
8542 for ac_last_try in false false false false false :; do
8543 . ./conf$$subs.sh ||
8544 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
8545
8546 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
8547 if test $ac_delim_n = $ac_delim_num; then
8548 break
8549 elif $ac_last_try; then
8550 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
8551 else
8552 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8553 fi
8554 done
8555 rm -f conf$$subs.sh
8556
8557 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8558 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
8559 _ACEOF
8560 sed -n '
8561 h
8562 s/^/S["/; s/!.*/"]=/
8563 p
8564 g
8565 s/^[^!]*!//
8566 :repl
8567 t repl
8568 s/'"$ac_delim"'$//
8569 t delim
8570 :nl
8571 h
8572 s/\(.\{148\}\)..*/\1/
8573 t more1
8574 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
8575 p
8576 n
8577 b repl
8578 :more1
8579 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
8580 p
8581 g
8582 s/.\{148\}//
8583 t nl
8584 :delim
8585 h
8586 s/\(.\{148\}\)..*/\1/
8587 t more2
8588 s/["\\]/\\&/g; s/^/"/; s/$/"/
8589 p
8590 b
8591 :more2
8592 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
8593 p
8594 g
8595 s/.\{148\}//
8596 t delim
8597 ' <conf$$subs.awk | sed '
8598 /^[^""]/{
8599 N
8600 s/\n//
8601 }
8602 ' >>$CONFIG_STATUS || ac_write_fail=1
8603 rm -f conf$$subs.awk
8604 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8605 _ACAWK
8606 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
8607 for (key in S) S_is_set[key] = 1
8608 FS = ""
8609
8610 }
8611 {
8612 line = $ 0
8613 nfields = split(line, field, "@")
8614 substed = 0
8615 len = length(field[1])
8616 for (i = 2; i < nfields; i++) {
8617 key = field[i]
8618 keylen = length(key)
8619 if (S_is_set[key]) {
8620 value = S[key]
8621 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
8622 len += length(value) + length(field[++i])
8623 substed = 1
8624 } else
8625 len += 1 + keylen
8626 }
8627
8628 print line
8629 }
8630
8631 _ACAWK
8632 _ACEOF
8633 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8634 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
8635 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
8636 else
8637 cat
8638 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
8639 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
8640 _ACEOF
8641
8642 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
8643 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
8644 # trailing colons and then remove the whole line if VPATH becomes empty
8645 # (actually we leave an empty line to preserve line numbers).
8646 if test "x$srcdir" = x.; then
8647 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
8648 h
8649 s///
8650 s/^/:/
8651 s/[ ]*$/:/
8652 s/:\$(srcdir):/:/g
8653 s/:\${srcdir}:/:/g
8654 s/:@srcdir@:/:/g
8655 s/^:*//
8656 s/:*$//
8657 x
8658 s/\(=[ ]*\).*/\1/
8659 G
8660 s/\n//
8661 s/^[^=]*=[ ]*$//
8662 }'
8663 fi
8664
8665 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8666 fi # test -n "$CONFIG_FILES"
8667
8668 # Set up the scripts for CONFIG_HEADERS section.
8669 # No need to generate them if there are no CONFIG_HEADERS.
8670 # This happens for instance with `./config.status Makefile'.
8671 if test -n "$CONFIG_HEADERS"; then
8672 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
8673 BEGIN {
8674 _ACEOF
8675
8676 # Transform confdefs.h into an awk script `defines.awk', embedded as
8677 # here-document in config.status, that substitutes the proper values into
8678 # config.h.in to produce config.h.
8679
8680 # Create a delimiter string that does not exist in confdefs.h, to ease
8681 # handling of long lines.
8682 ac_delim='%!_!# '
8683 for ac_last_try in false false :; do
8684 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
8685 if test -z "$ac_tt"; then
8686 break
8687 elif $ac_last_try; then
8688 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
8689 else
8690 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8691 fi
8692 done
8693
8694 # For the awk script, D is an array of macro values keyed by name,
8695 # likewise P contains macro parameters if any. Preserve backslash
8696 # newline sequences.
8697
8698 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
8699 sed -n '
8700 s/.\{148\}/&'"$ac_delim"'/g
8701 t rset
8702 :rset
8703 s/^[ ]*#[ ]*define[ ][ ]*/ /
8704 t def
8705 d
8706 :def
8707 s/\\$//
8708 t bsnl
8709 s/["\\]/\\&/g
8710 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
8711 D["\1"]=" \3"/p
8712 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
8713 d
8714 :bsnl
8715 s/["\\]/\\&/g
8716 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
8717 D["\1"]=" \3\\\\\\n"\\/p
8718 t cont
8719 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
8720 t cont
8721 d
8722 :cont
8723 n
8724 s/.\{148\}/&'"$ac_delim"'/g
8725 t clear
8726 :clear
8727 s/\\$//
8728 t bsnlc
8729 s/["\\]/\\&/g; s/^/"/; s/$/"/p
8730 d
8731 :bsnlc
8732 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
8733 b cont
8734 ' <confdefs.h | sed '
8735 s/'"$ac_delim"'/"\\\
8736 "/g' >>$CONFIG_STATUS || ac_write_fail=1
8737
8738 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8739 for (key in D) D_is_set[key] = 1
8740 FS = ""
8741 }
8742 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
8743 line = \$ 0
8744 split(line, arg, " ")
8745 if (arg[1] == "#") {
8746 defundef = arg[2]
8747 mac1 = arg[3]
8748 } else {
8749 defundef = substr(arg[1], 2)
8750 mac1 = arg[2]
8751 }
8752 split(mac1, mac2, "(") #)
8753 macro = mac2[1]
8754 prefix = substr(line, 1, index(line, defundef) - 1)
8755 if (D_is_set[macro]) {
8756 # Preserve the white space surrounding the "#".
8757 print prefix "define", macro P[macro] D[macro]
8758 next
8759 } else {
8760 # Replace #undef with comments. This is necessary, for example,
8761 # in the case of _POSIX_SOURCE, which is predefined and required
8762 # on some systems where configure will not decide to define it.
8763 if (defundef == "undef") {
8764 print "/*", prefix defundef, macro, "*/"
8765 next
8766 }
8767 }
8768 }
8769 { print }
8770 _ACAWK
8771 _ACEOF
8772 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8773 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
8774 fi # test -n "$CONFIG_HEADERS"
8775
8776
8777 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
8778 shift
8779 for ac_tag
8780 do
8781 case $ac_tag in
8782 :[FHLC]) ac_mode=$ac_tag; continue;;
8783 esac
8784 case $ac_mode$ac_tag in
8785 :[FHL]*:*);;
8786 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
8787 :[FH]-) ac_tag=-:-;;
8788 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
8789 esac
8790 ac_save_IFS=$IFS
8791 IFS=:
8792 set x $ac_tag
8793 IFS=$ac_save_IFS
8794 shift
8795 ac_file=$1
8796 shift
8797
8798 case $ac_mode in
8799 :L) ac_source=$1;;
8800 :[FH])
8801 ac_file_inputs=
8802 for ac_f
8803 do
8804 case $ac_f in
8805 -) ac_f="$ac_tmp/stdin";;
8806 *) # Look for the file first in the build tree, then in the source tree
8807 # (if the path is not absolute). The absolute path cannot be DOS-style,
8808 # because $ac_f cannot contain `:'.
8809 test -f "$ac_f" ||
8810 case $ac_f in
8811 [\\/$]*) false;;
8812 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
8813 esac ||
8814 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
8815 esac
8816 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
8817 as_fn_append ac_file_inputs " '$ac_f'"
8818 done
8819
8820 # Let's still pretend it is `configure' which instantiates (i.e., don't
8821 # use $as_me), people would be surprised to read:
8822 # /* config.h. Generated by config.status. */
8823 configure_input='Generated from '`
8824 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
8825 `' by configure.'
8826 if test x"$ac_file" != x-; then
8827 configure_input="$ac_file. $configure_input"
8828 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
8829 $as_echo "$as_me: creating $ac_file" >&6;}
8830 fi
8831 # Neutralize special characters interpreted by sed in replacement strings.
8832 case $configure_input in #(
8833 *\&* | *\|* | *\\* )
8834 ac_sed_conf_input=`$as_echo "$configure_input" |
8835 sed 's/[\\\\&|]/\\\\&/g'`;; #(
8836 *) ac_sed_conf_input=$configure_input;;
8837 esac
8838
8839 case $ac_tag in
8840 *:-:* | *:-) cat >"$ac_tmp/stdin" \
8841 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
8842 esac
8843 ;;
8844 esac
8845
8846 ac_dir=`$as_dirname -- "$ac_file" ||
8847 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8848 X"$ac_file" : 'X\(//\)[^/]' \| \
8849 X"$ac_file" : 'X\(//\)$' \| \
8850 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
8851 $as_echo X"$ac_file" |
8852 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8853 s//\1/
8854 q
8855 }
8856 /^X\(\/\/\)[^/].*/{
8857 s//\1/
8858 q
8859 }
8860 /^X\(\/\/\)$/{
8861 s//\1/
8862 q
8863 }
8864 /^X\(\/\).*/{
8865 s//\1/
8866 q
8867 }
8868 s/.*/./; q'`
8869 as_dir="$ac_dir"; as_fn_mkdir_p
8870 ac_builddir=.
8871
8872 case "$ac_dir" in
8873 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
8874 *)
8875 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
8876 # A ".." for each directory in $ac_dir_suffix.
8877 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
8878 case $ac_top_builddir_sub in
8879 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
8880 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
8881 esac ;;
8882 esac
8883 ac_abs_top_builddir=$ac_pwd
8884 ac_abs_builddir=$ac_pwd$ac_dir_suffix
8885 # for backward compatibility:
8886 ac_top_builddir=$ac_top_build_prefix
8887
8888 case $srcdir in
8889 .) # We are building in place.
8890 ac_srcdir=.
8891 ac_top_srcdir=$ac_top_builddir_sub
8892 ac_abs_top_srcdir=$ac_pwd ;;
8893 [\\/]* | ?:[\\/]* ) # Absolute name.
8894 ac_srcdir=$srcdir$ac_dir_suffix;
8895 ac_top_srcdir=$srcdir
8896 ac_abs_top_srcdir=$srcdir ;;
8897 *) # Relative name.
8898 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
8899 ac_top_srcdir=$ac_top_build_prefix$srcdir
8900 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
8901 esac
8902 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
8903
8904
8905 case $ac_mode in
8906 :F)
8907 #
8908 # CONFIG_FILE
8909 #
8910
8911 case $INSTALL in
8912 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
8913 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
8914 esac
8915 ac_MKDIR_P=$MKDIR_P
8916 case $MKDIR_P in
8917 [\\/$]* | ?:[\\/]* ) ;;
8918 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
8919 esac
8920 _ACEOF
8921
8922 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8923 # If the template does not know about datarootdir, expand it.
8924 # FIXME: This hack should be removed a few years after 2.60.
8925 ac_datarootdir_hack=; ac_datarootdir_seen=
8926 ac_sed_dataroot='
8927 /datarootdir/ {
8928 p
8929 q
8930 }
8931 /@datadir@/p
8932 /@docdir@/p
8933 /@infodir@/p
8934 /@localedir@/p
8935 /@mandir@/p'
8936 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
8937 *datarootdir*) ac_datarootdir_seen=yes;;
8938 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
8939 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
8940 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8941 _ACEOF
8942 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8943 ac_datarootdir_hack='
8944 s&@datadir@&$datadir&g
8945 s&@docdir@&$docdir&g
8946 s&@infodir@&$infodir&g
8947 s&@localedir@&$localedir&g
8948 s&@mandir@&$mandir&g
8949 s&\\\${datarootdir}&$datarootdir&g' ;;
8950 esac
8951 _ACEOF
8952
8953 # Neutralize VPATH when `$srcdir' = `.'.
8954 # Shell code in configure.ac might set extrasub.
8955 # FIXME: do we really want to maintain this feature?
8956 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8957 ac_sed_extra="$ac_vpsub
8958 $extrasub
8959 _ACEOF
8960 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8961 :t
8962 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
8963 s|@configure_input@|$ac_sed_conf_input|;t t
8964 s&@top_builddir@&$ac_top_builddir_sub&;t t
8965 s&@top_build_prefix@&$ac_top_build_prefix&;t t
8966 s&@srcdir@&$ac_srcdir&;t t
8967 s&@abs_srcdir@&$ac_abs_srcdir&;t t
8968 s&@top_srcdir@&$ac_top_srcdir&;t t
8969 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
8970 s&@builddir@&$ac_builddir&;t t
8971 s&@abs_builddir@&$ac_abs_builddir&;t t
8972 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
8973 s&@INSTALL@&$ac_INSTALL&;t t
8974 s&@MKDIR_P@&$ac_MKDIR_P&;t t
8975 $ac_datarootdir_hack
8976 "
8977 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
8978 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
8979
8980 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
8981 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
8982 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
8983 "$ac_tmp/out"`; test -z "$ac_out"; } &&
8984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
8985 which seems to be undefined. Please make sure it is defined" >&5
8986 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
8987 which seems to be undefined. Please make sure it is defined" >&2;}
8988
8989 rm -f "$ac_tmp/stdin"
8990 case $ac_file in
8991 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
8992 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
8993 esac \
8994 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
8995 ;;
8996 :H)
8997 #
8998 # CONFIG_HEADER
8999 #
9000 if test x"$ac_file" != x-; then
9001 {
9002 $as_echo "/* $configure_input */" \
9003 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
9004 } >"$ac_tmp/config.h" \
9005 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9006 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
9007 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
9008 $as_echo "$as_me: $ac_file is unchanged" >&6;}
9009 else
9010 rm -f "$ac_file"
9011 mv "$ac_tmp/config.h" "$ac_file" \
9012 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9013 fi
9014 else
9015 $as_echo "/* $configure_input */" \
9016 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
9017 || as_fn_error $? "could not create -" "$LINENO" 5
9018 fi
9019 # Compute "$ac_file"'s index in $config_headers.
9020 _am_arg="$ac_file"
9021 _am_stamp_count=1
9022 for _am_header in $config_headers :; do
9023 case $_am_header in
9024 $_am_arg | $_am_arg:* )
9025 break ;;
9026 * )
9027 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9028 esac
9029 done
9030 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
9031 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9032 X"$_am_arg" : 'X\(//\)[^/]' \| \
9033 X"$_am_arg" : 'X\(//\)$' \| \
9034 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
9035 $as_echo X"$_am_arg" |
9036 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9037 s//\1/
9038 q
9039 }
9040 /^X\(\/\/\)[^/].*/{
9041 s//\1/
9042 q
9043 }
9044 /^X\(\/\/\)$/{
9045 s//\1/
9046 q
9047 }
9048 /^X\(\/\).*/{
9049 s//\1/
9050 q
9051 }
9052 s/.*/./; q'`/stamp-h$_am_stamp_count
9053 ;;
9054
9055 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
9056 $as_echo "$as_me: executing $ac_file commands" >&6;}
9057 ;;
9058 esac
9059
9060
9061 case $ac_file$ac_mode in
9062 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
9063 # Autoconf 2.62 quotes --file arguments for eval, but not when files
9064 # are listed without --file. Let's play safe and only enable the eval
9065 # if we detect the quoting.
9066 case $CONFIG_FILES in
9067 *\'*) eval set x "$CONFIG_FILES" ;;
9068 *) set x $CONFIG_FILES ;;
9069 esac
9070 shift
9071 for mf
9072 do
9073 # Strip MF so we end up with the name of the file.
9074 mf=`echo "$mf" | sed -e 's/:.*$//'`
9075 # Check whether this is an Automake generated Makefile or not.
9076 # We used to match only the files named `Makefile.in', but
9077 # some people rename them; so instead we look at the file content.
9078 # Grep'ing the first line is not enough: some people post-process
9079 # each Makefile.in and add a new line on top of each file to say so.
9080 # Grep'ing the whole file is not good either: AIX grep has a line
9081 # limit of 2048, but all sed's we know have understand at least 4000.
9082 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9083 dirpart=`$as_dirname -- "$mf" ||
9084 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9085 X"$mf" : 'X\(//\)[^/]' \| \
9086 X"$mf" : 'X\(//\)$' \| \
9087 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
9088 $as_echo X"$mf" |
9089 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9090 s//\1/
9091 q
9092 }
9093 /^X\(\/\/\)[^/].*/{
9094 s//\1/
9095 q
9096 }
9097 /^X\(\/\/\)$/{
9098 s//\1/
9099 q
9100 }
9101 /^X\(\/\).*/{
9102 s//\1/
9103 q
9104 }
9105 s/.*/./; q'`
9106 else
9107 continue
9108 fi
9109 # Extract the definition of DEPDIR, am__include, and am__quote
9110 # from the Makefile without running `make'.
9111 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9112 test -z "$DEPDIR" && continue
9113 am__include=`sed -n 's/^am__include = //p' < "$mf"`
9114 test -z "am__include" && continue
9115 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9116 # When using ansi2knr, U may be empty or an underscore; expand it
9117 U=`sed -n 's/^U = //p' < "$mf"`
9118 # Find all dependency output files, they are included files with
9119 # $(DEPDIR) in their names. We invoke sed twice because it is the
9120 # simplest approach to changing $(DEPDIR) to its actual value in the
9121 # expansion.
9122 for file in `sed -n "
9123 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9124 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9125 # Make sure the directory exists.
9126 test -f "$dirpart/$file" && continue
9127 fdir=`$as_dirname -- "$file" ||
9128 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9129 X"$file" : 'X\(//\)[^/]' \| \
9130 X"$file" : 'X\(//\)$' \| \
9131 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
9132 $as_echo X"$file" |
9133 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9134 s//\1/
9135 q
9136 }
9137 /^X\(\/\/\)[^/].*/{
9138 s//\1/
9139 q
9140 }
9141 /^X\(\/\/\)$/{
9142 s//\1/
9143 q
9144 }
9145 /^X\(\/\).*/{
9146 s//\1/
9147 q
9148 }
9149 s/.*/./; q'`
9150 as_dir=$dirpart/$fdir; as_fn_mkdir_p
9151 # echo "creating $dirpart/$file"
9152 echo '# dummy' > "$dirpart/$file"
9153 done
9154 done
9155 }
9156 ;;
9157 "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
9158 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
9159 esac ;;
9160 "po/stamp-it":C)
9161 if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
9162 as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
9163 fi
9164 rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
9165 >"po/stamp-it.tmp"
9166 sed '/^#/d
9167 s/^[[].*] *//
9168 /^[ ]*$/d
9169 '"s|^| $ac_top_srcdir/|" \
9170 "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
9171
9172 sed '/^POTFILES =/,/[^\\]$/ {
9173 /^POTFILES =/!d
9174 r po/POTFILES
9175 }
9176 ' "po/Makefile.in" >"po/Makefile"
9177 rm -f "po/Makefile.tmp"
9178 mv "po/stamp-it.tmp" "po/stamp-it"
9179 ;;
9180
9181 esac
9182 done # for ac_tag
9183
9184
9185 as_fn_exit 0
9186 _ACEOF
9187 ac_clean_files=$ac_clean_files_save
9188
9189 test $ac_write_fail = 0 ||
9190 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
9191
9192
9193 # configure is writing to config.log, and then calls config.status.
9194 # config.status does its own redirection, appending to config.log.
9195 # Unfortunately, on DOS this fails, as config.log is still kept open
9196 # by configure, so config.status won't be able to write to it; its
9197 # output is simply discarded. So we exec the FD to /dev/null,
9198 # effectively closing config.log, so it can be properly (re)opened and
9199 # appended to by config.status. When coming back to configure, we
9200 # need to make the FD available again.
9201 if test "$no_create" != yes; then
9202 ac_cs_success=:
9203 ac_config_status_args=
9204 test "$silent" = yes &&
9205 ac_config_status_args="$ac_config_status_args --quiet"
9206 exec 5>/dev/null
9207 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
9208 exec 5>>config.log
9209 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9210 # would make configure fail if this is the last instruction.
9211 $ac_cs_success || as_fn_exit 1
9212 fi
9213 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
9214 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
9215 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
9216 fi
9217
9218
9219 echo
9220 echo "CFLAGS: $CFLAGS"
9221 echo
9222 echo "OPTIONS:"
9223 echo " Debug: $debug_status"
9224 echo " Coverage: $enable_coverage"
9225 echo " Strict: $enable_strict"
9226 echo
0 AC_PREREQ(2.63)
1
2 AC_INIT([realmd], [0.1],
3 [http://bugs.freedesktop.org/enter_bug.cgi?product=realmd],
4 [realmd])
5
6 # -----------------------------------------------------------------------------
7
8 AC_CONFIG_MACRO_DIR([build/m4])
9 AM_INIT_AUTOMAKE([1.11 tar-ustar foreign -Wno-portability])
10 AM_SANITY_CHECK
11 AM_CONFIG_HEADER(config.h)
12 AC_CONFIG_SRCDIR([service/realm-daemon.c])
13 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
14 AM_MAINTAINER_MODE([enable])
15
16 # -----------------------------------------------------------------------------
17 # Distro Detection
18
19 AC_ARG_WITH([distro],
20 [AS_HELP_STRING([--with-distro],
21 [Configure for a specific distribution (eg: redhat)]
22 )],
23 [DISTRO=$withval])
24
25 if test -z $DISTRO; then
26 AC_CHECK_FILE(/etc/redhat-release, [DISTRO="redhat"])
27 AC_CHECK_FILE(/etc/debian_version, [DISTRO="debian"])
28 # Not customized for these yet
29 dnl AC_CHECK_FILE(/etc/gentoo-release, [DISTRO="gentoo"])
30 dnl AC_CHECK_FILE(/etc/slackware-version, [DISTRO="slackware"])
31 dnl AC_CHECK_FILE(/etc/SuSE-release, [DISTRO="suse"])
32 fi
33
34 if test -z $DISTRO; then
35 AC_MSG_ERROR([Couldn't detect the distro to configure for. Specify one with --with-distro])
36 fi
37
38 AC_SUBST(DISTRO)
39
40 # -----------------------------------------------------------------------------
41 # Basic tools
42
43 AC_GNU_SOURCE
44 AC_ISC_POSIX
45 AC_PROG_CC
46 AC_PROG_CPP
47 AM_PROG_CC_C_O
48 AC_PROG_INSTALL
49 AC_PROG_LN_S
50 AC_PROG_MAKE_SET
51 AC_PROG_RANLIB
52 IT_PROG_INTLTOOL([0.35.0])
53 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
54
55 GETTEXT_PACKAGE=realmd
56 AC_SUBST([GETTEXT_PACKAGE])
57 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The gettext domain name])
58 AM_GLIB_GNU_GETTEXT
59
60 # --------------------------------------------------------------------
61 # GLib
62
63 PKG_CHECK_MODULES(GLIB,
64 glib-2.0 >= 2.33.0
65 gio-2.0 >= 2.33.0
66 gio-unix-2.0)
67 AC_SUBST(GLIB_CFLAGS)
68 AC_SUBST(GLIB_LIBS)
69
70
71 # --------------------------------------------------------------------
72 # PackageKit
73
74 PKG_CHECK_MODULES(PACKAGEKIT, packagekit-glib2)
75 AC_SUBST(PACKAGEKIT_CFLAGS)
76 AC_SUBST(PACKAGEKIT_LIBS)
77
78 # --------------------------------------------------------------------
79 # PolicyKit
80
81 PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
82 AC_SUBST(POLKIT_CFLAGS)
83 AC_SUBST(POLKIT_LIBS)
84
85 # -------------------------------------------------------------------
86 # Kerberos
87
88 if test "$KRB5_LIBS" != ""; then
89 KRB5_PASSED_LIBS=$KRB5_LIBS
90 fi
91
92 if test "$KRB5_CFLAGS" != ""; then
93 KRB5_PASSED_CFLAGS=$KRB5_CFLAGS
94 fi
95
96 AC_PATH_PROG(KRB5_CONFIG, krb5-config)
97 AC_MSG_CHECKING(for working krb5-config)
98 if test -x "$KRB5_CONFIG"; then
99 KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
100 KRB5_LIBS="`$KRB5_CONFIG --libs`"
101 AC_MSG_RESULT(yes)
102 else
103 if test x$KRB5_PASSED_LIBS = x; then
104 AC_MSG_ERROR(no. Please install MIT kerberos devel package)
105 fi
106 fi
107
108 if test x$KRB5_PASSED_LIBS != x; then
109 KRB5_LIBS=$KRB5_PASSED_LIBS
110 fi
111
112 if test x$KRB5_PASSED_CFLAGS != x; then
113 KRB5_CFLAGS=$KRB5_PASSED_CFLAGS
114 fi
115
116 AC_ARG_VAR([KRB5_CFLAGS], [C compiler flags for kerberos, overriding krb5-config])dnl
117 AC_ARG_VAR([KRB5_LIBS], [linker flags for kerberos, overriding krb5-config])dnl
118
119 AC_SUBST(KRB5_CFLAGS)
120 AC_SUBST(KRB5_LIBS)
121
122 # -------------------------------------------------------------------
123 # Directories
124
125 DBUS_POLICY_DIR="${sysconfdir}/dbus-1/system.d"
126 AC_SUBST(DBUS_POLICY_DIR)
127
128 POLKIT_ACTION_DIR="${datadir}/polkit-1/actions"
129 AC_SUBST(POLKIT_ACTION_DIR)
130
131 # --------------------------------------------------------------------
132 # Compilation options
133
134 if test "$GCC" = "yes"; then
135 CFLAGS="$CFLAGS \
136 -Wall -Wmissing-declarations \
137 -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
138 -Wdeclaration-after-statement -Wformat=2 -Winit-self \
139 -Waggregate-return -Wmissing-format-attribute"
140
141 for option in -Wmissing-include-dirs -Wundef; do
142 SAVE_CFLAGS="$CFLAGS"
143 CFLAGS="$CFLAGS $option"
144 AC_MSG_CHECKING([whether gcc understands $option])
145 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])],
146 [has_option=yes],
147 [has_option=no])
148 AC_MSG_RESULT($has_option)
149 if test $has_option = no; then
150 CFLAGS="$SAVE_CFLAGS"
151 fi
152 done
153 fi
154
155 AC_ARG_ENABLE(strict, [
156 AS_HELP_STRING([--enable-strict], [Strict code compilation])
157 ])
158
159 AC_MSG_CHECKING([build strict])
160
161 if test "$enable_strict" = "yes"; then
162 CFLAGS="$CFLAGS -Werror \
163 -DG_DISABLE_DEPRECATED"
164 TEST_MODE="thorough"
165 else
166 CFLAGS="$CFLAGS -Wno-error"
167 TEST_MODE="quick"
168 enable_strict="no"
169 fi
170
171 AC_MSG_RESULT($enable_strict)
172 AC_SUBST(TEST_MODE)
173
174 AC_MSG_CHECKING([for debug mode])
175 AC_ARG_ENABLE(debug,
176 AC_HELP_STRING([--enable-debug=no/default/yes],
177 [Turn on or off debugging])
178 )
179
180 if test "$enable_debug" != "no"; then
181 AC_DEFINE_UNQUOTED(WITH_DEBUG, 1, [Print debug output])
182 AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
183 CFLAGS="$CFLAGS -g"
184 fi
185 if test "$enable_debug" = "yes"; then
186 debug_status="yes"
187 CFLAGS="$CFLAGS -O0"
188 elif test "$enable_debug" = "no"; then
189 debug_status="no"
190 CFLAGS="$CFLAGS -O2"
191 AC_DEFINE_UNQUOTED(G_DISABLE_ASSERT, 1, [Disable glib assertions])
192 else
193 debug_status="default"
194 fi
195
196 AC_MSG_RESULT($debug_status)
197
198 AC_MSG_CHECKING([whether to build with gcov testing])
199 AC_ARG_ENABLE([coverage],
200 AS_HELP_STRING([--enable-coverage],
201 [Whether to enable coverage testing ]),
202 [], [enable_coverage=no])
203 AC_MSG_RESULT([$enable_coverage])
204
205 if test "$enable_coverage" = "yes"; then
206 if test "$GCC" != "yes"; then
207 AC_MSG_ERROR(Coverage testing requires GCC)
208 fi
209
210 AC_PATH_PROG(GCOV, gcov, no)
211 if test "$GCOV" = "no" ; then
212 AC_MSG_ERROR(gcov tool is not available)
213 fi
214
215 AC_PATH_PROG(LCOV, lcov, no)
216 if test "$LCOV" = "no" ; then
217 AC_MSG_ERROR(lcov tool is not installed)
218 fi
219
220 AC_PATH_PROG(GENHTML, genhtml, no)
221 if test "$GENHTML" = "no" ; then
222 AC_MSG_ERROR(lcov's genhtml tool is not installed)
223 fi
224
225 CFLAGS="$CFLAGS -O0 -g -fprofile-arcs -ftest-coverage"
226 LDFLAGS="$LDFLAGS -lgcov"
227 fi
228
229 AM_CONDITIONAL([WITH_COVERAGE], [test "$enable_coverage" = "yes"])
230 AC_SUBST(LCOV)
231 AC_SUBST(GCOV)
232 AC_SUBST(GENHTML)
233
234 # ------------------------------------------------------------------------------
235 # Results
236
237 SERVICE_DIR=$libdir/realmd
238 AC_SUBST(SERVICE_DIR)
239
240 AC_CONFIG_FILES([
241 Makefile
242 build/Makefile
243 dbus/Makefile
244 po/Makefile.in
245 po/Makefile
246 service/Makefile
247 tests/Makefile
248 tools/Makefile
249 ])
250 AC_OUTPUT
251
252 echo
253 echo "CFLAGS: $CFLAGS"
254 echo
255 echo "OPTIONS:"
256 echo " Debug: $debug_status"
257 echo " Coverage: $enable_coverage"
258 echo " Strict: $enable_strict"
259 echo
0 include $(top_srcdir)/Makefile.decl
1
2 noinst_LIBRARIES = \
3 librealm-dbus.a
4
5 dbusservicedir = $(DBUS_POLICY_DIR)
6 dbusservice_DATA = \
7 org.freedesktop.realmd.conf
8
9 BUILT_SOURCES = \
10 realm-dbus-generated.c realm-dbus-generated.h
11
12 librealm_dbus_a_SOURCES = \
13 realm-dbus-constants.h \
14 $(NULL)
15
16 nodist_librealm_dbus_a_SOURCES = \
17 $(BUILT_SOURCES) \
18 $(NULL)
19
20 librealm_dbus_a_CFLAGS = \
21 $(GLIB_CFLAGS) \
22 $(NULL)
23
24 DBUS_XML_DEFINITIONS = \
25 org.freedesktop.realmd.xml
26
27 realm-dbus-generated.c: org.freedesktop.realmd.xml
28 $(AM_V_GEN) gdbus-codegen --interface-prefix org.freedesktop.realmd. \
29 --generate-c-code realm-dbus-generated --c-namespace RealmDbus $<
30 realm-dbus-generated.h: realm-dbus-generated.c
31
32 # ------------------------------------------------------------------
33
34 EXTRA_DIST = \
35 $(DBUS_XML_DEFINITIONS) \
36 $(dbusservice_DATA) \
37 $(NULL)
38
39 CLEANFILES = \
40 $(BUILT_SOURCES) \
41 *.gcno \
42 *.gcda \
43 $(NULL)
44
45 DISTCLEANFILES = \
46 $(NULL)
0 # Makefile.in generated by automake 1.11.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17
18 VPATH = @srcdir@
19 pkgdatadir = $(datadir)/@PACKAGE@
20 pkgincludedir = $(includedir)/@PACKAGE@
21 pkglibdir = $(libdir)/@PACKAGE@
22 pkglibexecdir = $(libexecdir)/@PACKAGE@
23 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24 install_sh_DATA = $(install_sh) -c -m 644
25 install_sh_PROGRAM = $(install_sh) -c
26 install_sh_SCRIPT = $(install_sh) -c
27 INSTALL_HEADER = $(INSTALL_DATA)
28 transform = $(program_transform_name)
29 NORMAL_INSTALL = :
30 PRE_INSTALL = :
31 POST_INSTALL = :
32 NORMAL_UNINSTALL = :
33 PRE_UNINSTALL = :
34 POST_UNINSTALL = :
35 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
36 $(top_srcdir)/Makefile.decl
37 subdir = dbus
38 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39 am__aclocal_m4_deps = $(top_srcdir)/build/m4/intltool.m4 \
40 $(top_srcdir)/configure.ac
41 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
42 $(ACLOCAL_M4)
43 mkinstalldirs = $(install_sh) -d
44 CONFIG_HEADER = $(top_builddir)/config.h
45 CONFIG_CLEAN_FILES =
46 CONFIG_CLEAN_VPATH_FILES =
47 LIBRARIES = $(noinst_LIBRARIES)
48 AR = ar
49 ARFLAGS = cru
50 AM_V_AR = $(am__v_AR_@AM_V@)
51 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
52 am__v_AR_0 = @echo " AR " $@;
53 AM_V_at = $(am__v_at_@AM_V@)
54 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
55 am__v_at_0 = @
56 librealm_dbus_a_AR = $(AR) $(ARFLAGS)
57 librealm_dbus_a_LIBADD =
58 am__objects_1 =
59 am_librealm_dbus_a_OBJECTS = $(am__objects_1)
60 am__objects_2 = librealm_dbus_a-realm-dbus-generated.$(OBJEXT)
61 nodist_librealm_dbus_a_OBJECTS = $(am__objects_2) $(am__objects_1)
62 librealm_dbus_a_OBJECTS = $(am_librealm_dbus_a_OBJECTS) \
63 $(nodist_librealm_dbus_a_OBJECTS)
64 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
65 depcomp = $(SHELL) $(top_srcdir)/depcomp
66 am__depfiles_maybe = depfiles
67 am__mv = mv -f
68 AM_V_lt = $(am__v_lt_@AM_V@)
69 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
70 am__v_lt_0 = --silent
71 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
72 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
73 AM_V_CC = $(am__v_CC_@AM_V@)
74 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
75 am__v_CC_0 = @echo " CC " $@;
76 CCLD = $(CC)
77 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
78 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
79 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
80 am__v_CCLD_0 = @echo " CCLD " $@;
81 AM_V_GEN = $(am__v_GEN_@AM_V@)
82 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
83 am__v_GEN_0 = @echo " GEN " $@;
84 SOURCES = $(librealm_dbus_a_SOURCES) $(nodist_librealm_dbus_a_SOURCES)
85 DIST_SOURCES = $(librealm_dbus_a_SOURCES)
86 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
87 am__vpath_adj = case $$p in \
88 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
89 *) f=$$p;; \
90 esac;
91 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
92 am__install_max = 40
93 am__nobase_strip_setup = \
94 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
95 am__nobase_strip = \
96 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
97 am__nobase_list = $(am__nobase_strip_setup); \
98 for p in $$list; do echo "$$p $$p"; done | \
99 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
100 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
101 if (++n[$$2] == $(am__install_max)) \
102 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
103 END { for (dir in files) print dir, files[dir] }'
104 am__base_list = \
105 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
106 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
107 am__uninstall_files_from_dir = { \
108 test -z "$$files" \
109 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
110 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
111 $(am__cd) "$$dir" && rm -f $$files; }; \
112 }
113 am__installdirs = "$(DESTDIR)$(dbusservicedir)"
114 DATA = $(dbusservice_DATA)
115 ETAGS = etags
116 CTAGS = ctags
117 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
118 ACLOCAL = @ACLOCAL@
119 ALL_LINGUAS = @ALL_LINGUAS@
120 AMTAR = @AMTAR@
121 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
122 AUTOCONF = @AUTOCONF@
123 AUTOHEADER = @AUTOHEADER@
124 AUTOMAKE = @AUTOMAKE@
125 AWK = @AWK@
126 CATALOGS = @CATALOGS@
127 CATOBJEXT = @CATOBJEXT@
128 CC = @CC@
129 CCDEPMODE = @CCDEPMODE@
130 CFLAGS = @CFLAGS@
131 CPP = @CPP@
132 CPPFLAGS = @CPPFLAGS@
133 CYGPATH_W = @CYGPATH_W@
134 DATADIRNAME = @DATADIRNAME@
135 DBUS_POLICY_DIR = @DBUS_POLICY_DIR@
136 DEFS = @DEFS@
137 DEPDIR = @DEPDIR@
138 DISTRO = @DISTRO@
139 ECHO_C = @ECHO_C@
140 ECHO_N = @ECHO_N@
141 ECHO_T = @ECHO_T@
142 EGREP = @EGREP@
143 EXEEXT = @EXEEXT@
144 GCOV = @GCOV@
145 GENHTML = @GENHTML@
146 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
147 GLIB_CFLAGS = @GLIB_CFLAGS@
148 GLIB_LIBS = @GLIB_LIBS@
149 GMOFILES = @GMOFILES@
150 GMSGFMT = @GMSGFMT@
151 GREP = @GREP@
152 INSTALL = @INSTALL@
153 INSTALL_DATA = @INSTALL_DATA@
154 INSTALL_PROGRAM = @INSTALL_PROGRAM@
155 INSTALL_SCRIPT = @INSTALL_SCRIPT@
156 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
157 INSTOBJEXT = @INSTOBJEXT@
158 INTLLIBS = @INTLLIBS@
159 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
160 INTLTOOL_MERGE = @INTLTOOL_MERGE@
161 INTLTOOL_PERL = @INTLTOOL_PERL@
162 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
163 INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
164 INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
165 INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
166 INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
167 KRB5_CFLAGS = @KRB5_CFLAGS@
168 KRB5_CONFIG = @KRB5_CONFIG@
169 KRB5_LIBS = @KRB5_LIBS@
170 LCOV = @LCOV@
171 LDFLAGS = @LDFLAGS@
172 LIBOBJS = @LIBOBJS@
173 LIBS = @LIBS@
174 LN_S = @LN_S@
175 LTLIBOBJS = @LTLIBOBJS@
176 MAINT = @MAINT@
177 MAKEINFO = @MAKEINFO@
178 MKDIR_P = @MKDIR_P@
179 MKINSTALLDIRS = @MKINSTALLDIRS@
180 MSGFMT = @MSGFMT@
181 MSGFMT_OPTS = @MSGFMT_OPTS@
182 MSGMERGE = @MSGMERGE@
183 OBJEXT = @OBJEXT@
184 PACKAGE = @PACKAGE@
185 PACKAGEKIT_CFLAGS = @PACKAGEKIT_CFLAGS@
186 PACKAGEKIT_LIBS = @PACKAGEKIT_LIBS@
187 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
188 PACKAGE_NAME = @PACKAGE_NAME@
189 PACKAGE_STRING = @PACKAGE_STRING@
190 PACKAGE_TARNAME = @PACKAGE_TARNAME@
191 PACKAGE_URL = @PACKAGE_URL@
192 PACKAGE_VERSION = @PACKAGE_VERSION@
193 PATH_SEPARATOR = @PATH_SEPARATOR@
194 PKG_CONFIG = @PKG_CONFIG@
195 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
196 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
197 POFILES = @POFILES@
198 POLKIT_ACTION_DIR = @POLKIT_ACTION_DIR@
199 POLKIT_CFLAGS = @POLKIT_CFLAGS@
200 POLKIT_LIBS = @POLKIT_LIBS@
201 POSUB = @POSUB@
202 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
203 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
204 RANLIB = @RANLIB@
205 SERVICE_DIR = @SERVICE_DIR@
206 SET_MAKE = @SET_MAKE@
207 SHELL = @SHELL@
208 STRIP = @STRIP@
209 TEST_MODE = @TEST_MODE@
210 USE_NLS = @USE_NLS@
211 VERSION = @VERSION@
212 XGETTEXT = @XGETTEXT@
213 abs_builddir = @abs_builddir@
214 abs_srcdir = @abs_srcdir@
215 abs_top_builddir = @abs_top_builddir@
216 abs_top_srcdir = @abs_top_srcdir@
217 ac_ct_CC = @ac_ct_CC@
218 am__include = @am__include@
219 am__leading_dot = @am__leading_dot@
220 am__quote = @am__quote@
221 am__tar = @am__tar@
222 am__untar = @am__untar@
223 bindir = @bindir@
224 build_alias = @build_alias@
225 builddir = @builddir@
226 datadir = @datadir@
227 datarootdir = @datarootdir@
228 docdir = @docdir@
229 dvidir = @dvidir@
230 exec_prefix = @exec_prefix@
231 host_alias = @host_alias@
232 htmldir = @htmldir@
233 includedir = @includedir@
234 infodir = @infodir@
235 install_sh = @install_sh@
236 intltool__v_merge_options_ = @intltool__v_merge_options_@
237 intltool__v_merge_options_0 = @intltool__v_merge_options_0@
238 libdir = @libdir@
239 libexecdir = @libexecdir@
240 localedir = @localedir@
241 localstatedir = @localstatedir@
242 mandir = @mandir@
243 mkdir_p = @mkdir_p@
244 oldincludedir = @oldincludedir@
245 pdfdir = @pdfdir@
246 prefix = @prefix@
247 program_transform_name = @program_transform_name@
248 psdir = @psdir@
249 sbindir = @sbindir@
250 sharedstatedir = @sharedstatedir@
251 srcdir = @srcdir@
252 sysconfdir = @sysconfdir@
253 target_alias = @target_alias@
254 top_build_prefix = @top_build_prefix@
255 top_builddir = @top_builddir@
256 top_srcdir = @top_srcdir@
257 NULL =
258 TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions
259 noinst_LIBRARIES = \
260 librealm-dbus.a
261
262 dbusservicedir = $(DBUS_POLICY_DIR)
263 dbusservice_DATA = \
264 org.freedesktop.realmd.conf
265
266 BUILT_SOURCES = \
267 realm-dbus-generated.c realm-dbus-generated.h
268
269 librealm_dbus_a_SOURCES = \
270 realm-dbus-constants.h \
271 $(NULL)
272
273 nodist_librealm_dbus_a_SOURCES = \
274 $(BUILT_SOURCES) \
275 $(NULL)
276
277 librealm_dbus_a_CFLAGS = \
278 $(GLIB_CFLAGS) \
279 $(NULL)
280
281 DBUS_XML_DEFINITIONS = \
282 org.freedesktop.realmd.xml
283
284
285 # ------------------------------------------------------------------
286 EXTRA_DIST = \
287 $(DBUS_XML_DEFINITIONS) \
288 $(dbusservice_DATA) \
289 $(NULL)
290
291 CLEANFILES = \
292 $(BUILT_SOURCES) \
293 *.gcno \
294 *.gcda \
295 $(NULL)
296
297 DISTCLEANFILES = \
298 $(NULL)
299
300 all: $(BUILT_SOURCES)
301 $(MAKE) $(AM_MAKEFLAGS) all-am
302
303 .SUFFIXES:
304 .SUFFIXES: .c .o .obj
305 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps)
306 @for dep in $?; do \
307 case '$(am__configure_deps)' in \
308 *$$dep*) \
309 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
310 && { if test -f $@; then exit 0; else break; fi; }; \
311 exit 1;; \
312 esac; \
313 done; \
314 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dbus/Makefile'; \
315 $(am__cd) $(top_srcdir) && \
316 $(AUTOMAKE) --foreign dbus/Makefile
317 .PRECIOUS: Makefile
318 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
319 @case '$?' in \
320 *config.status*) \
321 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
322 *) \
323 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
324 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
325 esac;
326 $(top_srcdir)/Makefile.decl:
327
328 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
329 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
330
331 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
332 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
333 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
334 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
335 $(am__aclocal_m4_deps):
336
337 clean-noinstLIBRARIES:
338 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
339 librealm-dbus.a: $(librealm_dbus_a_OBJECTS) $(librealm_dbus_a_DEPENDENCIES) $(EXTRA_librealm_dbus_a_DEPENDENCIES)
340 $(AM_V_at)-rm -f librealm-dbus.a
341 $(AM_V_AR)$(librealm_dbus_a_AR) librealm-dbus.a $(librealm_dbus_a_OBJECTS) $(librealm_dbus_a_LIBADD)
342 $(AM_V_at)$(RANLIB) librealm-dbus.a
343
344 mostlyclean-compile:
345 -rm -f *.$(OBJEXT)
346
347 distclean-compile:
348 -rm -f *.tab.c
349
350 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/librealm_dbus_a-realm-dbus-generated.Po@am__quote@
351
352 .c.o:
353 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
354 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
355 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
356 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
357 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
358
359 .c.obj:
360 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
361 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
362 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
363 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
364 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
365
366 librealm_dbus_a-realm-dbus-generated.o: realm-dbus-generated.c
367 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librealm_dbus_a_CFLAGS) $(CFLAGS) -MT librealm_dbus_a-realm-dbus-generated.o -MD -MP -MF $(DEPDIR)/librealm_dbus_a-realm-dbus-generated.Tpo -c -o librealm_dbus_a-realm-dbus-generated.o `test -f 'realm-dbus-generated.c' || echo '$(srcdir)/'`realm-dbus-generated.c
368 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librealm_dbus_a-realm-dbus-generated.Tpo $(DEPDIR)/librealm_dbus_a-realm-dbus-generated.Po
369 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-dbus-generated.c' object='librealm_dbus_a-realm-dbus-generated.o' libtool=no @AMDEPBACKSLASH@
370 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
371 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librealm_dbus_a_CFLAGS) $(CFLAGS) -c -o librealm_dbus_a-realm-dbus-generated.o `test -f 'realm-dbus-generated.c' || echo '$(srcdir)/'`realm-dbus-generated.c
372
373 librealm_dbus_a-realm-dbus-generated.obj: realm-dbus-generated.c
374 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librealm_dbus_a_CFLAGS) $(CFLAGS) -MT librealm_dbus_a-realm-dbus-generated.obj -MD -MP -MF $(DEPDIR)/librealm_dbus_a-realm-dbus-generated.Tpo -c -o librealm_dbus_a-realm-dbus-generated.obj `if test -f 'realm-dbus-generated.c'; then $(CYGPATH_W) 'realm-dbus-generated.c'; else $(CYGPATH_W) '$(srcdir)/realm-dbus-generated.c'; fi`
375 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/librealm_dbus_a-realm-dbus-generated.Tpo $(DEPDIR)/librealm_dbus_a-realm-dbus-generated.Po
376 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-dbus-generated.c' object='librealm_dbus_a-realm-dbus-generated.obj' libtool=no @AMDEPBACKSLASH@
377 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
378 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librealm_dbus_a_CFLAGS) $(CFLAGS) -c -o librealm_dbus_a-realm-dbus-generated.obj `if test -f 'realm-dbus-generated.c'; then $(CYGPATH_W) 'realm-dbus-generated.c'; else $(CYGPATH_W) '$(srcdir)/realm-dbus-generated.c'; fi`
379 install-dbusserviceDATA: $(dbusservice_DATA)
380 @$(NORMAL_INSTALL)
381 test -z "$(dbusservicedir)" || $(MKDIR_P) "$(DESTDIR)$(dbusservicedir)"
382 @list='$(dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \
383 for p in $$list; do \
384 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
385 echo "$$d$$p"; \
386 done | $(am__base_list) | \
387 while read files; do \
388 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dbusservicedir)'"; \
389 $(INSTALL_DATA) $$files "$(DESTDIR)$(dbusservicedir)" || exit $$?; \
390 done
391
392 uninstall-dbusserviceDATA:
393 @$(NORMAL_UNINSTALL)
394 @list='$(dbusservice_DATA)'; test -n "$(dbusservicedir)" || list=; \
395 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
396 dir='$(DESTDIR)$(dbusservicedir)'; $(am__uninstall_files_from_dir)
397
398 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
399 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
400 unique=`for i in $$list; do \
401 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
402 done | \
403 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
404 END { if (nonempty) { for (i in files) print i; }; }'`; \
405 mkid -fID $$unique
406 tags: TAGS
407
408 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
409 $(TAGS_FILES) $(LISP)
410 set x; \
411 here=`pwd`; \
412 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
413 unique=`for i in $$list; do \
414 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
415 done | \
416 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
417 END { if (nonempty) { for (i in files) print i; }; }'`; \
418 shift; \
419 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
420 test -n "$$unique" || unique=$$empty_fix; \
421 if test $$# -gt 0; then \
422 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
423 "$$@" $$unique; \
424 else \
425 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
426 $$unique; \
427 fi; \
428 fi
429 ctags: CTAGS
430 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
431 $(TAGS_FILES) $(LISP)
432 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
433 unique=`for i in $$list; do \
434 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
435 done | \
436 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
437 END { if (nonempty) { for (i in files) print i; }; }'`; \
438 test -z "$(CTAGS_ARGS)$$unique" \
439 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
440 $$unique
441
442 GTAGS:
443 here=`$(am__cd) $(top_builddir) && pwd` \
444 && $(am__cd) $(top_srcdir) \
445 && gtags -i $(GTAGS_ARGS) "$$here"
446
447 distclean-tags:
448 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
449
450 distdir: $(DISTFILES)
451 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
452 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
453 list='$(DISTFILES)'; \
454 dist_files=`for file in $$list; do echo $$file; done | \
455 sed -e "s|^$$srcdirstrip/||;t" \
456 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
457 case $$dist_files in \
458 */*) $(MKDIR_P) `echo "$$dist_files" | \
459 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
460 sort -u` ;; \
461 esac; \
462 for file in $$dist_files; do \
463 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
464 if test -d $$d/$$file; then \
465 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
466 if test -d "$(distdir)/$$file"; then \
467 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
468 fi; \
469 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
470 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
471 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
472 fi; \
473 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
474 else \
475 test -f "$(distdir)/$$file" \
476 || cp -p $$d/$$file "$(distdir)/$$file" \
477 || exit 1; \
478 fi; \
479 done
480 check-am: all-am
481 check: $(BUILT_SOURCES)
482 $(MAKE) $(AM_MAKEFLAGS) check-am
483 all-am: Makefile $(LIBRARIES) $(DATA)
484 installdirs:
485 for dir in "$(DESTDIR)$(dbusservicedir)"; do \
486 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
487 done
488 install: $(BUILT_SOURCES)
489 $(MAKE) $(AM_MAKEFLAGS) install-am
490 install-exec: install-exec-am
491 install-data: install-data-am
492 uninstall: uninstall-am
493
494 install-am: all-am
495 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
496
497 installcheck: installcheck-am
498 install-strip:
499 if test -z '$(STRIP)'; then \
500 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
501 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
502 install; \
503 else \
504 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
505 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
506 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
507 fi
508 mostlyclean-generic:
509
510 clean-generic:
511 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
512
513 distclean-generic:
514 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
515 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
516 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
517
518 maintainer-clean-generic:
519 @echo "This command is intended for maintainers to use"
520 @echo "it deletes files that may require special tools to rebuild."
521 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
522 clean: clean-am
523
524 clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
525
526 distclean: distclean-am
527 -rm -rf ./$(DEPDIR)
528 -rm -f Makefile
529 distclean-am: clean-am distclean-compile distclean-generic \
530 distclean-tags
531
532 dvi: dvi-am
533
534 dvi-am:
535
536 html: html-am
537
538 html-am:
539
540 info: info-am
541
542 info-am:
543
544 install-data-am: install-dbusserviceDATA
545
546 install-dvi: install-dvi-am
547
548 install-dvi-am:
549
550 install-exec-am:
551
552 install-html: install-html-am
553
554 install-html-am:
555
556 install-info: install-info-am
557
558 install-info-am:
559
560 install-man:
561
562 install-pdf: install-pdf-am
563
564 install-pdf-am:
565
566 install-ps: install-ps-am
567
568 install-ps-am:
569
570 installcheck-am:
571
572 maintainer-clean: maintainer-clean-am
573 -rm -rf ./$(DEPDIR)
574 -rm -f Makefile
575 maintainer-clean-am: distclean-am maintainer-clean-generic
576
577 mostlyclean: mostlyclean-am
578
579 mostlyclean-am: mostlyclean-compile mostlyclean-generic
580
581 pdf: pdf-am
582
583 pdf-am:
584
585 ps: ps-am
586
587 ps-am:
588
589 uninstall-am: uninstall-dbusserviceDATA
590
591 .MAKE: all check install install-am install-strip
592
593 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
594 clean-noinstLIBRARIES ctags distclean distclean-compile \
595 distclean-generic distclean-tags distdir dvi dvi-am html \
596 html-am info info-am install install-am install-data \
597 install-data-am install-dbusserviceDATA install-dvi \
598 install-dvi-am install-exec install-exec-am install-html \
599 install-html-am install-info install-info-am install-man \
600 install-pdf install-pdf-am install-ps install-ps-am \
601 install-strip installcheck installcheck-am installdirs \
602 maintainer-clean maintainer-clean-generic mostlyclean \
603 mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
604 tags uninstall uninstall-am uninstall-dbusserviceDATA
605
606
607 perform-memcheck: $(TEST_PROGS) $(TEST_SUPPRESSIONS)
608 @make -C $(top_builddir)/build all
609 @for test in $(TEST_PROGS); do \
610 G_SLICE=always-malloc libtool --mode=execute \
611 valgrind --trace-children=no --gen-suppressions=all \
612 --suppressions=$(TEST_SUPPRESSIONS) \
613 --leak-check=full --show-reachable=yes --num-callers=16 \
614 --quiet --error-exitcode=33 \
615 $(builddir)/$$test; \
616 done
617
618 @WITH_COVERAGE_TRUE@coverage:
619 @WITH_COVERAGE_TRUE@ mkdir -p $(top_builddir)/build/coverage
620 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
621 @WITH_COVERAGE_TRUE@ $(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
622 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
623 @WITH_COVERAGE_TRUE@ @echo "file://$(abs_top_builddir)/build/coverage/index.html"
624
625 @WITH_COVERAGE_TRUE@clear-coverage:
626 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
627
628 realm-dbus-generated.c: org.freedesktop.realmd.xml
629 $(AM_V_GEN) gdbus-codegen --interface-prefix org.freedesktop.realmd. \
630 --generate-c-code realm-dbus-generated --c-namespace RealmDbus $<
631 realm-dbus-generated.h: realm-dbus-generated.c
632
633 # Tell versions [3.59,3.63) of GNU make to not export all variables.
634 # Otherwise a system limit (for SysV at least) may be exceeded.
635 .NOEXPORT:
0 <!DOCTYPE busconfig PUBLIC
1 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
2 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
3 <busconfig>
4
5 <!-- Only root can own the realm service -->
6 <policy user="root">
7 <allow own="org.freedesktop.realmd"/>
8 <allow own="org.freedesktop.realmd.Samba"/>
9 </policy>
10
11 <policy context="default">
12 <allow send_destination="org.freedesktop.realmd" />
13 <allow send_destination="org.freedesktop.realmd.Samba" />
14 </policy>
15
16 </busconfig>
0 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
1 "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
2
3 <node name="/">
4 <!--
5 * Global interface implemented by realmd. Allows listing of providers
6 * and discovering which one is relevant for a given domain.
7 *
8 * This is implemented by individual providers, but is aggregated
9 * globally at the system bus name 'org.freedesktop.realmd' with the
10 * object path '/org/freedesktop/realmd'
11 -->
12 <interface name="org.freedesktop.realmd.Provider">
13
14 <!--
15 * A list of known, enrolled or discovered realms.
16 * Each realm is a DBus object and is represeted by a:
17 * s: DBus bus name of the realm
18 * o: DBus object path of the realm
19 * s: DBus interface name, like 'ofr.Kerberos' (below)
20 -->
21 <property name="Realms" type="a(sos)" access="read"/>
22
23 <!--
24 * Discover whether a string represents a realm that a provider
25 * can enroll or otherwise use.
26 -->
27 <method name="Discover">
28 <!-- The input string -->
29 <arg name="string" type="s" direction="in"/>
30
31 <!-- Returned match relevance -->
32 <arg name="relevance" type="i" direction="out"/>
33
34 <!-- The realm objects: bus name, object path, interface -->
35 <arg name="realm" type="a(sos)" direction="out"/>
36 </method>
37 </interface>
38
39 <!--
40 * This interface is implemented by Providers and Realms to provide
41 * additional information when an long running operation is happening
42 *
43 * In particular you can connect to the "Diagnostics" signal when
44 * during an enroll or unenroll to get details.
45 -->
46 <interface name="org.freedesktop.realmd.Diagnostics">
47 <signal name="Diagnostics">
48 <arg name="data" type="s"/>
49 </signal>
50 </interface>
51
52 <!--
53 * This interface is implemented by Kerberos realms.
54 -->
55 <interface name="org.freedesktop.realmd.Kerberos">
56
57 <!--
58 * The kerberos realm name. Usually capitalized.
59 -->
60 <property name="Name" type="s" access="read"/>
61
62 <!--
63 * The DNS domain name for this realm.
64 -->
65 <property name="Domain" type="s" access="read"/>
66
67 <!--
68 * The suggested Administrator login name for this realm
69 -->
70 <property name="SuggestedAdministrator" type="s" access="read"/>
71
72 <!--
73 * Whether the machine is enrolled in this realm or not.
74 -->
75 <property name="Enrolled" type="b" access="read"/>
76
77 <!--
78 * Enroll the machine in this realm using an administrative
79 * account and a password.
80 -->
81 <method name="EnrollWithPassword">
82 <arg name="principal" type="s" direction="in"/>
83 <arg name="password" type="s" direction="in"/>
84 <arg name="options" type="a{sv}" direction="in"/>
85 </method>
86
87 <!--
88 * Enroll the machine in this realm using kerberos cached
89 * administrative credentials.
90 -->
91 <method name="EnrollWithCredentialCache">
92 <!-- The contents of a kerberos cache file containing administrative credentials -->
93 <arg name="kerberos_cache" type="ay" direction="in">
94 <annotation name="org.gtk.GDBus.C.ForceGVariant" value="yup"/>
95 </arg>
96 <arg name="options" type="a{sv}" direction="in"/>
97 </method>
98
99 <!--
100 * Unenroll the machine from this realm using an administrative
101 * account and a password.
102 -->
103 <method name="UnenrollWithPassword">
104 <arg name="principal" type="s" direction="in"/>
105 <arg name="password" type="s" direction="in"/>
106 <arg name="options" type="a{sv}" direction="in"/>
107 </method>
108
109 <!--
110 * Unenroll the machine from this realm using a kerberos cached
111 * administrative credentials.
112 -->
113 <method name="UnenrollWithCredentialCache">
114 <!-- The contents of a kerberos cache file containing administrative credentials -->
115 <arg name="kerberos_cache" type="ay" direction="in">
116 <annotation name="org.gtk.GDBus.C.ForceGVariant" value="yup"/>
117 </arg>
118 <arg name="options" type="a{sv}" direction="in"/>
119 </method>
120
121 <!--
122 * The format for user logins when this realm is enrolled.
123 * This property may not be valid unless machine is enrolled
124 * in this realm. The format contains a %s where the user name
125 * goes eg: "DOMAIN\%s"
126 -->
127 <property name="LoginFormat" type="s" access="read"/>
128
129 <!--
130 * The list of permitted logins in the LoginFormat style
131 -->
132 <property name="PermittedLogins" type="as" access="read"/>
133
134 <!--
135 * Change the PermittedLogins property. Should take effect
136 * immediately. Some providers may not enforce this :S
137 -->
138 <method name="ChangePermittedLogins">
139 <arg name="add" type="as" direction="in"/>
140 <arg name="remove" type="as" direction="in"/>
141 </method>
142
143 </interface>
144 </node>
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_DBUS_CONSTANTS_H__
17 #define __REALM_DBUS_CONSTANTS_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 #define DBUS_PEER_INTERFACE "org.freedesktop.DBus.Peer"
24 #define DBUS_PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
25 #define DBUS_INTROSPECTABLE_INTERFACE "org.freedesktop.DBus.Introspectable"
26
27 #define REALM_DBUS_ALL_PROVIDER_NAME "org.freedesktop.realmd"
28 #define REALM_DBUS_ALL_PROVIDER_PATH "/org/freedesktop/realmd"
29
30 #define REALM_DBUS_SAMBA_NAME "org.freedesktop.realmd.Samba"
31 #define REALM_DBUS_SAMBA_PATH "/org/freedesktop/realmd/Samba"
32
33 #define REALM_DBUS_PROVIDER_INTERFACE "org.freedesktop.realmd.Provider"
34 #define REALM_DBUS_KERBEROS_REALM_INTERFACE "org.freedesktop.realmd.Kerberos"
35 #define REALM_DBUS_DIAGNOSTICS_INTERFACE "org.freedesktop.realmd.Diagnostics"
36
37 #define REALM_DBUS_DIAGNOSTICS_SIGNAL "Diagnostics"
38
39 #define REALM_DBUS_ERROR_INTERNAL "org.freedesktop.realmd.Error.Internal"
40 #define REALM_DBUS_ERROR_DISCOVERY_FAILED "org.freedesktop.realmd.Error.DiscoveryFailed"
41 #define REALM_DBUS_ERROR_ENROLL_FAILED "org.freedesktop.realmd.Error.EnrollFailed"
42 #define REALM_DBUS_ERROR_UNENROLL_FAILED "org.freedesktop.realmd.Error.UnenrollFailed"
43 #define REALM_DBUS_ERROR_BUSY "org.freedesktop.realmd.Error.Busy"
44 #define REALM_DBUS_ERROR_NOT_AUTHORIZED "org.freedesktop.realmd.Error.NotAuthorized"
45 #define REALM_DBUS_ERROR_ALREADY_ENROLLED "org.freedesktop.realmd.Error.AlreadyEnrolled"
46 #define REALM_DBUS_ERROR_NOT_ENROLLED "org.freedesktop.realmd.Error.NotEnrolled"
47 #define REALM_DBUS_ERROR_AUTH_FAILED "org.freedesktop.realmd.Error.AuthFailed"
48
49 #define REALM_DBUS_DISCOVERY_TYPE "type"
50 #define REALM_DBUS_DISCOVERY_DOMAIN "domain"
51 #define REALM_DBUS_DISCOVERY_KDCS "kerberos-kdcs"
52 #define REALM_DBUS_DISCOVERY_REALM "kerberos-realm"
53
54 #define REALM_DBUS_NAME_CHARS "abcdefghijklnmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"
55
56 G_END_DECLS
57
58 #endif /* __REALM_DBUS_CONSTANTS_H__ */
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2011-12-04.11; # UTC
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
6 # 2011 Free Software 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, see <http://www.gnu.org/licenses/>.
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 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
27
28 case $1 in
29 '')
30 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
31 exit 1;
32 ;;
33 -h | --h*)
34 cat <<\EOF
35 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
36
37 Run PROGRAMS ARGS to compile a file, generating dependencies
38 as side-effects.
39
40 Environment variables:
41 depmode Dependency tracking mode.
42 source Source file read by `PROGRAMS ARGS'.
43 object Object file output by `PROGRAMS ARGS'.
44 DEPDIR directory where to store dependencies.
45 depfile Dependency file to output.
46 tmpdepfile Temporary file to use when outputting dependencies.
47 libtool Whether libtool is used (yes/no).
48
49 Report bugs to <bug-automake@gnu.org>.
50 EOF
51 exit $?
52 ;;
53 -v | --v*)
54 echo "depcomp $scriptversion"
55 exit $?
56 ;;
57 esac
58
59 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
60 echo "depcomp: Variables source, object and depmode must be set" 1>&2
61 exit 1
62 fi
63
64 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
65 depfile=${depfile-`echo "$object" |
66 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
67 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
68
69 rm -f "$tmpdepfile"
70
71 # Some modes work just like other modes, but use different flags. We
72 # parameterize here, but still list the modes in the big case below,
73 # to make depend.m4 easier to write. Note that we *cannot* use a case
74 # here, because this file can only contain one case statement.
75 if test "$depmode" = hp; then
76 # HP compiler uses -M and no extra arg.
77 gccflag=-M
78 depmode=gcc
79 fi
80
81 if test "$depmode" = dashXmstdout; then
82 # This is just like dashmstdout with a different argument.
83 dashmflag=-xM
84 depmode=dashmstdout
85 fi
86
87 cygpath_u="cygpath -u -f -"
88 if test "$depmode" = msvcmsys; then
89 # This is just like msvisualcpp but w/o cygpath translation.
90 # Just convert the backslash-escaped backslashes to single forward
91 # slashes to satisfy depend.m4
92 cygpath_u='sed s,\\\\,/,g'
93 depmode=msvisualcpp
94 fi
95
96 if test "$depmode" = msvc7msys; then
97 # This is just like msvc7 but w/o cygpath translation.
98 # Just convert the backslash-escaped backslashes to single forward
99 # slashes to satisfy depend.m4
100 cygpath_u='sed s,\\\\,/,g'
101 depmode=msvc7
102 fi
103
104 case "$depmode" in
105 gcc3)
106 ## gcc 3 implements dependency tracking that does exactly what
107 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
108 ## it if -MD -MP comes after the -MF stuff. Hmm.
109 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
110 ## the command line argument order; so add the flags where they
111 ## appear in depend2.am. Note that the slowdown incurred here
112 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
113 for arg
114 do
115 case $arg in
116 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
117 *) set fnord "$@" "$arg" ;;
118 esac
119 shift # fnord
120 shift # $arg
121 done
122 "$@"
123 stat=$?
124 if test $stat -eq 0; then :
125 else
126 rm -f "$tmpdepfile"
127 exit $stat
128 fi
129 mv "$tmpdepfile" "$depfile"
130 ;;
131
132 gcc)
133 ## There are various ways to get dependency output from gcc. Here's
134 ## why we pick this rather obscure method:
135 ## - Don't want to use -MD because we'd like the dependencies to end
136 ## up in a subdir. Having to rename by hand is ugly.
137 ## (We might end up doing this anyway to support other compilers.)
138 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
139 ## -MM, not -M (despite what the docs say).
140 ## - Using -M directly means running the compiler twice (even worse
141 ## than renaming).
142 if test -z "$gccflag"; then
143 gccflag=-MD,
144 fi
145 "$@" -Wp,"$gccflag$tmpdepfile"
146 stat=$?
147 if test $stat -eq 0; then :
148 else
149 rm -f "$tmpdepfile"
150 exit $stat
151 fi
152 rm -f "$depfile"
153 echo "$object : \\" > "$depfile"
154 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
155 ## The second -e expression handles DOS-style file names with drive letters.
156 sed -e 's/^[^:]*: / /' \
157 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
158 ## This next piece of magic avoids the `deleted header file' problem.
159 ## The problem is that when a header file which appears in a .P file
160 ## is deleted, the dependency causes make to die (because there is
161 ## typically no way to rebuild the header). We avoid this by adding
162 ## dummy dependencies for each header file. Too bad gcc doesn't do
163 ## this for us directly.
164 tr ' ' '
165 ' < "$tmpdepfile" |
166 ## Some versions of gcc put a space before the `:'. On the theory
167 ## that the space means something, we add a space to the output as
168 ## well. hp depmode also adds that space, but also prefixes the VPATH
169 ## to the object. Take care to not repeat it in the output.
170 ## Some versions of the HPUX 10.20 sed can't process this invocation
171 ## correctly. Breaking it into two sed invocations is a workaround.
172 sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
173 | sed -e 's/$/ :/' >> "$depfile"
174 rm -f "$tmpdepfile"
175 ;;
176
177 hp)
178 # This case exists only to let depend.m4 do its work. It works by
179 # looking at the text of this script. This case will never be run,
180 # since it is checked for above.
181 exit 1
182 ;;
183
184 sgi)
185 if test "$libtool" = yes; then
186 "$@" "-Wp,-MDupdate,$tmpdepfile"
187 else
188 "$@" -MDupdate "$tmpdepfile"
189 fi
190 stat=$?
191 if test $stat -eq 0; then :
192 else
193 rm -f "$tmpdepfile"
194 exit $stat
195 fi
196 rm -f "$depfile"
197
198 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
199 echo "$object : \\" > "$depfile"
200
201 # Clip off the initial element (the dependent). Don't try to be
202 # clever and replace this with sed code, as IRIX sed won't handle
203 # lines with more than a fixed number of characters (4096 in
204 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
205 # the IRIX cc adds comments like `#:fec' to the end of the
206 # dependency line.
207 tr ' ' '
208 ' < "$tmpdepfile" \
209 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
210 tr '
211 ' ' ' >> "$depfile"
212 echo >> "$depfile"
213
214 # The second pass generates a dummy entry for each header file.
215 tr ' ' '
216 ' < "$tmpdepfile" \
217 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
218 >> "$depfile"
219 else
220 # The sourcefile does not contain any dependencies, so just
221 # store a dummy comment line, to avoid errors with the Makefile
222 # "include basename.Plo" scheme.
223 echo "#dummy" > "$depfile"
224 fi
225 rm -f "$tmpdepfile"
226 ;;
227
228 aix)
229 # The C for AIX Compiler uses -M and outputs the dependencies
230 # in a .u file. In older versions, this file always lives in the
231 # current directory. Also, the AIX compiler puts `$object:' at the
232 # start of each line; $object doesn't have directory information.
233 # Version 6 uses the directory in both cases.
234 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
235 test "x$dir" = "x$object" && dir=
236 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
237 if test "$libtool" = yes; then
238 tmpdepfile1=$dir$base.u
239 tmpdepfile2=$base.u
240 tmpdepfile3=$dir.libs/$base.u
241 "$@" -Wc,-M
242 else
243 tmpdepfile1=$dir$base.u
244 tmpdepfile2=$dir$base.u
245 tmpdepfile3=$dir$base.u
246 "$@" -M
247 fi
248 stat=$?
249
250 if test $stat -eq 0; then :
251 else
252 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
253 exit $stat
254 fi
255
256 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
257 do
258 test -f "$tmpdepfile" && break
259 done
260 if test -f "$tmpdepfile"; then
261 # Each line is of the form `foo.o: dependent.h'.
262 # Do two passes, one to just change these to
263 # `$object: dependent.h' and one to simply `dependent.h:'.
264 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
265 # That's a tab and a space in the [].
266 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
267 else
268 # The sourcefile does not contain any dependencies, so just
269 # store a dummy comment line, to avoid errors with the Makefile
270 # "include basename.Plo" scheme.
271 echo "#dummy" > "$depfile"
272 fi
273 rm -f "$tmpdepfile"
274 ;;
275
276 icc)
277 # Intel's C compiler understands `-MD -MF file'. However on
278 # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
279 # ICC 7.0 will fill foo.d with something like
280 # foo.o: sub/foo.c
281 # foo.o: sub/foo.h
282 # which is wrong. We want:
283 # sub/foo.o: sub/foo.c
284 # sub/foo.o: sub/foo.h
285 # sub/foo.c:
286 # sub/foo.h:
287 # ICC 7.1 will output
288 # foo.o: sub/foo.c sub/foo.h
289 # and will wrap long lines using \ :
290 # foo.o: sub/foo.c ... \
291 # sub/foo.h ... \
292 # ...
293
294 "$@" -MD -MF "$tmpdepfile"
295 stat=$?
296 if test $stat -eq 0; then :
297 else
298 rm -f "$tmpdepfile"
299 exit $stat
300 fi
301 rm -f "$depfile"
302 # Each line is of the form `foo.o: dependent.h',
303 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
304 # Do two passes, one to just change these to
305 # `$object: dependent.h' and one to simply `dependent.h:'.
306 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
307 # Some versions of the HPUX 10.20 sed can't process this invocation
308 # correctly. Breaking it into two sed invocations is a workaround.
309 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
310 sed -e 's/$/ :/' >> "$depfile"
311 rm -f "$tmpdepfile"
312 ;;
313
314 hp2)
315 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
316 # compilers, which have integrated preprocessors. The correct option
317 # to use with these is +Maked; it writes dependencies to a file named
318 # 'foo.d', which lands next to the object file, wherever that
319 # happens to be.
320 # Much of this is similar to the tru64 case; see comments there.
321 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
322 test "x$dir" = "x$object" && dir=
323 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
324 if test "$libtool" = yes; then
325 tmpdepfile1=$dir$base.d
326 tmpdepfile2=$dir.libs/$base.d
327 "$@" -Wc,+Maked
328 else
329 tmpdepfile1=$dir$base.d
330 tmpdepfile2=$dir$base.d
331 "$@" +Maked
332 fi
333 stat=$?
334 if test $stat -eq 0; then :
335 else
336 rm -f "$tmpdepfile1" "$tmpdepfile2"
337 exit $stat
338 fi
339
340 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
341 do
342 test -f "$tmpdepfile" && break
343 done
344 if test -f "$tmpdepfile"; then
345 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
346 # Add `dependent.h:' lines.
347 sed -ne '2,${
348 s/^ *//
349 s/ \\*$//
350 s/$/:/
351 p
352 }' "$tmpdepfile" >> "$depfile"
353 else
354 echo "#dummy" > "$depfile"
355 fi
356 rm -f "$tmpdepfile" "$tmpdepfile2"
357 ;;
358
359 tru64)
360 # The Tru64 compiler uses -MD to generate dependencies as a side
361 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
362 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
363 # dependencies in `foo.d' instead, so we check for that too.
364 # Subdirectories are respected.
365 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
366 test "x$dir" = "x$object" && dir=
367 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
368
369 if test "$libtool" = yes; then
370 # With Tru64 cc, shared objects can also be used to make a
371 # static library. This mechanism is used in libtool 1.4 series to
372 # handle both shared and static libraries in a single compilation.
373 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
374 #
375 # With libtool 1.5 this exception was removed, and libtool now
376 # generates 2 separate objects for the 2 libraries. These two
377 # compilations output dependencies in $dir.libs/$base.o.d and
378 # in $dir$base.o.d. We have to check for both files, because
379 # one of the two compilations can be disabled. We should prefer
380 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
381 # automatically cleaned when .libs/ is deleted, while ignoring
382 # the former would cause a distcleancheck panic.
383 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
384 tmpdepfile2=$dir$base.o.d # libtool 1.5
385 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
386 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
387 "$@" -Wc,-MD
388 else
389 tmpdepfile1=$dir$base.o.d
390 tmpdepfile2=$dir$base.d
391 tmpdepfile3=$dir$base.d
392 tmpdepfile4=$dir$base.d
393 "$@" -MD
394 fi
395
396 stat=$?
397 if test $stat -eq 0; then :
398 else
399 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
400 exit $stat
401 fi
402
403 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
404 do
405 test -f "$tmpdepfile" && break
406 done
407 if test -f "$tmpdepfile"; then
408 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
409 # That's a tab and a space in the [].
410 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
411 else
412 echo "#dummy" > "$depfile"
413 fi
414 rm -f "$tmpdepfile"
415 ;;
416
417 msvc7)
418 if test "$libtool" = yes; then
419 showIncludes=-Wc,-showIncludes
420 else
421 showIncludes=-showIncludes
422 fi
423 "$@" $showIncludes > "$tmpdepfile"
424 stat=$?
425 grep -v '^Note: including file: ' "$tmpdepfile"
426 if test "$stat" = 0; then :
427 else
428 rm -f "$tmpdepfile"
429 exit $stat
430 fi
431 rm -f "$depfile"
432 echo "$object : \\" > "$depfile"
433 # The first sed program below extracts the file names and escapes
434 # backslashes for cygpath. The second sed program outputs the file
435 # name when reading, but also accumulates all include files in the
436 # hold buffer in order to output them again at the end. This only
437 # works with sed implementations that can handle large buffers.
438 sed < "$tmpdepfile" -n '
439 /^Note: including file: *\(.*\)/ {
440 s//\1/
441 s/\\/\\\\/g
442 p
443 }' | $cygpath_u | sort -u | sed -n '
444 s/ /\\ /g
445 s/\(.*\)/ \1 \\/p
446 s/.\(.*\) \\/\1:/
447 H
448 $ {
449 s/.*/ /
450 G
451 p
452 }' >> "$depfile"
453 rm -f "$tmpdepfile"
454 ;;
455
456 msvc7msys)
457 # This case exists only to let depend.m4 do its work. It works by
458 # looking at the text of this script. This case will never be run,
459 # since it is checked for above.
460 exit 1
461 ;;
462
463 #nosideeffect)
464 # This comment above is used by automake to tell side-effect
465 # dependency tracking mechanisms from slower ones.
466
467 dashmstdout)
468 # Important note: in order to support this mode, a compiler *must*
469 # always write the preprocessed file to stdout, regardless of -o.
470 "$@" || exit $?
471
472 # Remove the call to Libtool.
473 if test "$libtool" = yes; then
474 while test "X$1" != 'X--mode=compile'; do
475 shift
476 done
477 shift
478 fi
479
480 # Remove `-o $object'.
481 IFS=" "
482 for arg
483 do
484 case $arg in
485 -o)
486 shift
487 ;;
488 $object)
489 shift
490 ;;
491 *)
492 set fnord "$@" "$arg"
493 shift # fnord
494 shift # $arg
495 ;;
496 esac
497 done
498
499 test -z "$dashmflag" && dashmflag=-M
500 # Require at least two characters before searching for `:'
501 # in the target name. This is to cope with DOS-style filenames:
502 # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
503 "$@" $dashmflag |
504 sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
505 rm -f "$depfile"
506 cat < "$tmpdepfile" > "$depfile"
507 tr ' ' '
508 ' < "$tmpdepfile" | \
509 ## Some versions of the HPUX 10.20 sed can't process this invocation
510 ## correctly. Breaking it into two sed invocations is a workaround.
511 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
512 rm -f "$tmpdepfile"
513 ;;
514
515 dashXmstdout)
516 # This case only exists to satisfy depend.m4. It is never actually
517 # run, as this mode is specially recognized in the preamble.
518 exit 1
519 ;;
520
521 makedepend)
522 "$@" || exit $?
523 # Remove any Libtool call
524 if test "$libtool" = yes; then
525 while test "X$1" != 'X--mode=compile'; do
526 shift
527 done
528 shift
529 fi
530 # X makedepend
531 shift
532 cleared=no eat=no
533 for arg
534 do
535 case $cleared in
536 no)
537 set ""; shift
538 cleared=yes ;;
539 esac
540 if test $eat = yes; then
541 eat=no
542 continue
543 fi
544 case "$arg" in
545 -D*|-I*)
546 set fnord "$@" "$arg"; shift ;;
547 # Strip any option that makedepend may not understand. Remove
548 # the object too, otherwise makedepend will parse it as a source file.
549 -arch)
550 eat=yes ;;
551 -*|$object)
552 ;;
553 *)
554 set fnord "$@" "$arg"; shift ;;
555 esac
556 done
557 obj_suffix=`echo "$object" | sed 's/^.*\././'`
558 touch "$tmpdepfile"
559 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
560 rm -f "$depfile"
561 # makedepend may prepend the VPATH from the source file name to the object.
562 # No need to regex-escape $object, excess matching of '.' is harmless.
563 sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
564 sed '1,2d' "$tmpdepfile" | tr ' ' '
565 ' | \
566 ## Some versions of the HPUX 10.20 sed can't process this invocation
567 ## correctly. Breaking it into two sed invocations is a workaround.
568 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
569 rm -f "$tmpdepfile" "$tmpdepfile".bak
570 ;;
571
572 cpp)
573 # Important note: in order to support this mode, a compiler *must*
574 # always write the preprocessed file to stdout.
575 "$@" || exit $?
576
577 # Remove the call to Libtool.
578 if test "$libtool" = yes; then
579 while test "X$1" != 'X--mode=compile'; do
580 shift
581 done
582 shift
583 fi
584
585 # Remove `-o $object'.
586 IFS=" "
587 for arg
588 do
589 case $arg in
590 -o)
591 shift
592 ;;
593 $object)
594 shift
595 ;;
596 *)
597 set fnord "$@" "$arg"
598 shift # fnord
599 shift # $arg
600 ;;
601 esac
602 done
603
604 "$@" -E |
605 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
606 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
607 sed '$ s: \\$::' > "$tmpdepfile"
608 rm -f "$depfile"
609 echo "$object : \\" > "$depfile"
610 cat < "$tmpdepfile" >> "$depfile"
611 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
612 rm -f "$tmpdepfile"
613 ;;
614
615 msvisualcpp)
616 # Important note: in order to support this mode, a compiler *must*
617 # always write the preprocessed file to stdout.
618 "$@" || exit $?
619
620 # Remove the call to Libtool.
621 if test "$libtool" = yes; then
622 while test "X$1" != 'X--mode=compile'; do
623 shift
624 done
625 shift
626 fi
627
628 IFS=" "
629 for arg
630 do
631 case "$arg" in
632 -o)
633 shift
634 ;;
635 $object)
636 shift
637 ;;
638 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
639 set fnord "$@"
640 shift
641 shift
642 ;;
643 *)
644 set fnord "$@" "$arg"
645 shift
646 shift
647 ;;
648 esac
649 done
650 "$@" -E 2>/dev/null |
651 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
652 rm -f "$depfile"
653 echo "$object : \\" > "$depfile"
654 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
655 echo " " >> "$depfile"
656 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
657 rm -f "$tmpdepfile"
658 ;;
659
660 msvcmsys)
661 # This case exists only to let depend.m4 do its work. It works by
662 # looking at the text of this script. This case will never be run,
663 # since it is checked for above.
664 exit 1
665 ;;
666
667 none)
668 exec "$@"
669 ;;
670
671 *)
672 echo "Unknown depmode $depmode" 1>&2
673 exit 1
674 ;;
675 esac
676
677 exit 0
678
679 # Local Variables:
680 # mode: shell-script
681 # sh-indentation: 2
682 # eval: (add-hook 'write-file-hooks 'time-stamp)
683 # time-stamp-start: "scriptversion="
684 # time-stamp-format: "%:y-%02m-%02d.%02H"
685 # time-stamp-time-zone: "UTC"
686 # time-stamp-end: "; # UTC"
687 # End:
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2011-01-19.21; # UTC
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 chgrpprog=${CHGRPPROG-chgrp}
61 chmodprog=${CHMODPROG-chmod}
62 chownprog=${CHOWNPROG-chown}
63 cmpprog=${CMPPROG-cmp}
64 cpprog=${CPPROG-cp}
65 mkdirprog=${MKDIRPROG-mkdir}
66 mvprog=${MVPROG-mv}
67 rmprog=${RMPROG-rm}
68 stripprog=${STRIPPROG-strip}
69
70 posix_glob='?'
71 initialize_posix_glob='
72 test "$posix_glob" != "?" || {
73 if (set -f) 2>/dev/null; then
74 posix_glob=
75 else
76 posix_glob=:
77 fi
78 }
79 '
80
81 posix_mkdir=
82
83 # Desired mode of installed file.
84 mode=0755
85
86 chgrpcmd=
87 chmodcmd=$chmodprog
88 chowncmd=
89 mvcmd=$mvprog
90 rmcmd="$rmprog -f"
91 stripcmd=
92
93 src=
94 dst=
95 dir_arg=
96 dst_arg=
97
98 copy_on_change=false
99 no_target_directory=
100
101 usage="\
102 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
103 or: $0 [OPTION]... SRCFILES... DIRECTORY
104 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
105 or: $0 [OPTION]... -d DIRECTORIES...
106
107 In the 1st form, copy SRCFILE to DSTFILE.
108 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
109 In the 4th, create DIRECTORIES.
110
111 Options:
112 --help display this help and exit.
113 --version display version info and exit.
114
115 -c (ignored)
116 -C install only if different (preserve the last data modification time)
117 -d create directories instead of installing files.
118 -g GROUP $chgrpprog installed files to GROUP.
119 -m MODE $chmodprog installed files to MODE.
120 -o USER $chownprog installed files to USER.
121 -s $stripprog installed files.
122 -t DIRECTORY install into DIRECTORY.
123 -T report an error if DSTFILE is a directory.
124
125 Environment variables override the default commands:
126 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
127 RMPROG STRIPPROG
128 "
129
130 while test $# -ne 0; do
131 case $1 in
132 -c) ;;
133
134 -C) copy_on_change=true;;
135
136 -d) dir_arg=true;;
137
138 -g) chgrpcmd="$chgrpprog $2"
139 shift;;
140
141 --help) echo "$usage"; exit $?;;
142
143 -m) mode=$2
144 case $mode in
145 *' '* | *' '* | *'
146 '* | *'*'* | *'?'* | *'['*)
147 echo "$0: invalid mode: $mode" >&2
148 exit 1;;
149 esac
150 shift;;
151
152 -o) chowncmd="$chownprog $2"
153 shift;;
154
155 -s) stripcmd=$stripprog;;
156
157 -t) dst_arg=$2
158 # Protect names problematic for `test' and other utilities.
159 case $dst_arg in
160 -* | [=\(\)!]) dst_arg=./$dst_arg;;
161 esac
162 shift;;
163
164 -T) no_target_directory=true;;
165
166 --version) echo "$0 $scriptversion"; exit $?;;
167
168 --) shift
169 break;;
170
171 -*) echo "$0: invalid option: $1" >&2
172 exit 1;;
173
174 *) break;;
175 esac
176 shift
177 done
178
179 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
180 # When -d is used, all remaining arguments are directories to create.
181 # When -t is used, the destination is already specified.
182 # Otherwise, the last argument is the destination. Remove it from $@.
183 for arg
184 do
185 if test -n "$dst_arg"; then
186 # $@ is not empty: it contains at least $arg.
187 set fnord "$@" "$dst_arg"
188 shift # fnord
189 fi
190 shift # arg
191 dst_arg=$arg
192 # Protect names problematic for `test' and other utilities.
193 case $dst_arg in
194 -* | [=\(\)!]) dst_arg=./$dst_arg;;
195 esac
196 done
197 fi
198
199 if test $# -eq 0; then
200 if test -z "$dir_arg"; then
201 echo "$0: no input file specified." >&2
202 exit 1
203 fi
204 # It's OK to call `install-sh -d' without argument.
205 # This can happen when creating conditional directories.
206 exit 0
207 fi
208
209 if test -z "$dir_arg"; then
210 do_exit='(exit $ret); exit $ret'
211 trap "ret=129; $do_exit" 1
212 trap "ret=130; $do_exit" 2
213 trap "ret=141; $do_exit" 13
214 trap "ret=143; $do_exit" 15
215
216 # Set umask so as not to create temps with too-generous modes.
217 # However, 'strip' requires both read and write access to temps.
218 case $mode in
219 # Optimize common cases.
220 *644) cp_umask=133;;
221 *755) cp_umask=22;;
222
223 *[0-7])
224 if test -z "$stripcmd"; then
225 u_plus_rw=
226 else
227 u_plus_rw='% 200'
228 fi
229 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
230 *)
231 if test -z "$stripcmd"; then
232 u_plus_rw=
233 else
234 u_plus_rw=,u+rw
235 fi
236 cp_umask=$mode$u_plus_rw;;
237 esac
238 fi
239
240 for src
241 do
242 # Protect names problematic for `test' and other utilities.
243 case $src in
244 -* | [=\(\)!]) src=./$src;;
245 esac
246
247 if test -n "$dir_arg"; then
248 dst=$src
249 dstdir=$dst
250 test -d "$dstdir"
251 dstdir_status=$?
252 else
253
254 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
255 # might cause directories to be created, which would be especially bad
256 # if $src (and thus $dsttmp) contains '*'.
257 if test ! -f "$src" && test ! -d "$src"; then
258 echo "$0: $src does not exist." >&2
259 exit 1
260 fi
261
262 if test -z "$dst_arg"; then
263 echo "$0: no destination specified." >&2
264 exit 1
265 fi
266 dst=$dst_arg
267
268 # If destination is a directory, append the input filename; won't work
269 # if double slashes aren't ignored.
270 if test -d "$dst"; then
271 if test -n "$no_target_directory"; then
272 echo "$0: $dst_arg: Is a directory" >&2
273 exit 1
274 fi
275 dstdir=$dst
276 dst=$dstdir/`basename "$src"`
277 dstdir_status=0
278 else
279 # Prefer dirname, but fall back on a substitute if dirname fails.
280 dstdir=`
281 (dirname "$dst") 2>/dev/null ||
282 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
283 X"$dst" : 'X\(//\)[^/]' \| \
284 X"$dst" : 'X\(//\)$' \| \
285 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
286 echo X"$dst" |
287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
288 s//\1/
289 q
290 }
291 /^X\(\/\/\)[^/].*/{
292 s//\1/
293 q
294 }
295 /^X\(\/\/\)$/{
296 s//\1/
297 q
298 }
299 /^X\(\/\).*/{
300 s//\1/
301 q
302 }
303 s/.*/./; q'
304 `
305
306 test -d "$dstdir"
307 dstdir_status=$?
308 fi
309 fi
310
311 obsolete_mkdir_used=false
312
313 if test $dstdir_status != 0; then
314 case $posix_mkdir in
315 '')
316 # Create intermediate dirs using mode 755 as modified by the umask.
317 # This is like FreeBSD 'install' as of 1997-10-28.
318 umask=`umask`
319 case $stripcmd.$umask in
320 # Optimize common cases.
321 *[2367][2367]) mkdir_umask=$umask;;
322 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
323
324 *[0-7])
325 mkdir_umask=`expr $umask + 22 \
326 - $umask % 100 % 40 + $umask % 20 \
327 - $umask % 10 % 4 + $umask % 2
328 `;;
329 *) mkdir_umask=$umask,go-w;;
330 esac
331
332 # With -d, create the new directory with the user-specified mode.
333 # Otherwise, rely on $mkdir_umask.
334 if test -n "$dir_arg"; then
335 mkdir_mode=-m$mode
336 else
337 mkdir_mode=
338 fi
339
340 posix_mkdir=false
341 case $umask in
342 *[123567][0-7][0-7])
343 # POSIX mkdir -p sets u+wx bits regardless of umask, which
344 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
345 ;;
346 *)
347 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
348 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
349
350 if (umask $mkdir_umask &&
351 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
352 then
353 if test -z "$dir_arg" || {
354 # Check for POSIX incompatibilities with -m.
355 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
356 # other-writeable bit of parent directory when it shouldn't.
357 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
358 ls_ld_tmpdir=`ls -ld "$tmpdir"`
359 case $ls_ld_tmpdir in
360 d????-?r-*) different_mode=700;;
361 d????-?--*) different_mode=755;;
362 *) false;;
363 esac &&
364 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
365 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
366 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
367 }
368 }
369 then posix_mkdir=:
370 fi
371 rmdir "$tmpdir/d" "$tmpdir"
372 else
373 # Remove any dirs left behind by ancient mkdir implementations.
374 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
375 fi
376 trap '' 0;;
377 esac;;
378 esac
379
380 if
381 $posix_mkdir && (
382 umask $mkdir_umask &&
383 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
384 )
385 then :
386 else
387
388 # The umask is ridiculous, or mkdir does not conform to POSIX,
389 # or it failed possibly due to a race condition. Create the
390 # directory the slow way, step by step, checking for races as we go.
391
392 case $dstdir in
393 /*) prefix='/';;
394 [-=\(\)!]*) prefix='./';;
395 *) prefix='';;
396 esac
397
398 eval "$initialize_posix_glob"
399
400 oIFS=$IFS
401 IFS=/
402 $posix_glob set -f
403 set fnord $dstdir
404 shift
405 $posix_glob set +f
406 IFS=$oIFS
407
408 prefixes=
409
410 for d
411 do
412 test X"$d" = X && continue
413
414 prefix=$prefix$d
415 if test -d "$prefix"; then
416 prefixes=
417 else
418 if $posix_mkdir; then
419 (umask=$mkdir_umask &&
420 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
421 # Don't fail if two instances are running concurrently.
422 test -d "$prefix" || exit 1
423 else
424 case $prefix in
425 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
426 *) qprefix=$prefix;;
427 esac
428 prefixes="$prefixes '$qprefix'"
429 fi
430 fi
431 prefix=$prefix/
432 done
433
434 if test -n "$prefixes"; then
435 # Don't fail if two instances are running concurrently.
436 (umask $mkdir_umask &&
437 eval "\$doit_exec \$mkdirprog $prefixes") ||
438 test -d "$dstdir" || exit 1
439 obsolete_mkdir_used=true
440 fi
441 fi
442 fi
443
444 if test -n "$dir_arg"; then
445 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
446 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
447 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
448 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
449 else
450
451 # Make a couple of temp file names in the proper directory.
452 dsttmp=$dstdir/_inst.$$_
453 rmtmp=$dstdir/_rm.$$_
454
455 # Trap to clean up those temp files at exit.
456 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
457
458 # Copy the file name to the temp name.
459 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
460
461 # and set any options; do chmod last to preserve setuid bits.
462 #
463 # If any of these fail, we abort the whole thing. If we want to
464 # ignore errors from any of these, just make sure not to ignore
465 # errors from the above "$doit $cpprog $src $dsttmp" command.
466 #
467 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
468 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
469 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
470 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
471
472 # If -C, don't bother to copy if it wouldn't change the file.
473 if $copy_on_change &&
474 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
475 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
476
477 eval "$initialize_posix_glob" &&
478 $posix_glob set -f &&
479 set X $old && old=:$2:$4:$5:$6 &&
480 set X $new && new=:$2:$4:$5:$6 &&
481 $posix_glob set +f &&
482
483 test "$old" = "$new" &&
484 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
485 then
486 rm -f "$dsttmp"
487 else
488 # Rename the file to the real destination.
489 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
490
491 # The rename failed, perhaps because mv can't rename something else
492 # to itself, or perhaps because mv is so ancient that it does not
493 # support -f.
494 {
495 # Now remove or move aside any old file at destination location.
496 # We try this two ways since rm can't unlink itself on some
497 # systems and the destination file might be busy for other
498 # reasons. In this case, the final cleanup might fail but the new
499 # file should still install successfully.
500 {
501 test ! -f "$dst" ||
502 $doit $rmcmd -f "$dst" 2>/dev/null ||
503 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
504 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
505 } ||
506 { echo "$0: cannot unlink or rename $dst" >&2
507 (exit 1); exit 1
508 }
509 } &&
510
511 # Now rename the file to the real destination.
512 $doit $mvcmd "$dsttmp" "$dst"
513 }
514 fi || exit 1
515
516 trap '' 0
517 fi
518 done
519
520 # Local variables:
521 # eval: (add-hook 'write-file-hooks 'time-stamp)
522 # time-stamp-start: "scriptversion="
523 # time-stamp-format: "%:y-%02m-%02d.%02H"
524 # time-stamp-time-zone: "UTC"
525 # time-stamp-end: "; # UTC"
526 # End:
0 #! /bin/sh
1 # Common stub for a few missing GNU programs while installing.
2
3 scriptversion=2012-01-06.13; # UTC
4
5 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
6 # 2008, 2009, 2010, 2011, 2012 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, see <http://www.gnu.org/licenses/>.
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 if test $# -eq 0; then
28 echo 1>&2 "Try \`$0 --help' for more information"
29 exit 1
30 fi
31
32 run=:
33 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
34 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
35
36 # In the cases where this matters, `missing' is being run in the
37 # srcdir already.
38 if test -f configure.ac; then
39 configure_ac=configure.ac
40 else
41 configure_ac=configure.in
42 fi
43
44 msg="missing on your system"
45
46 case $1 in
47 --run)
48 # Try to run requested program, and just exit if it succeeds.
49 run=
50 shift
51 "$@" && exit 0
52 # Exit code 63 means version mismatch. This often happens
53 # when the user try to use an ancient version of a tool on
54 # a file that requires a minimum version. In this case we
55 # we should proceed has if the program had been absent, or
56 # if --run hadn't been passed.
57 if test $? = 63; then
58 run=:
59 msg="probably too old"
60 fi
61 ;;
62
63 -h|--h|--he|--hel|--help)
64 echo "\
65 $0 [OPTION]... PROGRAM [ARGUMENT]...
66
67 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
68 error status if there is no known handling for PROGRAM.
69
70 Options:
71 -h, --help display this help and exit
72 -v, --version output version information and exit
73 --run try to run the given command, and emulate it if it fails
74
75 Supported PROGRAM values:
76 aclocal touch file \`aclocal.m4'
77 autoconf touch file \`configure'
78 autoheader touch file \`config.h.in'
79 autom4te touch the output file, or create a stub one
80 automake touch all \`Makefile.in' files
81 bison create \`y.tab.[ch]', if possible, from existing .[ch]
82 flex create \`lex.yy.c', if possible, from existing .c
83 help2man touch the output file
84 lex create \`lex.yy.c', if possible, from existing .c
85 makeinfo touch the output file
86 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
87
88 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
89 \`g' are ignored when checking the name.
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 # normalize program name to check for.
109 program=`echo "$1" | sed '
110 s/^gnu-//; t
111 s/^gnu//; t
112 s/^g//; t'`
113
114 # Now exit if we have it, but it failed. Also exit now if we
115 # don't have it and --version was passed (most likely to detect
116 # the program). This is about non-GNU programs, so use $1 not
117 # $program.
118 case $1 in
119 lex*|yacc*)
120 # Not GNU programs, they don't have --version.
121 ;;
122
123 *)
124 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
125 # We have it, but it failed.
126 exit 1
127 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
128 # Could not run --version or --help. This is probably someone
129 # running `$TOOL --version' or `$TOOL --help' to check whether
130 # $TOOL exists and not knowing $TOOL uses missing.
131 exit 1
132 fi
133 ;;
134 esac
135
136 # If it does not exist, or fails to run (possibly an outdated version),
137 # try to emulate it.
138 case $program in
139 aclocal*)
140 echo 1>&2 "\
141 WARNING: \`$1' is $msg. You should only need it if
142 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
143 to install the \`Automake' and \`Perl' packages. Grab them from
144 any GNU archive site."
145 touch aclocal.m4
146 ;;
147
148 autoconf*)
149 echo 1>&2 "\
150 WARNING: \`$1' is $msg. You should only need it if
151 you modified \`${configure_ac}'. You might want to install the
152 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
153 archive site."
154 touch configure
155 ;;
156
157 autoheader*)
158 echo 1>&2 "\
159 WARNING: \`$1' is $msg. You should only need it if
160 you modified \`acconfig.h' or \`${configure_ac}'. You might want
161 to install the \`Autoconf' and \`GNU m4' packages. Grab them
162 from any GNU archive site."
163 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
164 test -z "$files" && files="config.h"
165 touch_files=
166 for f in $files; do
167 case $f in
168 *:*) touch_files="$touch_files "`echo "$f" |
169 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
170 *) touch_files="$touch_files $f.in";;
171 esac
172 done
173 touch $touch_files
174 ;;
175
176 automake*)
177 echo 1>&2 "\
178 WARNING: \`$1' is $msg. You should only need it if
179 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
180 You might want to install the \`Automake' and \`Perl' packages.
181 Grab them from any GNU archive site."
182 find . -type f -name Makefile.am -print |
183 sed 's/\.am$/.in/' |
184 while read f; do touch "$f"; done
185 ;;
186
187 autom4te*)
188 echo 1>&2 "\
189 WARNING: \`$1' is needed, but is $msg.
190 You might have modified some files without having the
191 proper tools for further handling them.
192 You can get \`$1' as part of \`Autoconf' from any GNU
193 archive site."
194
195 file=`echo "$*" | sed -n "$sed_output"`
196 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
197 if test -f "$file"; then
198 touch $file
199 else
200 test -z "$file" || exec >$file
201 echo "#! /bin/sh"
202 echo "# Created by GNU Automake missing as a replacement of"
203 echo "# $ $@"
204 echo "exit 0"
205 chmod +x $file
206 exit 1
207 fi
208 ;;
209
210 bison*|yacc*)
211 echo 1>&2 "\
212 WARNING: \`$1' $msg. You should only need it if
213 you modified a \`.y' file. You may need the \`Bison' package
214 in order for those modifications to take effect. You can get
215 \`Bison' from any GNU archive site."
216 rm -f y.tab.c y.tab.h
217 if test $# -ne 1; then
218 eval LASTARG=\${$#}
219 case $LASTARG in
220 *.y)
221 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
222 if test -f "$SRCFILE"; then
223 cp "$SRCFILE" y.tab.c
224 fi
225 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
226 if test -f "$SRCFILE"; then
227 cp "$SRCFILE" y.tab.h
228 fi
229 ;;
230 esac
231 fi
232 if test ! -f y.tab.h; then
233 echo >y.tab.h
234 fi
235 if test ! -f y.tab.c; then
236 echo 'main() { return 0; }' >y.tab.c
237 fi
238 ;;
239
240 lex*|flex*)
241 echo 1>&2 "\
242 WARNING: \`$1' is $msg. You should only need it if
243 you modified a \`.l' file. You may need the \`Flex' package
244 in order for those modifications to take effect. You can get
245 \`Flex' from any GNU archive site."
246 rm -f lex.yy.c
247 if test $# -ne 1; then
248 eval LASTARG=\${$#}
249 case $LASTARG in
250 *.l)
251 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
252 if test -f "$SRCFILE"; then
253 cp "$SRCFILE" lex.yy.c
254 fi
255 ;;
256 esac
257 fi
258 if test ! -f lex.yy.c; then
259 echo 'main() { return 0; }' >lex.yy.c
260 fi
261 ;;
262
263 help2man*)
264 echo 1>&2 "\
265 WARNING: \`$1' is $msg. You should only need it if
266 you modified a dependency of a manual page. You may need the
267 \`Help2man' package in order for those modifications to take
268 effect. You can get \`Help2man' from any GNU archive site."
269
270 file=`echo "$*" | sed -n "$sed_output"`
271 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
272 if test -f "$file"; then
273 touch $file
274 else
275 test -z "$file" || exec >$file
276 echo ".ab help2man is required to generate this page"
277 exit $?
278 fi
279 ;;
280
281 makeinfo*)
282 echo 1>&2 "\
283 WARNING: \`$1' is $msg. You should only need it if
284 you modified a \`.texi' or \`.texinfo' file, or any other file
285 indirectly affecting the aspect of the manual. The spurious
286 call might also be the consequence of using a buggy \`make' (AIX,
287 DU, IRIX). You might want to install the \`Texinfo' package or
288 the \`GNU make' package. Grab either from any GNU archive site."
289 # The file to touch is that specified with -o ...
290 file=`echo "$*" | sed -n "$sed_output"`
291 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
292 if test -z "$file"; then
293 # ... or it is the one specified with @setfilename ...
294 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
295 file=`sed -n '
296 /^@setfilename/{
297 s/.* \([^ ]*\) *$/\1/
298 p
299 q
300 }' $infile`
301 # ... or it is derived from the source name (dir/f.texi becomes f.info)
302 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
303 fi
304 # If the file does not exist, the user really needs makeinfo;
305 # let's fail without touching anything.
306 test -f $file || exit 1
307 touch $file
308 ;;
309
310 *)
311 echo 1>&2 "\
312 WARNING: \`$1' is needed, and is $msg.
313 You might have modified some files without having the
314 proper tools for further handling them. Check the \`README' file,
315 it often tells you about the needed prerequisites for installing
316 this package. You may also peek at any GNU archive site, in case
317 some other package would contain this missing \`$1' program."
318 exit 1
319 ;;
320 esac
321
322 exit 0
323
324 # Local variables:
325 # eval: (add-hook 'write-file-hooks 'time-stamp)
326 # time-stamp-start: "scriptversion="
327 # time-stamp-format: "%:y-%02m-%02d.%02H"
328 # time-stamp-time-zone: "UTC"
329 # time-stamp-end: "; # UTC"
330 # End:
0 # Makefile for program source directory in GNU NLS utilities package.
1 # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
2 # Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
3 #
4 # This file may be copied and used freely without restrictions. It may
5 # be used in projects which are not available under a GNU Public License,
6 # but which still want to provide support for the GNU gettext functionality.
7 #
8 # - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
9 # instead of PACKAGE and to look for po2tbl in ./ not in intl/
10 #
11 # - Modified by jacob berkman <jacob@ximian.com> to install
12 # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
13 #
14 # - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
15 #
16 # We have the following line for use by intltoolize:
17 # INTLTOOL_MAKEFILE
18
19 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
20 PACKAGE = @PACKAGE@
21 VERSION = @VERSION@
22
23 SHELL = @SHELL@
24
25 srcdir = @srcdir@
26 top_srcdir = @top_srcdir@
27 top_builddir = @top_builddir@
28 VPATH = @srcdir@
29
30 prefix = @prefix@
31 exec_prefix = @exec_prefix@
32 datadir = @datadir@
33 datarootdir = @datarootdir@
34 libdir = @libdir@
35 DATADIRNAME = @DATADIRNAME@
36 itlocaledir = $(prefix)/$(DATADIRNAME)/locale
37 subdir = po
38 install_sh = @install_sh@
39 # Automake >= 1.8 provides @mkdir_p@.
40 # Until it can be supposed, use the safe fallback:
41 mkdir_p = $(install_sh) -d
42
43 INSTALL = @INSTALL@
44 INSTALL_DATA = @INSTALL_DATA@
45
46 GMSGFMT = @GMSGFMT@
47 MSGFMT = @MSGFMT@
48 XGETTEXT = @XGETTEXT@
49 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
50 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
51 MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
52 GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
53
54 ALL_LINGUAS = @ALL_LINGUAS@
55
56 PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
57
58 USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
59
60 USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
61
62 POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
63
64 DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
65 EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
66
67 POTFILES = \
68 # This comment gets stripped out
69
70 CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
71
72 .SUFFIXES:
73 .SUFFIXES: .po .pox .gmo .mo .msg .cat
74
75 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
76 INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
77 INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
78 INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@;
79
80 .po.pox:
81 $(MAKE) $(GETTEXT_PACKAGE).pot
82 $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
83
84 .po.mo:
85 $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
86
87 .po.gmo:
88 $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
89 && rm -f $$file && $(GMSGFMT) -o $$file $<
90
91 .po.cat:
92 sed -f ../intl/po2msg.sed < $< > $*.msg \
93 && rm -f $@ && gencat $@ $*.msg
94
95
96 all: all-@USE_NLS@
97
98 all-yes: $(CATALOGS)
99 all-no:
100
101 $(GETTEXT_PACKAGE).pot: $(POTFILES)
102 $(GENPOT)
103
104 install: install-data
105 install-data: install-data-@USE_NLS@
106 install-data-no: all
107 install-data-yes: all
108 linguas="$(USE_LINGUAS)"; \
109 for lang in $$linguas; do \
110 dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
111 $(mkdir_p) $$dir; \
112 if test -r $$lang.gmo; then \
113 $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
114 echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
115 else \
116 $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
117 echo "installing $(srcdir)/$$lang.gmo as" \
118 "$$dir/$(GETTEXT_PACKAGE).mo"; \
119 fi; \
120 if test -r $$lang.gmo.m; then \
121 $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
122 echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
123 else \
124 if test -r $(srcdir)/$$lang.gmo.m ; then \
125 $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
126 $$dir/$(GETTEXT_PACKAGE).mo.m; \
127 echo "installing $(srcdir)/$$lang.gmo.m as" \
128 "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
129 else \
130 true; \
131 fi; \
132 fi; \
133 done
134
135 # Empty stubs to satisfy archaic automake needs
136 dvi info ctags tags CTAGS TAGS ID:
137
138 # Define this as empty until I found a useful application.
139 install-exec installcheck:
140
141 uninstall:
142 linguas="$(USE_LINGUAS)"; \
143 for lang in $$linguas; do \
144 rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
145 rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
146 done
147
148 check: all $(GETTEXT_PACKAGE).pot
149 rm -f missing notexist
150 srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
151 if [ -r missing -o -r notexist ]; then \
152 exit 1; \
153 fi
154
155 mostlyclean:
156 rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
157 rm -f .intltool-merge-cache
158
159 clean: mostlyclean
160
161 distclean: clean
162 rm -f Makefile Makefile.in POTFILES stamp-it
163 rm -f *.mo *.msg *.cat *.cat.m *.gmo
164
165 maintainer-clean: distclean
166 @echo "This command is intended for maintainers to use;"
167 @echo "it deletes files that may require special tools to rebuild."
168 rm -f Makefile.in.in
169
170 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
171 dist distdir: $(DISTFILES)
172 dists="$(DISTFILES)"; \
173 extra_dists="$(EXTRA_DISTFILES)"; \
174 for file in $$extra_dists; do \
175 test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
176 done; \
177 for file in $$dists; do \
178 test -f $$file || file="$(srcdir)/$$file"; \
179 ln $$file $(distdir) 2> /dev/null \
180 || cp -p $$file $(distdir); \
181 done
182
183 update-po: Makefile
184 $(MAKE) $(GETTEXT_PACKAGE).pot
185 tmpdir=`pwd`; \
186 linguas="$(USE_LINGUAS)"; \
187 for lang in $$linguas; do \
188 echo "$$lang:"; \
189 result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
190 if $$result; then \
191 if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
192 rm -f $$tmpdir/$$lang.new.po; \
193 else \
194 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
195 :; \
196 else \
197 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
198 rm -f $$tmpdir/$$lang.new.po; \
199 exit 1; \
200 fi; \
201 fi; \
202 else \
203 echo "msgmerge for $$lang.gmo failed!"; \
204 rm -f $$tmpdir/$$lang.new.po; \
205 fi; \
206 done
207
208 Makefile POTFILES: stamp-it
209 @if test ! -f $@; then \
210 rm -f stamp-it; \
211 $(MAKE) stamp-it; \
212 fi
213
214 stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
215 cd $(top_builddir) \
216 && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
217 $(SHELL) ./config.status
218
219 # Tell versions [3.59,3.63) of GNU make not to export all variables.
220 # Otherwise a system limit (for SysV at least) may be exceeded.
221 .NOEXPORT:
0 service/org.freedesktop.realmd.policy.in
0 include $(top_srcdir)/Makefile.decl
1
2 service_PROGRAMS = \
3 realmd
4
5 REALMD_CONFIGS = \
6 realmd-defaults.conf \
7 realmd-redhat.conf
8
9 servicedir = $(SERVICE_DIR)
10 service_DATA = \
11 net-ads-smb.conf \
12 realmd-defaults.conf
13
14 providerdir = $(SERVICE_DIR)/provider.d
15 provider_DATA = \
16 org.freedesktop.realmd.Samba.provider
17
18 polkit_policydir = $(POLKIT_ACTION_DIR)
19 polkit_policy_in_files = org.freedesktop.realmd.policy.in
20 polkit_policy_DATA = $(polkit_policy_in_files:.policy.in=.policy)
21 @INTLTOOL_POLICY_RULE@
22
23 realmd_SOURCES = \
24 realm-ad-discover.c realm-ad-discover.h \
25 realm-all-provider.c realm-all-provider.h \
26 realm-command.c realm-command.h \
27 realm-daemon.c realm-daemon.h \
28 realm-debug.c realm-debug.h \
29 realm-diagnostics.c realm-diagnostics.h \
30 realm-discovery.c realm-discovery.h \
31 realm-errors.c realm-errors.h \
32 realm-ini-config.c realm-ini-config.h \
33 realm-kerberos.c realm-kerberos.h \
34 realm-network.c realm-network.h \
35 realm-packages.c realm-packages.h \
36 realm-provider.c realm-provider.h \
37 realm-samba.c realm-samba.h \
38 realm-samba-config.c realm-samba-config.h \
39 realm-samba-enroll.c realm-samba-enroll.h \
40 realm-samba-provider.c realm-samba-provider.h \
41 realm-samba-winbind.c realm-samba-winbind.h \
42 realm-service.c realm-service.h \
43 realm-service-systemd.c realm-service-systemd.h \
44 realm-service-upstart.c realm-service-upstart.h \
45 realm-settings.c realm-settings.h \
46 $(NULL)
47
48 realmd_CFLAGS = \
49 -I$(top_srcdir)/dbus \
50 -I$(top_builddir)/dbus \
51 -DSERVICE_DIR="\"$(servicedir)\"" \
52 -DSYSCONF_DIR="\"$(sysconfdir)\"" \
53 -DPROVIDER_DIR="\"$(providerdir)\"" \
54 $(PACKAGEKIT_CFLAGS) \
55 $(POLKIT_CFLAGS) \
56 $(GLIB_CFLAGS) \
57 $(KRB5_CFLAGS) \
58 $(NULL)
59
60 realmd_LDADD = \
61 $(top_builddir)/dbus/librealm-dbus.a \
62 $(PACKAGEKIT_LIBS) \
63 $(POLKIT_LIBS) \
64 $(GLIB_LIBS) \
65 $(KRB5_LIBS) \
66 $(NULL)
67
68 # Install and uninstall the config for this distro
69 install-data-local:
70 $(INSTALL_PROGRAM) -d $(servicedir)
71 $(INSTALL_DATA) $(srcdir)/realmd-$(DISTRO).conf $(servicedir)/realmd-distro.conf
72 uninstall-local:
73 rm -f $(servicedir)/realmd-distro.conf
74
75 # ------------------------------------------------------------------
76
77 EXTRA_DIST = \
78 $(polkit_policy_in_files) \
79 $(REALMD_CONFIGS) \
80 $(service_DATA) \
81 $(provider_DATA) \
82 $(NULL)
83
84 CLEANFILES = \
85 $(polkit_policy_DATA) \
86 *.gcno \
87 *.gcda \
88 $(NULL)
89
90 DISTCLEANFILES = \
91 $(BUILT_SOURCES) \
92 $(NULL)
0 # Makefile.in generated by automake 1.11.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17
18 VPATH = @srcdir@
19 pkgdatadir = $(datadir)/@PACKAGE@
20 pkgincludedir = $(includedir)/@PACKAGE@
21 pkglibdir = $(libdir)/@PACKAGE@
22 pkglibexecdir = $(libexecdir)/@PACKAGE@
23 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24 install_sh_DATA = $(install_sh) -c -m 644
25 install_sh_PROGRAM = $(install_sh) -c
26 install_sh_SCRIPT = $(install_sh) -c
27 INSTALL_HEADER = $(INSTALL_DATA)
28 transform = $(program_transform_name)
29 NORMAL_INSTALL = :
30 PRE_INSTALL = :
31 POST_INSTALL = :
32 NORMAL_UNINSTALL = :
33 PRE_UNINSTALL = :
34 POST_UNINSTALL = :
35 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
36 $(top_srcdir)/Makefile.decl
37 service_PROGRAMS = realmd$(EXEEXT)
38 subdir = service
39 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40 am__aclocal_m4_deps = $(top_srcdir)/build/m4/intltool.m4 \
41 $(top_srcdir)/configure.ac
42 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
43 $(ACLOCAL_M4)
44 mkinstalldirs = $(install_sh) -d
45 CONFIG_HEADER = $(top_builddir)/config.h
46 CONFIG_CLEAN_FILES =
47 CONFIG_CLEAN_VPATH_FILES =
48 am__installdirs = "$(DESTDIR)$(servicedir)" \
49 "$(DESTDIR)$(polkit_policydir)" "$(DESTDIR)$(providerdir)" \
50 "$(DESTDIR)$(servicedir)"
51 PROGRAMS = $(service_PROGRAMS)
52 am__objects_1 =
53 am_realmd_OBJECTS = realmd-realm-ad-discover.$(OBJEXT) \
54 realmd-realm-all-provider.$(OBJEXT) \
55 realmd-realm-command.$(OBJEXT) realmd-realm-daemon.$(OBJEXT) \
56 realmd-realm-debug.$(OBJEXT) \
57 realmd-realm-diagnostics.$(OBJEXT) \
58 realmd-realm-discovery.$(OBJEXT) realmd-realm-errors.$(OBJEXT) \
59 realmd-realm-ini-config.$(OBJEXT) \
60 realmd-realm-kerberos.$(OBJEXT) realmd-realm-network.$(OBJEXT) \
61 realmd-realm-packages.$(OBJEXT) \
62 realmd-realm-provider.$(OBJEXT) realmd-realm-samba.$(OBJEXT) \
63 realmd-realm-samba-config.$(OBJEXT) \
64 realmd-realm-samba-enroll.$(OBJEXT) \
65 realmd-realm-samba-provider.$(OBJEXT) \
66 realmd-realm-samba-winbind.$(OBJEXT) \
67 realmd-realm-service.$(OBJEXT) \
68 realmd-realm-service-systemd.$(OBJEXT) \
69 realmd-realm-service-upstart.$(OBJEXT) \
70 realmd-realm-settings.$(OBJEXT) $(am__objects_1)
71 realmd_OBJECTS = $(am_realmd_OBJECTS)
72 am__DEPENDENCIES_1 =
73 realmd_DEPENDENCIES = $(top_builddir)/dbus/librealm-dbus.a \
74 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
75 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
76 $(am__DEPENDENCIES_1)
77 realmd_LINK = $(CCLD) $(realmd_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
78 $(LDFLAGS) -o $@
79 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
80 depcomp = $(SHELL) $(top_srcdir)/depcomp
81 am__depfiles_maybe = depfiles
82 am__mv = mv -f
83 AM_V_lt = $(am__v_lt_@AM_V@)
84 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
85 am__v_lt_0 = --silent
86 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
87 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
88 AM_V_CC = $(am__v_CC_@AM_V@)
89 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
90 am__v_CC_0 = @echo " CC " $@;
91 AM_V_at = $(am__v_at_@AM_V@)
92 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
93 am__v_at_0 = @
94 CCLD = $(CC)
95 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
96 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
97 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
98 am__v_CCLD_0 = @echo " CCLD " $@;
99 AM_V_GEN = $(am__v_GEN_@AM_V@)
100 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
101 am__v_GEN_0 = @echo " GEN " $@;
102 SOURCES = $(realmd_SOURCES)
103 DIST_SOURCES = $(realmd_SOURCES)
104 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
105 am__vpath_adj = case $$p in \
106 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
107 *) f=$$p;; \
108 esac;
109 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
110 am__install_max = 40
111 am__nobase_strip_setup = \
112 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
113 am__nobase_strip = \
114 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
115 am__nobase_list = $(am__nobase_strip_setup); \
116 for p in $$list; do echo "$$p $$p"; done | \
117 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
118 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
119 if (++n[$$2] == $(am__install_max)) \
120 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
121 END { for (dir in files) print dir, files[dir] }'
122 am__base_list = \
123 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
124 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
125 am__uninstall_files_from_dir = { \
126 test -z "$$files" \
127 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
128 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
129 $(am__cd) "$$dir" && rm -f $$files; }; \
130 }
131 DATA = $(polkit_policy_DATA) $(provider_DATA) $(service_DATA)
132 ETAGS = etags
133 CTAGS = ctags
134 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
135 ACLOCAL = @ACLOCAL@
136 ALL_LINGUAS = @ALL_LINGUAS@
137 AMTAR = @AMTAR@
138 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
139 AUTOCONF = @AUTOCONF@
140 AUTOHEADER = @AUTOHEADER@
141 AUTOMAKE = @AUTOMAKE@
142 AWK = @AWK@
143 CATALOGS = @CATALOGS@
144 CATOBJEXT = @CATOBJEXT@
145 CC = @CC@
146 CCDEPMODE = @CCDEPMODE@
147 CFLAGS = @CFLAGS@
148 CPP = @CPP@
149 CPPFLAGS = @CPPFLAGS@
150 CYGPATH_W = @CYGPATH_W@
151 DATADIRNAME = @DATADIRNAME@
152 DBUS_POLICY_DIR = @DBUS_POLICY_DIR@
153 DEFS = @DEFS@
154 DEPDIR = @DEPDIR@
155 DISTRO = @DISTRO@
156 ECHO_C = @ECHO_C@
157 ECHO_N = @ECHO_N@
158 ECHO_T = @ECHO_T@
159 EGREP = @EGREP@
160 EXEEXT = @EXEEXT@
161 GCOV = @GCOV@
162 GENHTML = @GENHTML@
163 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
164 GLIB_CFLAGS = @GLIB_CFLAGS@
165 GLIB_LIBS = @GLIB_LIBS@
166 GMOFILES = @GMOFILES@
167 GMSGFMT = @GMSGFMT@
168 GREP = @GREP@
169 INSTALL = @INSTALL@
170 INSTALL_DATA = @INSTALL_DATA@
171 INSTALL_PROGRAM = @INSTALL_PROGRAM@
172 INSTALL_SCRIPT = @INSTALL_SCRIPT@
173 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
174 INSTOBJEXT = @INSTOBJEXT@
175 INTLLIBS = @INTLLIBS@
176 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
177 INTLTOOL_MERGE = @INTLTOOL_MERGE@
178 INTLTOOL_PERL = @INTLTOOL_PERL@
179 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
180 INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
181 INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
182 INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
183 INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
184 KRB5_CFLAGS = @KRB5_CFLAGS@
185 KRB5_CONFIG = @KRB5_CONFIG@
186 KRB5_LIBS = @KRB5_LIBS@
187 LCOV = @LCOV@
188 LDFLAGS = @LDFLAGS@
189 LIBOBJS = @LIBOBJS@
190 LIBS = @LIBS@
191 LN_S = @LN_S@
192 LTLIBOBJS = @LTLIBOBJS@
193 MAINT = @MAINT@
194 MAKEINFO = @MAKEINFO@
195 MKDIR_P = @MKDIR_P@
196 MKINSTALLDIRS = @MKINSTALLDIRS@
197 MSGFMT = @MSGFMT@
198 MSGFMT_OPTS = @MSGFMT_OPTS@
199 MSGMERGE = @MSGMERGE@
200 OBJEXT = @OBJEXT@
201 PACKAGE = @PACKAGE@
202 PACKAGEKIT_CFLAGS = @PACKAGEKIT_CFLAGS@
203 PACKAGEKIT_LIBS = @PACKAGEKIT_LIBS@
204 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
205 PACKAGE_NAME = @PACKAGE_NAME@
206 PACKAGE_STRING = @PACKAGE_STRING@
207 PACKAGE_TARNAME = @PACKAGE_TARNAME@
208 PACKAGE_URL = @PACKAGE_URL@
209 PACKAGE_VERSION = @PACKAGE_VERSION@
210 PATH_SEPARATOR = @PATH_SEPARATOR@
211 PKG_CONFIG = @PKG_CONFIG@
212 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
213 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
214 POFILES = @POFILES@
215 POLKIT_ACTION_DIR = @POLKIT_ACTION_DIR@
216 POLKIT_CFLAGS = @POLKIT_CFLAGS@
217 POLKIT_LIBS = @POLKIT_LIBS@
218 POSUB = @POSUB@
219 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
220 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
221 RANLIB = @RANLIB@
222 SERVICE_DIR = @SERVICE_DIR@
223 SET_MAKE = @SET_MAKE@
224 SHELL = @SHELL@
225 STRIP = @STRIP@
226 TEST_MODE = @TEST_MODE@
227 USE_NLS = @USE_NLS@
228 VERSION = @VERSION@
229 XGETTEXT = @XGETTEXT@
230 abs_builddir = @abs_builddir@
231 abs_srcdir = @abs_srcdir@
232 abs_top_builddir = @abs_top_builddir@
233 abs_top_srcdir = @abs_top_srcdir@
234 ac_ct_CC = @ac_ct_CC@
235 am__include = @am__include@
236 am__leading_dot = @am__leading_dot@
237 am__quote = @am__quote@
238 am__tar = @am__tar@
239 am__untar = @am__untar@
240 bindir = @bindir@
241 build_alias = @build_alias@
242 builddir = @builddir@
243 datadir = @datadir@
244 datarootdir = @datarootdir@
245 docdir = @docdir@
246 dvidir = @dvidir@
247 exec_prefix = @exec_prefix@
248 host_alias = @host_alias@
249 htmldir = @htmldir@
250 includedir = @includedir@
251 infodir = @infodir@
252 install_sh = @install_sh@
253 intltool__v_merge_options_ = @intltool__v_merge_options_@
254 intltool__v_merge_options_0 = @intltool__v_merge_options_0@
255 libdir = @libdir@
256 libexecdir = @libexecdir@
257 localedir = @localedir@
258 localstatedir = @localstatedir@
259 mandir = @mandir@
260 mkdir_p = @mkdir_p@
261 oldincludedir = @oldincludedir@
262 pdfdir = @pdfdir@
263 prefix = @prefix@
264 program_transform_name = @program_transform_name@
265 psdir = @psdir@
266 sbindir = @sbindir@
267 sharedstatedir = @sharedstatedir@
268 srcdir = @srcdir@
269 sysconfdir = @sysconfdir@
270 target_alias = @target_alias@
271 top_build_prefix = @top_build_prefix@
272 top_builddir = @top_builddir@
273 top_srcdir = @top_srcdir@
274 NULL =
275 TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions
276 REALMD_CONFIGS = \
277 realmd-defaults.conf \
278 realmd-redhat.conf
279
280 servicedir = $(SERVICE_DIR)
281 service_DATA = \
282 net-ads-smb.conf \
283 realmd-defaults.conf
284
285 providerdir = $(SERVICE_DIR)/provider.d
286 provider_DATA = \
287 org.freedesktop.realmd.Samba.provider
288
289 polkit_policydir = $(POLKIT_ACTION_DIR)
290 polkit_policy_in_files = org.freedesktop.realmd.policy.in
291 polkit_policy_DATA = $(polkit_policy_in_files:.policy.in=.policy)
292 realmd_SOURCES = \
293 realm-ad-discover.c realm-ad-discover.h \
294 realm-all-provider.c realm-all-provider.h \
295 realm-command.c realm-command.h \
296 realm-daemon.c realm-daemon.h \
297 realm-debug.c realm-debug.h \
298 realm-diagnostics.c realm-diagnostics.h \
299 realm-discovery.c realm-discovery.h \
300 realm-errors.c realm-errors.h \
301 realm-ini-config.c realm-ini-config.h \
302 realm-kerberos.c realm-kerberos.h \
303 realm-network.c realm-network.h \
304 realm-packages.c realm-packages.h \
305 realm-provider.c realm-provider.h \
306 realm-samba.c realm-samba.h \
307 realm-samba-config.c realm-samba-config.h \
308 realm-samba-enroll.c realm-samba-enroll.h \
309 realm-samba-provider.c realm-samba-provider.h \
310 realm-samba-winbind.c realm-samba-winbind.h \
311 realm-service.c realm-service.h \
312 realm-service-systemd.c realm-service-systemd.h \
313 realm-service-upstart.c realm-service-upstart.h \
314 realm-settings.c realm-settings.h \
315 $(NULL)
316
317 realmd_CFLAGS = \
318 -I$(top_srcdir)/dbus \
319 -I$(top_builddir)/dbus \
320 -DSERVICE_DIR="\"$(servicedir)\"" \
321 -DSYSCONF_DIR="\"$(sysconfdir)\"" \
322 -DPROVIDER_DIR="\"$(providerdir)\"" \
323 $(PACKAGEKIT_CFLAGS) \
324 $(POLKIT_CFLAGS) \
325 $(GLIB_CFLAGS) \
326 $(KRB5_CFLAGS) \
327 $(NULL)
328
329 realmd_LDADD = \
330 $(top_builddir)/dbus/librealm-dbus.a \
331 $(PACKAGEKIT_LIBS) \
332 $(POLKIT_LIBS) \
333 $(GLIB_LIBS) \
334 $(KRB5_LIBS) \
335 $(NULL)
336
337
338 # ------------------------------------------------------------------
339 EXTRA_DIST = \
340 $(polkit_policy_in_files) \
341 $(REALMD_CONFIGS) \
342 $(service_DATA) \
343 $(provider_DATA) \
344 $(NULL)
345
346 CLEANFILES = \
347 $(polkit_policy_DATA) \
348 *.gcno \
349 *.gcda \
350 $(NULL)
351
352 DISTCLEANFILES = \
353 $(BUILT_SOURCES) \
354 $(NULL)
355
356 all: all-am
357
358 .SUFFIXES:
359 .SUFFIXES: .c .o .obj
360 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps)
361 @for dep in $?; do \
362 case '$(am__configure_deps)' in \
363 *$$dep*) \
364 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
365 && { if test -f $@; then exit 0; else break; fi; }; \
366 exit 1;; \
367 esac; \
368 done; \
369 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign service/Makefile'; \
370 $(am__cd) $(top_srcdir) && \
371 $(AUTOMAKE) --foreign service/Makefile
372 .PRECIOUS: Makefile
373 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
374 @case '$?' in \
375 *config.status*) \
376 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
377 *) \
378 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
379 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
380 esac;
381 $(top_srcdir)/Makefile.decl:
382
383 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
384 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
385
386 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
387 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
388 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
389 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
390 $(am__aclocal_m4_deps):
391 install-servicePROGRAMS: $(service_PROGRAMS)
392 @$(NORMAL_INSTALL)
393 test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)"
394 @list='$(service_PROGRAMS)'; test -n "$(servicedir)" || list=; \
395 for p in $$list; do echo "$$p $$p"; done | \
396 sed 's/$(EXEEXT)$$//' | \
397 while read p p1; do if test -f $$p; \
398 then echo "$$p"; echo "$$p"; else :; fi; \
399 done | \
400 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
401 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
402 sed 'N;N;N;s,\n, ,g' | \
403 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
404 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
405 if ($$2 == $$4) files[d] = files[d] " " $$1; \
406 else { print "f", $$3 "/" $$4, $$1; } } \
407 END { for (d in files) print "f", d, files[d] }' | \
408 while read type dir files; do \
409 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
410 test -z "$$files" || { \
411 echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(servicedir)$$dir'"; \
412 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(servicedir)$$dir" || exit $$?; \
413 } \
414 ; done
415
416 uninstall-servicePROGRAMS:
417 @$(NORMAL_UNINSTALL)
418 @list='$(service_PROGRAMS)'; test -n "$(servicedir)" || list=; \
419 files=`for p in $$list; do echo "$$p"; done | \
420 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
421 -e 's/$$/$(EXEEXT)/' `; \
422 test -n "$$list" || exit 0; \
423 echo " ( cd '$(DESTDIR)$(servicedir)' && rm -f" $$files ")"; \
424 cd "$(DESTDIR)$(servicedir)" && rm -f $$files
425
426 clean-servicePROGRAMS:
427 -test -z "$(service_PROGRAMS)" || rm -f $(service_PROGRAMS)
428 realmd$(EXEEXT): $(realmd_OBJECTS) $(realmd_DEPENDENCIES) $(EXTRA_realmd_DEPENDENCIES)
429 @rm -f realmd$(EXEEXT)
430 $(AM_V_CCLD)$(realmd_LINK) $(realmd_OBJECTS) $(realmd_LDADD) $(LIBS)
431
432 mostlyclean-compile:
433 -rm -f *.$(OBJEXT)
434
435 distclean-compile:
436 -rm -f *.tab.c
437
438 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-ad-discover.Po@am__quote@
439 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-all-provider.Po@am__quote@
440 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-command.Po@am__quote@
441 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-daemon.Po@am__quote@
442 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-debug.Po@am__quote@
443 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-diagnostics.Po@am__quote@
444 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-discovery.Po@am__quote@
445 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-errors.Po@am__quote@
446 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-ini-config.Po@am__quote@
447 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-kerberos.Po@am__quote@
448 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-network.Po@am__quote@
449 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-packages.Po@am__quote@
450 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-provider.Po@am__quote@
451 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-samba-config.Po@am__quote@
452 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-samba-enroll.Po@am__quote@
453 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-samba-provider.Po@am__quote@
454 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-samba-winbind.Po@am__quote@
455 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-samba.Po@am__quote@
456 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-service-systemd.Po@am__quote@
457 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-service-upstart.Po@am__quote@
458 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-service.Po@am__quote@
459 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realmd-realm-settings.Po@am__quote@
460
461 .c.o:
462 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
463 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
464 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
465 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
466 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
467
468 .c.obj:
469 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
470 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
471 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
472 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
473 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
474
475 realmd-realm-ad-discover.o: realm-ad-discover.c
476 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-ad-discover.o -MD -MP -MF $(DEPDIR)/realmd-realm-ad-discover.Tpo -c -o realmd-realm-ad-discover.o `test -f 'realm-ad-discover.c' || echo '$(srcdir)/'`realm-ad-discover.c
477 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-ad-discover.Tpo $(DEPDIR)/realmd-realm-ad-discover.Po
478 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-ad-discover.c' object='realmd-realm-ad-discover.o' libtool=no @AMDEPBACKSLASH@
479 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
480 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-ad-discover.o `test -f 'realm-ad-discover.c' || echo '$(srcdir)/'`realm-ad-discover.c
481
482 realmd-realm-ad-discover.obj: realm-ad-discover.c
483 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-ad-discover.obj -MD -MP -MF $(DEPDIR)/realmd-realm-ad-discover.Tpo -c -o realmd-realm-ad-discover.obj `if test -f 'realm-ad-discover.c'; then $(CYGPATH_W) 'realm-ad-discover.c'; else $(CYGPATH_W) '$(srcdir)/realm-ad-discover.c'; fi`
484 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-ad-discover.Tpo $(DEPDIR)/realmd-realm-ad-discover.Po
485 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-ad-discover.c' object='realmd-realm-ad-discover.obj' libtool=no @AMDEPBACKSLASH@
486 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
487 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-ad-discover.obj `if test -f 'realm-ad-discover.c'; then $(CYGPATH_W) 'realm-ad-discover.c'; else $(CYGPATH_W) '$(srcdir)/realm-ad-discover.c'; fi`
488
489 realmd-realm-all-provider.o: realm-all-provider.c
490 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-all-provider.o -MD -MP -MF $(DEPDIR)/realmd-realm-all-provider.Tpo -c -o realmd-realm-all-provider.o `test -f 'realm-all-provider.c' || echo '$(srcdir)/'`realm-all-provider.c
491 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-all-provider.Tpo $(DEPDIR)/realmd-realm-all-provider.Po
492 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-all-provider.c' object='realmd-realm-all-provider.o' libtool=no @AMDEPBACKSLASH@
493 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
494 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-all-provider.o `test -f 'realm-all-provider.c' || echo '$(srcdir)/'`realm-all-provider.c
495
496 realmd-realm-all-provider.obj: realm-all-provider.c
497 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-all-provider.obj -MD -MP -MF $(DEPDIR)/realmd-realm-all-provider.Tpo -c -o realmd-realm-all-provider.obj `if test -f 'realm-all-provider.c'; then $(CYGPATH_W) 'realm-all-provider.c'; else $(CYGPATH_W) '$(srcdir)/realm-all-provider.c'; fi`
498 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-all-provider.Tpo $(DEPDIR)/realmd-realm-all-provider.Po
499 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-all-provider.c' object='realmd-realm-all-provider.obj' libtool=no @AMDEPBACKSLASH@
500 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
501 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-all-provider.obj `if test -f 'realm-all-provider.c'; then $(CYGPATH_W) 'realm-all-provider.c'; else $(CYGPATH_W) '$(srcdir)/realm-all-provider.c'; fi`
502
503 realmd-realm-command.o: realm-command.c
504 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-command.o -MD -MP -MF $(DEPDIR)/realmd-realm-command.Tpo -c -o realmd-realm-command.o `test -f 'realm-command.c' || echo '$(srcdir)/'`realm-command.c
505 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-command.Tpo $(DEPDIR)/realmd-realm-command.Po
506 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-command.c' object='realmd-realm-command.o' libtool=no @AMDEPBACKSLASH@
507 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
508 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-command.o `test -f 'realm-command.c' || echo '$(srcdir)/'`realm-command.c
509
510 realmd-realm-command.obj: realm-command.c
511 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-command.obj -MD -MP -MF $(DEPDIR)/realmd-realm-command.Tpo -c -o realmd-realm-command.obj `if test -f 'realm-command.c'; then $(CYGPATH_W) 'realm-command.c'; else $(CYGPATH_W) '$(srcdir)/realm-command.c'; fi`
512 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-command.Tpo $(DEPDIR)/realmd-realm-command.Po
513 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-command.c' object='realmd-realm-command.obj' libtool=no @AMDEPBACKSLASH@
514 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
515 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-command.obj `if test -f 'realm-command.c'; then $(CYGPATH_W) 'realm-command.c'; else $(CYGPATH_W) '$(srcdir)/realm-command.c'; fi`
516
517 realmd-realm-daemon.o: realm-daemon.c
518 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-daemon.o -MD -MP -MF $(DEPDIR)/realmd-realm-daemon.Tpo -c -o realmd-realm-daemon.o `test -f 'realm-daemon.c' || echo '$(srcdir)/'`realm-daemon.c
519 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-daemon.Tpo $(DEPDIR)/realmd-realm-daemon.Po
520 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-daemon.c' object='realmd-realm-daemon.o' libtool=no @AMDEPBACKSLASH@
521 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
522 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-daemon.o `test -f 'realm-daemon.c' || echo '$(srcdir)/'`realm-daemon.c
523
524 realmd-realm-daemon.obj: realm-daemon.c
525 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-daemon.obj -MD -MP -MF $(DEPDIR)/realmd-realm-daemon.Tpo -c -o realmd-realm-daemon.obj `if test -f 'realm-daemon.c'; then $(CYGPATH_W) 'realm-daemon.c'; else $(CYGPATH_W) '$(srcdir)/realm-daemon.c'; fi`
526 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-daemon.Tpo $(DEPDIR)/realmd-realm-daemon.Po
527 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-daemon.c' object='realmd-realm-daemon.obj' libtool=no @AMDEPBACKSLASH@
528 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
529 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-daemon.obj `if test -f 'realm-daemon.c'; then $(CYGPATH_W) 'realm-daemon.c'; else $(CYGPATH_W) '$(srcdir)/realm-daemon.c'; fi`
530
531 realmd-realm-debug.o: realm-debug.c
532 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-debug.o -MD -MP -MF $(DEPDIR)/realmd-realm-debug.Tpo -c -o realmd-realm-debug.o `test -f 'realm-debug.c' || echo '$(srcdir)/'`realm-debug.c
533 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-debug.Tpo $(DEPDIR)/realmd-realm-debug.Po
534 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-debug.c' object='realmd-realm-debug.o' libtool=no @AMDEPBACKSLASH@
535 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
536 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-debug.o `test -f 'realm-debug.c' || echo '$(srcdir)/'`realm-debug.c
537
538 realmd-realm-debug.obj: realm-debug.c
539 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-debug.obj -MD -MP -MF $(DEPDIR)/realmd-realm-debug.Tpo -c -o realmd-realm-debug.obj `if test -f 'realm-debug.c'; then $(CYGPATH_W) 'realm-debug.c'; else $(CYGPATH_W) '$(srcdir)/realm-debug.c'; fi`
540 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-debug.Tpo $(DEPDIR)/realmd-realm-debug.Po
541 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-debug.c' object='realmd-realm-debug.obj' libtool=no @AMDEPBACKSLASH@
542 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
543 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-debug.obj `if test -f 'realm-debug.c'; then $(CYGPATH_W) 'realm-debug.c'; else $(CYGPATH_W) '$(srcdir)/realm-debug.c'; fi`
544
545 realmd-realm-diagnostics.o: realm-diagnostics.c
546 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-diagnostics.o -MD -MP -MF $(DEPDIR)/realmd-realm-diagnostics.Tpo -c -o realmd-realm-diagnostics.o `test -f 'realm-diagnostics.c' || echo '$(srcdir)/'`realm-diagnostics.c
547 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-diagnostics.Tpo $(DEPDIR)/realmd-realm-diagnostics.Po
548 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-diagnostics.c' object='realmd-realm-diagnostics.o' libtool=no @AMDEPBACKSLASH@
549 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
550 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-diagnostics.o `test -f 'realm-diagnostics.c' || echo '$(srcdir)/'`realm-diagnostics.c
551
552 realmd-realm-diagnostics.obj: realm-diagnostics.c
553 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-diagnostics.obj -MD -MP -MF $(DEPDIR)/realmd-realm-diagnostics.Tpo -c -o realmd-realm-diagnostics.obj `if test -f 'realm-diagnostics.c'; then $(CYGPATH_W) 'realm-diagnostics.c'; else $(CYGPATH_W) '$(srcdir)/realm-diagnostics.c'; fi`
554 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-diagnostics.Tpo $(DEPDIR)/realmd-realm-diagnostics.Po
555 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-diagnostics.c' object='realmd-realm-diagnostics.obj' libtool=no @AMDEPBACKSLASH@
556 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
557 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-diagnostics.obj `if test -f 'realm-diagnostics.c'; then $(CYGPATH_W) 'realm-diagnostics.c'; else $(CYGPATH_W) '$(srcdir)/realm-diagnostics.c'; fi`
558
559 realmd-realm-discovery.o: realm-discovery.c
560 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-discovery.o -MD -MP -MF $(DEPDIR)/realmd-realm-discovery.Tpo -c -o realmd-realm-discovery.o `test -f 'realm-discovery.c' || echo '$(srcdir)/'`realm-discovery.c
561 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-discovery.Tpo $(DEPDIR)/realmd-realm-discovery.Po
562 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-discovery.c' object='realmd-realm-discovery.o' libtool=no @AMDEPBACKSLASH@
563 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
564 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-discovery.o `test -f 'realm-discovery.c' || echo '$(srcdir)/'`realm-discovery.c
565
566 realmd-realm-discovery.obj: realm-discovery.c
567 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-discovery.obj -MD -MP -MF $(DEPDIR)/realmd-realm-discovery.Tpo -c -o realmd-realm-discovery.obj `if test -f 'realm-discovery.c'; then $(CYGPATH_W) 'realm-discovery.c'; else $(CYGPATH_W) '$(srcdir)/realm-discovery.c'; fi`
568 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-discovery.Tpo $(DEPDIR)/realmd-realm-discovery.Po
569 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-discovery.c' object='realmd-realm-discovery.obj' libtool=no @AMDEPBACKSLASH@
570 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
571 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-discovery.obj `if test -f 'realm-discovery.c'; then $(CYGPATH_W) 'realm-discovery.c'; else $(CYGPATH_W) '$(srcdir)/realm-discovery.c'; fi`
572
573 realmd-realm-errors.o: realm-errors.c
574 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-errors.o -MD -MP -MF $(DEPDIR)/realmd-realm-errors.Tpo -c -o realmd-realm-errors.o `test -f 'realm-errors.c' || echo '$(srcdir)/'`realm-errors.c
575 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-errors.Tpo $(DEPDIR)/realmd-realm-errors.Po
576 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-errors.c' object='realmd-realm-errors.o' libtool=no @AMDEPBACKSLASH@
577 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
578 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-errors.o `test -f 'realm-errors.c' || echo '$(srcdir)/'`realm-errors.c
579
580 realmd-realm-errors.obj: realm-errors.c
581 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-errors.obj -MD -MP -MF $(DEPDIR)/realmd-realm-errors.Tpo -c -o realmd-realm-errors.obj `if test -f 'realm-errors.c'; then $(CYGPATH_W) 'realm-errors.c'; else $(CYGPATH_W) '$(srcdir)/realm-errors.c'; fi`
582 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-errors.Tpo $(DEPDIR)/realmd-realm-errors.Po
583 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-errors.c' object='realmd-realm-errors.obj' libtool=no @AMDEPBACKSLASH@
584 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
585 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-errors.obj `if test -f 'realm-errors.c'; then $(CYGPATH_W) 'realm-errors.c'; else $(CYGPATH_W) '$(srcdir)/realm-errors.c'; fi`
586
587 realmd-realm-ini-config.o: realm-ini-config.c
588 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-ini-config.o -MD -MP -MF $(DEPDIR)/realmd-realm-ini-config.Tpo -c -o realmd-realm-ini-config.o `test -f 'realm-ini-config.c' || echo '$(srcdir)/'`realm-ini-config.c
589 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-ini-config.Tpo $(DEPDIR)/realmd-realm-ini-config.Po
590 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-ini-config.c' object='realmd-realm-ini-config.o' libtool=no @AMDEPBACKSLASH@
591 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
592 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-ini-config.o `test -f 'realm-ini-config.c' || echo '$(srcdir)/'`realm-ini-config.c
593
594 realmd-realm-ini-config.obj: realm-ini-config.c
595 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-ini-config.obj -MD -MP -MF $(DEPDIR)/realmd-realm-ini-config.Tpo -c -o realmd-realm-ini-config.obj `if test -f 'realm-ini-config.c'; then $(CYGPATH_W) 'realm-ini-config.c'; else $(CYGPATH_W) '$(srcdir)/realm-ini-config.c'; fi`
596 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-ini-config.Tpo $(DEPDIR)/realmd-realm-ini-config.Po
597 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-ini-config.c' object='realmd-realm-ini-config.obj' libtool=no @AMDEPBACKSLASH@
598 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
599 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-ini-config.obj `if test -f 'realm-ini-config.c'; then $(CYGPATH_W) 'realm-ini-config.c'; else $(CYGPATH_W) '$(srcdir)/realm-ini-config.c'; fi`
600
601 realmd-realm-kerberos.o: realm-kerberos.c
602 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-kerberos.o -MD -MP -MF $(DEPDIR)/realmd-realm-kerberos.Tpo -c -o realmd-realm-kerberos.o `test -f 'realm-kerberos.c' || echo '$(srcdir)/'`realm-kerberos.c
603 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-kerberos.Tpo $(DEPDIR)/realmd-realm-kerberos.Po
604 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-kerberos.c' object='realmd-realm-kerberos.o' libtool=no @AMDEPBACKSLASH@
605 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
606 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-kerberos.o `test -f 'realm-kerberos.c' || echo '$(srcdir)/'`realm-kerberos.c
607
608 realmd-realm-kerberos.obj: realm-kerberos.c
609 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-kerberos.obj -MD -MP -MF $(DEPDIR)/realmd-realm-kerberos.Tpo -c -o realmd-realm-kerberos.obj `if test -f 'realm-kerberos.c'; then $(CYGPATH_W) 'realm-kerberos.c'; else $(CYGPATH_W) '$(srcdir)/realm-kerberos.c'; fi`
610 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-kerberos.Tpo $(DEPDIR)/realmd-realm-kerberos.Po
611 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-kerberos.c' object='realmd-realm-kerberos.obj' libtool=no @AMDEPBACKSLASH@
612 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
613 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-kerberos.obj `if test -f 'realm-kerberos.c'; then $(CYGPATH_W) 'realm-kerberos.c'; else $(CYGPATH_W) '$(srcdir)/realm-kerberos.c'; fi`
614
615 realmd-realm-network.o: realm-network.c
616 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-network.o -MD -MP -MF $(DEPDIR)/realmd-realm-network.Tpo -c -o realmd-realm-network.o `test -f 'realm-network.c' || echo '$(srcdir)/'`realm-network.c
617 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-network.Tpo $(DEPDIR)/realmd-realm-network.Po
618 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-network.c' object='realmd-realm-network.o' libtool=no @AMDEPBACKSLASH@
619 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
620 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-network.o `test -f 'realm-network.c' || echo '$(srcdir)/'`realm-network.c
621
622 realmd-realm-network.obj: realm-network.c
623 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-network.obj -MD -MP -MF $(DEPDIR)/realmd-realm-network.Tpo -c -o realmd-realm-network.obj `if test -f 'realm-network.c'; then $(CYGPATH_W) 'realm-network.c'; else $(CYGPATH_W) '$(srcdir)/realm-network.c'; fi`
624 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-network.Tpo $(DEPDIR)/realmd-realm-network.Po
625 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-network.c' object='realmd-realm-network.obj' libtool=no @AMDEPBACKSLASH@
626 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
627 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-network.obj `if test -f 'realm-network.c'; then $(CYGPATH_W) 'realm-network.c'; else $(CYGPATH_W) '$(srcdir)/realm-network.c'; fi`
628
629 realmd-realm-packages.o: realm-packages.c
630 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-packages.o -MD -MP -MF $(DEPDIR)/realmd-realm-packages.Tpo -c -o realmd-realm-packages.o `test -f 'realm-packages.c' || echo '$(srcdir)/'`realm-packages.c
631 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-packages.Tpo $(DEPDIR)/realmd-realm-packages.Po
632 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-packages.c' object='realmd-realm-packages.o' libtool=no @AMDEPBACKSLASH@
633 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
634 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-packages.o `test -f 'realm-packages.c' || echo '$(srcdir)/'`realm-packages.c
635
636 realmd-realm-packages.obj: realm-packages.c
637 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-packages.obj -MD -MP -MF $(DEPDIR)/realmd-realm-packages.Tpo -c -o realmd-realm-packages.obj `if test -f 'realm-packages.c'; then $(CYGPATH_W) 'realm-packages.c'; else $(CYGPATH_W) '$(srcdir)/realm-packages.c'; fi`
638 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-packages.Tpo $(DEPDIR)/realmd-realm-packages.Po
639 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-packages.c' object='realmd-realm-packages.obj' libtool=no @AMDEPBACKSLASH@
640 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
641 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-packages.obj `if test -f 'realm-packages.c'; then $(CYGPATH_W) 'realm-packages.c'; else $(CYGPATH_W) '$(srcdir)/realm-packages.c'; fi`
642
643 realmd-realm-provider.o: realm-provider.c
644 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-provider.o -MD -MP -MF $(DEPDIR)/realmd-realm-provider.Tpo -c -o realmd-realm-provider.o `test -f 'realm-provider.c' || echo '$(srcdir)/'`realm-provider.c
645 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-provider.Tpo $(DEPDIR)/realmd-realm-provider.Po
646 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-provider.c' object='realmd-realm-provider.o' libtool=no @AMDEPBACKSLASH@
647 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
648 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-provider.o `test -f 'realm-provider.c' || echo '$(srcdir)/'`realm-provider.c
649
650 realmd-realm-provider.obj: realm-provider.c
651 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-provider.obj -MD -MP -MF $(DEPDIR)/realmd-realm-provider.Tpo -c -o realmd-realm-provider.obj `if test -f 'realm-provider.c'; then $(CYGPATH_W) 'realm-provider.c'; else $(CYGPATH_W) '$(srcdir)/realm-provider.c'; fi`
652 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-provider.Tpo $(DEPDIR)/realmd-realm-provider.Po
653 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-provider.c' object='realmd-realm-provider.obj' libtool=no @AMDEPBACKSLASH@
654 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
655 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-provider.obj `if test -f 'realm-provider.c'; then $(CYGPATH_W) 'realm-provider.c'; else $(CYGPATH_W) '$(srcdir)/realm-provider.c'; fi`
656
657 realmd-realm-samba.o: realm-samba.c
658 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-samba.o -MD -MP -MF $(DEPDIR)/realmd-realm-samba.Tpo -c -o realmd-realm-samba.o `test -f 'realm-samba.c' || echo '$(srcdir)/'`realm-samba.c
659 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-samba.Tpo $(DEPDIR)/realmd-realm-samba.Po
660 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-samba.c' object='realmd-realm-samba.o' libtool=no @AMDEPBACKSLASH@
661 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
662 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-samba.o `test -f 'realm-samba.c' || echo '$(srcdir)/'`realm-samba.c
663
664 realmd-realm-samba.obj: realm-samba.c
665 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-samba.obj -MD -MP -MF $(DEPDIR)/realmd-realm-samba.Tpo -c -o realmd-realm-samba.obj `if test -f 'realm-samba.c'; then $(CYGPATH_W) 'realm-samba.c'; else $(CYGPATH_W) '$(srcdir)/realm-samba.c'; fi`
666 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-samba.Tpo $(DEPDIR)/realmd-realm-samba.Po
667 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-samba.c' object='realmd-realm-samba.obj' libtool=no @AMDEPBACKSLASH@
668 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
669 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-samba.obj `if test -f 'realm-samba.c'; then $(CYGPATH_W) 'realm-samba.c'; else $(CYGPATH_W) '$(srcdir)/realm-samba.c'; fi`
670
671 realmd-realm-samba-config.o: realm-samba-config.c
672 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-samba-config.o -MD -MP -MF $(DEPDIR)/realmd-realm-samba-config.Tpo -c -o realmd-realm-samba-config.o `test -f 'realm-samba-config.c' || echo '$(srcdir)/'`realm-samba-config.c
673 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-samba-config.Tpo $(DEPDIR)/realmd-realm-samba-config.Po
674 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-samba-config.c' object='realmd-realm-samba-config.o' libtool=no @AMDEPBACKSLASH@
675 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
676 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-samba-config.o `test -f 'realm-samba-config.c' || echo '$(srcdir)/'`realm-samba-config.c
677
678 realmd-realm-samba-config.obj: realm-samba-config.c
679 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-samba-config.obj -MD -MP -MF $(DEPDIR)/realmd-realm-samba-config.Tpo -c -o realmd-realm-samba-config.obj `if test -f 'realm-samba-config.c'; then $(CYGPATH_W) 'realm-samba-config.c'; else $(CYGPATH_W) '$(srcdir)/realm-samba-config.c'; fi`
680 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-samba-config.Tpo $(DEPDIR)/realmd-realm-samba-config.Po
681 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-samba-config.c' object='realmd-realm-samba-config.obj' libtool=no @AMDEPBACKSLASH@
682 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
683 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-samba-config.obj `if test -f 'realm-samba-config.c'; then $(CYGPATH_W) 'realm-samba-config.c'; else $(CYGPATH_W) '$(srcdir)/realm-samba-config.c'; fi`
684
685 realmd-realm-samba-enroll.o: realm-samba-enroll.c
686 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-samba-enroll.o -MD -MP -MF $(DEPDIR)/realmd-realm-samba-enroll.Tpo -c -o realmd-realm-samba-enroll.o `test -f 'realm-samba-enroll.c' || echo '$(srcdir)/'`realm-samba-enroll.c
687 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-samba-enroll.Tpo $(DEPDIR)/realmd-realm-samba-enroll.Po
688 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-samba-enroll.c' object='realmd-realm-samba-enroll.o' libtool=no @AMDEPBACKSLASH@
689 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
690 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-samba-enroll.o `test -f 'realm-samba-enroll.c' || echo '$(srcdir)/'`realm-samba-enroll.c
691
692 realmd-realm-samba-enroll.obj: realm-samba-enroll.c
693 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-samba-enroll.obj -MD -MP -MF $(DEPDIR)/realmd-realm-samba-enroll.Tpo -c -o realmd-realm-samba-enroll.obj `if test -f 'realm-samba-enroll.c'; then $(CYGPATH_W) 'realm-samba-enroll.c'; else $(CYGPATH_W) '$(srcdir)/realm-samba-enroll.c'; fi`
694 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-samba-enroll.Tpo $(DEPDIR)/realmd-realm-samba-enroll.Po
695 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-samba-enroll.c' object='realmd-realm-samba-enroll.obj' libtool=no @AMDEPBACKSLASH@
696 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
697 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-samba-enroll.obj `if test -f 'realm-samba-enroll.c'; then $(CYGPATH_W) 'realm-samba-enroll.c'; else $(CYGPATH_W) '$(srcdir)/realm-samba-enroll.c'; fi`
698
699 realmd-realm-samba-provider.o: realm-samba-provider.c
700 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-samba-provider.o -MD -MP -MF $(DEPDIR)/realmd-realm-samba-provider.Tpo -c -o realmd-realm-samba-provider.o `test -f 'realm-samba-provider.c' || echo '$(srcdir)/'`realm-samba-provider.c
701 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-samba-provider.Tpo $(DEPDIR)/realmd-realm-samba-provider.Po
702 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-samba-provider.c' object='realmd-realm-samba-provider.o' libtool=no @AMDEPBACKSLASH@
703 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
704 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-samba-provider.o `test -f 'realm-samba-provider.c' || echo '$(srcdir)/'`realm-samba-provider.c
705
706 realmd-realm-samba-provider.obj: realm-samba-provider.c
707 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-samba-provider.obj -MD -MP -MF $(DEPDIR)/realmd-realm-samba-provider.Tpo -c -o realmd-realm-samba-provider.obj `if test -f 'realm-samba-provider.c'; then $(CYGPATH_W) 'realm-samba-provider.c'; else $(CYGPATH_W) '$(srcdir)/realm-samba-provider.c'; fi`
708 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-samba-provider.Tpo $(DEPDIR)/realmd-realm-samba-provider.Po
709 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-samba-provider.c' object='realmd-realm-samba-provider.obj' libtool=no @AMDEPBACKSLASH@
710 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
711 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-samba-provider.obj `if test -f 'realm-samba-provider.c'; then $(CYGPATH_W) 'realm-samba-provider.c'; else $(CYGPATH_W) '$(srcdir)/realm-samba-provider.c'; fi`
712
713 realmd-realm-samba-winbind.o: realm-samba-winbind.c
714 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-samba-winbind.o -MD -MP -MF $(DEPDIR)/realmd-realm-samba-winbind.Tpo -c -o realmd-realm-samba-winbind.o `test -f 'realm-samba-winbind.c' || echo '$(srcdir)/'`realm-samba-winbind.c
715 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-samba-winbind.Tpo $(DEPDIR)/realmd-realm-samba-winbind.Po
716 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-samba-winbind.c' object='realmd-realm-samba-winbind.o' libtool=no @AMDEPBACKSLASH@
717 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
718 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-samba-winbind.o `test -f 'realm-samba-winbind.c' || echo '$(srcdir)/'`realm-samba-winbind.c
719
720 realmd-realm-samba-winbind.obj: realm-samba-winbind.c
721 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-samba-winbind.obj -MD -MP -MF $(DEPDIR)/realmd-realm-samba-winbind.Tpo -c -o realmd-realm-samba-winbind.obj `if test -f 'realm-samba-winbind.c'; then $(CYGPATH_W) 'realm-samba-winbind.c'; else $(CYGPATH_W) '$(srcdir)/realm-samba-winbind.c'; fi`
722 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-samba-winbind.Tpo $(DEPDIR)/realmd-realm-samba-winbind.Po
723 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-samba-winbind.c' object='realmd-realm-samba-winbind.obj' libtool=no @AMDEPBACKSLASH@
724 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
725 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-samba-winbind.obj `if test -f 'realm-samba-winbind.c'; then $(CYGPATH_W) 'realm-samba-winbind.c'; else $(CYGPATH_W) '$(srcdir)/realm-samba-winbind.c'; fi`
726
727 realmd-realm-service.o: realm-service.c
728 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-service.o -MD -MP -MF $(DEPDIR)/realmd-realm-service.Tpo -c -o realmd-realm-service.o `test -f 'realm-service.c' || echo '$(srcdir)/'`realm-service.c
729 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-service.Tpo $(DEPDIR)/realmd-realm-service.Po
730 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-service.c' object='realmd-realm-service.o' libtool=no @AMDEPBACKSLASH@
731 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
732 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-service.o `test -f 'realm-service.c' || echo '$(srcdir)/'`realm-service.c
733
734 realmd-realm-service.obj: realm-service.c
735 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-service.obj -MD -MP -MF $(DEPDIR)/realmd-realm-service.Tpo -c -o realmd-realm-service.obj `if test -f 'realm-service.c'; then $(CYGPATH_W) 'realm-service.c'; else $(CYGPATH_W) '$(srcdir)/realm-service.c'; fi`
736 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-service.Tpo $(DEPDIR)/realmd-realm-service.Po
737 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-service.c' object='realmd-realm-service.obj' libtool=no @AMDEPBACKSLASH@
738 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
739 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-service.obj `if test -f 'realm-service.c'; then $(CYGPATH_W) 'realm-service.c'; else $(CYGPATH_W) '$(srcdir)/realm-service.c'; fi`
740
741 realmd-realm-service-systemd.o: realm-service-systemd.c
742 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-service-systemd.o -MD -MP -MF $(DEPDIR)/realmd-realm-service-systemd.Tpo -c -o realmd-realm-service-systemd.o `test -f 'realm-service-systemd.c' || echo '$(srcdir)/'`realm-service-systemd.c
743 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-service-systemd.Tpo $(DEPDIR)/realmd-realm-service-systemd.Po
744 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-service-systemd.c' object='realmd-realm-service-systemd.o' libtool=no @AMDEPBACKSLASH@
745 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
746 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-service-systemd.o `test -f 'realm-service-systemd.c' || echo '$(srcdir)/'`realm-service-systemd.c
747
748 realmd-realm-service-systemd.obj: realm-service-systemd.c
749 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-service-systemd.obj -MD -MP -MF $(DEPDIR)/realmd-realm-service-systemd.Tpo -c -o realmd-realm-service-systemd.obj `if test -f 'realm-service-systemd.c'; then $(CYGPATH_W) 'realm-service-systemd.c'; else $(CYGPATH_W) '$(srcdir)/realm-service-systemd.c'; fi`
750 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-service-systemd.Tpo $(DEPDIR)/realmd-realm-service-systemd.Po
751 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-service-systemd.c' object='realmd-realm-service-systemd.obj' libtool=no @AMDEPBACKSLASH@
752 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
753 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-service-systemd.obj `if test -f 'realm-service-systemd.c'; then $(CYGPATH_W) 'realm-service-systemd.c'; else $(CYGPATH_W) '$(srcdir)/realm-service-systemd.c'; fi`
754
755 realmd-realm-service-upstart.o: realm-service-upstart.c
756 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-service-upstart.o -MD -MP -MF $(DEPDIR)/realmd-realm-service-upstart.Tpo -c -o realmd-realm-service-upstart.o `test -f 'realm-service-upstart.c' || echo '$(srcdir)/'`realm-service-upstart.c
757 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-service-upstart.Tpo $(DEPDIR)/realmd-realm-service-upstart.Po
758 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-service-upstart.c' object='realmd-realm-service-upstart.o' libtool=no @AMDEPBACKSLASH@
759 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
760 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-service-upstart.o `test -f 'realm-service-upstart.c' || echo '$(srcdir)/'`realm-service-upstart.c
761
762 realmd-realm-service-upstart.obj: realm-service-upstart.c
763 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-service-upstart.obj -MD -MP -MF $(DEPDIR)/realmd-realm-service-upstart.Tpo -c -o realmd-realm-service-upstart.obj `if test -f 'realm-service-upstart.c'; then $(CYGPATH_W) 'realm-service-upstart.c'; else $(CYGPATH_W) '$(srcdir)/realm-service-upstart.c'; fi`
764 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-service-upstart.Tpo $(DEPDIR)/realmd-realm-service-upstart.Po
765 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-service-upstart.c' object='realmd-realm-service-upstart.obj' libtool=no @AMDEPBACKSLASH@
766 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
767 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-service-upstart.obj `if test -f 'realm-service-upstart.c'; then $(CYGPATH_W) 'realm-service-upstart.c'; else $(CYGPATH_W) '$(srcdir)/realm-service-upstart.c'; fi`
768
769 realmd-realm-settings.o: realm-settings.c
770 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-settings.o -MD -MP -MF $(DEPDIR)/realmd-realm-settings.Tpo -c -o realmd-realm-settings.o `test -f 'realm-settings.c' || echo '$(srcdir)/'`realm-settings.c
771 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-settings.Tpo $(DEPDIR)/realmd-realm-settings.Po
772 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-settings.c' object='realmd-realm-settings.o' libtool=no @AMDEPBACKSLASH@
773 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
774 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-settings.o `test -f 'realm-settings.c' || echo '$(srcdir)/'`realm-settings.c
775
776 realmd-realm-settings.obj: realm-settings.c
777 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -MT realmd-realm-settings.obj -MD -MP -MF $(DEPDIR)/realmd-realm-settings.Tpo -c -o realmd-realm-settings.obj `if test -f 'realm-settings.c'; then $(CYGPATH_W) 'realm-settings.c'; else $(CYGPATH_W) '$(srcdir)/realm-settings.c'; fi`
778 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realmd-realm-settings.Tpo $(DEPDIR)/realmd-realm-settings.Po
779 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-settings.c' object='realmd-realm-settings.obj' libtool=no @AMDEPBACKSLASH@
780 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
781 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realmd_CFLAGS) $(CFLAGS) -c -o realmd-realm-settings.obj `if test -f 'realm-settings.c'; then $(CYGPATH_W) 'realm-settings.c'; else $(CYGPATH_W) '$(srcdir)/realm-settings.c'; fi`
782 install-polkit_policyDATA: $(polkit_policy_DATA)
783 @$(NORMAL_INSTALL)
784 test -z "$(polkit_policydir)" || $(MKDIR_P) "$(DESTDIR)$(polkit_policydir)"
785 @list='$(polkit_policy_DATA)'; test -n "$(polkit_policydir)" || list=; \
786 for p in $$list; do \
787 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
788 echo "$$d$$p"; \
789 done | $(am__base_list) | \
790 while read files; do \
791 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(polkit_policydir)'"; \
792 $(INSTALL_DATA) $$files "$(DESTDIR)$(polkit_policydir)" || exit $$?; \
793 done
794
795 uninstall-polkit_policyDATA:
796 @$(NORMAL_UNINSTALL)
797 @list='$(polkit_policy_DATA)'; test -n "$(polkit_policydir)" || list=; \
798 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
799 dir='$(DESTDIR)$(polkit_policydir)'; $(am__uninstall_files_from_dir)
800 install-providerDATA: $(provider_DATA)
801 @$(NORMAL_INSTALL)
802 test -z "$(providerdir)" || $(MKDIR_P) "$(DESTDIR)$(providerdir)"
803 @list='$(provider_DATA)'; test -n "$(providerdir)" || list=; \
804 for p in $$list; do \
805 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
806 echo "$$d$$p"; \
807 done | $(am__base_list) | \
808 while read files; do \
809 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(providerdir)'"; \
810 $(INSTALL_DATA) $$files "$(DESTDIR)$(providerdir)" || exit $$?; \
811 done
812
813 uninstall-providerDATA:
814 @$(NORMAL_UNINSTALL)
815 @list='$(provider_DATA)'; test -n "$(providerdir)" || list=; \
816 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
817 dir='$(DESTDIR)$(providerdir)'; $(am__uninstall_files_from_dir)
818 install-serviceDATA: $(service_DATA)
819 @$(NORMAL_INSTALL)
820 test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)"
821 @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \
822 for p in $$list; do \
823 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
824 echo "$$d$$p"; \
825 done | $(am__base_list) | \
826 while read files; do \
827 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(servicedir)'"; \
828 $(INSTALL_DATA) $$files "$(DESTDIR)$(servicedir)" || exit $$?; \
829 done
830
831 uninstall-serviceDATA:
832 @$(NORMAL_UNINSTALL)
833 @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \
834 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
835 dir='$(DESTDIR)$(servicedir)'; $(am__uninstall_files_from_dir)
836
837 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
838 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
839 unique=`for i in $$list; do \
840 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
841 done | \
842 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
843 END { if (nonempty) { for (i in files) print i; }; }'`; \
844 mkid -fID $$unique
845 tags: TAGS
846
847 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
848 $(TAGS_FILES) $(LISP)
849 set x; \
850 here=`pwd`; \
851 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
852 unique=`for i in $$list; do \
853 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
854 done | \
855 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
856 END { if (nonempty) { for (i in files) print i; }; }'`; \
857 shift; \
858 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
859 test -n "$$unique" || unique=$$empty_fix; \
860 if test $$# -gt 0; then \
861 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
862 "$$@" $$unique; \
863 else \
864 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
865 $$unique; \
866 fi; \
867 fi
868 ctags: CTAGS
869 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
870 $(TAGS_FILES) $(LISP)
871 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
872 unique=`for i in $$list; do \
873 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
874 done | \
875 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
876 END { if (nonempty) { for (i in files) print i; }; }'`; \
877 test -z "$(CTAGS_ARGS)$$unique" \
878 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
879 $$unique
880
881 GTAGS:
882 here=`$(am__cd) $(top_builddir) && pwd` \
883 && $(am__cd) $(top_srcdir) \
884 && gtags -i $(GTAGS_ARGS) "$$here"
885
886 distclean-tags:
887 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
888
889 distdir: $(DISTFILES)
890 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
891 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
892 list='$(DISTFILES)'; \
893 dist_files=`for file in $$list; do echo $$file; done | \
894 sed -e "s|^$$srcdirstrip/||;t" \
895 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
896 case $$dist_files in \
897 */*) $(MKDIR_P) `echo "$$dist_files" | \
898 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
899 sort -u` ;; \
900 esac; \
901 for file in $$dist_files; do \
902 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
903 if test -d $$d/$$file; then \
904 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
905 if test -d "$(distdir)/$$file"; then \
906 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
907 fi; \
908 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
909 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
910 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
911 fi; \
912 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
913 else \
914 test -f "$(distdir)/$$file" \
915 || cp -p $$d/$$file "$(distdir)/$$file" \
916 || exit 1; \
917 fi; \
918 done
919 check-am: all-am
920 check: check-am
921 all-am: Makefile $(PROGRAMS) $(DATA)
922 installdirs:
923 for dir in "$(DESTDIR)$(servicedir)" "$(DESTDIR)$(polkit_policydir)" "$(DESTDIR)$(providerdir)" "$(DESTDIR)$(servicedir)"; do \
924 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
925 done
926 install: install-am
927 install-exec: install-exec-am
928 install-data: install-data-am
929 uninstall: uninstall-am
930
931 install-am: all-am
932 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
933
934 installcheck: installcheck-am
935 install-strip:
936 if test -z '$(STRIP)'; then \
937 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
938 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
939 install; \
940 else \
941 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
942 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
943 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
944 fi
945 mostlyclean-generic:
946
947 clean-generic:
948 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
949
950 distclean-generic:
951 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
952 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
953 -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
954
955 maintainer-clean-generic:
956 @echo "This command is intended for maintainers to use"
957 @echo "it deletes files that may require special tools to rebuild."
958 clean: clean-am
959
960 clean-am: clean-generic clean-servicePROGRAMS mostlyclean-am
961
962 distclean: distclean-am
963 -rm -rf ./$(DEPDIR)
964 -rm -f Makefile
965 distclean-am: clean-am distclean-compile distclean-generic \
966 distclean-tags
967
968 dvi: dvi-am
969
970 dvi-am:
971
972 html: html-am
973
974 html-am:
975
976 info: info-am
977
978 info-am:
979
980 install-data-am: install-data-local install-polkit_policyDATA \
981 install-providerDATA install-serviceDATA \
982 install-servicePROGRAMS
983
984 install-dvi: install-dvi-am
985
986 install-dvi-am:
987
988 install-exec-am:
989
990 install-html: install-html-am
991
992 install-html-am:
993
994 install-info: install-info-am
995
996 install-info-am:
997
998 install-man:
999
1000 install-pdf: install-pdf-am
1001
1002 install-pdf-am:
1003
1004 install-ps: install-ps-am
1005
1006 install-ps-am:
1007
1008 installcheck-am:
1009
1010 maintainer-clean: maintainer-clean-am
1011 -rm -rf ./$(DEPDIR)
1012 -rm -f Makefile
1013 maintainer-clean-am: distclean-am maintainer-clean-generic
1014
1015 mostlyclean: mostlyclean-am
1016
1017 mostlyclean-am: mostlyclean-compile mostlyclean-generic
1018
1019 pdf: pdf-am
1020
1021 pdf-am:
1022
1023 ps: ps-am
1024
1025 ps-am:
1026
1027 uninstall-am: uninstall-local uninstall-polkit_policyDATA \
1028 uninstall-providerDATA uninstall-serviceDATA \
1029 uninstall-servicePROGRAMS
1030
1031 .MAKE: install-am install-strip
1032
1033 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
1034 clean-servicePROGRAMS ctags distclean distclean-compile \
1035 distclean-generic distclean-tags distdir dvi dvi-am html \
1036 html-am info info-am install install-am install-data \
1037 install-data-am install-data-local install-dvi install-dvi-am \
1038 install-exec install-exec-am install-html install-html-am \
1039 install-info install-info-am install-man install-pdf \
1040 install-pdf-am install-polkit_policyDATA install-providerDATA \
1041 install-ps install-ps-am install-serviceDATA \
1042 install-servicePROGRAMS install-strip installcheck \
1043 installcheck-am installdirs maintainer-clean \
1044 maintainer-clean-generic mostlyclean mostlyclean-compile \
1045 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
1046 uninstall-am uninstall-local uninstall-polkit_policyDATA \
1047 uninstall-providerDATA uninstall-serviceDATA \
1048 uninstall-servicePROGRAMS
1049
1050
1051 perform-memcheck: $(TEST_PROGS) $(TEST_SUPPRESSIONS)
1052 @make -C $(top_builddir)/build all
1053 @for test in $(TEST_PROGS); do \
1054 G_SLICE=always-malloc libtool --mode=execute \
1055 valgrind --trace-children=no --gen-suppressions=all \
1056 --suppressions=$(TEST_SUPPRESSIONS) \
1057 --leak-check=full --show-reachable=yes --num-callers=16 \
1058 --quiet --error-exitcode=33 \
1059 $(builddir)/$$test; \
1060 done
1061
1062 @WITH_COVERAGE_TRUE@coverage:
1063 @WITH_COVERAGE_TRUE@ mkdir -p $(top_builddir)/build/coverage
1064 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
1065 @WITH_COVERAGE_TRUE@ $(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
1066 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
1067 @WITH_COVERAGE_TRUE@ @echo "file://$(abs_top_builddir)/build/coverage/index.html"
1068
1069 @WITH_COVERAGE_TRUE@clear-coverage:
1070 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
1071 @INTLTOOL_POLICY_RULE@
1072
1073 # Install and uninstall the config for this distro
1074 install-data-local:
1075 $(INSTALL_PROGRAM) -d $(servicedir)
1076 $(INSTALL_DATA) $(srcdir)/realmd-$(DISTRO).conf $(servicedir)/realmd-distro.conf
1077 uninstall-local:
1078 rm -f $(servicedir)/realmd-distro.conf
1079
1080 # Tell versions [3.59,3.63) of GNU make to not export all variables.
1081 # Otherwise a system limit (for SysV at least) may be exceeded.
1082 .NOEXPORT:
0 [global]
1 config backend = registry
0 [provider]
1 name = org.freedesktop.realmd.Samba
2 type = org.freedesktop.realmd.Kerberos
3 path = /org/freedesktop/realmd/Samba
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 <vendor>realmd</vendor>
6 <!--
7 <vendor_url>http://example.com/fill-this-in/</vendor_url>
8 <icon_name>application-vnd.iccprofile</icon_name>
9 -->
10
11 <!-- Any user can discover realms -->
12 <action id="org.freedesktop.realmd.discover-realm">
13 <_description>Discover realm</_description>
14 <_message>Authentication is required to discover a kerberos realm</_message>
15 <defaults>
16 <allow_any>yes</allow_any>
17 <allow_inactive>yes</allow_inactive>
18 <allow_active>yes</allow_active>
19 </defaults>
20 </action>
21
22 <action id="org.freedesktop.realmd.enroll-machine">
23 <_description>Join machine to realm</_description>
24 <_message>Authentication is required to join this machine to a realm or domain</_message>
25 <defaults>
26 <allow_any>no</allow_any>
27 <allow_inactive>auth_admin</allow_inactive>
28 <allow_active>auth_admin_keep</allow_active>
29 </defaults>
30 <annotate key="org.freedesktop.policykit.imply">
31 org.freedesktop.realmd.discover-realm
32 org.freedesktop.realmd.unenroll-machine
33 </annotate>
34 </action>
35
36 <action id="org.freedesktop.realmd.unenroll-machine">
37 <_description>Remove machine from realm</_description>
38 <_message>Authentication is required to remove this computer from a realm or domain.</_message>
39 <defaults>
40 <allow_any>no</allow_any>
41 <allow_inactive>auth_admin</allow_inactive>
42 <allow_active>auth_admin_keep</allow_active>
43 </defaults>
44 </action>
45
46 <action id="org.freedesktop.realmd.login-policy">
47 <_description>Change login policy</_description>
48 <_message>Authentication is required to change the policy of who can log in on this computer.</_message>
49 <defaults>
50 <allow_any>no</allow_any>
51 <allow_inactive>auth_admin</allow_inactive>
52 <allow_active>auth_admin_keep</allow_active>
53 </defaults>
54 </action>
55
56 </policyconfig>
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-ad-discover.h"
17 #include "realm-command.h"
18 #include "realm-dbus-constants.h"
19 #include "realm-diagnostics.h"
20 #include "realm-discovery.h"
21 #include "realm-errors.h"
22 #include "realm-network.h"
23
24 #include <glib/gi18n.h>
25
26 typedef struct {
27 GDBusMethodInvocation *invocation;
28 GHashTable *discovery;
29 gchar *domain;
30 GVariant *servers;
31 gboolean found_kerberos_srv;
32 gboolean finished_srv;
33 gboolean found_msdcs_soa;
34 gboolean finished_soa;
35 } DiscoverClosure;
36
37 static void
38 discover_closure_free (gpointer data)
39 {
40 DiscoverClosure *discover = data;
41
42 g_object_unref (discover->invocation);
43 g_hash_table_unref (discover->discovery);
44 g_free (discover->domain);
45 g_variant_unref (discover->servers);
46
47 g_slice_free (DiscoverClosure, discover);
48 }
49
50 static void
51 maybe_complete_discover (GSimpleAsyncResult *res,
52 DiscoverClosure *discover)
53 {
54 if (!discover->finished_srv || !discover->finished_soa)
55 return;
56
57 if (discover->found_kerberos_srv && discover->found_msdcs_soa)
58 realm_diagnostics_info (discover->invocation, "Found AD style DNS records on domain");
59 else
60 realm_diagnostics_info (discover->invocation, "Couldn't find AD style DNS records on domain");
61
62 g_simple_async_result_complete (res);
63 }
64
65 static void
66 on_resolve_kerberos_srv (GObject *source,
67 GAsyncResult *result,
68 gpointer user_data)
69 {
70 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
71 DiscoverClosure *discover = g_simple_async_result_get_op_res_gpointer (res);
72 GError *error = NULL;
73 GPtrArray *servers;
74 GString *info;
75 GList *targets;
76 gchar *server;
77 GList *l;
78
79 targets = g_resolver_lookup_service_finish (G_RESOLVER (source),
80 result, &error);
81
82 /* We don't treat 'host not found' as an error */
83 if (g_error_matches (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND))
84 g_clear_error (&error);
85
86 if (error == NULL) {
87 info = g_string_new ("");
88 servers = g_ptr_array_new ();
89
90 for (l = targets; l != NULL; l = g_list_next (l)) {
91 discover->found_kerberos_srv = TRUE;
92 server = g_strdup_printf ("%s:%d", g_srv_target_get_hostname (l->data),
93 (int)g_srv_target_get_port (l->data));
94 g_ptr_array_add (servers, g_variant_new_string (server));
95 g_string_append_printf (info, "%s\n", server);
96 g_free (server);
97 g_srv_target_free (l->data);
98 }
99
100 g_list_free (targets);
101
102 if (discover->found_kerberos_srv)
103 realm_diagnostics_info (discover->invocation, "%s", info->str);
104 else
105 realm_diagnostics_info (discover->invocation, "No kerberos SRV records");
106
107 g_string_free (info, TRUE);
108
109 discover->servers = g_variant_new_array (G_VARIANT_TYPE_STRING,
110 (GVariant * const*)servers->pdata,
111 servers->len);
112
113 g_variant_ref_sink (discover->servers);
114 g_ptr_array_free (servers, TRUE);
115
116 } else {
117 realm_diagnostics_error (discover->invocation, error, "Couldn't lookup SRV records for domain");
118 g_simple_async_result_take_error (res, error);
119 }
120
121 discover->finished_srv = TRUE;
122 maybe_complete_discover (res, discover);
123 g_object_unref (res);
124 }
125
126 static void
127 on_resolve_msdcs_soa (GObject *source,
128 GAsyncResult *result,
129 gpointer user_data)
130 {
131 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
132 DiscoverClosure *discover = g_simple_async_result_get_op_res_gpointer (res);
133 GResolver *resolver = G_RESOLVER (source);
134 GError *error = NULL;
135 GList *records;
136
137 records = g_resolver_lookup_records_finish (resolver, result, &error);
138 if (error == NULL || g_error_matches (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND)) {
139 discover->found_msdcs_soa = (records != NULL);
140 g_list_free_full (records, (GDestroyNotify)g_variant_unref);
141
142 } else {
143 realm_diagnostics_error (discover->invocation, error, "Failure to lookup domain SOA record");
144 g_simple_async_result_take_error (res, error);
145 }
146
147 discover->finished_soa = TRUE;
148 maybe_complete_discover (res, discover);
149 g_object_unref (res);
150 }
151
152 static void
153 ad_discover_domain_begin (GSimpleAsyncResult *res,
154 DiscoverClosure *discover)
155 {
156 GResolver *resolver;
157 gchar *msdcs;
158
159 g_assert (discover->domain != NULL);
160
161 realm_diagnostics_info (discover->invocation,
162 "Searching for kerberos SRV records on %s domain",
163 discover->domain);
164
165 resolver = g_resolver_get_default ();
166 g_resolver_lookup_service_async (resolver, "kerberos", "udp", discover->domain, NULL,
167 on_resolve_kerberos_srv, g_object_ref (res));
168
169 realm_diagnostics_info (discover->invocation,
170 "Searching for _msdcs zone on %s domain",
171 discover->domain);
172
173 /* Active Directory DNS zones have this subzone */
174 msdcs = g_strdup_printf ("_msdcs.%s", discover->domain);
175
176 g_resolver_lookup_records_async (resolver, msdcs, G_RESOLVER_RECORD_SOA, NULL,
177 on_resolve_msdcs_soa, g_object_ref (res));
178
179 g_free (msdcs);
180
181 g_object_unref (resolver);
182 }
183
184 static void
185 on_get_dhcp_domain (GObject *source,
186 GAsyncResult *result,
187 gpointer user_data)
188 {
189 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
190 DiscoverClosure *discover = g_simple_async_result_get_op_res_gpointer (res);
191 GError *error = NULL;
192
193 discover->domain = realm_network_get_dhcp_domain_finish (result, &error);
194 if (error != NULL) {
195 realm_diagnostics_error (discover->invocation, error, "Failure to lookup DHCP domain");
196 g_error_free (error);
197 }
198
199 if (discover->domain)
200 ad_discover_domain_begin (res, discover);
201 else
202 g_simple_async_result_complete (res);
203 }
204
205 void
206 realm_ad_discover_async (const gchar *string,
207 GDBusMethodInvocation *invocation,
208 GAsyncReadyCallback callback,
209 gpointer user_data)
210 {
211 GSimpleAsyncResult *res;
212 DiscoverClosure *discover;
213 GDBusConnection *connection;
214 gchar *domain;
215
216 g_return_if_fail (string != NULL);
217 g_return_if_fail (invocation == NULL || G_IS_DBUS_METHOD_INVOCATION (invocation));
218
219 res = g_simple_async_result_new (NULL, callback, user_data,
220 realm_ad_discover_async);
221 discover = g_slice_new0 (DiscoverClosure);
222 discover->invocation = g_object_ref (invocation);
223 discover->discovery = g_hash_table_new_full (g_str_hash, g_str_equal,
224 g_free, (GDestroyNotify)g_variant_unref);
225 g_simple_async_result_set_op_res_gpointer (res, discover, discover_closure_free);
226
227 if (g_str_equal (string, "")) {
228 connection = g_dbus_method_invocation_get_connection (invocation);
229 realm_diagnostics_info (invocation, "Looking up our DHCP domain");
230 realm_network_get_dhcp_domain_async (connection, on_get_dhcp_domain,
231 g_object_ref (res));
232
233 } else {
234 domain = g_ascii_strdown (string, -1);
235 g_strstrip (domain);
236 discover->domain = domain;
237 ad_discover_domain_begin (res, discover);
238 }
239
240 g_object_unref (res);
241 }
242
243 gchar *
244 realm_ad_discover_finish (GAsyncResult *result,
245 GHashTable **discovery,
246 GError **error)
247 {
248 GSimpleAsyncResult *res;
249 DiscoverClosure *discover;
250 gchar *realm;
251
252 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
253 realm_ad_discover_async), NULL);
254 g_return_val_if_fail (error == NULL || *error == NULL, NULL);
255
256 res = G_SIMPLE_ASYNC_RESULT (result);
257 if (g_simple_async_result_propagate_error (res, error))
258 return NULL;
259
260 discover = g_simple_async_result_get_op_res_gpointer (res);
261
262 /* Didn't find a valid domain */
263 if (!discover->found_kerberos_srv || !discover->found_msdcs_soa)
264 return NULL;
265
266 if (discovery) {
267 *discovery = realm_discovery_new ();
268
269 /* The domain */
270 realm_discovery_add_string (*discovery, REALM_DBUS_DISCOVERY_DOMAIN,
271 discover->domain);
272
273 /* The realm */
274 realm = g_ascii_strup (discover->domain, -1);
275 realm_discovery_add_string (*discovery, REALM_DBUS_DISCOVERY_REALM, realm);
276
277 /* The servers */
278 realm_discovery_add_variant (*discovery, REALM_DBUS_DISCOVERY_KDCS,
279 discover->servers);
280
281 /* The type */
282 realm_discovery_add_string (*discovery, REALM_DBUS_DISCOVERY_TYPE,
283 "kerberos-ad");
284 }
285
286 return realm;
287 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_AD_DISCOVER_H__
17 #define __REALM_AD_DISCOVER_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 void realm_ad_discover_async (const gchar *string,
24 GDBusMethodInvocation *invocation,
25 GAsyncReadyCallback callback,
26 gpointer user_data);
27
28 gchar * realm_ad_discover_finish (GAsyncResult *result,
29 GHashTable **discovery,
30 GError **error);
31
32 G_END_DECLS
33
34 #endif /* __REALM_AD_DISCOVER_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) all later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-all-provider.h"
17 #include "realm-daemon.h"
18 #define DEBUG_FLAG REALM_DEBUG_PROVIDER
19 #include "realm-debug.h"
20 #include "realm-errors.h"
21 #include "realm-dbus-constants.h"
22 #include "realm-dbus-generated.h"
23 #include "realm-provider.h"
24
25 #include <glib/gstdio.h>
26
27 #include <errno.h>
28
29 struct _RealmAllProvider {
30 RealmProvider parent;
31 GList *providers;
32 };
33
34 typedef struct {
35 RealmProviderClass parent_class;
36 } RealmAllProviderClass;
37
38 static guint provider_owner_id = 0;
39
40 static void realm_all_provider_async_initable_iface (GAsyncInitableIface *iface);
41
42 G_DEFINE_TYPE_WITH_CODE (RealmAllProvider, realm_all_provider, REALM_TYPE_PROVIDER,
43 G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, realm_all_provider_async_initable_iface);
44 );
45
46 static void
47 realm_all_provider_init (RealmAllProvider *self)
48 {
49
50 }
51
52 static gboolean
53 provider_load (const gchar *filename,
54 gchar **name,
55 gchar **path)
56 {
57 gboolean ret = TRUE;
58 GError *error = NULL;
59 GKeyFile *key_file;
60
61 g_assert (name != NULL);
62 g_assert (path != NULL);
63
64 key_file = g_key_file_new ();
65 g_key_file_load_from_file (key_file, filename, G_KEY_FILE_NONE, &error);
66 if (error == NULL)
67 *name = g_key_file_get_string (key_file, "provider", "name", &error);
68 if (error == NULL)
69 *path = g_key_file_get_string (key_file, "provider", "path", &error);
70 if (error == NULL && (!g_dbus_is_name (*name) || g_dbus_is_unique_name (*name)))
71 g_set_error (&error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_PARSE,
72 "Invalid DBus name: %s", *name);
73 if (error == NULL && !g_variant_is_object_path (*path)) {
74 g_set_error (&error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_PARSE,
75 "Invalid DBus object path: %s", *path);
76 }
77
78 if (error != NULL) {
79 g_warning ("Couldn't load provider information from: %s: %s",
80 filename, error->message);
81 g_error_free (error);
82 g_free (*name);
83 g_free (*path);
84 *name = *path = NULL;
85 ret = FALSE;
86 }
87
88 g_key_file_free (key_file);
89 return ret;
90 }
91
92 static GVariant *
93 reduce_array (GQueue *input,
94 const gchar *array_sig)
95 {
96 GVariantBuilder builder;
97 GVariant *element;
98 GVariant *array;
99 GVariantIter iter;
100
101 g_variant_builder_init (&builder, G_VARIANT_TYPE (array_sig));
102
103 for (;;) {
104 array = g_queue_pop_head (input);
105 if (!array)
106 break;
107 g_variant_iter_init (&iter, array);
108 for (;;) {
109 element = g_variant_iter_next_value (&iter);
110 if (!element)
111 break;
112 g_variant_builder_add_value (&builder, element);
113 g_variant_unref (element);
114 }
115 g_variant_unref (array);
116 }
117
118 return g_variant_builder_end (&builder);
119 }
120
121 static void
122 update_realms_property (RealmAllProvider *self)
123 {
124 GQueue realms = G_QUEUE_INIT;
125 GVariant *variant;
126 GList *l;
127
128 for (l = self->providers; l != NULL; l = g_list_next (l)) {
129 variant = g_dbus_proxy_get_cached_property (l->data, "Realms");
130 if (variant)
131 g_queue_push_tail (&realms, variant);
132 }
133
134 variant = g_variant_ref_sink (reduce_array (&realms, "a(sos)"));
135 g_object_set (self, "realms", variant, NULL);
136 g_variant_unref (variant);
137 }
138
139 static void
140 update_all_properties (RealmAllProvider *self)
141 {
142 update_realms_property (self);
143 }
144
145 static void
146 on_proxy_properties_changed (GDBusProxy *proxy,
147 GVariant *changed_properties,
148 GStrv invalidated_properties,
149 gpointer user_data)
150 {
151 RealmAllProvider *self = REALM_ALL_PROVIDER (user_data);
152 update_all_properties (self);
153 }
154
155 typedef struct {
156 GDBusMethodInvocation *invocation;
157 gint outstanding;
158 GQueue failures;
159 GQueue results;
160 gint relevance;
161 GVariant *realms;
162 } DiscoverClosure;
163
164 static void
165 discover_closure_free (gpointer data)
166 {
167 DiscoverClosure *discover = data;
168 g_object_unref (discover->invocation);
169 while (!g_queue_is_empty (&discover->results))
170 g_variant_unref (g_queue_pop_head (&discover->results));
171 while (!g_queue_is_empty (&discover->failures))
172 g_error_free (g_queue_pop_head (&discover->failures));
173 if (discover->realms)
174 g_variant_unref (discover->realms);
175 g_slice_free (DiscoverClosure, discover);
176 }
177
178 static gint
179 compare_relevance (gconstpointer a,
180 gconstpointer b,
181 gpointer user_data)
182 {
183 gint relevance_a = 0;
184 gint relevance_b = 0;
185 GVariant *realms;
186
187 g_variant_get ((GVariant *)a, "(i@a(sos))", &relevance_a, &realms);
188 g_variant_unref (realms);
189
190 g_variant_get ((GVariant *)b, "(i@a(sos))", &relevance_b, &realms);
191 g_variant_unref (realms);
192
193 return relevance_b - relevance_a;
194 }
195
196 static void
197 discover_process_results (GSimpleAsyncResult *res,
198 DiscoverClosure *discover)
199 {
200 gint relevance = 0;
201 GError *error;
202 GVariant *result;
203 GVariant *realms;
204 gboolean any = FALSE;
205 GPtrArray *results;
206 GVariantIter iter;
207 GVariant *realm;
208
209 g_queue_sort (&discover->results, compare_relevance, NULL);
210 results = g_ptr_array_new_with_free_func ((GDestroyNotify)g_variant_unref);
211
212 for (;;) {
213 result = g_queue_pop_head (&discover->results);
214 if (result == NULL)
215 break;
216 g_variant_get (result, "(i@a(sos))", &relevance, &realms);
217 g_variant_iter_init (&iter, realms);
218 while ((realm = g_variant_iter_next_value (&iter)) != NULL)
219 g_ptr_array_add (results, realm);
220 if (relevance > discover->relevance)
221 discover->relevance = relevance;
222 g_variant_unref (realms);
223 g_variant_unref (result);
224 any = TRUE;
225 }
226
227 discover->realms = g_variant_new_array (G_VARIANT_TYPE ("(sos)"),
228 (GVariant *const *)results->pdata,
229 results->len);
230 g_variant_ref_sink (discover->realms);
231 g_ptr_array_free (results, TRUE);
232
233 if (!any) {
234 /* If there was a failure, return one of them */
235 error = g_queue_pop_head (&discover->failures);
236 if (error != NULL)
237 g_simple_async_result_take_error (res, error);
238 }
239 }
240
241 static void
242 on_proxy_discover (GObject *source,
243 GAsyncResult *result,
244 gpointer user_data)
245 {
246 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
247 DiscoverClosure *discover = g_simple_async_result_get_op_res_gpointer (res);
248 GError *error = NULL;
249 GVariant *retval;
250
251 retval = g_dbus_proxy_call_finish (G_DBUS_PROXY (source), result, &error);
252 if (error == NULL)
253 g_queue_push_tail (&discover->results, retval);
254 else
255 g_queue_push_tail (&discover->failures, error);
256
257 g_assert (discover->outstanding > 0);
258 discover->outstanding--;
259
260 /* All done at this point? */
261 if (discover->outstanding == 0) {
262 discover_process_results (res, discover);
263 g_simple_async_result_complete (res);
264 }
265
266 g_object_unref (res);
267 }
268
269 static void
270 realm_all_provider_discover_async (RealmProvider *provider,
271 const gchar *string,
272 GDBusMethodInvocation *invocation,
273 GAsyncReadyCallback callback,
274 gpointer user_data)
275 {
276 RealmAllProvider *self = REALM_ALL_PROVIDER (provider);
277 GSimpleAsyncResult *res;
278 DiscoverClosure *discover;
279 GList *l;
280
281 res = g_simple_async_result_new (G_OBJECT (self), callback, user_data,
282 realm_all_provider_discover_async);
283 discover = g_slice_new0 (DiscoverClosure);
284 g_simple_async_result_set_op_res_gpointer (res, discover, discover_closure_free);
285
286 for (l = self->providers; l != NULL; l = g_list_next (l)) {
287 g_dbus_proxy_call (l->data, "Discover", g_variant_new ("(s)", string),
288 G_DBUS_CALL_FLAGS_NONE, G_MAXINT, NULL,
289 on_proxy_discover, g_object_ref (res));
290 discover->outstanding++;
291 }
292
293 if (discover->outstanding == 0) {
294 discover_process_results (res, discover);
295 g_simple_async_result_complete_in_idle (res);
296 }
297 }
298
299 static gint
300 realm_all_provider_discover_finish (RealmProvider *provider,
301 GAsyncResult *result,
302 GVariant **realms,
303 GError **error)
304 {
305 GSimpleAsyncResult *res;
306 DiscoverClosure *discover;
307
308 res = G_SIMPLE_ASYNC_RESULT (result);
309
310 if (g_simple_async_result_propagate_error (res, error))
311 return -1;
312
313 discover = g_simple_async_result_get_op_res_gpointer (res);
314 *realms = discover->realms;
315 discover->realms = NULL;
316 return discover->relevance;
317 }
318
319 static void
320 realm_all_provider_finalize (GObject *obj)
321 {
322 RealmAllProvider *self = REALM_ALL_PROVIDER (obj);
323
324 g_list_free_full (self->providers, g_object_unref);
325
326 G_OBJECT_CLASS (realm_all_provider_parent_class)->finalize (obj);
327 }
328
329 void
330 realm_all_provider_class_init (RealmAllProviderClass *klass)
331 {
332 RealmProviderClass *provider_class = REALM_PROVIDER_CLASS (klass);
333 GObjectClass *object_class = G_OBJECT_CLASS (klass);
334
335 object_class->finalize = realm_all_provider_finalize;
336
337 provider_class->discover_async = realm_all_provider_discover_async;
338 provider_class->discover_finish = realm_all_provider_discover_finish;
339 }
340
341 typedef struct {
342 gint outstanding;
343 } InitClosure;
344
345 static void
346 init_closure_free (gpointer data)
347 {
348 InitClosure *init = data;
349 g_slice_free (InitClosure, init);
350 }
351
352 static void
353 on_provider_proxy (GObject *source,
354 GAsyncResult *result,
355 gpointer user_data)
356 {
357 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
358 InitClosure *init = g_simple_async_result_get_op_res_gpointer (res);
359 RealmAllProvider *self = REALM_ALL_PROVIDER (g_async_result_get_source_object (user_data));
360 GDBusProxy *proxy;
361 GError *error = NULL;
362
363 proxy = g_dbus_proxy_new_for_bus_finish (result, &error);
364 if (error == NULL) {
365 g_signal_connect (proxy, "g-properties-changed",
366 G_CALLBACK (on_proxy_properties_changed), self);
367 self->providers = g_list_prepend (self->providers, proxy);
368 } else {
369 g_warning ("Couldn't load realm provider: %s", error->message);
370 g_error_free (error);
371 }
372
373 init->outstanding--;
374 if (init->outstanding == 0) {
375 update_all_properties (self);
376 g_simple_async_result_complete (res);
377 }
378
379 g_object_unref (self);
380 g_object_unref (res);
381 }
382
383 static void
384 realm_all_provider_init_async (GAsyncInitable *initable,
385 int io_priority,
386 GCancellable *cancellable,
387 GAsyncReadyCallback callback,
388 gpointer user_data)
389 {
390 RealmAllProvider *self = REALM_ALL_PROVIDER (initable);
391 GSimpleAsyncResult *res;
392 InitClosure *init;
393 GError *error = NULL;
394 GDir *dir = NULL;
395 gchar *filename;
396 const gchar *name;
397 gchar *provider_name;
398 gchar *provider_path;
399
400 res = g_simple_async_result_new (G_OBJECT (self), callback, user_data,
401 realm_all_provider_init_async);
402 init = g_slice_new0 (InitClosure);
403 g_simple_async_result_set_op_res_gpointer (res, init, init_closure_free);
404
405 dir = g_dir_open (PROVIDER_DIR, 0, &error);
406 if (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
407 g_clear_error (&error);
408 if (error != NULL) {
409 g_warning ("Couldn't list provider directory: %s: %s",
410 PROVIDER_DIR, error->message);
411 g_clear_error (&error);
412 dir = NULL;
413 }
414
415 for (;;) {
416 if (dir == NULL)
417 name = NULL;
418 else
419 name = g_dir_read_name (dir);
420 if (name == NULL)
421 break;
422
423 /* Only files ending in *.provider are loaded */
424 if (!g_pattern_match_simple ("*.provider", name))
425 continue;
426
427 filename = g_build_filename (PROVIDER_DIR, name, NULL);
428 if (provider_load (filename, &provider_name, &provider_path)) {
429 g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE,
430 realm_dbus_provider_interface_info (),
431 provider_name, provider_path,
432 REALM_DBUS_PROVIDER_INTERFACE,
433 cancellable, on_provider_proxy,
434 g_object_ref (res));
435 g_free (provider_name);
436 g_free (provider_path);
437 init->outstanding++;
438 }
439
440 g_free (filename);
441 }
442
443 if (init->outstanding == 0)
444 g_simple_async_result_complete_in_idle (res);
445
446 g_object_unref (res);
447 }
448
449 static gboolean
450 realm_all_provider_init_finish (GAsyncInitable *initable,
451 GAsyncResult *result,
452 GError **error)
453 {
454 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error))
455 return FALSE;
456
457 return TRUE;
458 }
459
460 static void
461 realm_all_provider_async_initable_iface (GAsyncInitableIface *iface)
462 {
463 iface->init_async = realm_all_provider_init_async;
464 iface->init_finish = realm_all_provider_init_finish;
465 }
466
467 static void
468 on_name_acquired (GDBusConnection *connection,
469 const gchar *name,
470 gpointer user_data)
471 {
472 realm_daemon_poke ();
473 }
474
475 static void
476 on_name_lost (GDBusConnection *connection,
477 const gchar *name,
478 gpointer user_data)
479 {
480 g_warning ("couldn't claim service name on DBus bus: %s",
481 REALM_DBUS_ALL_PROVIDER_NAME);
482 }
483
484 static void
485 on_all_provider_inited (GObject *source,
486 GAsyncResult *result,
487 gpointer user_data)
488 {
489 GDBusConnection *connection = G_DBUS_CONNECTION (user_data);
490 GError *error = NULL;
491 GObject *self;
492
493 self = g_async_initable_new_finish (G_ASYNC_INITABLE (source),
494 result, &error);
495
496 if (error == NULL) {
497 g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self),
498 connection, REALM_DBUS_ALL_PROVIDER_PATH,
499 &error);
500 }
501
502 if (error == NULL) {
503 provider_owner_id = g_bus_own_name_on_connection (connection,
504 REALM_DBUS_ALL_PROVIDER_NAME,
505 G_BUS_NAME_OWNER_FLAGS_NONE,
506 on_name_acquired, on_name_lost,
507 g_object_ref (self), g_object_unref);
508
509 } else {
510 g_warning ("Couldn't create new realm provider: %s", error->message);
511 g_clear_error (&error);
512 }
513
514 if (self != NULL)
515 g_object_unref (self);
516 g_object_unref (connection);
517 }
518
519 void
520 realm_all_provider_start (GDBusConnection *connection)
521 {
522 g_return_if_fail (provider_owner_id == 0);
523
524 g_async_initable_new_async (REALM_TYPE_ALL_PROVIDER, G_PRIORITY_DEFAULT, NULL,
525 on_all_provider_inited, g_object_ref (connection),
526 NULL);
527 }
528
529 void
530 realm_all_provider_stop (void)
531 {
532 if (provider_owner_id != 0)
533 g_bus_unown_name (provider_owner_id);
534 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) all later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_ALL_PROVIDER_H__
17 #define __REALM_ALL_PROVIDER_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 #define REALM_TYPE_ALL_PROVIDER (realm_all_provider_get_type ())
24 #define REALM_ALL_PROVIDER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), REALM_TYPE_ALL_PROVIDER, RealmAllProvider))
25 #define REALM_IS_ALL_PROVIDER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), REALM_TYPE_ALL_PROVIDER))
26
27 typedef struct _RealmAllProvider RealmAllProvider;
28
29 GType realm_all_provider_get_type (void) G_GNUC_CONST;
30
31 void realm_all_provider_start (GDBusConnection *connection);
32
33 void realm_all_provider_stop (void);
34
35 G_END_DECLS
36
37 #endif /* __REALM_ALL_PROVIDER_H__ */
0 /*
1 * Copyright (C) 2011 Collabora Ltd.
2 * Copyright (C) 2012 Red Hat Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation; either version 2.1 of
7 * the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 * 02111-1307, USA.
18 *
19 * Author: Stef Walter <stefw@collabora.co.uk>
20 */
21
22 #include "config.h"
23
24 #include "realm-daemon.h"
25 #define DEBUG_FLAG REALM_DEBUG_PROCESS
26 #include "realm-debug.h"
27 #include "realm-command.h"
28 #include "realm-diagnostics.h"
29 #include "realm-settings.h"
30
31 #include <glib/gi18n-lib.h>
32
33 #include <sys/wait.h>
34 #include <fcntl.h>
35 #include <errno.h>
36 #include <string.h>
37
38 enum {
39 FD_INPUT,
40 FD_OUTPUT,
41 FD_ERROR,
42 NUM_FDS
43 };
44
45
46 typedef struct {
47 GString *input;
48 GString *output;
49 guint source_sig;
50 gint exit_code;
51 gboolean cancelled;
52 GDBusMethodInvocation *invocation;
53 } CommandClosure;
54
55 typedef struct {
56 GSource source;
57 GPollFD polls[NUM_FDS]; /* The various fd's we're listening to */
58
59 GPid child_pid;
60 guint child_sig;
61
62 GSimpleAsyncResult *res;
63 CommandClosure *command;
64
65 GCancellable *cancellable;
66 guint cancel_sig;
67 } ProcessSource;
68
69 static void
70 command_closure_free (gpointer data)
71 {
72 CommandClosure *command = data;
73 g_string_free (command->output, TRUE);
74 g_assert (command->source_sig == 0);
75 g_slice_free (CommandClosure, command);
76 }
77
78 static void
79 complete_source_is_done (ProcessSource *process_source)
80 {
81 realm_debug ("all fds closed and process exited, completing");
82
83 g_assert (process_source->child_sig == 0);
84
85 if (process_source->cancel_sig) {
86 g_signal_handler_disconnect (process_source->cancellable, process_source->cancel_sig);
87 process_source->cancel_sig = 0;
88 }
89
90 g_clear_object (&process_source->cancellable);
91 g_simple_async_result_complete (process_source->res);
92
93 /* All done, the source can go away now */
94 g_source_unref ((GSource*)process_source);
95 }
96
97 static void
98 close_fd (int *fd)
99 {
100 g_assert (fd);
101 if (*fd >= 0) {
102 realm_debug ("closing fd: %d", *fd);
103 close (*fd);
104 }
105 *fd = -1;
106 }
107
108 static void
109 close_poll (GSource *source, GPollFD *poll)
110 {
111 g_source_remove_poll (source, poll);
112 close_fd (&poll->fd);
113 poll->revents = 0;
114 }
115
116 static gboolean
117 unused_callback (gpointer data)
118 {
119 /* Never called */
120 g_assert_not_reached ();
121 return FALSE;
122 }
123
124 static gboolean
125 on_process_source_prepare (GSource *source, gint *timeout_)
126 {
127 ProcessSource *process_source = (ProcessSource*)source;
128 gint i;
129
130 for (i = 0; i < NUM_FDS; ++i) {
131 if (process_source->polls[i].fd >= 0)
132 return FALSE;
133 }
134
135 /* If none of the FDs are valid, then process immediately */
136 return TRUE;
137 }
138
139 static gboolean
140 on_process_source_check (GSource *source)
141 {
142 ProcessSource *process_source = (ProcessSource*)source;
143 gint i;
144
145 for (i = 0; i < NUM_FDS; ++i) {
146 if (process_source->polls[i].fd >= 0 && process_source->polls[i].revents != 0)
147 return TRUE;
148 }
149 return FALSE;
150 }
151
152 static void
153 on_process_source_finalize (GSource *source)
154 {
155 ProcessSource *process_source = (ProcessSource*)source;
156 gint i;
157
158 g_assert (process_source->cancellable == NULL);
159 g_assert (process_source->cancel_sig == 0);
160
161 for (i = 0; i < NUM_FDS; ++i)
162 close_fd (&process_source->polls[i].fd);
163
164 g_assert (!process_source->child_pid);
165 g_assert (!process_source->child_sig);
166 }
167
168 static gboolean
169 read_output (int fd,
170 GString *buffer)
171 {
172 gchar block[1024];
173 gssize result;
174
175 g_return_val_if_fail (fd >= 0, FALSE);
176
177 do {
178 result = read (fd, block, sizeof (block));
179 if (result < 0) {
180 if (errno == EINTR || errno == EAGAIN)
181 continue;
182 return FALSE;
183 } else {
184 g_string_append_len (buffer, block, result);
185 }
186 } while (result == sizeof (block));
187
188 return TRUE;
189 }
190
191 static gboolean
192 write_input (int fd,
193 GString *buffer)
194 {
195 gssize result;
196
197 g_return_val_if_fail (fd >= 0, FALSE);
198
199 for (;;) {
200 result = write (fd, buffer->str, buffer->len);
201 if (result < 0) {
202 if (errno == EINTR || errno == EAGAIN)
203 continue;
204 return FALSE;
205 } else {
206 g_string_erase (buffer, 0, result);
207 return TRUE;
208 }
209 }
210 }
211
212 static gboolean
213 on_process_source_input (CommandClosure *command,
214 ProcessSource *process_source,
215 gint fd)
216 {
217 if (command->input == NULL)
218 return FALSE;
219 if (!write_input (fd, command->input)) {
220 g_warning ("couldn't write output data to process");
221 return FALSE;
222 }
223
224 return TRUE;
225 }
226
227 static gboolean
228 on_process_source_output (CommandClosure *command,
229 ProcessSource *process_source,
230 gint fd)
231 {
232 if (!read_output (fd, command->output)) {
233 g_warning ("couldn't read output data from process");
234 return FALSE;
235 }
236
237 return TRUE;
238 }
239
240 static gboolean
241 on_process_source_error (CommandClosure *command,
242 ProcessSource *process_source,
243 gint fd)
244 {
245 if (!read_output (fd, command->output)) {
246 g_warning ("couldn't read error data from process");
247 return FALSE;
248 }
249
250 return TRUE;
251 }
252
253 static gboolean
254 on_process_source_dispatch (GSource *source,
255 GSourceFunc unused,
256 gpointer user_data)
257 {
258 ProcessSource *process_source = (ProcessSource*)source;
259 CommandClosure *command = process_source->command;
260 GPollFD *poll;
261 guint i;
262
263 /* Standard input, no support yet */
264 poll = &process_source->polls[FD_INPUT];
265 if (poll->fd >= 0) {
266 if (poll->revents & G_IO_OUT)
267 if (!on_process_source_input (command, process_source, poll->fd))
268 poll->revents |= G_IO_HUP;
269 if (poll->revents & G_IO_HUP)
270 close_poll (source, poll);
271 poll->revents = 0;
272 }
273
274 /* Standard output */
275 poll = &process_source->polls[FD_OUTPUT];
276 if (poll->fd >= 0) {
277 if (poll->revents & G_IO_IN)
278 if (!on_process_source_output (command, process_source, poll->fd))
279 poll->revents |= G_IO_HUP;
280 if (poll->revents & G_IO_HUP)
281 close_poll (source, poll);
282 poll->revents = 0;
283 }
284
285 /* Standard error */
286 poll = &process_source->polls[FD_ERROR];
287 if (poll->fd >= 0) {
288 if (poll->revents & G_IO_IN)
289 if (!on_process_source_error (command, process_source, poll->fd))
290 poll->revents |= G_IO_HUP;
291 if (poll->revents & G_IO_HUP)
292 close_poll (source, poll);
293 poll->revents = 0;
294 }
295
296 for (i = 0; i < NUM_FDS; ++i) {
297 if (process_source->polls[i].fd >= 0)
298 return TRUE;
299 }
300
301 /* Because we return below */
302 command->source_sig = 0;
303
304 if (!process_source->child_pid)
305 complete_source_is_done (process_source);
306
307 return FALSE; /* Disconnect this source */
308 }
309
310 static GSourceFuncs process_source_funcs = {
311 on_process_source_prepare,
312 on_process_source_check,
313 on_process_source_dispatch,
314 on_process_source_finalize,
315 };
316
317 static void
318 on_unix_process_child_exited (GPid pid,
319 gint status,
320 gpointer user_data)
321 {
322 ProcessSource *process_source = user_data;
323 CommandClosure *command = process_source->command;
324 gint code;
325 guint i;
326
327 realm_debug ("process exited: %d", (int)pid);
328
329 g_spawn_close_pid (process_source->child_pid);
330 process_source->child_pid = 0;
331 process_source->child_sig = 0;
332
333 if (WIFEXITED (status)) {
334 command->exit_code = WEXITSTATUS (status);
335
336 } else if (WIFSIGNALED (status)) {
337 code = WTERMSIG (status);
338 /* Ignore cases where we've signaled the process because we were cancelled */
339 if (!command->cancelled)
340 g_simple_async_result_set_error (process_source->res, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED,
341 "Process was terminated with signal: %d", code);
342 }
343
344 for (i = 0; i < NUM_FDS; ++i) {
345 if (process_source->polls[i].fd >= 0)
346 return;
347 }
348
349 complete_source_is_done (process_source);
350 }
351
352 static void
353 on_unix_process_child_setup (gpointer user_data)
354 {
355 int *child_fds = user_data;
356 long val;
357 guint i;
358
359 /*
360 * Clear close-on-exec flag for these file descriptors, so that
361 * gnupg can write to them
362 */
363
364 for (i = 0; i < NUM_FDS; i++) {
365 if (child_fds[i] >= 0) {
366 val = fcntl (child_fds[i], F_GETFD);
367 fcntl (child_fds[i], F_SETFD, val & ~FD_CLOEXEC);
368 }
369 }
370 }
371
372 static void
373 on_cancellable_cancelled (GCancellable *cancellable,
374 gpointer user_data)
375 {
376 ProcessSource *process_source = user_data;
377
378 realm_debug ("process cancelled");
379
380 /* Set an error, which is respected when this actually completes. */
381 g_simple_async_result_set_error (process_source->res, G_IO_ERROR, G_IO_ERROR_CANCELLED,
382 "The operation was cancelled");
383 process_source->command->cancelled = TRUE;
384
385 /* Try and kill the child process */
386 if (process_source->child_pid) {
387 realm_debug ("sending term signal to process: %d",
388 (int)process_source->child_pid);
389 kill (process_source->child_pid, SIGTERM);
390 }
391 }
392
393 void
394 realm_command_run_async (gchar **environ,
395 GDBusMethodInvocation *invocation,
396 GCancellable *cancellable,
397 GAsyncReadyCallback callback,
398 gpointer user_data,
399 const gchar *name_or_path,
400 ...)
401 {
402 GPtrArray *array;
403 va_list va;
404 gchar *arg;
405
406 g_return_if_fail (name_or_path != NULL);
407 g_return_if_fail (invocation == NULL || G_IS_DBUS_METHOD_INVOCATION (invocation));
408 g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
409
410 array = g_ptr_array_new ();
411 g_ptr_array_add (array, (gchar *)name_or_path);
412
413 va_start (va, name_or_path);
414 do {
415 arg = va_arg (va, gchar *);
416 g_ptr_array_add (array, arg);
417 } while (arg != NULL);
418 va_end (va);
419
420 realm_command_runv_async ((gchar **)array->pdata, environ, invocation,
421 cancellable, callback, user_data);
422 }
423
424 void
425 realm_command_runv_async (gchar **argv,
426 gchar **environ,
427 GDBusMethodInvocation *invocation,
428 GCancellable *cancellable,
429 GAsyncReadyCallback callback,
430 gpointer user_data)
431 {
432 GSimpleAsyncResult *res;
433 CommandClosure *command;
434 GError *error = NULL;
435 int child_fds[NUM_FDS];
436 int output_fd = -1;
437 int error_fd = -1;
438 int input_fd = -1;
439 ProcessSource *process_source;
440 GSource *source;
441 GPid pid;
442 guint i;
443
444 g_return_if_fail (argv != NULL);
445 g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
446 g_return_if_fail (invocation == NULL || G_IS_DBUS_METHOD_INVOCATION (invocation));
447
448 for (i = 0; i < NUM_FDS; i++)
449 child_fds[i] = -1;
450
451 /* TODO: Figure out if it's a name, and lookup the path */
452
453 /* Spawn/child will close all other attributes, besides thesthose in child_fds */
454 child_fds[FD_INPUT] = 0;
455 child_fds[FD_OUTPUT] = 1;
456 child_fds[FD_ERROR] = 2;
457
458 if (realm_debugging) {
459 gchar *command = g_strjoinv (" ", argv);
460 realm_debug ("running command: %s", command);
461 realm_diagnostics_info (invocation, "%s", command);
462 g_free (command);
463
464 if (environ) {
465 gchar *environment = g_strjoinv (", ", (gchar**)environ);
466 realm_debug ("process environment: %s", environment);
467 g_free (environment);
468 }
469 }
470
471 g_spawn_async_with_pipes (NULL, argv, environ,
472 G_SPAWN_DO_NOT_REAP_CHILD,
473 on_unix_process_child_setup, child_fds,
474 &pid, &input_fd, &output_fd, &error_fd, &error);
475
476 res = g_simple_async_result_new (NULL, callback, user_data, realm_command_runv_async);
477 command = g_slice_new0 (CommandClosure);
478 command->input = NULL;
479 command->output = g_string_sized_new (128);
480 command->invocation = invocation ? g_object_ref (invocation) : NULL;
481 g_simple_async_result_set_op_res_gpointer (res, command, command_closure_free);
482
483 if (error) {
484 g_simple_async_result_take_error (res, error);
485 g_simple_async_result_complete_in_idle (res);
486 g_object_unref (res);
487 return;
488 }
489
490 realm_debug ("process started: %d", (int)pid);
491
492 source = g_source_new (&process_source_funcs, sizeof (ProcessSource));
493
494 /* Initialize the source */
495 process_source = (ProcessSource *)source;
496 for (i = 0; i < NUM_FDS; i++)
497 process_source->polls[i].fd = -1;
498 process_source->res = g_object_ref (res);
499 process_source->command = command;
500 process_source->child_pid = pid;
501
502 process_source->polls[FD_INPUT].fd = input_fd;
503 if (input_fd >= 0) {
504 process_source->polls[FD_INPUT].events = G_IO_HUP | G_IO_OUT;
505 g_source_add_poll (source, &process_source->polls[FD_INPUT]);
506 }
507 process_source->polls[FD_OUTPUT].fd = output_fd;
508 if (output_fd >= 0) {
509 process_source->polls[FD_OUTPUT].events = G_IO_HUP | G_IO_IN;
510 g_source_add_poll (source, &process_source->polls[FD_OUTPUT]);
511 }
512 process_source->polls[FD_ERROR].fd = error_fd;
513 if (error_fd >= 0) {
514 process_source->polls[FD_ERROR].events = G_IO_HUP | G_IO_IN;
515 g_source_add_poll (source, &process_source->polls[FD_ERROR]);
516 }
517
518 if (cancellable) {
519 process_source->cancellable = g_object_ref (cancellable);
520 process_source->cancel_sig = g_cancellable_connect (cancellable,
521 G_CALLBACK (on_cancellable_cancelled),
522 g_source_ref (source),
523 (GDestroyNotify)g_source_unref);
524 }
525
526 g_assert (command->source_sig == 0);
527 g_source_set_callback (source, unused_callback, NULL, NULL);
528 command->source_sig = g_source_attach (source, g_main_context_default ());
529
530 /* This assumes the outstanding reference to source */
531 g_assert (process_source->child_sig == 0);
532 process_source->child_sig = g_child_watch_add_full (G_PRIORITY_DEFAULT, pid,
533 on_unix_process_child_exited,
534 g_source_ref (source),
535 (GDestroyNotify)g_source_unref);
536
537 /* source is unreffed in complete_if_source_is_done() */
538 }
539
540 static gboolean
541 is_only_whitespace (const gchar *string)
542 {
543 while (*string != '\0') {
544 if (!g_ascii_isspace (*string))
545 return FALSE;
546 string++;
547 }
548
549 return TRUE;
550 }
551
552 void
553 realm_command_run_known_async (const gchar *known_command,
554 gchar **environ,
555 GDBusMethodInvocation *invocation,
556 GCancellable *cancellable,
557 GAsyncReadyCallback callback,
558 gpointer user_data)
559 {
560 const gchar *command_line;
561 GError *error = NULL;
562 gchar **argv;
563 gint unused;
564
565 const gchar *empty_argv[] = {
566 "/bin/true",
567 "empty-configured-command",
568 known_command,
569 NULL,
570 };
571
572 const gchar *invalid_argv[] = {
573 "/bin/false",
574 "invalid-configured-command",
575 known_command,
576 NULL
577 };
578
579 g_return_if_fail (known_command != NULL);
580 g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
581 g_return_if_fail (invocation == NULL || G_IS_DBUS_METHOD_INVOCATION (invocation));
582
583 command_line = realm_settings_value ("commands", known_command);
584 if (command_line == NULL) {
585 g_warning ("Couldn't find the configured string commands/%s", known_command);
586 argv = g_strdupv ((gchar **)invalid_argv);
587
588 } else if (is_only_whitespace (command_line)) {
589 argv = g_strdupv ((gchar **)empty_argv);
590
591 } else if (!g_shell_parse_argv (command_line, &unused, &argv, &error)) {
592 g_warning ("Couldn't parse the command line: %s: %s", command_line, error->message);
593 g_error_free (error);
594 argv = g_strdupv ((gchar **)invalid_argv);
595 }
596
597 realm_command_runv_async (argv, environ, invocation, cancellable, callback, user_data);
598 g_strfreev (argv);
599 }
600
601 gint
602 realm_command_run_finish (GAsyncResult *result,
603 GString **output,
604 GError **error)
605 {
606 GSimpleAsyncResult *res;
607 CommandClosure *command;
608
609 g_return_val_if_fail (error == NULL || *error == NULL, -1);
610 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
611 realm_command_runv_async), -1);
612
613 res = G_SIMPLE_ASYNC_RESULT (result);
614
615 if (g_simple_async_result_propagate_error (res, error))
616 return -1;
617
618 command = g_simple_async_result_get_op_res_gpointer (res);
619 if (command->output->len)
620 realm_diagnostics_info_data (command->invocation,
621 command->output->str,
622 command->output->len);
623 if (output) {
624 *output = command->output;
625 command->output = NULL;
626 }
627
628 return command->exit_code;
629 }
0 /*
1 * Copyright (C) 2011 Collabora Ltd.
2 * Copyright (C) 2012 Red Hat Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation; either version 2.1 of
7 * the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 * 02111-1307, USA.
18 *
19 * Author: Stef Walter <stefw@collabora.co.uk>
20 */
21
22 #ifndef REALM_COMMAND_H
23 #define REALM_COMMAND_H
24
25 #include <gio/gio.h>
26
27 G_BEGIN_DECLS
28
29 void realm_command_run_async (gchar **environ,
30 GDBusMethodInvocation *invocation,
31 GCancellable *cancellable,
32 GAsyncReadyCallback callback,
33 gpointer user_data,
34 const gchar *name_or_path,
35 ...) G_GNUC_NULL_TERMINATED;
36
37 void realm_command_runv_async (gchar **name_or_path_and_arguments,
38 gchar **environ,
39 GDBusMethodInvocation *invocation,
40 GCancellable *cancellable,
41 GAsyncReadyCallback callback,
42 gpointer user_data);
43
44 void realm_command_run_known_async (const gchar *known_command,
45 gchar **environ,
46 GDBusMethodInvocation *invocation,
47 GCancellable *cancellable,
48 GAsyncReadyCallback callback,
49 gpointer user_data);
50
51 gint realm_command_run_finish (GAsyncResult *result,
52 GString **output,
53 GError **error);
54
55 G_END_DECLS
56
57 #endif /* REALM_COMMAND_H */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-all-provider.h"
17 #include "realm-daemon.h"
18 #define DEBUG_FLAG REALM_DEBUG_SERVICE
19 #include "realm-debug.h"
20 #include "realm-diagnostics.h"
21 #include "realm-samba-provider.h"
22 #include "realm-settings.h"
23
24 #include <glib.h>
25
26 #include <polkit/polkit.h>
27
28 #define TIMEOUT 5 * 60
29
30 static GObject *current_invocation = NULL;
31 static GMainLoop *main_loop = NULL;
32
33 static gboolean service_persist = FALSE;
34 static gint service_holds = 0;
35 static gint64 service_quit_at = 0;
36 static guint service_timeout_id = 0;
37
38 /* We use a lock here because it's called from dbus threads */
39 G_LOCK_DEFINE(polkit_authority);
40 static PolkitAuthority *polkit_authority = NULL;
41
42 static void
43 on_invocation_gone (gpointer unused,
44 GObject *where_the_object_was)
45 {
46 g_warning ("a GDBusMethodInvocation was released but the invocation was "
47 "registered as part of a realm_daemon_lock_for_action()");
48 g_assert (where_the_object_was == current_invocation);
49 current_invocation = NULL;
50 }
51
52 gboolean
53 realm_daemon_lock_for_action (GDBusMethodInvocation *invocation)
54 {
55 g_return_val_if_fail (G_IS_DBUS_METHOD_INVOCATION (invocation), FALSE);
56
57 if (current_invocation)
58 return FALSE;
59
60 current_invocation = G_OBJECT (invocation);
61 g_object_weak_ref (current_invocation, on_invocation_gone, NULL);
62
63 /* Hold the daemon up while action */
64 realm_daemon_hold ();
65
66 return TRUE;
67 }
68
69 void
70 realm_daemon_unlock_for_action (GDBusMethodInvocation *invocation)
71 {
72 g_return_if_fail (G_IS_DBUS_METHOD_INVOCATION (invocation));
73
74 if (current_invocation != G_OBJECT (invocation)) {
75 g_warning ("trying to realm_daemon_unlock_for_action() with an invocation "
76 "that is not registered as the current locked action.");
77 return;
78 }
79
80 g_object_weak_unref (current_invocation, on_invocation_gone, NULL);
81 current_invocation = NULL;
82
83 /* Matches the hold in realm_daemon_lock_for_action() */
84 realm_daemon_release ();
85 }
86
87 gboolean
88 realm_daemon_check_dbus_action (const gchar *sender,
89 const gchar *action_id)
90 {
91 PolkitAuthorizationResult *result;
92 PolkitAuthority *authority;
93 PolkitSubject *subject;
94 GError *error = NULL;
95 gboolean ret;
96
97 g_return_val_if_fail (sender != NULL, FALSE);
98 g_return_val_if_fail (action_id != NULL, FALSE);
99
100 G_LOCK (polkit_authority);
101
102 authority = polkit_authority ? g_object_ref (polkit_authority) : NULL;
103
104 G_UNLOCK (polkit_authority);
105
106 if (!authority) {
107 authority = polkit_authority_get_sync (NULL, &error);
108 if (authority == NULL) {
109 g_warning ("failure to get polkit authority: %s", error->message);
110 g_error_free (error);
111 return FALSE;
112 }
113
114 G_LOCK (polkit_authority);
115
116 if (polkit_authority == NULL) {
117 polkit_authority = g_object_ref (authority);
118
119 } else {
120 g_object_unref (authority);
121 authority = g_object_ref (polkit_authority);
122 }
123
124 G_UNLOCK (polkit_authority);
125 }
126
127 /* do authorization async */
128 subject = polkit_system_bus_name_new (sender);
129 result = polkit_authority_check_authorization_sync (authority, subject, action_id, NULL,
130 POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION, NULL, &error);
131
132 g_object_unref (authority);
133 g_object_unref (subject);
134
135 /* failed */
136 if (result == NULL) {
137 g_warning ("couldn't check polkit authorization: %s", error->message);
138 g_error_free (error);
139 return FALSE;
140 }
141
142 ret = polkit_authorization_result_get_is_authorized (result);
143 g_object_unref (result);
144
145 return ret;
146 }
147
148 void
149 realm_daemon_hold (void)
150 {
151 g_return_if_fail (service_holds >= 0);
152
153 service_holds++;
154 }
155
156 void
157 realm_daemon_release (void)
158 {
159 g_return_if_fail (service_holds > 0);
160
161 if ((--service_holds) > 0)
162 return;
163
164 realm_daemon_poke ();
165 }
166
167 static gboolean
168 on_service_timeout (gpointer data)
169 {
170 gint seconds;
171 gint64 now;
172
173 service_timeout_id = 0;
174
175 if (service_holds > 0)
176 return FALSE;
177
178 now = g_get_monotonic_time ();
179 if (now >= service_quit_at) {
180 realm_debug ("quitting realmd service after timeout");
181 g_main_loop_quit (main_loop);
182
183 } else {
184 seconds = (service_quit_at - now) / G_TIME_SPAN_SECOND;
185 service_timeout_id = g_timeout_add_seconds (seconds + 1, on_service_timeout, NULL);
186 }
187
188 return FALSE;
189 }
190
191 void
192 realm_daemon_poke (void)
193 {
194 if (service_persist)
195 return;
196
197 service_quit_at = g_get_monotonic_time () + (TIMEOUT * G_TIME_SPAN_SECOND);
198 if (service_timeout_id == 0)
199 on_service_timeout (NULL);
200 }
201
202 static GDBusMessage *
203 on_connection_filter (GDBusConnection *connection,
204 GDBusMessage *message,
205 gboolean incoming,
206 gpointer user_data)
207 {
208 GDBusMessageType type;
209
210 /* Each time we see an incoming function call, keep the service alive */
211 if (incoming) {
212 type = g_dbus_message_get_message_type (message);
213 if (type == G_DBUS_MESSAGE_TYPE_METHOD_CALL)
214 realm_daemon_poke();
215 }
216
217 return message;
218 }
219
220 static void
221 on_bus_get_connection (GObject *source,
222 GAsyncResult *result,
223 gpointer user_data)
224 {
225 GError *error = NULL;
226 GDBusConnection **connection = (GDBusConnection **)user_data;
227
228 *connection = g_bus_get_finish (result, &error);
229 if (error != NULL) {
230 g_warning ("couldn't connect to bus: %s", error->message);
231 g_main_loop_quit (main_loop);
232 g_error_free (error);
233 } else {
234 realm_debug ("connected to bus");
235
236 /* Add a filter which keeps service alive */
237 g_dbus_connection_add_filter (*connection, on_connection_filter, NULL, NULL);
238
239 realm_diagnostics_initialize (*connection);
240 realm_samba_provider_start (*connection);
241 realm_all_provider_start (*connection);
242 }
243
244 /* Matches the hold() in main() */
245 realm_daemon_release ();
246 }
247
248 static GOptionEntry option_entries[] = {
249 { NULL }
250 };
251
252 int
253 main (int argc,
254 char *argv[])
255 {
256 GDBusConnection *connection = NULL;
257 GOptionContext *context;
258 GError *error = NULL;
259 g_type_init ();
260
261 context = g_option_context_new ("realmd");
262 g_option_context_add_main_entries (context, option_entries, NULL);
263 if (!g_option_context_parse (context, &argc, &argv, &error)) {
264 g_printerr ("%s", error->message);
265 g_option_context_free (context);
266 g_error_free (error);
267 return 2;
268 }
269
270 if (g_getenv ("REALM_PERSIST"))
271 service_persist = 1;
272
273 realm_debug_init ();
274 realm_daemon_hold ();
275
276 /* Load the platform specific data */
277 realm_settings_init ();
278
279 realm_debug ("starting service");
280 g_bus_get (G_BUS_TYPE_SYSTEM, NULL, on_bus_get_connection, &connection);
281
282 main_loop = g_main_loop_new (NULL, FALSE);
283
284 g_main_loop_run (main_loop);
285
286 if (connection != NULL) {
287 realm_all_provider_stop ();
288 realm_samba_provider_stop ();
289 g_object_unref (connection);
290 }
291
292 G_LOCK (polkit_authority);
293 g_clear_object (&polkit_authority);
294 G_UNLOCK (polkit_authority);
295
296 realm_settings_uninit ();
297
298 g_main_loop_unref (main_loop);
299 g_option_context_free (context);
300 realm_debug ("stopping service");
301 return 0;
302 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_DAEMON_H__
17 #define __REALM_DAEMON_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 gboolean realm_daemon_lock_for_action (GDBusMethodInvocation *invocation);
24
25 void realm_daemon_unlock_for_action (GDBusMethodInvocation *invocation);
26
27 void realm_daemon_hold (void);
28
29 void realm_daemon_release (void);
30
31 void realm_daemon_poke (void);
32
33 gboolean realm_daemon_check_dbus_action (const gchar *sender,
34 const gchar *action_id);
35
36 G_END_DECLS
37
38 #endif /* __REALM_DAEMON_H__ */
0 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basrealm-offset: 2; -*- */
1 /*
2 * Copyright (C) 2007 Collabora Ltd.
3 * Copyright (C) 2007 Nokia Corporation
4 * Copyright (C) 2012 Red Hat Inc.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include "config.h"
22
23 #include "realm-debug.h"
24
25 #include <errno.h>
26 #include <fcntl.h>
27 #include <stdarg.h>
28 #include <sys/stat.h>
29 #include <unistd.h>
30
31 #include <glib.h>
32 #include <glib/gstdio.h>
33
34 #ifdef WITH_DEBUG
35
36 static gsize initialized_flags = 0;
37 static RealmDebugFlags current_flags = 0;
38
39 static GDebugKey keys[] = {
40 { "process", REALM_DEBUG_PROCESS },
41 { "diagnostics", REALM_DEBUG_DIAGNOSTICS },
42 { "daemon", REALM_DEBUG_SERVICE },
43 { "packages", REALM_DEBUG_PACKAGES },
44 { 0, }
45 };
46
47 static void
48 debug_set_flags (RealmDebugFlags new_flags)
49 {
50 current_flags |= new_flags;
51 }
52
53 void
54 realm_debug_set_flags (const gchar *flags_string)
55 {
56 guint nkeys;
57
58 for (nkeys = 0; keys[nkeys].value; nkeys++);
59
60 if (flags_string)
61 debug_set_flags (g_parse_debug_string (flags_string, keys, nkeys));
62 }
63
64 static void
65 on_realm_log_debug (const gchar *log_domain,
66 GLogLevelFlags log_level,
67 const gchar *message,
68 gpointer user_data)
69 {
70 GString *gstring;
71 const gchar *progname;
72
73 gstring = g_string_new (NULL);
74
75 progname = g_get_prgname ();
76 g_string_append_printf (gstring, "(%s:%lu): %s%sDEBUG: %s\n",
77 progname ? progname : "process", (gulong)getpid (),
78 log_domain ? log_domain : "", log_domain ? "-" : "",
79 message ? message : "(NULL) message");
80
81 write (1, gstring->str, gstring->len);
82 g_string_free (gstring, TRUE);
83 }
84
85 void
86 realm_debug_init (void)
87 {
88 const gchar *messages_env;
89 const gchar *debug_env;
90
91 if (g_once_init_enter (&initialized_flags)) {
92 messages_env = g_getenv ("G_MESSAGES_DEBUG");
93 debug_env = g_getenv ("REALM_DEBUG");
94 #ifdef REALM_DEBUG
95 if (debug_env == NULL)
96 debug_env = G_STRINGIFY (REALM_DEBUG);
97 #endif
98
99 /*
100 * If the caller is selectively asking for certain debug
101 * messages with the REALM_DEBUG environment variable, then
102 * we install our own output handler and only print those
103 * messages. This happens irrespective of G_MESSAGES_DEBUG
104 */
105 if (messages_env == NULL && debug_env != NULL)
106 g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
107 on_realm_log_debug, NULL);
108
109 /*
110 * If the caller is using G_MESSAGES_DEBUG then we enable
111 * all our debug messages, and let Glib filter which ones
112 * to display.
113 */
114 if (messages_env != NULL && debug_env == NULL)
115 debug_env = "all";
116
117 realm_debug_set_flags (debug_env);
118 g_once_init_leave (&initialized_flags, 1);
119 }
120 }
121
122 gboolean
123 realm_debug_flag_is_set (RealmDebugFlags flag)
124 {
125 if G_UNLIKELY (!initialized_flags)
126 realm_debug_init ();
127 return (flag & current_flags) != 0;
128 }
129
130 void
131 realm_debug_message (RealmDebugFlags flag,
132 const gchar *format,
133 ...)
134 {
135 gchar *message;
136 va_list args;
137
138 if G_UNLIKELY (!initialized_flags)
139 realm_debug_init ();
140
141 va_start (args, format);
142 message = g_strdup_vprintf (format, args);
143 va_end (args);
144
145 if (flag & current_flags)
146 g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s", message);
147
148 g_free (message);
149 }
150
151
152 #else /* !WITH_DEBUG */
153
154 void
155 realm_debug_init (void)
156 {
157
158 }
159
160 gboolean
161 realm_debug_flag_is_set (RealmDebugFlags flag)
162 {
163 return FALSE;
164 }
165
166 void
167 realm_debug_message (RealmDebugFlags flag,
168 const gchar *format,
169 ...)
170 {
171 }
172
173 void
174 realm_debug_set_flags (const gchar *flags_string)
175 {
176 }
177
178 #endif /* !WITH_DEBUG */
0 /*
1 * Copyright (C) 2007 Nokia Corporation
2 * Copyright (C) 2007-2011 Collabora Ltd.
3 * copyright (C) 2012 Red Hat Inc.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #ifndef REALM_DEBUG_H
21 #define REALM_DEBUG_H
22
23 #include "config.h"
24
25 #include <glib.h>
26
27 G_BEGIN_DECLS
28
29 /* Please keep this enum in sync with #keys in gcr-debug.c */
30 typedef enum {
31 REALM_DEBUG_PROCESS = 1 << 1,
32 REALM_DEBUG_DIAGNOSTICS = 1 << 2,
33 REALM_DEBUG_SERVICE = 1 << 3,
34 REALM_DEBUG_PACKAGES = 1 << 4,
35 REALM_DEBUG_PROVIDER = 1 << 5
36 } RealmDebugFlags;
37
38 void realm_debug_init (void);
39
40 gboolean realm_debug_flag_is_set (RealmDebugFlags flag);
41
42 void realm_debug_set_flags (const gchar *flags_string);
43
44 void realm_debug_message (RealmDebugFlags flag,
45 const gchar *format,
46 ...) G_GNUC_PRINTF (2, 3);
47
48 G_END_DECLS
49
50 #endif /* REALM_DEBUG_H */
51
52 /* -----------------------------------------------------------------------------
53 * Below this point is outside the REALM_DEBUG_H guard - so it can take effect
54 * more than once. So you can do:
55 *
56 * #define DEBUG_FLAG REALM_DEBUG_ONE_THING
57 * #include "gcr-debug.h"
58 * ...
59 * DEBUG ("if we're debugging one thing");
60 * ...
61 * #undef DEBUG_FLAG
62 * #define DEBUG_FLAG REALM_DEBUG_OTHER_THING
63 * #include "gcr-debug.h"
64 * ...
65 * DEBUG ("if we're debugging the other thing");
66 * ...
67 */
68
69 #ifdef DEBUG_FLAG
70 #ifdef WITH_DEBUG
71
72 #undef realm_debug
73 #define realm_debug(format, ...) \
74 realm_debug_message (DEBUG_FLAG, "%s: " format, G_STRFUNC, ##__VA_ARGS__)
75
76 #undef realm_debugging
77 #define realm_debugging \
78 realm_debug_flag_is_set (DEBUG_FLAG)
79
80 #else /* !defined (WITH_DEBUG) */
81
82 #undef realm_debug
83 #define realm_debug(format, ...) \
84 do {} while (0)
85
86 #undef realm_debugging
87 #define realm_debugging 0
88
89 #endif /* !defined (WITH_DEBUG) */
90
91 #endif /* defined (DEBUG_FLAG) */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #define DEBUG_FLAG REALM_DEBUG_DIAGNOSTICS
17 #include "realm-debug.h"
18 #include "realm-dbus-constants.h"
19 #include "realm-diagnostics.h"
20
21 #include <string.h>
22 #include <syslog.h>
23
24 static GDBusConnection *the_connection = NULL;
25 static GString *line_buffer = NULL;
26
27 void
28 realm_diagnostics_initialize (GDBusConnection *connection)
29 {
30 g_return_if_fail (G_IS_DBUS_CONNECTION (connection));
31
32 if (the_connection != NULL)
33 g_object_remove_weak_pointer (G_OBJECT (the_connection),
34 (gpointer *)&the_connection);
35
36 the_connection = connection;
37 g_object_add_weak_pointer (G_OBJECT (the_connection), (gpointer *)&the_connection);
38 }
39
40 static void
41 log_syslog_and_debug (int log_level,
42 gchar *string,
43 gsize length)
44 {
45 gchar *at = string;
46 gchar *ptr;
47
48 /* Print all stderr lines as messages */
49 while ((ptr = memchr (at, '\n', length)) != NULL) {
50 *ptr = '\0';
51 if (line_buffer && line_buffer->len > 0) {
52 syslog (log_level, "%s%s", line_buffer->str, at);
53 if (realm_debugging)
54 g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s%s", line_buffer->str, at);
55 g_string_set_size (line_buffer, 0);
56 } else {
57 syslog (log_level, "%s", at);
58 if (realm_debugging)
59 g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "%s", at);
60 }
61
62 *ptr = '\n';
63 ptr++;
64 length -= (ptr - at);
65 at = ptr;
66 }
67
68 if (length != 0) {
69 if (line_buffer == NULL)
70 line_buffer = g_string_new_len (at, length);
71 else
72 g_string_append_len (line_buffer, at, length);
73 }
74 }
75
76 static void
77 log_take_diagnostic (GDBusMethodInvocation *invocation,
78 int log_level,
79 gchar *string)
80 {
81 static gboolean syslog_initialized = FALSE;
82 GError *error = NULL;
83
84 if (!syslog_initialized) {
85 openlog ("realmd", 0, LOG_AUTH);
86 syslog_initialized = TRUE;
87 }
88
89 log_syslog_and_debug (log_level, string, strlen (string));
90
91 if (!the_connection || !invocation) {
92 g_free (string);
93 return;
94 }
95
96 g_dbus_connection_emit_signal (the_connection, g_dbus_method_invocation_get_sender (invocation),
97 g_dbus_method_invocation_get_object_path (invocation),
98 REALM_DBUS_DIAGNOSTICS_INTERFACE, REALM_DBUS_DIAGNOSTICS_SIGNAL,
99 g_variant_new ("(s)", string), &error);
100
101 if (error != NULL)
102 g_warning ("couldn't emit the Diagnostics signal: %s", error->message);
103
104 g_free (string);
105 }
106
107 void
108 realm_diagnostics_info (GDBusMethodInvocation *invocation,
109 const gchar *format,
110 ...)
111 {
112 GString *message;
113 va_list va;
114
115 g_return_if_fail (invocation == NULL || G_IS_DBUS_METHOD_INVOCATION (invocation));
116 g_return_if_fail (format != NULL);
117
118 va_start (va, format);
119 message = g_string_new (" * ");
120 g_string_append_vprintf (message, format, va);
121 va_end (va);
122
123 if (!g_str_has_suffix (message->str, "\n"))
124 g_string_append_c (message, '\n');
125
126 log_take_diagnostic (invocation, LOG_INFO, g_string_free (message, FALSE));
127 }
128
129 void
130 realm_diagnostics_error (GDBusMethodInvocation *invocation,
131 GError *error,
132 const gchar *format,
133 ...)
134 {
135 GString *message;
136 va_list va;
137
138 g_return_if_fail (invocation == NULL || G_IS_DBUS_METHOD_INVOCATION (invocation));
139
140 message = g_string_new (" ! ");
141
142 if (format) {
143 va_start (va, format);
144 g_string_append_vprintf (message, format, va);
145 va_end (va);
146 }
147
148 if (format && error)
149 g_string_append (message, ": ");
150 if (error)
151 g_string_append (message, error->message);
152
153 g_string_append_c (message, '\n');
154
155 log_take_diagnostic (invocation, LOG_INFO, g_string_free (message, FALSE));
156 }
157
158 void
159 realm_diagnostics_info_data (GDBusMethodInvocation *invocation,
160 const gchar *data,
161 gssize n_data)
162 {
163 gchar *info;
164 gsize length;
165
166 g_return_if_fail (invocation == NULL || G_IS_DBUS_METHOD_INVOCATION (invocation));
167 g_return_if_fail (data != NULL);
168
169 if (n_data == -1)
170 n_data = strlen (data);
171
172 if (g_utf8_validate (data, n_data, NULL)) {
173 info = g_strndup (data, n_data);
174
175 } else {
176 info = g_convert_with_fallback (data, n_data, "utf-8", "ascii",
177 "\xef\xbf\xbd", NULL, &length, NULL);
178 }
179
180 log_take_diagnostic (invocation, LOG_INFO, info);
181 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_DIAGNOSTICS_H__
17 #define __REALM_DIAGNOSTICS_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 void realm_diagnostics_initialize (GDBusConnection *connection);
24
25 void realm_diagnostics_info (GDBusMethodInvocation *invocation,
26 const gchar *format,
27 ...) G_GNUC_PRINTF (2, 3);
28
29 void realm_diagnostics_info_data (GDBusMethodInvocation *invocation,
30 const gchar *data,
31 gssize n_data);
32
33 void realm_diagnostics_error (GDBusMethodInvocation *invocation,
34 GError *error,
35 const gchar *format,
36 ...) G_GNUC_PRINTF (3, 4);
37
38 G_END_DECLS
39
40 #endif /* __REALM_DIAGNOSTICS_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-discovery.h"
17
18 GHashTable *
19 realm_discovery_new (void)
20 {
21 return g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
22 (GDestroyNotify)g_variant_unref);
23 }
24
25 void
26 realm_discovery_add_string (GHashTable *discovery,
27 const gchar *type,
28 const gchar *value)
29 {
30 g_return_if_fail (type != NULL);
31 g_return_if_fail (value != NULL);
32
33 if (discovery != NULL)
34 realm_discovery_add_variant (discovery, type, g_variant_new_string (value));
35 }
36
37 void
38 realm_discovery_add_variant (GHashTable *discovery,
39 const gchar *type,
40 GVariant *value)
41 {
42 g_return_if_fail (type != NULL);
43 g_return_if_fail (value != NULL);
44
45 if (discovery != NULL)
46 g_hash_table_insert (discovery, g_strdup (type), g_variant_ref_sink (value));
47 }
48
49 GVariant *
50 realm_discovery_to_variant (GHashTable *discovery)
51 {
52 GPtrArray *entries;
53 GHashTableIter iter;
54 GVariant *result;
55 gpointer key, value;
56 GVariant *entry;
57
58 entries = g_ptr_array_new ();
59
60 if (discovery != NULL) {
61 g_hash_table_iter_init (&iter, discovery);
62 while (g_hash_table_iter_next (&iter, &key, &value)) {
63 entry = g_variant_new_dict_entry (g_variant_new_string (key),
64 g_variant_new_variant (value));
65 g_ptr_array_add (entries, entry);
66 }
67 }
68
69 result = g_variant_new_array (G_VARIANT_TYPE ("{sv}"),
70 (GVariant * const *)entries->pdata,
71 entries->len);
72
73 g_ptr_array_free (entries, TRUE);
74 return result;
75 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_DISCOVERY_H__
17 #define __REALM_DISCOVERY_H__
18
19 #include <glib.h>
20
21 G_BEGIN_DECLS
22
23 GHashTable * realm_discovery_new (void);
24
25 void realm_discovery_add_string (GHashTable *discovery,
26 const gchar *type,
27 const gchar *value);
28
29 void realm_discovery_add_variant (GHashTable *discovery,
30 const gchar *type,
31 GVariant *value);
32
33 GVariant * realm_discovery_to_variant (GHashTable *discovery);
34
35 G_END_DECLS
36
37 #endif /* __REALM_AD_DISCOVER_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-dbus-constants.h"
17 #include "realm-errors.h"
18
19 #include <glib.h>
20
21 static const GDBusErrorEntry realm_error_entries[] = {
22 { REALM_ERROR_INTERNAL, REALM_DBUS_ERROR_INTERNAL },
23 { REALM_ERROR_DISCOVERY_FAILED, REALM_DBUS_ERROR_DISCOVERY_FAILED },
24 { REALM_ERROR_ENROLL_FAILED, REALM_DBUS_ERROR_ENROLL_FAILED },
25 { REALM_ERROR_UNENROLL_FAILED, REALM_DBUS_ERROR_UNENROLL_FAILED },
26 { REALM_ERROR_BUSY, REALM_DBUS_ERROR_BUSY },
27 { REALM_ERROR_ALREADY_ENROLLED, REALM_DBUS_ERROR_ALREADY_ENROLLED },
28 { REALM_ERROR_NOT_ENROLLED, REALM_DBUS_ERROR_NOT_ENROLLED },
29 { REALM_ERROR_AUTH_FAILED, REALM_DBUS_ERROR_AUTH_FAILED },
30 };
31
32 /*
33 * If there's a compilation error here, then the realm_error_entries
34 * array above is not synced with the RealmErrorCodes enum in realm-errors.h.
35 */
36 G_STATIC_ASSERT (G_N_ELEMENTS (realm_error_entries) == _NUM_REALM_ERRORS);
37
38 GQuark
39 realm_error_quark (void)
40 {
41 static volatile gsize quark_volatile = 0;
42
43 g_dbus_error_register_error_domain ("realmd-error",
44 &quark_volatile,
45 realm_error_entries,
46 G_N_ELEMENTS (realm_error_entries));
47
48 return (GQuark)quark_volatile;
49 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_ERRORS_H__
17 #define __REALM_ERRORS_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 #define REALM_ERROR (realm_error_quark ())
24
25 GQuark realm_error_quark (void) G_GNUC_CONST;
26
27 typedef enum {
28 REALM_ERROR_INTERNAL,
29 REALM_ERROR_DISCOVERY_FAILED,
30 REALM_ERROR_ENROLL_FAILED,
31 REALM_ERROR_UNENROLL_FAILED,
32 REALM_ERROR_BUSY,
33 REALM_ERROR_ALREADY_ENROLLED,
34 REALM_ERROR_NOT_ENROLLED,
35 REALM_ERROR_AUTH_FAILED,
36 _NUM_REALM_ERRORS
37 } RealmErrorCodes;
38
39 G_END_DECLS
40
41 #endif /* __REALM_ERRORS_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-settings.h"
17 #include "realm-ini-config.h"
18
19 #include <string.h>
20
21 #define REALM_INI_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), REALM_TYPE_INI_CONFIG, RealmIniConfigClass))
22 #define REALM_IS_INI_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), REALM_TYPE_INI_CONFIG))
23 #define REALM_INI_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), REALM_TYPE_INI_CONFIG, RealmIniConfigClass))
24
25 typedef struct _ConfigLine {
26 gchar *name;
27 GBytes *bytes;
28 struct _ConfigLine *prev;
29 struct _ConfigLine *next;
30 } ConfigLine;
31
32 typedef struct {
33 GHashTable *parameters;
34 ConfigLine *tail;
35 } ConfigSection;
36
37 struct _RealmIniConfig {
38 GObject parent;
39 gint flags;
40 GHashTable *sections;
41 ConfigLine *head;
42 ConfigLine *tail;
43
44 gchar *filename;
45 GFileMonitor *monitor;
46 gulong monitor_sig;
47 guint reload_scheduled;
48 };
49
50 typedef struct {
51 GObjectClass parent_class;
52 } RealmIniConfigClass;
53
54 enum {
55 PROP_0,
56 PROP_FLAGS
57 };
58
59 enum {
60 CHANGED,
61 NUM_SIGNALS
62 };
63 static guint signals[NUM_SIGNALS] = { 0, };
64
65 G_DEFINE_TYPE (RealmIniConfig, realm_ini_config, G_TYPE_OBJECT);
66
67 static guint
68 conf_str_hash (gconstpointer v)
69 {
70 const signed char *p;
71 guint32 h = 5381;
72
73 /* Case insensitive for ascii */
74 for (p = v; *p != '\0'; p++)
75 h = (h << 5) + h + g_ascii_tolower (*p);
76
77 return h;
78 }
79
80 static gboolean
81 conf_str_equal (gconstpointer v1,
82 gconstpointer v2)
83 {
84 const gchar *string1 = v1;
85 const gchar *string2 = v2;
86
87 /* Case insensitive for ascii */
88 return g_ascii_strcasecmp (string1, string2) == 0;
89 }
90
91 static void
92 config_section_free (gpointer data)
93 {
94 ConfigSection *sect = data;
95 g_hash_table_destroy (sect->parameters);
96 g_slice_free (ConfigSection, sect);
97 }
98
99 static void
100 config_line_free (gpointer data)
101 {
102 ConfigLine *line = data;
103 g_free (line->name);
104 g_bytes_unref (line->bytes);
105 g_slice_free (ConfigLine, line);
106 }
107
108 static void
109 realm_ini_config_init (RealmIniConfig *self)
110 {
111 self->sections = g_hash_table_new_full (conf_str_hash, conf_str_equal,
112 NULL, config_section_free);
113 }
114
115 static void
116 realm_ini_config_set_property (GObject *obj,
117 guint prop_id,
118 const GValue *value,
119 GParamSpec *pspec)
120 {
121 RealmIniConfig *self = REALM_INI_CONFIG (obj);
122
123 switch (prop_id) {
124 case PROP_FLAGS:
125 self->flags = g_value_get_int (value);
126 break;
127 default:
128 G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec);
129 break;
130 }
131 }
132
133 static gboolean
134 on_changes_reload_file (gpointer user_data)
135 {
136 RealmIniConfig *self = REALM_INI_CONFIG (user_data);
137 realm_ini_config_reload (self);
138 return FALSE; /* don't call this timeout again */
139 }
140
141 static void
142 on_directory_changed (GFileMonitor *monitor,
143 GFile *file,
144 GFile *other_file,
145 GFileMonitorEvent event_type,
146 gpointer user_data)
147 {
148 RealmIniConfig *self = REALM_INI_CONFIG (user_data);
149 gchar *event_base;
150 gchar *our_base;
151
152 switch (event_type) {
153 case G_FILE_MONITOR_EVENT_CHANGED:
154 case G_FILE_MONITOR_EVENT_CREATED:
155 case G_FILE_MONITOR_EVENT_DELETED:
156 break;
157 default:
158 return;
159 }
160
161 if (!self->filename)
162 return;
163
164 event_base = g_file_get_basename (file);
165 our_base = g_path_get_basename (self->filename);
166
167 /* If it's our file, then schedule a reload */
168 if (g_strcmp0 (event_base, our_base) == 0) {
169 if (self->reload_scheduled == 0)
170 self->reload_scheduled = g_timeout_add (1, on_changes_reload_file, self);
171 }
172
173 g_free (event_base);
174 g_free (our_base);
175 }
176
177 const gchar *
178 realm_ini_config_get_filename (RealmIniConfig *self)
179 {
180 return self->filename;
181 }
182
183 void
184 realm_ini_config_set_filename (RealmIniConfig *self,
185 const gchar *filename)
186 {
187 GError *error = NULL;
188 GFile *directory;
189 GFile *file;
190
191 /* Already connected to this filename */
192 if (g_strcmp0 (self->filename, filename) == 0)
193 return;
194
195 if (self->monitor) {
196 g_signal_handler_disconnect (self->monitor, self->monitor_sig);
197 g_object_unref (self->monitor);
198 self->monitor = NULL;
199 self->monitor_sig = 0;
200 }
201
202 if (self->reload_scheduled)
203 g_source_remove (self->reload_scheduled);
204 self->reload_scheduled = 0;
205
206 g_free (self->filename);
207 self->filename = NULL;
208
209 if (!filename)
210 return;
211
212 self->filename = g_strdup (filename);
213
214 /*
215 * Setup a file monitor. Have to monitor directory, since the file
216 * could theoretically not exist yet.
217 */
218 if (!(self->flags & REALM_INI_NO_WATCH)) {
219 file = g_file_new_for_path (self->filename);
220 directory = g_file_get_parent (file);
221 self->monitor = g_file_monitor_directory (directory, G_FILE_MONITOR_NONE,
222 NULL, &error);
223 if (error == NULL) {
224 self->monitor_sig = g_signal_connect (self->monitor, "changed",
225 G_CALLBACK (on_directory_changed),
226 self);
227 } else {
228 g_warning ("Couldn't monitor directory: %s", error->message);
229 g_error_free (error);
230 }
231 g_object_unref (directory);
232 g_object_unref (file);
233 }
234 }
235
236 static void
237 reset_config_data (RealmIniConfig *self)
238 {
239 ConfigLine *line, *next;
240
241 g_hash_table_remove_all (self->sections);
242 for (line = self->head; line != NULL; line = next) {
243 next = line->next;
244 config_line_free (line);
245 }
246 self->head = NULL;
247 self->tail = NULL;
248 }
249
250 static void
251 realm_ini_config_finalize (GObject *obj)
252 {
253 RealmIniConfig *self = REALM_INI_CONFIG (obj);
254
255 /* Should free filename and clear up monitors */
256 realm_ini_config_set_filename (self, NULL);
257 reset_config_data (self);
258
259 g_hash_table_destroy (self->sections);
260
261 G_OBJECT_CLASS (realm_ini_config_parent_class)->finalize (obj);
262 }
263
264 static void
265 realm_ini_config_class_init (RealmIniConfigClass *klass)
266 {
267 GObjectClass *object_class = G_OBJECT_CLASS (klass);
268
269 object_class->set_property = realm_ini_config_set_property;
270 object_class->finalize = realm_ini_config_finalize;
271
272 g_object_class_install_property (object_class, PROP_FLAGS,
273 g_param_spec_int ("flags", "Flags", "Ini file flags",
274 0, G_MAXINT, 0, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
275
276 signals[CHANGED] = g_signal_new ("changed", REALM_TYPE_INI_CONFIG, G_SIGNAL_RUN_FIRST,
277 0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0);
278 }
279
280 enum {
281 NONE,
282 COMMENT,
283 SECTION,
284 PARAMETER,
285 INVALID
286 };
287
288 static gint
289 parse_config_line_type_and_name (GBytes *bytes,
290 gchar **name)
291 {
292 const gchar *from;
293 const gchar *end;
294 const gchar *at;
295 gsize len;
296
297 *name = NULL;
298
299 at = g_bytes_get_data (bytes, &len);
300 end = at + len;
301
302 /* Skip initial spaces */
303 while (at < end && g_ascii_isspace (*at))
304 at++;
305
306 if (at == end)
307 return NONE;
308
309 /* A comment? */
310 if (*at == '#' || *at == ';')
311 return COMMENT;
312
313 /* A section? */
314 if (*at == '[') {
315 at++;
316 from = at;
317
318 while (at < end && *at != ']' && *at != '\n')
319 at++;
320 if (at < end && *at == ']' && at > from) {
321 *name = g_strndup (from, at - from);
322 return SECTION;
323 }
324
325 return NONE;
326 }
327
328 /* A parameter? */
329 from = at;
330 at = memchr (from, '=', end - from);
331 if (at != NULL && at > from) {
332 while (at - 1 > from && g_ascii_isspace (*(at - 1)))
333 at--;
334 if (at > from) {
335 *name = g_strndup (from, at - from);
336 return PARAMETER;
337 }
338 }
339
340 return INVALID;
341 }
342
343 static void
344 remove_new_lines (RealmIniConfig *self,
345 GString *value)
346 {
347 gsize offset = 0;
348
349 /* Remove all \r charaters from DOS style endings */
350 for (;;) {
351 gchar *at = strchr (value->str + offset, '\r');
352 if (at == NULL)
353 break;
354 g_string_erase (value, at - value->str, 1);
355 }
356
357 offset = 0;
358
359 /* Remove all \n characters, including escaped newlines */
360 for (;;) {
361 gchar *at = strchr (value->str + offset, '\n');
362 if (at == NULL)
363 break;
364 if ((self->flags & REALM_INI_LINE_CONTINUATIONS) &&
365 (at > value->str && *(at - 1) == '\\'))
366 g_string_erase (value, (at - 1) - value->str, 2);
367 else
368 g_string_erase (value, at - value->str, 1);
369 }
370 }
371
372 static gchar *
373 parse_config_line_value (RealmIniConfig *self,
374 GBytes *bytes)
375 {
376 GString *value;
377 const gchar *end;
378 const gchar *at;
379 gsize len;
380
381 at = g_bytes_get_data (bytes, &len);
382 end = at + len;
383
384 /* Should always have an = when parsed */
385 at = memchr (at, '=', end - at);
386 g_return_val_if_fail (at != NULL, NULL);
387
388 at++;
389
390 /* Skip spaces after equal */
391 while (at < end && g_ascii_isspace (*at))
392 at++;
393
394 value = g_string_new_len (at, end - at);
395
396 /* Remove any continuations and line endings */
397 remove_new_lines (self, value);
398
399 return g_strstrip (g_string_free (value, FALSE));
400 }
401
402 static void
403 append_config_line (RealmIniConfig *self,
404 ConfigLine *line)
405 {
406 if (self->tail == NULL) {
407 self->head = line;
408 self->tail = line;
409 } else {
410 self->tail->next = line;
411 line->prev = self->tail;
412 self->tail = line;
413 }
414 }
415
416 static void
417 insert_config_line (RealmIniConfig *self,
418 ConfigLine *after,
419 ConfigLine *line)
420 {
421 g_assert (after != NULL);
422 g_assert (line != NULL);
423
424 line->next = after->next;
425 line->prev = after;
426 if (after->next)
427 after->next->prev = line;
428 after->next = line;
429 }
430
431 static void
432 remove_config_line (RealmIniConfig *self,
433 ConfigLine *line)
434 {
435 g_assert (line != NULL);
436
437 /* We only get called for parameters in sections */
438 g_assert (line->prev != NULL);
439 g_assert (self->head != line);
440
441 if (line->next)
442 line->next->prev = line->prev;
443 line->prev->next = line->next;
444 }
445
446 static void
447 parse_config_line (RealmIniConfig *self,
448 GBytes *bytes,
449 ConfigSection **current)
450 {
451 ConfigSection *sect;
452 ConfigLine *line;
453 gchar *name = NULL;
454 gint type;
455
456 line = g_slice_new0 (ConfigLine);
457 line->bytes = g_bytes_ref (bytes);
458
459 /* What kind of line is this? */
460 type = parse_config_line_type_and_name (bytes, &name);
461 switch (type) {
462 case SECTION:
463 sect = g_hash_table_lookup (self->sections, name);
464 if (sect == NULL) {
465 sect = g_slice_new0 (ConfigSection);
466 sect->parameters = g_hash_table_new (conf_str_hash, conf_str_equal);
467 g_hash_table_replace (self->sections, name, sect);
468 sect->tail = line;
469 }
470 *current = sect;
471 break;
472 case PARAMETER:
473 if (*current != NULL)
474 g_hash_table_insert ((*current)->parameters, name, line);
475 break;
476 }
477
478 line->name = name;
479 append_config_line (self, line);
480
481 /* Add this line as the end of the current section */
482 if (type != NONE && *current != NULL)
483 (*current)->tail = line;
484 }
485
486 static void
487 parse_config_bytes (RealmIniConfig *self,
488 GBytes *bytes)
489 {
490 ConfigSection *current;
491 GBytes *line;
492 const gchar *beg;
493 const gchar *end;
494 const gchar *at;
495 const gchar *from;
496 gsize len;
497
498 /* Clear the current data */
499 reset_config_data (self);
500
501 current = NULL;
502
503 beg = from = at = g_bytes_get_data (bytes, &len);
504 end = at + len;
505
506 for (;;) {
507 const gchar *search = at;
508 at = memchr (search, '\n', end - search);
509 if (at == NULL) {
510 line = g_bytes_new_from_bytes (bytes,
511 from - beg,
512 end - from);
513
514 } else {
515 const gchar *last = at > search ? at - 1 : NULL;
516 at++;
517
518 /* Line continuation */
519 if ((self->flags & REALM_INI_LINE_CONTINUATIONS) &&
520 (last != NULL && *last == '\\'))
521 continue;
522
523 line = g_bytes_new_from_bytes (bytes,
524 from - beg,
525 at - from);
526 }
527
528 parse_config_line (self, line, &current);
529 g_bytes_unref (line);
530
531 if (at == NULL)
532 break;
533 from = at;
534 }
535
536 g_signal_emit (self, signals[CHANGED], 0);
537 }
538
539 void
540 realm_ini_config_read_string (RealmIniConfig *self,
541 const gchar *data)
542 {
543 GBytes *bytes;
544
545 g_return_if_fail (REALM_IS_INI_CONFIG (self));
546 g_return_if_fail (data != NULL);
547
548 bytes = g_bytes_new (data, strlen (data));
549 realm_ini_config_read_bytes (self, bytes);
550 g_bytes_unref (bytes);
551 }
552
553 void
554 realm_ini_config_read_bytes (RealmIniConfig *self,
555 GBytes *bytes)
556 {
557 g_return_if_fail (REALM_IS_INI_CONFIG (self));
558 g_return_if_fail (bytes != NULL);
559
560 realm_ini_config_set_filename (self, NULL);
561 parse_config_bytes (self, bytes);
562 }
563
564 GBytes *
565 realm_ini_config_write_bytes (RealmIniConfig *self)
566 {
567 ConfigLine *line;
568 GString *result;
569 const gchar *data;
570 gsize len;
571
572 g_return_val_if_fail (REALM_IS_INI_CONFIG (self), NULL);
573
574 result = g_string_sized_new (4096);
575 for (line = self->head; line != NULL; line = line->next) {
576 /*
577 * Add \n between lines if not already present. This happens
578 * if the file was parsed without a trailing \n, and then
579 * stuff was added to the end.
580 */
581 if (result->len > 0 && result->str[result->len - 1] != '\n')
582 g_string_append_c (result, '\n');
583
584 data = g_bytes_get_data (line->bytes, &len);
585 g_string_append_len (result, data, len);
586 }
587
588 len = result->len;
589 return g_bytes_new_take (g_string_free (result, FALSE), len);
590 }
591
592 gboolean
593 realm_ini_config_read_file (RealmIniConfig *self,
594 const gchar *filename,
595 GError **error)
596 {
597 GError *err = NULL;
598 GBytes *bytes;
599 gchar *contents;
600 gsize length;
601
602 g_return_val_if_fail (REALM_IS_INI_CONFIG (self), FALSE);
603 g_return_val_if_fail (filename != NULL, FALSE);
604 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
605
606 g_file_get_contents (filename, &contents, &length, &err);
607
608 /* Ignore errors of the file not existing */
609 if (g_error_matches (err, G_FILE_ERROR, G_FILE_ERROR_NOENT))
610 g_clear_error (&err);
611
612 if (err != NULL) {
613 g_propagate_error (error, err);
614 return FALSE;
615 }
616
617 bytes = g_bytes_new_take (contents, length);
618 parse_config_bytes (self, bytes);
619 g_bytes_unref (bytes);
620
621 realm_ini_config_set_filename (self, filename);
622 return TRUE;
623 }
624
625 gboolean
626 realm_ini_config_write_file (RealmIniConfig *self,
627 const gchar *filename,
628 GError **error)
629 {
630 GBytes *bytes;
631 gboolean ret = TRUE;
632 const gchar *contents;
633 gsize length;
634
635 g_return_val_if_fail (REALM_IS_INI_CONFIG (self), FALSE);
636 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
637
638 if (filename == NULL)
639 filename = self->filename;
640 g_return_val_if_fail (filename != NULL, FALSE);
641
642 bytes = realm_ini_config_write_bytes (self);
643 g_return_val_if_fail (bytes != NULL, FALSE);
644
645 contents = g_bytes_get_data (bytes, &length);
646
647 /*
648 * If not writing any data, and the no file is present, don't
649 * write an empty file.
650 */
651 if (length > 0 || g_file_test (filename, G_FILE_TEST_EXISTS))
652 ret = g_file_set_contents (filename, contents, length, error);
653
654 g_bytes_unref (bytes);
655 return ret;
656 }
657
658 static void
659 config_set_value (RealmIniConfig *self,
660 const gchar *section,
661 const gchar *name,
662 const gchar *value)
663 {
664 ConfigSection *sect;
665 ConfigLine *line;
666 gchar *data;
667
668 g_return_if_fail (strchr (section, ']') == NULL);
669 g_return_if_fail (strchr (section, '[') == NULL);
670 g_return_if_fail (name != NULL);
671 g_return_if_fail (strchr (name, '=') == NULL);
672 g_return_if_fail (strchr (name, '\n') == NULL);
673 g_return_if_fail (value == NULL || strchr (value ? value : NULL, '\n') == NULL);
674
675 sect = g_hash_table_lookup (self->sections, section);
676 if (sect == NULL) {
677 /* No such section, and removing */
678 if (value == NULL)
679 return;
680
681 /* A blank line */
682 line = g_slice_new0 (ConfigLine);
683 line->bytes = g_bytes_new ("\n", 1);
684 line->name = NULL;
685 append_config_line (self, line);
686
687 /* The actual section header */
688 data = g_strdup_printf ("[%s]\n", section);
689 line = g_slice_new0 (ConfigLine);
690 line->bytes = g_bytes_new_take (data, strlen (data));
691 line->name = g_strdup (section);
692 append_config_line (self, line);
693
694 /* Register it */
695 sect = g_slice_new0 (ConfigSection);
696 sect->parameters = g_hash_table_new (conf_str_hash, conf_str_equal);
697 sect->tail = line;
698 g_hash_table_replace (self->sections, line->name, sect);
699 }
700
701 line = g_hash_table_lookup (sect->parameters, name);
702
703 /* Removing this parameter? */
704 if (value == NULL) {
705 if (line != NULL) {
706 if (sect->tail == line)
707 sect->tail = line->prev;
708 remove_config_line (self, line);
709 config_line_free (line);
710 }
711 return;
712 }
713
714 data = g_strdup_printf ("%s = %s\n", name, value);
715
716 /* Don't have this line, add to section */
717 if (line == NULL) {
718 line = g_slice_new0 (ConfigLine);
719 line->bytes = g_bytes_new_take (data, strlen (data));
720 line->name = g_strdup (name);
721 insert_config_line (self, sect->tail, line);
722
723 /* Already have this line, replace the data */
724 } else {
725 g_bytes_unref (line->bytes);
726 line->bytes = g_bytes_new_take (data, strlen (data));
727 }
728 }
729
730 void
731 realm_ini_config_set (RealmIniConfig *self,
732 const gchar *section,
733 const gchar *name,
734 const gchar *value)
735 {
736 g_return_if_fail (REALM_IS_INI_CONFIG (self));
737 g_return_if_fail (section != NULL);
738
739 config_set_value (self, section, name, value);
740 g_signal_emit (self, signals[CHANGED], 0);
741 }
742
743 gchar *
744 realm_ini_config_get (RealmIniConfig *self,
745 const gchar *section,
746 const gchar *name)
747 {
748 ConfigSection *sect;
749 ConfigLine *line;
750
751 g_return_val_if_fail (REALM_IS_INI_CONFIG (self), NULL);
752 g_return_val_if_fail (section != NULL, NULL);
753 g_return_val_if_fail (name != NULL, NULL);
754
755 sect = g_hash_table_lookup (self->sections, section);
756 if (sect == NULL)
757 return NULL;
758
759 line = g_hash_table_lookup (sect->parameters, name);
760 if (line == NULL)
761 return NULL;
762
763 return parse_config_line_value (self, line->bytes);
764 }
765
766 GHashTable *
767 realm_ini_config_get_all (RealmIniConfig *self,
768 const gchar *section)
769 {
770 GHashTableIter iter;
771 ConfigSection *sect;
772 GHashTable *result;
773 const gchar *name;
774 ConfigLine *line;
775
776 g_return_val_if_fail (REALM_IS_INI_CONFIG (self), NULL);
777 g_return_val_if_fail (section != NULL, NULL);
778 g_return_val_if_fail (name != NULL, NULL);
779
780 sect = g_hash_table_lookup (self->sections, section);
781 if (sect == NULL)
782 return NULL;
783
784 result = g_hash_table_new_full (conf_str_hash, conf_str_equal, g_free, g_free);
785
786 g_hash_table_iter_init (&iter, sect->parameters);
787 while (g_hash_table_iter_next (&iter, (gpointer *)&name, (gpointer *)&line))
788 g_hash_table_replace (result, g_strdup (name), parse_config_line_value (self, line->bytes));
789
790 return result;
791 }
792
793 void
794 realm_ini_config_set_all (RealmIniConfig *self,
795 const gchar *section,
796 GHashTable *parameters)
797 {
798 GHashTableIter iter;
799 const gchar *name;
800 const gchar *value;
801
802 g_return_if_fail (REALM_IS_INI_CONFIG (self));
803 g_return_if_fail (section != NULL);
804 g_return_if_fail (parameters != NULL);
805
806 g_hash_table_iter_init (&iter, parameters);
807 while (g_hash_table_iter_next (&iter, (gpointer *)&name, (gpointer *)&value))
808 config_set_value (self, section, name, value);
809
810 g_signal_emit (self, signals[CHANGED], 0);
811 }
812
813 gchar **
814 realm_ini_config_get_list (RealmIniConfig *self,
815 const gchar *section,
816 const gchar *name,
817 const gchar *delimiters)
818 {
819 gchar **values;
820 gchar *value;
821 gint i;
822
823 g_return_val_if_fail (REALM_IS_INI_CONFIG (self), NULL);
824 g_return_val_if_fail (section != NULL, NULL);
825 g_return_val_if_fail (name != NULL, NULL);
826 g_return_val_if_fail (delimiters != NULL, NULL);
827
828 value = realm_ini_config_get (self, section, name);
829 if (value == NULL)
830 return NULL;
831
832 values = g_strsplit_set (value, delimiters, -1);
833 for (i = 0; values[i] != NULL; i++)
834 values[i] = g_strstrip (values[i]);
835 g_free (value);
836
837 return values;
838 }
839
840 void
841 realm_ini_config_set_list (RealmIniConfig *self,
842 const gchar *section,
843 const gchar *name,
844 const gchar *delimiter,
845 const gchar **values)
846 {
847 gchar *value;
848
849 g_return_if_fail (REALM_IS_INI_CONFIG (self));
850 g_return_if_fail (section != NULL);
851 g_return_if_fail (name != NULL);
852 g_return_if_fail (delimiter != NULL);
853
854 value = g_strjoinv (delimiter, (gchar **)values);
855 realm_ini_config_set (self, section, name, value);
856 g_free (value);
857 }
858
859 gboolean
860 realm_ini_config_change (RealmIniConfig *self,
861 const gchar *section,
862 GError **error,
863 ...)
864 {
865 GHashTable *parameters;
866 const gchar *name;
867 const gchar *value;
868 gboolean ret;
869 va_list va;
870
871 g_return_val_if_fail (section != NULL, FALSE);
872 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
873
874 parameters = g_hash_table_new (g_str_hash, g_str_equal);
875 va_start (va, error);
876 while ((name = va_arg (va, const gchar *)) != NULL) {
877 value = va_arg (va, const gchar *);
878 g_hash_table_insert (parameters, (gpointer)name, (gpointer)value);
879 }
880 va_end (va);
881
882 ret = realm_ini_config_changev (self, section, parameters, error);
883 g_hash_table_unref (parameters);
884 return ret;
885 }
886
887 gboolean
888 realm_ini_config_changev (RealmIniConfig *self,
889 const gchar *section,
890 GHashTable *parameters,
891 GError **error)
892 {
893 g_return_val_if_fail (REALM_IS_INI_CONFIG (self), FALSE);
894 g_return_val_if_fail (section != NULL, FALSE);
895 g_return_val_if_fail (parameters != NULL, FALSE);
896 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
897
898 if (!realm_ini_config_read_file (self, self->filename, error))
899 return FALSE;
900
901 realm_ini_config_set_all (self, section, parameters);
902 return realm_ini_config_write_file (self, NULL, error);
903 }
904
905 static gchar **
906 update_lists_for_changes (const gchar **original,
907 const gchar **add,
908 const gchar **remove)
909 {
910 GPtrArray *changed;
911 gchar *value;
912 gint i, j;
913
914 changed = g_ptr_array_new ();
915
916 /* Filter the remove values */
917 for (i = 0; original != NULL && original[i] != NULL; i++) {
918 value = g_strstrip (g_strdup (original[i]));
919 for (j = 0; remove != NULL && remove[j] != NULL; j++) {
920 if (g_ascii_strcasecmp (remove[j], value) == 0)
921 break;
922 }
923 if ((remove == NULL || remove[j] == NULL) && !g_str_equal (value, ""))
924 g_ptr_array_add (changed, value);
925 else
926 g_free (value);
927 }
928
929 /* Add new values */
930 for (j = 0; add != NULL && add[j] != NULL; j++) {
931 for (i = 0; original != NULL && original[i] != NULL; i++) {
932 if (g_ascii_strcasecmp (add[j], original[i]) == 0)
933 break;
934 }
935 if (original == NULL || original[i] == NULL)
936 g_ptr_array_add (changed, g_strdup (add[j]));
937 }
938
939 g_ptr_array_add (changed, NULL);
940 return (gchar **)g_ptr_array_free (changed, FALSE);
941 }
942
943 gboolean
944 realm_ini_config_change_list (RealmIniConfig *self,
945 const gchar *section,
946 const gchar *name,
947 const gchar *delimiters,
948 const gchar **add,
949 const gchar **remove,
950 GError **error)
951 {
952 gchar **original;
953 gchar **changed;
954 gchar *delim;
955
956 g_return_val_if_fail (REALM_IS_INI_CONFIG (self), FALSE);
957 g_return_val_if_fail (section != NULL, FALSE);
958 g_return_val_if_fail (name != NULL, FALSE);
959 g_return_val_if_fail (delimiters != NULL, FALSE);
960 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
961
962 if (!realm_ini_config_read_file (self, self->filename, error))
963 return FALSE;
964
965 original = realm_ini_config_get_list (self, section, name, delimiters);
966 changed = update_lists_for_changes ((const gchar **)original, add, remove);
967 g_strfreev (original);
968
969 delim = g_strdup_printf ("%c ", delimiters[0]);
970 realm_ini_config_set_list (self, section, name, delim,
971 (const gchar **)changed);
972 g_strfreev (changed);
973 g_free (delim);
974
975 return realm_ini_config_write_file (self, NULL, error);
976 }
977
978 void
979 realm_ini_config_reset (RealmIniConfig *self)
980 {
981 g_return_if_fail (REALM_IS_INI_CONFIG (self));
982
983 reset_config_data (self);
984 g_signal_emit (self, signals[CHANGED], 0);
985 }
986
987 void
988 realm_ini_config_reload (RealmIniConfig *self)
989 {
990 GError *error = NULL;
991
992 g_return_if_fail (self->filename != NULL);
993
994 self->reload_scheduled = 0;
995
996 realm_ini_config_read_file (self, self->filename, &error);
997 if (error != NULL) {
998 g_warning ("Couldn't reload config file: %s: %s",
999 self->filename, error->message);
1000 g_clear_error (&error);
1001 }
1002 }
1003
1004 RealmIniConfig *
1005 realm_ini_config_new (RealmIniFlags flags)
1006 {
1007 return g_object_new (REALM_TYPE_INI_CONFIG,
1008 "flags", flags,
1009 NULL);
1010 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_INI_CONFIG_H__
17 #define __REALM_INI_CONFIG_H__
18
19 #include <gio/gio.h>
20
21 typedef enum {
22 REALM_INI_NONE = 0,
23 REALM_INI_LINE_CONTINUATIONS = 1 << 1,
24 REALM_INI_NO_WATCH = 1 << 2,
25 } RealmIniFlags;
26
27 #define REALM_TYPE_INI_CONFIG (realm_ini_config_get_type ())
28 #define REALM_INI_CONFIG(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), REALM_TYPE_INI_CONFIG, RealmIniConfig))
29 #define REALM_IS_INI_CONFIG(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), REALM_TYPE_INI_CONFIG))
30
31 typedef struct _RealmIniConfig RealmIniConfig;
32
33 GType realm_ini_config_get_type (void) G_GNUC_CONST;
34
35 RealmIniConfig * realm_ini_config_new (RealmIniFlags flags);
36
37 void realm_ini_config_reset (RealmIniConfig *self);
38
39 const gchar * realm_ini_config_get_filename (RealmIniConfig *self);
40
41 void realm_ini_config_set_filename (RealmIniConfig *self,
42 const gchar *filename);
43
44 void realm_ini_config_reload (RealmIniConfig *self);
45
46 void realm_ini_config_read_string (RealmIniConfig *self,
47 const gchar *data);
48
49 void realm_ini_config_read_bytes (RealmIniConfig *self,
50 GBytes *data);
51
52 GBytes * realm_ini_config_write_bytes (RealmIniConfig *self);
53
54 gboolean realm_ini_config_read_file (RealmIniConfig *self,
55 const gchar *filename,
56 GError **error);
57
58 gboolean realm_ini_config_write_file (RealmIniConfig *self,
59 const gchar *filename,
60 GError **error);
61
62 void realm_ini_config_set (RealmIniConfig *self,
63 const gchar *section,
64 const gchar *name,
65 const gchar *value);
66
67 gchar * realm_ini_config_get (RealmIniConfig *self,
68 const gchar *section,
69 const gchar *name);
70
71 gchar ** realm_ini_config_get_list (RealmIniConfig *self,
72 const gchar *section,
73 const gchar *name,
74 const gchar *delimiters);
75
76 void realm_ini_config_set_list (RealmIniConfig *self,
77 const gchar *section,
78 const gchar *name,
79 const gchar *delimiter,
80 const gchar **values);
81
82 GHashTable * realm_ini_config_get_all (RealmIniConfig *self,
83 const gchar *section);
84
85 void realm_ini_config_set_all (RealmIniConfig *self,
86 const gchar *section,
87 GHashTable *parameters);
88
89 gboolean realm_ini_config_change (RealmIniConfig *self,
90 const gchar *section,
91 GError **error,
92 ...);
93
94 gboolean realm_ini_config_changev (RealmIniConfig *self,
95 const gchar *section,
96 GHashTable *parameters,
97 GError **error);
98
99 gboolean realm_ini_config_change_list (RealmIniConfig *self,
100 const gchar *section,
101 const gchar *name,
102 const gchar *delimiters,
103 const gchar **add,
104 const gchar **remove,
105 GError **error);
106
107 G_END_DECLS
108
109 #endif /* __REALM_INI_CONFIG_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-daemon.h"
17 #define DEBUG_FLAG REALM_DEBUG_SERVICE
18 #include "realm-debug.h"
19 #include "realm-dbus-constants.h"
20 #include "realm-dbus-generated.h"
21 #include "realm-diagnostics.h"
22 #include "realm-errors.h"
23 #include "realm-kerberos.h"
24
25 #include <krb5/krb5.h>
26
27 #include <glib/gi18n.h>
28 #include <glib/gstdio.h>
29
30 #include <sys/types.h>
31 #include <sys/stat.h>
32 #include <errno.h>
33 #include <fcntl.h>
34
35 struct _RealmKerberosPrivate {
36 GHashTable *discovery;
37 };
38
39 enum {
40 PROP_0,
41 PROP_DISCOVERY
42 };
43
44 static void realm_kerberos_iface_init (RealmDbusKerberosIface *iface);
45
46 G_DEFINE_TYPE_WITH_CODE (RealmKerberos, realm_kerberos, REALM_DBUS_TYPE_KERBEROS_SKELETON,
47 G_IMPLEMENT_INTERFACE (REALM_DBUS_TYPE_KERBEROS, realm_kerberos_iface_init);
48 );
49
50 static void
51 handle_krb5_error (GDBusMethodInvocation *invocation,
52 krb5_error_code code,
53 krb5_context context,
54 const gchar *message,
55 ...)
56 {
57 gchar *string;
58 va_list va;
59
60 va_start (va, message);
61 string = g_strdup_vprintf (message, va);
62 va_end (va);
63
64 realm_diagnostics_error (invocation, NULL, "%s: %s", string,
65 krb5_get_error_message (context, code));
66 g_free (string);
67 }
68
69 static GBytes *
70 kinit_to_kerberos_cache (GDBusMethodInvocation *invocation,
71 const gchar *principal_name,
72 const gchar *password)
73 {
74 krb5_get_init_creds_opt *options = NULL;
75 krb5_context context = NULL;
76 krb5_principal principal = NULL;
77 krb5_error_code code;
78 gchar *filename = NULL;
79 krb5_ccache ccache = NULL;
80 krb5_creds my_creds;
81 GBytes *result = NULL;
82 gchar *contents;
83 gsize length;
84 GError *error = NULL;
85 int temp_fd;
86
87 code = krb5_init_context (&context);
88 if (code != 0) {
89 handle_krb5_error (invocation, code, NULL,
90 "Couldn't initialize kerberos");
91 goto cleanup;
92 }
93
94 code = krb5_parse_name (context, principal_name, &principal);
95 if (code != 0) {
96 handle_krb5_error (invocation, code, context,
97 "Couldn't parse principal: %s", principal_name);
98 goto cleanup;
99 }
100
101 code = krb5_get_init_creds_opt_alloc (context, &options);
102 if (code != 0) {
103 g_warning ("Couldn't setup kerberos options: %s",
104 krb5_get_error_message (context, code));
105 goto cleanup;
106 }
107
108 filename = g_build_filename (g_get_tmp_dir (), "realmd-krb5-cache.XXXXXX", NULL);
109 temp_fd = g_mkstemp_full (filename, O_RDWR, S_IRUSR | S_IWUSR);
110 if (temp_fd == -1) {
111 realm_diagnostics_error (invocation, NULL,
112 "Couldn't create credential cache file: %s",
113 g_strerror (errno));
114 goto cleanup;
115 }
116 close (temp_fd);
117
118 code = krb5_cc_resolve (context, filename, &ccache);
119 if (code != 0) {
120 handle_krb5_error (invocation, code, context,
121 "Couldn't resolve credential cache: %s", filename);
122 goto cleanup;
123 }
124
125 code = krb5_get_init_creds_opt_set_out_ccache (context, options, ccache);
126 if (code != 0) {
127 g_warning ("Couldn't setup credential cache: %s",
128 krb5_get_error_message (context, code));
129 goto cleanup;
130 }
131
132 code = krb5_get_init_creds_password (context, &my_creds, principal,
133 (char *)password, NULL, 0, 0, NULL, options);
134 if (code != 0) {
135 handle_krb5_error (invocation, code, context,
136 "Couldn't authenticate as: %s", principal_name);
137 goto cleanup;
138 }
139
140 krb5_cc_close (context, ccache);
141 ccache = NULL;
142
143 g_file_get_contents (filename, &contents, &length, &error);
144 if (error != NULL) {
145 realm_diagnostics_error (invocation, error, "Couldn't read credential cache");
146 g_error_free (error);
147 }
148 result = g_bytes_new_take (contents, length);
149
150 cleanup:
151 if (filename) {
152 g_unlink (filename);
153 g_free (filename);
154 }
155
156 if (options)
157 krb5_get_init_creds_opt_free (context, options);
158 if (principal)
159 krb5_free_principal (context, principal);
160 if (ccache)
161 krb5_cc_close (context, ccache);
162 if (context)
163 krb5_free_context (context);
164 return result;
165 }
166
167 typedef struct {
168 RealmKerberos *self;
169 GDBusMethodInvocation *invocation;
170 } MethodClosure;
171
172 static MethodClosure *
173 method_closure_new (RealmKerberos *self,
174 GDBusMethodInvocation *invocation)
175 {
176 MethodClosure *closure = g_slice_new (MethodClosure);
177 closure->self = g_object_ref (self);
178 closure->invocation = g_object_ref (invocation);
179 return closure;
180 }
181
182 static void
183 method_closure_free (MethodClosure *closure)
184 {
185 g_object_unref (closure->self);
186 g_object_unref (closure->invocation);
187 g_slice_free (MethodClosure, closure);
188 }
189
190 static void
191 on_enroll_complete (GObject *source,
192 GAsyncResult *result,
193 gpointer user_data)
194 {
195 MethodClosure *closure = user_data;
196 RealmKerberosClass *klass;
197 GError *error = NULL;
198
199 klass = REALM_KERBEROS_GET_CLASS (closure->self);
200 g_return_if_fail (klass->enroll_finish != NULL);
201
202 (klass->enroll_finish) (closure->self, result, &error);
203 if (error == NULL) {
204 realm_diagnostics_info (closure->invocation, "Successfully enrolled machine in realm");
205 g_dbus_method_invocation_return_value (closure->invocation, g_variant_new ("()"));
206
207 } else if (error != NULL &&
208 (error->domain == REALM_ERROR || error->domain == G_DBUS_ERROR)) {
209 realm_diagnostics_error (closure->invocation, error, NULL);
210 g_dbus_method_invocation_return_gerror (closure->invocation, error);
211 g_error_free (error);
212
213 } else {
214 realm_diagnostics_error (closure->invocation, error, "Failed to enroll machine in realm");
215 g_dbus_method_invocation_return_error (closure->invocation, REALM_ERROR, REALM_ERROR_ENROLL_FAILED,
216 "Failed to enroll machine in realm. See diagnostics.");
217 g_error_free (error);
218 }
219
220 realm_daemon_unlock_for_action (closure->invocation);
221 method_closure_free (closure);
222 }
223
224 static gboolean
225 handle_enroll_with_credential_cache (RealmDbusKerberos *realm,
226 GDBusMethodInvocation *invocation,
227 GVariant *admin_cache,
228 GVariant *options)
229 {
230 RealmKerberos *self = REALM_KERBEROS (realm);
231 GBytes *admin_kerberos_cache;
232 RealmKerberosClass *klass;
233 const guchar *data;
234 gsize length;
235
236 data = g_variant_get_fixed_array (admin_cache, &length, 1);
237 if (length == 0) {
238 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
239 "Invalid zero length credential cache argument");
240 return TRUE;
241 }
242
243 if (!realm_daemon_lock_for_action (invocation)) {
244 g_dbus_method_invocation_return_error (invocation, REALM_ERROR, REALM_ERROR_BUSY,
245 "Already running another action");
246 return TRUE;
247 }
248
249 klass = REALM_KERBEROS_GET_CLASS (self);
250 g_return_val_if_fail (klass->enroll_async != NULL, FALSE);
251 g_return_val_if_fail (klass->enroll_finish != NULL, FALSE);
252
253 admin_kerberos_cache = g_bytes_new_with_free_func (data, length,
254 (GDestroyNotify)g_variant_unref,
255 g_variant_ref (admin_cache));
256
257 (klass->enroll_async) (self, admin_kerberos_cache, invocation,
258 on_enroll_complete, method_closure_new (self, invocation));
259
260 g_bytes_unref (admin_kerberos_cache);
261 return TRUE;
262 }
263
264 static gboolean
265 handle_enroll_with_password (RealmDbusKerberos *realm,
266 GDBusMethodInvocation *invocation,
267 const gchar *principal,
268 const gchar *password,
269 GVariant *options)
270 {
271 RealmKerberos *self = REALM_KERBEROS (realm);
272 GBytes *admin_kerberos_cache;
273 RealmKerberosClass *klass;
274
275 admin_kerberos_cache = kinit_to_kerberos_cache (invocation, principal, password);
276 if (admin_kerberos_cache == NULL) {
277 g_dbus_method_invocation_return_error (invocation, REALM_ERROR, REALM_ERROR_AUTH_FAILED,
278 "Failed to authenticate with password");
279 return TRUE;
280 }
281
282 if (!realm_daemon_lock_for_action (invocation)) {
283 g_bytes_unref (admin_kerberos_cache);
284 g_dbus_method_invocation_return_error (invocation, REALM_ERROR, REALM_ERROR_BUSY,
285 "Already running another action");
286 return TRUE;
287 }
288
289 klass = REALM_KERBEROS_GET_CLASS (self);
290 g_return_val_if_fail (klass->enroll_async != NULL, FALSE);
291 g_return_val_if_fail (klass->enroll_finish != NULL, FALSE);
292
293 (klass->enroll_async) (self, admin_kerberos_cache, invocation,
294 on_enroll_complete, method_closure_new (self, invocation));
295
296 g_bytes_unref (admin_kerberos_cache);
297 return TRUE;
298 }
299
300 static void
301 on_unenroll_complete (GObject *source,
302 GAsyncResult *result,
303 gpointer user_data)
304 {
305 MethodClosure *closure = user_data;
306 RealmKerberosClass *klass;
307 GError *error = NULL;
308
309 klass = REALM_KERBEROS_GET_CLASS (closure->self);
310 g_return_if_fail (klass->unenroll_finish != NULL);
311
312 if ((klass->unenroll_finish) (closure->self, result, &error)) {
313 realm_diagnostics_info (closure->invocation, "Successfully unenrolled machine from realm");
314 g_dbus_method_invocation_return_value (closure->invocation, g_variant_new ("()"));
315
316 } else if (error != NULL &&
317 (error->domain == REALM_ERROR || error->domain == G_DBUS_ERROR)) {
318 realm_diagnostics_error (closure->invocation, error, NULL);
319 g_dbus_method_invocation_return_gerror (closure->invocation, error);
320 g_error_free (error);
321
322 } else {
323 realm_diagnostics_error (closure->invocation, error, "Failed to unenroll machine from realm");
324 g_dbus_method_invocation_return_error (closure->invocation, REALM_ERROR, REALM_ERROR_UNENROLL_FAILED,
325 "Failed to unenroll machine from domain. See diagnostics.");
326 g_error_free (error);
327 }
328
329 realm_daemon_unlock_for_action (closure->invocation);
330 method_closure_free (closure);
331 }
332
333 static gboolean
334 handle_unenroll_with_credential_cache (RealmDbusKerberos *realm,
335 GDBusMethodInvocation *invocation,
336 GVariant *admin_cache,
337 GVariant *options)
338 {
339 RealmKerberos *self = REALM_KERBEROS (realm);
340 RealmKerberosClass *klass;
341 GBytes *admin_kerberos_cache;
342 const guchar *data;
343 gsize length;
344
345 data = g_variant_get_fixed_array (admin_cache, &length, 1);
346 if (length == 0) {
347 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
348 "Invalid zero length credential cache argument");
349 return TRUE;
350 }
351
352 if (!realm_daemon_lock_for_action (invocation)) {
353 g_dbus_method_invocation_return_error (invocation, REALM_ERROR, REALM_ERROR_BUSY,
354 "Already running another action");
355 return TRUE;
356 }
357
358 klass = REALM_KERBEROS_GET_CLASS (self);
359 g_return_val_if_fail (klass->unenroll_async != NULL, FALSE);
360 g_return_val_if_fail (klass->unenroll_finish != NULL, FALSE);
361
362 admin_kerberos_cache = g_bytes_new_with_free_func (data, length,
363 (GDestroyNotify)g_variant_unref,
364 g_variant_ref (admin_cache));
365
366 (klass->unenroll_async) (self, admin_kerberos_cache, invocation,
367 on_unenroll_complete, method_closure_new (self, invocation));
368
369 g_bytes_unref (admin_kerberos_cache);
370 return TRUE;
371 }
372
373 static gboolean
374 handle_unenroll_with_password (RealmDbusKerberos *realm,
375 GDBusMethodInvocation *invocation,
376 const gchar *principal,
377 const gchar *password,
378 GVariant *options)
379 {
380 RealmKerberos *self = REALM_KERBEROS (realm);
381 RealmKerberosClass *klass;
382 GBytes *admin_kerberos_cache;
383
384 admin_kerberos_cache = kinit_to_kerberos_cache (invocation, principal, password);
385 if (admin_kerberos_cache == NULL) {
386 g_dbus_method_invocation_return_error (invocation, REALM_ERROR, REALM_ERROR_AUTH_FAILED,
387 "Failed to authenticate with password");
388 return TRUE;
389 }
390
391 if (!realm_daemon_lock_for_action (invocation)) {
392 g_bytes_unref (admin_kerberos_cache);
393 g_dbus_method_invocation_return_error (invocation, REALM_ERROR, REALM_ERROR_BUSY,
394 "Already running another action");
395 return TRUE;
396 }
397
398 klass = REALM_KERBEROS_GET_CLASS (self);
399 g_return_val_if_fail (klass->unenroll_async != NULL, FALSE);
400 g_return_val_if_fail (klass->unenroll_finish != NULL, FALSE);
401
402 (klass->unenroll_async) (self, admin_kerberos_cache, invocation,
403 on_unenroll_complete, method_closure_new (self, invocation));
404
405 g_bytes_unref (admin_kerberos_cache);
406 return TRUE;
407 }
408
409 static gboolean
410 handle_change_permitted_logins (RealmDbusKerberos *realm,
411 GDBusMethodInvocation *invocation,
412 const gchar *const *add,
413 const gchar *const *remove)
414 {
415 RealmKerberos *self = REALM_KERBEROS (realm);
416 RealmKerberosClass *klass;
417 GError *error = NULL;
418 gboolean ret;
419
420 if (!realm_daemon_lock_for_action (invocation)) {
421 g_dbus_method_invocation_return_error (invocation, REALM_ERROR, REALM_ERROR_BUSY,
422 "Already running another action");
423 return TRUE;
424 }
425
426 klass = REALM_KERBEROS_GET_CLASS (self);
427 g_return_val_if_fail (klass->change_logins != NULL, FALSE);
428
429 ret = (klass->change_logins) (self, invocation,
430 (const gchar **)add,
431 (const gchar **)remove,
432 &error);
433
434 if (ret) {
435 realm_dbus_kerberos_complete_change_permitted_logins (realm,
436 invocation);
437
438 } else if (error != NULL &&
439 (error->domain == REALM_ERROR || error->domain == G_DBUS_ERROR)) {
440 realm_diagnostics_error (invocation, error, NULL);
441 g_dbus_method_invocation_return_gerror (invocation, error);
442 g_error_free (error);
443
444 } else {
445 realm_diagnostics_error (invocation, error, "Failed to change permitted logins");
446 g_dbus_method_invocation_return_error (invocation, REALM_ERROR, REALM_ERROR_INTERNAL,
447 "Failed to change permitted logins. See diagnostics.");
448 g_error_free (error);
449 }
450
451 realm_daemon_unlock_for_action (invocation);
452 return TRUE;
453 }
454
455 static gboolean
456 realm_kerberos_authorize_method (GDBusInterfaceSkeleton *skeleton,
457 GDBusMethodInvocation *invocation)
458 {
459 const gchar *interface = g_dbus_method_invocation_get_interface_name (invocation);
460 const gchar *method = g_dbus_method_invocation_get_method_name (invocation);
461 const gchar *action_id = NULL;
462 gboolean ret;
463
464 /* Each method has its own polkit authorization */
465 if (g_str_equal (interface, REALM_DBUS_KERBEROS_REALM_INTERFACE)) {
466 if (g_str_equal (method, "EnrollWithCredentialCache") ||
467 g_str_equal (method, "EnrollWithPassword")) {
468 action_id = "org.freedesktop.realmd.enroll-machine";
469
470 } else if (g_str_equal (method, "UnenrollWithCredentialCache") ||
471 g_str_equal (method, "UnenrollWithPassword")) {
472 action_id = "org.freedesktop.realmd.unenroll-machine";
473
474 } else if (g_str_equal (method, "ChangePermittedLogins")) {
475 action_id = "org.freedesktop.realmd.login-policy";
476
477 } else {
478 g_warning ("encountered unknown method during auth checks: %s.%s",
479 interface, method);
480 action_id = NULL;
481 }
482
483 if (action_id != NULL)
484 ret = realm_daemon_check_dbus_action (g_dbus_method_invocation_get_sender (invocation),
485 action_id);
486 else
487 ret = FALSE;
488 }
489
490 if (ret == FALSE) {
491 realm_debug ("rejecting access to: %s.%s method on %s",
492 interface, method, g_dbus_method_invocation_get_object_path (invocation));
493 g_dbus_method_invocation_return_dbus_error (invocation, REALM_DBUS_ERROR_NOT_AUTHORIZED,
494 "Not authorized to perform this action");
495 }
496
497 return ret;
498 }
499
500 static void
501 realm_kerberos_init (RealmKerberos *self)
502 {
503 self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, REALM_TYPE_KERBEROS,
504 RealmKerberosPrivate);
505 }
506
507 static void
508 realm_kerberos_get_property (GObject *obj,
509 guint prop_id,
510 GValue *value,
511 GParamSpec *pspec)
512 {
513 RealmKerberos *self = REALM_KERBEROS (obj);
514
515 switch (prop_id) {
516 case PROP_DISCOVERY:
517 g_value_set_boxed (value, realm_kerberos_get_discovery (self));
518 break;
519 default:
520 G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec);
521 break;
522 }
523 }
524
525 static void
526 realm_kerberos_set_property (GObject *obj,
527 guint prop_id,
528 const GValue *value,
529 GParamSpec *pspec)
530 {
531 RealmKerberos *self = REALM_KERBEROS (obj);
532
533 switch (prop_id) {
534 case PROP_DISCOVERY:
535 realm_kerberos_set_discovery (self, g_value_get_boxed (value));
536 break;
537 default:
538 G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec);
539 break;
540 }
541 }
542
543 static void
544 realm_kerberos_finalize (GObject *obj)
545 {
546 RealmKerberos *self = REALM_KERBEROS (obj);
547
548 if (self->pv->discovery)
549 g_hash_table_unref (self->pv->discovery);
550
551 G_OBJECT_CLASS (realm_kerberos_parent_class)->finalize (obj);
552 }
553
554 static void
555 realm_kerberos_class_init (RealmKerberosClass *klass)
556 {
557 GObjectClass *object_class = G_OBJECT_CLASS (klass);
558 GDBusInterfaceSkeletonClass *skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
559
560 object_class->get_property = realm_kerberos_get_property;
561 object_class->set_property = realm_kerberos_set_property;
562 object_class->finalize = realm_kerberos_finalize;
563
564 skeleton_class->g_authorize_method = realm_kerberos_authorize_method;
565
566 g_type_class_add_private (klass, sizeof (RealmKerberosPrivate));
567
568 g_object_class_install_property (object_class, PROP_DISCOVERY,
569 g_param_spec_boxed ("discovery", "Discovery", "Discovery Data",
570 G_TYPE_HASH_TABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
571 }
572
573 static void
574 realm_kerberos_iface_init (RealmDbusKerberosIface *iface)
575 {
576 memcpy (iface, g_type_interface_peek_parent (iface), sizeof (*iface));
577 iface->handle_enroll_with_password = handle_enroll_with_password;
578 iface->handle_unenroll_with_password = handle_unenroll_with_password;
579 iface->handle_enroll_with_credential_cache = handle_enroll_with_credential_cache;
580 iface->handle_unenroll_with_credential_cache = handle_unenroll_with_credential_cache;
581 iface->handle_change_permitted_logins = handle_change_permitted_logins;
582 }
583
584 void
585 realm_kerberos_set_discovery (RealmKerberos *self,
586 GHashTable *discovery)
587 {
588 g_return_if_fail (REALM_IS_KERBEROS (self));
589 g_return_if_fail (discovery != NULL);
590
591 if (discovery)
592 g_hash_table_ref (discovery);
593 if (self->pv->discovery)
594 g_hash_table_unref (self->pv->discovery);
595 self->pv->discovery = discovery;
596 g_object_notify (G_OBJECT (self), "discovery");
597 }
598
599 GHashTable *
600 realm_kerberos_get_discovery (RealmKerberos *self)
601 {
602 g_return_val_if_fail (REALM_IS_KERBEROS (self), NULL);
603 return self->pv->discovery;
604 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_KERBEROS_H__
17 #define __REALM_KERBEROS_H__
18
19 #include <gio/gio.h>
20
21 #include "realm-dbus-generated.h"
22
23 G_BEGIN_DECLS
24
25 #define REALM_TYPE_KERBEROS (realm_kerberos_get_type ())
26 #define REALM_KERBEROS(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), REALM_TYPE_KERBEROS, RealmKerberos))
27 #define REALM_IS_KERBEROS(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), REALM_TYPE_KERBEROS))
28 #define REALM_KERBEROS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), REALM_TYPE_KERBEROS, RealmKerberosClass))
29 #define REALM_IS_KERBEROS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), REALM_TYPE_KERBEROS))
30 #define REALM_KERBEROS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), REALM_TYPE_KERBEROS, RealmKerberosClass))
31
32 typedef struct _RealmKerberos RealmKerberos;
33 typedef struct _RealmKerberosClass RealmKerberosClass;
34 typedef struct _RealmKerberosPrivate RealmKerberosPrivate;
35
36 struct _RealmKerberos {
37 RealmDbusKerberosSkeleton parent;
38 RealmKerberosPrivate *pv;
39 };
40
41 struct _RealmKerberosClass {
42 RealmDbusKerberosSkeletonClass parent_class;
43
44 void (* enroll_async) (RealmKerberos *realm,
45 GBytes *admin_kerberos_cache,
46 GDBusMethodInvocation *invocation,
47 GAsyncReadyCallback callback,
48 gpointer user_data);
49
50 gboolean (* enroll_finish) (RealmKerberos *realm,
51 GAsyncResult *result,
52 GError **error);
53
54 void (* unenroll_async) (RealmKerberos *realm,
55 GBytes *admin_kerberos_cache,
56 GDBusMethodInvocation *invocation,
57 GAsyncReadyCallback callback,
58 gpointer user_data);
59
60 gboolean (* unenroll_finish) (RealmKerberos *realm,
61 GAsyncResult *result,
62 GError **error);
63
64 gboolean (* change_logins) (RealmKerberos *realm,
65 GDBusMethodInvocation *invocation,
66 const gchar **add,
67 const gchar **remove,
68 GError **error);
69 };
70
71 GType realm_kerberos_get_type (void) G_GNUC_CONST;
72
73 void realm_kerberos_set_discovery (RealmKerberos *self,
74 GHashTable *discovery);
75
76 GHashTable * realm_kerberos_get_discovery (RealmKerberos *self);
77
78 G_END_DECLS
79
80 #endif /* __REALM_KERBEROS_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-dbus-constants.h"
17 #include "realm-network.h"
18
19 typedef struct {
20 gint outstanding;
21 GList *values;
22 } LookupClosure;
23
24 static void
25 lookup_closure_free (gpointer data)
26 {
27 LookupClosure *lookup = data;
28 g_assert (lookup->outstanding == 0);
29 g_list_free_full (lookup->values, (GDestroyNotify)g_variant_unref);
30 g_slice_free (LookupClosure, lookup);
31 }
32
33 static GVariant *
34 lookup_get_property_finish (GDBusConnection *connection,
35 GAsyncResult *result,
36 const GVariantType *variant_type,
37 GError **error)
38 {
39 GVariant *value = NULL;
40 GVariant *retval;
41
42 retval = g_dbus_connection_call_finish (connection, result, error);
43 if (retval == NULL)
44 return NULL;
45
46 g_return_val_if_fail (g_variant_is_of_type (retval, G_VARIANT_TYPE ("(v)")), NULL);
47
48 g_variant_get (retval, "(v)", &value);
49 if (!g_variant_is_of_type (value, variant_type)) {
50 g_variant_unref (value);
51 return NULL;
52 }
53
54 return value;
55 }
56
57 static void
58 lookup_get_property_async (GDBusConnection *connection,
59 const gchar *object_path,
60 const gchar *interface_name,
61 const gchar *prop_name,
62 GAsyncReadyCallback callback,
63 gpointer user_data)
64 {
65 g_dbus_connection_call (connection, "org.freedesktop.NetworkManager",
66 object_path, DBUS_PROPERTIES_INTERFACE, "Get",
67 g_variant_new ("(ss)", interface_name, prop_name),
68 G_VARIANT_TYPE ("(v)"), G_DBUS_CALL_FLAGS_NONE,
69 -1, NULL, callback, user_data);
70 }
71
72 static void
73 on_options (GObject *object,
74 GAsyncResult *result,
75 gpointer user_data)
76 {
77 GDBusConnection *connection = G_DBUS_CONNECTION (object);
78 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
79 LookupClosure *lookup = g_simple_async_result_get_op_res_gpointer (res);
80 GError *error = NULL;
81 GVariant *value;
82
83 value = lookup_get_property_finish (connection, result,
84 G_VARIANT_TYPE ("a{sv}"), &error);
85 if (error != NULL)
86 g_simple_async_result_take_error (res, error);
87 if (value != NULL)
88 lookup->values = g_list_prepend (lookup->values, value);
89
90 if (lookup->outstanding-- == 1)
91 g_simple_async_result_complete (res);
92
93 g_object_unref (res);
94 }
95
96 static void
97 on_dhcp_config (GObject *object,
98 GAsyncResult *result,
99 const char *interface_name,
100 gpointer user_data)
101 {
102 GDBusConnection *connection = G_DBUS_CONNECTION (object);
103 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
104 LookupClosure *lookup = g_simple_async_result_get_op_res_gpointer (res);
105 GError *error = NULL;
106 GVariant *value;
107 const gchar *path;
108
109 value = lookup_get_property_finish (connection, result,
110 G_VARIANT_TYPE_OBJECT_PATH, &error);
111 if (error != NULL)
112 g_simple_async_result_take_error (res, error);
113 if (value != NULL) {
114 path = g_variant_get_string (value, NULL);
115 if (path && !g_str_equal (path, "") && !g_str_equal (path, "/")) {
116 lookup_get_property_async (connection, path,
117 interface_name, "Options",
118 on_options, g_object_ref (res));
119 lookup->outstanding++;
120 }
121 g_variant_unref (value);
122 }
123
124 if (lookup->outstanding-- == 1)
125 g_simple_async_result_complete (res);
126
127 g_object_unref (res);
128 }
129
130 static void
131 on_dhcp4_config (GObject *object,
132 GAsyncResult *result,
133 gpointer user_data)
134 {
135 on_dhcp_config (object, result, "org.freedesktop.NetworkManager.DHCP4Config", user_data);
136 }
137
138 static void
139 on_dhcp6_config (GObject *object,
140 GAsyncResult *result,
141 gpointer user_data)
142 {
143 on_dhcp_config (object, result, "org.freedesktop.NetworkManager.DHCP6Config", user_data);
144 }
145
146 static void
147 on_devices (GObject *object,
148 GAsyncResult *result,
149 gpointer user_data)
150 {
151 GDBusConnection *connection = G_DBUS_CONNECTION (object);
152 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
153 LookupClosure *lookup = g_simple_async_result_get_op_res_gpointer (res);
154 GError *error = NULL;
155 const gchar **paths;
156 GVariant *value;
157 gint i = 0;
158
159 value = lookup_get_property_finish (connection, result,
160 G_VARIANT_TYPE_OBJECT_PATH_ARRAY, &error);
161 if (error != NULL)
162 g_simple_async_result_take_error (res, error);
163 if (value != NULL) {
164 paths = g_variant_get_objv (value, NULL);
165 for (i = 0; paths[i] != NULL; i++) {
166 lookup_get_property_async (connection, paths[i],
167 "org.freedesktop.NetworkManager.Device", "Dhcp4Config",
168 on_dhcp4_config, g_object_ref (res));
169 lookup->outstanding++;
170
171 lookup_get_property_async (connection, paths[i],
172 "org.freedesktop.NetworkManager.Device", "Dhcp6Config",
173 on_dhcp6_config, g_object_ref (res));
174 lookup->outstanding++;
175 }
176 g_variant_unref (value);
177 }
178
179 if (lookup->outstanding-- == 1)
180 g_simple_async_result_complete (res);
181
182 g_object_unref (res);
183 }
184
185 static void
186 on_active_connections (GObject *object,
187 GAsyncResult *result,
188 gpointer user_data)
189 {
190 GDBusConnection *connection = G_DBUS_CONNECTION (object);
191 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
192 LookupClosure *lookup = g_simple_async_result_get_op_res_gpointer (res);
193 GError *error = NULL;
194 const gchar **paths;
195 GVariant *value;
196 gint i;
197
198 value = lookup_get_property_finish (connection, result,
199 G_VARIANT_TYPE_OBJECT_PATH_ARRAY, &error);
200 if (error != NULL)
201 g_simple_async_result_take_error (res, error);
202 if (value != NULL) {
203 paths = g_variant_get_objv (value, NULL);
204 for (i = 0; paths[i] != NULL; i++) {
205 lookup_get_property_async (connection, paths[i],
206 "org.freedesktop.NetworkManager.Connection.Active", "Devices",
207 on_devices, g_object_ref (res));
208 lookup->outstanding++;
209 }
210 g_variant_unref (value);
211 }
212
213 if (lookup->outstanding-- == 1)
214 g_simple_async_result_complete (res);
215
216 g_object_unref (res);
217 }
218
219 void
220 realm_network_get_dhcp_domain_async (GDBusConnection *connection,
221 GAsyncReadyCallback callback,
222 gpointer user_data)
223 {
224 GSimpleAsyncResult *res;
225 LookupClosure *lookup;
226
227 g_return_if_fail (G_IS_DBUS_CONNECTION (connection));
228
229 res = g_simple_async_result_new (NULL, callback, user_data,
230 realm_network_get_dhcp_domain_async);
231 lookup = g_slice_new0 (LookupClosure);
232 g_simple_async_result_set_op_res_gpointer (res, lookup, lookup_closure_free);
233
234 lookup_get_property_async (connection, "/org/freedesktop/NetworkManager",
235 "org.freedesktop.NetworkManager", "ActiveConnections",
236 on_active_connections, g_object_ref (res));
237 lookup->outstanding++;
238 g_object_unref (res);
239 }
240
241 gchar *
242 realm_network_get_dhcp_domain_finish (GAsyncResult *result,
243 GError **error)
244 {
245 GSimpleAsyncResult *res;
246 LookupClosure *lookup;
247 gchar *domain;
248 GList *l;
249
250 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
251 realm_network_get_dhcp_domain_async), NULL);
252 g_return_val_if_fail (error == NULL || *error == NULL, NULL);
253
254 res = G_SIMPLE_ASYNC_RESULT (result);
255
256 lookup = g_simple_async_result_get_op_res_gpointer (res);
257 for (l = lookup->values; l != NULL; l = g_list_next (l)) {
258 if (g_variant_lookup (l->data, "domain_name", "s", &domain)) {
259 if (domain && domain[0])
260 return domain;
261 g_free (domain);
262 }
263 }
264
265 /* Only report errors if no domain was found */
266 g_simple_async_result_propagate_error (res, error);
267 return NULL;
268 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_NETWORK_H__
17 #define __REALM_NETWORK_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 void realm_network_get_dhcp_domain_async (GDBusConnection *connection,
24 GAsyncReadyCallback callback,
25 gpointer user_data);
26
27 gchar * realm_network_get_dhcp_domain_finish (GAsyncResult *result,
28 GError **error);
29
30 G_END_DECLS
31
32 #endif /* __REALM_NETWORK_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #define DEBUG_FLAG REALM_DEBUG_PACKAGES
17 #include "realm-debug.h"
18 #include "realm-diagnostics.h"
19 #include "realm-daemon.h"
20 #include "realm-packages.h"
21 #include "realm-settings.h"
22
23 #define I_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE
24 #include <packagekit-glib2/packagekit.h>
25
26 typedef struct {
27 PkTask *task;
28 gchar **packages;
29 GDBusMethodInvocation *invocation;
30 } InstallClosure;
31
32 static void
33 install_closure_free (gpointer data)
34 {
35 InstallClosure *install = data;
36 g_object_ref (install->task);
37 g_strfreev (install->packages);
38 g_clear_object (&install->invocation);
39 g_slice_free (InstallClosure, install);
40 }
41
42 static void
43 on_install_progress (PkProgress *progress,
44 PkProgressType type,
45 gpointer user_data)
46 {
47 gchar *string;
48 guint unumber;
49 gint number;
50
51 if (type == PK_PROGRESS_TYPE_STATUS) {
52 #ifdef TODO
53 PkStatusEnum status;
54 g_object_get (progress, "status", &status, NULL);
55 switch (status) {
56 case PK_STATUS_WAIT:
57 realm_status (install->invocation, "Waiting for package system");
58 break;
59 case PK_STATUS_ENUM_WAITING_FOR_AUTH:
60 pk_status_enum_to_localised_text ();
61 };
62 #endif
63 }
64
65 switch (type) {
66 case PK_PROGRESS_TYPE_PACKAGE_ID:
67 g_object_get (progress, "package-id", &string, NULL);
68 realm_debug ("package-id: %s", string);
69 g_free (string);
70 break;
71 case PK_PROGRESS_TYPE_TRANSACTION_ID:
72 g_object_get (progress, "transaction-id", &string, NULL);
73 realm_debug ("transaction-id: %s", string);
74 g_free (string);
75 break;
76 case PK_PROGRESS_TYPE_PERCENTAGE:
77 g_object_get (progress, "percentage", &number, NULL);
78 realm_debug ("percentage: %d", number);
79 break;
80 case PK_PROGRESS_TYPE_STATUS:
81 g_object_get (progress, "status", &unumber, NULL);
82 realm_debug ("status: %s", pk_status_enum_to_string (unumber));
83 break;
84 case PK_PROGRESS_TYPE_ELAPSED_TIME:
85 g_object_get (progress, "elapsed-time", &unumber, NULL);
86 realm_debug ("elapsed-time: %u", unumber);
87 break;
88 case PK_PROGRESS_TYPE_REMAINING_TIME:
89 g_object_get (progress, "remaining-time", &unumber, NULL);
90 realm_debug ("remaining-time: %u", unumber);
91 break;
92 case PK_PROGRESS_TYPE_SPEED:
93 g_object_get (progress, "speed", &unumber, NULL);
94 realm_debug ("speed: %u", unumber);
95 break;
96 case PK_PROGRESS_TYPE_INVALID:
97 case PK_PROGRESS_TYPE_ALLOW_CANCEL:
98 case PK_PROGRESS_TYPE_CALLER_ACTIVE:
99 case PK_PROGRESS_TYPE_ROLE:
100 case PK_PROGRESS_TYPE_UID:
101 case PK_PROGRESS_TYPE_PACKAGE:
102 case PK_PROGRESS_TYPE_ITEM_PROGRESS:
103 default:
104 break;
105 }
106 }
107
108 static gchar **
109 extract_uninstalled_package_ids (PkResults *results,
110 gchar **string)
111 {
112 GPtrArray *packages;
113 PkPackage *package;
114 GPtrArray *ids;
115 GString *desc;
116 guint i;
117
118 packages = pk_results_get_package_array (results);
119 ids = g_ptr_array_new_with_free_func (g_free);
120 desc = g_string_new ("");
121
122 for (i = 0; i < packages->len; i++) {
123 package = PK_PACKAGE (packages->pdata[i]);
124 if (pk_package_get_info (package) != PK_INFO_ENUM_INSTALLED) {
125 g_ptr_array_add (ids, g_strdup (pk_package_get_id (package)));
126 if (desc->len)
127 g_string_append (desc, ", ");
128 g_string_append (desc, pk_package_get_name (package));
129 }
130 }
131
132 g_ptr_array_add (ids, NULL);
133 g_ptr_array_free (packages, TRUE);
134 *string = g_string_free (desc, FALSE);
135 return (gchar **)g_ptr_array_free (ids, FALSE);
136 }
137
138 static void
139 on_install_installed (GObject *source,
140 GAsyncResult *result,
141 gpointer user_data)
142 {
143 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
144 InstallClosure *install = g_simple_async_result_get_op_res_gpointer (res);
145 GError *error = NULL;
146 PkResults *results;
147
148 results = pk_task_generic_finish (install->task, result, &error);
149 if (error == NULL)
150 g_object_unref (results);
151 else
152 g_simple_async_result_take_error (res, error);
153
154 g_simple_async_result_complete (res);
155 g_object_unref (res);
156 }
157
158 static void
159 on_install_resolved (GObject *source,
160 GAsyncResult *result,
161 gpointer user_data)
162 {
163 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
164 InstallClosure *install = g_simple_async_result_get_op_res_gpointer (res);
165 gchar **package_ids;
166 GError *error = NULL;
167 PkResults *results;
168 gchar *desc;
169
170 results = pk_task_generic_finish (install->task, result, &error);
171 if (error == NULL) {
172 package_ids = extract_uninstalled_package_ids (results, &desc);
173 if (package_ids == NULL || *package_ids == NULL) {
174 g_simple_async_result_complete (res);
175
176 } else {
177 realm_diagnostics_info (install->invocation, "Installing: %s", desc);
178 pk_task_install_packages_async (install->task, package_ids, NULL,
179 on_install_progress, install,
180 on_install_installed, g_object_ref (res));
181 }
182
183 g_strfreev (package_ids);
184 g_object_unref (results);
185 g_free (desc);
186
187 } else {
188 g_simple_async_result_take_error (res, error);
189 g_simple_async_result_complete (res);
190 }
191
192 g_object_unref (res);
193 }
194
195 static void
196 on_install_refresh (GObject *source,
197 GAsyncResult *result,
198 gpointer user_data)
199 {
200 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
201 InstallClosure *install = g_simple_async_result_get_op_res_gpointer (res);
202 GError *error = NULL;
203 PkResults *results;
204 PkBitfield filter;
205
206 results = pk_task_generic_finish (install->task, result, &error);
207 if (error == NULL) {
208 filter = pk_filter_bitfield_from_string ("arch");
209 pk_task_resolve_async (install->task, filter, install->packages, NULL,
210 on_install_progress, install, on_install_resolved, g_object_ref (res));
211 g_object_unref (results);
212
213 } else {
214 g_simple_async_result_take_error (res, error);
215 g_simple_async_result_complete (res);
216 }
217
218 g_object_unref (res);
219 }
220
221 static void
222 lookup_required_files_and_packages (gchar ***packages,
223 gchar ***files,
224 gboolean *unconditional)
225 {
226 GHashTable *settings;
227 GHashTableIter iter;
228 gchar *package;
229 gchar *file;
230 gchar **f, **p;
231 gsize length;
232
233 *unconditional = FALSE;
234
235 settings = realm_settings_section ("active-directory-packages");
236 length = settings ? g_hash_table_size (settings) : 0;
237
238 *packages = p = g_new0 (gchar *, length + 1);
239 *files = f = g_new0 (gchar *, length + 1);
240
241 g_hash_table_iter_init (&iter, settings);
242 while (g_hash_table_iter_next (&iter, (gpointer *)&package, (gpointer *)&file)) {
243 file = g_strstrip (g_strdup (file));
244 if (g_str_equal (file, "")) {
245 g_free (file);
246 *unconditional = TRUE;
247 } else {
248 *(f++) = file;
249 }
250 package = g_strstrip (g_strdup (package));
251 if (g_str_equal (package, ""))
252 g_free (package);
253 else
254 *(p++) = package;
255
256 /* As a logic double check */
257 g_assert (length-- > 0);
258 }
259 }
260
261 void
262 realm_packages_install_async (const gchar *package_set,
263 GDBusMethodInvocation *invocation,
264 GAsyncReadyCallback callback,
265 gpointer user_data)
266 {
267 GSimpleAsyncResult *res;
268 InstallClosure *install;
269 gboolean unconditional;
270 gchar **required_files;
271 gchar **packages;
272 gchar *string;
273 gboolean have;
274
275 g_return_if_fail (package_set != NULL);
276 g_return_if_fail (invocation == NULL || G_IS_DBUS_METHOD_INVOCATION (invocation));
277
278 lookup_required_files_and_packages (&packages, &required_files, &unconditional);
279
280 res = g_simple_async_result_new (NULL, callback, user_data, realm_packages_install_async);
281 install = g_slice_new (InstallClosure);
282 install->packages = packages;
283 install->task = pk_task_new ();
284 pk_task_set_interactive (install->task, FALSE);
285 install->invocation = invocation ? g_object_ref (invocation) : NULL;
286 g_simple_async_result_set_op_res_gpointer (res, install, install_closure_free);
287
288 if (unconditional) {
289 have = FALSE;
290 realm_diagnostics_info (invocation, "Unconditionally checking packages");
291
292 } else {
293 have = realm_packages_check_paths ((const gchar **)required_files, invocation);
294 string = g_strjoinv (", ", required_files);
295 realm_diagnostics_info (invocation, "Required files %s: %s",
296 have ? "present" : "not present, installing", string);
297 g_free (string);
298 }
299
300 g_strfreev (required_files);
301
302 if (have) {
303 g_simple_async_result_complete_in_idle (res);
304 g_object_unref (res);
305 return;
306 }
307
308 realm_diagnostics_info (invocation, "Refreshing package cache");
309
310 pk_task_refresh_cache_async (install->task, FALSE, NULL, on_install_progress, install,
311 on_install_refresh, g_object_ref (res));
312
313 g_object_unref (res);
314 }
315
316 gboolean
317 realm_packages_install_finish (GAsyncResult *result,
318 GError **error)
319 {
320 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
321 realm_packages_install_async), FALSE);
322 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
323
324 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error))
325 return FALSE;
326
327 return TRUE;
328 }
329
330 gboolean
331 realm_packages_check_paths (const gchar **paths,
332 GDBusMethodInvocation *invocation)
333 {
334 gint i;
335
336 g_return_val_if_fail (paths != NULL, FALSE);
337 g_return_val_if_fail (invocation == NULL || G_IS_DBUS_METHOD_INVOCATION (invocation), FALSE);
338
339 for (i = 0; paths[i] != NULL; i++) {
340 if (!g_file_test (paths[i], G_FILE_TEST_EXISTS)) {
341 realm_diagnostics_info (invocation, "Couldn't find file: %s", paths[i]);
342 return FALSE;
343 }
344 }
345
346 return TRUE;
347 }
348
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_PACKAGES_H__
17 #define __REALM_PACKAGES_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 gboolean realm_packages_check_paths (const gchar **paths,
24 GDBusMethodInvocation *invocation);
25
26 void realm_packages_install_async (const gchar *package_set,
27 GDBusMethodInvocation *invocation,
28 GAsyncReadyCallback callback,
29 gpointer user_data);
30
31 gboolean realm_packages_install_finish (GAsyncResult *result,
32 GError **error);
33
34 G_END_DECLS
35
36 #endif /* __REALM_PACKAGES_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-daemon.h"
17 #define DEBUG_FLAG REALM_DEBUG_SERVICE
18 #include "realm-debug.h"
19 #include "realm-dbus-constants.h"
20 #include "realm-dbus-generated.h"
21 #include "realm-diagnostics.h"
22 #include "realm-discovery.h"
23 #include "realm-errors.h"
24 #include "realm-provider.h"
25
26 #include <glib/gi18n.h>
27
28 static void realm_provider_iface_init (RealmDbusProviderIface *iface);
29
30 G_DEFINE_TYPE_WITH_CODE (RealmProvider, realm_provider, REALM_DBUS_TYPE_PROVIDER_SKELETON,
31 G_IMPLEMENT_INTERFACE (REALM_DBUS_TYPE_PROVIDER, realm_provider_iface_init)
32 );
33
34 struct _RealmProviderPrivate {
35 GHashTable *realms;
36 };
37
38 typedef struct {
39 RealmProvider *self;
40 GDBusMethodInvocation *invocation;
41 } MethodClosure;
42
43 static MethodClosure *
44 method_closure_new (RealmProvider *self,
45 GDBusMethodInvocation *invocation)
46 {
47 MethodClosure *closure = g_slice_new (MethodClosure);
48 closure->self = g_object_ref (self);
49 closure->invocation = g_object_ref (invocation);
50 return closure;
51 }
52
53 static void
54 method_closure_free (MethodClosure *closure)
55 {
56 g_object_unref (closure->self);
57 g_object_unref (closure->invocation);
58 g_slice_free (MethodClosure, closure);
59 }
60
61 static void
62 on_discover_complete (GObject *source,
63 GAsyncResult *result,
64 gpointer user_data)
65 {
66 MethodClosure *closure = user_data;
67 RealmProviderClass *klass;
68 GVariant *retval;
69 GError *error = NULL;
70 GVariant *realms = NULL;
71 gint relevance;
72
73 klass = REALM_PROVIDER_GET_CLASS (closure->self);
74 g_return_if_fail (klass->discover_finish != NULL);
75
76 relevance = (klass->discover_finish) (closure->self, result, &realms, &error);
77 if (error == NULL) {
78 if (relevance > 0)
79 realm_diagnostics_info (closure->invocation, "Successfully discovered realm(s)");
80 if (realms == NULL) {
81 realms = g_variant_new_array (G_VARIANT_TYPE ("(sos)"), NULL, 0);
82 g_variant_ref_sink (realms);
83 }
84 retval = g_variant_new ("(i@a(sos))", relevance, realms);
85 g_dbus_method_invocation_return_value (closure->invocation, retval);
86 g_variant_unref (realms);
87 } else {
88 if (error->domain == REALM_ERROR) {
89 realm_diagnostics_error (closure->invocation, error, NULL);
90 g_dbus_method_invocation_return_gerror (closure->invocation, error);
91 } else {
92 realm_diagnostics_error (closure->invocation, error, "Failed to discover realm");
93 g_dbus_method_invocation_return_error (closure->invocation, REALM_ERROR, REALM_ERROR_DISCOVERY_FAILED,
94 "Failed to discover realm. See diagnostics.");
95 }
96 g_error_free (error);
97 }
98
99 method_closure_free (closure);
100 }
101
102 static gboolean
103 realm_provider_handle_discover (RealmDbusProvider *provider,
104 GDBusMethodInvocation *invocation,
105 const gchar *string)
106 {
107 RealmProvider *self = REALM_PROVIDER (provider);
108 RealmProviderClass *klass;
109
110 klass = REALM_PROVIDER_GET_CLASS (self);
111 g_return_val_if_fail (klass->discover_async != NULL, FALSE);
112 g_return_val_if_fail (klass->discover_finish != NULL, FALSE);
113
114 (klass->discover_async) (self, string, invocation, on_discover_complete,
115 method_closure_new (self, invocation));
116
117 return TRUE;
118 }
119
120 static gboolean
121 realm_provider_authorize_method (GDBusInterfaceSkeleton *skeleton,
122 GDBusMethodInvocation *invocation)
123 {
124 const gchar *interface = g_dbus_method_invocation_get_interface_name (invocation);
125 const gchar *method = g_dbus_method_invocation_get_method_name (invocation);
126 const gchar *action_id = NULL;
127 gboolean ret;
128
129 /* Each method has its own polkit authorization */
130 if (g_str_equal (interface, REALM_DBUS_PROVIDER_INTERFACE)) {
131 if (g_str_equal (method, "Discover")) {
132 action_id = "org.freedesktop.realmd.discover-realm";
133 } else {
134 g_warning ("encountered unknown method during auth checks: %s.%s",
135 interface, method);
136 action_id = NULL;
137 }
138
139 if (action_id != NULL)
140 ret = realm_daemon_check_dbus_action (g_dbus_method_invocation_get_sender (invocation),
141 action_id);
142 else
143 ret = FALSE;
144 }
145
146 if (ret == FALSE) {
147 realm_debug ("rejecting access to: %s.%s method on %s",
148 interface, method, g_dbus_method_invocation_get_object_path (invocation));
149 g_dbus_method_invocation_return_dbus_error (invocation, REALM_DBUS_ERROR_NOT_AUTHORIZED,
150 "Not authorized to perform this action");
151 }
152
153 return ret;
154 }
155
156 static void
157 realm_provider_init (RealmProvider *self)
158 {
159 self->pv = G_TYPE_INSTANCE_GET_PRIVATE (self, REALM_TYPE_PROVIDER,
160 RealmProviderPrivate);
161 self->pv->realms = g_hash_table_new_full (g_str_hash, g_str_equal,
162 g_free, g_object_unref);
163 }
164
165 static void
166 update_realms_property (RealmProvider *self)
167 {
168 GHashTableIter iter;
169 GDBusInterfaceSkeleton *realm;
170 GVariantBuilder builder;
171 const gchar *path;
172 GVariant *variant;
173
174 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(sos)"));
175
176 g_hash_table_iter_init (&iter, self->pv->realms);
177 while (g_hash_table_iter_next (&iter, NULL, (gpointer)&realm)) {
178 path = g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (realm));
179 g_variant_builder_add (&builder, "(sos)", REALM_DBUS_SAMBA_NAME, path,
180 REALM_DBUS_KERBEROS_REALM_INTERFACE);
181 }
182
183 variant = g_variant_builder_end (&builder);
184 g_object_set (self, "realms", g_variant_ref_sink (variant), NULL);
185 g_variant_unref (variant);
186 }
187
188 static void
189 realm_provider_constructed (GObject *obj)
190 {
191 RealmProvider *self = REALM_PROVIDER (obj);
192
193 G_OBJECT_CLASS (realm_provider_parent_class)->constructed (obj);
194
195 update_realms_property (self);
196 }
197
198 static void
199 realm_provider_finalize (GObject *obj)
200 {
201 RealmProvider *self = REALM_PROVIDER (obj);
202
203 g_hash_table_unref (self->pv->realms);
204
205 G_OBJECT_CLASS (realm_provider_parent_class)->finalize (obj);
206 }
207
208 static void
209 realm_provider_class_init (RealmProviderClass *klass)
210 {
211 GDBusInterfaceSkeletonClass *skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
212 GObjectClass *object_class = G_OBJECT_CLASS (klass);
213
214 object_class->constructed = realm_provider_constructed;
215 object_class->finalize = realm_provider_finalize;
216 skeleton_class->g_authorize_method = realm_provider_authorize_method;
217
218 g_type_class_add_private (klass, sizeof (RealmProviderPrivate));
219 }
220
221 static void
222 realm_provider_iface_init (RealmDbusProviderIface *iface)
223 {
224 memcpy (iface, g_type_interface_peek_parent (iface), sizeof (*iface));
225 iface->handle_discover = realm_provider_handle_discover;
226 }
227
228 GVariant *
229 realm_provider_new_realm_info (const gchar *bus_name,
230 const gchar *object_path,
231 const gchar *interface)
232 {
233 g_return_val_if_fail (g_dbus_is_name (bus_name), NULL);
234 g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
235 g_return_val_if_fail (g_dbus_is_interface_name (interface), NULL);
236 return g_variant_new ("(sos)", bus_name, object_path, interface);
237 }
238
239 GDBusInterfaceSkeleton *
240 realm_provider_lookup_or_register_realm (RealmProvider *self,
241 GType realm_type,
242 const gchar *realm_name)
243 {
244 GDBusInterfaceSkeleton *realm;
245 GDBusConnection *connection;
246 static gint unique_number = 0;
247 const char *provider_path;
248 GError *error = NULL;
249 gchar *escaped;
250 gchar *path;
251
252 realm = g_hash_table_lookup (self->pv->realms, realm_name);
253 if (realm != NULL)
254 return realm;
255
256 realm = g_object_new (realm_type,
257 "name", realm_name,
258 "provider", self, NULL);
259
260 escaped = g_strdup (realm_name);
261 g_strcanon (escaped, REALM_DBUS_NAME_CHARS, '_');
262
263 provider_path = g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (self));
264 connection = g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (self));
265
266 path = g_strdup_printf ("%s/%s_%d", provider_path, escaped, ++unique_number);
267 g_free (escaped);
268
269 g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (realm),
270 connection, path, &error);
271 g_free (path);
272
273 if (error == NULL) {
274 g_hash_table_insert (self->pv->realms, g_strdup (realm_name), realm);
275 update_realms_property (self);
276
277 } else {
278 g_warning ("couldn't export realm on dbus connection: %s",
279 error->message);
280 g_object_unref (realm);
281 realm = NULL;
282 }
283
284 return realm;
285 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_PROVIDER_H__
17 #define __REALM_PROVIDER_H__
18
19 #include <gio/gio.h>
20
21 #include "realm-dbus-generated.h"
22
23 G_BEGIN_DECLS
24
25 #define REALM_TYPE_PROVIDER (realm_provider_get_type ())
26 #define REALM_PROVIDER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), REALM_TYPE_PROVIDER, RealmProvider))
27 #define REALM_IS_PROVIDER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), REALM_TYPE_PROVIDER))
28 #define REALM_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), REALM_TYPE_PROVIDER, RealmProviderClass))
29 #define REALM_IS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), REALM_TYPE_PROVIDER))
30 #define REALM_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), REALM_TYPE_PROVIDER, RealmProviderClass))
31
32 typedef struct _RealmProvider RealmProvider;
33 typedef struct _RealmProviderClass RealmProviderClass;
34 typedef struct _RealmProviderPrivate RealmProviderPrivate;
35
36 struct _RealmProvider {
37 RealmDbusProviderSkeleton parent;
38 RealmProviderPrivate *pv;
39 };
40
41 struct _RealmProviderClass {
42 RealmDbusProviderSkeletonClass parent_class;
43
44 void (* discover_async) (RealmProvider *provider,
45 const gchar *string,
46 GDBusMethodInvocation *invocation,
47 GAsyncReadyCallback callback,
48 gpointer user_data);
49
50 gint (* discover_finish) (RealmProvider *provider,
51 GAsyncResult *result,
52 GVariant **realms,
53 GError **error);
54 };
55
56 GType realm_provider_get_type (void) G_GNUC_CONST;
57
58 GVariant * realm_provider_new_realm_info (const gchar *bus_name,
59 const gchar *object_path,
60 const gchar *interface);
61
62 GDBusInterfaceSkeleton * realm_provider_lookup_or_register_realm (RealmProvider *self,
63 GType realm_type,
64 const gchar *realm_name);
65
66 G_END_DECLS
67
68 #endif /* __REALM_KERBEROS_PROVIDER_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-ini-config.h"
17 #include "realm-samba-config.h"
18 #include "realm-settings.h"
19
20 #include <string.h>
21
22 RealmIniConfig *
23 realm_samba_config_new_with_flags (RealmIniFlags flags,
24 GError **error)
25 {
26 RealmIniConfig *config;
27 const gchar *filename;
28 GError *err = NULL;
29
30 config = realm_ini_config_new (REALM_INI_LINE_CONTINUATIONS | flags);
31
32 filename = realm_settings_path ("smb.conf");
33
34 realm_ini_config_read_file (config, filename, &err);
35
36 if (err != NULL) {
37 /* If the caller wants errors, then don't return an invalid samba config */
38 if (error) {
39 g_propagate_error (error, err);
40 g_object_unref (config);
41 config = NULL;
42
43 /* If the caller doesn't care, then warn but continue */
44 } else {
45 g_warning ("Couldn't load config file: %s: %s", filename,
46 err->message);
47 g_error_free (err);
48 }
49 }
50
51 return config;
52 }
53
54 RealmIniConfig *
55 realm_samba_config_new (GError **error)
56 {
57 return realm_samba_config_new_with_flags (REALM_INI_NONE, error);
58 }
59
60 gboolean
61 realm_samba_config_change (const gchar *section,
62 GError **error,
63 ...)
64 {
65 GHashTable *parameters;
66 const gchar *name;
67 const gchar *value;
68 gboolean ret;
69 va_list va;
70
71 g_return_val_if_fail (section != NULL, FALSE);
72 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
73
74 parameters = g_hash_table_new (g_str_hash, g_str_equal);
75 va_start (va, error);
76 while ((name = va_arg (va, const gchar *)) != NULL) {
77 value = va_arg (va, const gchar *);
78 g_hash_table_insert (parameters, (gpointer)name, (gpointer)value);
79 }
80 va_end (va);
81
82 ret = realm_samba_config_changev (section, parameters, error);
83 g_hash_table_unref (parameters);
84 return ret;
85 }
86
87 gboolean
88 realm_samba_config_changev (const gchar *section,
89 GHashTable *parameters,
90 GError **error)
91 {
92 RealmIniConfig *config;
93 gboolean ret = FALSE;
94 const gchar *filename;
95
96 g_return_val_if_fail (section != NULL, FALSE);
97 g_return_val_if_fail (parameters != NULL, FALSE);
98 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
99
100 config = realm_ini_config_new (REALM_INI_LINE_CONTINUATIONS | REALM_INI_NO_WATCH);
101 filename = realm_settings_path ("smb.conf");
102 realm_ini_config_set_filename (config, filename);
103
104 ret = realm_ini_config_changev (config, section, parameters, error);
105 g_object_unref (config);
106 return ret;
107 }
108
109 static gchar **
110 update_lists_for_changes (const gchar **original,
111 const gchar **add,
112 const gchar **remove)
113 {
114 GPtrArray *changed;
115 gchar *value;
116 gint i, j;
117
118 changed = g_ptr_array_new ();
119
120 /* Filter the remove logins */
121 for (i = 0; original != NULL && original[i] != NULL; i++) {
122 value = g_strstrip (g_strdup (original[i]));
123 for (j = 0; remove != NULL && remove[j] != NULL; j++) {
124 if (g_ascii_strcasecmp (remove[j], value) == 0)
125 break;
126 }
127 if ((remove == NULL || remove[j] == NULL) && !g_str_equal (value, ""))
128 g_ptr_array_add (changed, value);
129 else
130 g_free (value);
131 }
132
133 /* Add the logins */
134 for (j = 0; add != NULL && add[j] != NULL; j++) {
135 for (i = 0; original != NULL && original[i] != NULL; i++) {
136 if (g_ascii_strcasecmp (add[j], original[i]) == 0)
137 break;
138 }
139 if (original == NULL || original[i] == NULL)
140 g_ptr_array_add (changed, g_strdup (add[j]));
141 }
142
143 g_ptr_array_add (changed, NULL);
144 return (gchar **)g_ptr_array_free (changed, FALSE);
145 }
146
147 gboolean
148 realm_samba_config_change_list (const gchar *section,
149 const gchar *name,
150 const gchar *delimiters,
151 const gchar **add,
152 const gchar **remove,
153 GError **error)
154 {
155 RealmIniConfig *config;
156 gboolean ret = FALSE;
157 gchar **original;
158 gchar **changed;
159 gchar *delim;
160
161 g_return_val_if_fail (section != NULL, FALSE);
162 g_return_val_if_fail (name != NULL, FALSE);
163 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
164
165 config = realm_samba_config_new_with_flags (REALM_INI_NO_WATCH, error);
166 if (config != NULL) {
167 original = realm_ini_config_get_list (config, section, name, delimiters);
168 changed = update_lists_for_changes ((const gchar **)original, add, remove);
169 g_strfreev (original);
170
171 delim = g_strdup_printf ("%c ", delimiters[0]);
172 realm_ini_config_set_list (config, section, name, delim,
173 (const gchar **)changed);
174 g_strfreev (changed);
175 g_free (delim);
176
177 ret = realm_ini_config_write_file (config, NULL, error);
178 g_object_unref (config);
179 }
180
181 return ret;
182 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_SAMBA_CONFIG_H__
17 #define __REALM_SAMBA_CONFIG_H__
18
19 #include <gio/gio.h>
20
21 #include "realm-ini-config.h"
22
23 #define REALM_SAMBA_CONFIG_GLOBAL "global"
24
25 RealmIniConfig * realm_samba_config_new (GError **error);
26
27 RealmIniConfig * realm_samba_config_new_with_flags (RealmIniFlags flags,
28 GError **error);
29
30 gboolean realm_samba_config_change (const gchar *section,
31 GError **error,
32 ...) G_GNUC_NULL_TERMINATED;
33
34 gboolean realm_samba_config_changev (const gchar *section,
35 GHashTable *parameters,
36 GError **error);
37
38 gboolean realm_samba_config_change_list (const gchar *section,
39 const gchar *name,
40 const gchar *delimiters,
41 const gchar **add,
42 const gchar **remove,
43 GError **error);
44
45 G_END_DECLS
46
47 #endif /* __REALM_SAMBA_CONFIG_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-command.h"
17 #include "realm-daemon.h"
18 #include "realm-diagnostics.h"
19 #include "realm-errors.h"
20 #include "realm-samba-config.h"
21 #include "realm-samba-enroll.h"
22 #include "realm-samba-provider.h"
23 #include "realm-settings.h"
24
25 #include <glib/gstdio.h>
26
27 #include <errno.h>
28 #include <fcntl.h>
29 #include <string.h>
30
31 typedef struct {
32 GCancellable *cancellable;
33 GDBusMethodInvocation *invocation;
34 gchar *kerberos_cache_filename;
35 gchar **environ;
36 gchar *realm;
37 } JoinClosure;
38
39 static void
40 join_closure_free (gpointer data)
41 {
42 JoinClosure *join = data;
43
44 g_clear_object (&join->cancellable);
45
46 if (join->kerberos_cache_filename) {
47 if (g_unlink (join->kerberos_cache_filename) < 0) {
48 g_warning ("couldn't remove kerberos cache file: %s: %s",
49 join->kerberos_cache_filename, g_strerror (errno));
50 }
51 g_free (join->kerberos_cache_filename);
52 }
53
54 g_free (join->realm);
55 g_strfreev (join->environ);
56 g_clear_object (&join->invocation);
57
58 g_slice_free (JoinClosure, join);
59 }
60
61 static gboolean
62 prepare_admin_cache (JoinClosure *join,
63 GBytes *admin_cache,
64 GError **error)
65 {
66 const gchar *directory;
67 gchar *filename;
68 const guchar *data;
69 gsize length;
70 gint fd;
71 int res;
72
73 data = g_bytes_get_data (admin_cache, &length);
74 g_return_val_if_fail (length > 0, FALSE);
75
76 directory = g_get_tmp_dir ();
77 filename = g_build_filename (directory, "realm-ad-kerberos-XXXXXX", NULL);
78
79 fd = g_mkstemp_full (filename, O_WRONLY, 0600);
80 if (fd < 0) {
81 g_warning ("couldn't open temporary file in %s directory for kerberos cache: %s",
82 directory, g_strerror (errno));
83 g_set_error (error, REALM_ERROR, REALM_ERROR_INTERNAL,
84 "Problem writing out the kerberos cache data");
85 g_free (filename);
86 return FALSE;
87 }
88
89 while (length > 0) {
90 res = write (fd, data, length);
91 if (res <= 0) {
92 if (errno == EAGAIN && errno == EINTR)
93 continue;
94 g_warning ("couldn't write kerberos cache to file %s: %s",
95 directory, g_strerror (errno));
96 g_set_error (error, REALM_ERROR, REALM_ERROR_INTERNAL,
97 "Problem writing out the kerberos cache data");
98 break;
99 } else {
100 length -= res;
101 data += res;
102 }
103 }
104
105 if (length != 0) {
106 g_free (filename);
107 return FALSE;
108 }
109
110 join->kerberos_cache_filename = filename;
111 join->environ = g_environ_setenv (join->environ,
112 "KRB5CCNAME", join->kerberos_cache_filename,
113 TRUE);
114
115 return TRUE;
116 }
117
118 static JoinClosure *
119 join_closure_init (const gchar *realm,
120 GBytes *admin_kerberos_cache,
121 GDBusMethodInvocation *invocation,
122 GError **error)
123 {
124 JoinClosure *join;
125
126 join = g_slice_new0 (JoinClosure);
127 join->realm = g_strdup (realm);
128 join->invocation = invocation ? g_object_ref (invocation) : NULL;
129
130 join->environ = g_environ_setenv (g_get_environ (),
131 "LC_ALL", "C",
132 TRUE);
133
134 if (!prepare_admin_cache (join, admin_kerberos_cache, error)) {
135 join_closure_free (join);
136 return NULL;
137 }
138
139 return join;
140 }
141
142 static void
143 begin_net_process (JoinClosure *join,
144 GAsyncReadyCallback callback,
145 gpointer user_data,
146 ...) G_GNUC_NULL_TERMINATED;
147
148 static void
149 begin_net_process (JoinClosure *join,
150 GAsyncReadyCallback callback,
151 gpointer user_data,
152 ...)
153 {
154 GPtrArray *args;
155 gchar *command;
156 gchar *arg;
157 va_list va;
158
159 args = g_ptr_array_new ();
160
161 /* Use our custom smb.conf */
162 g_ptr_array_add (args, (gpointer)realm_settings_path ("net"));
163 g_ptr_array_add (args, "-s");
164 g_ptr_array_add (args, SERVICE_DIR "/net-ads-smb.conf");
165
166 va_start (va, user_data);
167 do {
168 arg = va_arg (va, gchar *);
169 g_ptr_array_add (args, arg);
170 } while (arg != NULL);
171 va_end (va);
172
173 command = g_strjoinv (" ", (gchar **)args->pdata);
174 g_free (command);
175
176 realm_command_runv_async ((gchar **)args->pdata, join->environ,
177 join->invocation, join->cancellable, callback, user_data);
178
179 g_ptr_array_free (args, TRUE);
180 }
181
182 static void
183 on_list_complete (GObject *source,
184 GAsyncResult *result,
185 gpointer user_data)
186 {
187 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
188 JoinClosure *join = g_simple_async_result_get_op_res_gpointer (res);
189 GString *output = NULL;
190 RealmIniConfig *config;
191 gchar *workgroup;
192 GError *error = NULL;
193 gint status;
194
195 status = realm_command_run_finish (result, &output, &error);
196 if (error == NULL && status != 0)
197 g_set_error (&error, REALM_ERROR, REALM_ERROR_INTERNAL,
198 "Listing samba registry failed");
199
200 if (error == NULL) {
201 /* Read the command output as a samba config */
202 config = realm_ini_config_new (REALM_INI_LINE_CONTINUATIONS);
203 realm_ini_config_read_string (config, output->str);
204 workgroup = realm_ini_config_get (config, REALM_SAMBA_CONFIG_GLOBAL, "workgroup");
205 g_object_unref (config);
206
207 /* Write the workgroup parameter to the smb.conf */
208 realm_samba_config_change (REALM_SAMBA_CONFIG_GLOBAL, &error,
209 "security", "ads",
210 "realm", join->realm,
211 "workgroup", workgroup,
212 NULL);
213 g_free (workgroup);
214 }
215
216 if (error != NULL)
217 g_simple_async_result_take_error (res, error);
218
219 g_simple_async_result_complete (res);
220 g_object_unref (res);
221 }
222
223 static void
224 on_keytab_do_list (GObject *source,
225 GAsyncResult *result,
226 gpointer user_data)
227 {
228 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
229 JoinClosure *join = g_simple_async_result_get_op_res_gpointer (res);
230 GError *error = NULL;
231 gint status;
232
233 status = realm_command_run_finish (result, NULL, &error);
234 if (error == NULL && status != 0)
235 g_set_error (&error, REALM_ERROR, REALM_ERROR_INTERNAL,
236 "Extracting host keytab failed");
237
238 /*
239 * So at this point we're done joining, and want to get some settings
240 * that the net process wrote to the registry, and put them in the
241 * main smb.conf
242 */
243 if (error == NULL) {
244 begin_net_process (join, on_list_complete, g_object_ref (res),
245 "conf", "list", NULL);
246
247 } else {
248 g_simple_async_result_take_error (res, error);
249 g_simple_async_result_complete (res);
250 }
251
252 g_object_unref (res);
253 }
254
255 static void
256 on_join_do_keytab (GObject *source,
257 GAsyncResult *result,
258 gpointer user_data)
259 {
260 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
261 JoinClosure *join = g_simple_async_result_get_op_res_gpointer (res);
262 GError *error = NULL;
263 GString *output;
264 gint status;
265
266 status = realm_command_run_finish (result, &output, &error);
267 if (error == NULL && status != 0) {
268
269 /*
270 * This is bad and ugly. We run the process with LC_ALL=C so
271 * at least we know these messages will be in english.
272 *
273 * At first I thought this was a deficiency in samba's 'net'
274 * command. It's true that 'net' could be better at returning
275 * different error codes for different types of failures.
276 *
277 * But in the end this is a deficiency in Windows. When you use
278 * LDAP to do enrollment, and the permissions aren't correct
279 * it often returns stupid errors such as 'Constraint violation'
280 * or 'Object class invalid' instead of 'Insufficient access'.
281 */
282 if (g_pattern_match_simple ("*NT_STATUS_ACCESS_DENIED*", output->str) ||
283 g_pattern_match_simple ("*failed*: Constraint violation*", output->str) ||
284 g_pattern_match_simple ("*failed*: Object class violation*", output->str) ||
285 g_pattern_match_simple ("*failed*: Insufficient access*", output->str)) {
286 g_set_error (&error, REALM_ERROR, REALM_ERROR_AUTH_FAILED,
287 "Insufficient permissions to join the domain %s",
288 join->realm);
289 } else {
290 g_set_error (&error, REALM_ERROR, REALM_ERROR_INTERNAL,
291 "Joining the domain %s failed", join->realm);
292 }
293 }
294 g_string_free (output, TRUE);
295
296 if (error == NULL)
297 realm_samba_config_change (REALM_SAMBA_CONFIG_GLOBAL, &error,
298 "kerberos method", "secrets and keytab",
299 NULL);
300
301 if (error == NULL) {
302 begin_net_process (join, on_keytab_do_list, g_object_ref (res),
303 "ads", "keytab", "create", NULL);
304 } else {
305 g_simple_async_result_take_error (res, error);
306 g_simple_async_result_complete (res);
307 }
308
309 g_object_unref (res);
310 }
311
312 void
313 realm_samba_enroll_join_async (const gchar *realm,
314 GBytes *admin_kerberos_cache,
315 GDBusMethodInvocation *invocation,
316 GAsyncReadyCallback callback,
317 gpointer user_data)
318 {
319 GSimpleAsyncResult *res;
320 JoinClosure *join;
321 GError *error = NULL;
322
323 g_return_if_fail (realm != NULL);
324 g_return_if_fail (admin_kerberos_cache != NULL);
325
326 res = g_simple_async_result_new (NULL, callback, user_data,
327 realm_samba_enroll_join_async);
328
329 join = join_closure_init (realm, admin_kerberos_cache, invocation, &error);
330 if (join == NULL) {
331 g_simple_async_result_take_error (res, error);
332 g_simple_async_result_complete_in_idle (res);
333 } else {
334 g_simple_async_result_set_op_res_gpointer (res, join, join_closure_free);
335 begin_net_process (join, on_join_do_keytab, g_object_ref (res),
336 "ads", "join", "-k", join->realm, NULL);
337 }
338
339 g_object_unref (res);
340 }
341
342 gboolean
343 realm_samba_enroll_join_finish (GAsyncResult *result,
344 GError **error)
345 {
346 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
347 realm_samba_enroll_join_async), FALSE);
348
349 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error))
350 return FALSE;
351 return TRUE;
352 }
353
354 static void
355 on_leave_complete (GObject *source,
356 GAsyncResult *result,
357 gpointer user_data)
358 {
359 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
360 JoinClosure *join = g_simple_async_result_get_op_res_gpointer (res);
361 GError *error = NULL;
362 gint status;
363
364 status = realm_command_run_finish (result, NULL, &error);
365 if (error == NULL && status != 0)
366 g_set_error (&error, REALM_ERROR, REALM_ERROR_INTERNAL,
367 "Leaving the domain %s failed", join->realm);
368
369 /* Deconfigure the domain anyway, even if its not successful */
370 realm_samba_config_change (REALM_SAMBA_CONFIG_GLOBAL,
371 error ? NULL : &error,
372 "workgroup", NULL,
373 "realm", NULL,
374 "security", "user",
375 NULL);
376
377 if (error != NULL)
378 g_simple_async_result_take_error (res, error);
379
380 g_simple_async_result_complete (res);
381 g_object_unref (res);
382 }
383
384 static void
385 on_flush_do_leave (GObject *source,
386 GAsyncResult *result,
387 gpointer user_data)
388 {
389 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
390 JoinClosure *join = g_simple_async_result_get_op_res_gpointer (res);
391 GError *error = NULL;
392 gint status;
393
394 status = realm_command_run_finish (result, NULL, &error);
395 if (error != NULL || status != 0)
396 realm_diagnostics_error (join->invocation, error, "Flushing entries from the keytab failed");
397 g_clear_error (&error);
398
399 begin_net_process (join, on_leave_complete, g_object_ref (res),
400 "ads", "leave", "-k", NULL);
401 g_object_unref (res);
402 }
403
404 void
405 realm_samba_enroll_leave_async (const gchar *realm,
406 GBytes *admin_kerberos_cache,
407 GDBusMethodInvocation *invocation,
408 GAsyncReadyCallback callback,
409 gpointer user_data)
410 {
411 GSimpleAsyncResult *res;
412 JoinClosure *join;
413 GError *error = NULL;
414
415 res = g_simple_async_result_new (NULL, callback, user_data,
416 realm_samba_enroll_leave_async);
417
418 join = join_closure_init (realm, admin_kerberos_cache, invocation, &error);
419 if (error == NULL) {
420 g_simple_async_result_set_op_res_gpointer (res, join, join_closure_free);
421 begin_net_process (join, on_flush_do_leave, g_object_ref (res),
422 "ads", "keytab", "flush", NULL);
423
424 } else {
425 g_simple_async_result_take_error (res, error);
426 g_simple_async_result_complete_in_idle (res);
427 }
428
429 g_object_unref (res);
430 }
431
432 gboolean
433 realm_samba_enroll_leave_finish (GAsyncResult *result,
434 GError **error)
435 {
436 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
437 realm_samba_enroll_leave_async), FALSE);
438
439 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error))
440 return FALSE;
441 return TRUE;
442 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_SAMBA_ENROLL_H__
17 #define __REALM_SAMBA_ENROLL_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 void realm_samba_enroll_join_async (const gchar *realm,
24 GBytes *admin_kerberos_cache,
25 GDBusMethodInvocation *invocation,
26 GAsyncReadyCallback callback,
27 gpointer user_data);
28
29 gboolean realm_samba_enroll_join_finish (GAsyncResult *result,
30 GError **error);
31
32 void realm_samba_enroll_leave_async (const gchar *realm,
33 GBytes *admin_kerberos_cache,
34 GDBusMethodInvocation *invocation,
35 GAsyncReadyCallback callback,
36 gpointer user_data);
37
38 gboolean realm_samba_enroll_leave_finish (GAsyncResult *result,
39 GError **error);
40
41 G_END_DECLS
42
43 #endif /* __REALM_SAMBA_ENROLL_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-ad-discover.h"
17 #include "realm-command.h"
18 #include "realm-daemon.h"
19 #include "realm-dbus-constants.h"
20 #include "realm-diagnostics.h"
21 #include "realm-discovery.h"
22 #include "realm-errors.h"
23 #include "realm-kerberos.h"
24 #include "realm-packages.h"
25 #include "realm-samba.h"
26 #include "realm-samba-config.h"
27 #include "realm-samba-enroll.h"
28 #include "realm-samba-provider.h"
29 #include "realm-samba-winbind.h"
30
31 #include <glib/gstdio.h>
32
33 #include <errno.h>
34
35 struct _RealmSambaProvider {
36 RealmProvider parent;
37 RealmIniConfig *config;
38 };
39
40 typedef struct {
41 RealmProviderClass parent_class;
42 } RealmSambaProviderClass;
43
44 enum {
45 PROP_0,
46 PROP_SAMBA_CONFIG,
47 };
48
49 static guint provider_owner_id = 0;
50
51 G_DEFINE_TYPE (RealmSambaProvider, realm_samba_provider, REALM_TYPE_PROVIDER);
52
53 static void
54 realm_samba_provider_init (RealmSambaProvider *self)
55 {
56 self->config = realm_samba_config_new (NULL);
57 }
58
59 static void
60 ensure_local_realm (RealmSambaProvider *self)
61 {
62 RealmIniConfig *config;
63 GError *error = NULL;
64 gchar *name = NULL;
65 gchar *security;
66
67 config = realm_samba_config_new (&error);
68 if (error != NULL) {
69 g_warning ("Couldn't read samba global configuration file: %s", error->message);
70 g_error_free (error);
71 return;
72 }
73
74 security = realm_ini_config_get (config, REALM_SAMBA_CONFIG_GLOBAL, "security");
75 if (security != NULL && g_ascii_strcasecmp (security, "ADS") == 0)
76 name = realm_ini_config_get (config, REALM_SAMBA_CONFIG_GLOBAL, "realm");
77
78 if (name != NULL) {
79 realm_provider_lookup_or_register_realm (REALM_PROVIDER (self),
80 REALM_TYPE_SAMBA, name);
81 }
82
83 g_free (name);
84 g_free (security);
85 g_object_unref (config);
86 }
87
88 static void
89 realm_samba_provider_discover_async (RealmProvider *provider,
90 const gchar *string,
91 GDBusMethodInvocation *invocation,
92 GAsyncReadyCallback callback,
93 gpointer user_data)
94 {
95 realm_ad_discover_async (string, invocation, callback, user_data);
96 }
97
98 static gint
99 realm_samba_provider_discover_finish (RealmProvider *provider,
100 GAsyncResult *result,
101 GVariant **realms,
102 GError **error)
103 {
104 GDBusInterfaceSkeleton *realm;
105 GHashTable *discovery;
106 const gchar *object_path;
107 GVariant *realm_info;
108 gchar *name;
109
110 name = realm_ad_discover_finish (result, &discovery, error);
111 if (name == NULL)
112 return 0;
113
114 realm = realm_provider_lookup_or_register_realm (provider,
115 REALM_TYPE_SAMBA,
116 name);
117 g_free (name);
118
119 if (realm == NULL) {
120 g_hash_table_unref (discovery);
121 return 0;
122 }
123
124 realm_kerberos_set_discovery (REALM_KERBEROS (realm), discovery);
125
126 object_path = g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (realm));
127 realm_info = realm_provider_new_realm_info (REALM_DBUS_SAMBA_NAME, object_path,
128 REALM_DBUS_KERBEROS_REALM_INTERFACE);
129 *realms = g_variant_new_array (G_VARIANT_TYPE ("(sos)"), &realm_info, 1);
130 g_variant_ref_sink (*realms);
131
132 g_hash_table_unref (discovery);
133 return 100;
134 }
135
136 static void
137 realm_samba_provider_get_property (GObject *obj,
138 guint prop_id,
139 GValue *value,
140 GParamSpec *pspec)
141 {
142 RealmSambaProvider *self = REALM_SAMBA_PROVIDER (obj);
143
144 switch (prop_id) {
145 case PROP_SAMBA_CONFIG:
146 g_value_set_object (value, self->config);
147 break;
148 default:
149 G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec);
150 break;
151 }
152 }
153
154 static void
155 realm_samba_provider_finalize (GObject *obj)
156 {
157 RealmSambaProvider *self = REALM_SAMBA_PROVIDER (obj);
158
159 g_object_unref (self->config);
160
161 G_OBJECT_CLASS (realm_samba_provider_parent_class)->finalize (obj);
162 }
163
164 void
165 realm_samba_provider_class_init (RealmSambaProviderClass *klass)
166 {
167 RealmProviderClass *provider_class = REALM_PROVIDER_CLASS (klass);
168 GObjectClass *object_class = G_OBJECT_CLASS (klass);
169
170 provider_class->discover_async = realm_samba_provider_discover_async;
171 provider_class->discover_finish = realm_samba_provider_discover_finish;
172
173 object_class->get_property = realm_samba_provider_get_property;
174 object_class->finalize = realm_samba_provider_finalize;
175
176 g_object_class_install_property (object_class, PROP_SAMBA_CONFIG,
177 g_param_spec_object ("samba-config", "Samba Config", "Samba Config",
178 REALM_TYPE_INI_CONFIG, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
179
180 }
181
182 static void
183 on_name_acquired (GDBusConnection *connection,
184 const gchar *name,
185 gpointer user_data)
186 {
187 realm_daemon_poke ();
188 }
189
190 static void
191 on_name_lost (GDBusConnection *connection,
192 const gchar *name,
193 gpointer user_data)
194 {
195 g_warning ("couldn't claim provider name on DBus bus: %s", REALM_DBUS_SAMBA_NAME);
196 }
197
198 void
199 realm_samba_provider_start (GDBusConnection *connection)
200 {
201 RealmSambaProvider *provider;
202 GError *error = NULL;
203
204 g_return_if_fail (provider_owner_id == 0);
205
206 provider = g_object_new (REALM_TYPE_SAMBA_PROVIDER, NULL);
207
208 g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (provider),
209 connection, REALM_DBUS_SAMBA_PATH,
210 &error);
211
212 if (error != NULL) {
213 g_warning ("couldn't export RealmSambaProvider on dbus connection: %s",
214 error->message);
215 return;
216 }
217
218 ensure_local_realm (provider);
219
220 provider_owner_id = g_bus_own_name_on_connection (connection,
221 REALM_DBUS_SAMBA_NAME,
222 G_BUS_NAME_OWNER_FLAGS_NONE,
223 on_name_acquired,
224 on_name_lost,
225 provider, g_object_unref);
226 }
227
228 void
229 realm_samba_provider_stop (void)
230 {
231 if (provider_owner_id != 0)
232 g_bus_unown_name (provider_owner_id);
233 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_SAMBA_PROVIDER_H__
17 #define __REALM_SAMBA_PROVIDER_H__
18
19 #include <gio/gio.h>
20
21 #include "realm-provider.h"
22
23 G_BEGIN_DECLS
24
25 #define REALM_TYPE_SAMBA_PROVIDER (realm_samba_provider_get_type ())
26 #define REALM_SAMBA_PROVIDER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), REALM_TYPE_SAMBA_PROVIDER, RealmSambaProvider))
27 #define REALM_IS_SAMBA_PROVIDER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), REALM_TYPE_SAMBA_PROVIDER))
28
29 typedef struct _RealmSambaProvider RealmSambaProvider;
30
31 GType realm_samba_provider_get_type (void) G_GNUC_CONST;
32
33 void realm_samba_provider_start (GDBusConnection *connection);
34
35 void realm_samba_provider_stop (void);
36
37 G_END_DECLS
38
39 #endif /* __REALM_SAMBA_PROVIDER_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-command.h"
17 #include "realm-daemon.h"
18 #include "realm-diagnostics.h"
19 #include "realm-errors.h"
20 #include "realm-samba-config.h"
21 #include "realm-samba-winbind.h"
22 #include "realm-settings.h"
23 #include "realm-service.h"
24
25 #include <glib/gstdio.h>
26
27 #include <errno.h>
28
29 static void
30 on_nss_complete (GObject *source,
31 GAsyncResult *result,
32 gpointer user_data)
33 {
34 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
35 GError *error = NULL;
36 gint status;
37
38 status = realm_command_run_finish (result, NULL, &error);
39 if (error == NULL && status != 0)
40 g_set_error (&error, REALM_ERROR, REALM_ERROR_INTERNAL,
41 "Enabling winbind in /etc/nsswitch.conf failed");
42 if (error != NULL)
43 g_simple_async_result_take_error (res, error);
44 g_simple_async_result_complete (res);
45
46 g_object_unref (res);
47 }
48
49 static void
50 on_enable_do_nss (GObject *source,
51 GAsyncResult *result,
52 gpointer user_data)
53 {
54 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
55 GDBusMethodInvocation *invocation = g_simple_async_result_get_op_res_gpointer (res);
56 GError *error = NULL;
57
58 realm_service_enable_and_restart_finish (result, &error);
59 if (error == NULL) {
60 realm_command_run_known_async ("winbind-enable-logins", NULL, invocation,
61 NULL, on_nss_complete, g_object_ref (res));
62
63 } else {
64 g_simple_async_result_take_error (res, error);
65 g_simple_async_result_complete (res);
66 }
67
68 g_object_unref (res);
69 }
70
71 void
72 realm_samba_winbind_configure_async (GDBusMethodInvocation *invocation,
73 GAsyncReadyCallback callback,
74 gpointer user_data)
75 {
76 GSimpleAsyncResult *res;
77 GError *error = NULL;
78 const gchar *service;
79
80 g_return_if_fail (invocation != NULL || G_IS_DBUS_METHOD_INVOCATION (invocation));
81
82 res = g_simple_async_result_new (NULL, callback, user_data,
83 realm_samba_winbind_configure_async);
84 if (invocation != NULL)
85 g_simple_async_result_set_op_res_gpointer (res, g_object_ref (invocation),
86 g_object_unref);
87
88 /* TODO: need to use autorid mapping */
89
90 realm_samba_config_change (REALM_SAMBA_CONFIG_GLOBAL, &error,
91 "idmap uid", "10000-20000",
92 "idmap gid", "10000-20000",
93 "winbind enum users", "no",
94 "winbind enum groups", "no",
95 "template shell", realm_settings_string ("user", "shell"),
96 "winbind offline logon", "yes",
97 "winbind refresh tickets", "yes",
98 NULL);
99
100 if (error == NULL) {
101 service = realm_settings_string ("services", "winbind");
102 realm_service_enable_and_restart (service, invocation,
103 on_enable_do_nss, g_object_ref (res));
104 } else {
105 g_simple_async_result_take_error (res, error);
106 g_simple_async_result_complete_in_idle (res);
107 }
108
109 g_object_unref (res);
110 }
111
112 gboolean
113 realm_samba_winbind_configure_finish (GAsyncResult *result,
114 GError **error)
115 {
116 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
117 realm_samba_winbind_configure_async), FALSE);
118 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error))
119 return FALSE;
120 return TRUE;
121 }
122
123 static void
124 on_disable_complete (GObject *source,
125 GAsyncResult *result,
126 gpointer user_data)
127 {
128 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
129 GError *error = NULL;
130
131 realm_service_disable_and_stop_finish (result, &error);
132 if (error != NULL)
133 g_simple_async_result_take_error (res, error);
134 g_simple_async_result_complete (res);
135
136 g_object_unref (res);
137 }
138
139 static void
140 on_nss_do_disable (GObject *source,
141 GAsyncResult *result,
142 gpointer user_data)
143 {
144 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
145 GDBusMethodInvocation *invocation = g_simple_async_result_get_op_res_gpointer (res);
146 GError *error = NULL;
147 gint status;
148
149 status = realm_command_run_finish (result, NULL, &error);
150 if (error == NULL && status != 0)
151 g_set_error (&error, REALM_ERROR, REALM_ERROR_INTERNAL,
152 "Disabling winbind in /etc/nsswitch.conf failed");
153 if (error == NULL) {
154 realm_service_disable_and_stop ("winbind", invocation,
155 on_disable_complete, g_object_ref (res));
156 } else {
157 g_simple_async_result_take_error (res, error);
158 g_simple_async_result_complete (res);
159 }
160
161 g_object_unref (res);
162 }
163
164 void
165 realm_samba_winbind_deconfigure_async (GDBusMethodInvocation *invocation,
166 GAsyncReadyCallback callback,
167 gpointer user_data)
168 {
169 GSimpleAsyncResult *res;
170
171 g_return_if_fail (invocation != NULL || G_IS_DBUS_METHOD_INVOCATION (invocation));
172
173 res = g_simple_async_result_new (NULL, callback, user_data,
174 realm_samba_winbind_deconfigure_async);
175 if (invocation != NULL)
176 g_simple_async_result_set_op_res_gpointer (res, g_object_ref (invocation),
177 g_object_unref);
178
179 realm_command_run_known_async ("winbind-disable-logins", NULL, invocation,
180 NULL, on_nss_do_disable, g_object_ref (res));
181
182 g_object_unref (res);
183 }
184
185 gboolean
186 realm_samba_winbind_deconfigure_finish (GAsyncResult *result,
187 GError **error)
188 {
189 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
190 realm_samba_winbind_deconfigure_async), FALSE);
191 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error))
192 return FALSE;
193 return TRUE;
194
195 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_SAMBA_WINBIND_H__
17 #define __REALM_SAMBA_WINBIND_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 void realm_samba_winbind_configure_async (GDBusMethodInvocation *invocation,
24 GAsyncReadyCallback callback,
25 gpointer user_data);
26
27 gboolean realm_samba_winbind_configure_finish (GAsyncResult *result,
28 GError **error);
29
30 void realm_samba_winbind_deconfigure_async (GDBusMethodInvocation *invocation,
31 GAsyncReadyCallback callback,
32 gpointer user_data);
33
34 gboolean realm_samba_winbind_deconfigure_finish (GAsyncResult *result,
35 GError **error);
36
37 G_END_DECLS
38
39 #endif /* __REALM_SAMBA_WINBIND_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-ad-discover.h"
17 #include "realm-command.h"
18 #include "realm-daemon.h"
19 #include "realm-dbus-constants.h"
20 #include "realm-diagnostics.h"
21 #include "realm-discovery.h"
22 #include "realm-errors.h"
23 #include "realm-packages.h"
24 #include "realm-provider.h"
25 #include "realm-samba.h"
26 #include "realm-samba-config.h"
27 #include "realm-samba-enroll.h"
28 #include "realm-samba-winbind.h"
29
30 #include <glib/gstdio.h>
31
32 #include <errno.h>
33 #include <string.h>
34
35 struct _RealmSamba {
36 RealmKerberos parent;
37 gchar *name;
38 RealmIniConfig *config;
39 gulong config_sig;
40 };
41
42 typedef struct {
43 RealmKerberosClass parent_class;
44 } RealmSambaClass;
45
46 enum {
47 PROP_0,
48 PROP_NAME,
49 PROP_DOMAIN,
50 PROP_PROVIDER,
51 };
52
53 G_DEFINE_TYPE (RealmSamba, realm_samba, REALM_TYPE_KERBEROS);
54
55 static void
56 realm_samba_init (RealmSamba *self)
57 {
58 g_object_set (self, "suggested-administrator", "Administrator", NULL);
59 }
60
61 static gchar *
62 lookup_enrolled_realm (RealmSamba *self)
63 {
64 gchar *enrolled = NULL;
65 gchar *security;
66
67 security = realm_ini_config_get (self->config, REALM_SAMBA_CONFIG_GLOBAL, "security");
68 if (security != NULL && g_ascii_strcasecmp (security, "ADS") == 0)
69 enrolled = realm_ini_config_get (self->config, REALM_SAMBA_CONFIG_GLOBAL, "realm");
70 return enrolled;
71 }
72
73 static gboolean
74 lookup_is_enrolled (RealmSamba *self)
75 {
76 gchar *enrolled;
77 gboolean ret;
78
79 enrolled = lookup_enrolled_realm (self);
80 ret = g_strcmp0 (self->name, enrolled) == 0;
81 g_free (enrolled);
82
83 return ret;
84 }
85
86 static gchar *
87 lookup_login_prefix (RealmSamba *self)
88 {
89 gchar *workgroup;
90 gchar *separator;
91
92 workgroup = realm_ini_config_get (self->config, REALM_SAMBA_CONFIG_GLOBAL, "workgroup");
93 if (workgroup == NULL)
94 return NULL;
95
96 separator = realm_ini_config_get (self->config, REALM_SAMBA_CONFIG_GLOBAL, "winbind separator");
97 if (separator == NULL)
98 separator = g_strdup ("\\");
99
100 return g_strdup_printf ("%s%s", workgroup, separator);
101 }
102
103 typedef struct {
104 GDBusMethodInvocation *invocation;
105 GBytes *admin_kerberos_cache;
106 gchar *realm_name;
107 GHashTable *discovery;
108 } EnrollClosure;
109
110 static void
111 enroll_closure_free (gpointer data)
112 {
113 EnrollClosure *enroll = data;
114 g_free (enroll->realm_name);
115 g_object_unref (enroll->invocation);
116 g_bytes_unref (enroll->admin_kerberos_cache);
117 g_hash_table_unref (enroll->discovery);
118 g_slice_free (EnrollClosure, enroll);
119 }
120
121 static void
122 on_winbind_done (GObject *source,
123 GAsyncResult *result,
124 gpointer user_data)
125 {
126 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
127 GError *error = NULL;
128
129 realm_samba_winbind_configure_finish (result, &error);
130 if (error != NULL)
131 g_simple_async_result_take_error (res, error);
132 g_simple_async_result_complete (res);
133
134 g_object_unref (res);
135 }
136
137 static void
138 on_join_do_winbind (GObject *source,
139 GAsyncResult *result,
140 gpointer user_data)
141 {
142 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
143 EnrollClosure *enroll = g_simple_async_result_get_op_res_gpointer (res);
144 GError *error = NULL;
145
146 realm_samba_enroll_join_finish (result, &error);
147 if (error == NULL) {
148 realm_samba_winbind_configure_async (enroll->invocation,
149 on_winbind_done, g_object_ref (res));
150 } else {
151 g_simple_async_result_take_error (res, error);
152 g_simple_async_result_complete (res);
153 }
154
155 g_object_unref (res);
156 }
157
158 static void
159 on_install_do_join (GObject *source,
160 GAsyncResult *result,
161 gpointer user_data)
162 {
163 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
164 EnrollClosure *enroll = g_simple_async_result_get_op_res_gpointer (res);
165 GError *error = NULL;
166
167 realm_packages_install_finish (result, &error);
168 if (error == NULL) {
169 realm_samba_enroll_join_async (enroll->realm_name, enroll->admin_kerberos_cache,
170 enroll->invocation, on_join_do_winbind,
171 g_object_ref (res));
172
173 } else {
174 g_simple_async_result_take_error (res, error);
175 g_simple_async_result_complete (res);
176 }
177
178 g_object_unref (res);
179 }
180
181 static void
182 on_discover_do_install (GObject *source,
183 GAsyncResult *result,
184 gpointer user_data)
185 {
186 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
187 EnrollClosure *enroll = g_simple_async_result_get_op_res_gpointer (res);
188 GHashTable *discovery = NULL;
189 GError *error = NULL;
190
191 if (realm_ad_discover_finish (result, &discovery, &error)) {
192 enroll->discovery = discovery;
193 realm_packages_install_async ("samba-packages", enroll->invocation,
194 on_install_do_join, g_object_ref (res));
195
196 } else if (error == NULL) {
197 g_simple_async_result_set_error (res, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
198 "Invalid or unusable realm argument");
199 g_simple_async_result_complete (res);
200
201 } else {
202 g_simple_async_result_take_error (res, error);
203 g_simple_async_result_complete (res);
204 }
205
206 g_object_unref (res);
207
208 }
209
210 static void
211 realm_samba_enroll_async (RealmKerberos *realm,
212 GBytes *admin_kerberos_cache,
213 GDBusMethodInvocation *invocation,
214 GAsyncReadyCallback callback,
215 gpointer user_data)
216 {
217 RealmSamba *self = REALM_SAMBA (realm);
218 GSimpleAsyncResult *res;
219 EnrollClosure *enroll;
220 gchar *enrolled;
221
222 res = g_simple_async_result_new (G_OBJECT (realm), callback, user_data,
223 realm_samba_enroll_async);
224 enroll = g_slice_new0 (EnrollClosure);
225 enroll->realm_name = g_strdup (self->name);
226 enroll->invocation = g_object_ref (invocation);
227 enroll->admin_kerberos_cache = g_bytes_ref (admin_kerberos_cache);
228 g_simple_async_result_set_op_res_gpointer (res, enroll, enroll_closure_free);
229
230 enroll->discovery = realm_kerberos_get_discovery (realm);
231 if (enroll->discovery)
232 g_hash_table_ref (enroll->discovery);
233
234 /* Make sure not already enrolled in a realm */
235 enrolled = lookup_enrolled_realm (self);
236 if (enrolled != NULL) {
237 g_simple_async_result_set_error (res, REALM_ERROR, REALM_ERROR_ALREADY_ENROLLED,
238 "Already enrolled in a realm");
239 g_simple_async_result_complete_in_idle (res);
240
241 /* Caller didn't discover first time around, so do that now */
242 } else if (enroll->discovery == NULL) {
243 realm_ad_discover_async (self->name, invocation,
244 on_discover_do_install, g_object_ref (res));
245
246 /* Already have discovery info, so go straight to install */
247 } else {
248 realm_packages_install_async ("samba-packages", invocation,
249 on_install_do_join, g_object_ref (res));
250 }
251
252 g_free (enrolled);
253 g_object_unref (res);
254 }
255
256 typedef struct {
257 GDBusMethodInvocation *invocation;
258 gchar *realm_name;
259 } UnenrollClosure;
260
261 static void
262 unenroll_closure_free (gpointer data)
263 {
264 UnenrollClosure *unenroll = data;
265 g_free (unenroll->realm_name);
266 g_object_unref (unenroll->invocation);
267 g_slice_free (UnenrollClosure, unenroll);
268 }
269
270 static void
271 on_remove_winbind_done (GObject *source,
272 GAsyncResult *result,
273 gpointer user_data)
274 {
275 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
276 GError *error = NULL;
277
278 realm_samba_winbind_deconfigure_finish (result, &error);
279 if (error != NULL)
280 g_simple_async_result_take_error (res, error);
281 g_simple_async_result_complete (res);
282
283 g_object_unref (res);
284 }
285
286 static void
287 on_leave_do_winbind (GObject *source,
288 GAsyncResult *result,
289 gpointer user_data)
290 {
291 GSimpleAsyncResult *res = G_SIMPLE_ASYNC_RESULT (user_data);
292 UnenrollClosure *unenroll = g_simple_async_result_get_op_res_gpointer (res);
293
294 realm_samba_enroll_leave_finish (result, NULL);
295
296 /* We don't care if we can leave or not, just continue with other steps */
297 realm_samba_winbind_deconfigure_async (unenroll->invocation,
298 on_remove_winbind_done,
299 g_object_ref (res));
300
301 g_object_unref (res);
302 }
303
304 static void
305 realm_samba_unenroll_async (RealmKerberos *realm,
306 GBytes *admin_kerberos_cache,
307 GDBusMethodInvocation *invocation,
308 GAsyncReadyCallback callback,
309 gpointer user_data)
310 {
311 RealmSamba *self = REALM_SAMBA (realm);
312 GSimpleAsyncResult *res;
313 UnenrollClosure *unenroll;
314 gchar *enrolled;
315
316 res = g_simple_async_result_new (G_OBJECT (realm), callback, user_data,
317 realm_samba_unenroll_async);
318 unenroll = g_slice_new0 (UnenrollClosure);
319 unenroll->realm_name = g_strdup (self->name);
320 unenroll->invocation = g_object_ref (invocation);
321 g_simple_async_result_set_op_res_gpointer (res, unenroll, unenroll_closure_free);
322
323 /* Check that enrolled in this realm */
324 enrolled = lookup_enrolled_realm (self);
325 if (g_strcmp0 (enrolled, self->name) == 0) {
326 realm_samba_enroll_leave_async (self->name, admin_kerberos_cache, invocation,
327 on_leave_do_winbind, g_object_ref (res));
328 } else {
329 g_simple_async_result_set_error (res, REALM_ERROR, REALM_ERROR_NOT_ENROLLED,
330 "Not currently enrolled in the realm");
331 g_simple_async_result_complete_in_idle (res);
332 }
333
334 g_object_unref (res);
335 }
336
337 static gboolean
338 realm_samba_generic_finish (RealmKerberos *realm,
339 GAsyncResult *result,
340 GError **error)
341 {
342 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error))
343 return FALSE;
344
345 return TRUE;
346 }
347
348 static gchar **
349 prune_login_names (const gchar *prefix,
350 const gchar **logins,
351 GError **error)
352 {
353 GPtrArray *names;
354 gsize prefix_len;
355 gchar *login;
356 gint i;
357
358 names = g_ptr_array_new_full (0, g_free);
359 prefix_len = strlen (prefix);
360
361 for (i = 0; logins != NULL && logins[i] != NULL; i++) {
362 if (g_ascii_strncasecmp (prefix, logins[i], prefix_len) != 0) {
363 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
364 "Invalid login argument: %s", logins[i]);
365 g_ptr_array_free (names, TRUE);
366 return NULL;
367 }
368
369 login = g_utf8_strdown (logins[i] + prefix_len, -1);
370 g_ptr_array_add (names, login);
371 }
372
373 g_ptr_array_add (names, NULL);
374 return (gchar **)g_ptr_array_free (names, FALSE);
375 }
376
377 static gboolean
378 realm_samba_change_logins (RealmKerberos *realm,
379 GDBusMethodInvocation *invocation,
380 const gchar **add,
381 const gchar **remove,
382 GError **error)
383 {
384 RealmSamba *self = REALM_SAMBA (realm);
385 gchar **remove_names = NULL;
386 gchar **add_names = NULL;
387 gboolean ret = FALSE;
388 gchar *prefix;
389
390 if (!lookup_is_enrolled (self)) {
391 g_set_error (error, REALM_ERROR, REALM_ERROR_NOT_ENROLLED,
392 "Not enrolled in this realm");
393 return FALSE;
394 }
395
396 prefix = lookup_login_prefix (self);
397
398 add_names = prune_login_names (prefix, add, error);
399 if (add_names != NULL)
400 remove_names = prune_login_names (prefix, remove, error);
401
402 if (add_names && remove_names) {
403 ret = realm_ini_config_change_list (self->config,
404 REALM_SAMBA_CONFIG_GLOBAL,
405 "realmd permitted logins", ",",
406 (const gchar **)add_names,
407 (const gchar **)remove_names,
408 error);
409 }
410
411 g_strfreev (remove_names);
412 g_strfreev (add_names);
413
414 return ret;
415 }
416
417 static void
418 update_properties (RealmSamba *self)
419 {
420 GPtrArray *permitted;
421 gchar *login_format;
422 gchar **values;
423 gchar *prefix;
424 gint i;
425
426 g_object_set (self, "enrolled", lookup_is_enrolled (self), NULL);
427
428 /* Setup the workgroup property */
429 prefix = lookup_login_prefix (self);
430 if (prefix != NULL) {
431 login_format = g_strdup_printf ("%s%%s", prefix);
432 g_object_set (self, "login-format", login_format, NULL);
433 g_free (login_format);
434 } else {
435 g_object_set (self, "login-format", "", NULL);
436 }
437
438 permitted = g_ptr_array_new_full (0, g_free);
439 values = realm_ini_config_get_list (self->config, REALM_SAMBA_CONFIG_GLOBAL,
440 "realmd permitted logins", ",");
441
442 for (i = 0; values != NULL && values[i] != NULL; i++)
443 g_ptr_array_add (permitted, g_strdup_printf ("%s%s", prefix, values[i]));
444 g_ptr_array_add (permitted, NULL);
445
446 g_object_set (self, "permitted-logins", (gchar **)permitted->pdata, NULL);
447 g_ptr_array_free (permitted, TRUE);
448 g_strfreev (values);
449
450 g_free (prefix);
451 }
452
453 static void
454 on_config_changed (RealmIniConfig *config,
455 gpointer user_data)
456 {
457 update_properties (REALM_SAMBA (user_data));
458 }
459
460 static void
461 realm_samba_get_property (GObject *obj,
462 guint prop_id,
463 GValue *value,
464 GParamSpec *pspec)
465 {
466 RealmSamba *self = REALM_SAMBA (obj);
467
468 switch (prop_id) {
469 case PROP_NAME:
470 g_value_set_string (value, self->name);
471 break;
472 default:
473 G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec);
474 break;
475 }
476 }
477
478 static void
479 realm_samba_set_property (GObject *obj,
480 guint prop_id,
481 const GValue *value,
482 GParamSpec *pspec)
483 {
484 RealmSamba *self = REALM_SAMBA (obj);
485 RealmProvider *provider;
486 gchar *domain;
487
488 switch (prop_id) {
489 case PROP_NAME:
490 self->name = g_value_dup_string (value);
491 domain = g_ascii_strdown (self->name, -1);
492 g_object_set (self, "domain", domain, NULL);
493 g_free (domain);
494 break;
495 case PROP_PROVIDER:
496 provider = g_value_get_object (value);
497 g_object_get (provider, "samba-config", &self->config, NULL);
498 self->config_sig = g_signal_connect (self->config, "changed",
499 G_CALLBACK (on_config_changed),
500 self);
501 break;
502 default:
503 G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec);
504 break;
505 }
506 }
507
508 static void
509 realm_samba_consructed (GObject *obj)
510 {
511 RealmSamba *self = REALM_SAMBA (obj);
512
513 G_OBJECT_CLASS (realm_samba_parent_class)->constructed (obj);
514
515 update_properties (self);
516 }
517
518 static void
519 realm_samba_finalize (GObject *obj)
520 {
521 RealmSamba *self = REALM_SAMBA (obj);
522
523 g_free (self->name);
524 if (self->config)
525 g_object_unref (self->config);
526
527 G_OBJECT_CLASS (realm_samba_parent_class)->finalize (obj);
528 }
529
530 void
531 realm_samba_class_init (RealmSambaClass *klass)
532 {
533 RealmKerberosClass *kerberos_class = REALM_KERBEROS_CLASS (klass);
534 GObjectClass *object_class = G_OBJECT_CLASS (klass);
535
536 kerberos_class->enroll_async = realm_samba_enroll_async;
537 kerberos_class->enroll_finish = realm_samba_generic_finish;
538 kerberos_class->unenroll_async = realm_samba_unenroll_async;
539 kerberos_class->unenroll_finish = realm_samba_generic_finish;
540 kerberos_class->change_logins = realm_samba_change_logins;
541
542 object_class->constructed = realm_samba_consructed;
543 object_class->get_property = realm_samba_get_property;
544 object_class->set_property = realm_samba_set_property;
545 object_class->finalize = realm_samba_finalize;
546
547 g_object_class_install_property (object_class, PROP_NAME,
548 g_param_spec_string ("name", "Name", "Realm Name",
549 "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
550
551 g_object_class_install_property (object_class, PROP_PROVIDER,
552 g_param_spec_object ("provider", "Provider", "Samba Provider",
553 REALM_TYPE_PROVIDER, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
554 }
555
556 RealmKerberos *
557 realm_samba_new (const gchar *name,
558 RealmProvider *provider)
559 {
560 return g_object_new (REALM_TYPE_SAMBA,
561 "name", name,
562 "provider", provider,
563 NULL);
564 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_SAMBA_H__
17 #define __REALM_SAMBA_H__
18
19 #include <gio/gio.h>
20
21 #include "realm-kerberos.h"
22 #include "realm-provider.h"
23
24 G_BEGIN_DECLS
25
26 #define REALM_TYPE_SAMBA (realm_samba_get_type ())
27 #define REALM_SAMBA(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), REALM_TYPE_SAMBA, RealmSamba))
28 #define REALM_IS_SAMBA(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), REALM_TYPE_SAMBA))
29
30 typedef struct _RealmSamba RealmSamba;
31
32 GType realm_samba_get_type (void) G_GNUC_CONST;
33
34 RealmKerberos * realm_samba_new (const gchar *name,
35 RealmProvider *provider);
36
37 G_END_DECLS
38
39 #endif /* __REALM_SAMBA_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #define DEBUG_FLAG REALM_DEBUG_SERVICE
17 #include "realm-debug.h"
18 #include "realm-diagnostics.h"
19 #include "realm-service.h"
20 #include "realm-service-systemd.h"
21
22 enum {
23 PROP_0,
24 PROP_SERVICE_NAME
25 };
26
27 struct _RealmServiceSystemd {
28 RealmService parent;
29 gchar *name;
30 };
31
32 typedef struct _RealmServiceSystemdClass {
33 RealmServiceClass parent_class;
34 } RealmServiceSystemdClass;
35
36 G_DEFINE_TYPE (RealmServiceSystemd, realm_service_systemd, REALM_TYPE_SERVICE);
37
38 static gboolean
39 realm_service_systemd_dbus_finish (RealmService *service,
40 GAsyncResult *result,
41 GError **error)
42 {
43 RealmServiceSystemd *self = REALM_SERVICE_SYSTEMD (service);
44 GError *lerror = NULL;
45 GVariant *retval;
46
47 retval = g_dbus_proxy_call_finish (G_DBUS_PROXY (service), result, &lerror);
48 if (retval != NULL)
49 g_variant_unref (retval);
50
51 if (lerror != NULL) {
52 realm_debug ("Service call failed: %s: %s", self->name, lerror->message);
53 g_propagate_error (error, lerror);
54 }
55
56 return retval != NULL;
57 }
58
59 static void
60 realm_service_systemd_enable (RealmService *service,
61 GDBusMethodInvocation *invocation,
62 GAsyncReadyCallback callback,
63 gpointer user_data)
64 {
65 RealmServiceSystemd *self = REALM_SERVICE_SYSTEMD (service);
66
67 const gchar *unit_files[] = {
68 self->name,
69 NULL,
70 };
71
72 realm_diagnostics_info (invocation, "Enabling service via systemd: %s", self->name);
73
74 g_dbus_proxy_call (G_DBUS_PROXY (self), "EnableUnitFiles",
75 g_variant_new ("(^asbb)", unit_files, FALSE, FALSE),
76 G_DBUS_CALL_FLAGS_NONE, -1, NULL, callback, user_data);
77 }
78
79 static void
80 realm_service_systemd_disable (RealmService *service,
81 GDBusMethodInvocation *invocation,
82 GAsyncReadyCallback callback,
83 gpointer user_data)
84 {
85 RealmServiceSystemd *self = REALM_SERVICE_SYSTEMD (service);
86
87 const gchar *unit_files[] = {
88 self->name,
89 NULL,
90 };
91
92 realm_diagnostics_info (invocation, "Disabling service via systemd: %s", self->name);
93
94 g_dbus_proxy_call (G_DBUS_PROXY (self), "DisableUnitFiles",
95 g_variant_new ("(^asb)", unit_files, FALSE),
96 G_DBUS_CALL_FLAGS_NONE, -1, NULL, callback, user_data);
97 }
98
99 static void
100 realm_service_systemd_restart (RealmService *service,
101 GDBusMethodInvocation *invocation,
102 GAsyncReadyCallback callback,
103 gpointer user_data)
104 {
105 RealmServiceSystemd *self = REALM_SERVICE_SYSTEMD (service);
106
107 realm_diagnostics_info (invocation, "Restarting service via systemd: %s", self->name);
108
109 g_dbus_proxy_call (G_DBUS_PROXY (self), "RestartUnit",
110 g_variant_new ("(ss)", self->name, "fail"),
111 G_DBUS_CALL_FLAGS_NONE, -1, NULL, callback, user_data);
112 }
113
114 static void
115 realm_service_systemd_stop (RealmService *service,
116 GDBusMethodInvocation *invocation,
117 GAsyncReadyCallback callback,
118 gpointer user_data)
119 {
120 RealmServiceSystemd *self = REALM_SERVICE_SYSTEMD (service);
121
122 realm_diagnostics_info (invocation, "Stopping service via systemd: %s", self->name);
123
124 g_dbus_proxy_call (G_DBUS_PROXY (self), "StopUnit",
125 g_variant_new ("(ss)", self->name, "fail"),
126 G_DBUS_CALL_FLAGS_NONE, -1, NULL, callback, user_data);
127 }
128
129 static void
130 realm_service_systemd_init (RealmServiceSystemd *self)
131 {
132
133 }
134
135 static void
136 realm_service_systemd_set_property (GObject *obj,
137 guint property_id,
138 const GValue *value,
139 GParamSpec *pspec)
140 {
141 RealmServiceSystemd *self = REALM_SERVICE_SYSTEMD (obj);
142
143 switch (property_id) {
144 case PROP_SERVICE_NAME:
145 self->name = g_value_dup_string (value);
146 break;
147 default:
148 G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, property_id, pspec);
149 break;
150 }
151 }
152
153 static void
154 realm_service_systemd_get_property (GObject *obj,
155 guint property_id,
156 GValue *value,
157 GParamSpec *pspec)
158 {
159 RealmServiceSystemd *self = REALM_SERVICE_SYSTEMD (obj);
160
161 switch (property_id) {
162 case PROP_SERVICE_NAME:
163 g_value_set_string (value, self->name);
164 break;
165 default:
166 G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, property_id, pspec);
167 break;
168 }
169 }
170
171 static void
172 realm_service_systemd_finalize (GObject *obj)
173 {
174 RealmServiceSystemd *self = REALM_SERVICE_SYSTEMD (obj);
175
176 g_free (self->name);
177
178 G_OBJECT_CLASS (realm_service_systemd_parent_class)->finalize (obj);
179 }
180
181 static void
182 realm_service_systemd_class_init (RealmServiceSystemdClass *klass)
183 {
184 RealmServiceClass *service_class = REALM_SERVICE_CLASS (klass);
185 GObjectClass *object_class = G_OBJECT_CLASS (klass);
186
187 object_class->get_property = realm_service_systemd_get_property;
188 object_class->set_property = realm_service_systemd_set_property;
189 object_class->finalize = realm_service_systemd_finalize;
190
191 service_class->enable = realm_service_systemd_enable;
192 service_class->enable_finish = realm_service_systemd_dbus_finish;
193 service_class->disable = realm_service_systemd_disable;
194 service_class->disable_finish = realm_service_systemd_dbus_finish;
195 service_class->restart = realm_service_systemd_restart;
196 service_class->restart_finish = realm_service_systemd_dbus_finish;
197 service_class->stop = realm_service_systemd_stop;
198 service_class->stop_finish = realm_service_systemd_dbus_finish;
199
200 g_object_class_install_property (object_class, PROP_SERVICE_NAME,
201 g_param_spec_string ("service-name", "Service Name", "Service Name",
202 "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
203 }
204
205 static void
206 on_systemd_ping (GObject *source,
207 GAsyncResult *result,
208 gpointer user_data)
209 {
210 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
211 GError *error = NULL;
212 GVariant *retval;
213
214 retval = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source),
215 result, &error);
216 if (error == NULL) {
217 realm_debug ("Pinged systemd successfully");
218 g_variant_unref (retval);
219 } else {
220 realm_debug ("Pinging systemd failed: %s", error->message);
221 g_simple_async_result_take_error (async, error);
222 }
223
224 g_simple_async_result_complete (async);
225 g_object_unref (async);
226 }
227
228 static void
229 on_systemd_created (GObject *source,
230 GAsyncResult *result,
231 gpointer user_data)
232 {
233 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
234 GError *error = NULL;
235 GDBusProxy *self;
236
237 self = G_DBUS_PROXY (g_async_initable_new_finish (G_ASYNC_INITABLE (source),
238 result, &error));
239
240 if (error == NULL) {
241 realm_debug ("Pinging systemd to make sure it's running");
242 g_simple_async_result_set_op_res_gpointer (async, self, g_object_unref);
243 g_dbus_connection_call (g_dbus_proxy_get_connection (self),
244 g_dbus_proxy_get_name (self),
245 "/", "org.freedesktop.DBus.Peer",
246 "Ping", g_variant_new ("()"),
247 G_VARIANT_TYPE ("()"),
248 G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
249 -1, NULL, on_systemd_ping, g_object_ref (async));
250 } else {
251 realm_debug ("Failed to connect to systemd: %s", error->message);
252 g_simple_async_result_take_error (async, error);
253 g_simple_async_result_complete (async);
254 }
255
256 g_object_unref (async);
257 }
258
259 void
260 realm_service_systemd_new (const gchar *service_name,
261 GAsyncReadyCallback callback,
262 gpointer user_data)
263 {
264 GSimpleAsyncResult *async;
265 gchar *service;
266
267 realm_debug ("Connecting to systemd for service: %s", service_name);
268
269 service = g_strdup_printf ("%s.service", service_name);
270 async = g_simple_async_result_new (NULL, callback, user_data,
271 realm_service_systemd_new);
272
273 g_async_initable_new_async (REALM_TYPE_SERVICE_SYSTEMD, G_PRIORITY_DEFAULT, NULL,
274 on_systemd_created, g_object_ref (async),
275 "service-name", service,
276 "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
277 "g-name", "org.freedesktop.systemd1",
278 "g-bus-type", G_BUS_TYPE_SYSTEM,
279 "g-object-path", "/org/freedesktop/systemd1",
280 "g-interface-name", "org.freedesktop.systemd1.Manager",
281 NULL);
282
283 g_free (service);
284 g_object_unref (async);
285 }
286
287 RealmService *
288 realm_service_systemd_new_finish (GAsyncResult *result,
289 GError **error)
290 {
291 GSimpleAsyncResult *async;
292 RealmService *service;
293
294 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
295 realm_service_systemd_new), NULL);
296 g_return_val_if_fail (error == NULL || *error == NULL, NULL);
297
298 async = G_SIMPLE_ASYNC_RESULT (result);
299 if (g_simple_async_result_propagate_error (async, error))
300 return NULL;
301
302 service = REALM_SERVICE (g_simple_async_result_get_op_res_gpointer (async));
303 if (service != NULL)
304 g_object_ref (service);
305 return service;
306 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_SERVICE_SYSTEMD_H__
17 #define __REALM_SERVICE_SYSTEMD_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 #define REALM_TYPE_SERVICE_SYSTEMD (realm_service_systemd_get_type ())
24 #define REALM_SERVICE_SYSTEMD(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), REALM_TYPE_SERVICE_SYSTEMD, RealmServiceSystemd))
25 #define REALM_IS_SERVICE_SYSTEMD(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), REALM_TYPE_SERVICE_SYSTEMD))
26
27 typedef struct _RealmServiceSystemd RealmServiceSystemd;
28
29 GType realm_service_systemd_get_type (void) G_GNUC_CONST;
30
31 void realm_service_systemd_new (const gchar *service_name,
32 GAsyncReadyCallback callback,
33 gpointer user_data);
34
35 RealmService * realm_service_systemd_new_finish (GAsyncResult *result,
36 GError **error);
37
38 G_END_DECLS
39
40 #endif /* __REALM_SERVICE_SYSTEMD_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #define DEBUG_FLAG REALM_DEBUG_SERVICE
17 #include "realm-debug.h"
18 #include "realm-diagnostics.h"
19 #include "realm-service.h"
20 #include "realm-service-upstart.h"
21
22 enum {
23 PROP_0,
24 PROP_SERVICE_NAME
25 };
26
27 struct _RealmServiceUpstart {
28 RealmService parent;
29 gchar *name;
30 };
31
32 typedef struct _RealmServiceUpstartClass {
33 RealmServiceClass parent_class;
34 } RealmServiceUpstartClass;
35
36 G_DEFINE_TYPE (RealmServiceUpstart, realm_service_upstart, REALM_TYPE_SERVICE);
37
38 static gboolean
39 realm_service_upstart_dbus_finish (RealmService *service,
40 GAsyncResult *result,
41 GError **error)
42 {
43 RealmServiceUpstart *self = REALM_SERVICE_UPSTART (service);
44 GVariant *retval;
45 GError *lerror = NULL;
46
47 retval = g_dbus_proxy_call_finish (G_DBUS_PROXY (service), result, &lerror);
48 if (retval != NULL)
49 g_variant_unref (retval);
50
51 if (lerror != NULL) {
52 realm_debug ("Service call failed: %s: %s", self->name, lerror->message);
53 g_propagate_error (error, lerror);
54 }
55
56 return retval != NULL;
57 }
58
59 static gboolean
60 realm_service_upstart_stub_finish (RealmService *service,
61 GAsyncResult *result,
62 GError **error)
63 {
64 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error))
65 return FALSE;
66 return TRUE;
67 }
68
69 static void
70 realm_service_upstart_enable (RealmService *service,
71 GDBusMethodInvocation *invocation,
72 GAsyncReadyCallback callback,
73 gpointer user_data)
74 {
75 RealmServiceUpstart *self = REALM_SERVICE_UPSTART (service);
76 GSimpleAsyncResult *async;
77
78 /* TODO: Not sure what to do here for upstart */
79 realm_debug ("Enabling Upstart service '%s' is not implemented", self->name);
80
81 async = g_simple_async_result_new (G_OBJECT (service), callback, user_data,
82 realm_service_upstart_stub_finish);
83 g_simple_async_result_complete_in_idle (async);
84
85 g_object_unref (async);
86 }
87
88 static void
89 realm_service_upstart_disable (RealmService *service,
90 GDBusMethodInvocation *invocation,
91 GAsyncReadyCallback callback,
92 gpointer user_data)
93 {
94 RealmServiceUpstart *self = REALM_SERVICE_UPSTART (service);
95 GSimpleAsyncResult *async;
96
97 /* TODO: Not sure what to do here for upstart */
98 realm_debug ("Disabling Upstart service '%s' is not implemented", self->name);
99
100 async = g_simple_async_result_new (G_OBJECT (service), callback, user_data,
101 realm_service_upstart_stub_finish);
102 g_simple_async_result_complete_in_idle (async);
103 g_object_unref (async);
104 }
105
106 static void
107 realm_service_upstart_restart (RealmService *service,
108 GDBusMethodInvocation *invocation,
109 GAsyncReadyCallback callback,
110 gpointer user_data)
111 {
112 RealmServiceUpstart *self = REALM_SERVICE_UPSTART (service);
113 const char *environ = { NULL };
114
115 realm_diagnostics_info (invocation, "Restarting service via upstart: %s", self->name);
116
117 g_dbus_proxy_call (G_DBUS_PROXY (self), "Restart",
118 g_variant_new ("(^asb)", environ, TRUE),
119 G_DBUS_CALL_FLAGS_NONE, -1, NULL,
120 callback, user_data);
121 }
122
123 static void
124 realm_service_upstart_stop (RealmService *service,
125 GDBusMethodInvocation *invocation,
126 GAsyncReadyCallback callback,
127 gpointer user_data)
128 {
129 RealmServiceUpstart *self = REALM_SERVICE_UPSTART (service);
130 const char *environ = { NULL };
131
132 realm_diagnostics_info (invocation, "Stopping service via upstart: %s", self->name);
133
134 g_dbus_proxy_call (G_DBUS_PROXY (self), "Stop",
135 g_variant_new ("(^asb)", environ, TRUE),
136 G_DBUS_CALL_FLAGS_NONE, -1, NULL,
137 callback, user_data);
138 }
139
140 static void
141 realm_service_upstart_init (RealmServiceUpstart *self)
142 {
143
144 }
145
146 static void
147 realm_service_upstart_set_property (GObject *obj,
148 guint property_id,
149 const GValue *value,
150 GParamSpec *pspec)
151 {
152 RealmServiceUpstart *self = REALM_SERVICE_UPSTART (obj);
153
154 switch (property_id) {
155 case PROP_SERVICE_NAME:
156 self->name = g_value_dup_string (value);
157 break;
158 default:
159 G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, property_id, pspec);
160 break;
161 }
162 }
163
164 static void
165 realm_service_upstart_get_property (GObject *obj,
166 guint property_id,
167 GValue *value,
168 GParamSpec *pspec)
169 {
170 RealmServiceUpstart *self = REALM_SERVICE_UPSTART (obj);
171
172 switch (property_id) {
173 case PROP_SERVICE_NAME:
174 g_value_set_string (value, self->name);
175 break;
176 default:
177 G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, property_id, pspec);
178 break;
179 }
180 }
181
182 static void
183 realm_service_upstart_finalize (GObject *obj)
184 {
185 RealmServiceUpstart *self = REALM_SERVICE_UPSTART (obj);
186
187 g_free (self->name);
188
189 G_OBJECT_CLASS (realm_service_upstart_parent_class)->finalize (obj);
190 }
191
192 static void
193 realm_service_upstart_class_init (RealmServiceUpstartClass *klass)
194 {
195 RealmServiceClass *service_class = REALM_SERVICE_CLASS (klass);
196 GObjectClass *object_class = G_OBJECT_CLASS (klass);
197
198 object_class->get_property = realm_service_upstart_get_property;
199 object_class->set_property = realm_service_upstart_set_property;
200 object_class->finalize = realm_service_upstart_finalize;
201
202 service_class->enable = realm_service_upstart_enable;
203 service_class->enable_finish = realm_service_upstart_stub_finish;
204 service_class->disable = realm_service_upstart_disable;
205 service_class->disable_finish = realm_service_upstart_stub_finish;
206 service_class->restart = realm_service_upstart_restart;
207 service_class->restart_finish = realm_service_upstart_dbus_finish;
208 service_class->stop = realm_service_upstart_stop;
209 service_class->stop_finish = realm_service_upstart_dbus_finish;
210
211 g_object_class_install_property (object_class, PROP_SERVICE_NAME,
212 g_param_spec_string ("service-name", "Service Name", "Service Name",
213 "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
214 }
215
216 typedef struct {
217 gchar *name;
218 RealmService *service;
219 } UpstartClosure;
220
221 static void
222 upstart_closure_free (gpointer data)
223 {
224 UpstartClosure *upstart = data;
225 g_free (upstart->name);
226 if (upstart->service)
227 g_object_unref (upstart->service);
228 g_slice_free (UpstartClosure, upstart);
229 }
230 static void
231 on_upstart_created (GObject *source,
232 GAsyncResult *result,
233 gpointer user_data)
234 {
235 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
236 UpstartClosure *upstart = g_simple_async_result_get_op_res_gpointer (async);
237 RealmService *self;
238 GError *error = NULL;
239
240 self = REALM_SERVICE (g_async_initable_new_finish (G_ASYNC_INITABLE (source),
241 result, &error));
242
243 if (error == NULL) {
244 realm_debug ("Connected to Upstart job for service: %s", upstart->name);
245 upstart->service = self;
246
247 } else {
248 realm_debug ("Failed to create proxy for Upstart job: %s", error->message);
249 g_simple_async_result_take_error (async, error);
250 }
251
252 g_simple_async_result_complete (async);
253 g_object_unref (async);
254 }
255
256 static void
257 on_upstart_get_job (GObject *source,
258 GAsyncResult *result,
259 gpointer user_data)
260 {
261 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
262 UpstartClosure *upstart = g_simple_async_result_get_op_res_gpointer (async);
263 const gchar *job_path;
264 GVariant *retval;
265 GError *error = NULL;
266
267 retval = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source), result, &error);
268 if (error == NULL) {
269 g_variant_get (retval, "(&o)", &job_path);
270 realm_debug ("GetJobByName returned object path '%s', creating proxy", job_path);
271
272 g_async_initable_new_async (REALM_TYPE_SERVICE_UPSTART,
273 G_PRIORITY_DEFAULT, NULL,
274 on_upstart_created, g_object_ref (async),
275 "service-name", upstart->name,
276 "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
277 "g-name", "com.ubuntu.Upstart",
278 "g-connection", G_DBUS_CONNECTION (source),
279 "g-object-path", job_path,
280 "g-interface-name", "com.ubuntu.Upstart0_6.Job",
281 NULL);
282 g_variant_unref (retval);
283 } else {
284 realm_debug ("GetJobByName failed: %s", error->message);
285 g_simple_async_result_take_error (async, error);
286 g_simple_async_result_complete (async);
287 }
288
289 g_object_unref (async);
290 }
291
292 static void
293 on_upstart_bus (GObject *source,
294 GAsyncResult *result,
295 gpointer user_data)
296 {
297 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
298 UpstartClosure *upstart = g_simple_async_result_get_op_res_gpointer (async);
299 GError *error = NULL;
300 GDBusConnection *conn;
301
302 conn = g_bus_get_finish (result, &error);
303 if (error == NULL) {
304 realm_debug ("Calling Upstart GetJobByName for service: %s", upstart->name);
305 g_dbus_connection_call (conn, "com.ubuntu.Upstart",
306 "/com/ubuntu/Upstart",
307 "com.ubuntu.Upstart0_6",
308 "GetJobByName",
309 g_variant_new ("(s)", upstart->name),
310 G_VARIANT_TYPE ("(o)"),
311 G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
312 -1, NULL, on_upstart_get_job,
313 g_object_ref (async));
314 } else {
315 realm_debug ("Failed to connect to system bus: %s", error->message);
316 g_simple_async_result_take_error (async, error);
317 g_simple_async_result_complete (async);
318 }
319
320 g_object_unref (async);
321 }
322
323 void
324 realm_service_upstart_new (const gchar *service_name,
325 GAsyncReadyCallback callback,
326 gpointer user_data)
327 {
328 GSimpleAsyncResult *async;
329 UpstartClosure *upstart;
330
331 realm_debug ("Connecting to Upstart for service: %s", service_name);
332
333 async = g_simple_async_result_new (NULL, callback, user_data,
334 realm_service_upstart_new);
335 upstart = g_slice_new0 (UpstartClosure);
336 upstart->name = g_strdup (service_name);
337 g_simple_async_result_set_op_res_gpointer (async, upstart, upstart_closure_free);
338
339 g_bus_get (G_BUS_TYPE_SYSTEM, NULL, on_upstart_bus, g_object_ref (async));
340
341 g_object_unref (async);
342 }
343
344 RealmService *
345 realm_service_upstart_new_finish (GAsyncResult *result,
346 GError **error)
347 {
348 GSimpleAsyncResult *async;
349 UpstartClosure *upstart;
350
351 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
352 realm_service_upstart_new), NULL);
353 g_return_val_if_fail (error == NULL || *error == NULL, NULL);
354
355 async = G_SIMPLE_ASYNC_RESULT (result);
356 if (g_simple_async_result_propagate_error (async, error))
357 return NULL;
358
359 upstart = g_simple_async_result_get_op_res_gpointer (async);
360 if (upstart->service == NULL)
361 return NULL;
362 return g_object_ref (upstart->service);
363 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_SERVICE_UPSTART_H__
17 #define __REALM_SERVICE_UPSTART_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 #define REALM_TYPE_SERVICE_UPSTART (realm_service_upstart_get_type ())
24 #define REALM_SERVICE_UPSTART(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), REALM_TYPE_SERVICE_UPSTART, RealmServiceUpstart))
25 #define REALM_IS_SERVICE_UPSTART(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), REALM_TYPE_SERVICE_UPSTART))
26
27 typedef struct _RealmServiceUpstart RealmServiceUpstart;
28
29 GType realm_service_upstart_get_type (void) G_GNUC_CONST;
30
31 void realm_service_upstart_new (const gchar *service_name,
32 GAsyncReadyCallback callback,
33 gpointer user_data);
34
35 RealmService * realm_service_upstart_new_finish (GAsyncResult *result,
36 GError **error);
37
38 G_END_DECLS
39
40 #endif /* __REALM_SERVICE_UPSTART_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #define DEBUG_FLAG REALM_DEBUG_SERVICE
17 #include "realm-debug.h"
18 #include "realm-service.h"
19 #include "realm-service-systemd.h"
20 #include "realm-service-upstart.h"
21 #include "realm-settings.h"
22
23 #include <glib/gi18n.h>
24
25 static void (* discovered_service_new) (const gchar *service_name,
26 GAsyncReadyCallback callback,
27 gpointer user_data);
28
29 static RealmService * (* discovered_service_new_finish) (GAsyncResult *result,
30 GError **error);
31
32 G_DEFINE_TYPE (RealmService, realm_service, G_TYPE_DBUS_PROXY);
33
34 static void
35 realm_service_init (RealmService *self)
36 {
37
38 }
39
40 static void
41 realm_service_class_init (RealmServiceClass *klass)
42 {
43
44 }
45
46 typedef struct {
47 gchar *name;
48 RealmService *service;
49 } InitClosure;
50
51 static void
52 init_closure_free (gpointer data)
53 {
54 InitClosure *init = data;
55 g_free (init->name);
56 if (init->service)
57 g_object_unref (init->service);
58 g_slice_free (InitClosure, init);
59 }
60
61 static void
62 on_service_new_upstart (GObject *source,
63 GAsyncResult *result,
64 gpointer user_data)
65 {
66 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
67 InitClosure *init = g_simple_async_result_get_op_res_gpointer (async);
68 GError *error = NULL;
69 RealmService *service;
70
71 service = realm_service_upstart_new_finish (result, &error);
72
73 if (error != NULL) {
74 g_simple_async_result_take_error (async, error);
75
76 } else {
77 realm_debug ("Connected to Upstart, discovered the service manager");
78 discovered_service_new = realm_service_upstart_new;
79 discovered_service_new_finish = realm_service_upstart_new_finish;
80 init->service = service;
81 }
82
83 g_simple_async_result_complete (async);
84 g_object_unref (async);
85 }
86
87 static void
88 on_service_new_systemd (GObject *source,
89 GAsyncResult *result,
90 gpointer user_data)
91 {
92 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
93 InitClosure *init = g_simple_async_result_get_op_res_gpointer (async);
94 GError *error = NULL;
95 RealmService *service;
96
97 service = realm_service_systemd_new_finish (result, &error);
98
99 /* If no such service, then try Upstart */
100 if (g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN)) {
101 realm_debug ("Couldn't connect to systemd, trying Upstart");
102 realm_service_upstart_new (init->name, on_service_new_upstart,
103 g_object_ref (async));
104
105 /* Some other error? */
106 } else if (error != NULL) {
107 g_simple_async_result_take_error (async, error);
108 g_simple_async_result_complete (async);
109
110 /* Success yay */
111 } else {
112 realm_debug ("Connected to systemd, discovered the service manager");
113 discovered_service_new = realm_service_systemd_new;
114 discovered_service_new_finish = realm_service_systemd_new_finish;
115 init->service = service;
116 g_simple_async_result_complete (async);
117 }
118
119 g_object_unref (async);
120 }
121
122 void
123 realm_service_new (const gchar *service_name,
124 GDBusMethodInvocation *invocation,
125 GAsyncReadyCallback callback,
126 gpointer user_data)
127 {
128 GSimpleAsyncResult *async;
129 InitClosure *init;
130 const gchar *name;
131
132 g_return_if_fail (service_name != NULL);
133
134 name = realm_settings_string ("services", "winbind");
135 if (name == NULL)
136 name = service_name;
137
138 /* Discover which service type works */
139 if (discovered_service_new == NULL) {
140 realm_debug ("No service manager discovered, trying systemd");
141 async = g_simple_async_result_new (NULL, callback, user_data,
142 realm_service_new);
143 init = g_slice_new0 (InitClosure);
144 init->name = g_strdup (name);
145 g_simple_async_result_set_op_res_gpointer (async, init, init_closure_free);
146 realm_service_systemd_new (init->name, on_service_new_systemd,
147 g_object_ref (async));
148 g_object_unref (async);
149
150 /* Already discovered which service type works */
151 } else {
152 discovered_service_new (name, callback, user_data);
153 }
154 }
155
156 RealmService *
157 realm_service_new_finish (GAsyncResult *result,
158 GError **error)
159 {
160 GSimpleAsyncResult *async;
161 RealmService *service = NULL;
162 InitClosure *init;
163
164 if (g_simple_async_result_is_valid (result, NULL, realm_service_new)) {
165 async = G_SIMPLE_ASYNC_RESULT (result);
166 if (g_simple_async_result_propagate_error (async, error))
167 return NULL;
168 init = g_simple_async_result_get_op_res_gpointer (async);
169 if (init->service == NULL)
170 return NULL;
171 else
172 return g_object_ref (init->service);
173 } else {
174 return discovered_service_new_finish (result, error);
175 }
176
177 return service;
178 }
179
180 void
181 realm_service_enable (RealmService *self,
182 GDBusMethodInvocation *invocation,
183 GAsyncReadyCallback callback,
184 gpointer user_data)
185 {
186 RealmServiceClass *klass;
187
188 g_return_if_fail (REALM_IS_SERVICE (self));
189
190 klass = REALM_SERVICE_GET_CLASS (self);
191 g_return_if_fail (klass->enable != NULL);
192
193 (klass->enable) (self, invocation, callback, user_data);
194 }
195
196 gboolean
197 realm_service_enable_finish (RealmService *self,
198 GAsyncResult *result,
199 GError **error)
200 {
201 RealmServiceClass *klass;
202
203 g_return_val_if_fail (REALM_IS_SERVICE (self), FALSE);
204
205 klass = REALM_SERVICE_GET_CLASS (self);
206 g_return_val_if_fail (klass->enable_finish != NULL, FALSE);
207
208 return (klass->enable_finish) (self, result, error);
209 }
210
211 void
212 realm_service_disable (RealmService *self,
213 GDBusMethodInvocation *invocation,
214 GAsyncReadyCallback callback,
215 gpointer user_data)
216 {
217 RealmServiceClass *klass;
218
219 g_return_if_fail (REALM_IS_SERVICE (self));
220
221 klass = REALM_SERVICE_GET_CLASS (self);
222 g_return_if_fail (klass->disable != NULL);
223
224 (klass->disable) (self, invocation, callback, user_data);
225 }
226
227 gboolean
228 realm_service_disable_finish (RealmService *self,
229 GAsyncResult *result,
230 GError **error)
231 {
232 RealmServiceClass *klass;
233
234 g_return_val_if_fail (REALM_IS_SERVICE (self), FALSE);
235
236 klass = REALM_SERVICE_GET_CLASS (self);
237 g_return_val_if_fail (klass->disable_finish != NULL, FALSE);
238
239 return (klass->disable_finish) (self, result, error);
240 }
241
242 void
243 realm_service_restart (RealmService *self,
244 GDBusMethodInvocation *invocation,
245 GAsyncReadyCallback callback,
246 gpointer user_data)
247 {
248 RealmServiceClass *klass;
249
250 g_return_if_fail (REALM_IS_SERVICE (self));
251
252 klass = REALM_SERVICE_GET_CLASS (self);
253 g_return_if_fail (klass->restart != NULL);
254
255 (klass->restart) (self, invocation, callback, user_data);
256 }
257
258 gboolean
259 realm_service_restart_finish (RealmService *self,
260 GAsyncResult *result,
261 GError **error)
262 {
263 RealmServiceClass *klass;
264
265 g_return_val_if_fail (REALM_IS_SERVICE (self), FALSE);
266
267 klass = REALM_SERVICE_GET_CLASS (self);
268 g_return_val_if_fail (klass->restart_finish != NULL, FALSE);
269
270 return (klass->restart_finish) (self, result, error);
271 }
272
273 void
274 realm_service_stop (RealmService *self,
275 GDBusMethodInvocation *invocation,
276 GAsyncReadyCallback callback,
277 gpointer user_data)
278 {
279 RealmServiceClass *klass;
280
281 g_return_if_fail (REALM_IS_SERVICE (self));
282
283 klass = REALM_SERVICE_GET_CLASS (self);
284 g_return_if_fail (klass->stop != NULL);
285
286 (klass->stop) (self, invocation, callback, user_data);
287 }
288
289 gboolean
290 realm_service_stop_finish (RealmService *self,
291 GAsyncResult *result,
292 GError **error)
293 {
294 RealmServiceClass *klass;
295
296 g_return_val_if_fail (REALM_IS_SERVICE (self), FALSE);
297
298 klass = REALM_SERVICE_GET_CLASS (self);
299 g_return_val_if_fail (klass->stop_finish != NULL, FALSE);
300
301 return (klass->stop_finish) (self, result, error);
302 }
303
304 static void
305 on_enable_restarted (GObject *source,
306 GAsyncResult *result,
307 gpointer user_data)
308 {
309 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
310 RealmService *service = REALM_SERVICE (source);
311 GError *error = NULL;
312
313 realm_service_restart_finish (service, result, &error);
314 if (error != NULL)
315 g_simple_async_result_take_error (async, error);
316 g_simple_async_result_complete (async);
317
318 g_object_unref (async);
319 }
320
321
322 static void
323 on_enable_enabled (GObject *source,
324 GAsyncResult *result,
325 gpointer user_data)
326 {
327 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
328 RealmService *service = REALM_SERVICE (source);
329 GDBusMethodInvocation *invocation;
330 GError *error = NULL;
331
332 realm_service_enable_finish (service, result, &error);
333 if (error == NULL) {
334 invocation = g_simple_async_result_get_op_res_gpointer (async);
335 realm_service_restart (service, invocation, on_enable_restarted,
336 g_object_ref (async));
337 } else {
338 g_simple_async_result_take_error (async, error);
339 g_simple_async_result_complete (async);
340 }
341
342 g_object_unref (async);
343 }
344
345 static void
346 on_enable_created (GObject *source,
347 GAsyncResult *result,
348 gpointer user_data)
349 {
350 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
351 GDBusMethodInvocation *invocation;
352 RealmService *service;
353 GError *error = NULL;
354
355 service = realm_service_new_finish (result, &error);
356 if (error == NULL) {
357 invocation = g_simple_async_result_get_op_res_gpointer (async);
358 realm_service_enable (service, invocation, on_enable_enabled,
359 g_object_ref (async));
360 g_object_unref (service);
361 } else {
362 g_simple_async_result_take_error (async, error);
363 g_simple_async_result_complete (async);
364 }
365
366 g_object_unref (async);
367 }
368
369 void
370 realm_service_enable_and_restart (const gchar *service_name,
371 GDBusMethodInvocation *invocation,
372 GAsyncReadyCallback callback,
373 gpointer user_data)
374 {
375 GSimpleAsyncResult *async;
376
377 async = g_simple_async_result_new (NULL, callback, user_data,
378 realm_service_enable_and_restart);
379 if (invocation) {
380 g_simple_async_result_set_op_res_gpointer (async,
381 g_object_ref (invocation),
382 g_object_unref);
383 }
384
385 realm_service_new (service_name, invocation,
386 on_enable_created, g_object_ref (async));
387
388 g_object_unref (async);
389 }
390
391 gboolean
392 realm_service_enable_and_restart_finish (GAsyncResult *result,
393 GError **error)
394 {
395 GSimpleAsyncResult *async;
396
397 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
398 realm_service_enable_and_restart), FALSE);
399 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
400
401 async = G_SIMPLE_ASYNC_RESULT (result);
402 if (g_simple_async_result_propagate_error (async, error))
403 return FALSE;
404
405 return TRUE;
406 }
407
408 static void
409 on_disable_stopped (GObject *source,
410 GAsyncResult *result,
411 gpointer user_data)
412 {
413 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
414 RealmService *service = REALM_SERVICE (source);
415 GError *error = NULL;
416
417 realm_service_stop_finish (service, result, &error);
418 if (error != NULL)
419 g_simple_async_result_take_error (async, error);
420 g_simple_async_result_complete (async);
421
422 g_object_unref (async);
423 }
424
425
426 static void
427 on_disable_disabled (GObject *source,
428 GAsyncResult *result,
429 gpointer user_data)
430 {
431 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
432 RealmService *service = REALM_SERVICE (source);
433 GDBusMethodInvocation *invocation;
434 GError *error = NULL;
435
436 realm_service_disable_finish (service, result, &error);
437 if (error == NULL) {
438 invocation = g_simple_async_result_get_op_res_gpointer (async);
439 realm_service_stop (service, invocation, on_disable_stopped,
440 g_object_ref (async));
441 } else {
442 g_simple_async_result_take_error (async, error);
443 g_simple_async_result_complete (async);
444 }
445
446 g_object_unref (async);
447 }
448
449 static void
450 on_disable_created (GObject *source,
451 GAsyncResult *result,
452 gpointer user_data)
453 {
454 GSimpleAsyncResult *async = G_SIMPLE_ASYNC_RESULT (user_data);
455 GDBusMethodInvocation *invocation;
456 RealmService *service;
457 GError *error = NULL;
458
459 service = realm_service_new_finish (result, &error);
460 if (error == NULL) {
461 invocation = g_simple_async_result_get_op_res_gpointer (async);
462 realm_service_disable (service, invocation, on_disable_disabled,
463 g_object_ref (async));
464 g_object_unref (service);
465 } else {
466 g_simple_async_result_take_error (async, error);
467 g_simple_async_result_complete (async);
468 }
469
470 g_object_unref (async);
471 }
472
473 void
474 realm_service_disable_and_stop (const gchar *service_name,
475 GDBusMethodInvocation *invocation,
476 GAsyncReadyCallback callback,
477 gpointer user_data)
478 {
479 GSimpleAsyncResult *async;
480
481 async = g_simple_async_result_new (NULL, callback, user_data,
482 realm_service_disable_and_stop);
483 if (invocation) {
484 g_simple_async_result_set_op_res_gpointer (async,
485 g_object_ref (invocation),
486 g_object_unref);
487 }
488
489 realm_service_new (service_name, invocation,
490 on_disable_created, g_object_ref (async));
491
492 g_object_unref (async);
493 }
494
495 gboolean
496 realm_service_disable_and_stop_finish (GAsyncResult *result,
497 GError **error)
498 {
499 GSimpleAsyncResult *async;
500
501 g_return_val_if_fail (g_simple_async_result_is_valid (result, NULL,
502 realm_service_disable_and_stop), FALSE);
503 g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
504
505 async = G_SIMPLE_ASYNC_RESULT (result);
506 if (g_simple_async_result_propagate_error (async, error))
507 return FALSE;
508
509 return TRUE;
510 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_SERVICE_H__
17 #define __REALM_SERVICE_H__
18
19 #include <gio/gio.h>
20
21 G_BEGIN_DECLS
22
23 #define REALM_TYPE_SERVICE (realm_service_get_type ())
24 #define REALM_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), REALM_TYPE_SERVICE, RealmService))
25 #define REALM_IS_SERVICE(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), REALM_TYPE_SERVICE))
26 #define REALM_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), REALM_TYPE_SERVICE, RealmServiceClass))
27 #define REALM_IS_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), REALM_TYPE_SERVICE))
28 #define REALM_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), REALM_TYPE_SERVICE, RealmServiceClass))
29
30 typedef struct _RealmService RealmService;
31 typedef struct _RealmServiceClass RealmServiceClass;
32
33 struct _RealmService {
34 GDBusProxy parent;
35 };
36
37 struct _RealmServiceClass {
38 GDBusProxyClass parent_class;
39
40 void (* enable) (RealmService *service,
41 GDBusMethodInvocation *invocation,
42 GAsyncReadyCallback callback,
43 gpointer user_data);
44
45 gboolean (* enable_finish) (RealmService *service,
46 GAsyncResult *result,
47 GError **error);
48
49 void (* disable) (RealmService *service,
50 GDBusMethodInvocation *invocation,
51 GAsyncReadyCallback callback,
52 gpointer user_data);
53
54 gboolean (* disable_finish) (RealmService *service,
55 GAsyncResult *result,
56 GError **error);
57
58 void (* restart) (RealmService *service,
59 GDBusMethodInvocation *invocation,
60 GAsyncReadyCallback callback,
61 gpointer user_data);
62
63 gboolean (* restart_finish) (RealmService *service,
64 GAsyncResult *result,
65 GError **error);
66
67 void (* stop) (RealmService *service,
68 GDBusMethodInvocation *invocation,
69 GAsyncReadyCallback callback,
70 gpointer user_data);
71
72 gboolean (* stop_finish) (RealmService *service,
73 GAsyncResult *result,
74 GError **error);
75 };
76
77 GType realm_service_get_type (void) G_GNUC_CONST;
78
79 void realm_service_new (const gchar *service_name,
80 GDBusMethodInvocation *invocation,
81 GAsyncReadyCallback callback,
82 gpointer user_data);
83
84 RealmService * realm_service_new_finish (GAsyncResult *result,
85 GError **error);
86
87 void realm_service_enable (RealmService *service,
88 GDBusMethodInvocation *invocation,
89 GAsyncReadyCallback callback,
90 gpointer user_data);
91
92 gboolean realm_service_enable_finish (RealmService *service,
93 GAsyncResult *result,
94 GError **error);
95
96 void realm_service_disable (RealmService *service,
97 GDBusMethodInvocation *invocation,
98 GAsyncReadyCallback callback,
99 gpointer user_data);
100
101 gboolean realm_service_disable_finish (RealmService *service,
102 GAsyncResult *result,
103 GError **error);
104
105 void realm_service_restart (RealmService *service,
106 GDBusMethodInvocation *invocation,
107 GAsyncReadyCallback callback,
108 gpointer user_data);
109
110 gboolean realm_service_restart_finish (RealmService *service,
111 GAsyncResult *result,
112 GError **error);
113
114 void realm_service_stop (RealmService *service,
115 GDBusMethodInvocation *invocation,
116 GAsyncReadyCallback callback,
117 gpointer user_data);
118
119 gboolean realm_service_stop_finish (RealmService *service,
120 GAsyncResult *result,
121 GError **error);
122
123 void realm_service_enable_and_restart (const gchar *service_name,
124 GDBusMethodInvocation *invocation,
125 GAsyncReadyCallback callback,
126 gpointer user_data);
127
128 gboolean realm_service_enable_and_restart_finish (GAsyncResult *result,
129 GError **error);
130
131 void realm_service_disable_and_stop (const gchar *service_name,
132 GDBusMethodInvocation *invocation,
133 GAsyncReadyCallback callback,
134 gpointer user_data);
135
136 gboolean realm_service_disable_and_stop_finish (GAsyncResult *result,
137 GError **error);
138
139
140 G_END_DECLS
141
142 #endif /* __REALM_KERBEROS_SERVICE_H__ */
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-settings.h"
17
18 #include <glib.h>
19
20 static GHashTable *realm_conf = NULL;
21
22 void
23 realm_settings_add (const gchar *section,
24 const gchar *key,
25 const gchar *value)
26 {
27 GHashTable *sect;
28
29 sect = g_hash_table_lookup (realm_conf, section);
30 if (sect == NULL) {
31 sect = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
32 g_hash_table_insert (realm_conf, g_strdup (section), sect);
33 }
34
35 g_hash_table_insert (sect, g_strdup (key), g_strdup (value));
36 }
37
38 gboolean
39 realm_settings_load (const gchar *file_path,
40 GError **error)
41 {
42 GKeyFile *key_file = NULL;
43 GHashTable *section;
44 GError *err = NULL;
45 gchar **groups;
46 gchar **keys;
47 gchar *value;
48 gint i;
49 gint j;
50
51 key_file = g_key_file_new ();
52
53 if (!g_key_file_load_from_file (key_file, file_path, G_KEY_FILE_NONE, error)) {
54 g_key_file_free (key_file);
55 return FALSE;
56 }
57
58 /* Build into a table of strings, simplifies memory handling */
59 groups = g_key_file_get_groups (key_file, NULL);
60 for (i = 0; groups[i] != NULL; i++) {
61 section = g_hash_table_lookup (realm_conf, groups[i]);
62 if (section == NULL) {
63 section = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
64 g_hash_table_insert (realm_conf, g_strdup (groups[i]), section);
65 }
66
67 keys = g_key_file_get_keys (key_file, groups[i], NULL, &err);
68 g_return_val_if_fail (err == NULL, FALSE);
69
70 for (j = 0; keys[j] != NULL; j++) {
71 value = g_key_file_get_value (key_file, groups[i], keys[j], &err);
72 g_return_val_if_fail (err == NULL, FALSE);
73 g_hash_table_insert (section, g_strdup (keys[j]), value);
74 }
75 g_strfreev (keys);
76 }
77 g_strfreev (groups);
78
79 g_key_file_free (key_file);
80 return TRUE;
81 }
82
83 void
84 realm_settings_init (void)
85 {
86 const gchar *default_conf = SERVICE_DIR "/realmd-defaults.conf";
87 const gchar *distro_conf = SERVICE_DIR "/realmd-distro.conf";
88 const gchar *admin_conf = SYSCONF_DIR "/realmd.conf";
89 GError *error = NULL;
90
91 realm_conf = g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
92 (GDestroyNotify)g_hash_table_unref);
93
94
95 /*
96 * These are treated like 'linker error' in that we cannot proceed without
97 * this data. The reason it is not compiled into the daemon itself, is
98 * for easier modification by packagers and distros
99 */
100 realm_settings_load (default_conf, &error);
101 if (error != NULL) {
102 g_error ("couldn't load package configuration file: %s: %s",
103 default_conf, error->message);
104 g_clear_error (&error);
105 }
106
107 realm_settings_load (distro_conf, &error);
108 if (error != NULL) {
109 g_error ("couldn't load distro configuration file: %s: %s",
110 distro_conf, error->message);
111 g_clear_error (&error);
112 }
113
114 /* We allow failure of loading or parsing this data, it's only overrides */
115 realm_settings_load (admin_conf, &error);
116 if (error != NULL) {
117 if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
118 g_message ("couldn't load admin configuration file: %s: %s",
119 admin_conf, error->message);
120 g_clear_error (&error);
121 }
122 }
123
124 void
125 realm_settings_uninit (void)
126 {
127 g_assert (realm_conf != NULL);
128 g_hash_table_destroy (realm_conf);
129 realm_conf = NULL;
130 }
131
132 const gchar *
133 realm_settings_path (const gchar *name)
134 {
135 const gchar *path;
136
137 path = realm_settings_value ("paths", name);
138 if (path == NULL) {
139 g_warning ("no path found for '%s' in realmd config", name);
140 return "/invalid/or/misconfigured";
141 }
142
143 return path;
144 }
145
146 GHashTable *
147 realm_settings_section (const gchar *section)
148 {
149 return g_hash_table_lookup (realm_conf, section);
150 }
151
152 const gchar *
153 realm_settings_value (const gchar *section,
154 const gchar *key)
155 {
156 GHashTable *settings;
157
158 settings = realm_settings_section (section);
159 if (settings == NULL)
160 return NULL;
161 return g_hash_table_lookup (settings, key);
162 }
163
164 const gchar *
165 realm_settings_string (const gchar *section,
166 const gchar *key)
167 {
168 const gchar *string;
169
170 string = realm_settings_value (section, key);
171 if (string == NULL) {
172 g_warning ("no value found for '%s/%s' in realmd config", section, key);
173 return "";
174 }
175
176 return string;
177 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #ifndef __REALM_SETTINGS_H__
17 #define __REALM_SETTINGS_H__
18
19 #include <glib.h>
20
21 G_BEGIN_DECLS
22
23 void realm_settings_init (void);
24
25 void realm_settings_uninit (void);
26
27 gboolean realm_settings_load (const gchar *filename,
28 GError **error);
29
30 void realm_settings_add (const gchar *section,
31 const gchar *key,
32 const gchar *value);
33
34 const gchar * realm_settings_path (const gchar *name);
35
36 GHashTable * realm_settings_section (const gchar *section);
37
38 const gchar * realm_settings_value (const gchar *section,
39 const gchar *key);
40
41 const gchar * realm_settings_string (const gchar *section,
42 const gchar *key);
43
44 G_END_DECLS
45
46 #endif /* __REALM_SETTINGS_H__ */
0 # Default values for realmd
1
2 [paths]
3 net = /usr/bin/net
4 winbindd = /usr/sbin/winbindd
5 smb.conf = /etc/smb.conf
6
7 [services]
8 winbind = winbind
9
10 [samba-packages]
11
12 [commands]
13
14 [user]
15 shell = /bin/bash
0 # Distro specific overrides for redhat
1 [paths]
2 smb.conf = /etc/samba/smb.conf
3
4 [active-directory-packages]
5 samba-winbind = /usr/sbin/winbindd
6 samba-common = /usr/bin/net
7
8 [commands]
9 winbind-enable-logins = /usr/sbin/authconfig --update --enablewinbind --enablewinbindauth
10 winbind-disable-logins = /usr/sbin/authconfig --update --disablewinbind --disablewinbindauth
0 include $(top_srcdir)/Makefile.decl
1
2 INCLUDES = \
3 -I$(top_srcdir) \
4 -DTESTFILE_DIR="\"@abs_srcdir@/files\"" \
5 -DSYSCONF_DIR="\"/tmp/realmd-etc\"" \
6 -DSERVICE_DIR="\"@abs_srcdir@/files\"" \
7 $(NULL)
8
9 AM_CFLAGS = \
10 $(GLIB_CFLAGS)
11
12 LDADD = \
13 $(GLIB_LIBS)
14
15 TEST_PROGS = \
16 test-ini-config \
17 $(NULL)
18
19 check_PROGRAMS = \
20 $(TEST_PROGS)
21
22 noinst_PROGRAMS = \
23 frob-install-packages \
24 $(NULL)
25
26 test_ini_config_SOURCES = \
27 test-ini-config.c \
28 $(top_srcdir)/service/realm-ini-config.c \
29 $(top_srcdir)/service/realm-samba-config.c \
30 $(top_srcdir)/service/realm-settings.c \
31 $(NULL)
32
33 frob_install_packages_CFLAGS = \
34 -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \
35 $(PACKAGEKIT_CFLAGS) \
36 $(NULL)
37
38 frob_install_packages_LDADD = \
39 $(PACKAGEKIT_LIBS) \
40 $(NULL)
41
42 PY_TESTS = \
43 $(NULL)
44
45 PY_ENV = \
46 $(NULL)
47
48 test-c: $(TEST_PROGS)
49 @gtester --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS)
50
51 test-py:
52 @for py in $(PY_TESTS); do echo "TEST: $$py"; $(PY_ENV) python $(srcdir)/$$py; done
53
54 test: test-c test-py
55
56 EXTRA_DIST = \
57 files \
58 $(PY_TESTS) \
59 $(NULL)
60
61 CLEANFILES = \
62 *.gcno \
63 *.gcda \
64 $(NULL)
65
66 all-local: $(check_PROGRAMS)
67
68 check-local: test
69
70 check-memory: perform-memcheck
71
72 .PHONY: check-memory
0 # Makefile.in generated by automake 1.11.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 VPATH = @srcdir@
18 pkgdatadir = $(datadir)/@PACKAGE@
19 pkgincludedir = $(includedir)/@PACKAGE@
20 pkglibdir = $(libdir)/@PACKAGE@
21 pkglibexecdir = $(libexecdir)/@PACKAGE@
22 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23 install_sh_DATA = $(install_sh) -c -m 644
24 install_sh_PROGRAM = $(install_sh) -c
25 install_sh_SCRIPT = $(install_sh) -c
26 INSTALL_HEADER = $(INSTALL_DATA)
27 transform = $(program_transform_name)
28 NORMAL_INSTALL = :
29 PRE_INSTALL = :
30 POST_INSTALL = :
31 NORMAL_UNINSTALL = :
32 PRE_UNINSTALL = :
33 POST_UNINSTALL = :
34 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
35 $(top_srcdir)/Makefile.decl
36 check_PROGRAMS = $(am__EXEEXT_2)
37 noinst_PROGRAMS = frob-install-packages$(EXEEXT) $(am__EXEEXT_1)
38 subdir = tests
39 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40 am__aclocal_m4_deps = $(top_srcdir)/build/m4/intltool.m4 \
41 $(top_srcdir)/configure.ac
42 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
43 $(ACLOCAL_M4)
44 mkinstalldirs = $(install_sh) -d
45 CONFIG_HEADER = $(top_builddir)/config.h
46 CONFIG_CLEAN_FILES =
47 CONFIG_CLEAN_VPATH_FILES =
48 am__EXEEXT_1 =
49 am__EXEEXT_2 = test-ini-config$(EXEEXT) $(am__EXEEXT_1)
50 PROGRAMS = $(noinst_PROGRAMS)
51 frob_install_packages_SOURCES = frob-install-packages.c
52 frob_install_packages_OBJECTS = \
53 frob_install_packages-frob-install-packages.$(OBJEXT)
54 am__DEPENDENCIES_1 =
55 frob_install_packages_DEPENDENCIES = $(am__DEPENDENCIES_1) \
56 $(am__DEPENDENCIES_1)
57 frob_install_packages_LINK = $(CCLD) $(frob_install_packages_CFLAGS) \
58 $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
59 am__objects_1 =
60 am_test_ini_config_OBJECTS = test-ini-config.$(OBJEXT) \
61 realm-ini-config.$(OBJEXT) realm-samba-config.$(OBJEXT) \
62 realm-settings.$(OBJEXT) $(am__objects_1)
63 test_ini_config_OBJECTS = $(am_test_ini_config_OBJECTS)
64 test_ini_config_LDADD = $(LDADD)
65 test_ini_config_DEPENDENCIES = $(am__DEPENDENCIES_1)
66 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
67 depcomp = $(SHELL) $(top_srcdir)/depcomp
68 am__depfiles_maybe = depfiles
69 am__mv = mv -f
70 AM_V_lt = $(am__v_lt_@AM_V@)
71 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
72 am__v_lt_0 = --silent
73 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
74 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
75 AM_V_CC = $(am__v_CC_@AM_V@)
76 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
77 am__v_CC_0 = @echo " CC " $@;
78 AM_V_at = $(am__v_at_@AM_V@)
79 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
80 am__v_at_0 = @
81 CCLD = $(CC)
82 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
83 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
84 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
85 am__v_CCLD_0 = @echo " CCLD " $@;
86 AM_V_GEN = $(am__v_GEN_@AM_V@)
87 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
88 am__v_GEN_0 = @echo " GEN " $@;
89 SOURCES = frob-install-packages.c $(test_ini_config_SOURCES)
90 DIST_SOURCES = frob-install-packages.c $(test_ini_config_SOURCES)
91 ETAGS = etags
92 CTAGS = ctags
93 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
94 ACLOCAL = @ACLOCAL@
95 ALL_LINGUAS = @ALL_LINGUAS@
96 AMTAR = @AMTAR@
97 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
98 AUTOCONF = @AUTOCONF@
99 AUTOHEADER = @AUTOHEADER@
100 AUTOMAKE = @AUTOMAKE@
101 AWK = @AWK@
102 CATALOGS = @CATALOGS@
103 CATOBJEXT = @CATOBJEXT@
104 CC = @CC@
105 CCDEPMODE = @CCDEPMODE@
106 CFLAGS = @CFLAGS@
107 CPP = @CPP@
108 CPPFLAGS = @CPPFLAGS@
109 CYGPATH_W = @CYGPATH_W@
110 DATADIRNAME = @DATADIRNAME@
111 DBUS_POLICY_DIR = @DBUS_POLICY_DIR@
112 DEFS = @DEFS@
113 DEPDIR = @DEPDIR@
114 DISTRO = @DISTRO@
115 ECHO_C = @ECHO_C@
116 ECHO_N = @ECHO_N@
117 ECHO_T = @ECHO_T@
118 EGREP = @EGREP@
119 EXEEXT = @EXEEXT@
120 GCOV = @GCOV@
121 GENHTML = @GENHTML@
122 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
123 GLIB_CFLAGS = @GLIB_CFLAGS@
124 GLIB_LIBS = @GLIB_LIBS@
125 GMOFILES = @GMOFILES@
126 GMSGFMT = @GMSGFMT@
127 GREP = @GREP@
128 INSTALL = @INSTALL@
129 INSTALL_DATA = @INSTALL_DATA@
130 INSTALL_PROGRAM = @INSTALL_PROGRAM@
131 INSTALL_SCRIPT = @INSTALL_SCRIPT@
132 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
133 INSTOBJEXT = @INSTOBJEXT@
134 INTLLIBS = @INTLLIBS@
135 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
136 INTLTOOL_MERGE = @INTLTOOL_MERGE@
137 INTLTOOL_PERL = @INTLTOOL_PERL@
138 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
139 INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
140 INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
141 INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
142 INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
143 KRB5_CFLAGS = @KRB5_CFLAGS@
144 KRB5_CONFIG = @KRB5_CONFIG@
145 KRB5_LIBS = @KRB5_LIBS@
146 LCOV = @LCOV@
147 LDFLAGS = @LDFLAGS@
148 LIBOBJS = @LIBOBJS@
149 LIBS = @LIBS@
150 LN_S = @LN_S@
151 LTLIBOBJS = @LTLIBOBJS@
152 MAINT = @MAINT@
153 MAKEINFO = @MAKEINFO@
154 MKDIR_P = @MKDIR_P@
155 MKINSTALLDIRS = @MKINSTALLDIRS@
156 MSGFMT = @MSGFMT@
157 MSGFMT_OPTS = @MSGFMT_OPTS@
158 MSGMERGE = @MSGMERGE@
159 OBJEXT = @OBJEXT@
160 PACKAGE = @PACKAGE@
161 PACKAGEKIT_CFLAGS = @PACKAGEKIT_CFLAGS@
162 PACKAGEKIT_LIBS = @PACKAGEKIT_LIBS@
163 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
164 PACKAGE_NAME = @PACKAGE_NAME@
165 PACKAGE_STRING = @PACKAGE_STRING@
166 PACKAGE_TARNAME = @PACKAGE_TARNAME@
167 PACKAGE_URL = @PACKAGE_URL@
168 PACKAGE_VERSION = @PACKAGE_VERSION@
169 PATH_SEPARATOR = @PATH_SEPARATOR@
170 PKG_CONFIG = @PKG_CONFIG@
171 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
172 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173 POFILES = @POFILES@
174 POLKIT_ACTION_DIR = @POLKIT_ACTION_DIR@
175 POLKIT_CFLAGS = @POLKIT_CFLAGS@
176 POLKIT_LIBS = @POLKIT_LIBS@
177 POSUB = @POSUB@
178 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
179 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
180 RANLIB = @RANLIB@
181 SERVICE_DIR = @SERVICE_DIR@
182 SET_MAKE = @SET_MAKE@
183 SHELL = @SHELL@
184 STRIP = @STRIP@
185 TEST_MODE = @TEST_MODE@
186 USE_NLS = @USE_NLS@
187 VERSION = @VERSION@
188 XGETTEXT = @XGETTEXT@
189 abs_builddir = @abs_builddir@
190 abs_srcdir = @abs_srcdir@
191 abs_top_builddir = @abs_top_builddir@
192 abs_top_srcdir = @abs_top_srcdir@
193 ac_ct_CC = @ac_ct_CC@
194 am__include = @am__include@
195 am__leading_dot = @am__leading_dot@
196 am__quote = @am__quote@
197 am__tar = @am__tar@
198 am__untar = @am__untar@
199 bindir = @bindir@
200 build_alias = @build_alias@
201 builddir = @builddir@
202 datadir = @datadir@
203 datarootdir = @datarootdir@
204 docdir = @docdir@
205 dvidir = @dvidir@
206 exec_prefix = @exec_prefix@
207 host_alias = @host_alias@
208 htmldir = @htmldir@
209 includedir = @includedir@
210 infodir = @infodir@
211 install_sh = @install_sh@
212 intltool__v_merge_options_ = @intltool__v_merge_options_@
213 intltool__v_merge_options_0 = @intltool__v_merge_options_0@
214 libdir = @libdir@
215 libexecdir = @libexecdir@
216 localedir = @localedir@
217 localstatedir = @localstatedir@
218 mandir = @mandir@
219 mkdir_p = @mkdir_p@
220 oldincludedir = @oldincludedir@
221 pdfdir = @pdfdir@
222 prefix = @prefix@
223 program_transform_name = @program_transform_name@
224 psdir = @psdir@
225 sbindir = @sbindir@
226 sharedstatedir = @sharedstatedir@
227 srcdir = @srcdir@
228 sysconfdir = @sysconfdir@
229 target_alias = @target_alias@
230 top_build_prefix = @top_build_prefix@
231 top_builddir = @top_builddir@
232 top_srcdir = @top_srcdir@
233 NULL =
234 TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions
235 INCLUDES = \
236 -I$(top_srcdir) \
237 -DTESTFILE_DIR="\"@abs_srcdir@/files\"" \
238 -DSYSCONF_DIR="\"/tmp/realmd-etc\"" \
239 -DSERVICE_DIR="\"@abs_srcdir@/files\"" \
240 $(NULL)
241
242 AM_CFLAGS = \
243 $(GLIB_CFLAGS)
244
245 LDADD = \
246 $(GLIB_LIBS)
247
248 TEST_PROGS = \
249 test-ini-config \
250 $(NULL)
251
252 test_ini_config_SOURCES = \
253 test-ini-config.c \
254 $(top_srcdir)/service/realm-ini-config.c \
255 $(top_srcdir)/service/realm-samba-config.c \
256 $(top_srcdir)/service/realm-settings.c \
257 $(NULL)
258
259 frob_install_packages_CFLAGS = \
260 -DI_KNOW_THE_PACKAGEKIT_GLIB2_API_IS_SUBJECT_TO_CHANGE \
261 $(PACKAGEKIT_CFLAGS) \
262 $(NULL)
263
264 frob_install_packages_LDADD = \
265 $(PACKAGEKIT_LIBS) \
266 $(NULL)
267
268 PY_TESTS = \
269 $(NULL)
270
271 PY_ENV = \
272 $(NULL)
273
274 EXTRA_DIST = \
275 files \
276 $(PY_TESTS) \
277 $(NULL)
278
279 CLEANFILES = \
280 *.gcno \
281 *.gcda \
282 $(NULL)
283
284 all: all-am
285
286 .SUFFIXES:
287 .SUFFIXES: .c .o .obj
288 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps)
289 @for dep in $?; do \
290 case '$(am__configure_deps)' in \
291 *$$dep*) \
292 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
293 && { if test -f $@; then exit 0; else break; fi; }; \
294 exit 1;; \
295 esac; \
296 done; \
297 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \
298 $(am__cd) $(top_srcdir) && \
299 $(AUTOMAKE) --foreign tests/Makefile
300 .PRECIOUS: Makefile
301 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
302 @case '$?' in \
303 *config.status*) \
304 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
305 *) \
306 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
307 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
308 esac;
309 $(top_srcdir)/Makefile.decl:
310
311 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
312 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
313
314 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
315 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
316 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
317 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
318 $(am__aclocal_m4_deps):
319
320 clean-checkPROGRAMS:
321 -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
322
323 clean-noinstPROGRAMS:
324 -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
325 frob-install-packages$(EXEEXT): $(frob_install_packages_OBJECTS) $(frob_install_packages_DEPENDENCIES) $(EXTRA_frob_install_packages_DEPENDENCIES)
326 @rm -f frob-install-packages$(EXEEXT)
327 $(AM_V_CCLD)$(frob_install_packages_LINK) $(frob_install_packages_OBJECTS) $(frob_install_packages_LDADD) $(LIBS)
328 test-ini-config$(EXEEXT): $(test_ini_config_OBJECTS) $(test_ini_config_DEPENDENCIES) $(EXTRA_test_ini_config_DEPENDENCIES)
329 @rm -f test-ini-config$(EXEEXT)
330 $(AM_V_CCLD)$(LINK) $(test_ini_config_OBJECTS) $(test_ini_config_LDADD) $(LIBS)
331
332 mostlyclean-compile:
333 -rm -f *.$(OBJEXT)
334
335 distclean-compile:
336 -rm -f *.tab.c
337
338 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frob_install_packages-frob-install-packages.Po@am__quote@
339 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realm-ini-config.Po@am__quote@
340 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realm-samba-config.Po@am__quote@
341 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realm-settings.Po@am__quote@
342 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ini-config.Po@am__quote@
343
344 .c.o:
345 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
346 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
347 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
348 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
349 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
350
351 .c.obj:
352 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
353 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
354 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
355 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
356 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
357
358 frob_install_packages-frob-install-packages.o: frob-install-packages.c
359 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(frob_install_packages_CFLAGS) $(CFLAGS) -MT frob_install_packages-frob-install-packages.o -MD -MP -MF $(DEPDIR)/frob_install_packages-frob-install-packages.Tpo -c -o frob_install_packages-frob-install-packages.o `test -f 'frob-install-packages.c' || echo '$(srcdir)/'`frob-install-packages.c
360 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/frob_install_packages-frob-install-packages.Tpo $(DEPDIR)/frob_install_packages-frob-install-packages.Po
361 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='frob-install-packages.c' object='frob_install_packages-frob-install-packages.o' libtool=no @AMDEPBACKSLASH@
362 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
363 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(frob_install_packages_CFLAGS) $(CFLAGS) -c -o frob_install_packages-frob-install-packages.o `test -f 'frob-install-packages.c' || echo '$(srcdir)/'`frob-install-packages.c
364
365 frob_install_packages-frob-install-packages.obj: frob-install-packages.c
366 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(frob_install_packages_CFLAGS) $(CFLAGS) -MT frob_install_packages-frob-install-packages.obj -MD -MP -MF $(DEPDIR)/frob_install_packages-frob-install-packages.Tpo -c -o frob_install_packages-frob-install-packages.obj `if test -f 'frob-install-packages.c'; then $(CYGPATH_W) 'frob-install-packages.c'; else $(CYGPATH_W) '$(srcdir)/frob-install-packages.c'; fi`
367 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/frob_install_packages-frob-install-packages.Tpo $(DEPDIR)/frob_install_packages-frob-install-packages.Po
368 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='frob-install-packages.c' object='frob_install_packages-frob-install-packages.obj' libtool=no @AMDEPBACKSLASH@
369 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
370 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(frob_install_packages_CFLAGS) $(CFLAGS) -c -o frob_install_packages-frob-install-packages.obj `if test -f 'frob-install-packages.c'; then $(CYGPATH_W) 'frob-install-packages.c'; else $(CYGPATH_W) '$(srcdir)/frob-install-packages.c'; fi`
371
372 realm-ini-config.o: $(top_srcdir)/service/realm-ini-config.c
373 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT realm-ini-config.o -MD -MP -MF $(DEPDIR)/realm-ini-config.Tpo -c -o realm-ini-config.o `test -f '$(top_srcdir)/service/realm-ini-config.c' || echo '$(srcdir)/'`$(top_srcdir)/service/realm-ini-config.c
374 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realm-ini-config.Tpo $(DEPDIR)/realm-ini-config.Po
375 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/service/realm-ini-config.c' object='realm-ini-config.o' libtool=no @AMDEPBACKSLASH@
376 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
377 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o realm-ini-config.o `test -f '$(top_srcdir)/service/realm-ini-config.c' || echo '$(srcdir)/'`$(top_srcdir)/service/realm-ini-config.c
378
379 realm-ini-config.obj: $(top_srcdir)/service/realm-ini-config.c
380 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT realm-ini-config.obj -MD -MP -MF $(DEPDIR)/realm-ini-config.Tpo -c -o realm-ini-config.obj `if test -f '$(top_srcdir)/service/realm-ini-config.c'; then $(CYGPATH_W) '$(top_srcdir)/service/realm-ini-config.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/service/realm-ini-config.c'; fi`
381 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realm-ini-config.Tpo $(DEPDIR)/realm-ini-config.Po
382 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/service/realm-ini-config.c' object='realm-ini-config.obj' libtool=no @AMDEPBACKSLASH@
383 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
384 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o realm-ini-config.obj `if test -f '$(top_srcdir)/service/realm-ini-config.c'; then $(CYGPATH_W) '$(top_srcdir)/service/realm-ini-config.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/service/realm-ini-config.c'; fi`
385
386 realm-samba-config.o: $(top_srcdir)/service/realm-samba-config.c
387 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT realm-samba-config.o -MD -MP -MF $(DEPDIR)/realm-samba-config.Tpo -c -o realm-samba-config.o `test -f '$(top_srcdir)/service/realm-samba-config.c' || echo '$(srcdir)/'`$(top_srcdir)/service/realm-samba-config.c
388 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realm-samba-config.Tpo $(DEPDIR)/realm-samba-config.Po
389 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/service/realm-samba-config.c' object='realm-samba-config.o' libtool=no @AMDEPBACKSLASH@
390 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
391 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o realm-samba-config.o `test -f '$(top_srcdir)/service/realm-samba-config.c' || echo '$(srcdir)/'`$(top_srcdir)/service/realm-samba-config.c
392
393 realm-samba-config.obj: $(top_srcdir)/service/realm-samba-config.c
394 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT realm-samba-config.obj -MD -MP -MF $(DEPDIR)/realm-samba-config.Tpo -c -o realm-samba-config.obj `if test -f '$(top_srcdir)/service/realm-samba-config.c'; then $(CYGPATH_W) '$(top_srcdir)/service/realm-samba-config.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/service/realm-samba-config.c'; fi`
395 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realm-samba-config.Tpo $(DEPDIR)/realm-samba-config.Po
396 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/service/realm-samba-config.c' object='realm-samba-config.obj' libtool=no @AMDEPBACKSLASH@
397 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
398 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o realm-samba-config.obj `if test -f '$(top_srcdir)/service/realm-samba-config.c'; then $(CYGPATH_W) '$(top_srcdir)/service/realm-samba-config.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/service/realm-samba-config.c'; fi`
399
400 realm-settings.o: $(top_srcdir)/service/realm-settings.c
401 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT realm-settings.o -MD -MP -MF $(DEPDIR)/realm-settings.Tpo -c -o realm-settings.o `test -f '$(top_srcdir)/service/realm-settings.c' || echo '$(srcdir)/'`$(top_srcdir)/service/realm-settings.c
402 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realm-settings.Tpo $(DEPDIR)/realm-settings.Po
403 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/service/realm-settings.c' object='realm-settings.o' libtool=no @AMDEPBACKSLASH@
404 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
405 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o realm-settings.o `test -f '$(top_srcdir)/service/realm-settings.c' || echo '$(srcdir)/'`$(top_srcdir)/service/realm-settings.c
406
407 realm-settings.obj: $(top_srcdir)/service/realm-settings.c
408 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT realm-settings.obj -MD -MP -MF $(DEPDIR)/realm-settings.Tpo -c -o realm-settings.obj `if test -f '$(top_srcdir)/service/realm-settings.c'; then $(CYGPATH_W) '$(top_srcdir)/service/realm-settings.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/service/realm-settings.c'; fi`
409 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realm-settings.Tpo $(DEPDIR)/realm-settings.Po
410 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/service/realm-settings.c' object='realm-settings.obj' libtool=no @AMDEPBACKSLASH@
411 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
412 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o realm-settings.obj `if test -f '$(top_srcdir)/service/realm-settings.c'; then $(CYGPATH_W) '$(top_srcdir)/service/realm-settings.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/service/realm-settings.c'; fi`
413
414 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
415 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
416 unique=`for i in $$list; do \
417 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
418 done | \
419 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
420 END { if (nonempty) { for (i in files) print i; }; }'`; \
421 mkid -fID $$unique
422 tags: TAGS
423
424 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
425 $(TAGS_FILES) $(LISP)
426 set x; \
427 here=`pwd`; \
428 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
429 unique=`for i in $$list; do \
430 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
431 done | \
432 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
433 END { if (nonempty) { for (i in files) print i; }; }'`; \
434 shift; \
435 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
436 test -n "$$unique" || unique=$$empty_fix; \
437 if test $$# -gt 0; then \
438 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
439 "$$@" $$unique; \
440 else \
441 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
442 $$unique; \
443 fi; \
444 fi
445 ctags: CTAGS
446 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
447 $(TAGS_FILES) $(LISP)
448 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
449 unique=`for i in $$list; do \
450 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
451 done | \
452 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
453 END { if (nonempty) { for (i in files) print i; }; }'`; \
454 test -z "$(CTAGS_ARGS)$$unique" \
455 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
456 $$unique
457
458 GTAGS:
459 here=`$(am__cd) $(top_builddir) && pwd` \
460 && $(am__cd) $(top_srcdir) \
461 && gtags -i $(GTAGS_ARGS) "$$here"
462
463 distclean-tags:
464 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
465
466 distdir: $(DISTFILES)
467 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
468 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
469 list='$(DISTFILES)'; \
470 dist_files=`for file in $$list; do echo $$file; done | \
471 sed -e "s|^$$srcdirstrip/||;t" \
472 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
473 case $$dist_files in \
474 */*) $(MKDIR_P) `echo "$$dist_files" | \
475 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
476 sort -u` ;; \
477 esac; \
478 for file in $$dist_files; do \
479 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
480 if test -d $$d/$$file; then \
481 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
482 if test -d "$(distdir)/$$file"; then \
483 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
484 fi; \
485 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
486 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
487 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
488 fi; \
489 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
490 else \
491 test -f "$(distdir)/$$file" \
492 || cp -p $$d/$$file "$(distdir)/$$file" \
493 || exit 1; \
494 fi; \
495 done
496 check-am: all-am
497 $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
498 $(MAKE) $(AM_MAKEFLAGS) check-local
499 check: check-am
500 all-am: Makefile $(PROGRAMS) all-local
501 installdirs:
502 install: install-am
503 install-exec: install-exec-am
504 install-data: install-data-am
505 uninstall: uninstall-am
506
507 install-am: all-am
508 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
509
510 installcheck: installcheck-am
511 install-strip:
512 if test -z '$(STRIP)'; then \
513 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
514 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
515 install; \
516 else \
517 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
518 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
519 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
520 fi
521 mostlyclean-generic:
522
523 clean-generic:
524 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
525
526 distclean-generic:
527 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
528 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
529
530 maintainer-clean-generic:
531 @echo "This command is intended for maintainers to use"
532 @echo "it deletes files that may require special tools to rebuild."
533 clean: clean-am
534
535 clean-am: clean-checkPROGRAMS clean-generic clean-noinstPROGRAMS \
536 mostlyclean-am
537
538 distclean: distclean-am
539 -rm -rf ./$(DEPDIR)
540 -rm -f Makefile
541 distclean-am: clean-am distclean-compile distclean-generic \
542 distclean-tags
543
544 dvi: dvi-am
545
546 dvi-am:
547
548 html: html-am
549
550 html-am:
551
552 info: info-am
553
554 info-am:
555
556 install-data-am:
557
558 install-dvi: install-dvi-am
559
560 install-dvi-am:
561
562 install-exec-am:
563
564 install-html: install-html-am
565
566 install-html-am:
567
568 install-info: install-info-am
569
570 install-info-am:
571
572 install-man:
573
574 install-pdf: install-pdf-am
575
576 install-pdf-am:
577
578 install-ps: install-ps-am
579
580 install-ps-am:
581
582 installcheck-am:
583
584 maintainer-clean: maintainer-clean-am
585 -rm -rf ./$(DEPDIR)
586 -rm -f Makefile
587 maintainer-clean-am: distclean-am maintainer-clean-generic
588
589 mostlyclean: mostlyclean-am
590
591 mostlyclean-am: mostlyclean-compile mostlyclean-generic
592
593 pdf: pdf-am
594
595 pdf-am:
596
597 ps: ps-am
598
599 ps-am:
600
601 uninstall-am:
602
603 .MAKE: check-am install-am install-strip
604
605 .PHONY: CTAGS GTAGS all all-am all-local check check-am check-local \
606 clean clean-checkPROGRAMS clean-generic clean-noinstPROGRAMS \
607 ctags distclean distclean-compile distclean-generic \
608 distclean-tags distdir dvi dvi-am html html-am info info-am \
609 install install-am install-data install-data-am install-dvi \
610 install-dvi-am install-exec install-exec-am install-html \
611 install-html-am install-info install-info-am install-man \
612 install-pdf install-pdf-am install-ps install-ps-am \
613 install-strip installcheck installcheck-am installdirs \
614 maintainer-clean maintainer-clean-generic mostlyclean \
615 mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
616 tags uninstall uninstall-am
617
618
619 perform-memcheck: $(TEST_PROGS) $(TEST_SUPPRESSIONS)
620 @make -C $(top_builddir)/build all
621 @for test in $(TEST_PROGS); do \
622 G_SLICE=always-malloc libtool --mode=execute \
623 valgrind --trace-children=no --gen-suppressions=all \
624 --suppressions=$(TEST_SUPPRESSIONS) \
625 --leak-check=full --show-reachable=yes --num-callers=16 \
626 --quiet --error-exitcode=33 \
627 $(builddir)/$$test; \
628 done
629
630 @WITH_COVERAGE_TRUE@coverage:
631 @WITH_COVERAGE_TRUE@ mkdir -p $(top_builddir)/build/coverage
632 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
633 @WITH_COVERAGE_TRUE@ $(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
634 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
635 @WITH_COVERAGE_TRUE@ @echo "file://$(abs_top_builddir)/build/coverage/index.html"
636
637 @WITH_COVERAGE_TRUE@clear-coverage:
638 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
639
640 test-c: $(TEST_PROGS)
641 @gtester --verbose -m $(TEST_MODE) --g-fatal-warnings $(TEST_PROGS)
642
643 test-py:
644 @for py in $(PY_TESTS); do echo "TEST: $$py"; $(PY_ENV) python $(srcdir)/$$py; done
645
646 test: test-c test-py
647
648 all-local: $(check_PROGRAMS)
649
650 check-local: test
651
652 check-memory: perform-memcheck
653
654 .PHONY: check-memory
655
656 # Tell versions [3.59,3.63) of GNU make to not export all variables.
657 # Otherwise a system limit (for SysV at least) may be exceeded.
658 .NOEXPORT:
0
1 # This is a section
2 [section]
3 one=uno
4 two= dos
5 # This is a comment
6 three = three \
7 Three \
8 THREE
9 four =cuatro
10
11 [broken
12 five = cinco
13 six = seis
14
15 [another section]
16 without a value
17 ended here = last
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include <stdlib.h>
17
18 #include <packagekit-glib2/packagekit.h>
19
20 static GMainLoop *loop;
21
22 static void
23 on_progress_callback (PkProgress *progress,
24 PkProgressType type,
25 gpointer user_data)
26 {
27 PkPackage *package;
28 gboolean boolean;
29 gchar *string;
30 guint unumber;
31 gint number;
32
33 switch (type) {
34 case PK_PROGRESS_TYPE_PACKAGE_ID:
35 g_object_get (progress, "package-id", &string, NULL);
36 g_printerr ("progress: package-id: %s\n", string);
37 g_free (string);
38 break;
39 case PK_PROGRESS_TYPE_TRANSACTION_ID:
40 g_object_get (progress, "transaction-id", &string, NULL);
41 g_printerr ("progress: percentage: %s\n", string);
42 g_free (string);
43 break;
44 case PK_PROGRESS_TYPE_PERCENTAGE:
45 g_object_get (progress, "percentage", &number, NULL);
46 g_printerr ("progress: percentage: %d\n", number);
47 break;
48 case PK_PROGRESS_TYPE_ALLOW_CANCEL:
49 g_object_get (progress, "allow-cancel", &boolean, NULL);
50 g_printerr ("progress: allow-cancel: %s\n", boolean ? "TRUE" : "FALSE");
51 break;
52 case PK_PROGRESS_TYPE_STATUS:
53 g_object_get (progress, "status", &unumber, NULL);
54 g_printerr ("progress: status: %u %s\n", unumber, pk_status_enum_to_string (unumber));
55 break;
56 case PK_PROGRESS_TYPE_ROLE:
57 g_object_get (progress, "role", &unumber, NULL);
58 g_printerr ("progress: role: %u %s\n", unumber, pk_role_enum_to_string (unumber));
59 break;
60 case PK_PROGRESS_TYPE_CALLER_ACTIVE:
61 g_object_get (progress, "caller-active", &boolean, NULL);
62 g_printerr ("progress: caller-active: %s\n", boolean ? "TRUE" : "FALSE");
63 break;
64 case PK_PROGRESS_TYPE_ELAPSED_TIME:
65 g_object_get (progress, "elapsed-time", &unumber, NULL);
66 g_printerr ("progress: elapsed-time: %u\n", unumber);
67 break;
68 case PK_PROGRESS_TYPE_REMAINING_TIME:
69 g_object_get (progress, "remaining-time", &unumber, NULL);
70 g_printerr ("progress: remaining-time: %u\n", unumber);
71 break;
72 case PK_PROGRESS_TYPE_SPEED:
73 g_object_get (progress, "speed", &unumber, NULL);
74 g_printerr ("progress: speed: %u\n", unumber);
75 break;
76 case PK_PROGRESS_TYPE_UID:
77 g_object_get (progress, "uid", &unumber, NULL);
78 g_printerr ("progress: uid: %u\n", unumber);
79 break;
80 case PK_PROGRESS_TYPE_PACKAGE:
81 g_object_get (progress, "package", &package, NULL);
82 g_printerr ("progress: package: %p\n", package);
83 g_object_unref (package);
84 break;
85 case PK_PROGRESS_TYPE_ITEM_PROGRESS:
86 g_object_get (progress, "item-progress-id", &string, "item-progress-value", &unumber, NULL);
87 g_printerr ("progress: package: %s %u\n", string, unumber);
88 g_object_unref (package);
89 break;
90 case PK_PROGRESS_TYPE_INVALID:
91 default:
92 g_warn_if_reached ();
93 break;
94 }
95 }
96
97 static void
98 on_ready_get_result (GObject *source,
99 GAsyncResult *result,
100 gpointer user_data)
101 {
102 GAsyncResult **place = (GAsyncResult **)user_data;
103 *place = g_object_ref (result);
104 g_main_loop_quit (loop);
105 }
106
107 static void
108 test_resolve (void)
109 {
110 GAsyncResult *result = NULL;
111 PkTask *task;
112 GError *error = NULL;
113 gchar *packages[] = { "sssd", "samba-client", "samba-common", "freeipa-client" };
114 PkBitfield filter;
115 PkResults *results;
116 PkPackage *package;
117 GPtrArray *array;
118 GPtrArray *ids;
119 const gchar *id;
120 gint i;
121
122 task = pk_task_new ();
123 pk_task_set_interactive (task, FALSE);
124
125 filter = pk_filter_bitfield_from_string ("arch");
126
127 pk_task_refresh_cache_async (task, FALSE, NULL,
128 on_progress_callback, NULL,
129 on_ready_get_result, &result);
130 g_main_loop_run (loop);
131 results = pk_task_generic_finish (task, result, &error);
132 g_object_unref (result);
133
134 if (error != NULL) {
135 g_printerr ("%s\n", error->message);
136 exit (1);
137 }
138
139 g_object_unref (results);
140
141 g_printerr ("REFRESHED\n");
142
143 pk_task_resolve_async (task, filter, packages, NULL,
144 on_progress_callback, NULL,
145 on_ready_get_result, &result);
146 g_main_loop_run (loop);
147 results = pk_task_generic_finish (task, result, &error);
148 g_object_unref (result);
149
150 if (error != NULL) {
151 g_printerr ("%s\n", error->message);;
152 exit (1);
153 }
154
155 ids = g_ptr_array_new_with_free_func (g_free);
156 array = pk_results_get_package_array (results);
157 for (i = 0; i < array->len; i++) {
158 package = PK_PACKAGE (array->pdata[i]);
159 if (pk_package_get_info (package) != PK_INFO_ENUM_INSTALLED) {
160 id = pk_package_get_id (package);
161 g_print ("%s\n", id);
162 g_ptr_array_add (ids, g_strdup (id));
163 }
164 }
165
166 g_ptr_array_free (array, TRUE);
167 g_object_unref (results);
168
169 g_printerr ("RESOLVED\n");
170
171 if (ids->len > 0) {
172 g_ptr_array_add (ids, NULL);
173 pk_task_install_packages_async (task, (gchar **)ids->pdata,
174 NULL, on_progress_callback, NULL,
175 on_ready_get_result, &result);
176 g_ptr_array_free (ids, TRUE);
177 g_main_loop_run (loop);
178 results = pk_task_generic_finish (task, result, &error);
179 g_object_unref (result);
180
181 if (error != NULL) {
182 g_printerr ("%s\n", error->message);;
183 exit (1);
184 }
185
186 g_object_unref (results);
187 }
188
189 g_object_unref (task);
190
191 }
192
193 int
194 main(int argc,
195 char *argv[])
196 {
197 g_type_init ();
198
199 loop = g_main_loop_new (NULL, FALSE);
200 test_resolve ();
201 g_main_loop_unref (loop);
202
203 return 0;
204 }
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "service/realm-samba-config.h"
17 #include "service/realm-settings.h"
18
19 #include <glib/gstdio.h>
20
21 #include <string.h>
22
23 #define assert_cmpmem(a, na, cmp, b, nb) \
24 do { gconstpointer __p1 = (a), __p2 = (b); gsize __n1 = (na), __n2 = (nb); \
25 if (__n1 cmp __n2 && memcmp (__p1, __p2, __n1) cmp 0) ; else \
26 assertion_message_cmpmem (G_LOG_DOMAIN, __FILE__, __LINE__, \
27 G_STRFUNC, #a "[" #na"] " #cmp " " #b "[" #nb "]", \
28 __p1, __n1, #cmp, __p2, __n2); } while (0)
29
30 static const char HEXC[] = "0123456789ABCDEF";
31
32 static gchar *
33 escape_data (const guchar *data,
34 gsize n_data)
35 {
36 GString *result;
37 gchar c;
38 gsize i;
39 guchar j;
40
41 g_assert (data != NULL);
42
43 result = g_string_sized_new (n_data * 2 + 1);
44 for (i = 0; i < n_data; ++i) {
45 c = data[i];
46 if (c == '\n') {
47 g_string_append (result, "\\n");
48 } else if (c == '\r') {
49 g_string_append (result, "\\r");
50 } else if (c == '\v') {
51 g_string_append (result, "\\v");
52 } else if (g_ascii_isprint (c)) {
53 g_string_append_c (result, c);
54 } else {
55 g_string_append (result, "\\x");
56 j = c >> 4 & 0xf;
57 g_string_append_c (result, HEXC[j]);
58 j = c & 0xf;
59 g_string_append_c (result, HEXC[j]);
60 }
61 }
62
63 return g_string_free (result, FALSE);
64 }
65
66 static void
67 assertion_message_cmpmem (const char *domain,
68 const char *file,
69 int line,
70 const char *func,
71 const char *expr,
72 gconstpointer arg1,
73 gsize n_arg1,
74 const char *cmp,
75 gconstpointer arg2,
76 gsize n_arg2)
77 {
78 char *a1, *a2, *s;
79 a1 = arg1 ? escape_data (arg1, n_arg1) : g_strdup ("NULL");
80 a2 = arg2 ? escape_data (arg2, n_arg2) : g_strdup ("NULL");
81 s = g_strdup_printf ("assertion failed (%s): (%s %s %s)", expr, a1, cmp, a2);
82 g_free (a1);
83 g_free (a2);
84 g_assertion_message (domain, file, line, func, s);
85 g_free (s);
86 }
87
88 typedef struct {
89 RealmIniConfig *config;
90 } Test;
91
92 static void
93 setup (Test *test,
94 gconstpointer unused)
95 {
96 test->config = realm_ini_config_new (REALM_INI_LINE_CONTINUATIONS);
97 }
98
99 static void
100 teardown (Test *test,
101 gconstpointer unused)
102 {
103 g_object_unref (test->config);
104 }
105
106 static void
107 on_config_changed (RealmIniConfig *config,
108 gpointer user_data)
109 {
110 gboolean *changed = user_data;
111 *changed = TRUE;
112 }
113
114 static void
115 test_read_one (Test *test,
116 gconstpointer unused)
117 {
118 gboolean changed = FALSE;
119 GError *error = NULL;
120 gchar *value;
121 gboolean ret;
122
123 g_signal_connect (test->config, "changed", G_CALLBACK (on_config_changed), &changed);
124
125 ret = realm_ini_config_read_file (test->config, TESTFILE_DIR "/smb-one.conf", &error);
126 g_assert_no_error (error);
127 g_assert (ret == TRUE);
128
129 g_assert (changed == TRUE);
130
131 value = realm_ini_config_get (test->config, "section", "one");
132 g_assert_cmpstr (value, ==, "uno");
133 g_free (value);
134 value = realm_ini_config_get (test->config, "section", "two");
135 g_assert_cmpstr (value, ==, "dos");
136 g_free (value);
137 value = realm_ini_config_get (test->config, "section", "three");
138 g_assert_cmpstr (value, ==, "three \tThree \tTHREE");
139 g_free (value);
140 value = realm_ini_config_get (test->config, "section", "four");
141 g_assert_cmpstr (value, ==, "cuatro");
142 g_free (value);
143 value = realm_ini_config_get (test->config, "section", "five");
144 g_assert_cmpstr (value, ==, "cinco");
145 g_free (value);
146 value = realm_ini_config_get (test->config, "section", "six");
147 g_assert_cmpstr (value, ==, "seis");
148 g_free (value);
149
150 /* Not present */
151 value = realm_ini_config_get (test->config, "section", "zero");
152 g_assert (value == NULL);
153
154 /* Section header is broken */
155 value = realm_ini_config_get (test->config, "broken", "five");
156 g_assert (value == NULL);
157
158 value = realm_ini_config_get (test->config, "another section", "ended here");
159 g_assert_cmpstr (value, ==, "last");
160 g_free (value);
161 }
162
163 static void
164 test_read_all (Test *test,
165 gconstpointer unused)
166 {
167 GError *error = NULL;
168 GHashTable *parameters;
169 gboolean ret;
170
171 ret = realm_ini_config_read_file (test->config, TESTFILE_DIR "/smb-one.conf", &error);
172 g_assert_no_error (error);
173 g_assert (ret == TRUE);
174
175 parameters = realm_ini_config_get_all (test->config, "section");
176 g_assert_cmpstr (g_hash_table_lookup (parameters, "one"), ==, "uno");
177 g_assert_cmpstr (g_hash_table_lookup (parameters, "two"), ==, "dos");
178 g_assert_cmpstr (g_hash_table_lookup (parameters, "three"), ==, "three \tThree \tTHREE");
179 g_assert_cmpstr (g_hash_table_lookup (parameters, "four"), ==, "cuatro");
180 g_assert_cmpstr (g_hash_table_lookup (parameters, "five"), ==, "cinco");
181
182 /* Section header is broken */
183 parameters = realm_ini_config_get_all (test->config, "broken");
184 g_assert (parameters == NULL);
185 }
186
187 static void
188 test_read_carriage_return (Test *test,
189 gconstpointer unused)
190 {
191 const gchar *data = "[section]\n1=one\r\n2=two";
192 GBytes *bytes;
193 gchar *value;
194
195 bytes = g_bytes_new_static (data, strlen (data));
196 realm_ini_config_read_bytes (test->config, bytes);
197 g_bytes_unref (bytes);
198
199 value = realm_ini_config_get (test->config, "section", "1");
200 g_assert_cmpstr (value, ==, "one");
201 g_free (value);
202 value = realm_ini_config_get (test->config, "section", "2");
203 g_assert_cmpstr (value, ==, "two");
204 }
205
206 static void
207 test_read_string (Test *test,
208 gconstpointer unused)
209 {
210 const gchar *data = "[section]\n1=one\n2=two";
211 gchar *value;
212
213 realm_ini_config_read_string (test->config, data);
214
215 value = realm_ini_config_get (test->config, "section", "1");
216 g_assert_cmpstr (value, ==, "one");
217 g_free (value);
218 value = realm_ini_config_get (test->config, "section", "2");
219 g_assert_cmpstr (value, ==, "two");
220 }
221
222 static void
223 test_write_exact (Test *test,
224 gconstpointer unused)
225 {
226 GError *error = NULL;
227 gchar *contents;
228 gsize length;
229 const gchar *output;
230 gsize written;
231 GBytes *bytes;
232
233 g_file_get_contents (TESTFILE_DIR "/smb-one.conf", &contents, &length, &error);
234 g_assert_no_error (error);
235
236 bytes = g_bytes_new (contents, length);
237 realm_ini_config_read_bytes (test->config, bytes);
238 g_bytes_unref (bytes);
239
240 bytes = realm_ini_config_write_bytes (test->config);
241 output = g_bytes_get_data (bytes, &written);
242 assert_cmpmem (contents, length, ==, output, written);
243 g_bytes_unref (bytes);
244
245 g_free (contents);
246 }
247
248 static void
249 test_write_file (Test *test,
250 gconstpointer unused)
251 {
252 GError *error = NULL;
253 gchar *contents;
254 gsize length;
255 gchar *output;
256 gsize written;
257 GBytes *bytes;
258 gboolean ret;
259
260 g_file_get_contents (TESTFILE_DIR "/smb-one.conf", &contents, &length, &error);
261 g_assert_no_error (error);
262
263 bytes = g_bytes_new (contents, length);
264 realm_ini_config_read_bytes (test->config, bytes);
265 g_bytes_unref (bytes);
266
267 ret = realm_ini_config_write_file (test->config, "/tmp/test-samba-config.conf", &error);
268 g_assert_no_error (error);
269 g_assert (ret == TRUE);
270
271 g_file_get_contents (TESTFILE_DIR "/smb-one.conf", &output, &written, &error);
272 g_assert_no_error (error);
273
274 assert_cmpmem (contents, length, ==, output, written);
275
276 g_free (contents);
277 g_free (output);
278 }
279
280 static void
281 test_write_empty_no_create (Test *test,
282 gconstpointer unused)
283 {
284 GError *error = NULL;
285 gboolean ret;
286
287 ret = realm_ini_config_write_file (test->config, "/non-existant", &error);
288 g_assert_no_error (error);
289 g_assert (ret == TRUE);
290
291 g_assert (!g_file_test ("/non-existant", G_FILE_TEST_EXISTS));
292 }
293
294
295 static void
296 test_file_not_exist (Test *test,
297 gconstpointer unused)
298 {
299 GError *error = NULL;
300 gboolean ret;
301
302 ret = realm_ini_config_read_file (test->config, "/non-existant", &error);
303 g_assert_no_error (error);
304 g_assert (ret == TRUE);
305 }
306
307 static gboolean
308 on_timeout_quit_loop (gpointer user_data)
309 {
310 g_main_loop_quit (user_data);
311 return FALSE; /* don't call again */
312 }
313
314 static void
315 test_file_watch (Test *test,
316 gconstpointer unused)
317 {
318 const gchar *data = "[section]\nkey=12345";
319 const gchar *filename = "/tmp/test-samba-config.watch";
320 gboolean changed = FALSE;
321 GError *error = NULL;
322 GMainLoop *loop;
323 gchar *value;
324 gboolean ret;
325
326 g_unlink (filename);
327 ret = realm_ini_config_read_file (test->config, filename, &error);
328 g_assert_no_error (error);
329 g_assert (ret == TRUE);
330
331 g_signal_connect (test->config, "changed", G_CALLBACK (on_config_changed), &changed);
332
333 value = realm_ini_config_get (test->config, "section", "key");
334 g_assert (value == NULL);
335
336 /* Now write to the file */
337 g_file_set_contents (filename, data, -1, &error);
338 g_assert_no_error (error);
339
340 /* Wait a couple seconds */
341 loop = g_main_loop_new (NULL, FALSE);
342 g_timeout_add_seconds (2, on_timeout_quit_loop, loop);
343 g_main_loop_run (loop);
344 g_main_loop_unref (loop);
345
346 g_assert (changed == TRUE);
347 value = realm_ini_config_get (test->config, "section", "key");
348 g_assert_cmpstr (value, ==, "12345");
349 g_free (value);
350 }
351
352 static void
353 test_set (Test *test,
354 gconstpointer unused)
355 {
356 const gchar *data = "[section]\n\t1= one\r\n2=two\n3=three";
357 const gchar *check = "[section]\n1 = the number one\n2=two\n4 = four\n";
358 gboolean changed = FALSE;
359 const gchar *output;
360 gsize n_check;
361 gsize n_output;
362 GBytes *bytes;
363
364 bytes = g_bytes_new_static (data, strlen (data));
365 realm_ini_config_read_bytes (test->config, bytes);
366 g_bytes_unref (bytes);
367
368 g_signal_connect (test->config, "changed", G_CALLBACK (on_config_changed), &changed);
369
370 realm_ini_config_set (test->config, "section", "1", "the number one");
371 realm_ini_config_set (test->config, "section", "3", NULL);
372 realm_ini_config_set (test->config, "section", "4", "four");
373
374 g_assert (changed == TRUE);
375
376 bytes = realm_ini_config_write_bytes (test->config);
377 output = g_bytes_get_data (bytes, &n_output);
378 n_check = strlen (check);
379 assert_cmpmem (check, n_check, ==, output, n_output);
380 g_bytes_unref (bytes);
381 }
382
383 static void
384 test_set_middle (Test *test,
385 gconstpointer unused)
386 {
387 const gchar *data = "[section]\n1=one\n2=two\n\n[another]\n4=four";
388 const gchar *check = "[section]\n1=one\n2=two\n3 = three\n\n[another]\n4=four";
389 const gchar *output;
390 gsize n_check;
391 gsize n_output;
392 GBytes *bytes;
393
394 bytes = g_bytes_new_static (data, strlen (data));
395 realm_ini_config_read_bytes (test->config, bytes);
396 g_bytes_unref (bytes);
397
398 realm_ini_config_set (test->config, "section", "3", "three");
399
400 bytes = realm_ini_config_write_bytes (test->config);
401 output = g_bytes_get_data (bytes, &n_output);
402 n_check = strlen (check);
403 assert_cmpmem (check, n_check, ==, output, n_output);
404 g_bytes_unref (bytes);
405 }
406
407 static void
408 test_set_section (Test *test,
409 gconstpointer unused)
410 {
411 const gchar *data = "[section]\n1=one\n2=two";
412 const gchar *check = "[section]\n1=one\n2=two\n\n[happy]\n4 = four\n";
413 const gchar *output;
414 gsize n_check;
415 gsize n_output;
416 GBytes *bytes;
417
418 bytes = g_bytes_new_static (data, strlen (data));
419 realm_ini_config_read_bytes (test->config, bytes);
420 g_bytes_unref (bytes);
421
422 realm_ini_config_set (test->config, "happy", "4", "four");
423 realm_ini_config_set (test->config, "nope", "6", NULL);
424
425 bytes = realm_ini_config_write_bytes (test->config);
426 output = g_bytes_get_data (bytes, &n_output);
427 n_check = strlen (check);
428 assert_cmpmem (check, n_check, ==, output, n_output);
429 g_bytes_unref (bytes);
430 }
431
432 static void
433 test_set_all (Test *test,
434 gconstpointer unused)
435 {
436 const gchar *data = "[section]\n\t1= one\r\n2=two\n3=three";
437 const gchar *check = "[section]\n1 = the number one\n2=two\n4 = four\n";
438 gboolean changed = FALSE;
439 const gchar *output;
440 GHashTable *parameters;
441 gsize n_check;
442 gsize n_output;
443 GBytes *bytes;
444
445 bytes = g_bytes_new_static (data, strlen (data));
446 realm_ini_config_read_bytes (test->config, bytes);
447 g_bytes_unref (bytes);
448
449 g_signal_connect (test->config, "changed", G_CALLBACK (on_config_changed), &changed);
450
451 parameters = g_hash_table_new (g_str_hash, g_str_equal);
452 g_hash_table_insert (parameters, "1", "the number one");
453 g_hash_table_insert (parameters, "3", NULL);
454 g_hash_table_insert (parameters, "4", "four");
455 realm_ini_config_set_all (test->config, "section", parameters);
456 g_hash_table_unref (parameters);
457
458 g_assert (changed == TRUE);
459
460 bytes = realm_ini_config_write_bytes (test->config);
461 output = g_bytes_get_data (bytes, &n_output);
462 n_check = strlen (check);
463 assert_cmpmem (check, n_check, ==, output, n_output);
464 g_bytes_unref (bytes);
465 }
466
467 static void
468 test_change (Test *test,
469 gconstpointer unused)
470 {
471 const gchar *data = "[section]\n\t1= one\r\n2=two\n3=three";
472 const gchar *check = "[section]\n1 = the number one\n2=two\n4 = four\n";
473 GError *error = NULL;
474 gchar *output;
475
476 /* Setup this file as the system smb.conf */
477 realm_settings_add ("paths", "smb.conf", "/tmp/test-samba-config.conf");
478 g_file_set_contents ("/tmp/test-samba-config.conf", data, -1, &error);
479 g_assert_no_error (error);
480
481 realm_samba_config_change ("section", &error,
482 "1", "the number one",
483 "3", NULL,
484 "4", "four",
485 NULL);
486 g_assert_no_error (error);
487
488 g_file_get_contents ("/tmp/test-samba-config.conf", &output, NULL, &error);
489 g_assert_no_error (error);
490
491 g_assert_cmpstr (output, ==, check);
492 g_free (output);
493 }
494
495 static void
496 test_change_list (Test *test,
497 gconstpointer unused)
498 {
499 const gchar *data = "[section]\n\t1= one\n2=two, dos,zwei ,duo\n3=three";
500 const gchar *check = "[section]\n\t1= one\n2 = dos, zwei, 10\n3=three";
501 const gchar *remove[] = { "two", "duo", NULL };
502 const gchar *add[] = { "TWO", "10", NULL };
503 GError *error = NULL;
504 gchar *output;
505
506 /* Setup this file as the system smb.conf */
507 realm_settings_add ("paths", "smb.conf", "/tmp/test-samba-config.conf");
508 g_file_set_contents ("/tmp/test-samba-config.conf", data, -1, &error);
509 g_assert_no_error (error);
510
511 realm_ini_config_set_filename (test->config, "/tmp/test-samba-config.conf");
512 realm_ini_config_change_list (test->config, "section", "2", ",",
513 add, remove, &error);
514 g_assert_no_error (error);
515
516 g_file_get_contents ("/tmp/test-samba-config.conf", &output, NULL, &error);
517 g_assert_no_error (error);
518
519 g_assert_cmpstr (output, ==, check);
520 g_free (output);
521 }
522
523 static void
524 test_change_list_new (Test *test,
525 gconstpointer unused)
526 {
527 const gchar *data = "[section]\n\t1= one\n3=three";
528 const gchar *check = "[section]\n\t1= one\n3=three\n2 = dos, zwei, 10\n";
529 const gchar **remove = NULL;
530 const gchar *add[] = { "dos", "zwei", "10", NULL };
531 GError *error = NULL;
532 gchar *output;
533
534 /* Setup this file as the system smb.conf */
535 realm_settings_add ("paths", "smb.conf", "/tmp/test-samba-config.conf");
536 g_file_set_contents ("/tmp/test-samba-config.conf", data, -1, &error);
537 g_assert_no_error (error);
538
539 realm_ini_config_set_filename (test->config, "/tmp/test-samba-config.conf");
540 realm_ini_config_change_list (test->config, "section", "2", ",",
541 add, remove, &error);
542 g_assert_no_error (error);
543
544 g_file_get_contents ("/tmp/test-samba-config.conf", &output, NULL, &error);
545 g_assert_no_error (error);
546
547 g_assert_cmpstr (output, ==, check);
548 g_free (output);
549 }
550
551 static void
552 test_change_list_null_add (Test *test,
553 gconstpointer unused)
554 {
555 const gchar *data = "[section]\n\t1= one\n2=two, dos,zwei ,duo\n3=three";
556 const gchar *check = "[section]\n\t1= one\n2 = dos, zwei\n3=three";
557 const gchar *remove[] = { "two", "duo", NULL };
558 const gchar **add = NULL;
559 GError *error = NULL;
560 gchar *output;
561
562 /* Setup this file as the system smb.conf */
563 realm_settings_add ("paths", "smb.conf", "/tmp/test-samba-config.conf");
564 g_file_set_contents ("/tmp/test-samba-config.conf", data, -1, &error);
565 g_assert_no_error (error);
566
567 realm_ini_config_set_filename (test->config, "/tmp/test-samba-config.conf");
568 realm_ini_config_change_list (test->config, "section", "2", ",",
569 add, remove, &error);
570 g_assert_no_error (error);
571
572 g_file_get_contents ("/tmp/test-samba-config.conf", &output, NULL, &error);
573 g_assert_no_error (error);
574
575 g_assert_cmpstr (output, ==, check);
576 g_free (output);
577 }
578
579 static void
580 test_change_list_null_remove (Test *test,
581 gconstpointer unused)
582 {
583 const gchar *data = "[section]\n\t1= one\n2=two, dos,zwei ,duo\n3=three";
584 const gchar *check = "[section]\n\t1= one\n2 = two, dos, zwei, duo, 10\n3=three";
585 const gchar **remove = NULL;
586 const gchar *add[] = { "TWO", "10", NULL };
587 GError *error = NULL;
588 gchar *output;
589
590 /* Setup this file as the system smb.conf */
591 realm_settings_add ("paths", "smb.conf", "/tmp/test-samba-config.conf");
592 g_file_set_contents ("/tmp/test-samba-config.conf", data, -1, &error);
593 g_assert_no_error (error);
594
595 realm_ini_config_set_filename (test->config, "/tmp/test-samba-config.conf");
596 realm_ini_config_change_list (test->config, "section", "2", ",",
597 add, remove, &error);
598 g_assert_no_error (error);
599
600 g_file_get_contents ("/tmp/test-samba-config.conf", &output, NULL, &error);
601 g_assert_no_error (error);
602
603 g_assert_cmpstr (output, ==, check);
604 g_free (output);
605 }
606
607 int
608 main (int argc,
609 char **argv)
610 {
611 g_type_init ();
612 g_test_init (&argc, &argv, NULL);
613 g_set_prgname ("test-samba-config");
614
615 realm_settings_init ();
616
617 g_test_add ("/realmd/ini-config/read-one", Test, NULL, setup, test_read_one, teardown);
618 g_test_add ("/realmd/ini-config/read-all", Test, NULL, setup, test_read_all, teardown);
619 g_test_add ("/realmd/ini-config/read-string", Test, NULL, setup, test_read_string, teardown);
620 g_test_add ("/realmd/ini-config/read-carriage-return", Test, NULL, setup, test_read_carriage_return, teardown);
621
622 g_test_add ("/realmd/ini-config/write-exact", Test, NULL, setup, test_write_exact, teardown);
623 g_test_add ("/realmd/ini-config/write-file", Test, NULL, setup, test_write_file, teardown);
624 g_test_add ("/realmd/ini-config/write-empty-no-create", Test, NULL, setup, test_write_empty_no_create, teardown);
625
626 g_test_add ("/realmd/ini-config/set", Test, NULL, setup, test_set, teardown);
627 g_test_add ("/realmd/ini-config/set-middle", Test, NULL, setup, test_set_middle, teardown);
628 g_test_add ("/realmd/ini-config/set-section", Test, NULL, setup, test_set_section, teardown);
629 g_test_add ("/realmd/ini-config/set-all", Test, NULL, setup, test_set_all, teardown);
630
631 g_test_add ("/realmd/ini-config/file-not-exist", Test, NULL, setup, test_file_not_exist, teardown);
632 g_test_add ("/realmd/ini-config/file-watch", Test, NULL, setup, test_file_watch, teardown);
633
634 g_test_add ("/realmd/samba-config/change", Test, NULL, setup, test_change, teardown);
635 g_test_add ("/realmd/samba-config/change-list", Test, NULL, setup, test_change_list, teardown);
636 g_test_add ("/realmd/samba-config/change-list-new", Test, NULL, setup, test_change_list_new, teardown);
637 g_test_add ("/realmd/samba-config/change-list-null-add", Test, NULL, setup, test_change_list_null_add, teardown);
638 g_test_add ("/realmd/samba-config/change-list-null-remove", Test, NULL, setup, test_change_list_null_remove, teardown);
639
640 return g_test_run ();
641 }
0 include $(top_srcdir)/Makefile.decl
1
2 bin_PROGRAMS = \
3 realm-enroll
4
5 realm_enroll_SOURCES = \
6 realm-enroll.c \
7 $(NULL)
8
9 realm_enroll_CFLAGS = \
10 -I$(top_srcdir)/dbus \
11 -I$(top_builddir)/dbus \
12 $(GLIB_CFLAGS) \
13 $(KRB5_CFLAGS) \
14 $(NULL)
15
16 realm_enroll_LDADD = \
17 $(top_builddir)/dbus/librealm-dbus.a \
18 $(GLIB_LIBS) \
19 $(KRB5_LIBS) \
20 $(NULL)
21
0 # Makefile.in generated by automake 1.11.3 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
6 # This Makefile.in is free software; the Free Software Foundation
7 # gives unlimited permission to copy and/or distribute it,
8 # with or without modifications, as long as this notice is preserved.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 # PARTICULAR PURPOSE.
14
15 @SET_MAKE@
16
17 VPATH = @srcdir@
18 pkgdatadir = $(datadir)/@PACKAGE@
19 pkgincludedir = $(includedir)/@PACKAGE@
20 pkglibdir = $(libdir)/@PACKAGE@
21 pkglibexecdir = $(libexecdir)/@PACKAGE@
22 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23 install_sh_DATA = $(install_sh) -c -m 644
24 install_sh_PROGRAM = $(install_sh) -c
25 install_sh_SCRIPT = $(install_sh) -c
26 INSTALL_HEADER = $(INSTALL_DATA)
27 transform = $(program_transform_name)
28 NORMAL_INSTALL = :
29 PRE_INSTALL = :
30 POST_INSTALL = :
31 NORMAL_UNINSTALL = :
32 PRE_UNINSTALL = :
33 POST_UNINSTALL = :
34 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
35 $(top_srcdir)/Makefile.decl
36 bin_PROGRAMS = realm-enroll$(EXEEXT)
37 subdir = tools
38 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39 am__aclocal_m4_deps = $(top_srcdir)/build/m4/intltool.m4 \
40 $(top_srcdir)/configure.ac
41 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
42 $(ACLOCAL_M4)
43 mkinstalldirs = $(install_sh) -d
44 CONFIG_HEADER = $(top_builddir)/config.h
45 CONFIG_CLEAN_FILES =
46 CONFIG_CLEAN_VPATH_FILES =
47 am__installdirs = "$(DESTDIR)$(bindir)"
48 PROGRAMS = $(bin_PROGRAMS)
49 am__objects_1 =
50 am_realm_enroll_OBJECTS = realm_enroll-realm-enroll.$(OBJEXT) \
51 $(am__objects_1)
52 realm_enroll_OBJECTS = $(am_realm_enroll_OBJECTS)
53 am__DEPENDENCIES_1 =
54 realm_enroll_DEPENDENCIES = $(top_builddir)/dbus/librealm-dbus.a \
55 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
56 $(am__DEPENDENCIES_1)
57 realm_enroll_LINK = $(CCLD) $(realm_enroll_CFLAGS) $(CFLAGS) \
58 $(AM_LDFLAGS) $(LDFLAGS) -o $@
59 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
60 depcomp = $(SHELL) $(top_srcdir)/depcomp
61 am__depfiles_maybe = depfiles
62 am__mv = mv -f
63 AM_V_lt = $(am__v_lt_@AM_V@)
64 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
65 am__v_lt_0 = --silent
66 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
67 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
68 AM_V_CC = $(am__v_CC_@AM_V@)
69 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
70 am__v_CC_0 = @echo " CC " $@;
71 AM_V_at = $(am__v_at_@AM_V@)
72 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
73 am__v_at_0 = @
74 CCLD = $(CC)
75 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
76 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
77 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
78 am__v_CCLD_0 = @echo " CCLD " $@;
79 AM_V_GEN = $(am__v_GEN_@AM_V@)
80 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
81 am__v_GEN_0 = @echo " GEN " $@;
82 SOURCES = $(realm_enroll_SOURCES)
83 DIST_SOURCES = $(realm_enroll_SOURCES)
84 ETAGS = etags
85 CTAGS = ctags
86 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
87 ACLOCAL = @ACLOCAL@
88 ALL_LINGUAS = @ALL_LINGUAS@
89 AMTAR = @AMTAR@
90 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
91 AUTOCONF = @AUTOCONF@
92 AUTOHEADER = @AUTOHEADER@
93 AUTOMAKE = @AUTOMAKE@
94 AWK = @AWK@
95 CATALOGS = @CATALOGS@
96 CATOBJEXT = @CATOBJEXT@
97 CC = @CC@
98 CCDEPMODE = @CCDEPMODE@
99 CFLAGS = @CFLAGS@
100 CPP = @CPP@
101 CPPFLAGS = @CPPFLAGS@
102 CYGPATH_W = @CYGPATH_W@
103 DATADIRNAME = @DATADIRNAME@
104 DBUS_POLICY_DIR = @DBUS_POLICY_DIR@
105 DEFS = @DEFS@
106 DEPDIR = @DEPDIR@
107 DISTRO = @DISTRO@
108 ECHO_C = @ECHO_C@
109 ECHO_N = @ECHO_N@
110 ECHO_T = @ECHO_T@
111 EGREP = @EGREP@
112 EXEEXT = @EXEEXT@
113 GCOV = @GCOV@
114 GENHTML = @GENHTML@
115 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
116 GLIB_CFLAGS = @GLIB_CFLAGS@
117 GLIB_LIBS = @GLIB_LIBS@
118 GMOFILES = @GMOFILES@
119 GMSGFMT = @GMSGFMT@
120 GREP = @GREP@
121 INSTALL = @INSTALL@
122 INSTALL_DATA = @INSTALL_DATA@
123 INSTALL_PROGRAM = @INSTALL_PROGRAM@
124 INSTALL_SCRIPT = @INSTALL_SCRIPT@
125 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
126 INSTOBJEXT = @INSTOBJEXT@
127 INTLLIBS = @INTLLIBS@
128 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
129 INTLTOOL_MERGE = @INTLTOOL_MERGE@
130 INTLTOOL_PERL = @INTLTOOL_PERL@
131 INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
132 INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@
133 INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@
134 INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@
135 INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@
136 KRB5_CFLAGS = @KRB5_CFLAGS@
137 KRB5_CONFIG = @KRB5_CONFIG@
138 KRB5_LIBS = @KRB5_LIBS@
139 LCOV = @LCOV@
140 LDFLAGS = @LDFLAGS@
141 LIBOBJS = @LIBOBJS@
142 LIBS = @LIBS@
143 LN_S = @LN_S@
144 LTLIBOBJS = @LTLIBOBJS@
145 MAINT = @MAINT@
146 MAKEINFO = @MAKEINFO@
147 MKDIR_P = @MKDIR_P@
148 MKINSTALLDIRS = @MKINSTALLDIRS@
149 MSGFMT = @MSGFMT@
150 MSGFMT_OPTS = @MSGFMT_OPTS@
151 MSGMERGE = @MSGMERGE@
152 OBJEXT = @OBJEXT@
153 PACKAGE = @PACKAGE@
154 PACKAGEKIT_CFLAGS = @PACKAGEKIT_CFLAGS@
155 PACKAGEKIT_LIBS = @PACKAGEKIT_LIBS@
156 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
157 PACKAGE_NAME = @PACKAGE_NAME@
158 PACKAGE_STRING = @PACKAGE_STRING@
159 PACKAGE_TARNAME = @PACKAGE_TARNAME@
160 PACKAGE_URL = @PACKAGE_URL@
161 PACKAGE_VERSION = @PACKAGE_VERSION@
162 PATH_SEPARATOR = @PATH_SEPARATOR@
163 PKG_CONFIG = @PKG_CONFIG@
164 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
165 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
166 POFILES = @POFILES@
167 POLKIT_ACTION_DIR = @POLKIT_ACTION_DIR@
168 POLKIT_CFLAGS = @POLKIT_CFLAGS@
169 POLKIT_LIBS = @POLKIT_LIBS@
170 POSUB = @POSUB@
171 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
172 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
173 RANLIB = @RANLIB@
174 SERVICE_DIR = @SERVICE_DIR@
175 SET_MAKE = @SET_MAKE@
176 SHELL = @SHELL@
177 STRIP = @STRIP@
178 TEST_MODE = @TEST_MODE@
179 USE_NLS = @USE_NLS@
180 VERSION = @VERSION@
181 XGETTEXT = @XGETTEXT@
182 abs_builddir = @abs_builddir@
183 abs_srcdir = @abs_srcdir@
184 abs_top_builddir = @abs_top_builddir@
185 abs_top_srcdir = @abs_top_srcdir@
186 ac_ct_CC = @ac_ct_CC@
187 am__include = @am__include@
188 am__leading_dot = @am__leading_dot@
189 am__quote = @am__quote@
190 am__tar = @am__tar@
191 am__untar = @am__untar@
192 bindir = @bindir@
193 build_alias = @build_alias@
194 builddir = @builddir@
195 datadir = @datadir@
196 datarootdir = @datarootdir@
197 docdir = @docdir@
198 dvidir = @dvidir@
199 exec_prefix = @exec_prefix@
200 host_alias = @host_alias@
201 htmldir = @htmldir@
202 includedir = @includedir@
203 infodir = @infodir@
204 install_sh = @install_sh@
205 intltool__v_merge_options_ = @intltool__v_merge_options_@
206 intltool__v_merge_options_0 = @intltool__v_merge_options_0@
207 libdir = @libdir@
208 libexecdir = @libexecdir@
209 localedir = @localedir@
210 localstatedir = @localstatedir@
211 mandir = @mandir@
212 mkdir_p = @mkdir_p@
213 oldincludedir = @oldincludedir@
214 pdfdir = @pdfdir@
215 prefix = @prefix@
216 program_transform_name = @program_transform_name@
217 psdir = @psdir@
218 sbindir = @sbindir@
219 sharedstatedir = @sharedstatedir@
220 srcdir = @srcdir@
221 sysconfdir = @sysconfdir@
222 target_alias = @target_alias@
223 top_build_prefix = @top_build_prefix@
224 top_builddir = @top_builddir@
225 top_srcdir = @top_srcdir@
226 NULL =
227 TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions
228 realm_enroll_SOURCES = \
229 realm-enroll.c \
230 $(NULL)
231
232 realm_enroll_CFLAGS = \
233 -I$(top_srcdir)/dbus \
234 -I$(top_builddir)/dbus \
235 $(GLIB_CFLAGS) \
236 $(KRB5_CFLAGS) \
237 $(NULL)
238
239 realm_enroll_LDADD = \
240 $(top_builddir)/dbus/librealm-dbus.a \
241 $(GLIB_LIBS) \
242 $(KRB5_LIBS) \
243 $(NULL)
244
245 all: all-am
246
247 .SUFFIXES:
248 .SUFFIXES: .c .o .obj
249 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/Makefile.decl $(am__configure_deps)
250 @for dep in $?; do \
251 case '$(am__configure_deps)' in \
252 *$$dep*) \
253 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
254 && { if test -f $@; then exit 0; else break; fi; }; \
255 exit 1;; \
256 esac; \
257 done; \
258 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \
259 $(am__cd) $(top_srcdir) && \
260 $(AUTOMAKE) --foreign tools/Makefile
261 .PRECIOUS: Makefile
262 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
263 @case '$?' in \
264 *config.status*) \
265 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
266 *) \
267 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
268 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
269 esac;
270 $(top_srcdir)/Makefile.decl:
271
272 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
273 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
274
275 $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
276 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
277 $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
278 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
279 $(am__aclocal_m4_deps):
280 install-binPROGRAMS: $(bin_PROGRAMS)
281 @$(NORMAL_INSTALL)
282 test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
283 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
284 for p in $$list; do echo "$$p $$p"; done | \
285 sed 's/$(EXEEXT)$$//' | \
286 while read p p1; do if test -f $$p; \
287 then echo "$$p"; echo "$$p"; else :; fi; \
288 done | \
289 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
290 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
291 sed 'N;N;N;s,\n, ,g' | \
292 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
293 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
294 if ($$2 == $$4) files[d] = files[d] " " $$1; \
295 else { print "f", $$3 "/" $$4, $$1; } } \
296 END { for (d in files) print "f", d, files[d] }' | \
297 while read type dir files; do \
298 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
299 test -z "$$files" || { \
300 echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
301 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
302 } \
303 ; done
304
305 uninstall-binPROGRAMS:
306 @$(NORMAL_UNINSTALL)
307 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
308 files=`for p in $$list; do echo "$$p"; done | \
309 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
310 -e 's/$$/$(EXEEXT)/' `; \
311 test -n "$$list" || exit 0; \
312 echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
313 cd "$(DESTDIR)$(bindir)" && rm -f $$files
314
315 clean-binPROGRAMS:
316 -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
317 realm-enroll$(EXEEXT): $(realm_enroll_OBJECTS) $(realm_enroll_DEPENDENCIES) $(EXTRA_realm_enroll_DEPENDENCIES)
318 @rm -f realm-enroll$(EXEEXT)
319 $(AM_V_CCLD)$(realm_enroll_LINK) $(realm_enroll_OBJECTS) $(realm_enroll_LDADD) $(LIBS)
320
321 mostlyclean-compile:
322 -rm -f *.$(OBJEXT)
323
324 distclean-compile:
325 -rm -f *.tab.c
326
327 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realm_enroll-realm-enroll.Po@am__quote@
328
329 .c.o:
330 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
331 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
332 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
333 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
334 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
335
336 .c.obj:
337 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
338 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
339 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
340 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
341 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
342
343 realm_enroll-realm-enroll.o: realm-enroll.c
344 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realm_enroll_CFLAGS) $(CFLAGS) -MT realm_enroll-realm-enroll.o -MD -MP -MF $(DEPDIR)/realm_enroll-realm-enroll.Tpo -c -o realm_enroll-realm-enroll.o `test -f 'realm-enroll.c' || echo '$(srcdir)/'`realm-enroll.c
345 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realm_enroll-realm-enroll.Tpo $(DEPDIR)/realm_enroll-realm-enroll.Po
346 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-enroll.c' object='realm_enroll-realm-enroll.o' libtool=no @AMDEPBACKSLASH@
347 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
348 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realm_enroll_CFLAGS) $(CFLAGS) -c -o realm_enroll-realm-enroll.o `test -f 'realm-enroll.c' || echo '$(srcdir)/'`realm-enroll.c
349
350 realm_enroll-realm-enroll.obj: realm-enroll.c
351 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realm_enroll_CFLAGS) $(CFLAGS) -MT realm_enroll-realm-enroll.obj -MD -MP -MF $(DEPDIR)/realm_enroll-realm-enroll.Tpo -c -o realm_enroll-realm-enroll.obj `if test -f 'realm-enroll.c'; then $(CYGPATH_W) 'realm-enroll.c'; else $(CYGPATH_W) '$(srcdir)/realm-enroll.c'; fi`
352 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/realm_enroll-realm-enroll.Tpo $(DEPDIR)/realm_enroll-realm-enroll.Po
353 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='realm-enroll.c' object='realm_enroll-realm-enroll.obj' libtool=no @AMDEPBACKSLASH@
354 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
355 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(realm_enroll_CFLAGS) $(CFLAGS) -c -o realm_enroll-realm-enroll.obj `if test -f 'realm-enroll.c'; then $(CYGPATH_W) 'realm-enroll.c'; else $(CYGPATH_W) '$(srcdir)/realm-enroll.c'; fi`
356
357 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
358 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
359 unique=`for i in $$list; do \
360 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
361 done | \
362 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
363 END { if (nonempty) { for (i in files) print i; }; }'`; \
364 mkid -fID $$unique
365 tags: TAGS
366
367 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
368 $(TAGS_FILES) $(LISP)
369 set x; \
370 here=`pwd`; \
371 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
372 unique=`for i in $$list; do \
373 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
374 done | \
375 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
376 END { if (nonempty) { for (i in files) print i; }; }'`; \
377 shift; \
378 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
379 test -n "$$unique" || unique=$$empty_fix; \
380 if test $$# -gt 0; then \
381 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
382 "$$@" $$unique; \
383 else \
384 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
385 $$unique; \
386 fi; \
387 fi
388 ctags: CTAGS
389 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
390 $(TAGS_FILES) $(LISP)
391 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
392 unique=`for i in $$list; do \
393 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
394 done | \
395 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
396 END { if (nonempty) { for (i in files) print i; }; }'`; \
397 test -z "$(CTAGS_ARGS)$$unique" \
398 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
399 $$unique
400
401 GTAGS:
402 here=`$(am__cd) $(top_builddir) && pwd` \
403 && $(am__cd) $(top_srcdir) \
404 && gtags -i $(GTAGS_ARGS) "$$here"
405
406 distclean-tags:
407 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
408
409 distdir: $(DISTFILES)
410 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
411 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
412 list='$(DISTFILES)'; \
413 dist_files=`for file in $$list; do echo $$file; done | \
414 sed -e "s|^$$srcdirstrip/||;t" \
415 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
416 case $$dist_files in \
417 */*) $(MKDIR_P) `echo "$$dist_files" | \
418 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
419 sort -u` ;; \
420 esac; \
421 for file in $$dist_files; do \
422 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
423 if test -d $$d/$$file; then \
424 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
425 if test -d "$(distdir)/$$file"; then \
426 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
427 fi; \
428 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
429 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
430 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
431 fi; \
432 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
433 else \
434 test -f "$(distdir)/$$file" \
435 || cp -p $$d/$$file "$(distdir)/$$file" \
436 || exit 1; \
437 fi; \
438 done
439 check-am: all-am
440 check: check-am
441 all-am: Makefile $(PROGRAMS)
442 installdirs:
443 for dir in "$(DESTDIR)$(bindir)"; do \
444 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
445 done
446 install: install-am
447 install-exec: install-exec-am
448 install-data: install-data-am
449 uninstall: uninstall-am
450
451 install-am: all-am
452 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
453
454 installcheck: installcheck-am
455 install-strip:
456 if test -z '$(STRIP)'; then \
457 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
458 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
459 install; \
460 else \
461 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
462 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
463 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
464 fi
465 mostlyclean-generic:
466
467 clean-generic:
468
469 distclean-generic:
470 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
471 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
472
473 maintainer-clean-generic:
474 @echo "This command is intended for maintainers to use"
475 @echo "it deletes files that may require special tools to rebuild."
476 clean: clean-am
477
478 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
479
480 distclean: distclean-am
481 -rm -rf ./$(DEPDIR)
482 -rm -f Makefile
483 distclean-am: clean-am distclean-compile distclean-generic \
484 distclean-tags
485
486 dvi: dvi-am
487
488 dvi-am:
489
490 html: html-am
491
492 html-am:
493
494 info: info-am
495
496 info-am:
497
498 install-data-am:
499
500 install-dvi: install-dvi-am
501
502 install-dvi-am:
503
504 install-exec-am: install-binPROGRAMS
505
506 install-html: install-html-am
507
508 install-html-am:
509
510 install-info: install-info-am
511
512 install-info-am:
513
514 install-man:
515
516 install-pdf: install-pdf-am
517
518 install-pdf-am:
519
520 install-ps: install-ps-am
521
522 install-ps-am:
523
524 installcheck-am:
525
526 maintainer-clean: maintainer-clean-am
527 -rm -rf ./$(DEPDIR)
528 -rm -f Makefile
529 maintainer-clean-am: distclean-am maintainer-clean-generic
530
531 mostlyclean: mostlyclean-am
532
533 mostlyclean-am: mostlyclean-compile mostlyclean-generic
534
535 pdf: pdf-am
536
537 pdf-am:
538
539 ps: ps-am
540
541 ps-am:
542
543 uninstall-am: uninstall-binPROGRAMS
544
545 .MAKE: install-am install-strip
546
547 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
548 clean-generic ctags distclean distclean-compile \
549 distclean-generic distclean-tags distdir dvi dvi-am html \
550 html-am info info-am install install-am install-binPROGRAMS \
551 install-data install-data-am install-dvi install-dvi-am \
552 install-exec install-exec-am install-html install-html-am \
553 install-info install-info-am install-man install-pdf \
554 install-pdf-am install-ps install-ps-am install-strip \
555 installcheck installcheck-am installdirs maintainer-clean \
556 maintainer-clean-generic mostlyclean mostlyclean-compile \
557 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
558 uninstall-am uninstall-binPROGRAMS
559
560
561 perform-memcheck: $(TEST_PROGS) $(TEST_SUPPRESSIONS)
562 @make -C $(top_builddir)/build all
563 @for test in $(TEST_PROGS); do \
564 G_SLICE=always-malloc libtool --mode=execute \
565 valgrind --trace-children=no --gen-suppressions=all \
566 --suppressions=$(TEST_SUPPRESSIONS) \
567 --leak-check=full --show-reachable=yes --num-callers=16 \
568 --quiet --error-exitcode=33 \
569 $(builddir)/$$test; \
570 done
571
572 @WITH_COVERAGE_TRUE@coverage:
573 @WITH_COVERAGE_TRUE@ mkdir -p $(top_builddir)/build/coverage
574 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
575 @WITH_COVERAGE_TRUE@ $(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
576 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
577 @WITH_COVERAGE_TRUE@ @echo "file://$(abs_top_builddir)/build/coverage/index.html"
578
579 @WITH_COVERAGE_TRUE@clear-coverage:
580 @WITH_COVERAGE_TRUE@ $(LCOV) --directory . --zerocounters
581
582 # Tell versions [3.59,3.63) of GNU make to not export all variables.
583 # Otherwise a system limit (for SysV at least) may be exceeded.
584 .NOEXPORT:
0 /* realmd -- Realm configuration service
1 *
2 * Copyright 2012 Red Hat Inc
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; either version 2 of the licence or (at
7 * your option) any later version.
8 *
9 * See the included COPYING file for more information.
10 *
11 * Author: Stef Walter <stefw@gnome.org>
12 */
13
14 #include "config.h"
15
16 #include "realm-dbus-constants.h"
17 #include "realm-dbus-generated.h"
18
19 #include <krb5/krb5.h>
20
21 #include <glib.h>
22 #include <glib/gstdio.h>
23
24 #include <sys/types.h>
25 #include <sys/stat.h>
26 #include <errno.h>
27 #include <fcntl.h>
28
29 static void
30 handle_error (GError *error,
31 const gchar *format,
32 ...)
33 {
34 GString *message;
35 va_list va;
36
37 message = g_string_new ("");
38 g_string_append_printf (message, "%s: ", g_get_prgname ());
39
40 va_start (va, format);
41 g_string_append_vprintf (message, format, va);
42 va_end (va);
43
44 if (error) {
45 g_string_append (message, ": ");
46 g_string_append (message, error->message);
47 g_error_free (error);
48 }
49
50 g_printerr ("%s\n", message->str);
51 g_string_free (message, TRUE);
52 }
53
54 static void
55 handle_krb5_error (krb5_error_code code,
56 krb5_context context,
57 const gchar *format,
58 ...)
59 {
60 GString *message;
61 va_list va;
62
63 message = g_string_new ("");
64 g_string_append_printf (message, "%s: ", g_get_prgname ());
65
66 va_start (va, format);
67 g_string_append_vprintf (message, format, va);
68 va_end (va);
69
70 if (code != 0) {
71 g_string_append (message, ": ");
72 g_string_append (message, krb5_get_error_message (context, code));
73 }
74
75 g_printerr ("%s\n", message->str);
76 g_string_free (message, TRUE);
77 }
78
79 static RealmDbusKerberos *
80 realm_info_to_realm_proxy (GVariant *realm_info)
81 {
82 RealmDbusKerberos *realm = NULL;
83 const gchar *bus_name;
84 const gchar *object_path;
85 const gchar *interface_name;
86 GError *error = NULL;
87
88 g_variant_get (realm_info, "(&s&o&s)", &bus_name, &object_path, &interface_name);
89
90 if (g_str_equal (interface_name, REALM_DBUS_KERBEROS_REALM_INTERFACE)) {
91 realm = realm_dbus_kerberos_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
92 G_DBUS_PROXY_FLAGS_NONE,
93 bus_name, object_path,
94 NULL, &error);
95 }
96
97 if (error != NULL)
98 handle_error (error, "couldn't use realm service");
99 else if (realm == NULL)
100 handle_error (NULL, "unsupported realm type: %s", interface_name);
101
102 return realm;
103 }
104
105 static RealmDbusKerberos *
106 realms_to_realm_proxy (GVariant *realms)
107 {
108 RealmDbusKerberos *realm = NULL;
109 GVariant *realm_info;
110 GVariantIter iter;
111
112 g_variant_iter_init (&iter, realms);
113 while ((realm_info = g_variant_iter_next_value (&iter)) != NULL) {
114 realm = realm_info_to_realm_proxy (realm_info);
115 g_variant_unref (realm_info);
116
117 if (realm != NULL)
118 break;
119 }
120
121 return realm;
122 }
123
124 static RealmDbusKerberos *
125 discover_realm_for_string (const gchar *string)
126 {
127 RealmDbusKerberos *realm;
128 RealmDbusProvider *provider;
129 GError *error = NULL;
130 GVariant *realms;
131 gint relevance;
132
133 provider = realm_dbus_provider_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
134 G_DBUS_PROXY_FLAGS_NONE,
135 REALM_DBUS_ALL_PROVIDER_NAME,
136 REALM_DBUS_ALL_PROVIDER_PATH,
137 NULL, &error);
138 if (error != NULL) {
139 handle_error (error, "couldn't connect to realm service");
140 return NULL;
141 }
142
143 g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (provider), G_MAXINT);
144 realm_dbus_provider_call_discover_sync (provider, string, &relevance,
145 &realms, NULL, &error);
146
147 g_object_unref (provider);
148
149 if (error != NULL) {
150 handle_error (error, "couldn't connect to realm service");
151 return NULL;
152 }
153
154 realm = realms_to_realm_proxy (realms);
155 g_variant_unref (realms);
156
157 if (realm == NULL)
158 handle_error (NULL, "no such realm found: %s", string);
159
160 return realm;
161 }
162
163 static GVariant *
164 read_file_into_variant (const gchar *filename)
165 {
166 GVariant *variant;
167 GError *error = NULL;
168 gchar *contents;
169 gsize length;
170
171 g_file_get_contents (filename, &contents, &length, &error);
172 if (error != NULL) {
173 handle_error (error, "couldn't read credential cache");
174 return NULL;
175 }
176
177 variant = g_variant_new_from_data (G_VARIANT_TYPE ("ay"),
178 contents, length,
179 TRUE, g_free, contents);
180
181 return g_variant_ref_sink (variant);
182 }
183
184 static GVariant *
185 kinit_to_kerberos_cache (const gchar *name)
186 {
187 krb5_get_init_creds_opt *options = NULL;
188 krb5_context context = NULL;
189 krb5_principal principal = NULL;
190 krb5_error_code code;
191 int temp_fd;
192 gchar *filename = NULL;
193 krb5_ccache ccache = NULL;
194 krb5_creds my_creds;
195 GVariant *result = NULL;
196
197 code = krb5_init_context (&context);
198 if (code != 0) {
199 handle_krb5_error (code, NULL, "couldn't initialize kerberos");
200 goto cleanup;
201 }
202
203 code = krb5_parse_name (context, name, &principal);
204 if (code != 0) {
205 handle_krb5_error (code, context, "couldn't parse user name");
206 goto cleanup;
207 }
208
209 code = krb5_get_init_creds_opt_alloc (context, &options);
210 if (code != 0) {
211 handle_krb5_error (code, context, "couldn't setup options");
212 goto cleanup;
213 }
214
215 filename = g_build_filename (g_get_user_runtime_dir (), "realmd-krb5-cache.XXXXXX", NULL);
216 temp_fd = g_mkstemp_full (filename, O_RDWR, S_IRUSR | S_IWUSR);
217 if (temp_fd == -1) {
218 handle_error (NULL, "couldn't create credential cache file: %s", g_strerror (errno));
219 goto cleanup;
220 }
221 close (temp_fd);
222
223 code = krb5_cc_resolve (context, filename, &ccache);
224 if (code != 0) {
225 handle_krb5_error (code, context, "couldn't resolve credential cache");
226 goto cleanup;
227 }
228
229 code = krb5_get_init_creds_opt_set_out_ccache (context, options, ccache);
230 if (code != 0) {
231 handle_krb5_error (code, context, "couldn't setup credential cache");
232 goto cleanup;
233 }
234
235 code = krb5_get_init_creds_password (context, &my_creds, principal, NULL,
236 krb5_prompter_posix, 0, 0, NULL, options);
237 if (code != 0) {
238 handle_krb5_error (code, context, "couldn't authenticate as %s", name);
239 goto cleanup;
240 }
241
242 krb5_cc_close (context, ccache);
243 ccache = NULL;
244
245 result = read_file_into_variant (filename);
246 krb5_free_cred_contents (context, &my_creds);
247
248 cleanup:
249 if (filename) {
250 g_unlink (filename);
251 g_free (filename);
252 }
253
254 if (options)
255 krb5_get_init_creds_opt_free (context, options);
256 if (principal)
257 krb5_free_principal (context, principal);
258 if (ccache)
259 krb5_cc_close (context, ccache);
260 if (context)
261 krb5_free_context (context);
262 return result;
263 }
264
265 static void
266 on_diagnostics_signal (GDBusConnection *connection,
267 const gchar *sender_name,
268 const gchar *object_path,
269 const gchar *interface_name,
270 const gchar *signal_name,
271 GVariant *parameters,
272 gpointer user_data)
273 {
274 const gchar *data;
275 g_variant_get (parameters, "(&s)", &data);
276 g_printerr ("%s", data);
277 }
278
279 static void
280 connect_to_diagnostics (GDBusProxy *proxy)
281 {
282 GDBusConnection *connection;
283 const gchar *bus_name;
284 const gchar *object_path;
285
286 connection = g_dbus_proxy_get_connection (proxy);
287 bus_name = g_dbus_proxy_get_name (proxy);
288 object_path = g_dbus_proxy_get_object_path (proxy);
289
290 g_dbus_connection_signal_subscribe (connection, bus_name,
291 REALM_DBUS_DIAGNOSTICS_INTERFACE,
292 REALM_DBUS_DIAGNOSTICS_SIGNAL,
293 object_path, NULL, G_DBUS_SIGNAL_FLAGS_NONE,
294 on_diagnostics_signal, NULL, NULL);
295 }
296
297 typedef struct {
298 GAsyncResult *result;
299 GMainLoop *loop;
300 } SyncClosure;
301
302 static void
303 on_complete_get_result (GObject *source,
304 GAsyncResult *result,
305 gpointer user_data)
306 {
307 SyncClosure *sync = user_data;
308 sync->result = g_object_ref (result);
309 g_main_loop_quit (sync->loop);
310 }
311
312 static int
313 realm_join_or_leave (const gchar *string,
314 const gchar *user_name,
315 gboolean verbose,
316 gboolean join)
317 {
318 RealmDbusKerberos *realm;
319 GVariant *kerberos_cache;
320 const gchar *realm_name;
321 GError *error = NULL;
322 GVariant *options;
323 SyncClosure sync;
324 gchar *principal;
325
326 if (user_name == NULL)
327 user_name = g_get_user_name ();
328
329 /* Discover the realm */
330 realm = discover_realm_for_string (string);
331 if (realm == NULL)
332 return 1;
333
334 /* Do a kinit for the given realm */
335 realm_name = realm_dbus_kerberos_get_name (realm);
336 principal = g_strdup_printf ("%s@%s", user_name, realm_name);
337 kerberos_cache = kinit_to_kerberos_cache (principal);
338 g_free (principal);
339 if (kerberos_cache == NULL) {
340 g_object_unref (realm);
341 return 1;
342 }
343
344 sync.result = NULL;
345 sync.loop = g_main_loop_new (NULL, FALSE);
346
347 /* Setup diagnostics */
348 if (verbose)
349 connect_to_diagnostics (G_DBUS_PROXY (realm));
350
351 options = g_variant_new_array (G_VARIANT_TYPE ("{sv}"), NULL, 0);
352 g_variant_ref_sink (options);
353
354 /* Start actual operation */
355 g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (realm), G_MAXINT);
356 if (join)
357 realm_dbus_kerberos_call_enroll_with_credential_cache (realm, kerberos_cache, options,
358 NULL, on_complete_get_result,
359 &sync);
360 else
361 realm_dbus_kerberos_call_unenroll_with_credential_cache (realm, kerberos_cache, options,
362 NULL, on_complete_get_result,
363 &sync);
364
365 g_variant_unref (options);
366 g_variant_unref (kerberos_cache);
367
368 /* This mainloop is quit by on_complete_get_result */
369 g_main_loop_run (sync.loop);
370
371 if (join)
372 realm_dbus_kerberos_call_enroll_with_credential_cache_finish (realm,
373 sync.result,
374 &error);
375 else
376 realm_dbus_kerberos_call_unenroll_with_credential_cache_finish (realm,
377 sync.result,
378 &error);
379
380 g_object_unref (sync.result);
381 g_main_loop_unref (sync.loop);
382 g_object_unref (realm);
383
384 if (error != NULL) {
385 handle_error (error, join ? "couldn't join realm" : "couldn't leave realm");
386 return 1;
387 }
388
389 return 0;
390 }
391
392 static int
393 realm_list (gboolean verbose)
394 {
395 RealmDbusProvider *provider;
396 RealmDbusKerberos *realm;
397 GVariant *realms;
398 GVariant *realm_info;
399 GError *error = NULL;
400 GVariantIter iter;
401 gboolean printed = FALSE;
402
403 provider = realm_dbus_provider_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
404 G_DBUS_PROXY_FLAGS_NONE,
405 REALM_DBUS_ALL_PROVIDER_NAME,
406 REALM_DBUS_ALL_PROVIDER_PATH,
407 NULL, &error);
408 if (error != NULL) {
409 handle_error (error, "couldn't connect to realm service");
410 return 1;
411 }
412
413 realms = realm_dbus_provider_get_realms (provider);
414 g_variant_iter_init (&iter, realms);
415 while (g_variant_iter_loop (&iter, "@(sos)", &realm_info)) {
416 realm = realm_info_to_realm_proxy (realm_info);
417 if (realm != NULL) {
418 g_print ("%s: %s\n",
419 realm_dbus_kerberos_get_name (realm),
420 realm_dbus_kerberos_get_enrolled (realm) ? "enrolled" : "not enrolled");
421 g_object_unref (realm);
422 }
423 printed = TRUE;
424 }
425
426 if (verbose && !printed)
427 g_printerr ("No known realms\n");
428
429 g_object_unref (provider);
430 return 0;
431 }
432
433 int
434 main (int argc,
435 char *argv[])
436 {
437 GOptionContext *context;
438 gchar *arg_user = NULL;
439 gboolean arg_join = FALSE;
440 gboolean arg_leave = FALSE;
441 gboolean arg_verbose = FALSE;
442 GError *error = NULL;
443 gint ret = 0;
444
445 GOptionEntry option_entries[] = {
446 { "join", 'j', 0, G_OPTION_ARG_NONE, &arg_join, "Join a realm", NULL },
447 { "leave", 'l', 0, G_OPTION_ARG_NONE, &arg_leave, "Leave the realm", NULL },
448 { "user", 'U', 0, G_OPTION_ARG_STRING, &arg_user, "User name to use for enrollment", NULL },
449 { "verbose", 'v', 0, G_OPTION_ARG_NONE, &arg_verbose, "Verbose output", NULL },
450 { NULL, }
451 };
452
453 g_type_init ();
454
455 context = g_option_context_new ("realm");
456 g_option_context_add_main_entries (context, option_entries, NULL);
457
458 if (!g_option_context_parse (context, &argc, &argv, &error)) {
459 g_printerr ("%s: %s\n", g_get_prgname (), error->message);
460 g_error_free (error);
461 ret = 2;
462
463 } else if (arg_join) {
464 if (argc != 2) {
465 g_printerr ("%s: specify one realm to leave\n", g_get_prgname ());
466 ret = 2;
467 } else {
468 ret = realm_join_or_leave (argv[1], arg_user, arg_verbose, TRUE);
469 }
470
471 } else if (arg_leave) {
472 if (argc != 2) {
473 g_printerr ("%s: specify one realm to leave\n", g_get_prgname ());
474 ret = 2;
475 } else {
476 ret = realm_join_or_leave (argv[1], arg_user, arg_verbose, FALSE);
477 }
478
479 } else if (argc == 1) {
480 ret = realm_list (arg_verbose);
481
482 } else {
483 g_printerr ("%s: invalid options\n", g_get_prgname ());
484 ret = 2;
485 }
486
487 g_free (arg_user);
488 g_option_context_free (context);
489 return ret;
490 }