Browse Source

Imported Upstream version 0.7

tags/upstream/0.7^0
Michael Biebl 12 years ago
parent
commit
a613651eee
100 changed files with 19343 additions and 3095 deletions
  1. +31
    -555
      COPYING
  2. +2212
    -0
      ChangeLog
  3. +39
    -3
      Makefile.am
  4. +85
    -7
      Makefile.in
  5. +174
    -0
      NEWS
  6. +666
    -0
      aclocal.m4
  7. +142
    -0
      compile
  8. +48
    -0
      config.h.in
  9. +2698
    -170
      configure
  10. +146
    -23
      configure.in
  11. +8
    -1
      data/Makefile.am
  12. +91
    -20
      data/Makefile.in
  13. +24
    -0
      data/org.freedesktop.PolicyKit.AuthenticationAgent.xml
  14. +1
    -1
      data/polkit.pc.in
  15. +21
    -10
      doc/Makefile.am
  16. +139
    -71
      doc/Makefile.in
  17. +37
    -54
      doc/TODO
  18. BIN
      doc/diagram-bus-model.png
  19. BIN
      doc/diagram-interaction.png
  20. +21
    -20
      doc/html/PolicyKit.8.html
  21. +31
    -30
      doc/html/PolicyKit.conf.5.html
  22. +10
    -9
      doc/html/beyond-defaults.html
  23. +0
    -144
      doc/html/ch02s03.html
  24. BIN
      doc/html/diagram-bus-model.png
  25. BIN
      doc/html/diagram-interaction.png
  26. +88
    -37
      doc/html/index.html
  27. +213
    -12
      doc/html/index.sgml
  28. +9
    -8
      doc/html/intro-define-problem.html
  29. +15
    -14
      doc/html/introduction.html
  30. +16
    -297
      doc/html/ix01.html
  31. +201
    -0
      doc/html/ix02.html
  32. +666
    -0
      doc/html/ix03.html
  33. +44
    -26
      doc/html/license.html
  34. +88
    -0
      doc/html/model-authentication-agent.html
  35. +11
    -17
      doc/html/model-concepts.html
  36. +419
    -0
      doc/html/model-theory-of-operation.html
  37. +35
    -25
      doc/html/model.html
  38. +179
    -0
      doc/html/polkit-action.1.html
  39. +196
    -0
      doc/html/polkit-auth.1.html
  40. +56
    -19
      doc/html/polkit-conf.html
  41. +18
    -17
      doc/html/polkit-config-file-validate.1.html
  42. +130
    -0
      doc/html/polkit-kit-entity.html
  43. +184
    -0
      doc/html/polkit-kit-file.html
  44. +715
    -0
      doc/html/polkit-kit-hash.html
  45. +364
    -0
      doc/html/polkit-kit-list.html
  46. +244
    -0
      doc/html/polkit-kit-memory.html
  47. +132
    -0
      doc/html/polkit-kit-message.html
  48. +210
    -0
      doc/html/polkit-kit-spawn.html
  49. +930
    -0
      doc/html/polkit-kit-string.html
  50. +158
    -0
      doc/html/polkit-kit-test.html
  51. +199
    -0
      doc/html/polkit-kit.html
  52. +19
    -18
      doc/html/polkit-policy-file-validate.1.html
  53. +41
    -33
      doc/html/polkit-polkit-action.html
  54. +601
    -0
      doc/html/polkit-polkit-authorization-constraint.html
  55. +1325
    -0
      doc/html/polkit-polkit-authorization-db.html
  56. +730
    -0
      doc/html/polkit-polkit-authorization.html
  57. +54
    -48
      doc/html/polkit-polkit-caller.html
  58. +36
    -30
      doc/html/polkit-polkit-config.html
  59. +275
    -52
      doc/html/polkit-polkit-context.html
  60. +748
    -35
      doc/html/polkit-polkit-dbus.html
  61. +167
    -31
      doc/html/polkit-polkit-error.html
  62. +114
    -75
      doc/html/polkit-polkit-grant.html
  63. +107
    -34
      doc/html/polkit-polkit-policy-cache.html
  64. +247
    -30
      doc/html/polkit-polkit-policy-default.html
  65. +284
    -40
      doc/html/polkit-polkit-policy-file-entry.html
  66. +48
    -28
      doc/html/polkit-polkit-policy-file.html
  67. +50
    -21
      doc/html/polkit-polkit-result.html
  68. +36
    -30
      doc/html/polkit-polkit-seat.html
  69. +56
    -50
      doc/html/polkit-polkit-session.html
  70. +277
    -0
      doc/html/polkit-polkit-simple.html
  71. +158
    -0
      doc/html/polkit-polkit-sysdeps.html
  72. +77
    -22
      doc/html/polkit-polkit-types.html
  73. +10
    -9
      doc/html/polkit-spec-history.html
  74. +274
    -33
      doc/html/polkit.devhelp
  75. +276
    -35
      doc/html/polkit.devhelp2
  76. +0
    -80
      doc/html/re01.html
  77. +122
    -0
      doc/html/ref-core.html
  78. +72
    -0
      doc/html/ref-design.html
  79. +84
    -0
      doc/html/ref-internal.html
  80. +0
    -47
      doc/html/rn01.html
  81. +0
    -47
      doc/html/rn02.html
  82. +0
    -47
      doc/html/rn03.html
  83. +0
    -50
      doc/html/rn04.html
  84. +0
    -46
      doc/html/rn05.html
  85. +0
    -113
      doc/html/rn05re19.html
  86. +0
    -97
      doc/html/rn05re20.html
  87. +82
    -46
      doc/html/style.css
  88. +70
    -0
      doc/html/tools-fileformats.html
  89. +4
    -5
      doc/man/Makefile.am
  90. +49
    -5
      doc/man/Makefile.in
  91. +4
    -4
      doc/man/PolicyKit.conf.xml
  92. +3
    -3
      doc/man/PolicyKit.xml
  93. +197
    -0
      doc/man/polkit-action.xml
  94. +214
    -0
      doc/man/polkit-auth.xml
  95. +1
    -1
      doc/man/polkit-config-file-validate.xml
  96. +0
    -116
      doc/man/polkit-grant.xml
  97. +0
    -92
      doc/man/polkit-list-actions.xml
  98. +1
    -1
      doc/man/polkit-policy-file-validate.xml
  99. +47
    -48
      doc/polkit-docs.xml
  100. +239
    -3
      doc/polkit-sections.txt

+ 31
- 555
COPYING View File

@@ -1,557 +1,32 @@
The PolicyKit command-line tools are licensed to you under the GNU
General Public License either version 2 of the License, or (at your
option) any later version.
Copyright (C) 2007 David Zeuthen.
All Rights Reserved.

The PolicyKit source code is licensed under the MIT/X11 license. The
license is included below.

-- BEGIN MIT/X11 License ---

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall
be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

-- END MIT/X11 License ---

The PolicyKit libraries (libpolkit, libpolkit-grant, libpolkit-dbus)
are licensed to you under your choice of the Academic Free License
version 2.1, or the GNU General Public License either version 2 of the
License, or (at your option) any later version.

Both licenses are included here. Some individual source code files
and/or binaries may be under the GPL only.

Each source code file is marked with the proper copyright information.


The Academic Free License
v. 2.1

This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work:

Licensed under the Academic Free License version 2.1

1) Grant of Copyright License. Licensor hereby grants You a
world-wide, royalty-free, non-exclusive, perpetual, sublicenseable
license to do the following:

a) to reproduce the Original Work in copies;

b) to prepare derivative works ("Derivative Works") based upon the Original Work;

c) to distribute copies of the Original Work and Derivative Works to the public;

d) to perform the Original Work publicly; and

e) to display the Original Work publicly.

2) Grant of Patent License. Licensor hereby grants You a world-wide,
royalty-free, non-exclusive, perpetual, sublicenseable license, under
patent claims owned or controlled by the Licensor that are embodied in
the Original Work as furnished by the Licensor, to make, use, sell and
offer for sale the Original Work and Derivative Works.

3) Grant of Source Code License. The term "Source Code" means the
preferred form of the Original Work for making modifications to it and
all available documentation describing how to modify the Original
Work. Licensor hereby agrees to provide a machine-readable copy of the
Source Code of the Original Work along with each copy of the Original
Work that Licensor distributes. Licensor reserves the right to satisfy
this obligation by placing a machine-readable copy of the Source Code
in an information repository reasonably calculated to permit
inexpensive and convenient access by You for as long as Licensor
continues to distribute the Original Work, and by publishing the
address of that information repository in a notice immediately
following the copyright notice that applies to the Original Work.

4) Exclusions From License Grant. Neither the names of Licensor, nor
the names of any contributors to the Original Work, nor any of their
trademarks or service marks, may be used to endorse or promote
products derived from this Original Work without express prior written
permission of the Licensor. Nothing in this License shall be deemed to
grant any rights to trademarks, copyrights, patents, trade secrets or
any other intellectual property of Licensor except as expressly stated
herein. No patent license is granted to make, use, sell or offer to
sell embodiments of any patent claims other than the licensed claims
defined in Section 2. No right is granted to the trademarks of
Licensor even if such marks are included in the Original Work. Nothing
in this License shall be interpreted to prohibit Licensor from
licensing under different terms from this License any Original Work
that Licensor otherwise would have a right to license.

5) This section intentionally omitted.

6) Attribution Rights. You must retain, in the Source Code of any
Derivative Works that You create, all copyright, patent or trademark
notices from the Source Code of the Original Work, as well as any
notices of licensing and any descriptive text identified therein as an
"Attribution Notice." You must cause the Source Code for any
Derivative Works that You create to carry a prominent Attribution
Notice reasonably calculated to inform recipients that You have
modified the Original Work.

7) Warranty of Provenance and Disclaimer of Warranty. Licensor
warrants that the copyright in and to the Original Work and the patent
rights granted herein by Licensor are owned by the Licensor or are
sublicensed to You under the terms of this License with the permission
of the contributor(s) of those copyrights and patent rights. Except as
expressly stated in the immediately proceeding sentence, the Original
Work is provided under this License on an "AS IS" BASIS and WITHOUT
WARRANTY, either express or implied, including, without limitation,
the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL
WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential
part of this License. No license to Original Work is granted hereunder
except under this disclaimer.

8) Limitation of Liability. Under no circumstances and under no legal
theory, whether in tort (including negligence), contract, or
otherwise, shall the Licensor be liable to any person for any direct,
indirect, special, incidental, or consequential damages of any
character arising as a result of this License or the use of the
Original Work including, without limitation, damages for loss of
goodwill, work stoppage, computer failure or malfunction, or any and
all other commercial damages or losses. This limitation of liability
shall not apply to liability for death or personal injury resulting
from Licensor's negligence to the extent applicable law prohibits such
limitation. Some jurisdictions do not allow the exclusion or
limitation of incidental or consequential damages, so this exclusion
and limitation may not apply to You.

9) Acceptance and Termination. If You distribute copies of the
Original Work or a Derivative Work, You must make a reasonable effort
under the circumstances to obtain the express assent of recipients to
the terms of this License. Nothing else but this License (or another
written agreement between Licensor and You) grants You permission to
create Derivative Works based upon the Original Work or to exercise
any of the rights granted in Section 1 herein, and any attempt to do
so except under the terms of this License (or another written
agreement between Licensor and You) is expressly prohibited by
U.S. copyright law, the equivalent laws of other countries, and by
international treaty. Therefore, by exercising any of the rights
granted to You in Section 1 herein, You indicate Your acceptance of
this License and all of its terms and conditions.

10) Termination for Patent Action. This License shall terminate
automatically and You may no longer exercise any of the rights granted
to You by this License as of the date You commence an action,
including a cross-claim or counterclaim, against Licensor or any
licensee alleging that the Original Work infringes a patent. This
termination provision shall not apply for an action alleging patent
infringement by combinations of the Original Work with other software
or hardware.

