Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:AndnoVember:XFCE
xfce4-dev-tools
_service:obs_scm:xfce4-dev-tools-4.14.0.1~git.c...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:xfce4-dev-tools-4.14.0.1~git.c62f6be.obscpio of Package xfce4-dev-tools
07070100000000000081A40000000200000002000000015D503A3800000021000000000000000000000000000000000000002D00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/AUTHORSBenedikt Meurer <benny@xfce.org> 07070100000001000081A40000000200000002000000015D503A3800003B17000000000000000000000000000000000000002D00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/COPYING GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS 07070100000002000081A40000000200000002000000015D503A380000072F000000000000000000000000000000000000002D00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/HACKINGBug tracking system =================== Please use the Xfce bugtracking system at http://bugzilla.xfce.org/ to report bugs and post feature requests. Notes to developers =================== If you are a Xfce developer with write access to the Xfce git repository, and you feel like you want or need to change something in this module, do not simply commit your changes, unless its really a trivial fix. If it's a non-trivial change, discuss the change on xfce4-dev@xfce.org first. In either case, don't forget to update the ChangeLog file before you commit! Patches ======= Please submit patches to the Xfce bugtracking system or the xfce4-dev@xfce.org mailinglist. Your patch should be created with the git-format command (see man git-format) and it should follow the coding style used by the maintainer. Please send a patch against a recent version of this package. Patches against the HEAD branch are most preferable. Feature requests ================ Please send your feature requests to the Xfce bugtracking system (http://bugzilla.xfce.org, product Xfce developer tools) with a Severity of enhancement. Make sure that your feature request wasn't reported already before; requesting a feature several times won't increase the chance that it gets added. Coding Style ============ - Be sure to use the same indentation rules as the maintainer (esp. important: expand tabs). - Don't follow the philosophy "If it works, it's right" that most open source projects follow. Instead, follow the philosphy "It doesn't work unless it's right". - If you don't follow the rules above, your patches will be rejected or - in case you have write access to the Xfce repository - your changes will be reverted! Release process =============== No procedure yet, we have to figure out how to handle this module best. 07070100000003000081A40000000200000002000000015D503A3800000254000000000000000000000000000000000000003100000000xfce4-dev-tools-4.14.0.1~git.c62f6be/Makefile.am# Copyright (c) 2002-2015 # The Xfce development team. All rights reserved. # # Written for Xfce by Benedikt Meurer <benny@xfce.org>. # ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} SUBDIRS = \ m4macros \ scripts \ xdt-csource distclean-local: rm -rf *.cache *~ .PHONY: ChangeLog ChangeLog: Makefile (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp \ && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) \ || (touch ChangeLog; echo 'Git directory not found: installing possibly empty changelog.' >&2) dist-hook: ChangeLog EXTRA_DIST = \ HACKING 07070100000004000081A40000000200000002000000015D503A38000014E1000000000000000000000000000000000000002A00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/NEWS4.14.0 ====== - Bump to 4.14.0 4.13.0 ====== - Merge exo-csource modifications in xdt-csource - xdt-csource will replace exo-csource (projects using exo-csource needs to be updated) - The work started in issue #6449 but the full migration has never been done. - Remove svn support in xdt-autogen - Simplify a bit the XDT_AUTOGEN_REQUIRED_VERSION detection - Remove the check of the unused doc submodule - Remove useless macros: m4macros/xdt-python.m4 and m4macros/xdt-xfce.m4 are not used - Remove xdt-commit, used to generate Changelog, now done via make distcheck - No -Wshadow flag for enable_debug=full (bug #11637). Use it only for enable_debug=yes. 4.12.0 ====== - Bump version. - Require xfce4-panel-4.11 for panel plugins. - Restore AC_REVISION. 4.11.1 ====== - Update list of files to clean with xdt-autogen - Remove definitions related to the obsolete xfce-mcs-manager - Remove obsolete check for threaded panels (<= 4.1.90) - Bump dependencies for xfce4-dev-tools and m4macros - Fix autotools m4 warning - Fix out of source building (bug #10899) - Display warning if AC_PROG_INTLTOOL is used (bug #8930) 4.11.0 ====== - Remove FORTIFY_SOURCE=2. - Some build improvements. - Correctly quote AC_COMPILE_IFELSE macro. - Avoid gnu_printf warnings in debugging in gcc 4.8. 4.10.0 ====== - Bump version. 4.9.2 ===== - Fix license. - Remove the old BM_ macros. - Use ?_VERSION for special versioned binary detection (bug #8683). - Never disable checks. 4.9.1 ===== - Add support for LT_PREREQ (bug #6920). - Remove spec file and rpm build target. - Do not create a gzip tarball. - Never use xdt-autogen in autogen.sh. 4.9.0 ===== - Fix FSF address and add missing licenses. - Only use -fstack-protector on Linux systems. - Don't use -g3 for full debugging. - Support xldscope for Sun Studio. - Skip -Wredundant-decls on OpenBSD. - Disable --as-needed on OpenBSD (bug #7546). - Use pkg-config macro for detection (bug #7787). - Port exo-csource to xdt-csource (bug #6449). 4.8.0 ===== - No changes since 4.7.4. 4.7.4 ===== - Check for glibtoolize. - Use printf instead of echo -n. - Fix typo. 4.7.3 ===== - Build ChangeLog from GIT. - Add check stage for documentation submodules. - Check for automake 1.11. - Check if $1 is a file before calling cat (bug #6101). 4.7.2 ===== - Brown bag: fix typo that breaks XDT_FEATURE_LINKER_OPTS 4.7.1 ===== - Also support the newer AC_CONFIG_HEADERS macro. - Add XDT_FEATURE_VISIBILITY to check for and enable symbol visibility support (only useful for building libraries). - Add XDT_FEATURE_LINKER_OPTS that checks for and enables useful linker optimizations if supported. This currently only checks for --as-needed and -O1, but more may be added in the future. - Beef up XDT_FEATURE_DEBUG: * Add new 'minimum' debug level, which is now the default and behaves similarly to the old 'no' default. * Debug level 'no' disables many glib/gobject-related checks and asserts (this is not really recommended). * Debug level 'full' disables code optimization. * The macro now takes an argument to specify the default debug level. 4.7.0 ===== - Do @REVISION@ and @LINGUAS@ substitutions in xdt-autogen instead of requiring people to put it in their autogen.sh files. - Also support the newer IT_PROG_INTLTOOL macro - Added --version and -V options to display the xdt-autogen version - Added ability for autogen.sh scripts to set an environment variable XDT_AUTOGEN_REQUIRED_VERSION to depend on a particular version of xdt-autogen. - Add a bunch more compiler warnings for --enable-debug, and a new macro XDT_SUPPORTED_FLAGS() that tests whether the compiler supports particular option flags. 4.6.0 ===== - Replace grep -P with awk and thus make the script more portable. Properly detect changed ChangeLogs in SVN. This should get rid the empty lines when committing several changed ChangeLogs (bug #4716). 4.5.93 ====== - Remove unreliable and not really needed intltool auto-patch. 4.5.92 ====== - Add support for git (and git-svn) to the xdt-commit script (bug 4491). 4.5.91 ====== - Don't try to patch intltool-merge.in for intltool 0.40.x: 0.40.4+ has a fix for the bug, and 0.40.x earlier than that aren't patchable as they run systemwide versions of the scripts. 4.5.90 ====== - Add intltool-merge.in patch to xdt-autogen.in to fix merging translations to .desktop keys that have dashes in them. 4.4.2 ===== - Add script (xdt-commit) for generating commit messages from ChangeLogs on the fly. - Remove trailing parens on AC_INIT version info to work around bug in intltool 0.35.x and 0.36.x. 4.4.1 ===== - No changes from 4.4.0 4.4.0 ===== - Add support for the latest GNU autotools (Bug #2755). - Make sure xgettext uses UTF-8 encoding for source files. 4.3.99.2 ======== - No changes for Xfce 4.4.0 RC2. 4.3.99.1 ======== - GCC specific compiler flags will not be used unless the compiler supports it. 4.3.90.2 ======== - Add GPL boilerplate to the installed scripts and macros. 4.3.90.1 ======== - G_DISABLE_DEPRECATED is no longer automatically added to CFLAGS in XDT_FEATURE_DEBUG(). - The version number is displayed properly now when a required package is not found in XDT_CHECK_PACKAGE(). 4.3.0 ===== - xfce4-dev-tools is a new module in SVN, which includes tools, macros and documentation for Xfce developers. 07070100000005000081A40000000200000002000000015D503A3800000262000000000000000000000000000000000000002C00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/READMEWhat is it? =========== The Xfce development tools are a collection of tools and macros for Xfce developers and people that want to build Xfce from Git In addition it contains the Xfce developer's handbook. Installation ============ The file 'INSTALL' contains generic installation instructions. How to report bugs? =================== Bugs should be reported to the Xfce bugtracking system (http://bugzilla.xfce.org, product Xfce development tools). You will need to create an account for yourself. Please read the file 'HACKING' for information on where to send changes or bugfixes for this package. 07070100000006000081ED0000000200000002000000015D503A3800000581000000000000000000000000000000000000003000000000xfce4-dev-tools-4.14.0.1~git.c62f6be/autogen.sh#!/bin/sh # # Copyright (c) 2002-2019 # The Xfce development team. All rights reserved. # # Written for Xfce by Benedikt Meurer <benny@xfce.org>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # substitute revision and date if test -d .git; then revision=$(git rev-parse --short HEAD) fi if test "x$revision" = "x"; then revision=UNKNOWN fi sed -e "s/@REVISION@/${revision}/g" < "configure.ac.in" > "configure.ac" (libtoolize && aclocal && automake --add-missing --copy --gnu && autoconf) || exit 1 test -d m4 || mkdir m4 if test x"${NOCONFIGURE}" = x""; then (./configure --enable-maintainer-mode "$@" && echo "Now type \"make\" to build.") || exit 1 else echo "Skipping configure process." fi # vi:set ts=2 sw=2 et ai: 07070100000007000081A40000000200000002000000015D503A3800000BA0000000000000000000000000000000000000003500000000xfce4-dev-tools-4.14.0.1~git.c62f6be/configure.ac.indnl dnl Copyright (c) 2002-2019 dnl The Xfce development team. All rights reserved. dnl dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>. dnl dnl *************************** dnl *** Version information *** dnl *************************** m4_define([xdt_version_major], [4]) m4_define([xdt_version_minor], [14]) m4_define([xdt_version_micro], [0]) m4_define([xdt_version_nano], []) m4_define([xdt_version_build], [@REVISION@]) m4_define([xdt_version_tag], [git]) m4_define([xdt_version], [xdt_version_major().xdt_version_minor().xdt_version_micro()ifelse(xdt_version_nano(), [], [], [.xdt_version_nano()])ifelse(xdt_version_tag(), [git], [xdt_version_tag()-xdt_version_build()], [])]) dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT dnl # YOU ARE DOING. dnl *************************** dnl *** Initialize autoconf *** dnl *************************** AC_INIT([xfce4-dev-tools], [xdt_version], [https://bugzilla.xfce.org/enter_bug.cgi?product=Xfce4-dev-tools]) AC_COPYRIGHT([Copyright (c) 2002-2019 The Xfce development team. All rights reserved.]) AC_CONFIG_MACRO_DIR([m4]) AC_REVISION([xdt_version_build]) dnl substitute version info AC_SUBST([VERSION_MAJOR], [xdt_version_major]) AC_SUBST([VERSION_MINOR], [xdt_version_minor]) AC_SUBST([VERSION_MICRO], [xdt_version_micro]) AC_SUBST([VERSION_NANO], [xdt_version_nano]) VERSION_REVISION=ifelse(xdt_version_tag(), [git], [xdt_version_tag()-xdt_version_build()], []) AC_SUBST([VERSION_REVISION]) dnl *************************** dnl *** Initialize automake *** dnl *************************** AM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar no-dist-gzip]) AM_MAINTAINER_MODE() m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl ******************************** dnl *** Check for basic programs *** dnl ******************************** AC_PROG_CC() AM_PROG_CC_C_O() AC_PROG_INSTALL() dnl The libtool version is not only used here, but also in a warning dnl in the xdt-autogen script (to not confuse developers using dnl xfce4-dev-tools). Maybe one day this warning will become obsolete, dnl then it is safe to only use the version directly in the LT_PREREQ dnl statement, until then it is necessary to define it as is. m4_define([xdt_version_libtool], [2.4]) AC_SUBST([VERSION_LIBTOOL], [xdt_version_libtool]) LT_PREREQ(xdt_version_libtool()) LT_INIT([disable-static]) dnl *************************************** dnl *** Check for standard header files *** dnl *************************************** AC_HEADER_STDC() AC_CHECK_HEADERS([libintl.h locale.h memory.h stdio.h stdlib.h string.h]) dnl *********************************** dnl *** Check for required packages *** dnl *********************************** PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.42.0]) dnl ********************** dnl *** Generate files *** dnl ********************** AC_OUTPUT([ Makefile m4macros/Makefile scripts/Makefile scripts/xdt-autogen.in xdt-csource/Makefile ]) dnl vi:set ts=2 sw=2 et ai: 07070100000008000041ED0000000200000002000000025D503A3800000000000000000000000000000000000000000000002E00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/m4macros07070100000009000081A40000000200000002000000015D503A3800000157000000000000000000000000000000000000003A00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/m4macros/Makefile.am# Copyright (c) 2002-2015 # The Xfce development team. All rights reserved. # # Written for Xfce by Benedikt Meurer <benny@xfce.org>. # macrodir = $(datadir)/xfce4/dev-tools/m4macros macro_DATA = \ xdt-depends.m4 \ xdt-features.m4 \ xdt-i18n.m4 EXTRA_DIST = \ $(macro_DATA) # vi:set ts=8 sw=8 noet ai: 0707010000000A000081A40000000200000002000000015D503A3800002993000000000000000000000000000000000000003D00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/m4macros/xdt-depends.m4dnl Copyright (c) 2002-2015 dnl The Xfce development team. All rights reserved. dnl dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License along dnl with this program; if not, write to the Free Software Foundation, Inc., dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. dnl dnl xdt-depends dnl ----------- dnl Contains M4 macros to check for software dependencies. dnl Partly based on prior work of the XDG contributors. dnl dnl We need recent a autoconf version AC_PREREQ([2.60]) dnl XDT_PROG_PKG_CONFIG() dnl dnl Checks for the freedesktop.org pkg-config dnl utility and sets the PKG_CONFIG environment dnl variable to the full path if found. dnl AC_DEFUN([XDT_PROG_PKG_CONFIG], [ # minimum supported version of pkg-config xdt_cv_PKG_CONFIG_MIN_VERSION=0.9.0 m4_ifdef([PKG_PROG_PKG_CONFIG], [ PKG_PROG_PKG_CONFIG([$xdt_cv_PKG_CONFIG_MIN_VERSION]) if test x"$PKG_CONFIG" = x""; then echo echo "*** Your version of pkg-config is too old. You need atleast" echo "*** pkg-config $xdt_cv_PKG_CONFIG_MIN_VERSION or newer. You can download pkg-config" echo "*** from the freedesktop.org software repository at" echo "***" echo "*** https://www.freedesktop.org/wiki/Software/pkg-config/" echo "***" exit 1; fi ], [ echo echo "*** The pkg-config utility could not be found on your system." echo "*** Make sure it is in your path, or set the PKG_CONFIG" echo "*** environment variable to the full path to pkg-config." echo "*** You can download pkg-config from the freedesktop.org" echo "*** software repository at" echo "***" echo "*** https://www.freedesktop.org/wiki/Software/pkg-config/" echo "***" exit 1 ]) ]) dnl XDT_CHECK_PACKAGE(varname, package, version, [action-if], [action-if-not]) dnl dnl Checks if "package" >= "version" is installed on the dnl target system, using the pkg-config utility. If the dnl dependency is met, "varname"_CFLAGS, "varname"_LIBS, dnl "varname"_VERSION and "varname"_REQUIRED_VERSION dnl will be set and marked for substition. dnl dnl "varname"_REQUIRED_VERSION will be set to the value of dnl "version". This is mostly useful to automatically dnl place the correct version information into the RPM dnl .spec file. dnl dnl In addition, if the dependency is met, "action-if" will dnl be executed if given. dnl dnl If the package check fails, "action-if-not" will be dnl executed. If this parameter isn't specified, a diagnostic dnl message will be printed and the configure script will dnl be terminated with exit code 1. dnl AC_DEFUN([XDT_CHECK_PACKAGE], [ XDT_PROG_PKG_CONFIG() AC_MSG_CHECKING([for $2 >= $3]) if $PKG_CONFIG "--atleast-version=$3" "$2" >/dev/null 2>&1; then $1_VERSION=`$PKG_CONFIG --modversion "$2"` AC_MSG_RESULT([$$1_VERSION]) AC_MSG_CHECKING([$1_CFLAGS]) $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` AC_MSG_RESULT([$$1_CFLAGS]) AC_MSG_CHECKING([$1_LIBS]) $1_LIBS=`$PKG_CONFIG --libs "$2"` AC_MSG_RESULT([$$1_LIBS]) $1_REQUIRED_VERSION=$3 AC_SUBST([$1_VERSION]) AC_SUBST([$1_CFLAGS]) AC_SUBST([$1_LIBS]) AC_SUBST([$1_REQUIRED_VERSION]) ifelse([$4], , , [$4]) elif $PKG_CONFIG --exists "$2" >/dev/null 2>&1; then xdt_cv_version=`$PKG_CONFIG --modversion "$2"` AC_MSG_RESULT([found, but $xdt_cv_version]) ifelse([$5], , [ echo "*** The required package $2 was found on your system," echo "*** but the installed version ($xdt_cv_version) is too old." echo "*** Please upgrade $2 to atleast version $3, or adjust" echo "*** the PKG_CONFIG_PATH environment variable if you installed" echo "*** the new version of the package in a nonstandard prefix so" echo "*** pkg-config is able to find it." exit 1 ], [$5]) else AC_MSG_RESULT([not found]) ifelse([$5], , [ echo "*** The required package $2 was not found on your system." echo "*** Please install $2 (atleast version $3) or adjust" echo "*** the PKG_CONFIG_PATH environment variable if you" echo "*** installed the package in a nonstandard prefix so that" echo "*** pkg-config is able to find it." exit 1 ], [$5]) fi ]) dnl XDT_CHECK_OPTIONAL_PACKAGE(varname, package, version, optionname, helpstring, [default]) dnl dnl Checks for an optional dependency on "package" >= "version". "default" dnl can be "yes" or "no" (defaults to "yes" if not specified) and controls dnl whether configure should check this dependency by default, or only if dnl the user explicitly enables it using a command line switch. dnl dnl This macro automatically adds a commandline switch based on the "optionname" dnl parameter (--enable-optionname/--disable-optionname), which allows the dnl user to explicitly control whether this optional dependency should be dnl enabled or not. The "helpstring" parameter gives a brief(!) description dnl about this dependency. dnl dnl If the user chose to enable this dependency and the required package dnl was found, this macro defines the variable "varname"_FOUND and sets it dnl to the string "yes", in addition to the 4 variables set by XDT_CHECK_PACKAGE. dnl But "varname"_FOUND will not be marked for substition. Furthermore, dnl a CPP define HAVE_"varname" will be placed in config.h (or added to dnl the cc command line, depending on your configure.ac) and set to dnl 1. dnl AC_DEFUN([XDT_CHECK_OPTIONAL_PACKAGE], [ AC_REQUIRE([XDT_PROG_PKG_CONFIG]) AC_ARG_ENABLE([$4], AC_HELP_STRING([--enable-$4], [Enable checking for $5 (default=m4_default([$6], [yes]))]) AC_HELP_STRING([--disable-$4], [Disable checking for $5]), [xdt_cv_$1_check=$enableval], [xdt_cv_$1_check=m4_default([$6], [yes])]) if test x"$xdt_cv_$1_check" = x"yes"; then if $PKG_CONFIG --exists "$2 >= $3" >/dev/null 2>&1; then XDT_CHECK_PACKAGE([$1], [$2], [$3], [ AC_DEFINE([HAVE_$1], [1], [Define if $2 >= $3 present]) $1_FOUND="yes" ]) else AC_MSG_CHECKING([for optional package $2 >= $3]) AC_MSG_RESULT([not found]) fi else AC_MSG_CHECKING([for optional package $2]) AC_MSG_RESULT([disabled]) fi AM_CONDITIONAL([HAVE_$1], [test x"$$1_FOUND" = x"yes"]) ]) dnl XDT_CHECK_LIBX11() dnl dnl Executes various checks for X11. Sets LIBX11_CFLAGS, LIBX11_LDFLAGS dnl and LIBX11_LIBS (and marks them for substitution). In addition dnl HAVE_LIBX11 is set to 1 in config.h, if the X window system and dnl the development files are detected on the target system. dnl AC_DEFUN([XDT_CHECK_LIBX11], [ AC_REQUIRE([AC_PATH_XTRA]) LIBX11_CFLAGS= LIBX11_LDFLAGS= LIBX11_LIBS= if test x"$no_x" != x"yes"; then AC_CHECK_LIB([X11], [main], [ AC_DEFINE([HAVE_LIBX11], [1], [Define if libX11 is available]) LIBX11_CFLAGS="$X_CFLAGS" for option in $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS; do case "$option" in -L*) path=`echo $option | sed 's/^-L//'` if test x"$path" != x""; then LIBX11_LDFLAGS="$LIBX11_LDFLAGS -L$path" fi ;; *) LIBX11_LIBS="$LIBX11_LIBS $option" ;; esac done if ! echo $LIBX11_LIBS | grep -- '-lX11' >/dev/null; then LIBX11_LIBS="$LIBX11_LIBS -lX11" fi ], [], [$X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS]) fi AC_SUBST([LIBX11_CFLAGS]) AC_SUBST([LIBX11_LDFLAGS]) AC_SUBST([LIBX11_LIBS]) ]) dnl XDT_CHECK_LIBX11_REQUIRE() dnl dnl Similar to XDT_CHECK_LIBX11(), but terminates with an error if dnl the X window system and development files aren't detected on the dnl target system. dnl AC_DEFUN([XDT_CHECK_LIBX11_REQUIRE], [ AC_REQUIRE([XDT_CHECK_LIBX11]) if test x"$no_x" = x"yes"; then AC_MSG_ERROR([X Window system libraries and header files are required]) fi ]) dnl XDT_CHECK_LIBSM() dnl dnl Checks whether the session management library is present on the dnl target system, and sets LIBSM_CFLAGS, LIBSM_LDFLAGS and LIBSM_LIBS dnl properly. In addition, HAVE_LIBSM will be set to 1 in config.h dnl if libSM is detected. dnl AC_DEFUN([XDT_CHECK_LIBSM], [ AC_REQUIRE([XDT_CHECK_LIBX11]) LIBSM_CFLAGS= LIBSM_LDFLAGS= LIBSM_LIBS= if test x"$no_x" != x"yes"; then AC_CHECK_LIB([SM], [SmcSaveYourselfDone], [ AC_DEFINE([HAVE_LIBSM], [1], [Define if libSM is available]) LIBSM_CFLAGS="$LIBX11_CFLAGS" LIBSM_LDFLAGS="$LIBX11_LDFLAGS" LIBSM_LIBS="$LIBX11_LIBS" if ! echo $LIBSM_LIBS | grep -- '-lSM' >/dev/null; then LIBSM_LIBS="$LIBSM_LIBS -lSM -lICE" fi ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lICE]) fi AC_SUBST([LIBSM_CFLAGS]) AC_SUBST([LIBSM_LDFLAGS]) AC_SUBST([LIBSM_LIBS]) ]) dnl XDT_CHECK_LIBXPM() dnl dnl Checks if the Xpm library is present on the target system, and dnl sets LIBXPM_CFLAGS, LIBXPM_LDFLAGS and LIBXPM_LIBS. In addition, dnl HAVE_LIBXPM will be set to 1 in config.h if libXpm is detected. dnl AC_DEFUN([XDT_CHECK_LIBXPM], [ AC_REQUIRE([XDT_CHECK_LIBX11]) LIBXPM_CFLAGS= LIBXPM_LDFLAGS= LIBXPM_LIBS= if test "$no_x" != "yes"; then AC_CHECK_LIB([Xpm], [main], [ AC_DEFINE([HAVE_LIBXPM], [1], [Define if libXpm is available]) LIBXPM_CFLAGS="$LIBX11_CFLAGS" LIBXPM_LDFLAGS="$LIBX11_LDFLAGS" LIBXPM_LIBS="$LIBX11_LIBS" if ! echo $LIBXPM_LIBS | grep -- '-lXpm' >/dev/null; then LIBXPM_LIBS="$LIBXPM_LIBS -lXpm" fi ], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lXpm]) fi AC_SUBST([LIBXPM_CFLAGS]) AC_SUBST([LIBXPM_LDFLAGS]) AC_SUBST([LIBXPM_LIBS]) ]) dnl XDT_CHECK_LIBXPM_REQUIRE() dnl dnl Similar to XDT_CHECK_LIBXPM(), but fails if the Xpm library isn't dnl present on the target system. dnl AC_DEFUN([XDT_CHECK_LIBXPM_REQUIRE], [ AC_REQUIRE([XDT_CHECK_LIBX11_REQUIRE]) AC_REQUIRE([XDT_CHECK_LIBXPM]) if test x"$LIBXPM_LIBS" = x""; then AC_MSG_ERROR([The Xpm library was not found on your system]) fi ]) 0707010000000B000081A40000000200000002000000015D503A3800001C75000000000000000000000000000000000000003E00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/m4macros/xdt-features.m4dnl Copyright (c) 2002-2015 dnl The Xfce development team. All rights reserved. dnl dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License along dnl with this program; if not, write to the Free Software Foundation, Inc., dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. dnl dnl xdt-depends dnl ----------- dnl Contains M4 macros to check for software dependencies. dnl Partly based on prior work of the XDG contributors. dnl dnl We need recent a autoconf version AC_PREREQ([2.60]) dnl XDT_SUPPORTED_FLAGS(VAR, FLAGS) dnl dnl For each token in FLAGS, checks to be sure the compiler supports dnl the flag, and if so, adds each one to VAR. dnl AC_DEFUN([XDT_SUPPORTED_FLAGS], [ for flag in $2; do AC_MSG_CHECKING([if $CC supports $flag]) saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $flag" AC_COMPILE_IFELSE([AC_LANG_SOURCE([ ])], [flag_supported=yes], [flag_supported=no]) CFLAGS="$saved_CFLAGS" AC_MSG_RESULT([$flag_supported]) if test "x$flag_supported" = "xyes"; then $1="$$1 $flag" fi done ]) dnl XDT_FEATURE_DEBUG(default_level=minimum) dnl AC_DEFUN([XDT_FEATURE_DEBUG], [ dnl weird indentation to keep output indentation correct AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@], [Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@]) AC_HELP_STRING([--disable-debug], [Include no debugging support]), [enable_debug=$enableval], [enable_debug=m4_default([$1], [minimum])]) AC_MSG_CHECKING([whether to build with debugging support]) if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then AC_DEFINE([DEBUG], [1], [Define for debugging support]) xdt_cv_additional_CFLAGS="-DXFCE_DISABLE_DEPRECATED \ -Wall -Wextra \ -Wno-missing-field-initializers \ -Wno-unused-parameter -Wold-style-definition \ -Wdeclaration-after-statement \ -Wmissing-declarations \ -Wmissing-noreturn -Wpointer-arith \ -Wcast-align -Wformat -Wformat-security -Wformat-y2k \ -Winit-self -Wmissing-include-dirs -Wundef \ -Wnested-externs" CPPFLAGS="$CPPFLAGS" if test x`uname` = x"Linux"; then xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -fstack-protector" fi dnl # signal.h inline is crapy on openbsd if test x`uname` != x"OpenBSD"; then xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -Wredundant-decls" fi if test x"$enable_debug" = x"full"; then AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support]) xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -O0 -g -Werror" CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG" AC_MSG_RESULT([full]) else xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -g -Wshadow" AC_MSG_RESULT([yes]) fi XDT_SUPPORTED_FLAGS([supported_CFLAGS], [$xdt_cv_additional_CFLAGS]) ifelse([$CXX], , , [ dnl FIXME: should test on c++ compiler, but the following line causes dnl autoconf errors for projects that don't check for a dnl c++ compiler at all. dnl AC_LANG_PUSH([C++]) dnl XDT_SUPPORTED_FLAGS([supported_CXXFLAGS], [$xdt_cv_additional_CFLAGS]) dnl AC_LANG_POP() dnl instead, just use supported_CFLAGS... supported_CXXFLAGS="$supported_CFLAGS" ]) CFLAGS="$CFLAGS $supported_CFLAGS" CXXFLAGS="$CXXFLAGS $supported_CXXFLAGS" else CPPFLAGS="$CPPFLAGS -DNDEBUG" if test x"$enable_debug" = x"no"; then CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT" AC_MSG_RESULT([no]) else AC_MSG_RESULT([minimum]) fi fi ]) dnl XDT_FEATURE_VISIBILITY() dnl dnl Checks to see if the compiler supports the 'visibility' attribute dnl If so, adds -DHAVE_GNUC_VISIBILTY to CPPFLAGS. Also sets the dnl automake conditional HAVE_GNUC_VISIBILITY. dnl AC_DEFUN([XDT_FEATURE_VISIBILITY], [ AC_ARG_ENABLE([visibility], AC_HELP_STRING([--disable-visibility], [Don't use ELF visibility attributes]), [enable_visibility=$enableval], [enable_visibility=yes]) have_gnuc_visibility=no if test "x$enable_visibility" != "xno"; then XDT_SUPPORTED_FLAGS([xdt_vis_test_cflags], [-Wall -Werror -Wno-unused-parameter]) saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $xdt_vis_test_cflags" AC_MSG_CHECKING([whether $CC supports the GNUC visibility attribute]) AC_COMPILE_IFELSE([AC_LANG_SOURCE( [ void test_default (void); void test_hidden (void); void __attribute__ ((visibility("default"))) test_default (void) {} void __attribute__ ((visibility("hidden"))) test_hidden (void) {} int main (int argc, char **argv) { test_default (); test_hidden (); return 0; } ])], [ have_gnuc_visibility=yes AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) ]) CFLAGS="$saved_CFLAGS" fi if test "x$have_gnuc_visibility" = "xyes"; then CPPFLAGS="$CPPFLAGS -DHAVE_GNUC_VISIBILITY" xdt_vis_hidden_cflags="" XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-xldscope=hidden]) if test "x$xdt_vis_hidden_cflags" = "x"; then XDT_SUPPORTED_FLAGS([xdt_vis_hidden_cflags], [-fvisibility=hidden]) fi CFLAGS="$CFLAGS $xdt_vis_hidden_cflags" fi AM_CONDITIONAL([HAVE_GNUC_VISIBILITY], [test "x$have_gnuc_visibility" = "xyes"]) ]) dnl XDT_FEATURE_LINKER_OPTS dnl dnl Checks for and enables any special linker optimizations. dnl AC_DEFUN([XDT_FEATURE_LINKER_OPTS], [ AC_ARG_ENABLE([linker-opts], AC_HELP_STRING([--disable-linker-opts], [Disable linker optimizations]), [enable_linker_opts=$enableval], [enable_linker_opts=yes]) if test "x$enable_linker_opts" != "xno"; then if test x`uname` != x"OpenBSD"; then AC_MSG_CHECKING([whether $LD accepts --as-needed]) case `$LD --as-needed -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) LDFLAGS="$LDFLAGS -Wl,--as-needed" AC_MSG_RESULT([yes]) ;; *) AC_MSG_RESULT([no]) ;; esac fi AC_MSG_CHECKING([whether $LD accepts -O1]) case `$LD -O1 -v 2>&1 </dev/null` in *GNU* | *'with BFD'*) LDFLAGS="$LDFLAGS -Wl,-O1" AC_MSG_RESULT([yes]) ;; *) AC_MSG_RESULT([no]) ;; esac fi ]) 0707010000000C000081A40000000200000002000000015D503A380000099F000000000000000000000000000000000000003A00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/m4macros/xdt-i18n.m4dnl Copyright (c) 2002-2015 dnl The Xfce development team. All rights reserved. dnl dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License along dnl with this program; if not, write to the Free Software Foundation, Inc., dnl 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. dnl dnl xdt-i18n dnl -------- dnl Internalization M4 macros. dnl dnl XDT_I18N(LINGUAS [, PACKAGE]) dnl dnl This macro takes care of setting up everything for i18n support. dnl dnl If PACKAGE isn't specified, it defaults to the package tarname; see dnl the description of AC_INIT() for an explanation of what makes up dnl the package tarname. Normally, you don't need to specify PACKAGE, dnl but you can stick with the default. dnl AC_DEFUN([XDT_I18N], [ dnl Substitute GETTEXT_PACKAGE variable GETTEXT_PACKAGE=m4_default([$2], [AC_PACKAGE_TARNAME()]) AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain]) AC_SUBST([GETTEXT_PACKAGE]) dnl gettext and stuff ALL_LINGUAS="$1" AM_GLIB_GNU_GETTEXT() dnl This is required on some Linux systems AC_CHECK_FUNC([bind_textdomain_codeset]) dnl Determine where to install locale files AC_MSG_CHECKING([for locales directory]) AC_ARG_WITH([locales-dir], [ AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR]) ], [localedir=$withval], [ if test x"$CATOBJEXT" = x".mo"; then localedir=$libdir/locale else localedir=$datadir/locale fi ]) AC_MSG_RESULT([$localedir]) AC_SUBST([localedir]) dnl Determine additional xgettext flags AC_MSG_CHECKING([for additional xgettext flags]) if test x"$XGETTEXT_ARGS" = x""; then XGETTEXT_ARGS="--keyword=Q_ --from-code=UTF-8"; else XGETTEXT_ARGS="$XGETTEXT_ARGS --keyword=Q_ --from-code=UTF-8"; fi AC_SUBST([XGETTEXT_ARGS]) AC_MSG_RESULT([$XGETTEXT_ARGS]) ]) 0707010000000D000041ED0000000200000002000000025D503A3800000000000000000000000000000000000000000000002D00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/scripts0707010000000E000081A40000000200000002000000015D503A38000001D7000000000000000000000000000000000000003900000000xfce4-dev-tools-4.14.0.1~git.c62f6be/scripts/Makefile.am# Copyright (c) 2002-2015 # The Xfce development team. All rights reserved. # # Written for Xfce by Benedikt Meurer <benny@xfce.org>. # bin_SCRIPTS = \ xdt-autogen xdt-autogen: Makefile xdt-autogen.in rm -f xdt-autogen xdt-autogen.gen sed -e 's,\@DATADIR\@,$(datadir),g' \ xdt-autogen.in \ > xdt-autogen.gen mv xdt-autogen.gen xdt-autogen CLEANFILES = \ xdt-autogen DISTCLEANFILES = \ xdt-autogen.in # vi:set ts=8 sw=8 noet ai: 0707010000000F000081A40000000200000002000000015D503A38000042CC000000000000000000000000000000000000003F00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/scripts/xdt-autogen.in.in#!/bin/sh # # Copyright (c) 2002-2010 # The Xfce development team. All rights reserved. # # Written for Xfce by Benedikt Meurer <benny@xfce.org>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # xdt-autogen - Part of the Xfce developer tools. # VERSION="@VERSION@" XDT_AUTOGEN_VERSION_MAJOR="@VERSION_MAJOR@" XDT_AUTOGEN_VERSION_MINOR="@VERSION_MINOR@" XDT_AUTOGEN_VERSION_MICRO="@VERSION_MICRO@" XDT_AUTOGEN_VERSION_NANO="@VERSION_NANO@" XDT_AUTOGEN_VERSION_REVISION="@VERSION_REVISION@" ## ## a few portability tests ## if test -z "$EGREP"; then if type egrep >/dev/null 2>&1; then EGREP=egrep else EGREP="grep -E" fi fi awk_tests="gawk mawk nawk awk" if test -z "$AWK"; then for a in $awk_tests; do if type $a >/dev/null 2>&1; then AWK=$a break fi done else if ! type $AWK >/dev/null 2>/dev/null; then unset AWK fi fi if test -z "$AWK"; then echo "xdt-autogen: The 'awk' program (one of $awk_tests) is" >&2 echo " required, but cannot be found." >&2 exit 1 fi ## ## figures out any subdirs that should be configured as a part ## of recursive configure. ## parse_configure_subdirs() { test -f "$1" && cat "$1" | tr '\\n\\t\\\\' ' ' | sed -ne 's|.*AC_CONFIG_SUBDIRS(\[\{0,1\}\([[:alnum:]_ @/-]\{1,\}\).*|\1|p' } ## ## Helper function to look up configure.{in,ac} files recursively. ## lookup_configure_ac_files() { configure_ac_file="" if test -f "$1/configure.ac"; then configure_ac_file="$1/configure.ac"; elif test -f "$1/configure.in"; then configure_ac_file="$1/configure.in"; else cat >&2 <<EOF xdt-autogen: Directory "$1" does not look like a package directory, neither configure.ac nor configure.in is present. EOF exit 1 fi test "x$configure_ac_file" != "x" && printf "%s" "$configure_ac_file " subdirs=`parse_configure_subdirs ${configure_ac_file}` for subdir in $subdirs; do lookup_configure_ac_files "$1/$subdir"; done } ## ## Helper function to look up configure.{in,ac}.in files recursively. ## lookup_configure_ac_in_files() { configure_ac_in_file="" if test -f "$1/configure.ac.in"; then configure_ac_in_file="$1/configure.ac.in"; elif test -f "$1/configure.in.in"; then configure_ac_in_file="$1/configure.in.in"; fi test "x$configure_ac_in_file" != "x" && printf "%s" "$configure_ac_in_file " subdirs=`parse_configure_subdirs ${configure_ac_in_file}` for subdir in $subdirs; do lookup_configure_ac_in_files "$1/$subdir"; done } ## ## check command-line args ## if test "x$1" = "x--version" -o "x$1" = "x-V"; then echo "`basename $0` $VERSION" exit 0 fi ## ## see if the caller is requesting a minimum version ## do_version_check() { test -z "$XDT_AUTOGEN_REQUIRED_VERSION" && return 0 major=`echo $XDT_AUTOGEN_REQUIRED_VERSION | cut -d. -f1` test "$major" || return 1 test $major -le $XDT_AUTOGEN_VERSION_MAJOR || return 1 test $XDT_AUTOGEN_VERSION_MAJOR -gt $major && return 0 minor=`echo $XDT_AUTOGEN_REQUIRED_VERSION | cut -d. -f2` test "$minor" || return 1 test $minor -le $XDT_AUTOGEN_VERSION_MINOR || return 1 test $XDT_AUTOGEN_VERSION_MINOR -gt $minor && return 0 micro=`echo $XDT_AUTOGEN_REQUIRED_VERSION | cut -d. -f3` test "$micro" || return 1 test $micro -le $XDT_AUTOGEN_VERSION_MICRO || return 1 test $XDT_AUTOGEN_VERSION_MICRO -gt $micro && return 0 return 0 } if ! do_version_check; then cat >&2 <<EOF xdt-autogen: This version of xdt-autogen ($VERSION) is too old. Version $XDT_AUTOGEN_REQUIRED_VERSION or greater is required. EOF exit 1 fi ## ## Determine XDG data dirs ## test -z "${XDG_DATA_HOME}" && XDG_DATA_HOME="${HOME}/.local/share" test -z "${XDG_DATA_DIRS}" && XDG_DATA_DIRS="/usr/local/share:/usr/share" test -d "@DATADIR@" && XDG_DATA_DIRS="@DATADIR@:${XDG_DATA_DIRS}" XDG_DATA_DIRS="${XDG_DATA_HOME}:${XDG_DATA_DIRS}" export XDG_DATA_DIRS XDG_DATA_HOME MASTER_DIR=`pwd`; test -z "${MASTER_DIR}" && MASTER_DIR="." ## ## First we do some substitutions to generate configure.{ac,in} if necessary ## CONFIGURE_AC_IN_FILES=`lookup_configure_ac_in_files "$MASTER_DIR"` for configure_ac_in_file in $CONFIGURE_AC_IN_FILES; do configure_ac_file="`echo $configure_ac_in_file | sed -e 's:\.in$::'`" # first generate a revision id if test -d .git; then revision=`git rev-parse --short HEAD` fi if test "x$revision" = "x"; then revision="UNKNOWN" fi # find out what languages we support conf_dir=`dirname $configure_ac_file` linguas=`cd "$conf_dir/po" 2>/dev/null && ls *.po 2>/dev/null | $AWK 'BEGIN { FS="."; ORS=" " } { print $1 }'` # and do the substitution tmp=`basename ${configure_ac_in_file}` cat >"$configure_ac_file" <<EOF dnl dnl This file was autogenerated from "${tmp}". dnl Edit that file instead! dnl EOF sed -e "s/@REVISION@/${revision}/g" \ -e "s/@LINGUAS@/${linguas}/g" \ < "$configure_ac_in_file" >> "$configure_ac_file" done ## ## Search for the configure.{ac,in} files ## CONFIGURE_AC_FILES=`lookup_configure_ac_files "$MASTER_DIR"` ## ## Check for a suitable make ## if test x"${MAKE}" = x""; then if (type gmake) >/dev/null 2>/dev/null; then MAKE="gmake" elif (type make) >/dev/null 2>/dev/null; then MAKE="make" else cat >&2 <<EOF xdt-autogen: You must have "make" installed on your system. EOF exit 1 fi export MAKE fi ## ## cleanup autogenerated files ## if test x"$1" = x"clean"; then for configure_ac_file in $CONFIGURE_AC_FILES; do directory=`dirname ${configure_ac_file}` echo "Running ${MAKE} distclean in ${directory}..." (cd ${directory} ; ${MAKE} distclean) >/dev/null 2>&1 echo "Cleaning generated files in ${directory}..." # determine the output files used in this package directory output_files=`tr '\\n\\t\\\\' ' ' < ${configure_ac_file} | sed -ne 's|.*AC_OUTPUT(\[\{0,1\}\([[:alnum:]_@/\. -]\{1,\}\).*|\1|p'`; for output_file in $output_files; do if test x`basename $output_file` = x"Makefile"; then rm -f "${directory}/${output_file}.in"; rm -f "${directory}/${output_file}.in.in"; fi rm -f "${directory}/${output_file}"; done (cd ${directory} ; rm -f config.* configure configure.lineno aclocal.m4 ; rm -f compile depcomp ltmain.sh missing install-sh ; rm -f po/Makefile.in.in po/stamp-it ; rm -f stamp-h1 *.spec ; rm -f mkinstalldirs libtool ; rm -rf autom4te.cache m4 gtk-doc.m4 ; rm -f intltool-* gtk-doc.make ; rm -f test-driver ; if test -f po/POTFILES.in; then rm -f po/POTFILES fi if test -f configure.ac.in -a -f configure.ac; then rm -f configure.ac elif test -f configure.in.in -a -f configure.in; then rm -f configure.in fi) # determine translations used in this package directory # translations=`tr '\\n\\\\' ' ' < ${configure_ac_file} | sed -ne 's/.*XDT_I18N(\[\{0,1\}\([a-zA-Z_@ ]\{1,\}\).*/\1/p'`; # for translation in $translations; do # rm -f "${directory}/po/${translation}.gmo"; # done rm -f ${directory}/po/*.gmo; done exit 0 fi ## ## Check for autoconf ## if test -z "${XDT_PROG_AUTOCONF}"; then test -z "${AUTOCONF_VERSION}" && i=autoconf || i=autoconf-${AUTOCONF_VERSION} (${i} --version) </dev/null >/dev/null 2>&1 && XDT_PROG_AUTOCONF=${i} fi test -z "${XDT_PROG_AUTOCONF}" && { cat >&2 <<EOF xdt-autogen: You must have "autoconf" installed on your system. Download the appropriate package for your distribution, or get the source tarball at ftp://ftp.gnu.org/pub/gnu/. EOF exit 1 } ## ## Check for intltoolize ## test -z "${XDT_PROG_INTLTOOLIZE}" && XDT_PROG_INTLTOOLIZE="intltoolize" for configure_ac_file in $CONFIGURE_AC_FILES; do if $EGREP -q "^(AC|IT)_PROG_INTLTOOL" "${configure_ac_file}"; then (${XDT_PROG_INTLTOOLIZE} --version) </dev/null >/dev/null 2>&1 || { cat >&2 <<EOF xdt-autogen: You must have "intltool" installed on your system. You can download the source tarball from ftp://ftp.gnome.org/pub/GNOME/. EOF exit 1 }; break; fi; done for configure_ac_file in $CONFIGURE_AC_FILES; do if grep -q "^AC_PROG_INTLTOOL" "${configure_ac_file}"; then cat >&2 <<EOF xdt-autogen: It is recommended to use IT_PROG_INTLTOOL([0.35.0]) in your configure.ac file and remove AC_PROG_INTLTOOL See https://bugzilla.xfce.org/show_bug.cgi?id=8930 for more information. EOF fi; done ## ## Check for libtoolize ## if test -z "${XDT_PROG_LIBTOOLIZE}"; then if type glibtoolize >/dev/null 2>&1; then XDT_PROG_LIBTOOLIZE="glibtoolize" elif type libtoolize >/dev/null 2>&1; then XDT_PROG_LIBTOOLIZE="libtoolize" fi fi for configure_ac_file in $CONFIGURE_AC_FILES; do runlibtoolize=0 if grep -q "^AC_PROG_LIBTOOL" "${configure_ac_file}"; then cat >&2 <<EOF xdt-autogen: It is recommended to use LT_PREREQ([@VERSION_LIBTOOL@]) and LT_INIT([disable-static]) in your configure.ac file and remove AC_PROG_LIBTOOL and AC_DISABLE_STATIC. See https://bugzilla.xfce.org/show_bug.cgi?id=6920 for more information. EOF runlibtoolize=1 fi; if grep -q "^LT_PREREQ" "${configure_ac_file}"; then runlibtoolize=1 fi; if test $runlibtoolize -eq 1; then (${XDT_PROG_LIBTOOLIZE} --version) </dev/null >/dev/null 2>&0 || { cat >&2 <<EOF xdt-autogen: You must have "libtool" installed on your system. Download the appropriate package for your distribution, or get the source tarball at ftp://ftp.gnu.org/pub/gnu/. EOF exit 1 }; break; fi; done ## ## Check for glib-gettextize ## test -z "${XDT_PROG_GLIB_GETTEXTIZE}" && XDT_PROG_GLIB_GETTEXTIZE="glib-gettextize" for configure_ac_file in $CONFIGURE_AC_FILES; do directory=`dirname ${configure_ac_file}` if test -d "${directory}/po"; then (${XDT_PROG_GLIB_GETTEXTIZE} --version) </dev/null >/dev/null 2>&1 || { cat >&2 <<EOF xdt-autogen: You must have "glib2" installed. You can get if from ftp://ftp.gtk.org/pub/gtk/. EOF exit 1 }; break; fi; done ## ## Check for gtkdocize ## test -z "${XDT_PROG_GTKDOCIZE}" && XDT_PROG_GTKDOCIZE="gtkdocize" for configure_ac_file in $CONFIGURE_AC_FILES; do if grep -q "^GTK_DOC_CHECK" "${configure_ac_file}"; then (${XDT_PROG_GTKDOCIZE} --version) </dev/null >/dev/null 2>&1 || { cat >&2 <<EOF xdt-autogen: You must have "gtk-doc" installed. You can get if from http://www.gtk.org/gtk-doc/. EOF exit 1 }; break; fi; done ## ## Check for aclocal ## if test -z "${XDT_PROG_ACLOCAL}"; then test -z "${ACLOCAL_VERSION}" && i=aclocal || i=aclocal-${ACLOCAL_VERSION} (${i} --version) </dev/null >/dev/null 2>&1 && XDT_PROG_ACLOCAL=${i} fi test -z "${XDT_PROG_ACLOCAL}" && { cat >&2 <<EOF xdt-autogen: You must have "automake" installed (which includes the "aclocal" tool). You can get the source tarball at ftp://ftp.gnu.org/pub/gnu/. EOF exit 1 } ## ## Check for autoheader ## test -z "${XDT_PROG_AUTOHEADER}" && for configure_ac_file in $CONFIGURE_AC_FILES; do if $EGREP -q "^A(M|C)_CONFIG_HEADER" "${configure_ac_file}"; then test -z "${AUTOHEADER_VERSION}" && i=autoheader || i=autoheader-${AUTOHEADER_VERSION} (${i} --version) </dev/null >/dev/null 2>&1 && XDT_PROG_AUTOHEADER=${i} test -z "${XDT_PROG_AUTOHEADER}" && { cat >&2 <<EOF xdt-autogen: You must have "autoconf" installed (which includes the "autoheader" tool). You can get the source tarball at ftp://ftp.gnu.org/pub/gnu/. EOF exit 1 }; break; fi; done ## ## Check for automake ## if test -z "${XDT_PROG_AUTOMAKE}"; then test -z "${AUTOMAKE_VERSION}" && i=automake || i=automake-${AUTOMAKE_VERSION} (${i} --version) </dev/null >/dev/null 2>&1 && XDT_PROG_AUTOMAKE=${i} fi test -z "${XDT_PROG_AUTOMAKE}" && { cat >&2 <<EOF xdt-autogen: You must have "automake" installed on your system. You can get the source tarball at ftp://ftp.gnu.org/pub/gnu/. EOF exit 1 } ## ## Check for configure flags ## test -z "${XDT_CONFIGURE_FLAGS}" && XDT_CONFIGURE_FLAGS="--enable-maintainer-mode" CONFIGURE_FLAGS="${XDT_CONFIGURE_FLAGS} $@" ## ## Check for aclocal flags ## XDT_ACLOCAL_FLAGS="${ACLOCAL_FLAGS} ${XDT_ACLOCAL_FLAGS}" for path in `echo "${XDG_DATA_DIRS}" | sed 's,:, ,g'`; do if test -d "${path}/xfce4/dev-tools/m4macros"; then XDT_ACLOCAL_FLAGS="${XDT_ACLOCAL_FLAGS} -I ${path}/xfce4/dev-tools/m4macros" elif test -d "${path}/xfce4/dev-tools/m4"; then XDT_ACLOCAL_FLAGS="${XDT_ACLOCAL_FLAGS} -I ${path}/xfce4/dev-tools/m4" fi done ## ## Do the real work(TM) ## for configure_ac_file in ${CONFIGURE_AC_FILES}; do # figure out the package dir path source_dir=`dirname ${configure_ac_file}` echo "Preparing package directory ${source_dir}..." # set aclocal flags ACLOCAL_FLAGS="${XDT_ACLOCAL_FLAGS}" if test -d "${source_dir}/m4macros"; then ACLOCAL_FLAGS="${ACLOCAL_FLAGS} -I ${source_dir}/m4macros"; fi if test -d "${source_dir}/m4"; then ACLOCAL_FLAGS="${ACLOCAL_FLAGS} -I ${source_dir}/m4"; fi if test -d "${source_dir}/po"; then if test ! -f "${source_dir}/aclocal.m4"; then (echo "Creating ${source_dir}/aclocal.m4..." && echo "dnl Auto-generated by xdt-autogen" > "${source_dir}/aclocal.m4") || exit 1 fi (echo "Running ${XDT_PROG_GLIB_GETTEXTIZE} --force --copy..." && ${XDT_PROG_GLIB_GETTEXTIZE} --force --copy) || exit 1 if test -f "${source_dir}/aclocal.m4" -a ! -w "${source_dir}/aclocal.m4"; then (echo "Making ${source_dir}/aclocal.m4 writable..." && chmod u+w "${source_dir}/aclocal.m4") || exit 1 fi fi if $EGREP -q "^(AC|IT)_PROG_INTLTOOL" "${configure_ac_file}"; then (echo "Running ${XDT_PROG_INTLTOOLIZE} --automake --copy --force" && cd "${source_dir}" && ${XDT_PROG_INTLTOOLIZE} --automake --copy --force) || exit 1 fi # patch the po/Makefile.in.in to take into account the setting of # XGETTEXT_ARGS properly if test -f "${source_dir}/po/Makefile.in.in"; then grep -q '^XGETTEXT_ARGS[ ]*=[ ]*@XGETTEXT_ARGS@$' \ "${source_dir}/po/Makefile.in.in" 2> /dev/null if test $? -ne 0; then echo "Patching file 'po/Makefile.in.in'" sed \ -e 's/^\(XGETTEXT[ ]*=[ ]*@XGETTEXT@\)[ ]*$/\1 $(XGETTEXT_ARGS)/' \ -e 's/^\(MSGMERGE[ ]*=\)[ ]*\(INTLTOOL_EXTRACT=\)/\1 XGETTEXT_ARGS="$(XGETTEXT_ARGS)" \2/' \ -e 's/^\(GENPOT[ ]*=\)[ ]*\(INTLTOOL_EXTRACT=\)/\1 XGETTEXT_ARGS="$(XGETTEXT_ARGS)" \2/' \ -e "/^XGETTEXT = @XGETTEXT@/{ i\\ XGETTEXT_ARGS = @XGETTEXT_ARGS@ }" < "${source_dir}/po/Makefile.in.in" > "${source_dir}/po/Makefile.in.in.tmp" if test $? -eq 0; then mv -f "${source_dir}/po/Makefile.in.in.tmp" \ "${source_dir}/po/Makefile.in.in" || exit 1 fi fi fi if grep -q -e "^AC_PROG_LIBTOOL" -e "^LT_PREREQ" "${configure_ac_file}"; then (echo "Running ${XDT_PROG_LIBTOOLIZE} --force --copy..." && cd "${source_dir}" && ${XDT_PROG_LIBTOOLIZE} --force --copy) || exit 1 fi if grep -q "^GTK_DOC_CHECK" "${configure_ac_file}"; then (echo "Running ${XDT_PROG_GTKDOCIZE} --copy..." && cd ${source_dir} && ${XDT_PROG_GTKDOCIZE} --copy) || exit 1 fi (echo "Running ${XDT_PROG_ACLOCAL} ${ACLOCAL_FLAGS}..." && cd ${source_dir} && ${XDT_PROG_ACLOCAL} ${ACLOCAL_FLAGS}) || exit 1 if $EGREP -q "^A(M|C)_CONFIG_HEADER" "${configure_ac_file}"; then (echo "Running ${XDT_PROG_AUTOHEADER}..." && cd ${source_dir} && ${XDT_PROG_AUTOHEADER}) || exit 1 fi (echo "Running ${XDT_PROG_AUTOMAKE} --force-missing --add-missing --copy --gnu..." && cd ${source_dir} && ${XDT_PROG_AUTOMAKE} --force-missing --add-missing --copy --gnu) || exit 1 (echo "Running ${XDT_PROG_AUTOCONF}..." && cd ${source_dir} && ${XDT_PROG_AUTOCONF}) || exit 1 echo done ## ## Run configure ## if test x"${NOCONFIGURE}" = x""; then (echo "Running ${MASTER_DIR}/configure ${CONFIGURE_FLAGS}..." && cd "${MASTER_DIR}" && ./configure ${CONFIGURE_FLAGS} && echo "Now type \"make\" to compile.") || exit 1 else echo "Skipping configure process." fi # vi:set ts=2 sw=2 et ai: 07070100000010000041ED0000000200000002000000025D503A3800000000000000000000000000000000000000000000003100000000xfce4-dev-tools-4.14.0.1~git.c62f6be/xdt-csource07070100000011000081A40000000200000002000000015D503A38000001E4000000000000000000000000000000000000003D00000000xfce4-dev-tools-4.14.0.1~git.c62f6be/xdt-csource/Makefile.am# Copyright (c) 2002-2015 # The Xfce development team. All rights reserved. # AM_CPPFLAGS = \ -I$(top_srcdir) \ -DG_LOG_DOMAIN=\"xdt-csource\" bin_PROGRAMS = \ xdt-csource xdt_csource_SOURCES = \ main.c xdt_csource_CFLAGS = \ $(GLIB_CFLAGS) xdt_csource_LDFLAGS = \ -no-undefined xdt_csource_LDADD = \ $(GLIB_LIBS) # require to make dist in tests/ dist-hook: all # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 07070100000012000081A40000000200000002000000015D503A3800002DB7000000000000000000000000000000000000003800000000xfce4-dev-tools-4.14.0.1~git.c62f6be/xdt-csource/main.c/* * Copyright (c) 2002-2015 * The Xfce development team. All rights reserved. * * Copyright (c) 2005-2007 Benedikt Meurer <benny@xfce.org> * Copyright (c) 2007 Nick Schermer <nick@xfce.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #ifdef HAVE_LIBINTL_H #include <libintl.h> #endif #ifdef HAVE_LOCALE_H #include <locale.h> #endif #ifdef HAVE_MEMORY_H #include <memory.h> #endif #include <stdio.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> #endif #ifdef HAVE_STRING_H #include <string.h> #endif #include <glib.h> #include <glib/gprintf.h> #include <glib/gstdio.h> /* --- prototypes --- */ static void parse_args (gint *argc_p, gchar ***argv_p); static void print_csource (FILE *fp, const gchar *data, gsize length, const gchar *filename); static void print_usage (void); static void print_version (void); /* --- variables --- */ static gboolean gen_buildlist = FALSE; static gboolean gen_stripcomments = FALSE; static gboolean gen_stripcontent = FALSE; static const gchar *gen_linkage = "static "; static const gchar *gen_varname = "my_data"; static const gchar *out_name = NULL; static void parse_args (gint *argc_p, gchar ***argv_p) { gchar **argv = *argv_p; gchar *s; gint argc = *argc_p; gint n; gint m; for (n = 1; n < argc; ++n) { if (strcmp (argv[n], "--help") == 0 || strcmp (argv[n], "-h") == 0) { print_usage (); exit (EXIT_SUCCESS); } else if (strcmp (argv[n], "--version") == 0 || strcmp (argv[n], "-V") == 0) { print_version (); exit (EXIT_SUCCESS); } else if (strcmp (argv[n], "--extern") == 0) { gen_linkage = ""; argv[n] = NULL; } else if (strcmp (argv[n], "--static") == 0) { gen_linkage = "static "; argv[n] = NULL; } else if (strncmp (argv[n], "--name=", 7) == 0 || strcmp (argv[n], "--name") == 0) { s = argv[n] + 6; if (G_LIKELY (*s == '=')) { gen_varname = g_strdup (s + 1); } else if (n + 1 < argc) { gen_varname = g_strdup (argv[n + 1]); argv[n++] = NULL; } argv[n] = NULL; } else if (strcmp (argv[n], "--build-list") == 0) { gen_buildlist = TRUE; argv[n] = NULL; } else if (strcmp (argv[n], "--strip-comments") == 0) { gen_stripcomments = TRUE; argv[n] = NULL; } else if (strcmp (argv[n], "--strip-content") == 0) { gen_stripcontent = TRUE; argv[n] = NULL; } else if (strcmp (argv[n], "--output") == 0 || strncmp (argv[n], "--output=", 9) == 0) { s = argv[n] + 8; if (G_LIKELY (*s == '=')) { out_name = g_strdup (s + 1); } else if (n + 1 < argc) { out_name = g_strdup (argv[n + 1]); argv[n++] = NULL; } argv[n] = NULL; } } for (m = 0, n = 1; n < argc; ++n) { if (m > 0) { if (argv[n] != NULL) { argv[m++] = argv[n]; argv[n] = NULL; } } else if (argv[n] == NULL) { m = n; } } if (m > 0) *argc_p = m; } static void print_csource (FILE *fp, const gchar *data, gsize length, const gchar *filename) { const guint8 *p = (const guint8 *) data; gboolean pad = FALSE; gboolean inside_comment = FALSE; gboolean inside_content = TRUE; gint column = 0; guint real_length = 0; g_fprintf (fp, "/* automatically generated from %s */\n", filename); g_fprintf (fp, "#ifdef __SUNPRO_C\n"); g_fprintf (fp, "#pragma align 4 (%s)\n", gen_varname); g_fprintf (fp, "#endif\n"); g_fprintf (fp, "#ifdef __GNUC__\n"); g_fprintf (fp, "%sconst char %s[] __attribute__ ((__aligned__ (4))) =\n", gen_linkage, gen_varname); g_fprintf (fp, "#else\n"); g_fprintf (fp, "%sconst char %s[] =\n", gen_linkage, gen_varname); g_fprintf (fp, "#endif\n"); g_fprintf (fp, "{\n"); g_fprintf (fp, " \""); for (; length-- > 0; ++p) { if (column > 70) { g_fprintf (fp, "\"\n \""); column = 0; } /* strip XML/HTML comments */ if (gen_stripcomments) { /* skip comments */ if (length >= 4 && p[0] == '<' && p[1] == '!' && p[2] == '-' && p[3] == '-') { inside_comment = TRUE; length -= 3; p += 3; continue; } else if (inside_comment) { /* check for end of comment */ if (length >= 3 && p[0] == '-' && p[1] == '-' && p[2] == '>') { inside_comment = FALSE; length -= 2; p += 2; } continue; } } /* strip XML content (the stuff between the nodes) */ if (gen_stripcontent) { if (!inside_content && *p == '>') inside_content = TRUE; else if (inside_content && *p == '<') inside_content = FALSE; else if (inside_content && !g_ascii_isspace (*p)) inside_content = FALSE; else if (inside_content) continue; } if (*p == '\"') { column += g_fprintf (fp, "\\\""); pad = FALSE; } else if (*p == '\'') { column += g_fprintf (fp, "\\\'"); pad = FALSE; } else if (*p == '\\') { column += g_fprintf (fp, "\\\\"); pad = FALSE; } else if (*p == '\n') { column += g_fprintf (fp, "\\n"); pad = FALSE; } else if (*p == '\r') { column += g_fprintf (fp, "\\r"); pad = FALSE; } else if (*p == '\t') { column += g_fprintf (fp, "\\t"); pad = FALSE; } else if (g_ascii_isprint (*p)) { if (pad && g_ascii_isdigit (*p)) column += g_fprintf (fp, "\"\""); column += g_fprintf (fp, "%c", *p); pad = FALSE; } else { column += g_fprintf (fp, "\\%03o", (guint) *p); pad = TRUE; } real_length++; } g_fprintf (fp, "\"\n};\n\n"); g_fprintf (fp, "%sconst unsigned %s_length = %uu;\n\n", gen_linkage, gen_varname, real_length); } static void print_usage (void) { g_print (" xdt-csource is a small utility that generates C code containing arbitrary data,\n"); g_print (" useful for compiling texts or other data directly into programs.\n"); g_print (" It either takes as input one file name to generate code for, or, using the --build-list option,\n"); g_print (" a list of (name, file) pairs to generate code for a list of images into named variables.\n"); g_print (" This is the successor of exo-csource.\n\n"); g_print ("Usage: %s [options] [file]\n", g_get_prgname ()); g_print (" %s [options] --build-list [[name file]...]\n", g_get_prgname ()); g_print ("\n"); g_print (" -h, --help Print this help message and exit\n"); g_print (" -V, --version Print version information and exit\n"); g_print (" --extern Generate extern symbols\n"); g_print (" --static Generate static symbols\n"); g_print (" --name=identifier C macro/variable name\n"); g_print (" --build-list Parse (name, file) pairs\n"); g_print (" --strip-comments Remove comments from XML files\n"); g_print (" --strip-content Remove node contents from XML files\n"); g_print (" --output=filename Write generated csource to specified file\n"); g_print ("\n"); } static void print_version (void) { g_print ("%s %s\n\n", G_LOG_DOMAIN, PACKAGE_VERSION); g_print ("Copyright (c) 2005-2019\n"); g_print ("\tThe Xfce development team. All rights reserved.\n\n"); g_print ("%s comes with ABSOLUTELY NO WARRANTY,\n" "You may redistribute copies of %s under the terms of\n" "the GNU General Public License which can be found in the\n" "%s source package.\n\n", g_get_prgname (), g_get_prgname (), PACKAGE_TARNAME); g_print ("Please report bugs to <%s>.", PACKAGE_BUGREPORT); g_print ("\n"); } int main (int argc, char **argv) { gboolean toggle = FALSE; GError *error = NULL; gchar **p; gchar *filename; gchar *data; gsize length; gint n; FILE *out_file; setlocale (LC_ALL, NULL); /* set program name */ g_set_prgname (g_path_get_basename (argv[0])); /* parse command line arguments */ parse_args (&argc, &argv); if (!gen_buildlist) { if (G_UNLIKELY (argc != 2)) { print_usage (); return EXIT_FAILURE; } if (out_name == NULL) out_file = stdout; else { out_file = g_fopen (out_name, "w"); if (out_file == NULL) { g_fprintf (stderr, "Failed to open output file \"%s\"\n", out_name); return EXIT_FAILURE; } } #ifdef G_OS_WIN32 filename = g_local_to_utf8 (argv[1], -1, NULL, NULL, NULL); #else filename = argv[1]; #endif if (!g_file_get_contents (filename, &data, &length, &error)) { g_fprintf (stderr, "%s: Failed to load \"%s\": %s\n", g_get_prgname (), filename, error->message); g_error_free (error); return EXIT_FAILURE; } print_csource (out_file, data, length, filename); if (out_file != NULL && out_file != stdout) fclose (out_file); g_free (data); } else { for (n = argc - 1, p = argv + 1; n-- > 0; ++p, toggle = !toggle) { #ifdef G_OS_WIN32 filename = g_local_to_utf8 (*p, -1, NULL, NULL, NULL); #else filename = *p; #endif if (!toggle) { gen_varname = filename; } else { if (!g_file_get_contents (filename, &data, &length, &error)) { g_fprintf (stderr, "%s: Failed to load \"%s\": %s\n", g_get_prgname (), filename, error->message); g_error_free (error); return EXIT_FAILURE; } print_csource (stdout, data, length, filename); g_free (data); } } } return EXIT_SUCCESS; } 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!160 blocks
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor