diff options
author | Benedikt Meurer <benny@xfce.org> | 2005-01-26 21:34:18 +0000 |
---|---|---|
committer | Benedikt Meurer <benny@xfce.org> | 2005-01-26 21:34:18 +0000 |
commit | 9ed3a6cabc28be37c3d08bb263b363593129e5cb (patch) | |
tree | 3ae8eeeac68b8f0d5bd9e61b537b5b87b0bb0edc | |
parent | 9cc8112bc0b41e8dad311a2c3345b187cec8c0ba (diff) | |
download | xfce4-dev-tools-9ed3a6cabc28be37c3d08bb263b363593129e5cb.tar.gz |
Initial revisionBMEURER_20050126
(Old svn revision: 2260)
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | COPYING | 280 | ||||
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | HACKING | 45 | ||||
-rw-r--r-- | INSTALL | 231 | ||||
-rw-r--r-- | Makefile.am | 38 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | README | 23 | ||||
-rwxr-xr-x | autogen.sh | 21 | ||||
-rw-r--r-- | configure.ac | 46 | ||||
-rw-r--r-- | m4macros/Makefile.am | 19 | ||||
-rw-r--r-- | m4macros/xdt-depends.m4 | 413 | ||||
-rw-r--r-- | m4macros/xdt-features.m4 | 120 | ||||
-rw-r--r-- | m4macros/xdt-i18n.m4 | 407 | ||||
-rw-r--r-- | m4macros/xdt-xfce.m4 | 111 | ||||
-rw-r--r-- | scripts/Makefile.am | 25 | ||||
-rw-r--r-- | scripts/xdt-autogen.in | 217 | ||||
-rw-r--r-- | xfce4-dev-tools.spec.in | 33 |
18 files changed, 2037 insertions, 0 deletions
@@ -0,0 +1 @@ +Benedikt Meurer <benny@xfce.org> @@ -0,0 +1,280 @@ + 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 diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..15e62a7 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,3 @@ +2005-01-26 Benedikt Meurer <benny@xfce.org> + + * Initial import. @@ -0,0 +1,45 @@ +Bug tracking system +=================== + +Please use the Xfce bugtracking system at http://bugzilla.xfce.org/ to report +bugs and post feature requests. + + +Patches +======= + +Please submit patches to the Xfce bugtracking system or the xfce4-dev@xfce.org +mailinglist. Your patch should be in unified diff format (the -u option to +GNU diff) 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. @@ -0,0 +1,231 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + +By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PREFIX', the package will +use PREFIX as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..6a4141f --- /dev/null +++ b/Makefile.am @@ -0,0 +1,38 @@ +# $Id$ +# +# Copyright (c) 2002-2005 +# The Xfce development team. All rights reserved. +# +# Written for Xfce by Benedikt Meurer <benny@xfce.org>. +# + +SUBDIRS = \ + m4macros \ + scripts + +distclean-local: + rm -rf *.spec *.cache *~ TerminalHelp + +dist-bz2: dist + zcat $(PACKAGE)-$(VERSION).tar.gz | \ + bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2 + +distcheck-bz2: distcheck + zcat $(PACKAGE)-$(VERSION).tar.gz | \ + bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2 + +rpm: dist + rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz + @rm -f $(PACKAGE)-$(VERSION).tar.gz + +EXTRA_DIST = \ + AUTHORS \ + COPYING \ + ChangeLog \ + HACKING \ + INSTALL \ + NEWS \ + README \ + xfce4-dev-tools.spec.in \ + xfce4-dev-tools.spec + @@ -0,0 +1,4 @@ +4.3.0cvs +======== +- xfce4-dev-tools is a new module in CVS, which includes tools, macros and + documentation for Xfce developers. @@ -0,0 +1,23 @@ +What is it? +=========== + +The Xfce development tools are a collection of tools and macros for +Xfce developers and people that want to build Xfce from CVS. 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. diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..90aa0b0 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# +# $Id$ +# +# Copyright (c) 2002-2005 +# The Xfce development team. All rights reserved. +# +# Written for Xfce by Benedikt Meurer <benny@xfce.org>. +# + +if (type xdt-autogen) >/dev/null 2>&1; then + exec xdt-autogen +else + (aclocal && + automake --add-missing --copy --gnu && + autoconf && + ./configure --enable-maintainer-mode "$@" && + echo "Now type \"make\" to build.") || exit 1 +fi + +# vi:set ts=2 sw=2 et ai: diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..c2fc3d0 --- /dev/null +++ b/configure.ac @@ -0,0 +1,46 @@ +dnl $Id$ +dnl +dnl Copyright (c) 2002-2005 +dnl The Xfce development team. All rights reserved. +dnl +dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>. +dnl + +dnl Version information +m4_define([xdt_version_major], [4]) +m4_define([xdt_version_minor], [3]) +m4_define([xdt_version_micro], [0]) +m4_define([xdt_version_tag], [svn]) +m4_define([xdt_version], [xdt_version_major().xdt_version_minor().xdt_version_micro()xdt_version_tag()]) + + +dnl # DO NOT MODIFY ANYTHING BELOW THIS LINE, UNLESS YOU KNOW WHAT +dnl # YOU ARE DOING. + + +dnl Initialize autoconf +AC_COPYRIGHT([Copyright (c) 2002-2005 + The Xfce development team. All rights reserved. + +Written for Xfce by Benedikt Meurer <benny@xfce.org>.]) +AC_INIT([xfce4-dev-tools], [xdt_version()], [xfce4-dev@xfce.org]) +AC_PREREQ([2.50]) +AC_REVISION([$Id$]) + +dnl Initialize automake +XDT_VERSION=xdt_version() +AM_INIT_AUTOMAKE([xfce4-dev-tools], [$XDT_VERSION]) +AM_MAINTAINER_MODE + +dnl Check for basic programs +AC_PROG_INSTALL + +dnl Generate files +AC_OUTPUT([ +Makefile +xfce4-dev-tools.spec +m4macros/Makefile +scripts/Makefile +]) + +dnl vi:set ts=2 sw=2 et ai: diff --git a/m4macros/Makefile.am b/m4macros/Makefile.am new file mode 100644 index 0000000..3a2df31 --- /dev/null +++ b/m4macros/Makefile.am @@ -0,0 +1,19 @@ +# $Id$ +# +# Copyright (c) 2002-2005 +# 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 \ + xdt-xfce.m4 + +EXTRA_DIST = \ + $(macro_DATA) + +# vi:set ts=8 sw=8 noet ai: diff --git a/m4macros/xdt-depends.m4 b/m4macros/xdt-depends.m4 new file mode 100644 index 0000000..b7152cd --- /dev/null +++ b/m4macros/xdt-depends.m4 @@ -0,0 +1,413 @@ +dnl $Id$ +dnl +dnl Copyright (c) 2002-2005 +dnl The Xfce development team. All rights reserved. +dnl +dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>. +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.53]) + + + +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 + + # lookup pkg-config utility + if test x"$PKG_CONFIG" = x""; then + AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no]) + + if test x"$PKG_CONFIG" = x"no"; then + 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 "*** http://www.freedesktop.org/software/pkgconfig" + echo "***" + exit 1 + fi + fi + + # check pkg-config version + AC_MSG_CHECKING([for pkg-config >= $xdt_cv_PKG_CONFIG_MIN_VERSION]) + if $PKG_CONFIG --atleast-pkgconfig-version $xdt_cv_PKG_CONFIG_MIN_VERSION; then + xdt_cv_PKG_CONFIG_VERSION=`$PKG_CONFIG --version` + AC_MSG_RESULT([$xdt_cv_PKG_CONFIG_VERSION]) + else + xdt_cv_PKG_CONFIG_VERSION=`$PKG_CONFIG --version` + AC_MSG_RESULT([$xdt_cv_PKG_CONFIG_VERSION]) + 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 "*** http://www.freedesktop.org/software/pkgconfig" + echo "***" + exit 1 + fi +]) + + + +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], +[ + AC_REQUIRE([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 + xdg_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 +]) + + + +dnl BM_DEPEND(varname, package, version) +dnl +dnl Simple wrapper for XDT_CHECK_PACKAGE("varname", "package", "version"). Kept +dnl for backward compatibility. Will be removed in the future. +dnl +AC_DEFUN([BM_DEPEND], +[ + XDT_CHECK_PACKAGE([$1], [$2], [$3]) +]) + + + +dnl BM_DEPEND_CHECK(var, pkg, version, name, helpstring, default) +dnl +dnl Simple wrapper for XDT_CHECK_OPTIONAL_PACKAGE(). Kept for backward +dnl compatibility. Will be removed in the future. +dnl +AC_DEFUN([BM_DEPEND_CHECK], +[ + XDT_CHECK_OPTIONAL_PACKAGE([$1], [$2], [$3], [$4], [$5], [$6]) +]) + + + +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 +]) + + + +dnl BM_LIBX11() +dnl +dnl Simple wrapper for XDT_CHECK_LIBX11. Kept for backward +dnl compatibility. Will be removed in the future. +dnl +AC_DEFUN([BM_LIBX11], +[ + AC_REQUIRE([XDT_CHECK_LIBX11]) +]) + + + +dnl BM_LIBX11_REQUIRE() +dnl +dnl Simple wrapper for XDT_CHECK_LIBX11_REQUIRE. Kept for backward +dnl compatibility. Will be removed in the future. +dnl +AC_DEFUN([BM_LIBX11_REQUIRE], +[ + AC_REQUIRE([XDT_CHECK_LIBX11_REQUIRE]) +]) + + + +dnl BM_LIBSM() +dnl +dnl Simple wrapper for XDT_CHECK_LIBSM. Kept for backward +dnl compatibility. Will be removed in the future. +dnl +AC_DEFUN([BM_LIBSM], +[ + AC_REQUIRE([XDT_CHECK_LIBSM]) +]) + + + +dnl BM_LIBXPM +dnl +dnl Simple wrapper for XDT_CHECK_LIBXPM. Kept for backward +dnl compatibility. Will be removed in the future. +dnl +AC_DEFUN([BM_LIBXPM], +[ + AC_REQUIRE([XDT_CHECK_LIBXPM]) +]) + + + +dnl BM_LIBXPM_REQUIRE +dnl +dnl Simple wrapper for XDT_CHECK_LIBXPM_REQUIRE. Kept for +dnl backward compatibility. Will be removed in the future. +dnl +AC_DEFUN([BM_LIBXPM_REQUIRE], +[ + AC_REQUIRE([XDT_CHECK_LIBXPM_REQUIRE]) +]) + diff --git a/m4macros/xdt-features.m4 b/m4macros/xdt-features.m4 new file mode 100644 index 0000000..17403ba --- /dev/null +++ b/m4macros/xdt-features.m4 @@ -0,0 +1,120 @@ +dnl $Id$ +dnl +dnl Copyright (c) 2002-2005 +dnl The Xfce development team. All rights reserved. +dnl +dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>. +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.53]) + + + +dnl XDT_FEATURE_DEBUG() +dnl +AC_DEFUN([XDT_FEATURE_DEBUG], +[ + AC_ARG_ENABLE([debug], +AC_HELP_STRING([--enable-debug[=yes|no|full]], [Build with debugging support]) +AC_HELP_STRING([--disable-debug], [Include no debugging support [default]]), + [], [enable_debug=no]) + + AC_MSG_CHECKING([whether to build with debugging support]) + if test x"$enable_debug" != x"no"; then + AC_DEFINE([DEBUG], [1], [Define for debugging support]) + + xdt_cv_additional_CFLAGS="-Wall" + xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -DG_DISABLE_DEPRECATED" + xdt_cv_additional_CFLAGS="$xdt_cv_additional_CFLAGS -DXFCE_DISABLE_DEPRECATED" + + if test x"$enable_debug" = x"full"; then + AC_DEFINE([DEBUG_TRACE], [1], [Define for tracing support]) + xdt_cv_additional_CFLAGS="-g3 -Werror $xdt_cv_additional_CFLAGS" + AC_MSG_RESULT([full]) + else + xdt_cv_additional_CFLAGS="-g $xdt_cv_additional_CFLAGS" + AC_MSG_RESULT([yes]) + fi + + CFLAGS="$CFLAGS $xdt_cv_additional_CFLAGS" + CXXFLAGS="$CXXFLAGS $xdt_cv_additional_CFLAGS" + else + AC_MSG_RESULT([no]) + fi +]) + + + +dnl BM_DEBUG_SUPPORT() +dnl +AC_DEFUN([BM_DEBUG_SUPPORT], +[ +dnl # --enable-debug + AC_REQUIRE([XDT_FEATURE_DEBUG]) + +dnl # --enable-profiling + AC_ARG_ENABLE([profiling], +AC_HELP_STRING([--enable-profiling], + [Generate extra code to write profile information]) +AC_HELP_STRING([--disable-profiling], + [No extra code for profiling (default)]), + [], [enable_profiling=no]) + + AC_MSG_CHECKING([whether to build with profiling support]) + if test x"$enable_profiling" != x"no"; then + CFLAGS="$CFLAGS -pg" + LDFLAGS="$LDFLAGS -pg" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + +dnl # --enable-gcov + AC_ARG_ENABLE([gcov], +AC_HELP_STRING([--enable-gcov], + [compile with coverage profiling instrumentation (gcc only)]) +AC_HELP_STRING([--disable-gcov], + [do not generate coverage profiling instrumentation (default)]), + [], [enable_gcov=no]) + + AC_MSG_CHECKING([whether to compile with coverage profiling instrumentation]) + if test x"$enable_gcov" != x"no"; then + CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + +dnl # --enable-final + AC_REQUIRE([AC_PROG_LD]) + AC_ARG_ENABLE([final], +AC_HELP_STRING([--enable-final], [Build final version]), + [], [enable_final=yes]) + + AC_MSG_CHECKING([whether to build final version]) + if test x"$enable_final" = x"yes"; then + AC_MSG_RESULT([yes]) + CPPFLAGS="$CPPFLAGS -DG_DISABLE_CHECKS -DG_DISABLE_ASSERT" + CPPFLAGS="$CPPFLAGS -DG_DISABLE_CAST_CHECKS" + 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 + else + AC_MSG_RESULT([no]) + fi +]) diff --git a/m4macros/xdt-i18n.m4 b/m4macros/xdt-i18n.m4 new file mode 100644 index 0000000..4489f2b --- /dev/null +++ b/m4macros/xdt-i18n.m4 @@ -0,0 +1,407 @@ +dnl $Id$ +dnl +dnl Copyright (c) 2002-2005 +dnl The Xfce development team. All rights reserved. +dnl +dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>. +dnl +dnl xdt-xfce +dnl -------- +dnl Xfce specific M4 macros. +dnl + + +dnl This requires a recent version of autoconf +AC_PREREQ([2.53]) + + + +dnl XDT_LC_MESSAGES() +dnl +dnl Checks whether <locale.h> defines LC_MESSAGES on +dnl the target system. If both <locale.h> is present +dnl and it defines LC_MESSAGES, this macro sets +dnl HAVE_LC_MESSAGES to 1 in config.h. +dnl +AC_DEFUN([XDT_LC_MESSAGES], +[ + AC_CHECK_HEADERS([locale.h]) + if test x"$ac_cv_header_locale_h" = x"yes"; then + AC_CACHE_CHECK([for LC_MESSAGES], + [xdt_cv_val_LC_MESSAGES], + [AC_TRY_LINK([#include <locale.h>], + [return LC_MESSAGES], + [xdt_cv_val_LC_MESSAGES=yes], + [xdt_cv_val_LC_MESSAGES=no])]) + if test x"$xdt_cv_val_LC_MESSAGES" = x"yes"; then + AC_DEFINE([HAVE_LC_MESSAGES], [1], [Define if your <locale.h> file defines LC_MESSAGES.]) + fi + fi +]) + + + +dnl XDT_PATH_PROG_WITH_TEST(varname, progname, test, [value-if-not-found], [path]) +dnl +AC_DEFUN([XDT_PATH_PROG_WITH_TEST], +[ + dnl Extract the first word of "$2", so it can be a program name with args. + set dummy $2; + ac_word=[$]2 + + AC_MSG_CHECKING([for $ac_word]) + AC_CACHE_VAL([ac_cv_path_$1], + [ + case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + + *) + IFS="${IFS= }"; + ac_save_ifs="$IFS"; + IFS="${IFS}:" + for ac_dir in ifelse([$5], , [$PATH], [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + + dnl If no 4th arg is given, leave the cache variable unset, + dnl so AC_PATH_PROGS will keep looking. + ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"]) + ;; + esac + ]) + + $1="$ac_cv_path_$1" + if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) + else + AC_MSG_RESULT([no]) + fi + AC_SUBST([$1]) +]) + + + +dnl XDT_WITH_NLS() +dnl +AC_DEFUN([XDT_WITH_NLS], +[ + dnl NLS is obligatory + USE_NLS=yes + AC_SUBST([USE_NLS]) + + xdt_cv_have_gettext=no + + CATOBJEXT=NONE + XGETTEXT=: + INTLLIBS= + + AC_CHECK_HEADER([libintl.h], + [ + xdt_cv_func_dgettext_libintl="no" + xdt_cv_libintl_extra_libs="" + + dnl First check in libc + AC_CACHE_CHECK([for dgettext in libc], [xdt_cv_func_dgettext_libc], + [ + AC_TRY_LINK([#include <libintl.h>], + [return (int) dgettext ("","")], + [xdt_cv_func_dgettext_libc=yes], + [xdt_cv_func_dgettext_libc=no]) + ]) + + if test x"$xdt_cv_func_dgettext_libc" = x"yes" ; then + AC_CHECK_FUNCS([bind_textdomain_codeset]) + fi + + dnl If we don't have everything we want, check in libintl + if test x"$xdt_cv_func_dgettext_libc" != x"yes" \ + || test x"$ac_cv_func_bind_textdomain_codeset" != x"yes" ; then + AC_CHECK_LIB([intl], [bindtextdomain], + [ + AC_CHECK_LIB([intl], [dgettext], [xdt_cv_func_dgettext_libintl=yes]) + ]) + + if test x"$xdt_cv_func_dgettext_libintl" != x"yes" ; then + AC_MSG_CHECKING([if -liconv is needed to use gettext]) + AC_MSG_RESULT([]) + AC_CHECK_LIB([intl], [dcgettext], + [ + xdt_cv_func_dgettext_libintl=yes + xdt_cv_libintl_extra_libs=-liconv + ], [:],[-liconv]) + fi + + dnl If we found libintl, then check in it for bind_textdomain_codeset(); + dnl we'll prefer libc if neither have bind_textdomain_codeset(), + dnl and both have dgettext + if test x"$xdt_cv_func_dgettext_libintl" = x"yes" ; then + xdt_save_LIBS="$LIBS" + LIBS="$LIBS -lintl $xdt_cv_libintl_extra_libs" + unset ac_cv_func_bind_textdomain_codeset + AC_CHECK_FUNCS([bind_textdomain_codeset]) + LIBS="$xdt_save_LIBS" + + if test x"$ac_cv_func_bind_textdomain_codeset" = x"yes"; then + xdt_cv_func_dgettext_libc=no + else + if test x"$xdt_cv_func_dgettext_libc" = x"yes"; then + xdt_cv_func_dgettext_libintl=no + fi + fi + fi + fi + + if test x"$xdt_cv_func_dgettext_libc" = x"yes" \ + || test x"$xdt_cv_func_dgettext_libintl" = x"yes"; then + xdt_cv_have_gettext=yes + fi + + if test x"$xdt_cv_func_dgettext_libintl" = x"yes"; then + INTLLIBS="-lintl $xdt_cv_libintl_extra_libs" + fi + + if test x"$xdt_cv_have_gettext" = x"yes"; then + AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) + XDT_PATH_PROG_WITH_TEST([MSGFMT], [msgfmt],[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], [no]) + if test x"$MSGFMT" != x"no"; then + xdt_save_LIBS="$LIBS" + LIBS="$LIBS $INTLLIBS" + AC_CHECK_FUNCS([dcgettext]) + AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) + XDT_PATH_PROG_WITH_TEST([XGETTEXT], [xgettext], [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], [:]) + AC_TRY_LINK([], [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], + [ + CATOBJEXT=.gmo + DATADIRNAME=share + ], + [ + case $host in + *-*-solaris*) + dnl On Solaris, if bind_textdomain_codeset is in libc, + dnl GNU format message catalog is always supported, + dnl since both are added to the libc all together. + dnl Hence, we'd like to go with DATADIRNAME=share and + dnl and CATOBJEXT=.gmo in this case. + AC_CHECK_FUNC([bind_textdomain_codeset], + [ + CATOBJEXT=.gmo + DATADIRNAME=share + ], + [ + CATOBJEXT=.mo + DATADIRNAME=lib + ]) + ;; + + *) + CATOBJEXT=.mo + DATADIRNAME=lib + ;; + esac + ]) + LIBS="$xdt_save_LIBS" + INSTOBJEXT=.mo + else + xdt_cv_have_gettext=no + fi + fi + ]) + + if test x"$xdt_cv_have_gettext" = x"yes"; then + AC_DEFINE([ENABLE_NLS], [1], [always defined to indicate that i18n is enabled]) + fi + + dnl Test whether we really found GNU xgettext. + if test x"$XGETTEXT" != x":"; then + dnl If it is not GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header /dev/null 2>/dev/null; then + : ; + else + AC_MSG_RESULT([found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + fi + + dnl We need to process the po/ directory. + POSUB=po + + AC_OUTPUT_COMMANDS( + [ + case "$CONFIG_FILES" in + *po/Makefile.in*) + sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile + esac + ]) + + dnl These rules are solely for the distribution goal. While doing this + dnl we only have to keep exactly one list of the available catalogs + dnl in configure.in. + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + done + + dnl Make all variables we use known to autoconf. + AC_SUBST([CATALOGS]) + AC_SUBST([CATOBJEXT]) + AC_SUBST([DATADIRNAME]) + AC_SUBST([GMOFILES]) + AC_SUBST([INSTOBJEXT]) + AC_SUBST([INTLLIBS]) + AC_SUBST([PO_IN_DATADIR_TRUE]) + AC_SUBST([PO_IN_DATADIR_FALSE]) + AC_SUBST([POFILES]) + AC_SUBST([POSUB]) +]) + + + +dnl XDT_GNU_GETTEXT([linguas]) +dnl +AC_DEFUN([XDT_GNU_GETTEXT], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_HEADER_STDC]) + AC_REQUIRE([XDT_LC_MESSAGES]) + AC_REQUIRE([XDT_WITH_NLS]) + + if test x"$xdt_cv_have_gettext" = x"yes"; then + ifelse([$1], , + [ + LINGUAS= + ], + [ + AC_MSG_CHECKING([for catalogs to be installed]) + NEW_LINGUAS= + for presentlang in $1; do + useit=no + if test x"%UNSET%" != x"${LINGUAS-%UNSET%}"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$1" + fi + + for desiredlang in $desiredlanguages; do + dnl Use the presentlang catalog if desiredlang is + dnl a. equal to presentlang, or + dnl b. a variant of presentlang (because in this case, + dnl presentlang can be used as a fallback for messages + dnl which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) + useit=yes;; + esac + done + + if test x"$useit" = x"yes"; then + NEW_LINGUAS="$NEW_LINGUAS $presentlang" + fi + done + + LINGUAS=$NEW_LINGUAS + AC_MSG_RESULT([$LINGUAS]) + fi + + dnl Construct list of names of catalog files to be constructed. + if test x"$LINGUAS" != x""; then + for lang in $LINGUAS; do + CATALOGS="$CATALOGS $lang$CATOBJEXT"; + done + ]) + fi + + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but ($top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST([MKINSTALLDIRS]) + + dnl Generate list of files to be processed by xgettext which will + dnl be included in po/Makefile. + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed \ + -e "/^#/d" -e "/^\$/d" \ + -e "s,.*, $posrcprefix& \\\\," \ + -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES +]) + + + +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([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Name of default gettext domain]) + AC_SUBST([GETTEXT_PACKAGE]) + + dnl gettext and stuff + XDT_GNU_GETTEXT([$1]) + + 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 + ]) + AC_MSG_RESULT([$localdir]) + AC_SUBST([localdir]) +]) + + + +dnl BM_I18N(PACKAGE, LINGUAS) +dnl +dnl Simple wrapper for XDT_I18N(LINGUAS, PACKAGE). Kept for +dnl backward compatibility. Will be removed in the +dnl future. +dnl +AC_DEFUN([BM_I18N], +[ + XDT_I18N([$2], [$1]) +]) + diff --git a/m4macros/xdt-xfce.m4 b/m4macros/xdt-xfce.m4 new file mode 100644 index 0000000..93d645c --- /dev/null +++ b/m4macros/xdt-xfce.m4 @@ -0,0 +1,111 @@ +dnl $Id$ +dnl +dnl Copyright (c) 2002-2005 +dnl The Xfce development team. All rights reserved. +dnl +dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>. +dnl +dnl xdt-xfce +dnl -------- +dnl Xfce specific M4 macros. +dnl + + + +dnl XDT_XFCE_PANEL_PLUGIN(varname, [version = 4.2.0]) +dnl +dnl This macro is intended to be used by panel plugin writers. It +dnl detects the xfce4-panel package on the target system and sets +dnl "varname"_CFLAGS, "varname"_LIBS, "varname"_REQUIRED_VERSION +dnl and "varname"_VERSION properly. The parameter "version" +dnl specifies the minimum required version of xfce4-panel (defaults +dnl to 4.2.0 if not given). +dnl +dnl This macro also takes care of handling special panel versions, +dnl like the threaded panel, that was used during the Xfce 4.2.0 +dnl development, and automatically sets up the correct flags. +dnl +dnl In addition, this macro defines "varname"_PLUGINSDIR (and +dnl marks it for substitution), which points to the directory +dnl where the panel plugin should be installed to. You should +dnl use this variable in your Makefile.am. +dnl +AC_DEFUN([XDT_XFCE_PANEL_PLUGIN], +[ + dnl Check for the xfce4-panel package + XDT_CHECK_PACKAGE([$1], [xfce4-panel-1.0], [m4_default([$2], [4.2.0])]) + + dnl Check if the panel is threaded (only for old panels) + xdt_cv_CFLAGS=$$1_CFLAGS + AC_MSG_CHECKING([whether the Xfce panel is threaded]) + if $PKG_CONFIG --max-version=4.1.90 xfce4-panel-1.0 >/dev/null 2>&1; then + AC_MSG_RESULT([yes]) + xdt_cv_CFLAGS="$xdt_cv_CFLAGS -DXFCE_PANEL_THREADED=1" + xdt_cv_CFLAGS="$xdt_cv_CFLAGS -DXFCE_PANEL_LOCK\(\)=gdk_threads_enter\(\)" + xdt_cv_CFLAGS="$xdt_cv_CFLAGS -DXFCE_PANEL_UNLOCK\(\)=gdk_threads_leave\(\)" + else + AC_MSG_RESULT([no]) + xdt_cv_CFLAGS="$xdt_cv_CFLAGS -DXFCE_PANEL_LOCK\(\)=do{}while\(0\)" + xdt_cv_CFLAGS="$xdt_cv_CFLAGS -DXFCE_PANEL_UNLOCK\(\)=do{}while\(0\)" + fi + $1_CFLAGS="$xdt_cv_CFLAGS" + + dnl Check where to put the plugins to + AC_MSG_CHECKING([where to install panel plugins]) + $1_PLUGINSDIR=$libdir/xfce4/panel-plugins + AC_SUBST([$1_PLUGINSDIR]) + AC_MSG_RESULT([$$1_PLUGINSDIR]) +]) + + + +dnl XDT_XFCE_MCS_PLUGIN(varname, [version = 4.2.0]) +dnl +dnl This macro is intented to be used by MCS plugin writers. It +dnl detects the MCS manager package on the target system and sets +dnl "varname"_CFLAGS, "varname"_LIBS, "varname"_REQUIRED_VERSION, +dnl and "varname"_VERSION. The parameter "version" allows you +dnl to specify the minimum required version of xfce-mcs-manager +dnl (defaults to 4.2.0 if not given). +dnl +dnl In addition, this macro defines "varname"_PLUGINSDIR (and +dnl marks it for substitution), which points to the directory +dnl where the MCS plugin should be installed to. You should use +dnl this variable in your Makefile.am. +dnl +AC_DEFUN([XDT_XFCE_MCS_PLUGIN], +[ + dnl Check for the xfce-mcs-manager package + XDT_CHECK_PACKAGE([$1], [xfce-mcs-manager], [m4_default([$2], [4.2.0])]) + + dnl Check where to put the plugins to + AC_MSG_CHECKING([where to install MCS plugins]) + $1_PLUGINSDIR=$libdir/xfce4/mcs-plugins + AC_SUBST([$1_PLUGINSDIR]) + AC_MSG_RESULT([$$1_PLUGINSDIR]) +]) + + + +dnl XFCE_PANEL_PLUGIN(varname, version) +dnl +dnl Simple wrapper for XDT_XFCE_PANEL_PLUGIN(varname, version). Kept +dnl for backward compatibility. Will be removed in the future. +dnl +AC_DEFUN([XFCE_PANEL_PLUGIN], +[ + XDT_XFCE_PANEL_PLUGIN([$1], [$2]) +]) + + + +dnl XFCE_MCS_PLUGIN(varname, version) +dnl +dnl Simple wrapper for XDT_XFCE_MCS_PLUGIN(varname, version). Kept +dnl for backward compatibility. Will be removed in the future. +dnl +AC_DEFUN([XFCE_MCS_PLUGIN], +[ + XDT_XFCE_MCS_PLUGIN([$1], [$2]) +]) + diff --git a/scripts/Makefile.am b/scripts/Makefile.am new file mode 100644 index 0000000..41b8478 --- /dev/null +++ b/scripts/Makefile.am @@ -0,0 +1,25 @@ +# $Id$ +# +# Copyright (c) 2002-2005 +# The Xfce development team. All rights reserved. +# +# Written for Xfce by Benedikt Meurer <benny@xfce.org>. +# + +bin_SCRIPTS = \ + xdt-autogen + +xdt-autogen: Makefile $(srcdir)/xdt-autogen.in + rm -f xdt-autogen xdt-autogen.gen + sed -e 's,\@DATADIR\@,$(datadir),g' \ + $(srcdir)/xdt-autogen.in \ + > xdt-autogen.gen + mv xdt-autogen.gen xdt-autogen + +CLEANFILES = \ + xdt-autogen + +EXTRA_DIST = \ + xdt-autogen.in + +# vi:set ts=8 sw=8 noet ai: diff --git a/scripts/xdt-autogen.in b/scripts/xdt-autogen.in new file mode 100644 index 0000000..f6cbb4b --- /dev/null +++ b/scripts/xdt-autogen.in @@ -0,0 +1,217 @@ +#!/bin/sh +# +# $Id$ +# +# Copyright (c) 2002-2005 +# The Xfce development team. All rights reserved. +# +# Written for Xfce by Benedikt Meurer <benny@xfce.org>. +# +# xdt-autogen - Part of the Xfce developer tools. +# + + +## +## 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 + + +## +## Search for the configure.{ac,in} file +## +SOURCE_DIR=`pwd`; test -z "${SOURCE_DIR}" && SOURCE_DIR="." +if test -f "${SOURCE_DIR}/configure.ac"; then + CONFIGURE_FILE="${SOURCE_DIR}/configure.ac"; +elif test -f "${SOURCE_DIR}/configure.in"; then + CONFIGURE_FILE="${SOURCE_DIR}/configure.in"; +else + cat >&2 <<EOF +xdt-autogen: Directory "${SOURCE_DIR}" does not look like a + top-level package directory. +EOF + exit 1 +fi + + +## +## Check for autoconf +## +test -z "${XDT_PROG_AUTOCONF}" && XDT_PROG_AUTOCONF="autoconf" +(${XDT_PROG_AUTOCONF} --version) </dev/null >/dev/null 2>&0 || { + 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 libtoolize +## +test -z "${XDT_PROG_LIBTOOLIZE}" && XDT_PROG_LIBTOOLIZE="libtoolize" +if grep "^AC_PROG_LIBTOOL" "${CONFIGURE_FILE}" >/dev/null 2>&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 + } +fi + + +## +## Check for glib-gettextize +## +test -z "${XDT_PROG_GLIB_GETTEXTIZE}" && XDT_PROG_GLIB_GETTEXTIZE="glib-gettextize" +if test -d "${SOURCE_DIR}/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 + } +fi + + +## +## Check for gtkdocize +## +test -z "${XDT_PROG_GTKDOCIZE}" && XDT_PROG_GTKDOCIZE="gtkdocize" +if grep "^GTK_DOC_CHECK" "${CONFIGURE_FILE}" >/dev/null 2>&1; then + (${XDT_PROG_GTKDOCIZE} --version) </dev/null >/dev/null 2>&1 || { + cat >&2 <<EOF +xdt-autogen: You have "gtk-doc" installed. You can get if from + http://www.gtk.org/gtk-doc/. +EOF + exit 1 + } +fi + + +## +## Check for aclocal +## +test -z "${XDT_PROG_ACLOCAL}" && XDT_PROG_ACLOCAL="aclocal" +(${XDT_PROG_ACLOCAL} --version) </dev/null >/dev/null 2>&1 || { + cat >&2 <<EOF +xdt-autogen: You must have "autoconf" 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}" && XDT_PROG_AUTOHEADER="autoheader" +if grep "^AM_CONFIG_HEADER" "${CONFIGURE_FILE}" >/dev/null 2>&1; then + (${XDT_PROG_AUTOHEADER} --version) </dev/null >/dev/null 2>&1 || { + 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 + } +fi + + +## +## Check for automake +## +test -z "${XDT_PROG_AUTOMAKE}" && XDT_PROG_AUTOMAKE="automake" +(${XDT_PROG_AUTOMAKE} --version) </dev/null >/dev/null 2>&1 || { + 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 +## +ACLOCAL_FLAGS="${ACLOCAL_FLAGS} ${XDT_ACLOCAL_FLAGS}" +test -d "${SOURCE_DIR}/m4macros" && ACLOCAL_FLAGS="${ACLOCAL_FLAGS} -I ${SOURCE_DIR}/m4macros" +test -d "${SOURCE_DIR}/m4" && ACLOCAL_FLAGS="${ACLOCAL_FLAGS} -I ${SOURCE_DIR}/m4" +for path in `echo "${XDG_DATA_DIRS}" | sed 's,:, ,g'`; do + if test -d "${path}/xfce4/dev-tools/m4macros"; then + ACLOCAL_FLAGS="${ACLOCAL_FLAGS} -I ${path}/xfce4/dev-tools/m4macros" + elif test -d "${path}/xfce4/dev-tools/m4"; then + ACLOCAL_FLAGS="${ACLOCAL_FLAGS} -I ${path}/xfce4/dev-tools/m4" + fi +done + + +## +## Do the real work(TM) +## +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 grep "^AC_PROG_LIBTOOL" "${CONFIGURE_FILE}" >/dev/null 2>&1; then + (echo "Running ${XDT_PROG_LIBTOOLIZE} --force --copy..." && + ${XDT_PROG_LIBTOOLIZE} --force --copy) || exit 1 +fi + +if grep "^GTK_DOC_CHECK" "${CONFIGURE_FILE}" >/dev/null 2>&1; then + (echo "Running ${XDT_PROG_GTKDOCIZE} --copy..." && + ${XDT_PROG_GTKDOCIZE} --copy) || exit 1 +fi + +(echo "Running ${XDT_PROG_ACLOCAL} ${ACLOCAL_FLAGS}..." && + ${XDT_PROG_ACLOCAL} ${ACLOCAL_FLAGS}) || exit 1 + +if grep "^AM_CONFIG_HEADER" "${CONFIGURE_FILE}" >/dev/null 2>&1; then + (echo "Running ${XDT_PROG_AUTOHEADER}..." && + ${XDT_PROG_AUTOHEADER}) || exit 1 +fi + +(echo "Running ${XDT_PROG_AUTOMAKE} --add-missing --copy --gnu..." && + ${XDT_PROG_AUTOMAKE} --add-missing --copy --gnu) || exit 1 + +(echo "Running ${XDT_PROG_AUTOCONF}..." && + ${XDT_PROG_AUTOCONF}) || exit 1 + + +## +## Run configure +## +(echo "Running ${SOURCE_DIR}/configure ${CONFIGURE_FLAGS}..." && + cd "${SOURCE_DIR}" && + ./configure ${CONFIGURE_FLAGS} && + echo "Now type \"make\" to compile.") || exit 1 + + +# vi:set ts=2 sw=2 et ai: diff --git a/xfce4-dev-tools.spec.in b/xfce4-dev-tools.spec.in new file mode 100644 index 0000000..f85c320 --- /dev/null +++ b/xfce4-dev-tools.spec.in @@ -0,0 +1,33 @@ +Summary: Xfce developer tools +Name: @PACKAGE_TARNAME@ +Version: @PACKAGE_VERSION@ +Release: 1 +License: GPL +URL: http://www.xfce.org/ +Source0: Applications/X11 +BuildRoot: %{_tmppath}/%{name}-root + +%description: +This package contains common tools required by Xfce developers and people +that want to build Xfce from CVS. In addition, this package contains the +Xfce developer's handbook. + +%prep +%setup -q + +%build +%configure +make + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README +%{_bindir}/ +%{_datadir}/ |