11) Jurisdiction, Venue and Governing Law. Any action or suit relating
to this License may be brought only in the courts of a jurisdiction
wherein the Licensor resides or in which Licensor conducts its primary
business, and under the laws of that jurisdiction excluding its
conflict-of-law provisions. The application of the United Nations
Convention on Contracts for the International Sale of Goods is
expressly excluded. Any use of the Original Work outside the scope of
this License or after its termination shall be subject to the
requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101
et seq., the equivalent laws of other countries, and international
treaty. This section shall survive the termination of this License.

12) Attorneys Fees. In any action to enforce the terms of this License
or seeking damages relating thereto, the prevailing party shall be
entitled to recover its costs and expenses, including, without
limitation, reasonable attorneys' fees and costs incurred in
connection with such action, including any appeal of such action. This
section shall survive the termination of this License.

13) Miscellaneous. This License represents the complete agreement
concerning the subject matter hereof. If any provision of this License
is held to be unenforceable, such provision shall be reformed only to
the extent necessary to make it enforceable.

14) Definition of "You" in This License. "You" throughout this
License, whether in upper or lower case, means an individual or a
legal entity exercising rights under, and complying with all of the
terms of, this License. For legal entities, "You" includes any entity
that controls, is controlled by, or is under common control with
you. For purposes of this definition, "control" means (i) the power,
direct or indirect, to cause the direction or management of such
entity, whether by contract or otherwise, or (ii) ownership of fifty
percent (50%) or more of the outstanding shares, or (iii) beneficial
ownership of such entity.

15) Right to Use. You may use the Original Work in all ways not
otherwise restricted or conditioned by this License or by law, and
Licensor promises not to interfere with or be responsible for such
uses by You.

This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights
reserved. Permission is hereby granted to copy and distribute this
license without modification. This license may not be modified without
the express written permission of its copyright owner.


END OF ACADEMIC FREE LICENSE. The following is intended to describe the essential
differences between the Academic Free License (AFL) version 1.0 and other
open source licenses:

The Academic Free License is similar to the BSD, MIT, UoI/NCSA and Apache
licenses in many respects but it is intended to solve a few problems with
those licenses.
* The AFL is written so as to make it clear what software is being
licensed (by the inclusion of a statement following the copyright notice
in the software). This way, the license functions better than a template
license. The BSD, MIT and UoI/NCSA licenses apply to unidentified software.
* The AFL contains a complete copyright grant to the software. The BSD
and Apache licenses are vague and incomplete in that respect.
* The AFL contains a complete patent grant to the software. The BSD, MIT,
UoI/NCSA and Apache licenses rely on an implied patent license and contain
no explicit patent grant.
* The AFL makes it clear that no trademark rights are granted to the
licensor's trademarks. The Apache license contains such a provision, but the
BSD, MIT and UoI/NCSA licenses do not.
* The AFL includes the warranty by the licensor that it either owns the
copyright or that it is distributing the software under a license. None of
the other licenses contain that warranty. All other warranties are disclaimed,
as is the case for the other licenses.

* The AFL is itself copyrighted (with the right granted to copy and distribute
without modification). This ensures that the owner of the copyright to the
license will control changes. The Apache license contains a copyright notice,
but the BSD, MIT and UoI/NCSA licenses do not.
--
START OF GNU GENERAL PUBLIC LICENSE
--

GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble

The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.

When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.

We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.

b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.

c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:

Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.

<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.


+ 2212
- 0
ChangeLog
File diff suppressed because it is too large
View File


+ 39
- 3
Makefile.am View File

@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in

SUBDIRS = data polkit polkit-dbus polkit-grant doc tools policy
SUBDIRS = data src polkitd doc tools policy po test

# Creating ChangeLog from git log (taken from cairo/Makefile.am):
ChangeLog: $(srcdir)/ChangeLog
@@ -19,12 +19,48 @@ $(srcdir)/ChangeLog:
echo A git checkout and git-log is required to generate this file >> $@); \
fi

if POLKIT_GCOV_ENABLED
.PHONY: ChangeLog $(srcdir)/ChangeLog coverage-report.txt
coverage-report.txt :
make -C src/kit coverage-report.txt
make -C src/polkit coverage-report.txt
make -C src/polkit-dbus coverage-report.txt
make -C src/polkit-grant coverage-report.txt
$(top_srcdir)/test/create-coverage-report.sh "PolicyKit" `cat src/kit/covered-files.txt src/polkit/covered-files.txt src/polkit-dbus/covered-files.txt src/polkit-grant/covered-files.txt` > coverage-report.txt

check-coverage: coverage-report.txt
cat coverage-report.txt
else
.PHONY: ChangeLog $(srcdir)/ChangeLog

EXTRA_DIST = HACKING mkinstalldirs ChangeLog
coverage-report.txt:
@echo "Need to reconfigure with --enable-gcov"

check-coverage:
@echo "Need to reconfigure with --enable-gcov"
endif

if POLKIT_BUILD_TESTS
install:
@echo "Cowardly refusing to install with --enable-tests."
@exit 1
endif

EXTRA_DIST = \
HACKING \
mkinstalldirs \
ChangeLog \
intltool-extract.in \
intltool-merge.in \
intltool-update.in

DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update

# xsltproc barfs on 'make distcheck'; disable for now
DISTCHECK_CONFIGURE_FLAGS=--disable-man-pages
DISTCHECK_CONFIGURE_FLAGS=--disable-man-pages --disable-gtk-doc

clean-local :
rm -f *~

+ 85
- 7
Makefile.in View File

