├── .build.yml ├── .github ├── FUNDING.yml └── issue_template.md ├── .travis.yml ├── AUTHORS ├── COPYING ├── ChangeLog ├── Makefile.am ├── NEWS ├── README ├── autogen.sh ├── configure.ac ├── doc-build ├── Makefile.am ├── README ├── mate-doc-common.in ├── meson.build ├── omf.make └── xmldocs.make ├── doc ├── Makefile.am ├── autogen.sh.example ├── mate-autogen.1 ├── mate-autogen.txt ├── mate-doc-common.1 ├── mate-doc-common.txt ├── meson.build ├── update-manpages.sh └── usage.txt ├── macros ├── Makefile.am ├── mate-autogen ├── mate-code-coverage.m4 ├── mate-common.m4 ├── mate-compiler-flags.m4 └── meson.build └── meson.build /.build.yml: -------------------------------------------------------------------------------- 1 | ########################################################## 2 | # THE FOLLOWING LINES IS USED BY docker-build 3 | ########################################################## 4 | requires: 5 | archlinux: 6 | # Useful URL: https://git.archlinux.org/svntogit/community.git/tree/mate-common 7 | - autoconf 8 | - automake 9 | - gcc 10 | - git 11 | - make 12 | 13 | debian: 14 | # Useful URL: https://github.com/mate-desktop/debian-packages 15 | # Useful URL: https://salsa.debian.org/debian-mate-team/mate-common 16 | - autoconf 17 | - git 18 | - make 19 | - xz-utils 20 | 21 | fedora: 22 | # Useful URL: https://src.fedoraproject.org/cgit/rpms/mate-common.git 23 | - autoconf 24 | - automake 25 | - gcc 26 | - git 27 | - make 28 | - redhat-rpm-config 29 | - xz 30 | 31 | ubuntu: 32 | - autoconf 33 | - git 34 | - make 35 | - xz-utils 36 | 37 | variables: 38 | - CFLAGS="-Wall -Werror=format-security" 39 | 40 | after_scripts: 41 | - make distcheck 42 | 43 | releases: 44 | draft: false 45 | prerelease: false 46 | checksum: true 47 | file_glob: true 48 | files: mate-common-*.tar.xz 49 | github_release: 50 | tags: true 51 | overwrite: true 52 | base_version: 1.20.0 53 | notify_servers: 54 | - https://release.mate-desktop.org/release 55 | 56 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | custom: https://mate-desktop.org/donate/ 10 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | #### Expected behaviour 2 | 3 | 4 | #### Actual behaviour 5 | 6 | 7 | #### Steps to reproduce the behaviour 8 | 9 | 10 | #### MATE general version 11 | 12 | 13 | #### Package version 14 | 15 | 16 | #### Linux Distribution 17 | 18 | 19 | #### Link to bugreport of your Distribution (requirement) 20 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # vim: set ts=2 sts=2 sw=2 expandtab : 2 | dist: jammy 3 | language: shell 4 | os: linux 5 | services: 6 | - docker 7 | addons: 8 | apt: 9 | packages: 10 | - python3-pip 11 | - python3-setuptools 12 | 13 | before_install: 14 | - curl -Ls -o docker-build https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/docker-build 15 | - chmod +x docker-build 16 | 17 | install: 18 | - pip3 install PyGithub 19 | - ./docker-build --name ${DISTRO} --config .build.yml --install 20 | 21 | script: 22 | - ./docker-build --name ${DISTRO} --verbose --config .build.yml --build autotools 23 | 24 | notifications: 25 | irc: 26 | if: (tag OR branch = master) AND 27 | repo = "mate-desktop/mate-common" 28 | channels: 29 | - "irc.freenode.org#mate-dev" 30 | template: 31 | - "[%{repository_name}] %{author}: %{commit_subject}" 32 | - "[%{branch}] %{commit} %{message} %{build_url}" 33 | on_success: never 34 | on_failure: always 35 | 36 | deploy: 37 | - provider: script 38 | edge: true 39 | script: ./docker-build --verbose --config .build.yml --release github 40 | on: 41 | tags: true 42 | condition: "${TRAVIS_TAG} =~ ^v.*$ && ${DISTRO} =~ ^fedora.*$" 43 | 44 | env: 45 | # - DISTRO="archlinux:latest" 46 | - DISTRO="debian:testing" 47 | - DISTRO="fedora:latest" 48 | # - DISTRO="ubuntu:rolling" 49 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Perberos 2 | Steve Zesch 3 | Stefano Karapetsas 4 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | The ChangeLog is auto-generated when releasing. If you are seeing this, use 2 | 'git log' for a detailed list of changes. 3 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = macros doc-build doc 2 | 3 | EXTRA_DIST = \ 4 | autogen.sh \ 5 | doc/usage.txt 6 | 7 | DISTCHECK_CONFIGURE_FLAGS = --disable-silent-rules 8 | 9 | # Build ChangeLog from GIT history 10 | ChangeLog: 11 | $(AM_V_GEN) if test -d $(top_srcdir)/.git; then \ 12 | GIT_DIR="$(top_srcdir)/.git" git log --stat > $@; \ 13 | fi 14 | 15 | dist: ChangeLog 16 | 17 | .PHONY: ChangeLog 18 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | ### mate-common 1.28.0 2 | 3 | * release 1.28.0 4 | 5 | ### mate-common 1.27.1 6 | 7 | * release 1.27.1 8 | 9 | ### mate-common 1.27.0 10 | 11 | * release 1.27.0 12 | 13 | ### mate-common 1.26.0 14 | 15 | * release 1.26.0 16 | 17 | ### mate-common 1.25.0 18 | 19 | * silent -Wunused-parameter for maximum warning level 20 | 21 | ### mate-common 1.24.0 22 | 23 | * bump version 24 | 25 | ### mate-common 1.23.3 26 | 27 | * update MATE_CXX_WARNINGS macro 28 | 29 | ### mate-common 1.23.2 30 | 31 | * Set compiler debug flags in MATE_DEBUG_CHECK 32 | 33 | ### mate-common 1.23.1 34 | 35 | * Check if AX_APPEND_FLAG and AX_CHECK_COMPILE_FLAG are available 36 | 37 | ### mate-common 1.23.0 38 | 39 | * update mate-compiler-flags macro 40 | 41 | ### mate-common 1.22.0 42 | 43 | * initial Travis-CI 44 | 45 | ### mate-common 1.21.0 46 | 47 | * bump version 48 | 49 | ### mate-common 1.20.0 50 | 51 | * bump version 52 | 53 | ### mate-common 1.19.0 54 | 55 | * bump version 56 | 57 | ### mate-common 1.18.0 58 | 59 | * NEWS: use consistent, project wide, markdown-like formatting 60 | to make generating release announcements easier 61 | 62 | ### mate-common 1.16.0 63 | 64 | * Check only for autoreconf in mate-autogen as autoconf, automake, 65 | libtool, gettext are already checked by autoreconf 66 | 67 | ### mate-common 1.14.0 68 | 69 | * Remove references to obsolete MATE components 70 | 71 | ### mate-common 1.12.0 72 | 73 | * Support lcov 1.12 74 | * Update docs and example script 75 | 76 | ### mate-common 1.10.0 77 | 78 | * Add support for automake 1.15 79 | * Support lcov 1.11 80 | * Check for appdata-xml.m4 with APPDATA_XML 81 | * Run glib-gettexize if using GLib gettext 82 | 83 | ### mate-common 1.8.0 84 | 85 | * Replace mate-doc-utils with yelp-tools 86 | * Cherry pick many improvements from gnome-common 87 | * Use autoreconf 88 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This directory contains sample files that should be in pretty much every 2 | MATE application. 3 | 4 | ----------------------------------------------------------------------------- 5 | 6 | To make this work both for MATE Applications inside and outside the 7 | MATE repository tree I did the following: 8 | 9 | * There is an `INSIDE_MATE_COMMON' automake conditional which is defined 10 | in two places: 11 | 12 | - macros/aclocal-includes.m4 defines this to always be false. 13 | 14 | - mate-common/configure.in does not include anything from macros and 15 | defines this to be true. 16 | 17 | * We use this automake conditional in the macros/Makefile.am to install 18 | $(MACROS), autogen.sh, mate-common.m4 and a newly created mate-macros.dep 19 | in `$(datadir)/aclocal/mate'. 20 | 21 | Since aclocal doesn't look in subdirectories we can safely install them 22 | there even when compiling from the repository. 23 | 24 | Also, there is no need to make any change to any existing application 25 | in the MATE repository tree - really fine... 26 | 27 | * When we're outside the MATE repository tree, we simply need to tell aclocal 28 | that it should also look in `$(datadir)/aclocal/mate' and it will find all 29 | the macros. 30 | 31 | There is a `mate-skel' module in the repository that can be used as a 32 | starting point when writing a new MATE application that should be used 33 | outside the repository. 34 | 35 | February 4, 1999, 36 | Martin Baulig 37 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run this to generate all the initial makefiles, etc. 3 | 4 | srcdir=`dirname $0` 5 | test -z "$srcdir" && srcdir=. 6 | 7 | REQUIRED_AUTOMAKE_VERSION=1.9 8 | 9 | PKG_NAME="mate-common" 10 | 11 | (test -f $srcdir/configure.ac) || { 12 | echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" 13 | echo " top-level $PKG_NAME directory" 14 | exit 1 15 | } 16 | 17 | . $srcdir/macros/mate-autogen 18 | 19 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.54) 2 | AC_INIT([mate-common], [1.28.0], [https://github.com/mate-desktop/mate-common]) 3 | 4 | AC_CONFIG_SRCDIR([macros/mate-autogen]) 5 | 6 | AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-xz check-news]) 7 | 8 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])]) 9 | 10 | if test -z "$enable_maintainer_mode"; then 11 | enable_maintainer_mode=yes 12 | fi 13 | 14 | AM_MAINTAINER_MODE([enable]) 15 | 16 | AC_CONFIG_FILES([ 17 | Makefile 18 | macros/Makefile 19 | doc-build/Makefile 20 | doc-build/mate-doc-common 21 | doc/Makefile 22 | ]) 23 | 24 | AC_OUTPUT 25 | -------------------------------------------------------------------------------- /doc-build/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_SCRIPTS = mate-doc-common 2 | 3 | pkgdatadir = $(datadir)/mate-common/data 4 | pkgdata_DATA = \ 5 | omf.make \ 6 | xmldocs.make 7 | 8 | EXTRA_DIST = \ 9 | omf.make \ 10 | xmldocs.make \ 11 | mate-doc-common.in \ 12 | README 13 | -------------------------------------------------------------------------------- /doc-build/README: -------------------------------------------------------------------------------- 1 | To automatically include the standard user documentation build files (omf.make 2 | and xmldocs.make) in your package, set USE_COMMON_DOC_BUILD=yes in autogen.sh 3 | before calling the macros2/autogen.sh script. 4 | 5 | When porting applications across to use this feature, ensure that all of the 6 | references to xmldocs.make are to $(top_srcdir)/xmldocs.make in the appropriate 7 | Makefile.am files. Some modules assume that xmldocs.make is in another 8 | directory (like docs/ or something). 9 | 10 | -------------------------------------------------------------------------------- /doc-build/mate-doc-common.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | progname=`echo "$0" | sed 's%^.*/%%'` 4 | 5 | PROGRAM=mate-doc-common 6 | PACKAGE=@PACKAGE@ 7 | VERSION=@VERSION@ 8 | 9 | prefix=@prefix@ 10 | datarootdir=@datarootdir@ 11 | datadir=@datadir@ 12 | 13 | # options 14 | docdir=. 15 | copy=no 16 | 17 | while test $# -gt 0; do 18 | case "$1" in 19 | --help) 20 | echo "usage: $progname [--version|--help]" 1>&2 21 | exit 1 ;; 22 | --version) 23 | echo "$PROGRAM ($PACKAGE) $VERSION" 24 | exit 0 ;; 25 | --copy) 26 | copy=yes 27 | shift ;; 28 | -*) 29 | echo "$progname: unrecognised option '$1'" 1>&2 30 | echo "usage: $progname [--version|--help]" 1>&2 31 | exit 1 ;; 32 | *) 33 | echo "$progname: too many arguments" 1>&2 34 | echo "usage: $progname [--version|--help]" 1>&2 35 | exit 1 ;; 36 | esac 37 | done 38 | 39 | for file in omf.make xmldocs.make; do 40 | rm -f $docdir/$file 41 | if test "$copy" = yes; then 42 | cp -f $datadir/$PACKAGE/data/$file $docdir/ || 43 | exit 1 44 | else 45 | ln -sf $datadir/$PACKAGE/data/$file $docdir/ || 46 | cp -f $datadir/$PACKAGE/data/$file $docdir/ || 47 | exit 1 48 | fi 49 | done 50 | -------------------------------------------------------------------------------- /doc-build/meson.build: -------------------------------------------------------------------------------- 1 | data_dir = join_paths(pkgdatadir, 'data') 2 | 3 | install_data('omf.make', 4 | install_dir : data_dir 5 | ) 6 | 7 | install_data('xmldocs.make', 8 | install_dir : data_dir 9 | ) 10 | 11 | doc_data = configuration_data() 12 | doc_data.set('PACKAGE', meson.project_name()) 13 | doc_data.set('VERSION', meson.project_version()) 14 | doc_data.set('prefix', prefix) 15 | doc_data.set('datarootdir', datadir ) 16 | doc_data.set('datadir', datadir) 17 | configure_file( 18 | input : 'mate-doc-common.in', 19 | output : 'mate-doc-common', 20 | configuration : doc_data, 21 | install : true, 22 | install_mode: ['rwxr-xr-x', 'root', 'root'], 23 | install_dir : bindir 24 | ) 25 | -------------------------------------------------------------------------------- /doc-build/omf.make: -------------------------------------------------------------------------------- 1 | # 2 | # No modifications of this Makefile should be necessary. 3 | # 4 | # This file contains the build instructions for installing OMF files. It is 5 | # generally called from the makefiles for particular formats of documentation. 6 | # 7 | # Note that you must configure your package with --localstatedir=/var 8 | # so that the scrollkeeper-update command below will update the database 9 | # in the standard scrollkeeper directory. 10 | # 11 | # If it is impossible to configure with --localstatedir=/var, then 12 | # modify the definition of scrollkeeper_localstate_dir so that 13 | # it points to the correct location. Note that you must still use 14 | # $(localstatedir) in this or when people build RPMs it will update 15 | # the real database on their system instead of the one under RPM_BUILD_ROOT. 16 | # 17 | # Note: This make file is not incorporated into xmldocs.make because, in 18 | # general, there will be other documents install besides XML documents 19 | # and the makefiles for these formats should also include this file. 20 | # 21 | # About this file: 22 | # This file was derived from scrollkeeper_example2, a package 23 | # illustrating how to install documentation and OMF files for use with 24 | # ScrollKeeper 0.3.x and 0.4.x. For more information, see: 25 | # http://scrollkeeper.sourceforge.net/ 26 | # Version: 0.1.3 (last updated: March 20, 2002) 27 | # 28 | 29 | omf_dest_dir=$(datadir)/omf/@PACKAGE@ 30 | scrollkeeper_localstate_dir = $(localstatedir)/scrollkeeper 31 | 32 | # At some point, it may be wise to change to something like this: 33 | # scrollkeeper_localstate_dir = @SCROLLKEEPER_STATEDIR@ 34 | 35 | omf: omf_timestamp 36 | 37 | omf_timestamp: $(omffile) 38 | -for file in $(omffile); do \ 39 | absfile=$(srcdir)/$$file; \ 40 | test -r $$file && absfile=$$file; \ 41 | scrollkeeper-preinstall $(docdir)/$(docname).xml $$absfile $$file.out; \ 42 | done; \ 43 | touch omf_timestamp 44 | 45 | install-data-hook-omf: 46 | $(mkinstalldirs) $(DESTDIR)$(omf_dest_dir) 47 | for file in $(omffile); do \ 48 | absfile=$(srcdir)/$$file.out; \ 49 | test -r $$file.out && absfile=$$file.out; \ 50 | $(INSTALL_DATA) $$absfile $(DESTDIR)$(omf_dest_dir)/$$file; \ 51 | done 52 | -scrollkeeper-update -p $(DESTDIR)$(scrollkeeper_localstate_dir) -o $(DESTDIR)$(omf_dest_dir) 53 | 54 | uninstall-local-omf: 55 | -for file in $(omffile); do \ 56 | basefile=`basename $$file`; \ 57 | rm -f $(DESTDIR)$(omf_dest_dir)/$$basefile; \ 58 | done 59 | -rmdir $(DESTDIR)$(omf_dest_dir) 60 | -scrollkeeper-update -p $(DESTDIR)$(scrollkeeper_localstate_dir) 61 | 62 | clean-local-omf: 63 | -for file in $(omffile); do \ 64 | rm -f $$file.out; \ 65 | done 66 | -------------------------------------------------------------------------------- /doc-build/xmldocs.make: -------------------------------------------------------------------------------- 1 | # 2 | # No modifications of this Makefile should be necessary. 3 | # 4 | # To use this template: 5 | # 1) Define: figdir, docname, lang, omffile, and entities in 6 | # your Makefile.am file for each document directory, 7 | # although figdir, omffile, and entities may be empty 8 | # 2) Make sure the Makefile in (1) also includes 9 | # "include $(top_srcdir)/xmldocs.make" and 10 | # "dist-hook: app-dist-hook". 11 | # 3) Optionally define 'entities' to hold xml entities which 12 | # you would also like installed 13 | # 4) Figures must go under $(figdir)/ and be in PNG format 14 | # 5) You should only have one document per directory 15 | # 6) Note that the figure directory, $(figdir)/, should not have its 16 | # own Makefile since this Makefile installs those figures. 17 | # 18 | # example Makefile.am: 19 | # figdir = figures 20 | # docname = scrollkeeper-manual 21 | # lang = C 22 | # omffile=scrollkeeper-manual-C.omf 23 | # entities = fdl.xml 24 | # include $(top_srcdir)/xmldocs.make 25 | # dist-hook: app-dist-hook 26 | # 27 | # About this file: 28 | # This file was taken from scrollkeeper_example2, a package illustrating 29 | # how to install documentation and OMF files for use with ScrollKeeper 30 | # 0.3.x and 0.4.x. For more information, see: 31 | # http://scrollkeeper.sourceforge.net/ 32 | # Version: 0.1.2 (last updated: March 20, 2002) 33 | # 34 | 35 | 36 | # ********** Begin of section some packagers may need to modify ********** 37 | # This variable (docdir) specifies where the documents should be installed. 38 | # This default value should work for most packages. 39 | docdir = $(datadir)/mate/help/$(docname)/$(lang) 40 | 41 | # ********** You should not have to edit below this line ********** 42 | xml_files = $(entities) $(docname).xml 43 | 44 | EXTRA_DIST = $(xml_files) $(omffile) 45 | CLEANFILES = omf_timestamp 46 | 47 | include $(top_srcdir)/omf.make 48 | 49 | all: omf 50 | 51 | $(docname).xml: $(entities) 52 | -ourdir=`pwd`; \ 53 | cd $(srcdir); \ 54 | cp $(entities) $$ourdir 55 | 56 | app-dist-hook: 57 | if test "$(figdir)"; then \ 58 | $(mkinstalldirs) $(distdir)/$(figdir); \ 59 | for file in $(srcdir)/$(figdir)/*.png; do \ 60 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ 61 | $(INSTALL_DATA) $$file $(distdir)/$(figdir)/$$basefile; \ 62 | done \ 63 | fi 64 | 65 | install-data-local: omf 66 | $(mkinstalldirs) $(DESTDIR)$(docdir) 67 | for file in $(xml_files); do \ 68 | cp $(srcdir)/$$file $(DESTDIR)$(docdir); \ 69 | done 70 | if test "$(figdir)"; then \ 71 | $(mkinstalldirs) $(DESTDIR)$(docdir)/$(figdir); \ 72 | for file in $(srcdir)/$(figdir)/*.png; do \ 73 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ 74 | $(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ 75 | done \ 76 | fi 77 | 78 | install-data-hook: install-data-hook-omf 79 | 80 | uninstall-local: uninstall-local-doc uninstall-local-omf 81 | 82 | uninstall-local-doc: 83 | -if test "$(figdir)"; then \ 84 | for file in $(srcdir)/$(figdir)/*.png; do \ 85 | basefile=`echo $$file | sed -e 's,^.*/,,'`; \ 86 | rm -f $(DESTDIR)$(docdir)/$(figdir)/$$basefile; \ 87 | done; \ 88 | rmdir $(DESTDIR)$(docdir)/$(figdir); \ 89 | fi 90 | -for file in $(xml_files); do \ 91 | rm -f $(DESTDIR)$(docdir)/$$file; \ 92 | done 93 | -rmdir $(DESTDIR)$(docdir) 94 | 95 | clean-local: clean-local-doc clean-local-omf 96 | 97 | # for non-srcdir builds, remove the copied entities. 98 | clean-local-doc: 99 | if test $(srcdir) != .; then \ 100 | rm -f $(entities); \ 101 | fi 102 | -------------------------------------------------------------------------------- /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | man_MANS = mate-autogen.1 \ 2 | mate-doc-common.1 3 | 4 | EXTRA_DIST = $(man_MANS) \ 5 | autogen.sh.example 6 | 7 | -------------------------------------------------------------------------------- /doc/autogen.sh.example: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | srcdir=`dirname $0` 4 | [ -z "$srcdir" ] && srcdir=. 5 | 6 | PKG_NAME=mate-package 7 | 8 | if [ ! -f "$srcdir/configure.ac" ]; then 9 | echo "$srcdir doesn't look like source directory for $PKG_NAME" >&2 10 | exit 1 11 | fi 12 | 13 | which mate-autogen.sh || { 14 | echo "You need to install mate-common" 15 | exit 1 16 | } 17 | 18 | . mate-autogen 19 | 20 | -------------------------------------------------------------------------------- /doc/mate-autogen.1: -------------------------------------------------------------------------------- 1 | .\"Text automatically generated by txt2man 2 | .TH mate-autogen 1 "Fri, 18 May 2012 10:52:03 +0200" "" "" 3 | .SH NAME 4 | \fBmate-autogen \fP- generates all makefiles for MATE packages 5 | .SH SYNOPSIS 6 | .nf 7 | .fam C 8 | \fBmate-autogen\fP 9 | .fam T 10 | .fi 11 | .fam T 12 | .fi 13 | .SH DESCRIPTION 14 | \fBmate-autogen\fP generates all makefiles for MATE packages 15 | .PP 16 | To make use of the common autogen script, create a stub autogen.sh 17 | script in your module. Take the example in 18 | autogen.sh.example file in mate-common documentation folder 19 | .SH SEE ALSO 20 | \fBautoconf\fP(1), \fBautomake\fP(1), \fBautoreconf\fP(1), \fBmate-doc-common\fP(1) 21 | .SH AUTHOR 22 | Perberos 23 | -------------------------------------------------------------------------------- /doc/mate-autogen.txt: -------------------------------------------------------------------------------- 1 | NAME 2 | mate-autogen - generates all makefiles for MATE packages 3 | SYNOPSIS 4 | mate-autogen 5 | DESCRIPTION 6 | mate-autogen generates all makefiles for MATE packages 7 | 8 | To make use of the common autogen script, create a stub autogen.sh 9 | script in your module. Take the example in 10 | autogen.sh.example file in mate-common documentation folder 11 | SEE ALSO 12 | autoconf(1), automake(1), autoreconf(1), mate-doc-common(1) 13 | AUTHOR 14 | Perberos 15 | -------------------------------------------------------------------------------- /doc/mate-doc-common.1: -------------------------------------------------------------------------------- 1 | .\"Text automatically generated by txt2man 2 | .TH mate-doc-common 1 "Fri, 18 May 2012 10:52:03 +0200" "" "" 3 | .SH NAME 4 | \fBmate-doc-common \fP- include the standard user documentation build files 5 | .SH SYNOPSIS 6 | .nf 7 | .fam C 8 | \fBmate-doc-common\fP 9 | .fam T 10 | .fi 11 | .fam T 12 | .fi 13 | .SH DESCRIPTION 14 | This script is used by mate-autogen to include the standard user 15 | documentation build files in a MATE package. 16 | .PP 17 | To automatically include the standard user documentation build files (omf.make 18 | and xmldocs.make) in you package, set USE_COMMON_DOC_BUILD=yes in autogen.sh 19 | before calling the macros/autogen.sh script. 20 | .PP 21 | When porting applications across to use this feature, ensure that all of the 22 | references to xmldocs.make are to $(top_srcdir)/xmldocs.make in the appropriate 23 | Makefile.am files. Some modules assume that xmldocs.make is in another 24 | directory (like docs/ or something). 25 | .SH OPTIONS 26 | .TP 27 | .B 28 | \fB--help\fP 29 | Display the help of the script. 30 | .TP 31 | .B 32 | \fB--version\fP 33 | Show the script version. 34 | .TP 35 | .B 36 | \fB--copy\fP 37 | Copy files instead of make symlinks. 38 | .SH SEE ALSO 39 | \fBmate-autogen\fP(1) 40 | .SH AUTHOR 41 | Perberos 42 | -------------------------------------------------------------------------------- /doc/mate-doc-common.txt: -------------------------------------------------------------------------------- 1 | NAME 2 | mate-doc-common - include the standard user documentation build files 3 | SYNOPSIS 4 | mate-doc-common 5 | DESCRIPTION 6 | This script is used by mate-autogen to include the standard user 7 | documentation build files in a MATE package. 8 | 9 | To automatically include the standard user documentation build files (omf.make 10 | and xmldocs.make) in you package, set USE_COMMON_DOC_BUILD=yes in autogen.sh 11 | before calling the macros/autogen.sh script. 12 | 13 | When porting applications across to use this feature, ensure that all of the 14 | references to xmldocs.make are to $(top_srcdir)/xmldocs.make in the appropriate 15 | Makefile.am files. Some modules assume that xmldocs.make is in another 16 | directory (like docs/ or something). 17 | OPTIONS 18 | --help Display the help of the script. 19 | --version Show the script version. 20 | --copy Copy files instead of make symlinks. 21 | SEE ALSO 22 | mate-autogen(1) 23 | AUTHOR 24 | Perberos 25 | -------------------------------------------------------------------------------- /doc/meson.build: -------------------------------------------------------------------------------- 1 | man1_dir = join_paths(mm_mandir, 'man1') 2 | 3 | install_data('mate-autogen.1', 4 | install_dir : man1_dir 5 | ) 6 | 7 | install_data('mate-doc-common.1', 8 | install_dir : man1_dir 9 | ) 10 | -------------------------------------------------------------------------------- /doc/update-manpages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -x /usr/bin/txt2man ]; then 4 | 5 | txt2man \ 6 | -d "`date -R`" \ 7 | -P mate-autogen \ 8 | -t mate-autogen \ 9 | -s 1 \ 10 | mate-autogen.txt > mate-autogen.1 11 | 12 | txt2man \ 13 | -d "`date -R`" \ 14 | -P mate-doc-common \ 15 | -t mate-doc-common \ 16 | -s 1 \ 17 | mate-doc-common.txt > mate-doc-common.1 18 | 19 | else 20 | 21 | echo "Install txt2man package to update manpages" 22 | 23 | fi 24 | -------------------------------------------------------------------------------- /doc/usage.txt: -------------------------------------------------------------------------------- 1 | This module contains various files needed to bootstrap MATE modules 2 | built from git. It contains the following components: 3 | 1. A common "autogen.sh" script that can be used to configure a 4 | source directory checked out from git. 5 | 2. Some commonly used macros (quite a small set these days -- macros 6 | should be packaged with their respective modules). 7 | 3. Some files used to build user documentation. 8 | 9 | To make use of the common autogen script, create a stub autogen.sh 10 | script in your module. See the example script in autogen.sh.example 11 | file in mate-common documentation folder. 12 | 13 | Then put the following in your configure.ac or configure.in file: 14 | MATE_COMMON_INIT 15 | 16 | This macro is equivalent to the following two lines (which you can use 17 | instead if you don't want to depend on mate-common macros): 18 | AC_SUBST([ACLOCAL_AMFLAGS], ["\${ACLOCAL_FLAGS}"]) 19 | 20 | Or if you are using the AC_CONFIG_MACRO_DIR macro: 21 | AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \${ACLOCAL_FLAGS}"]) 22 | 23 | This will make sure that autoconf macros will be found when you 24 | rebuild the package without rerunning autogen.sh. 25 | 26 | -------------------------------------------------------------------------------- /macros/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Please update this variable if any new macros are created 2 | 3 | MATE2_MACROS = \ 4 | mate-common.m4 \ 5 | mate-compiler-flags.m4 \ 6 | mate-code-coverage.m4 7 | 8 | EXTRA_DIST = $(MATE2_MACROS) mate-autogen 9 | 10 | aclocaldir = $(datadir)/aclocal 11 | aclocal_DATA = $(MATE2_MACROS) 12 | 13 | bin_SCRIPTS = mate-autogen 14 | -------------------------------------------------------------------------------- /macros/mate-autogen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # mate-common - Run this to generate all the initial makefiles, etc. 4 | # 5 | # Copyright (C) 2011 Perberos 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | #name of package 21 | test "PKG_NAME" || PKG_NAME=Package 22 | test "$srcdir" || srcdir=. 23 | 24 | # default version requirements ... 25 | test "$REQUIRED_AUTORECONF_VERSION" || REQUIRED_AUTORECONF_VERSION=2.53 26 | test "$REQUIRED_GLIB_GETTEXT_VERSION" || REQUIRED_GLIB_GETTEXT_VERSION=2.2.0 27 | test "$REQUIRED_INTLTOOL_VERSION" || REQUIRED_INTLTOOL_VERSION=0.25 28 | test "$REQUIRED_PKG_CONFIG_VERSION" || REQUIRED_PKG_CONFIG_VERSION=0.14.0 29 | test "$REQUIRED_GTK_DOC_VERSION" || REQUIRED_GTK_DOC_VERSION=1.0 30 | test "$REQUIRED_DOC_COMMON_VERSION" || REQUIRED_DOC_COMMON_VERSION=1.1.0 31 | 32 | # a list of required m4 macros. Package can set an initial value 33 | test "$REQUIRED_M4MACROS" || REQUIRED_M4MACROS= 34 | test "$FORBIDDEN_M4MACROS" || FORBIDDEN_M4MACROS= 35 | 36 | # Not all echo versions allow -n, so we check what is possible. This test is 37 | # based on the one in autoconf. 38 | ECHO_C= 39 | ECHO_N= 40 | case `echo -n x` in 41 | -n*) 42 | case `echo 'x\c'` in 43 | *c*) ;; 44 | *) ECHO_C='\c';; 45 | esac;; 46 | *) 47 | ECHO_N='-n';; 48 | esac 49 | 50 | # some terminal codes ... 51 | if tty 1>/dev/null 2>&1; then 52 | boldface="`tput bold 2>/dev/null`" 53 | normal="`tput sgr0 2>/dev/null`" 54 | else 55 | boldface= 56 | normal= 57 | fi 58 | printbold() { 59 | echo $ECHO_N "$boldface" $ECHO_C 60 | echo "$@" 61 | echo $ECHO_N "$normal" $ECHO_C 62 | } 63 | printerr() { 64 | echo "$@" >&2 65 | } 66 | 67 | # Usage: 68 | # compare_versions MIN_VERSION ACTUAL_VERSION 69 | # returns true if ACTUAL_VERSION >= MIN_VERSION 70 | compare_versions() { 71 | ch_min_version=$1 72 | ch_actual_version=$2 73 | ch_status=0 74 | IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." 75 | set $ch_actual_version 76 | for ch_min in $ch_min_version; do 77 | ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes 78 | if [ -z "$ch_min" ]; then break; fi 79 | if [ -z "$ch_cur" ]; then ch_status=1; break; fi 80 | if [ $ch_cur -gt $ch_min ]; then break; fi 81 | if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi 82 | done 83 | IFS="$ch_save_IFS" 84 | return $ch_status 85 | } 86 | 87 | # Usage: 88 | # version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE 89 | # checks to see if the package is available 90 | version_check() { 91 | vc_package=$1 92 | vc_variable=$2 93 | vc_checkprogs=$3 94 | vc_min_version=$4 95 | vc_source=$5 96 | vc_status=1 97 | local ${vc_variable}_VERSION 98 | 99 | vc_checkprog=`eval echo "\\$$vc_variable"` 100 | if [ -n "$vc_checkprog" ]; then 101 | printbold "using $vc_checkprog for $vc_package" 102 | return 0 103 | fi 104 | 105 | printbold "checking for $vc_package >= $vc_min_version..." 106 | for vc_checkprog in $vc_checkprogs; do 107 | echo $ECHO_N " testing $vc_checkprog... " $ECHO_C 108 | if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then 109 | vc_actual_version=`$vc_checkprog --version | head -n 1 | \ 110 | sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'` 111 | if compare_versions $vc_min_version $vc_actual_version; then 112 | echo "found $vc_actual_version" 113 | # set variables 114 | eval "$vc_variable=$vc_checkprog; \ 115 | ${vc_variable}_VERSION=$vc_actual_version" 116 | vc_status=0 117 | break 118 | else 119 | echo "too old (found version $vc_actual_version)" 120 | fi 121 | else 122 | echo "not found." 123 | fi 124 | done 125 | if [ "$vc_status" != 0 ]; then 126 | printerr "***Error***: You must have $vc_package >= $vc_min_version installed" 127 | printerr " to build $PKG_NAME. Download the appropriate package for" 128 | printerr " from your distribution or get the source tarball at" 129 | printerr " $vc_source" 130 | printerr 131 | exit $vc_status 132 | fi 133 | return $vc_status 134 | } 135 | 136 | # Usage: 137 | # require_m4macro filename.m4 138 | # adds filename.m4 to the list of required macros 139 | require_m4macro() { 140 | case "$REQUIRED_M4MACROS" in 141 | $1\ * | *\ $1\ * | *\ $1) ;; 142 | *) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;; 143 | esac 144 | } 145 | 146 | forbid_m4macro() { 147 | case "$FORBIDDEN_M4MACROS" in 148 | $1\ * | *\ $1\ * | *\ $1) ;; 149 | *) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;; 150 | esac 151 | } 152 | 153 | # Usage: 154 | # add_to_cm_macrodirs dirname 155 | # Adds the dir to $cm_macrodirs, if it's not there yet. 156 | add_to_cm_macrodirs() { 157 | case $cm_macrodirs in 158 | "$1 "* | *" $1 "* | *" $1") ;; 159 | *) cm_macrodirs="$cm_macrodirs $1";; 160 | esac 161 | } 162 | 163 | # Usage: 164 | # print_m4macros_error 165 | # Prints an error message saying that autoconf macros were misused 166 | print_m4macros_error() { 167 | printerr "***Error***: some autoconf macros required to build $PKG_NAME" 168 | printerr " were not found in your aclocal path, or some forbidden" 169 | printerr " macros were found. Perhaps you need to adjust your" 170 | printerr " ACLOCAL_FLAGS?" 171 | printerr 172 | } 173 | 174 | # Usage: 175 | # check_m4macros 176 | # Checks that all the requested macro files are in the aclocal macro path 177 | # Uses REQUIRED_M4MACROS and ACLOCAL variables. 178 | check_m4macros() { 179 | # construct list of macro directories 180 | cm_macrodirs=`aclocal --print-ac-dir` 181 | # aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9 182 | # but it contains only Automake's own macros, so we can ignore it. 183 | 184 | # Read the dirlist file 185 | if [ -s $cm_macrodirs/dirlist ]; then 186 | cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist` 187 | if [ -n "$cm_dirlist" ] ; then 188 | for cm_dir in $cm_dirlist; do 189 | if [ -d $cm_dir ]; then 190 | add_to_cm_macrodirs $cm_dir 191 | fi 192 | done 193 | fi 194 | fi 195 | 196 | # Parse $ACLOCAL_FLAGS 197 | set - $ACLOCAL_FLAGS 198 | while [ $# -gt 0 ]; do 199 | if [ "$1" = "-I" ]; then 200 | add_to_cm_macrodirs "$2" 201 | shift 202 | fi 203 | shift 204 | done 205 | 206 | cm_status=0 207 | if [ -n "$REQUIRED_M4MACROS" ]; then 208 | printbold "Checking for required M4 macros..." 209 | # check that each macro file is in one of the macro dirs 210 | for cm_macro in $REQUIRED_M4MACROS; do 211 | cm_macrofound=false 212 | for cm_dir in $cm_macrodirs; do 213 | if [ -f "$cm_dir/$cm_macro" ]; then 214 | cm_macrofound=true 215 | break 216 | fi 217 | # The macro dir in Cygwin environments may contain a file 218 | # called dirlist containing other directories to look in. 219 | if [ -f "$cm_dir/dirlist" ]; then 220 | for cm_otherdir in `cat $cm_dir/dirlist`; do 221 | if [ -f "$cm_otherdir/$cm_macro" ]; then 222 | cm_macrofound=true 223 | break 224 | fi 225 | done 226 | fi 227 | done 228 | if $cm_macrofound; then 229 | : 230 | else 231 | printerr " $cm_macro not found" 232 | cm_status=1 233 | fi 234 | done 235 | fi 236 | if [ "$cm_status" != 0 ]; then 237 | print_m4macros_error 238 | exit $cm_status 239 | fi 240 | if [ -n "$FORBIDDEN_M4MACROS" ]; then 241 | printbold "Checking for forbidden M4 macros..." 242 | # check that each macro file is in one of the macro dirs 243 | for cm_macro in $FORBIDDEN_M4MACROS; do 244 | cm_macrofound=false 245 | for cm_dir in $cm_macrodirs; do 246 | if [ -f "$cm_dir/$cm_macro" ]; then 247 | cm_macrofound=true 248 | break 249 | fi 250 | done 251 | if $cm_macrofound; then 252 | printerr " $cm_macro found (should be cleared from macros dir)" 253 | cm_status=1 254 | fi 255 | done 256 | fi 257 | if [ "$cm_status" != 0 ]; then 258 | print_m4macros_error 259 | exit $cm_status 260 | fi 261 | } 262 | 263 | # try to catch the case where the macros/ directory hasn't been cleared out. 264 | forbid_m4macro mate-cxx-check.m4 265 | 266 | want_glib_gettext=false 267 | want_intltool=false 268 | want_pkg_config=false 269 | want_gtk_doc=false 270 | want_yelp_tools=false 271 | want_maintainer_mode=false 272 | 273 | version_check autoreconf AUTORECONF 'autoreconf' $REQUIRED_AUTORECONF_VERSION \ 274 | "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTORECONF_VERSION.tar.gz" 275 | 276 | find_configure_files() { 277 | configure_ac= 278 | if test -f "$1/configure.ac"; then 279 | configure_ac="$1/configure.ac" 280 | elif test -f "$1/configure.in"; then 281 | configure_ac="$1/configure.in" 282 | fi 283 | if test "x$configure_ac" != x; then 284 | echo "$configure_ac" 285 | autoconf -t 'AC_CONFIG_SUBDIRS:$1' "$configure_ac" | while read dir; do 286 | find_configure_files "$1/$dir" 287 | done 288 | fi 289 | } 290 | 291 | configure_files="`find_configure_files .`" 292 | 293 | for configure_ac in $configure_files; do 294 | dirname=`dirname $configure_ac` 295 | if [ -f $dirname/NO-AUTO-GEN ]; then 296 | echo skipping $dirname -- flagged as no auto-gen 297 | continue 298 | fi 299 | if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then 300 | want_glib_gettext=true 301 | fi 302 | if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null || 303 | grep "^IT_PROG_INTLTOOL" $configure_ac >/dev/null; then 304 | want_intltool=true 305 | fi 306 | if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then 307 | want_pkg_config=true 308 | fi 309 | if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then 310 | want_gtk_doc=true 311 | fi 312 | if grep "^YELP_HELP_INIT" $configure_ac >/dev/null; then 313 | want_yelp_tools=true 314 | fi 315 | 316 | # check that AM_MAINTAINER_MODE is used 317 | if grep "^AM_MAINTAINER_MODE" $configure_ac >/dev/null; then 318 | want_maintainer_mode=true 319 | fi 320 | 321 | if grep "^APPDATA_XML" $configure_ac >/dev/null; then 322 | require_m4macro appdata-xml.m4 323 | fi 324 | 325 | # check to make sure mate-common macros can be found ... 326 | if grep "^MATE_COMMON_INIT" $configure_ac >/dev/null || 327 | grep "^MATE_DEBUG_CHECK" $configure_ac >/dev/null || 328 | grep "^MATE_MAINTAINER_MODE_DEFINES" $configure_ac >/dev/null; then 329 | require_m4macro mate-common.m4 330 | fi 331 | if grep "^MATE_COMPILE_WARNINGS" $configure_ac >/dev/null || 332 | grep "^MATE_CXX_WARNINGS" $configure_ac >/dev/null; then 333 | require_m4macro mate-compiler-flags.m4 334 | fi 335 | if grep "^MATE_CODE_COVERAGE" $configure_ac >/dev/null; then 336 | require_m4macro mate-code-coverage.m4 337 | fi 338 | done 339 | 340 | if $want_glib_gettext; then 341 | version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \ 342 | "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz" 343 | require_m4macro glib-gettext.m4 344 | fi 345 | 346 | if $want_intltool; then 347 | version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \ 348 | "https://launchpad.net/intltool/+download" 349 | require_m4macro intltool.m4 350 | fi 351 | 352 | if $want_pkg_config; then 353 | version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \ 354 | "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz" 355 | require_m4macro pkg.m4 356 | fi 357 | 358 | if $want_gtk_doc; then 359 | version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \ 360 | "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" 361 | require_m4macro gtk-doc.m4 362 | fi 363 | 364 | if $want_yelp_tools; then 365 | require_m4macro yelp.m4 366 | fi 367 | 368 | if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then 369 | version_check mate-common DOC_COMMON mate-doc-common \ 370 | $REQUIRED_DOC_COMMON_VERSION " " 371 | fi 372 | 373 | check_m4macros 374 | 375 | if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then 376 | printerr "**Warning**: I am going to run \`configure' with no arguments." 377 | printerr "If you wish to pass any to it, please specify them on the" 378 | printerr \`$0\'" command line." 379 | printerr 380 | fi 381 | 382 | topdir=`pwd` 383 | for configure_ac in $configure_files; do 384 | dirname=`dirname $configure_ac` 385 | basename=`basename $configure_ac` 386 | if [ -f $dirname/NO-AUTO-GEN ]; then 387 | echo skipping $dirname -- flagged as no auto-gen 388 | elif [ ! -w $dirname ]; then 389 | echo skipping $dirname -- directory is read only 390 | else 391 | printbold "Processing $configure_ac" 392 | cd $dirname 393 | 394 | # if the AC_CONFIG_MACRO_DIR() macro is used, create that directory 395 | # This is a automake bug fixed in automake 1.13.2 396 | # See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13514 397 | m4dir=`autoconf --trace 'AC_CONFIG_MACRO_DIR:$1'` 398 | if [ -n "$m4dir" ]; then 399 | mkdir -p $m4dir 400 | fi 401 | 402 | if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then 403 | printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages." 404 | echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1 405 | fi 406 | 407 | if grep "^GTK_DOC_CHECK" $basename >/dev/null; then 408 | printbold "Running $GTKDOCIZE..." 409 | $GTKDOCIZE --copy || exit 1 410 | fi 411 | 412 | if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then 413 | printbold "Running mate-doc-common..." 414 | mate-doc-common --copy || exit 1 415 | fi 416 | 417 | if grep "^AC_PROG_INTLTOOL" $basename >/dev/null || 418 | grep "^IT_PROG_INTLTOOL" $basename >/dev/null; then 419 | printbold "Running $INTLTOOLIZE..." 420 | $INTLTOOLIZE --force --copy --automake || exit 1 421 | fi 422 | # Now that all the macros are sorted, run autoreconf ... 423 | printbold "Running autoreconf..." 424 | autoreconf --verbose --force --install -Wno-portability || exit 1 425 | 426 | cd "$topdir" 427 | fi 428 | done 429 | 430 | conf_flags="" 431 | 432 | if $want_maintainer_mode; then 433 | conf_flags="--enable-maintainer-mode" 434 | fi 435 | 436 | if test x$NOCONFIGURE = x; then 437 | printbold Running $srcdir/configure $conf_flags "$@" ... 438 | $srcdir/configure $conf_flags "$@" \ 439 | && echo Now type \`make\' to compile $PKG_NAME || exit 1 440 | else 441 | echo Skipping configure process. 442 | fi 443 | -------------------------------------------------------------------------------- /macros/mate-code-coverage.m4: -------------------------------------------------------------------------------- 1 | dnl **Based on GNOME's code coverage** 2 | dnl MATE_CODE_COVERAGE 3 | dnl 4 | dnl Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be 5 | dnl included in the CFLAGS and LIBS/LDFLAGS variables of every build target 6 | dnl (program or library) which should be built with code coverage support. 7 | dnl Also defines MATE_CODE_COVERAGE_RULES which should be substituted in your 8 | dnl Makefile; and $enable_code_coverage which can be used in subsequent 9 | dnl configure output. 10 | dnl 11 | dnl Note that all optimisation flags in CFLAGS must be disabled when code 12 | dnl coverage is enabled. 13 | dnl 14 | dnl Derived from Makefile.decl in GLib, originally licenced under LGPLv2.1+. 15 | dnl This file is licenced under LGPLv2.1+. 16 | dnl 17 | dnl Usage example: 18 | dnl configure.ac: 19 | dnl MATE_CODE_COVERAGE 20 | dnl 21 | dnl Makefile.am: 22 | dnl @MATE_CODE_COVERAGE_RULES@ 23 | dnl my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) … 24 | dnl my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) … 25 | dnl 26 | dnl This results in a “check-code-coverage” rule being added to any Makefile.am 27 | dnl which includes “@MATE_CODE_COVERAGE_RULES@” (assuming the module has been 28 | dnl configured with --enable-code-coverage). Running `make check-code-coverage` 29 | dnl in that directory will run the module’s test suite (`make check`) and build 30 | dnl a code coverage report detailing the code which was touched, then print the 31 | dnl URI for the report. 32 | 33 | AC_DEFUN([MATE_CODE_COVERAGE],[ 34 | dnl Check for --enable-code-coverage 35 | AC_MSG_CHECKING([whether to build with code coverage support]) 36 | AC_ARG_ENABLE([code-coverage], AS_HELP_STRING([--enable-code-coverage], [Whether to enable code coverage support]),, enable_code_coverage=no) 37 | AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes]) 38 | AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage]) 39 | AC_MSG_RESULT($enable_code_coverage) 40 | 41 | AS_IF([ test "$enable_code_coverage" = "yes" ], [ 42 | dnl Check if gcc is being used 43 | AS_IF([ test "$GCC" = "no" ], [ 44 | AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) 45 | ]) 46 | 47 | # List of supported lcov versions. 48 | lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" 49 | 50 | AC_CHECK_PROG([LCOV], [lcov], [lcov]) 51 | AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) 52 | 53 | AS_IF([ test "$LCOV" ], [ 54 | AC_CACHE_CHECK([for lcov version], mate_cv_lcov_version, [ 55 | mate_cv_lcov_version=invalid 56 | lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` 57 | for lcov_check_version in $lcov_version_list; do 58 | if test "$lcov_version" = "$lcov_check_version"; then 59 | mate_cv_lcov_version="$lcov_check_version (ok)" 60 | fi 61 | done 62 | ]) 63 | ], [ 64 | lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" 65 | AC_MSG_ERROR([$lcov_msg]) 66 | ]) 67 | 68 | case $mate_cv_lcov_version in 69 | ""|invalid[)] 70 | lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." 71 | AC_MSG_ERROR([$lcov_msg]) 72 | LCOV="exit 0;" 73 | ;; 74 | esac 75 | 76 | AS_IF([ test -z "$GENHTML" ], [ 77 | AC_MSG_ERROR([Could not find genhtml from the lcov package]) 78 | ]) 79 | 80 | dnl Build the code coverage flags 81 | CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" 82 | CODE_COVERAGE_LDFLAGS="-lgcov" 83 | 84 | AC_SUBST([CODE_COVERAGE_CFLAGS]) 85 | AC_SUBST([CODE_COVERAGE_LDFLAGS]) 86 | ]) 87 | 88 | MATE_CODE_COVERAGE_RULES=' 89 | # Code coverage 90 | # 91 | # Optional: 92 | # - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting. 93 | # (Default: $(top_builddir)) 94 | # - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated 95 | # by lcov for code coverage. (Default: 96 | # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info) 97 | # - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage 98 | # reports to be created. (Default: 99 | # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage) 100 | # - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance. 101 | # (Default: empty) 102 | # - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml 103 | # instance. (Default: empty) 104 | # - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore 105 | # 106 | # The generated report will be titled using the $(PACKAGE_NAME) and 107 | # $(PACKAGE_VERSION). In order to add the current git hash to the title, 108 | # use the git-version-gen script, available online. 109 | 110 | # Optional variables 111 | CODE_COVERAGE_DIRECTORY ?= $(top_builddir) 112 | CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info 113 | CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage 114 | CODE_COVERAGE_LCOV_OPTIONS ?= 115 | CODE_COVERAGE_GENHTML_OPTIONS ?= 116 | CODE_COVERAGE_IGNORE_PATTERN ?= 117 | 118 | code_coverage_quiet = $(code_coverage_quiet_$(V)) 119 | code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY)) 120 | code_coverage_quiet_0 = --quiet 121 | 122 | # Use recursive makes in order to ignore errors during check 123 | check-code-coverage: 124 | ifeq ($(CODE_COVERAGE_ENABLED),yes) 125 | -$(MAKE) $(AM_MAKEFLAGS) -k check 126 | $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture 127 | else 128 | @echo "Need to reconfigure with --enable-code-coverage" 129 | endif 130 | 131 | # Capture code coverage data 132 | code-coverage-capture: code-coverage-capture-hook 133 | ifeq ($(CODE_COVERAGE_ENABLED),yes) 134 | $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS) 135 | $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" 136 | -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp 137 | LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) 138 | @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" 139 | else 140 | @echo "Need to reconfigure with --enable-code-coverage" 141 | endif 142 | 143 | # Hook rule executed before code-coverage-capture, overridable by the user 144 | code-coverage-capture-hook: 145 | 146 | ifeq ($(CODE_COVERAGE_ENABLED),yes) 147 | clean: code-coverage-clean 148 | code-coverage-clean: 149 | -$(LCOV) --directory $(top_builddir) -z 150 | -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) 151 | -find . -name "*.gcda" -o -name "*.gcov" -delete 152 | endif 153 | 154 | GITIGNOREFILES ?= 155 | GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) 156 | 157 | DISTCHECK_CONFIGURE_FLAGS ?= 158 | DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage 159 | 160 | .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean 161 | ' 162 | 163 | AC_SUBST([MATE_CODE_COVERAGE_RULES]) 164 | m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([MATE_CODE_COVERAGE_RULES])]) 165 | ]) 166 | -------------------------------------------------------------------------------- /macros/mate-common.m4: -------------------------------------------------------------------------------- 1 | # mate-common.m4 2 | # 3 | # Copyright (C) 2011 Perberos 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 3 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, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU 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, see . 17 | 18 | dnl MATE_COMMON_INIT 19 | 20 | AC_DEFUN([MATE_COMMON_INIT], 21 | [ 22 | dnl this macro should come after AC_CONFIG_MACRO_DIR 23 | AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0]) 24 | 25 | dnl ensure that when the Automake generated makefile calls aclocal, 26 | dnl it honours the $ACLOCAL_FLAGS environment variable 27 | ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}" 28 | if test -n "$ac_macro_dir"; then 29 | ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS" 30 | fi 31 | 32 | AC_SUBST([ACLOCAL_AMFLAGS]) 33 | ]) 34 | 35 | AC_DEFUN([MATE_DEBUG_CHECK], 36 | [ 37 | m4_ifdef([AX_CHECK_ENABLE_DEBUG],[ 38 | AX_CHECK_ENABLE_DEBUG([ 39 | m4_default([$1],[no])],[ 40 | MATE_ENABLE_DEBUG])],[ 41 | AC_MSG_ERROR([You need to install the autoconf-archive package.]) 42 | ]) 43 | ]) 44 | 45 | dnl MATE_MAINTAINER_MODE_DEFINES () 46 | dnl define DISABLE_DEPRECATED 47 | dnl 48 | AC_DEFUN([MATE_MAINTAINER_MODE_DEFINES], 49 | [ 50 | AC_REQUIRE([AM_MAINTAINER_MODE]) 51 | 52 | DISABLE_DEPRECATED="" 53 | if test $USE_MAINTAINER_MODE = yes; then 54 | DOMAINS="G ATK PANGO GDK GDK_PIXBUF GTK MATE LIBGLADE VTE WNCK LIBSOUP" 55 | for DOMAIN in $DOMAINS; do 56 | DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES" 57 | done 58 | fi 59 | 60 | AC_SUBST(DISABLE_DEPRECATED) 61 | ]) 62 | -------------------------------------------------------------------------------- /macros/mate-compiler-flags.m4: -------------------------------------------------------------------------------- 1 | # MATE_COMPILE_WARNINGS 2 | # Turn on many useful compiler warnings 3 | # For now, only works on GCC 4 | # 5 | # Copyright (C) 2011 Perberos 6 | # 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | 20 | 21 | AC_DEFUN([MATE_COMPILE_WARNINGS],[ 22 | dnl ****************************** 23 | dnl More compiler warnings 24 | dnl ****************************** 25 | 26 | m4_ifndef([AX_CHECK_COMPILE_FLAG],[ 27 | AC_MSG_ERROR([You need to install the autoconf-archive package.]) 28 | ]) 29 | 30 | m4_ifndef([AX_APPEND_FLAG],[ 31 | AC_MSG_ERROR([You need to install the autoconf-archive package.]) 32 | ]) 33 | 34 | AC_ARG_ENABLE(compile-warnings, 35 | AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@], 36 | [Turn on compiler warnings]),, 37 | [enable_compile_warnings="m4_default([$1],[yes])"]) 38 | 39 | AC_LANG_PUSH([C]) 40 | 41 | case "$enable_compile_warnings" in 42 | no) 43 | warning_flags= 44 | ;; 45 | minimum) 46 | warning_flags="-Wall" 47 | ;; 48 | yes) 49 | warning_flags="-Wall -Wmissing-prototypes" 50 | ;; 51 | maximum|error) 52 | warning_flags="-Wall -Wmissing-prototypes -Wbad-function-cast -Wcast-align -Wextra -Wno-unused-parameter -Wformat-nonliteral -Wmissing-declarations -Wmissing-field-initializers -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Werror=format-security" 53 | if test "$enable_compile_warnings" = "error" ; then 54 | warning_flags="$warning_flags -Werror" 55 | fi 56 | ;; 57 | *) 58 | AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) 59 | ;; 60 | esac 61 | 62 | # Always pass -Werror=unknown-warning-option to get Clang to fail on bad 63 | # flags, otherwise they are always appended to the warn_cflags variable, and 64 | # Clang warns on them for every compilation unit. 65 | # If this is passed to GCC, it will explode, so the flag must be enabled 66 | # conditionally. 67 | AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ 68 | compiler_flags_test="-Werror=unknown-warning-option" 69 | ],[ 70 | compiler_flags_test="" 71 | ]) 72 | 73 | for flag in $warning_flags; do 74 | AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [WARN_CFLAGS])], [], [$compiler_flags_test], []) 75 | done 76 | 77 | AC_MSG_CHECKING(flags to pass to the C compiler $CC) 78 | AC_MSG_RESULT(${WARN_CFLAGS}) 79 | 80 | AC_LANG_POP([C]) 81 | AC_SUBST(WARN_CFLAGS) 82 | ]) 83 | 84 | dnl For C++, do basically the same thing. 85 | AC_DEFUN([MATE_CXX_WARNINGS],[ 86 | 87 | m4_ifndef([AX_CHECK_COMPILE_FLAG],[ 88 | AC_MSG_ERROR([You need to install the autoconf-archive package.]) 89 | ]) 90 | 91 | m4_ifndef([AX_APPEND_FLAG],[ 92 | AC_MSG_ERROR([You need to install the autoconf-archive package.]) 93 | ]) 94 | 95 | AC_ARG_ENABLE(cxx-warnings, 96 | AS_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes/maximum/error@:>@], 97 | [Turn on compiler warnings.]),, 98 | [enable_cxx_warnings="m4_default([$1],[yes])"]) 99 | 100 | AC_LANG_PUSH([C++]) 101 | 102 | case "$enable_cxx_warnings" in 103 | no) 104 | warning_flags= 105 | ;; 106 | minimum) 107 | warning_flags="-Wall" 108 | ;; 109 | yes) 110 | warning_flags="-Wall -Woverloaded-virtual" 111 | ;; 112 | maximum|error) 113 | warning_flags="-Wall -Woverloaded-virtual -Wextra -Wshadow -Wformat-nonliteral -Werror=format-security -Wno-unused-parameter -Wpointer-arith -Wcast-align -Wmissing-declarations -Wredundant-decls" 114 | if test "$enable_compile_warnings" = "error" ; then 115 | warning_flags="$warning_flags -Werror" 116 | fi 117 | ;; 118 | *) 119 | AC_MSG_ERROR(Unknown argument '$enable_cxx_warnings' to --enable-cxx-warnings) 120 | ;; 121 | esac 122 | 123 | # Always pass -Werror=unknown-warning-option to get Clang to fail on bad 124 | # flags, otherwise they are always appended to the warn_cflags variable, and 125 | # Clang warns on them for every compilation unit. 126 | # If this is passed to GCC, it will explode, so the flag must be enabled 127 | # conditionally. 128 | AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ 129 | compiler_flags_test="-Werror=unknown-warning-option" 130 | ],[ 131 | compiler_flags_test="" 132 | ]) 133 | 134 | for flag in $warning_flags; do 135 | AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [WARN_CXXFLAGS])], [], [$compiler_flags_test], []) 136 | done 137 | 138 | AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler) 139 | AC_MSG_RESULT(${WARN_CXXFLAGS}) 140 | 141 | AC_LANG_POP([C++]) 142 | AC_SUBST(WARN_CXXFLAGS) 143 | ]) 144 | -------------------------------------------------------------------------------- /macros/meson.build: -------------------------------------------------------------------------------- 1 | install_data('mate-code-coverage.m4', 2 | install_dir : aclocaldir 3 | ) 4 | 5 | install_data('mate-common.m4', 6 | install_dir : aclocaldir 7 | ) 8 | 9 | install_data('mate-compiler-flags.m4', 10 | install_dir : aclocaldir 11 | ) 12 | 13 | install_data('mate-autogen', 14 | install_mode: ['rwxr-xr-x', 'root', 'root'], 15 | install_dir : bindir 16 | ) 17 | -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project('mate-common', 2 | version: '1.28.0', 3 | meson_version: '>=0.50.0', 4 | license: 'GPLv3+', 5 | ) 6 | 7 | prefix = get_option('prefix') 8 | datadir = join_paths([ get_option('prefix'),get_option('datadir') ]) 9 | pkgdatadir = join_paths([ get_option('prefix'),get_option('datadir'),'mate-common' ]) 10 | bindir = join_paths([ get_option('prefix'), 'bin' ]) 11 | aclocaldir = join_paths([ datadir, 'aclocal' ]) 12 | mm_mandir = join_paths(prefix, get_option('mandir')) 13 | 14 | subdir('macros') 15 | subdir('doc') 16 | subdir('doc-build') 17 | --------------------------------------------------------------------------------