@@ -35,8 +35,8 @@ subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
config.guess config.sub depcomp install-sh ltmain.sh missing \
mkinstalldirs
compile config.guess config.sub depcomp install-sh ltmain.sh \
missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.in
@@ -73,6 +73,7 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AR = @AR@
AUTH_LIBS = @AUTH_LIBS@
@@ -80,6 +81,8 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -90,7 +93,10 @@ CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_GLIB_CFLAGS = @DBUS_GLIB_CFLAGS@
DBUS_GLIB_LIBS = @DBUS_GLIB_LIBS@
DBUS_LIBS = @DBUS_LIBS@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
@@ -103,8 +109,11 @@ EXEEXT = @EXEEXT@
EXPAT_LIBS = @EXPAT_LIBS@
F77 = @F77@
FFLAGS = @FFLAGS@
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_LIBS = @GLIB_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_PAM = @HAVE_PAM@
HTML_DIR = @HTML_DIR@
@@ -113,6 +122,31 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLLIBS = @INTLLIBS@
INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
INTLTOOL_MERGE = @INTLTOOL_MERGE@
INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
INTLTOOL_PERL = @INTLTOOL_PERL@
INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -125,6 +159,9 @@ LT_REVISION = @LT_REVISION@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -140,15 +177,23 @@ PAM_MODULE_DIR = @PAM_MODULE_DIR@
PAM_PREFIX = @PAM_PREFIX@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POLKIT_AUTHDB = @POLKIT_AUTHDB@
POLKIT_GROUP = @POLKIT_GROUP@
POLKIT_USER = @POLKIT_USER@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
SED = @SED@
SELINUX_LIBS = @SELINUX_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
XSLTPROC = @XSLTPROC@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
@@ -201,11 +246,23 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = data polkit polkit-dbus polkit-grant doc tools policy
EXTRA_DIST = HACKING mkinstalldirs ChangeLog
SUBDIRS = data src polkitd doc tools policy po test
EXTRA_DIST = \
HACKING \
mkinstalldirs \
ChangeLog \
intltool-extract.in \
intltool-merge.in \
intltool-update.in

DISTCLEANFILES = \
intltool-extract \
intltool-merge \
intltool-update


# xsltproc barfs on 'make distcheck'; disable for now
DISTCHECK_CONFIGURE_FLAGS = --disable-man-pages
DISTCHECK_CONFIGURE_FLAGS = --disable-man-pages --disable-gtk-doc
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

@@ -548,7 +605,7 @@ check: check-recursive
all-am: Makefile config.h
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
@POLKIT_BUILD_TESTS_FALSE@install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
@@ -568,6 +625,7 @@ clean-generic:

distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)

maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -667,7 +725,27 @@ $(srcdir)/ChangeLog:
echo A git checkout and git-log is required to generate this file >> $@); \
fi

.PHONY: ChangeLog $(srcdir)/ChangeLog
@POLKIT_GCOV_ENABLED_TRUE@.PHONY: ChangeLog $(srcdir)/ChangeLog coverage-report.txt
@POLKIT_GCOV_ENABLED_TRUE@coverage-report.txt :
@POLKIT_GCOV_ENABLED_TRUE@ make -C src/kit coverage-report.txt
@POLKIT_GCOV_ENABLED_TRUE@ make -C src/polkit coverage-report.txt
@POLKIT_GCOV_ENABLED_TRUE@ make -C src/polkit-dbus coverage-report.txt
@POLKIT_GCOV_ENABLED_TRUE@ make -C src/polkit-grant coverage-report.txt
@POLKIT_GCOV_ENABLED_TRUE@ $(top_srcdir)/test/create-coverage-report.sh "PolicyKit" `cat src/kit/covered-files.txt src/polkit/covered-files.txt src/polkit-dbus/covered-files.txt src/polkit-grant/covered-files.txt` > coverage-report.txt

@POLKIT_GCOV_ENABLED_TRUE@check-coverage: coverage-report.txt
@POLKIT_GCOV_ENABLED_TRUE@ cat coverage-report.txt
@POLKIT_GCOV_ENABLED_FALSE@.PHONY: ChangeLog $(srcdir)/ChangeLog

@POLKIT_GCOV_ENABLED_FALSE@coverage-report.txt:
@POLKIT_GCOV_ENABLED_FALSE@ @echo "Need to reconfigure with --enable-gcov"

@POLKIT_GCOV_ENABLED_FALSE@check-coverage:
@POLKIT_GCOV_ENABLED_FALSE@ @echo "Need to reconfigure with --enable-gcov"

@POLKIT_BUILD_TESTS_TRUE@install:
@POLKIT_BUILD_TESTS_TRUE@ @echo "Cowardly refusing to install with --enable-tests."
@POLKIT_BUILD_TESTS_TRUE@ @exit 1

clean-local :
rm -f *~


+ 174
- 0
NEWS View File

@@ -1,3 +1,177 @@
==========
PolicyKit 0.7 "Common sense ain't common"
==========

Released on December 5th 2007.

This is the fifth release of PolicyKit. This release is mostly ABI and
API compatible with 0.6 (100% compatible for existing mechanisms). The
authorization backend has changed; authorizations gained from earlier
PolicyKit releases are no longer valid and will be ignored.

Highlights of this release:

o All code is now licensed under the MIT/X11 license

o libpolkit and libpolkit-dbus no longer depends on libglib.

o Unit test framework and coverage reporting. As of this release, 64%
of the codebase is currently tested during 'make check'.

o New system D-Bus service (activated on demand) providing the major
functionality of libpolkit.so from a mechanism point of view. This
is useful for chroot(2)'ed services like Avahi.

o A class for tracking D-Bus connections to minimize the amount
of IPC necessary. Useful for long running daemons.

o Pluggable authorization database backend.

o New API for interacting with the authorization database

o A very simple convenience API useful for (legacy) commandline tools.

o A way to specify that an implicit authorization can be one-shot
only.

o Vendor name, site and icon support in .policy files.

o Improved documentation.

o Negative authorizations.

o Bash completions for all command line tools.

Changes from PolicyKit 0.6 "There is no stopping in a red zone"

David Zeuthen (126):
add the convenience class PolKitTracker
add id's so the generated HTML has stable and predictable file names
post-release version bump
add support to PolKitTracker for also asking on pid
add C++ include guards and a new method to get pfe's by annotation
avoid including regex.h from a public header file
don't spew debug output in libpolkit-dbus
work on the docs
use the Since: tag so gtk-doc can print what symbols are new in 0.7
add docs for POLKIT_[BEGIN|END]_DECLS and also add POLKIT_GNUC_DEPRECATED
create an API for interfacing with the Authorization Database
move POLKIT_GNUC_DEPRECATED to a separate line so gtk-doc is happy
remember to set uid on PolKitSession
rewrite authorization database and polkit-grant (now known as polkit-auth)
make the authdb pluggable and add a dummy backend as an example
move all private functions into a private header file
move Linux specific code into a single file
minor build system and doc fixes
let authdb backends synthesize policy file entries
fix build with dummy backend
fix docs
fix uid retrival when getting auths from all users
use _destroy, not _unref for hash tables
rearrange the docs so all API is in one section
move authdb write functions to libpolkit-grant
provide a polkit D-Bus service that is activated on demand
remember to reset killtimer and fix an error message
avoid defining the same functions in both libpolkit and libpolkit-grant
rename revoke_if_oneshot to is_mechanism and also expose this on D-Bus
make polkit_context_is_[caller|session]_authorized() take a PolKitError
introduce one-shot authorizations
updated TODO list
add unit test framework with gcov coverage support (make check-coverage)
extend test coverage for PolKitAction
remove dead code
add tests for PolKitError
implement OOM testing
add unit tests for PolKitResult
add unit tests for PolKitSeat
add unit tests for PolKitSession
add unit tests for PolKitCaller
add unit tests for PolKitPolicyDefault
add unit tests for PolKitPolicyFileEntry
implement our own hash table with 100% test coverage
export memory mangement and hash table functions
implement polkit_hash_foreach
improve coverage of PolKitPolicyFileEntry by switching to PolKitHashTable
add unit tests for PolKitPolicyFile and add some features to PolKitHash
fix some unaligned access bugs
increase test coverage for PolKitPolicyFile
also dist test .policy files
hook up expat to use our memory handling API
add doubly-linked lists
reimplement string hashing and comparison
move all library source to a src/ directory
fix build with all library soruce in src/
add some gtk-doc to private bits to get doc coverage to 100%
add test case for PolKitError to get to 100%
use unique action names
add unit tests of PolKitPolicyCache
forgot to add src/Makefile.am
add unit tests for PolKitAuthorizationConstraint
add unit tests for PolKitAuthorization
split utility bits into a private statically linked library
also include libkit in top-level coverage report
add strsplit function
use kit_strsplit in polkit-sysdeps
add (empty, for now) tests for remaining files
add spawn function to libkit
actually include the files with the spawn functions
don't overflow when splitting a string
remove glib dependency from libpolkit.so
tweak how we do coverage reporting
also check for file descriptor leaks
fix build for dummy backend
add unit test framework to the rest of the library sources
build system fixes and refuse to install if built with --enable-tests
create /var/lib/misc on 'make install'
fix parallel build
fix a grave bug where the wrong authorizations were returned
add API for overriding defaults and make polkit-action(1) use this API.
restrict new API to the default backend only
add support for vendor, vendor_url and icon_name tags in .policy files
provide convenience functions for auth checking and port helpers to use them
require org.fd.pk.revoke to revoke auths for self if granted by someone else
export the policydir in the .pc file
add support for negative authorizations
provide a way to force a reload of all caches etc.
make PolKitAuthorization a bit more future proof by adding get_type()
define abstract Authentication Agent interface and make polkit-auth(1) use it
remove Since gtk-doc tags from the internal libkit library
fix 'make check-coverage'
make dummy backend work
add support for percent encoding/decoding and colon separated kv-lists
set errno to ENOMEM when forcibly failing an allocation
rework the .auths file format to use key/value pairs and make it future-proof
also encode \n\r\t characters
update TODO
avoid adding newline at the end of generated entry
write newline since kit_string_entry_create doesn't do that any more
add test harness for polkit-utils
fix a bug where the childs environment wasn't inherited
build with -rdynamic for maint mode and use this to print a stack trace
add (partial) test cases for polkit-authorization-db.c
relicense everything to the MIT/X11 license
avoid logging to syslog even for invalid files
only fail the Nth alloc, not all allocs greater than N
add test-friendly abstractions for getpwnam and getpwuid
fix unit tests for polkit-authorization-db.c
add .gitignore files to get test tree structure in the repo
update .gitignore files
add some more test env variables so we can bypass ConsoleKit in the tests
fix OOM handling in p-a-db.c and only invalidate the cache when necessary
add some more test cases for p-a-db.c
add a new KitString class
implement kit_hash_foreach_remove()
remove glib dep from libpolkit-dbus
fix a bug where KitList elements were not properly freed
downgrade to session scope when granting authorizations for blank passwords
don't require .policy files for auth lookups
refactor constraints API so there is one entry per constraint in the auth file
fix dummy backend so it builds
update TODO
update TODO to mention Piter PUNK's patch
update completion + man page since polkit-auth(1) takes >1 --constraint args
update NEWS file

==========
PolicyKit 0.6 "There is no stopping in a red zone"
==========


+ 666
- 0
aclocal.m4 View File

@@ -16,6 +16,638 @@ m4_if(m4_PACKAGE_VERSION, [2.61],,
You have another version of autoconf. If you want to use that,
you should regenerate the build system entirely.], [63])])

# Copyright (C) 1995-2002 Free Software Foundation, Inc.
# Copyright (C) 2001-2003,2004 Red Hat, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
# Public License, this file may be distributed as part of a program
# that contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
#
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
#
# Modified to never use included libintl.
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
#
# Major rework to remove unused code
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
#
# Added better handling of ALL_LINGUAS from GNU gettext version
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
#
# Modified to require ngettext
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
#
# We need this here as well, since someone might use autoconf-2.5x
# to configure GLib then an older version to configure a package
# using AM_GLIB_GNU_GETTEXT
AC_PREREQ(2.53)

dnl
dnl We go to great lengths to make sure that aclocal won't
dnl try to pull in the installed version of these macros
dnl when running aclocal in the glib directory.
dnl
m4_copy([AC_DEFUN],[glib_DEFUN])
m4_copy([AC_REQUIRE],[glib_REQUIRE])
dnl
dnl At the end, if we're not within glib, we'll define the public
dnl definitions in terms of our private definitions.
dnl

# GLIB_LC_MESSAGES
#--------------------
glib_DEFUN([GLIB_LC_MESSAGES],
[AC_CHECK_HEADERS([locale.h])
if test $ac_cv_header_locale_h = yes; then
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
if test $am_cv_val_LC_MESSAGES = yes; then
AC_DEFINE(HAVE_LC_MESSAGES, 1,
[Define if your <locale.h> file defines LC_MESSAGES.])
fi
fi])

# GLIB_PATH_PROG_WITH_TEST
#----------------------------
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
/*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
if [$3]; then
ac_cv_path_$1="$ac_dir/$ac_word"
break
fi
fi
done
IFS="$ac_save_ifs"
dnl If no 4th arg is given, leave the cache variable unset,
dnl so AC_PATH_PROGS will keep looking.
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
])dnl
;;
esac])dnl
$1="$ac_cv_path_$1"
if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])

# GLIB_WITH_NLS
#-----------------
glib_DEFUN([GLIB_WITH_NLS],
dnl NLS is obligatory
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
USE_NLS=yes
AC_SUBST(USE_NLS)

gt_cv_have_gettext=no

CATOBJEXT=NONE
XGETTEXT=:
INTLLIBS=

AC_CHECK_HEADER(libintl.h,
[gt_cv_func_dgettext_libintl="no"
libintl_extra_libs=""

#
# First check in libc
#
AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
[AC_TRY_LINK([
#include <libintl.h>
],
[return !ngettext ("","", 1)],
gt_cv_func_ngettext_libc=yes,
gt_cv_func_ngettext_libc=no)
])
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
[AC_TRY_LINK([
#include <libintl.h>
],
[return !dgettext ("","")],
gt_cv_func_dgettext_libc=yes,
gt_cv_func_dgettext_libc=no)
])
fi
if test "$gt_cv_func_ngettext_libc" = "yes" ; then
AC_CHECK_FUNCS(bind_textdomain_codeset)
fi

#
# If we don't have everything we want, check in libintl
#
if test "$gt_cv_func_dgettext_libc" != "yes" \
|| test "$gt_cv_func_ngettext_libc" != "yes" \
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CHECK_LIB(intl, ngettext,
[AC_CHECK_LIB(intl, dgettext,
gt_cv_func_dgettext_libintl=yes)])])

if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
AC_MSG_CHECKING([if -liconv is needed to use gettext])
AC_MSG_RESULT([])
AC_CHECK_LIB(intl, ngettext,
[AC_CHECK_LIB(intl, dcgettext,
[gt_cv_func_dgettext_libintl=yes
libintl_extra_libs=-liconv],
:,-liconv)],
:,-liconv)
fi

#
# If we found libintl, then check in it for bind_textdomain_codeset();
# we'll prefer libc if neither have bind_textdomain_codeset(),
# and both have dgettext and ngettext
#
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
glib_save_LIBS="$LIBS"
LIBS="$LIBS -lintl $libintl_extra_libs"
unset ac_cv_func_bind_textdomain_codeset
AC_CHECK_FUNCS(bind_textdomain_codeset)
LIBS="$glib_save_LIBS"

if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
gt_cv_func_dgettext_libc=no
else
if test "$gt_cv_func_dgettext_libc" = "yes" \
&& test "$gt_cv_func_ngettext_libc" = "yes"; then
gt_cv_func_dgettext_libintl=no
fi
fi
fi
fi

if test "$gt_cv_func_dgettext_libc" = "yes" \
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
gt_cv_have_gettext=yes
fi
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
INTLLIBS="-lintl $libintl_extra_libs"
fi
if test "$gt_cv_have_gettext" = "yes"; then
AC_DEFINE(HAVE_GETTEXT,1,
[Define if the GNU gettext() function is already present or preinstalled.])
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
glib_save_LIBS="$LIBS"
LIBS="$LIBS $INTLLIBS"
AC_CHECK_FUNCS(dcgettext)
MSGFMT_OPTS=
AC_MSG_CHECKING([if msgfmt accepts -c])
GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: test 1.0\n"
"PO-Revision-Date: 2007-02-15 12:01+0100\n"
"Last-Translator: test <foo@bar.xx>\n"
"Language-Team: C <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
AC_SUBST(MSGFMT_OPTS)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[case $host in
*-*-solaris*)
dnl On Solaris, if bind_textdomain_codeset is in libc,
dnl GNU format message catalog is always supported,
dnl since both are added to the libc all together.
dnl Hence, we'd like to go with DATADIRNAME=share and
dnl and CATOBJEXT=.gmo in this case.
AC_CHECK_FUNC(bind_textdomain_codeset,
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
;;
*)
CATOBJEXT=.mo
DATADIRNAME=lib
;;
esac])
LIBS="$glib_save_LIBS"
INSTOBJEXT=.mo
else
gt_cv_have_gettext=no
fi
fi
])

if test "$gt_cv_have_gettext" = "yes" ; then
AC_DEFINE(ENABLE_NLS, 1,
[always defined to indicate that i18n is enabled])
fi

dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is not GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext program is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi

# We need to process the po/ directory.
POSUB=po

AC_OUTPUT_COMMANDS(
[case "$CONFIG_FILES" in *po/Makefile.in*)
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
esac])

dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done

dnl Make all variables we use known to autoconf.
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLLIBS)
AC_SUBST(PO_IN_DATADIR_TRUE)
AC_SUBST(PO_IN_DATADIR_FALSE)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])

# AM_GLIB_GNU_GETTEXT
# -------------------
# Do checks necessary for use of gettext. If a suitable implementation
# of gettext is found in either in libintl or in the C library,
# it will set INTLLIBS to the libraries needed for use of gettext
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
# on various variables needed by the Makefile.in.in installed by
# glib-gettextize.
dnl
glib_DEFUN([GLIB_GNU_GETTEXT],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
GLIB_LC_MESSAGES
GLIB_WITH_NLS

if test "$gt_cv_have_gettext" = "yes"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for presentlang in $ALL_LINGUAS; do
useit=no
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
desiredlanguages="$LINGUAS"
else
desiredlanguages="$ALL_LINGUAS"
fi
for desiredlang in $desiredlanguages; do
# Use the presentlang catalog if desiredlang is
# a. equal to presentlang, or
# b. a variant of presentlang (because in this case,
# presentlang can be used as a fallback for messages
# which are not translated in the desiredlang catalog).
case "$desiredlang" in
"$presentlang"*) useit=yes;;
esac
done
if test $useit = yes; then
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
fi
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi

dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi

dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
dnl Try to locate is.
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
fi
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
AC_SUBST(MKINSTALLDIRS)

dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
rm -f po/POTFILES
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])

# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
# -------------------------------
# Define VARIABLE to the location where catalog files will
# be installed by po/Makefile.
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
glib_save_prefix="$prefix"
glib_save_exec_prefix="$exec_prefix"
glib_save_datarootdir="$datarootdir"
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
datarootdir=`eval echo "${datarootdir}"`
if test "x$CATOBJEXT" = "x.mo" ; then
localedir=`eval echo "${libdir}/locale"`
else
localedir=`eval echo "${datadir}/locale"`
fi
prefix="$glib_save_prefix"
exec_prefix="$glib_save_exec_prefix"
datarootdir="$glib_save_datarootdir"
AC_DEFINE_UNQUOTED($1, "$localedir",
[Define the location where the catalogs will be installed])
])

dnl
dnl Now the definitions that aclocal will find
dnl
ifdef(glib_configure_in,[],[
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
])dnl

# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
#
# Create a temporary file with TEST-FILE as its contents and pass the
# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
# 0 and perform ACTION-IF-FAIL for any other exit status.
AC_DEFUN([GLIB_RUN_PROG],
[cat >conftest.foo <<_ACEOF
$2
_ACEOF
if AC_RUN_LOG([$1 conftest.foo]); then
m4_ifval([$3], [$3], [:])
m4_ifvaln([$4], [else $4])dnl
echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
fi])



dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
# serial 36 IT_PROG_INTLTOOL
AC_DEFUN([IT_PROG_INTLTOOL],
[AC_PREREQ([2.50])dnl

case "$am__api_version" in
1.[01234])
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
;;
*)
;;
esac

if test -n "$1"; then
AC_MSG_CHECKING([for intltool >= $1])

INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
[INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
]
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
fi

INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'

AC_SUBST(INTLTOOL_DESKTOP_RULE)
AC_SUBST(INTLTOOL_DIRECTORY_RULE)
AC_SUBST(INTLTOOL_KEYS_RULE)
AC_SUBST(INTLTOOL_PROP_RULE)
AC_SUBST(INTLTOOL_OAF_RULE)
AC_SUBST(INTLTOOL_PONG_RULE)
AC_SUBST(INTLTOOL_SERVER_RULE)
AC_SUBST(INTLTOOL_SHEET_RULE)
AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
AC_SUBST(INTLTOOL_UI_RULE)
AC_SUBST(INTLTOOL_XAM_RULE)
AC_SUBST(INTLTOOL_KBD_RULE)
AC_SUBST(INTLTOOL_XML_RULE)
AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
AC_SUBST(INTLTOOL_CAVES_RULE)
AC_SUBST(INTLTOOL_SCHEMAS_RULE)
AC_SUBST(INTLTOOL_THEME_RULE)
AC_SUBST(INTLTOOL_SERVICE_RULE)
AC_SUBST(INTLTOOL_POLICY_RULE)

# Use the tools built into the package, not the ones that are installed.
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')

AC_PATH_PROG(INTLTOOL_PERL, perl)
if test -z "$INTLTOOL_PERL"; then
AC_MSG_ERROR([perl not found; required for intltool])
fi
if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
AC_MSG_ERROR([perl 5.x required for intltool])
fi
if test "x$2" != "xno-xml"; then
AC_MSG_CHECKING([for XML::Parser])
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
AC_MSG_RESULT([ok])
else
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
fi
fi

# Substitute ALL_LINGUAS so we can use it in po/Makefile
AC_SUBST(ALL_LINGUAS)

# Set DATADIRNAME correctly if it is not set yet
# (copied from glib-gettext.m4)
if test -z "$DATADIRNAME"; then
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[]],
[[extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr]])],
[DATADIRNAME=share],
[case $host in
*-*-solaris*)
dnl On Solaris, if bind_textdomain_codeset is in libc,
dnl GNU format message catalog is always supported,
dnl since both are added to the libc all together.
dnl Hence, we'd like to go with DATADIRNAME=share
dnl in this case.
AC_CHECK_FUNC(bind_textdomain_codeset,
[DATADIRNAME=share], [DATADIRNAME=lib])
;;
*)
[DATADIRNAME=lib]
;;
esac])
fi
AC_SUBST(DATADIRNAME)

IT_PO_SUBDIR([po])

dnl The following is very similar to
dnl
dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
dnl
dnl with the following slight differences:
dnl - the *.in files are in ac_aux_dir,
dnl - if the file haven't changed upon reconfigure, it's not touched,
dnl - the evaluation of the third parameter enables a hack which computes
dnl the actual value of $libdir,
dnl - the user sees "executing intltool commands", instead of
dnl "creating intltool-extract" and such.
dnl
dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
dnl a reason for it.

AC_CONFIG_COMMANDS([intltool], [

for file in intltool-extract intltool-merge intltool-update; do
sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
-e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
-e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
< ${ac_aux_dir}/${file}.in > ${file}.out
if cmp -s ${file} ${file}.out 2>/dev/null; then
rm -f ${file}.out
else
mv -f ${file}.out ${file}
fi
chmod ugo+x ${file}
chmod u+w ${file}
done

],
[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])

])


# IT_PO_SUBDIR(DIRNAME)
# ---------------------
# All po subdirs have to be declared with this macro; the subdir "po" is
# declared by IT_PROG_INTLTOOL.
#
AC_DEFUN([IT_PO_SUBDIR],
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
dnl
dnl The following CONFIG_COMMANDS should be exetuted at the very end
dnl of config.status.
AC_CONFIG_COMMANDS_PRE([
AC_CONFIG_COMMANDS([$1/stamp-it], [
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
>"$1/stamp-it.tmp"
[sed '/^#/d
s/^[[].*] *//
/^[ ]*$/d
'"s|^| $ac_top_srcdir/|" \
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
]
if test ! -f "$1/Makefile"; then
AC_MSG_ERROR([$1/Makefile is not ready.])
fi
mv "$1/Makefile" "$1/Makefile.tmp"
[sed '/^POTFILES =/,/[^\\]$/ {
/^POTFILES =/!d
r $1/POTFILES
}
' "$1/Makefile.tmp" >"$1/Makefile"]
rm -f "$1/Makefile.tmp"
mv "$1/stamp-it.tmp" "$1/stamp-it"
])
])dnl
])


# deprecated macros
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
# A hint is needed for aclocal from Automake <= 1.9.4:
# AC_DEFUN([AC_PROG_INTLTOOL], ...)


# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-

# serial 51 AC_PROG_LIBTOOL
@@ -7367,6 +7999,40 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])

# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# serial 5

# AM_PROG_CC_C_O
# --------------
# Like AC_PROG_CC_C_O, but changed for automake.
AC_DEFUN([AM_PROG_CC_C_O],
[AC_REQUIRE([AC_PROG_CC_C_O])dnl
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([compile])dnl
# FIXME: we rely on the cache variable name because
# there is no other way.
set dummy $CC
ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
dnl Make sure AC_PROG_CC is never called again, or it will override our
dnl setting of CC.
m4_define([AC_PROG_CC],
[m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
])

# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-

# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005


+ 142
- 0
compile View File

@@ -0,0 +1,142 @@
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.

scriptversion=2005-05-14.22

# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.

# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.

case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]

Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.

If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.

Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
esac

ofile=
cfile=
eat=

for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done

if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi

# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`

# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15

# Run the compile.
"$@"
ret=$?

if test -f "$cofile"; then
mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
fi

rmdir "$lockdir"
exit $ret

# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:

+ 48
- 0
config.h.in View File

@@ -1,5 +1,20 @@
/* config.h.in. Generated from configure.in by autoheader. */

/* whether -export-dynamic was passed to libtool */
#undef BUILT_R_DYNAMIC

/* always defined to indicate that i18n is enabled */
#undef ENABLE_NLS

/* gettext domain */
#undef GETTEXT_PACKAGE

/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#undef HAVE_BIND_TEXTDOMAIN_CODESET

/* Define to 1 if you have the `dcgettext' function. */
#undef HAVE_DCGETTEXT

/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

@@ -9,9 +24,18 @@
/* Define to 1 if you have the `getgrouplist' function. */
#undef HAVE_GETGROUPLIST

/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT

/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H

/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES

/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H

/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

@@ -51,6 +75,15 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

/* Build test code */
#undef KIT_BUILD_TESTS

/* Defined if gcov is enabled to force a rebuild due to config.h changing */
#undef KIT_GCOV_ENABLED

/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O

/* Name of package */
#undef PACKAGE

@@ -84,6 +117,21 @@
/* Define if pam_strerror takes two arguments */
#undef PAM_STRERROR_TWO_ARGS

/* Authorization Database to use */
#undef POLKIT_AUTHDB

/* If using the default authorization database */
#undef POLKIT_AUTHDB_DEFAULT

/* If using the dummy authorization database */
#undef POLKIT_AUTHDB_DUMMY

/* Build test code */
#undef POLKIT_BUILD_TESTS

/* Defined if gcov is enabled to force a rebuild due to config.h changing */
#undef POLKIT_GCOV_ENABLED

/* Group for PolicyKit */
#undef POLKIT_GROUP



+ 2698
- 170
configure
File diff suppressed because it is too large
View File


+ 146
- 23
configure.in View File

@@ -1,8 +1,8 @@
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59c)
AC_INIT(PolicyKit, 0.6, david@fubar.dk)
AM_INIT_AUTOMAKE(PolicyKit, 0.6)
AC_INIT(PolicyKit, 0.7, david@fubar.dk)
AM_INIT_AUTOMAKE(PolicyKit, 0.7)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

@@ -25,12 +25,42 @@ AM_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_PROG_LN_S
AC_SYS_LARGEFILE
AM_PROG_CC_C_O

# Taken from dbus
AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no)
AC_ARG_ENABLE(verbose-mode, [ --enable-verbose-mode support verbose debug mode],enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE)

AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),enable_gcov=$enableval,enable_gcov=no)
AC_ARG_ENABLE(man-pages, [ --enable-man-pages build manual pages],enable_man_pages=$enableval,enable_man_pages=yes)

AM_CONDITIONAL(KIT_BUILD_TESTS, test x$enable_tests = xyes)
AM_CONDITIONAL(POLKIT_BUILD_TESTS, test x$enable_tests = xyes)
if test x$enable_tests = xyes; then
AC_DEFINE(KIT_BUILD_TESTS,1,[Build test code])
AC_DEFINE(POLKIT_BUILD_TESTS,1,[Build test code])
fi

if test x$enable_gcov = xyes; then
if test x$enable_tests = xno; then
AC_ERROR([It only makes sense to use gcov if tests are enabled.])
fi
## so that config.h changes when you toggle gcov support
AC_DEFINE_UNQUOTED(KIT_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
AC_DEFINE_UNQUOTED(POLKIT_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
fi
AM_CONDITIONAL(KIT_GCOV_ENABLED, test x$enable_gcov = xyes)
AM_CONDITIONAL(POLKIT_GCOV_ENABLED, test x$enable_gcov = xyes)

if test "${enable_verbose_mode}" != no; then
# To get -rdynamic you pass -export-dynamic to libtool.
AC_DEFINE(BUILT_R_DYNAMIC,1,[whether -export-dynamic was passed to libtool])
R_DYNAMIC_LDFLAG=-export-dynamic
else
R_DYNAMIC_LDFLAG=
fi
AC_SUBST(R_DYNAMIC_LDFLAG)