summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS0
-rw-r--r--COPYING340
-rw-r--r--ChangeLog0
-rw-r--r--INSTALL236
-rw-r--r--Makefile.am27
-rw-r--r--NEWS0
-rw-r--r--README0
-rwxr-xr-xautogen.sh103
-rw-r--r--common/gst-autogen.sh308
-rw-r--r--common/gtk-doc.mak260
-rw-r--r--common/m4/as-ac-expand.m443
-rw-r--r--common/m4/as-auto-alt.m450
-rw-r--r--common/m4/as-compiler-flag.m433
-rw-r--r--common/m4/as-libtool.m445
-rw-r--r--common/m4/as-python.m4152
-rw-r--r--common/m4/as-scrub-include.m436
-rw-r--r--common/m4/as-version.m471
-rw-r--r--common/m4/codeset.m423
-rw-r--r--common/m4/gettext.m4587
-rw-r--r--common/m4/glibc21.m432
-rw-r--r--common/m4/gst-args.m4276
-rw-r--r--common/m4/gst-check.m4138
-rw-r--r--common/m4/gst-debuginfo.m446
-rw-r--r--common/m4/gst-default.m445
-rw-r--r--common/m4/gst-doc.m4148
-rw-r--r--common/m4/gst-error.m471
-rw-r--r--common/m4/gst-feature.m4285
-rw-r--r--common/m4/gst-function.m463
-rw-r--r--common/m4/gst-gettext.m421
-rw-r--r--common/m4/gst-glib2.m426
-rw-r--r--common/m4/gst-plugin-docs.m447
-rw-r--r--common/m4/gst-plugindir.m417
-rw-r--r--common/m4/gst-valgrind.m435
-rw-r--r--common/m4/gst.m410
-rw-r--r--common/m4/iconv.m4103
-rw-r--r--common/m4/intdiv0.m472
-rw-r--r--common/m4/inttypes-pri.m432
-rw-r--r--common/m4/inttypes.m427
-rw-r--r--common/m4/inttypes_h.m428
-rw-r--r--common/m4/isc-posix.m426
-rw-r--r--common/m4/lcmessage.m432
-rw-r--r--common/m4/lib-ld.m497
-rw-r--r--common/m4/lib-link.m4554
-rw-r--r--common/m4/lib-prefix.m4148
-rw-r--r--common/m4/progtest.m459
-rw-r--r--common/m4/stdint_h.m428
-rw-r--r--common/m4/uintmax_t.m429
-rw-r--r--common/m4/ulonglong.m423
-rw-r--r--configure.ac316
-rw-r--r--docs/Makefile.am6
-rw-r--r--docs/libs/Makefile.am73
-rw-r--r--docs/libs/farsight-libs-docs.sgml19
-rw-r--r--docs/libs/farsight-libs-overrides.txt0
-rw-r--r--docs/libs/farsight-libs-sections.txt111
-rw-r--r--gst-libs/Makefile.am1
-rw-r--r--gst-libs/gst/Makefile.am8
-rw-r--r--gst-libs/gst/farsight/Makefile.am41
-rw-r--r--gst-libs/gst/farsight/fs-candidate.c2
-rw-r--r--gst-libs/gst/farsight/fs-candidate.h1
-rw-r--r--gst-libs/gst/farsight/fs-codec.c8
-rw-r--r--gst-libs/gst/farsight/fs-codec.h2
-rw-r--r--gst-libs/gst/farsight/fs-conference-iface.c4
-rw-r--r--gst-libs/gst/farsight/fs-conference-iface.h7
-rw-r--r--gst-libs/gst/farsight/fs-participant.c7
-rw-r--r--gst-libs/gst/farsight/fs-session.c11
-rw-r--r--gst-libs/gst/farsight/fs-session.h9
-rw-r--r--gst-libs/gst/farsight/fs-stream.c4
-rw-r--r--gst/Makefile.am2
-rw-r--r--gst/fsrtpconference/Makefile.am8
69 files changed, 5450 insertions, 22 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/AUTHORS
diff --git a/COPYING b/COPYING
new file mode 100644
index 00000000..623b6258
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/ChangeLog
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 00000000..23e5f25d
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,236 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 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' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', 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
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files 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 option `--target=TYPE' 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
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script). Here is a another example:
+
+ /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
+
+`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 00000000..4db12c80
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,27 @@
+DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
+
+SUBDIRS_EXT =
+
+SUBDIRS = \
+ gst-libs \
+ gst $(SUBDIRS_EXT) \
+ docs
+#
+# tests \
+# docs \
+# pkgconfig
+
+DIST_SUBDIRS = \
+ gst-libs \
+ gst $(SUBDIRS_EXT) \
+ docs
+#
+# tests \
+# docs \
+# pkgconfig
+
+EXTRA_DIST = \
+ AUTHORS COPYING COPYING.LIB NEWS README RELEASE REQUIREMENTS \
+ ChangeLog autogen.sh
+
+ACLOCAL_AMFLAGS = -I common/m4
diff --git a/NEWS b/NEWS
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/NEWS
diff --git a/README b/README
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/README
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 00000000..812f23eb
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,103 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+DIE=0
+package=farsight2
+srcfile=gst-libs/gst/farsight/fs-candidate.c
+
+# a quick cvs co to ease the transition
+if test ! -d common;
+then
+ echo "+ getting common/ from cvs"
+ if test -e CVS/Tag
+ then
+ TAG="-r `tail -c +2 CVS/Tag`"
+ fi
+ cvs co $TAG common
+fi
+
+# source helper functions
+if test ! -f common/gst-autogen.sh;
+then
+ echo There is something wrong with your source tree.
+ echo You are missing common/gst-autogen.sh
+ exit 1
+fi
+. common/gst-autogen.sh
+
+CONFIGURE_DEF_OPT='--enable-gtk-doc --enable-plugin-docs'
+
+autogen_options $@
+
+echo -n "+ check for build tools"
+if test ! -z "$NOCHECK"; then echo " skipped"; else echo; fi
+version_check "autoconf" "$AUTOCONF autoconf autoconf259 autoconf257 autoconf-2.54 autoconf-2.53 autoconf-2.52" \
+ "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
+version_check "automake" "$AUTOMAKE automake automake-1.9 automake19 automake-1.7 automake-1.6 automake-1.5" \
+ "ftp://ftp.gnu.org/pub/gnu/automake/" 1 7 || DIE=1
+version_check "libtoolize" "$LIBTOOLIZE libtoolize glibtoolize" \
+ "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 5 0 || DIE=1
+version_check "pkg-config" "" \
+ "http://www.freedesktop.org/software/pkgconfig" 0 8 0 || DIE=1
+
+die_check $DIE
+
+autoconf_2_52d_check || DIE=1
+aclocal_check || DIE=1
+autoheader_check || DIE=1
+
+die_check $DIE
+
+# if no arguments specified then this will be printed
+if test -z "$*"; then
+ echo "+ checking for autogen.sh options"
+ echo " This autogen script will automatically run ./configure as:"
+ echo " ./configure $CONFIGURE_DEF_OPT"
+ echo " To pass any additional options, please specify them on the $0"
+ echo " command line."
+fi
+
+toplevel_check $srcfile
+
+tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
+tool_run "$libtoolize" "--copy --force"
+tool_run "$autoheader"
+
+# touch the stamp-h.in build stamp so we don't re-run autoheader in maintainer mode -- wingo
+echo timestamp > stamp-h.in 2> /dev/null
+
+tool_run "$autoconf"
+tool_run "$automake" "-a -c"
+
+# if enable exists, add an -enable option for each of the lines in that file
+if test -f enable; then
+ for a in `cat enable`; do
+ CONFIGURE_FILE_OPT="--enable-$a"
+ done
+fi
+
+# if disable exists, add an -disable option for each of the lines in that file
+if test -f disable; then
+ for a in `cat disable`; do
+ CONFIGURE_FILE_OPT="$CONFIGURE_FILE_OPT --disable-$a"
+ done
+fi
+
+test -n "$NOCONFIGURE" && {
+ echo "+ skipping configure stage for package $package, as requested."
+ echo "+ autogen.sh done."
+ exit 0
+}
+
+echo "+ running configure ... "
+test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT"
+test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT"
+test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CONFIGURE_FILE_OPT"
+echo
+
+./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || {
+ echo " configure failed"
+ exit 1
+}
+
+echo "Now type 'make' to compile $package."
diff --git a/common/gst-autogen.sh b/common/gst-autogen.sh
new file mode 100644
index 00000000..7b312124
--- /dev/null
+++ b/common/gst-autogen.sh
@@ -0,0 +1,308 @@
+# a silly hack that generates autoregen.sh but it's handy
+# Remove the old autoregen.sh first to create a new file,
+# as the current one may be being read by the shell executing
+# this script.
+if [ -f "autoregen.sh" ]; then
+ rm autoregen.sh
+fi
+echo "#!/bin/sh" > autoregen.sh
+echo "./autogen.sh $@ \$@" >> autoregen.sh
+chmod +x autoregen.sh
+
+# helper functions for autogen.sh
+
+debug ()
+# print out a debug message if DEBUG is a defined variable
+{
+ if test ! -z "$DEBUG"
+ then
+ echo "DEBUG: $1"
+ fi
+}
+
+version_check ()
+# check the version of a package
+# first argument : package name (executable)
+# second argument : optional path where to look for it instead
+# third argument : source download url
+# rest of arguments : major, minor, micro version
+# all consecutive ones : suggestions for binaries to use
+# (if not specified in second argument)
+{
+ PACKAGE=$1
+ PKG_PATH=$2
+ URL=$3
+ MAJOR=$4
+ MINOR=$5
+ MICRO=$6
+
+ # for backwards compatibility, we let PKG_PATH=PACKAGE when PKG_PATH null
+ if test -z "$PKG_PATH"; then PKG_PATH=$PACKAGE; fi
+ debug "major $MAJOR minor $MINOR micro $MICRO"
+ VERSION=$MAJOR
+ if test ! -z "$MINOR"; then VERSION=$VERSION.$MINOR; else MINOR=0; fi
+ if test ! -z "$MICRO"; then VERSION=$VERSION.$MICRO; else MICRO=0; fi
+
+ debug "major $MAJOR minor $MINOR micro $MICRO"
+
+ for SUGGESTION in $PKG_PATH; do
+ COMMAND="$SUGGESTION"
+
+ # don't check if asked not to
+ test -z "$NOCHECK" && {
+ echo -n " checking for $COMMAND >= $VERSION ... "
+ } || {
+ # we set a var with the same name as the package, but stripped of
+ # unwanted chars
+ VAR=`echo $PACKAGE | sed 's/-//g'`
+ debug "setting $VAR"
+ eval $VAR="$COMMAND"
+ return 0
+ }
+
+ debug "checking version with $COMMAND"
+ ($COMMAND --version) < /dev/null > /dev/null 2>&1 ||
+ {
+ echo "not found."
+ continue
+ }
+ # strip everything that's not a digit, then use cut to get the first field
+ pkg_version=`$COMMAND --version|head -n 1|sed 's/^.*)[^0-9]*//'|cut -d' ' -f1`
+ debug "pkg_version $pkg_version"
+ # remove any non-digit characters from the version numbers to permit numeric
+ # comparison
+ pkg_major=`echo $pkg_version | cut -d. -f1 | sed s/[a-zA-Z\-].*//g`
+ pkg_minor=`echo $pkg_version | cut -d. -f2 | sed s/[a-zA-Z\-].*//g`
+ pkg_micro=`echo $pkg_version | cut -d. -f3 | sed s/[a-zA-Z\-].*//g`
+ test -z "$pkg_major" && pkg_major=0
+ test -z "$pkg_minor" && pkg_minor=0
+ test -z "$pkg_micro" && pkg_micro=0
+ debug "found major $pkg_major minor $pkg_minor micro $pkg_micro"
+
+ #start checking the version
+ debug "version check"
+
+ # reset check
+ WRONG=
+
+ if [ ! "$pkg_major" -gt "$MAJOR" ]; then
+ debug "major: $pkg_major <= $MAJOR"
+ if [ "$pkg_major" -lt "$MAJOR" ]; then
+ debug "major: $pkg_major < $MAJOR"
+ WRONG=1
+ elif [ ! "$pkg_minor" -gt "$MINOR" ]; then
+ debug "minor: $pkg_minor <= $MINOR"
+ if [ "$pkg_minor" -lt "$MINOR" ]; then
+ debug "minor: $pkg_minor < $MINOR"
+ WRONG=1
+ elif [ "$pkg_micro" -lt "$MICRO" ]; then
+ debug "micro: $pkg_micro < $MICRO"
+ WRONG=1
+ fi
+ fi
+ fi
+
+ if test ! -z "$WRONG"; then
+ echo "found $pkg_version, not ok !"
+ continue
+ else
+ echo "found $pkg_version, ok."
+ # we set a var with the same name as the package, but stripped of
+ # unwanted chars
+ VAR=`echo $PACKAGE | sed 's/-//g'`
+ debug "setting $VAR"
+ eval $VAR="$COMMAND"
+ return 0
+ fi
+ done
+
+ echo "not found !"
+ echo "You must have $PACKAGE installed to compile $package."
+ echo "Download the appropriate package for your distribution,"
+ echo "or get the source tarball at $URL"
+ return 1;
+}
+
+aclocal_check ()
+{
+ # normally aclocal is part of automake
+ # so we expect it to be in the same place as automake
+ # so if a different automake is supplied, we need to adapt as well
+ # so how's about replacing automake with aclocal in the set var,
+ # and saving that in $aclocal ?
+ # note, this will fail if the actual automake isn't called automake*
+ # or if part of the path before it contains it
+ if [ -z "$automake" ]; then
+ echo "Error: no automake variable set !"
+ return 1
+ else
+ aclocal=`echo $automake | sed s/automake/aclocal/`
+ debug "aclocal: $aclocal"
+ if [ "$aclocal" != "aclocal" ];
+ then
+ CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-aclocal=$aclocal"
+ fi
+ if [ ! -x `which $aclocal` ]; then
+ echo "Error: cannot execute $aclocal !"
+ return 1
+ fi
+ fi
+}
+
+autoheader_check ()
+{
+ # same here - autoheader is part of autoconf
+ # use the same voodoo
+ if [ -z "$autoconf" ]; then
+ echo "Error: no autoconf variable set !"
+ return 1
+ else
+ autoheader=`echo $autoconf | sed s/autoconf/autoheader/`
+ debug "autoheader: $autoheader"
+ if [ "$autoheader" != "autoheader" ];
+ then
+ CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoheader=$autoheader"
+ fi
+ if [ ! -x `which $autoheader` ]; then
+ echo "Error: cannot execute $autoheader !"
+ return 1
+ fi
+ fi
+
+}
+autoconf_2_52d_check ()
+{
+ # autoconf 2.52d has a weird issue involving a yes:no error
+ # so don't allow it's use
+ test -z "$NOCHECK" && {
+ ac_version=`$autoconf --version|head -n 1|sed 's/^[a-zA-Z\.\ ()]*//;s/ .*$//'`
+ if test "$ac_version" = "2.52d"; then
+ echo "autoconf 2.52d has an issue with our current build."
+ echo "We don't know who's to blame however. So until we do, get a"
+ echo "regular version. RPM's of a working version are on the gstreamer site."
+ exit 1
+ fi
+ }
+ return 0
+}
+
+die_check ()
+{
+ # call with $DIE
+ # if set to 1, we need to print something helpful then die
+ DIE=$1
+ if test "x$DIE" = "x1";
+ then
+ echo
+ echo "- Please get the right tools before proceeding."
+ echo "- Alternatively, if you're sure we're wrong, run with --nocheck."
+ exit 1
+ fi
+}
+
+autogen_options ()
+{
+ if test "x$1" = "x"; then
+ return 0
+ fi
+
+ while test "x$1" != "x" ; do
+ optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ case "$1" in
+ --noconfigure)
+ NOCONFIGURE=defined
+ AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --noconfigure"
+ echo "+ configure run disabled"
+ shift
+ ;;
+ --nocheck)
+ AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --nocheck"
+ NOCHECK=defined
+ echo "+ autotools version check disabled"
+ shift
+ ;;
+ --debug)
+ DEBUG=defined
+ AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --debug"
+ echo "+ debug output enabled"
+ shift
+ ;;
+ --prefix=*)
+ CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT --prefix=$optarg"
+ echo "+ passing --prefix=$optarg to configure"
+ shift
+ ;;
+ --prefix)
+ shift
+ echo "DEBUG: $1"
+ CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT --prefix=$1"
+ echo "+ passing --prefix=$1 to configure"
+ shift
+ ;;
+
+ -h|--help)
+ echo "autogen.sh (autogen options) -- (configure options)"
+ echo "autogen.sh help options: "
+ echo " --noconfigure don't run the configure script"
+ echo " --nocheck don't do version checks"
+ echo " --debug debug the autogen process"
+ echo " --prefix will be passed on to configure"
+ echo
+ echo " --with-autoconf PATH use autoconf in PATH"
+ echo " --with-automake PATH use automake in PATH"
+ echo
+ echo "to pass options to configure, put them as arguments after -- "
+ exit 1
+ ;;
+ --with-automake=*)
+ AUTOMAKE=$optarg
+ echo "+ using alternate automake in $optarg"
+ CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-automake=$AUTOMAKE"
+ shift
+ ;;
+ --with-autoconf=*)
+ AUTOCONF=$optarg
+ echo "+ using alternate autoconf in $optarg"
+ CONFIGURE_DEF_OPT="$CONFIGURE_DEF_OPT --with-autoconf=$AUTOCONF"
+ shift
+ ;;
+ --disable*|--enable*|--with*)
+ echo "+ passing option $1 to configure"
+ CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $1"
+ shift
+ ;;
+ --) shift ; break ;;
+ *) echo "- ignoring unknown autogen.sh argument $1"; shift ;;
+ esac
+ done
+
+ for arg do CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $arg"; done
+ if test ! -z "$CONFIGURE_EXT_OPT"
+ then
+ echo "+ options passed to configure: $CONFIGURE_EXT_OPT"
+ fi
+}
+
+toplevel_check ()
+{
+ srcfile=$1
+ test -f $srcfile || {
+ echo "You must run this script in the top-level $package directory"
+ exit 1
+ }
+}
+
+
+tool_run ()
+{
+ tool=$1
+ options=$2
+ run_if_fail=$3
+ echo "+ running $tool $options..."
+ $tool $options || {
+ echo
+ echo $tool failed
+ eval $run_if_fail
+ exit 1
+ }
+}
diff --git a/common/gtk-doc.mak b/common/gtk-doc.mak
new file mode 100644
index 00000000..ea203d87
--- /dev/null
+++ b/common/gtk-doc.mak
@@ -0,0 +1,260 @@
+###########################################################################
+# Everything below here is generic and you shouldn't need to change it.
+###########################################################################
+# thomas: except of course that we did
+
+# thomas: copied from glib-2
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+# thomas: make docs parallel installable
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@
+
+EXTRA_DIST = \
+ $(content_files) \
+ $(extra_files) \
+ $(HTML_IMAGES) \
+ $(DOC_MAIN_SGML_FILE) \
+ $(DOC_MODULE).types \
+ $(DOC_OVERRIDES) \
+ $(DOC_MODULE)-sections.txt
+
+DOC_STAMPS = \
+ scan-build.stamp \
+ tmpl-build.stamp \
+ sgml-build.stamp \
+ html-build.stamp \
+ $(srcdir)/tmpl.stamp \
+ $(srcdir)/sgml.stamp \
+ $(srcdir)/html.stamp
+
+SCANOBJ_FILES = \
+ $(DOC_MODULE).args \
+ $(DOC_MODULE).hierarchy \
+ $(DOC_MODULE).interfaces \
+ $(DOC_MODULE).prerequisites \
+ .libs/$(DOC_MODULE)-scan.o \
+ $(DOC_MODULE).signals
+
+CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+all-local: html-build.stamp
+
+#### scan ####
+
+# in the case of non-srcdir builds, the built gst directory gets added
+# to gtk-doc scanning; but only then, to avoid duplicates
+scan-build.stamp: $(HFILE_GLOB) $(SCANOBJ_DEPS) $(basefiles)
+ @echo '*** Scanning header files ***'
+ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null; \
+ then \
+ if test x"$(srcdir)" != x. ; then \
+ cp $(srcdir)/$(DOC_MODULE).types . ; \
+ chmod u+w $(DOC_MODULE).types ; \
+ fi ; \
+ GST_PLUGIN_SYSTEM_PATH=`cd $(top_builddir) && pwd` \
+ GST_PLUGIN_PATH= \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" \
+ CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" \
+ gtkdoc-scangobj --type-init-func="gst_init(NULL,NULL)" \
+ --module=$(DOC_MODULE) ; \
+ else \
+ cd $(srcdir) ; \
+ for i in $(SCANOBJ_FILES) ; do \
+ test -f $$i || touch $$i ; \
+ done \
+ fi
+ if test "x$(top_srcdir)" != "x$(top_builddir)"; \
+ then \
+ export BUILT_OPTIONS="--source-dir=$(DOC_BUILD_DIR)"; \
+ fi; \
+ gtkdoc-scan \
+ $(SCAN_OPTIONS) $(EXTRA_HFILES) \
+ --module=$(DOC_MODULE) \
+ --source-dir=$(DOC_SOURCE_DIR) \
+ $$BUILT_OPTIONS \
+ --ignore-headers="$(IGNORE_HFILES)"
+ touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
+ @true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES)
+ @echo '*** Rebuilding template files ***'
+ if test x"$(srcdir)" != x. ; then \
+ cp $(srcdir)/$(DOC_MODULE)-sections.txt . ; \
+ touch $(DOC_MODULE)-decl.txt ; \
+ fi
+ gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log
+ @if test -s $(DOC_MODULE)-unused.txt; then \
+ exit $(if $(DOCS_ARE_INCOMPLETE_PLEASE_FIXME),0,1); fi
+ rm -f tmpl-build.log
+ touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+ @true
+
+#### xml ####
+
+### FIXME: make this error out again when docs are fixed for 0.9
+sgml-build.stamp: tmpl.stamp $(CFILE_GLOB)
+ @echo '*** Building XML ***'
+ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) | tee sgml-build.log
+ @if grep "WARNING:" sgml-build.log > /dev/null; then true; fi # exit 1; fi
+ rm sgml-build.log
+ touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+ @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ @echo '*** Building HTML ***'
+ if test -d html; then rm -rf html; fi
+ mkdir html
+ cp $(srcdir)/$(DOC_MAIN_SGML_FILE) html
+ @for f in $(content_files); do cp $(srcdir)/$$f html; done
+ cp -pr xml html
+ cp ../version.entities html
+ cd html && gtkdoc-mkhtml $(DOC_MODULE) $(DOC_MAIN_SGML_FILE)
+ rm -f html/$(DOC_MAIN_SGML_FILE)
+ rm -rf html/xml
+ rm -f html/version.entities
+ test "x$(HTML_IMAGES)" = "x" || for i in "" $(HTML_IMAGES) ; do \
+ if test "$$i" != ""; then cp $(srcdir)/$$i html ; fi; done
+ @echo '-- Fixing Crossreferences'
+ gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+ touch html-build.stamp
+else
+all-local:
+endif
+
+clean-local:
+ rm -f *~ *.bak
+ rm -rf xml html
+ rm -rf .libs
+
+maintainer-clean-local: clean
+ cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+# company: don't delete .sgml and -sections.txt as they're in CVS
+# FIXME : thomas added all sgml files and some other things to make
+# make distcheck work
+distclean-local: clean
+ rm -f $(DOC_MODULE)-decl-list.txt
+ rm -f $(DOC_MODULE)-decl.txt
+ rm -f $(DOC_MODULE)-undocumented.txt
+ rm -f $(DOC_MODULE)-unused.txt
+ rm -rf tmpl/*.sgml.bak
+ rm -f $(DOC_MODULE).hierarchy
+ rm -f *.stamp || true
+ if test x"$(srcdir)" != x. ; then \
+ rm -f $(DOC_MODULE)-docs.sgml ; \
+ rm -f $(DOC_MODULE).types ; \
+ rm -f $(DOC_MODULE).interfaces ; \
+ rm -f $(DOC_MODULE)-overrides.txt ; \
+ rm -f $(DOC_MODULE).prerequisites ; \
+ rm -f $(DOC_MODULE)-sections.txt ; \
+ rm -rf tmpl/*.sgml ; \
+ fi
+ rm -rf *.o
+
+# thomas: make docs parallel installable; devhelp requires majorminor too
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
+ (installfiles=`echo ./html/*.html`; \
+ if test "$$installfiles" = './html/*.html'; \
+ then echo '-- Nothing to install' ; \
+ else \
+ for i in $$installfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+ done; \
+ pngfiles=`echo ./html/*.png`; \
+ if test "$$pngfiles" != './html/*.png'; then \
+ for i in $$pngfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+ done; \
+ fi; \
+ echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \
+ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \
+ $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
+ if test -e $(srcdir)/html/$(DOC_MODULE).devhelp2; then \
+ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp2 \
+ $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
+ fi; \
+ echo '-- Installing $(srcdir)/html/index.sgml' ; \
+ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
+ if test -e $(srcdir)/html/style.css; then \
+ echo '-- Installing $(srcdir)/html/style.css' ; \
+ $(INSTALL_DATA) $(srcdir)/html/style.css $(DESTDIR)$(TARGET_DIR); \
+ fi; \
+ fi)
+uninstall-local:
+ (installfiles=`echo ./html/*.html`; \
+ if test "$$installfiles" = './html/*.html'; \
+ then echo '-- Nothing to uninstall' ; \
+ else \
+ for i in $$installfiles; do \
+ rmfile=`basename $$i` ; \
+ echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
+ rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
+ done; \
+ pngfiles=`echo ./html/*.png`; \
+ if test "$$pngfiles" != './html/*.png'; then \
+ for i in $$pngfiles; do \
+ rmfile=`basename $$i` ; \
+ echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \
+ rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \
+ done; \
+ fi; \
+ echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \
+ rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \
+ if test -e $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \
+ rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \
+ fi; \
+ echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \
+ rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \
+ if test -e $(DESTDIR)$(TARGET_DIR)/style.css; then \
+ echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/style.css' ; \
+ rm -f $(DESTDIR)$(TARGET_DIR)/style.css; \
+ fi; \
+ fi)
+ if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR) 2>/dev/null; fi; true
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+ @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+ mkdir $(distdir)/tmpl
+ mkdir $(distdir)/xml
+ mkdir $(distdir)/html
+ -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+ -cp $(srcdir)/sgml/*.xml $(distdir)/xml
+ -cp $(srcdir)/html/index.sgml $(distdir)/html
+ -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html
+ -cp $(srcdir)/html/$(DOC_MODULE).devhelp* $(distdir)/html
+
+ images=$(HTML_IMAGES) ; \
+ for i in "" $$images ; do \
+ if test "$$i" != ""; then cp $(srcdir)/$$i $(distdir)/html ; fi; \
+ done
+
+.PHONY : dist-hook-local
diff --git a/common/m4/as-ac-expand.m4 b/common/m4/as-ac-expand.m4
new file mode 100644
index 00000000..d6c9e330
--- /dev/null
+++ b/common/m4/as-ac-expand.m4
@@ -0,0 +1,43 @@
+dnl as-ac-expand.m4 0.2.0
+dnl autostars m4 macro for expanding directories using configure's prefix
+dnl thomas@apestaart.org
+
+dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
+dnl example
+dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
+dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
+
+AC_DEFUN([AS_AC_EXPAND],
+[
+ EXP_VAR=[$1]
+ FROM_VAR=[$2]
+
+ dnl first expand prefix and exec_prefix if necessary
+ prefix_save=$prefix
+ exec_prefix_save=$exec_prefix
+
+ dnl if no prefix given, then use /usr/local, the default prefix
+ if test "x$prefix" = "xNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ dnl if no exec_prefix given, then use prefix
+ if test "x$exec_prefix" = "xNONE"; then
+ exec_prefix=$prefix
+ fi
+
+ full_var="$FROM_VAR"
+ dnl loop until it doesn't change anymore
+ while true; do
+ new_full_var="`eval echo $full_var`"
+ if test "x$new_full_var" = "x$full_var"; then break; fi
+ full_var=$new_full_var
+ done
+
+ dnl clean up
+ full_var=$new_full_var
+ AC_SUBST([$1], "$full_var")
+
+ dnl restore prefix and exec_prefix
+ prefix=$prefix_save
+ exec_prefix=$exec_prefix_save
+])
diff --git a/common/m4/as-auto-alt.m4 b/common/m4/as-auto-alt.m4
new file mode 100644
index 00000000..3f7920dd
--- /dev/null
+++ b/common/m4/as-auto-alt.m4
@@ -0,0 +1,50 @@
+dnl as-auto-alt.m4 0.0.2
+dnl autostars m4 macro for supplying alternate autotools versions to configure
+dnl thomas@apestaart.org
+dnl
+dnl AS_AUTOTOOLS_ALTERNATE()
+dnl
+dnl supplies --with arguments for autoconf, autoheader, automake, aclocal
+
+AC_DEFUN([AS_AUTOTOOLS_ALTERNATE],
+[
+ dnl allow for different autoconf version
+ AC_ARG_WITH(autoconf,
+ AC_HELP_STRING([--with-autoconf],
+ [use a different autoconf for regeneration of Makefiles]),
+ [
+ unset AUTOCONF
+ AM_MISSING_PROG(AUTOCONF, ${withval})
+ AC_MSG_NOTICE([Using $AUTOCONF as autoconf])
+ ])
+
+ dnl allow for different autoheader version
+ AC_ARG_WITH(autoheader,
+ AC_HELP_STRING([--with-autoheader],
+ [use a different autoheader for regeneration of Makefiles]),
+ [
+ unset AUTOHEADER
+ AM_MISSING_PROG(AUTOHEADER, ${withval})
+ AC_MSG_NOTICE([Using $AUTOHEADER as autoheader])
+ ])
+
+ dnl allow for different automake version
+ AC_ARG_WITH(automake,
+ AC_HELP_STRING([--with-automake],
+ [use a different automake for regeneration of Makefiles]),
+ [
+ unset AUTOMAKE
+ AM_MISSING_PROG(AUTOMAKE, ${withval})
+ AC_MSG_NOTICE([Using $AUTOMAKE as automake])
+ ])
+
+ dnl allow for different aclocal version
+ AC_ARG_WITH(aclocal,
+ AC_HELP_STRING([--with-aclocal],
+ [use a different aclocal for regeneration of Makefiles]),
+ [
+ unset ACLOCAL
+ AM_MISSING_PROG(ACLOCAL, ${withval})
+ AC_MSG_NOTICE([Using $ACLOCAL as aclocal])
+ ])
+])
diff --git a/common/m4/as-compiler-flag.m4 b/common/m4/as-compiler-flag.m4
new file mode 100644
index 00000000..aba31b1c
--- /dev/null
+++ b/common/m4/as-compiler-flag.m4
@@ -0,0 +1,33 @@
+dnl as-compiler-flag.m4 0.1.0
+
+dnl autostars m4 macro for detection of compiler flags
+
+dnl David Schleef <ds@schleef.org>
+
+dnl $Id: as-compiler-flag.m4,v 1.1 2004/06/01 09:33:45 thomasvs Exp $
+
+dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
+dnl Tries to compile with the given CFLAGS.
+dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
+dnl and ACTION-IF-NOT-ACCEPTED otherwise.
+
+AC_DEFUN([AS_COMPILER_FLAG],
+[
+ AC_MSG_CHECKING([to see if compiler understands $1])
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+
+ AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
+ CFLAGS="$save_CFLAGS"
+
+ if test "X$flag_ok" = Xyes ; then
+ $2
+ true
+ else
+ $3
+ true
+ fi
+ AC_MSG_RESULT([$flag_ok])
+])
+
diff --git a/common/m4/as-libtool.m4 b/common/m4/as-libtool.m4
new file mode 100644
index 00000000..73dec1f4
--- /dev/null
+++ b/common/m4/as-libtool.m4
@@ -0,0 +1,45 @@
+dnl as-libtool.m4 0.1.4
+
+dnl autostars m4 macro for libtool versioning
+
+dnl Thomas Vander Stichele <thomas at apestaart dot org>
+
+dnl $Id: as-libtool.m4,v 1.6 2004/06/01 10:04:44 thomasvs Exp $
+
+dnl AS_LIBTOOL(PREFIX, CURRENT, REVISION, AGE, [RELEASE])
+
+dnl example
+dnl AS_LIBTOOL(GST, 2, 0, 0)
+
+dnl this macro
+dnl - defines [$PREFIX]_CURRENT, REVISION and AGE
+dnl - defines [$PREFIX]_LIBVERSION
+dnl - defines [$PREFIX]_LT_LDFLAGS to set versioning
+dnl - AC_SUBST's them all
+
+dnl if RELEASE is given, then add a -release option to the LDFLAGS
+dnl with the given release version
+dnl then use [$PREFIX]_LT_LDFLAGS in the relevant Makefile.am's
+
+dnl call AM_PROG_LIBTOOL after this call
+
+AC_DEFUN([AS_LIBTOOL],
+[
+ [$1]_CURRENT=[$2]
+ [$1]_REVISION=[$3]
+ [$1]_AGE=[$4]
+ [$1]_LIBVERSION=[$2]:[$3]:[$4]
+ AC_SUBST([$1]_CURRENT)
+ AC_SUBST([$1]_REVISION)
+ AC_SUBST([$1]_AGE)
+ AC_SUBST([$1]_LIBVERSION)
+
+ [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -version-info $[$1]_LIBVERSION"
+ if test ! -z "[$5]"
+ then
+ [$1]_LT_LDFLAGS="$[$1]_LT_LDFLAGS -release [$5]"
+ fi
+ AC_SUBST([$1]_LT_LDFLAGS)
+
+ AC_LIBTOOL_DLOPEN
+])
diff --git a/common/m4/as-python.m4 b/common/m4/as-python.m4
new file mode 100644
index 00000000..eb9b1754
--- /dev/null
+++ b/common/m4/as-python.m4
@@ -0,0 +1,152 @@
+## ------------------------
+## Python file handling
+## From Andrew Dalke
+## Updated by James Henstridge
+## Updated by Andy Wingo to loop through possible pythons
+## ------------------------
+
+# AS_PATH_PYTHON([MINIMUM-VERSION])
+
+# Adds support for distributing Python modules and packages. To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable. To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+
+# If the MINIMUM-VERSION argument is passed, AS_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement. MINIMUM-VERSION should consist of
+# numbers and dots only.
+
+# Updated to loop over all possible python binaries by Andy Wingo
+# <wingo@pobox.com>
+# Updated to only warn and unset PYTHON if no good one is found
+
+AC_DEFUN([AS_PATH_PYTHON],
+ [
+ dnl Find a version of Python. I could check for python versions 1.4
+ dnl or earlier, but the default installation locations changed from
+ dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
+ dnl in 1.5, and I don't want to maintain that logic.
+
+ dnl should we do the version check?
+ PYTHON_CANDIDATES="python python2.2 python2.1 python2.0 python2 \
+ python1.6 python1.5"
+ ifelse([$1],[],
+ [AC_PATH_PROG(PYTHON, $PYTHON_CANDIDATES)],
+ [
+ AC_MSG_NOTICE(Looking for Python version >= $1)
+ changequote(<<, >>)dnl
+ prog="
+import sys, string
+minver = '$1'
+# split string by '.' and convert to numeric
+minver_info = map(string.atoi, string.split(minver, '.'))
+# we can now do comparisons on the two lists:
+if sys.version_info >= tuple(minver_info):
+ sys.exit(0)
+else:
+ sys.exit(1)"
+ changequote([, ])dnl
+
+ python_good=false
+ for python_candidate in $PYTHON_CANDIDATES; do
+ unset PYTHON
+ AC_PATH_PROG(PYTHON, $python_candidate) 1> /dev/null 2> /dev/null
+
+ if test "x$PYTHON" = "x"; then continue; fi
+
+ if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC; then
+ AC_MSG_CHECKING(["$PYTHON":])
+ AC_MSG_RESULT([okay])
+ python_good=true
+ break;
+ else
+ dnl clear the cache val
+ unset ac_cv_path_PYTHON
+ fi
+ done
+ ])
+
+ if test "$python_good" != "true"; then
+ AC_MSG_WARN([No suitable version of python found])
+ PYTHON=
+ else
+
+ AC_MSG_CHECKING([local Python configuration])
+
+ dnl Query Python for its version number. Getting [:3] seems to be
+ dnl the best way to do this; it's what "site.py" does in the standard
+ dnl library. Need to change quote character because of [:3]
+
+ AC_SUBST(PYTHON_VERSION)
+ changequote(<<, >>)dnl
+ PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"`
+ changequote([, ])dnl
+
+
+ dnl Use the values of $prefix and $exec_prefix for the corresponding
+ dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
+ dnl distinct variables so they can be overridden if need be. However,
+ dnl general consensus is that you shouldn't need this ability.
+
+ AC_SUBST(PYTHON_PREFIX)
+ PYTHON_PREFIX='${prefix}'
+
+ AC_SUBST(PYTHON_EXEC_PREFIX)
+ PYTHON_EXEC_PREFIX='${exec_prefix}'
+
+ dnl At times (like when building shared libraries) you may want
+ dnl to know which OS platform Python thinks this is.
+
+ AC_SUBST(PYTHON_PLATFORM)
+ PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"`
+
+
+ dnl Set up 4 directories:
+
+ dnl pythondir -- where to install python scripts. This is the
+ dnl site-packages directory, not the python standard library
+ dnl directory like in previous automake betas. This behaviour
+ dnl is more consistent with lispdir.m4 for example.
+ dnl
+ dnl Also, if the package prefix isn't the same as python's prefix,
+ dnl then the old $(pythondir) was pretty useless.
+
+ AC_SUBST(pythondir)
+ pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages
+
+ dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
+ dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
+ dnl more consistent with the rest of automake.
+ dnl Maybe this should be put in python.am?
+
+ AC_SUBST(pkgpythondir)
+ pkgpythondir=\${pythondir}/$PACKAGE
+
+ dnl pyexecdir -- directory for installing python extension modules
+ dnl (shared libraries) Was PYTHON_SITE_EXEC in previous betas.
+
+ AC_SUBST(pyexecdir)
+ pyexecdir=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages
+
+ dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+ dnl Maybe this should be put in python.am?
+
+ AC_SUBST(pkgpyexecdir)
+ pkgpyexecdir=\${pyexecdir}/$PACKAGE
+
+ AC_MSG_RESULT([looks good])
+
+ fi
+])
diff --git a/common/m4/as-scrub-include.m4 b/common/m4/as-scrub-include.m4
new file mode 100644
index 00000000..96dfb8f0
--- /dev/null
+++ b/common/m4/as-scrub-include.m4
@@ -0,0 +1,36 @@
+dnl as-scrub-include.m4 0.0.4
+
+dnl autostars m4 macro for scrubbing CFLAGS of system include dirs
+dnl because gcc 3.x complains about including system including dirs
+
+dnl Thomas Vander Stichele <thomas at apestaart dot org>
+
+dnl $Id: as-scrub-include.m4,v 1.5 2004/06/12 08:19:09 thomasvs Exp $
+
+dnl This macro uses output of cpp -v and expects it to contain text that
+dnl looks a little bit like this:
+dnl #include <...> search starts here:
+dnl /usr/local/include
+dnl /usr/lib/gcc-lib/i386-redhat-linux/3.2/include
+dnl /usr/include
+dnl End of search list.
+
+dnl AS_SCRUB_INCLUDE(VAR)
+dnl example
+dnl AS_SCRUB_INCLUDE(CFLAGS)
+dnl will remove all system include dirs from the given CFLAGS
+
+AC_DEFUN([AS_SCRUB_INCLUDE],
+[
+ GIVEN_CFLAGS=$[$1]
+ INCLUDE_DIRS=`echo | cpp -v 2>&1`
+
+ dnl remove everything from this output between the "starts here" and "End of"
+ dnl line
+ INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'`
+ for dir in $INCLUDE_DIRS; do
+ dnl use "" as the sed script so $dir gets expanded
+ GIVEN_CFLAGS=`echo $GIVEN_CFLAGS | sed -e "s#-I$dir ##"`
+ done
+ [$1]=$GIVEN_CFLAGS
+])
diff --git a/common/m4/as-version.m4 b/common/m4/as-version.m4
new file mode 100644
index 00000000..a5b43990
--- /dev/null
+++ b/common/m4/as-version.m4
@@ -0,0 +1,71 @@
+dnl as-version.m4 0.2.0
+
+dnl autostars m4 macro for versioning
+
+dnl Thomas Vander Stichele <thomas at apestaart dot org>
+
+dnl $Id: as-version.m4,v 1.4 2004/06/01 09:40:05 thomasvs Exp $
+
+dnl AS_VERSION
+
+dnl example
+dnl AS_VERSION
+
+dnl this macro
+dnl - AC_SUBST's PACKAGE_VERSION_MAJOR, _MINOR, _MICRO
+dnl - AC_SUBST's PACKAGE_VERSION_RELEASE,
+dnl which can be used for rpm release fields
+dnl - doesn't call AM_INIT_AUTOMAKE anymore because it prevents
+dnl maintainer mode from running correctly
+dnl
+dnl don't forget to put #undef PACKAGE_VERSION_RELEASE in acconfig.h
+dnl if you use acconfig.h
+
+AC_DEFUN([AS_VERSION],
+[
+ PACKAGE_VERSION_MAJOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f1)
+ PACKAGE_VERSION_MINOR=$(echo AC_PACKAGE_VERSION | cut -d'.' -f2)
+ PACKAGE_VERSION_MICRO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f3)
+
+ AC_SUBST(PACKAGE_VERSION_MAJOR)
+ AC_SUBST(PACKAGE_VERSION_MINOR)
+ AC_SUBST(PACKAGE_VERSION_MICRO)
+])
+
+dnl AS_NANO(ACTION-IF-NO-NANO, [ACTION-IF-NANO])
+
+dnl requires AC_INIT to be called before
+dnl For projects using a fourth or nano number in your versioning to indicate
+dnl development or prerelease snapshots, this macro allows the build to be
+dnl set up differently accordingly.
+
+dnl this macro:
+dnl - parses AC_PACKAGE_VERSION, set by AC_INIT, and extracts the nano number
+dnl - sets the variable PACKAGE_VERSION_NANO
+dnl - sets the variable PACKAGE_VERSION_RELEASE, which can be used
+dnl for rpm release fields
+dnl - executes ACTION-IF-NO-NANO or ACTION-IF-NANO
+
+dnl example:
+dnl AS_NANO(RELEASE="yes", RELEASE="no")
+
+AC_DEFUN([AS_NANO],
+[
+ AC_MSG_CHECKING(nano version)
+
+ NANO=$(echo AC_PACKAGE_VERSION | cut -d'.' -f4)
+
+ if test x"$NANO" = x || test "x$NANO" = "x0" ; then
+ AC_MSG_RESULT([0 (release)])
+ NANO=0
+ PACKAGE_VERSION_RELEASE=1
+ ifelse([$1], , :, [$1])
+ else
+ AC_MSG_RESULT($NANO)
+ PACKAGE_VERSION_RELEASE=0.`date +%Y%m%d.%H%M%S`
+ ifelse([$2], , :, [$2])
+ fi
+ PACKAGE_VERSION_NANO=$NANO
+ AC_SUBST(PACKAGE_VERSION_NANO)
+ AC_SUBST(PACKAGE_VERSION_RELEASE)
+])
diff --git a/common/m4/codeset.m4 b/common/m4/codeset.m4
new file mode 100644
index 00000000..59535ebc
--- /dev/null
+++ b/common/m4/codeset.m4
@@ -0,0 +1,23 @@
+# codeset.m4 serial AM1 (gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
diff --git a/common/m4/gettext.m4 b/common/m4/gettext.m4
new file mode 100644
index 00000000..45cad855
--- /dev/null
+++ b/common/m4/gettext.m4
@@ -0,0 +1,587 @@
+# gettext.m4 serial 17 (gettext-0.11.5)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
+ define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ dnl Add a version number to the cache macros.
+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
+
+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ gt_cv_func_gnugettext_libc=yes,
+ gt_cv_func_gnugettext_libc=no)])
+
+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ gt_cv_func_gnugettext_libintl,
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+ gt_cv_func_gnugettext_libintl=yes,
+ gt_cv_func_gnugettext_libintl=no)
+ dnl Now see whether libintl exists and depends on libiconv.
+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ gt_cv_func_gnugettext_libintl=yes
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if test "$gt_cv_func_gnugettext_libc" = "yes" \
+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+ && test "$PACKAGE" != gettext; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE(HAVE_GETTEXT, 1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE(HAVE_DCGETTEXT, 1,
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(INTLOBJS)
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST(DATADIRNAME)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST(INSTOBJEXT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST(GENCAT)
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST(INTLLIBS)
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST(LIBINTL)
+ AC_SUBST(LTLIBINTL)
+ AC_SUBST(POSUB)
+])
+
+
+dnl Checks for all prerequisites of the po subdirectory,
+dnl except for USE_NLS.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ dnl Search for GNU xgettext 0.11 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU msgfmt.
+ if test "$GMSGFMT" != ":"; then
+ dnl If it is no GNU msgfmt we define it as : so that the
+ dnl Makefiles still can work.
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ AC_MSG_RESULT(
+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
+ GMSGFMT=":"
+ fi
+ fi
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+ fi
+
+ AC_OUTPUT_COMMANDS([
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([jm_GLIBC21])dnl
+ AC_REQUIRE([gt_INTDIV0])dnl
+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+ AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
+geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
+strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
+
+ AM_ICONV
+ AM_LANGINFO_CODESET
+ if test $ac_cv_header_locale_h = yes; then
+ AM_LC_MESSAGES
+ fi
+
+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+ dnl because plural.y uses bison specific features. It requires at least
+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+ dnl compile.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ AC_CHECK_PROGS([INTLBISON], [bison])
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ dnl Found it, now check the version.
+ AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+])
+
+
+AC_DEFUN([AM_MKINSTALLDIRS],
+[
+ 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 Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/common/m4/glibc21.m4 b/common/m4/glibc21.m4
new file mode 100644
index 00000000..9c9f3db3
--- /dev/null
+++ b/common/m4/glibc21.m4
@@ -0,0 +1,32 @@
+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([jm_GLIBC21],
+ [
+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+ ac_cv_gnu_library_2_1,
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ ac_cv_gnu_library_2_1=yes,
+ ac_cv_gnu_library_2_1=no)
+ ]
+ )
+ AC_SUBST(GLIBC21)
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
diff --git a/common/m4/gst-args.m4 b/common/m4/gst-args.m4
new file mode 100644
index 00000000..a326f96f
--- /dev/null
+++ b/common/m4/gst-args.m4
@@ -0,0 +1,276 @@
+dnl configure-time options shared among gstreamer modules
+
+dnl AG_GST_ARG_DEBUG
+dnl AG_GST_ARG_PROFILING
+dnl AG_GST_ARG_VALGRIND
+dnl AG_GST_ARG_GCOV
+
+dnl AG_GST_ARG_EXAMPLES
+
+dnl AG_GST_ARG_WITH_PKG_CONFIG_PATH
+dnl AG_GST_ARG_WITH_PACKAGE_NAME
+dnl AG_GST_ARG_WITH_PACKAGE_ORIGIN
+
+dnl AG_GST_ARG_WITH_PLUGINS
+
+dnl AG_GST_ARG_ENABLE_EXTERNAL
+dnl AG_GST_ARG_ENABLE_EXPERIMENTAL
+dnl AG_GST_ARG_ENABLE_BROKEN
+
+AC_DEFUN([AG_GST_ARG_DEBUG],
+[
+ dnl debugging stuff
+ AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]),
+ [
+ case "${enableval}" in
+ yes) USE_DEBUG=yes ;;
+ no) USE_DEBUG=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+ esac
+ ],
+ [USE_DEBUG=yes]) dnl Default value
+])
+
+AC_DEFUN([AG_GST_ARG_PROFILING],
+[
+ AC_ARG_ENABLE(profiling,
+ AC_HELP_STRING([--enable-profiling],
+ [adds -pg to compiler commandline, for profiling]),
+ [
+ case "${enableval}" in
+ yes) USE_PROFILING=yes ;;
+ no) USE_PROFILING=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
+ esac
+ ],
+ [USE_PROFILING=no]) dnl Default value
+])
+
+AC_DEFUN([AG_GST_ARG_VALGRIND],
+[
+ dnl valgrind inclusion
+ AC_ARG_ENABLE(valgrind,
+ AC_HELP_STRING([--disable-valgrind],[disable run-time valgrind detection]),
+ [
+ case "${enableval}" in
+ yes) USE_VALGRIND="$USE_DEBUG" ;;
+ no) USE_VALGRIND=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
+ esac
+ ],
+ [USE_VALGRIND="$USE_DEBUG"]) dnl Default value
+ VALGRIND_REQ="2.1"
+ if test "x$USE_VALGRIND" = xyes; then
+ PKG_CHECK_MODULES(VALGRIND, valgrind > $VALGRIND_REQ,
+ USE_VALGRIND="yes",
+ [
+ USE_VALGRIND="no"
+ AC_MSG_RESULT([no])
+ ])
+ fi
+ if test "x$USE_VALGRIND" = xyes; then
+ AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
+ AC_MSG_NOTICE(Using extra code paths for valgrind)
+ fi
+])
+
+AC_DEFUN([AG_GST_ARG_GCOV],
+[
+ AC_ARG_ENABLE(gcov,
+ AC_HELP_STRING([--enable-gcov],
+ [compile with coverage profiling instrumentation (gcc only)]),
+ enable_gcov=$enableval,
+ enable_gcov=no)
+ if test x$enable_gcov = xyes ; then
+ if test "x$GCC" != "xyes"
+ then
+ AC_MSG_ERROR([gcov only works if gcc is used])
+ fi
+
+ AS_COMPILER_FLAG(["-fprofile-arcs"],
+ [GCOV_CFLAGS="$GCOV_CFLAGS -fprofile-arcs"],
+ true)
+ AS_COMPILER_FLAG(["-ftest-coverage"],
+ [GCOV_CFLAGS="$GCOV_CFLAGS -ftest-coverage"],
+ true)
+ dnl remove any -O flags - FIXME: is this needed ?
+ GCOV_CFLAGS=`echo "$GCOV_CFLAGS" | sed -e 's/-O[[0-9]]*//g'`
+ dnl libtool 1.5.22 and lower strip -fprofile-arcs from the flags
+ dnl passed to the linker, which is a bug; -fprofile-arcs implicitly
+ dnl links in -lgcov, so we do it explicitly here for the same effect
+ GCOV_LIBS=-lgcov
+ AC_SUBST(GCOV_CFLAGS)
+ AC_SUBST(GCOV_LIBS)
+ GCOV=`echo $CC | sed s/gcc/gcov/g`
+ AC_SUBST(GCOV)
+
+ GST_GCOV_ENABLED=yes
+ AC_DEFINE_UNQUOTED(GST_GCOV_ENABLED, 1,
+ [Defined if gcov is enabled to force a rebuild due to config.h changing])
+ dnl if gcov is used, we do not want default -O2 CFLAGS
+ if test "x$GST_GCOV_ENABLED" = "xyes"
+ then
+ CFLAGS="-O0"
+ AC_SUBST(CFLAGS)
+ CXXFLAGS="-O0"
+ AC_SUBST(CXXFLAGS)
+ FFLAGS="-O0"
+ AC_SUBST(FFLAGS)
+ CCASFLAGS="-O0"
+ AC_SUBST(CCASFLAGS)
+ AC_MSG_NOTICE([gcov enabled, setting CFLAGS and friends to $CFLAGS])
+ fi
+ fi
+ AM_CONDITIONAL(GST_GCOV_ENABLED, test x$enable_gcov = xyes)
+])
+
+AC_DEFUN([AG_GST_ARG_EXAMPLES],
+[
+ AC_ARG_ENABLE(examples,
+ AC_HELP_STRING([--disable-examples], [disable building examples]),
+ [
+ case "${enableval}" in
+ yes) BUILD_EXAMPLES=yes ;;
+ no) BUILD_EXAMPLES=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-examples) ;;
+ esac
+ ],
+ [BUILD_EXAMPLES=yes]) dnl Default value
+ AM_CONDITIONAL(BUILD_EXAMPLES, test "x$BUILD_EXAMPLES" = "xyes")
+])
+
+AC_DEFUN([AG_GST_ARG_WITH_PKG_CONFIG_PATH],
+[
+ dnl possibly modify pkg-config path
+ AC_ARG_WITH(pkg-config-path,
+ AC_HELP_STRING([--with-pkg-config-path],
+ [colon-separated list of pkg-config(1) dirs]),
+ [
+ export PKG_CONFIG_PATH=${withval}
+ AC_MSG_NOTICE(Set PKG_CONFIG_PATH to $PKG_CONFIG_PATH)
+ ])
+])
+
+
+dnl This macro requires that GST_CVS is set to yes or no (release)
+AC_DEFUN([AG_GST_ARG_WITH_PACKAGE_NAME],
+[
+ dnl package name in plugins
+ AC_ARG_WITH(package-name,
+ AC_HELP_STRING([--with-package-name],
+ [specify package name to use in plugins]),
+ [
+ case "${withval}" in
+ yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
+ no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
+ *) GST_PACKAGE_NAME="${withval}" ;;
+ esac
+ ],
+ [
+ P=$1
+ if test "x$P" = "x"
+ then
+ P=$PACKAGE_NAME
+ fi
+
+ dnl default value
+ if test "x$GST_CVS" = "xyes"
+ then
+ dnl nano >= 1
+ GST_PACKAGE_NAME="$P CVS/prerelease"
+ else
+ GST_PACKAGE_NAME="$P source release"
+ fi
+ ]
+ )
+ AC_MSG_NOTICE(Using $GST_PACKAGE_NAME as package name)
+ AC_DEFINE_UNQUOTED(GST_PACKAGE_NAME, "$GST_PACKAGE_NAME",
+ [package name in plugins])
+ AC_SUBST(GST_PACKAGE_NAME)
+])
+
+AC_DEFUN([AG_GST_ARG_WITH_PACKAGE_ORIGIN],
+[
+ dnl package origin URL
+ AC_ARG_WITH(package-origin,
+ AC_HELP_STRING([--with-package-origin],
+ [specify package origin URL to use in plugins]),
+ [
+ case "${withval}" in
+ yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
+ no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
+ *) GST_PACKAGE_ORIGIN="${withval}" ;;
+ esac
+ ],
+ [GST_PACKAGE_ORIGIN="[Unknown package origin]"] dnl Default value
+ )
+ AC_MSG_NOTICE(Using $GST_PACKAGE_ORIGIN as package origin)
+ AC_DEFINE_UNQUOTED(GST_PACKAGE_ORIGIN, "$GST_PACKAGE_ORIGIN",
+ [package origin])
+ AC_SUBST(GST_PACKAGE_ORIGIN)
+])
+
+dnl sets GST_PLUGINS_SELECTED to the list given as an argument, or to
+dnl GST_PLUGINS_ALL
+AC_DEFUN([AG_GST_ARG_WITH_PLUGINS],
+[
+ AC_ARG_WITH(plugins,
+ AC_HELP_STRING([--with-plugins],
+ [comma-separated list of dependencyless plug-ins to compile]),
+ [
+ for i in `echo $withval | tr , ' '`; do
+ if echo $GST_PLUGINS_ALL | grep $i > /dev/null
+ then
+ GST_PLUGINS_SELECTED="$GST_PLUGINS_SELECTED $i"
+ else
+ echo "plug-in $i not recognized, ignoring..."
+ fi
+ done],
+ [GST_PLUGINS_SELECTED=$GST_PLUGINS_ALL])
+])
+
+AC_DEFUN([AG_GST_ARG_ENABLE_EXTERNAL],
+[
+ AG_GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
+ HAVE_EXTERNAL=yes, enabled,
+ [
+ AC_MSG_NOTICE(building external plug-ins)
+ BUILD_EXTERNAL="yes"
+ ],[
+ AC_MSG_WARN(all plug-ins with external dependencies will not be built)
+ BUILD_EXTERNAL="no"
+ ])
+ # make BUILD_EXTERNAL available to Makefile.am
+ AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
+])
+
+dnl experimental plug-ins; stuff that hasn't had the dust settle yet
+dnl read 'builds, but might not work'
+AC_DEFUN([AG_GST_ARG_ENABLE_EXPERIMENTAL],
+[
+ AG_GST_CHECK_FEATURE(EXPERIMENTAL,
+ [building of experimental plug-ins],,
+ HAVE_EXPERIMENTAL=yes, disabled,
+ [
+ AC_MSG_WARN(building experimental plug-ins)
+ BUILD_EXPERIMENTAL="yes"
+ ],[
+ AC_MSG_NOTICE(not building experimental plug-ins)
+ BUILD_EXPERIMENTAL="no"
+ ])
+ # make BUILD_EXPERIMENTAL available to Makefile.am
+ AM_CONDITIONAL(BUILD_EXPERIMENTAL, test "x$BUILD_EXPERIMENTAL" = "xyes")
+])
+
+dnl broken plug-ins; stuff that doesn't seem to build at the moment
+AC_DEFUN([AG_GST_ARG_ENABLE_BROKEN],
+[
+ AG_GST_CHECK_FEATURE(BROKEN, [enable building of broken plug-ins],,
+ HAVE_BROKEN=yes, disabled,
+ [
+ AC_MSG_WARN([building broken plug-ins -- no bug reports on these, only patches ...])
+ ],[
+ AC_MSG_NOTICE([not building broken plug-ins])
+ ])
+])
diff --git a/common/m4/gst-check.m4 b/common/m4/gst-check.m4
new file mode 100644
index 00000000..3f6b8ffd
--- /dev/null
+++ b/common/m4/gst-check.m4
@@ -0,0 +1,138 @@
+dnl pkg-config-based checks for GStreamer modules and dependency modules
+
+dnl generic:
+dnl AG_GST_PKG_CHECK_MODULES([PREFIX], [WHICH], [REQUIRED])
+dnl sets HAVE_[$PREFIX], [$PREFIX]_*
+dnl AG_GST_CHECK_MODULES([PREFIX], [MODULE], [MINVER], [NAME], [REQUIRED])
+dnl sets HAVE_[$PREFIX], [$PREFIX]_*
+
+dnl specific:
+dnl AG_GST_CHECK_GST([MAJMIN], [MINVER], [REQUIRED])
+dnl also sets/ACSUBSTs GST_TOOLS_DIR and GST_PLUGINS_DIR
+dnl AG_GST_CHECK_GST_BASE([MAJMIN], [MINVER], [REQUIRED])
+dnl AG_GST_CHECK_GST_GDP([MAJMIN], [MINVER], [REQUIRED])
+dnl AG_GST_CHECK_GST_CONTROLLER([MAJMIN], [MINVER], [REQUIRED])
+dnl AG_GST_CHECK_GST_CHECK([MAJMIN], [MINVER], [REQUIRED])
+dnl AG_GST_CHECK_GST_PLUGINS_BASE([MAJMIN], [MINVER], [REQUIRED])
+dnl also sets/ACSUBSTs GSTPB_PLUGINS_DIR
+
+AC_DEFUN([AG_GST_PKG_CHECK_MODULES],
+[
+ which="[$2]"
+ dnl not required by default, since we use this mostly for plugin deps
+ required=ifelse([$3], , "no", [$3])
+
+ PKG_CHECK_MODULES([$1], $which,
+ [
+ HAVE_[$1]="yes"
+ ],
+ [
+ HAVE_[$1]="no"
+ AC_MSG_RESULT(no)
+ if test "x$required" = "xyes"; then
+ AC_MSG_ERROR($[$1]_PKG_ERRORS)
+ else
+ AC_MSG_NOTICE($[$1]_PKG_ERRORS)
+ fi
+ ])
+
+ dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7
+ dnl It gets done automatically in automake >= 1.7, which we now require
+]))
+
+AC_DEFUN([AG_GST_CHECK_MODULES],
+[
+ module=[$2]
+ minver=[$3]
+ name="[$4]"
+ required=ifelse([$5], , "yes", [$5]) dnl required by default
+
+ PKG_CHECK_MODULES([$1], $module >= $minver,
+ [
+ HAVE_[$1]="yes"
+ ],
+ [
+ HAVE_[$1]="no"
+ AC_MSG_RESULT(no)
+ AC_MSG_NOTICE($[$1]_PKG_ERRORS)
+ if test "x$required" = "xyes"; then
+ AC_MSG_ERROR([no $module >= $minver ($name) found])
+ else
+ AC_MSG_NOTICE([no $module >= $minver ($name) found])
+ fi
+ ])
+
+ dnl AC_SUBST of CFLAGS and LIBS was not done before automake 1.7
+ dnl It gets done automatically in automake >= 1.7, which we now require
+]))
+
+AC_DEFUN([AG_GST_CHECK_GST],
+[
+ AG_GST_CHECK_MODULES(GST, gstreamer-[$1], [$2], [GStreamer], [$3])
+ dnl allow setting before calling this macro to override
+ if test -z $GST_TOOLS_DIR; then
+ GST_TOOLS_DIR=`$PKG_CONFIG --variable=toolsdir gstreamer-[$1]`
+ if test -z $GST_TOOLS_DIR; then
+ AC_MSG_ERROR(
+ [no tools dir set in GStreamer pkg-config file, core upgrade needed.])
+ fi
+ fi
+ AC_MSG_NOTICE([using GStreamer tools in $GST_TOOLS_DIR])
+ AC_SUBST(GST_TOOLS_DIR)
+
+ dnl check for where core plug-ins got installed
+ dnl this is used for unit tests
+ dnl allow setting before calling this macro to override
+ if test -z $GST_PLUGINS_DIR; then
+ GST_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-[$1]`
+ if test -z $GST_PLUGINS_DIR; then
+ AC_MSG_ERROR(
+ [no pluginsdir set in GStreamer pkg-config file, core upgrade needed.])
+ fi
+ fi
+ AC_MSG_NOTICE([using GStreamer plug-ins in $GST_PLUGINS_DIR])
+ AC_SUBST(GST_PLUGINS_DIR)
+])
+
+AC_DEFUN([AG_GST_CHECK_GST_BASE],
+[
+ AG_GST_CHECK_MODULES(GST_BASE, gstreamer-base-[$1], [$2],
+ [GStreamer Base Libraries], [$3])
+])
+
+AC_DEFUN([AG_GST_CHECK_GST_GDP],
+[
+ AG_GST_CHECK_MODULES(GST_GDP, gstreamer-dataprotocol-[$1], [$2],
+ [GStreamer Data Protocol Library], [$3])
+])
+
+AC_DEFUN([AG_GST_CHECK_GST_CONTROLLER],
+[
+ AG_GST_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-[$1], [$2],
+ [GStreamer Controller Library], [$3])
+])
+
+AC_DEFUN([AG_GST_CHECK_GST_CHECK],
+[
+ AG_GST_CHECK_MODULES(GST_CHECK, gstreamer-check-[$1], [$2],
+ [GStreamer Check unittest Library], [$3])
+])
+
+AC_DEFUN([AG_GST_CHECK_GST_PLUGINS_BASE],
+[
+ AG_GST_CHECK_MODULES(GST_PLUGINS_BASE, gstreamer-plugins-base-[$1], [$2],
+ [GStreamer Base Plug-ins Library], [$3])
+
+ dnl check for where base plug-ins got installed
+ dnl this is used for unit tests
+ dnl allow setting before calling this macro to override
+ if test -z $GSTPB_PLUGINS_DIR; then
+ GSTPB_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-plugins-base-[$1]`
+ if test -z $GSTPB_PLUGINS_DIR; then
+ AC_MSG_ERROR(
+ [no pluginsdir set in GStreamer Base Plug-ins pkg-config file])
+ fi
+ fi
+ AC_MSG_NOTICE([using GStreamer Base Plug-ins in $GSTPB_PLUGINS_DIR])
+ AC_SUBST(GSTPB_PLUGINS_DIR)
+])
diff --git a/common/m4/gst-debuginfo.m4 b/common/m4/gst-debuginfo.m4
new file mode 100644
index 00000000..b48854d9
--- /dev/null
+++ b/common/m4/gst-debuginfo.m4
@@ -0,0 +1,46 @@
+AC_DEFUN([AG_GST_DEBUGINFO], [
+AC_ARG_ENABLE(debug,
+AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]),
+[case "${enableval}" in
+ yes) USE_DEBUG=yes ;;
+ no) USE_DEBUG=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+esac],
+[USE_DEBUG=yes]) dnl Default value
+
+AC_ARG_ENABLE(DEBUG,
+AC_HELP_STRING([--disable-DEBUG],[disables compilation of debugging messages]),
+[case "${enableval}" in
+ yes) ENABLE_DEBUG=yes ;;
+ no) ENABLE_DEBUG=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
+esac],
+[ENABLE_DEBUG=yes]) dnl Default value
+if test x$ENABLE_DEBUG = xyes; then
+ AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
+fi
+
+AC_ARG_ENABLE(INFO,
+AC_HELP_STRING([--disable-INFO],[disables compilation of informational messages]),
+[case "${enableval}" in
+ yes) ENABLE_INFO=yes ;;
+ no) ENABLE_INFO=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-INFO) ;;
+esac],
+[ENABLE_INFO=yes]) dnl Default value
+if test x$ENABLE_INFO = xyes; then
+ AC_DEFINE(GST_INFO_ENABLED, 1, [Define if INFO statements should be compiled in])
+fi
+
+AC_ARG_ENABLE(debug-color,
+AC_HELP_STRING([--disable-debug-color],[disables color output of DEBUG and INFO output]),
+[case "${enableval}" in
+ yes) ENABLE_DEBUG_COLOR=yes ;;
+ no) ENABLE_DEBUG_COLOR=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-color) ;;
+esac],
+[ENABLE_DEBUG_COLOR=yes]) dnl Default value
+if test "x$ENABLE_DEBUG_COLOR" = xyes; then
+ AC_DEFINE(GST_DEBUG_COLOR, 1, [Define if debugging messages should be colorized])
+fi
+])
diff --git a/common/m4/gst-default.m4 b/common/m4/gst-default.m4
new file mode 100644
index 00000000..da1a81c9
--- /dev/null
+++ b/common/m4/gst-default.m4
@@ -0,0 +1,45 @@
+dnl default elements used for tests and such
+
+dnl AG_GST_DEFAULT_ELEMENTS
+
+AC_DEFUN([AG_GST_DEFAULT_ELEMENTS],
+[
+ dnl decide on default elements
+ dnl FIXME: provide configure-time options for this
+ dnl FIXME: describe where exactly this gets used
+ dnl FIXME: decide if it's a problem that this could point to sinks from
+ dnl depending plugin modules
+ DEFAULT_AUDIOSINK="autoaudiosink"
+ DEFAULT_VIDEOSINK="autovideosink"
+ DEFAULT_AUDIOSRC="alsasrc"
+ DEFAULT_VIDEOSRC="v4lsrc"
+ DEFAULT_VISUALIZER="goom"
+ case "$host" in
+ *-sun-* | *pc-solaris* )
+ DEFAULT_AUDIOSINK="sunaudiosink"
+ DEFAULT_VIDEOSINK="ximagesink"
+ DEFAULT_AUDIOSRC="sunaudiosrc"
+ ;;
+ *-darwin* )
+ DEFAULT_AUDIOSINK="osxaudiosink"
+ DEFAULT_AUDIOSRC="osxaudiosrc"
+ DEFAULT_VIDEOSINK="osxvideosink"
+ ;;
+ esac
+
+ AC_SUBST(DEFAULT_AUDIOSINK)
+ AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSINK, "$DEFAULT_AUDIOSINK",
+ [Default audio sink])
+ AC_SUBST(DEFAULT_AUDIOSRC)
+ AC_DEFINE_UNQUOTED(DEFAULT_AUDIOSRC, "$DEFAULT_AUDIOSRC",
+ [Default audio source])
+ AC_SUBST(DEFAULT_VIDEOSINK)
+ AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSINK, "$DEFAULT_VIDEOSINK",
+ [Default video sink])
+ AC_SUBST(DEFAULT_VIDEOSRC)
+ AC_DEFINE_UNQUOTED(DEFAULT_VIDEOSRC, "$DEFAULT_VIDEOSRC",
+ [Default video source])
+ AC_SUBST(DEFAULT_VISUALIZER)
+ AC_DEFINE_UNQUOTED(DEFAULT_VISUALIZER, "$DEFAULT_VISUALIZER",
+ [Default visualizer])
+])
diff --git a/common/m4/gst-doc.m4 b/common/m4/gst-doc.m4
new file mode 100644
index 00000000..7000c17a
--- /dev/null
+++ b/common/m4/gst-doc.m4
@@ -0,0 +1,148 @@
+AC_DEFUN([AG_GST_DOCBOOK_CHECK],
+[
+ dnl choose a location to install docbook docs in
+ if test "x$PACKAGE_TARNAME" = "x"
+ then
+ AC_MSG_ERROR([Internal error - PACKAGE_TARNAME not set])
+ fi
+ docdir="\$(datadir)/doc/$PACKAGE_TARNAME-$GST_MAJORMINOR"
+
+ dnl enable/disable docbook documentation building
+ AC_ARG_ENABLE(docbook,
+ AC_HELP_STRING([--enable-docbook],
+ [use docbook to build documentation [default=no]]),,
+ enable_docbook=no)
+
+ have_docbook=no
+
+ if test x$enable_docbook = xyes; then
+ dnl check if we actually have everything we need
+
+ dnl check for docbook tools
+ AC_CHECK_PROG(HAVE_DOCBOOK2PS, docbook2ps, yes, no)
+ AC_CHECK_PROG(HAVE_DOCBOOK2HTML, docbook2html, yes, no)
+ AC_CHECK_PROG(HAVE_JADETEX, jadetex, yes, no)
+ AC_CHECK_PROG(HAVE_PS2PDF, ps2pdf, yes, no)
+
+ # -V option appeared in 0.6.10
+ docbook2html_min_version=0.6.10
+ if test "x$HAVE_DOCBOOK2HTML" != "xno"; then
+ docbook2html_version=`docbook2html --version`
+ AC_MSG_CHECKING([docbook2html version ($docbook2html_version) >= $docbook2html_min_version])
+ if perl -w <<EOF
+ (\$min_version_major, \$min_version_minor, \$min_version_micro ) = "$docbook2html_min_version" =~ /(\d+)\.(\d+)\.(\d+)/;
+ (\$docbook2html_version_major, \$docbook2html_version_minor, \$docbook2html_version_micro ) = "$docbook2html_version" =~ /(\d+)\.(\d+)\.(\d+)/;
+ exit (((\$docbook2html_version_major > \$min_version_major) ||
+ ((\$docbook2html_version_major == \$min_version_major) &&
+ (\$docbook2html_version_minor >= \$min_version_minor)) ||
+ ((\$docbook2html_version_major == \$min_version_major) &&
+ (\$docbook2html_version_minor >= \$min_version_minor) &&
+ (\$docbook2html_version_micro >= \$min_version_micro)))
+ ? 0 : 1);
+EOF
+ then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ HAVE_DOCBOOK2HTML=no
+ fi
+ fi
+
+ dnl check if we can process docbook stuff
+ AS_DOCBOOK(have_docbook=yes, have_docbook=no)
+
+ dnl check for extra tools
+ AC_CHECK_PROG(HAVE_DVIPS, dvips, yes, no)
+ AC_CHECK_PROG(HAVE_XMLLINT, xmllint, yes, no)
+
+ dnl check for image conversion tools
+ AC_CHECK_PROG(HAVE_FIG2DEV, fig2dev, yes, no)
+ if test "x$HAVE_FIG2DEV" = "xno" ; then
+ AC_MSG_WARN([Did not find fig2dev (from xfig), images will not be generated.])
+ fi
+
+ dnl The following is a hack: if fig2dev doesn't display an error message
+ dnl for the desired type, we assume it supports it.
+ HAVE_FIG2DEV_EPS=no
+ if test "x$HAVE_FIG2DEV" = "xyes" ; then
+ fig2dev_quiet=`fig2dev -L eps </dev/null 2>&1 >/dev/null`
+ if test "x$fig2dev_quiet" = "x" ; then
+ HAVE_FIG2DEV_EPS=yes
+ fi
+ fi
+ HAVE_FIG2DEV_PNG=no
+ if test "x$HAVE_FIG2DEV" = "xyes" ; then
+ fig2dev_quiet=`fig2dev -L png </dev/null 2>&1 >/dev/null`
+ if test "x$fig2dev_quiet" = "x" ; then
+ HAVE_FIG2DEV_PNG=yes
+ fi
+ fi
+ HAVE_FIG2DEV_PDF=no
+ if test "x$HAVE_FIG2DEV" = "xyes" ; then
+ fig2dev_quiet=`fig2dev -L pdf </dev/null 2>&1 >/dev/null`
+ if test "x$fig2dev_quiet" = "x" ; then
+ HAVE_FIG2DEV_PDF=yes
+ fi
+ fi
+
+ AC_CHECK_PROG(HAVE_PNGTOPNM, pngtopnm, yes, no)
+ AC_CHECK_PROG(HAVE_PNMTOPS, pnmtops, yes, no)
+ AC_CHECK_PROG(HAVE_EPSTOPDF, epstopdf, yes, no)
+
+ dnl check if we can generate HTML
+ if test "x$HAVE_DOCBOOK2HTML" = "xyes" && \
+ test "x$enable_docbook" = "xyes" && \
+ test "x$HAVE_XMLLINT" = "xyes" && \
+ test "x$HAVE_FIG2DEV_PNG" = "xyes"; then
+ DOC_HTML=yes
+ AC_MSG_NOTICE(Will output HTML documentation)
+ else
+ DOC_HTML=no
+ AC_MSG_NOTICE(Will not output HTML documentation)
+ fi
+
+ dnl check if we can generate PS
+ if test "x$HAVE_DOCBOOK2PS" = "xyes" && \
+ test "x$enable_docbook" = "xyes" && \
+ test "x$HAVE_XMLLINT" = "xyes" && \
+ test "x$HAVE_JADETEX" = "xyes" && \
+ test "x$HAVE_FIG2DEV_EPS" = "xyes" && \
+ test "x$HAVE_DVIPS" = "xyes" && \
+ test "x$HAVE_PNGTOPNM" = "xyes" && \
+ test "x$HAVE_PNMTOPS" = "xyes"; then
+ DOC_PS=yes
+ AC_MSG_NOTICE(Will output PS documentation)
+ else
+ DOC_PS=no
+ AC_MSG_NOTICE(Will not output PS documentation)
+ fi
+
+ dnl check if we can generate PDF - using only ps2pdf
+ if test "x$DOC_PS" = "xyes" && \
+ test "x$enable_docbook" = "xyes" && \
+ test "x$HAVE_XMLLINT" = "xyes" && \
+ test "x$HAVE_PS2PDF" = "xyes"; then
+ DOC_PDF=yes
+ AC_MSG_NOTICE(Will output PDF documentation)
+ else
+ DOC_PDF=no
+ AC_MSG_NOTICE(Will not output PDF documentation)
+ fi
+
+ dnl if we don't have everything, we should disable
+ if test "x$have_docbook" != "xyes"; then
+ enable_docbook=no
+ fi
+ fi
+
+ dnl if we're going to install documentation, tell us where
+ if test "x$have_docbook" = "xyes"; then
+ AC_MSG_NOTICE(Installing documentation in $docdir)
+ AC_SUBST(docdir)
+ fi
+
+ AM_CONDITIONAL(ENABLE_DOCBOOK, test x$enable_docbook = xyes)
+ AM_CONDITIONAL(DOC_HTML, test x$DOC_HTML = xyes)
+ AM_CONDITIONAL(DOC_PDF, test x$DOC_PDF = xyes)
+ AM_CONDITIONAL(DOC_PS, test x$DOC_PS = xyes)
+])
diff --git a/common/m4/gst-error.m4 b/common/m4/gst-error.m4
new file mode 100644
index 00000000..4c3f12c4
--- /dev/null
+++ b/common/m4/gst-error.m4
@@ -0,0 +1,71 @@
+dnl handle various error-related things
+
+dnl Thomas Vander Stichele <thomas@apestaart.org>
+
+dnl Last modification: 2005-10-16
+
+dnl AG_GST_SET_ERROR_CFLAGS([ADD-WERROR])
+dnl AG_GST_SET_LEVEL_DEFAULT([IS-CVS-VERSION])
+
+
+dnl Sets ERROR_CFLAGS to something the compiler will accept.
+dnl AC_SUBST them so they are available in Makefile
+
+dnl -Wall is added if it is supported
+dnl -Werror is added if ADD-WERROR is not "no"
+
+dnl These flags can be overridden at make time:
+dnl make ERROR_CFLAGS=
+AC_DEFUN([AG_GST_SET_ERROR_CFLAGS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AS_COMPILER_FLAG])
+
+
+ dnl if we support -Wall, set it unconditionally
+ AS_COMPILER_FLAG(-Wall,
+ ERROR_CFLAGS="-Wall",
+ ERROR_CFLAGS="")
+
+ dnl if asked for, add -Werror if supported
+ if test "x$1" != "xno"
+ then
+ AS_COMPILER_FLAG(-Werror, ERROR_CFLAGS="$ERROR_CFLAGS -Werror")
+
+ dnl if -Werror isn't suported
+ if test "x$ERROR_CFLAGS" == "x"
+ then
+ dnl try -errwarn=%all,no%E_EMPTY_DECLARATION,no%E_STATEMENT_NOT_REACHED (Sun Forte case)
+ dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon
+ dnl "statement not reached" disabled because there is g_assert_not_reached () in some places
+ AS_COMPILER_FLAG([-errwarn=%all,no%E_EMPTY_DECLARATION,no%E_STATEMENT_NOT_REACHED],
+ [ERROR_CFLAGS="-errwarn=%all,no%E_EMPTY_DECLARATION,no%E_STATEMENT_NOT_REACHED"])
+
+ dnl if this also isn't suported, try only for -errwarn=%all
+ if test "x$ERROR_CFLAGS" == "x"
+ then
+ AS_COMPILER_FLAG(-errwarn=%all,
+ ERROR_CFLAGS="-errwarn=%all")
+ fi
+ fi
+ fi
+
+ AC_SUBST(ERROR_CFLAGS)
+ AC_MSG_NOTICE([set ERROR_CFLAGS to $ERROR_CFLAGS])
+])
+
+dnl Sets the default error level for debugging messages
+AC_DEFUN([AG_GST_SET_LEVEL_DEFAULT],
+[
+ dnl define correct errorlevel for debugging messages. We want to have
+ dnl GST_ERROR messages printed when running cvs builds
+ if test "x[$1]" = "xyes"; then
+ GST_LEVEL_DEFAULT=GST_LEVEL_ERROR
+ else
+ GST_LEVEL_DEFAULT=GST_LEVEL_NONE
+ fi
+ AC_DEFINE_UNQUOTED(GST_LEVEL_DEFAULT, $GST_LEVEL_DEFAULT,
+ [Default errorlevel to use])
+ dnl AC_SUBST so we can use it for win32/common/config.h
+ AC_SUBST(GST_LEVEL_DEFAULT)
+])
diff --git a/common/m4/gst-feature.m4 b/common/m4/gst-feature.m4
new file mode 100644
index 00000000..510d228d
--- /dev/null
+++ b/common/m4/gst-feature.m4
@@ -0,0 +1,285 @@
+dnl Perform a check for a feature for GStreamer
+dnl Richard Boulton <richard-alsa@tartarus.org>
+dnl Thomas Vander Stichele <thomas@apestaart.org> added useful stuff
+dnl Last modification: 25/06/2001
+dnl AG_GST_CHECK_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION,
+dnl DEPENDENT-PLUGINS, TEST-FOR-FEATURE,
+dnl DISABLE-BY-DEFAULT, ACTION-IF-USE, ACTION-IF-NOTUSE)
+dnl
+dnl This macro adds a command line argument to allow the user to enable
+dnl or disable a feature, and if the feature is enabled, performs a supplied
+dnl test to check if the feature is available.
+dnl
+dnl The test should define HAVE_<FEATURE-NAME> to "yes" or "no" depending
+dnl on whether the feature is available.
+dnl
+dnl The macro will set USE_<FEATURE-NAME> to "yes" or "no" depending on
+dnl whether the feature is to be used.
+dnl Thomas changed this, so that when USE_<FEATURE-NAME> was already set
+dnl to no, then it stays that way.
+dnl
+dnl The macro will call AM_CONDITIONAL(USE_<<FEATURE-NAME>, ...) to allow
+dnl the feature to control what is built in Makefile.ams. If you want
+dnl additional actions resulting from the test, you can add them with the
+dnl ACTION-IF-USE and ACTION-IF-NOTUSE parameters.
+dnl
+dnl FEATURE-NAME is the name of the feature, and should be in
+dnl purely upper case characters.
+dnl FEATURE-DESCRIPTION is used to describe the feature in help text for
+dnl the command line argument.
+dnl DEPENDENT-PLUGINS lists any plug-ins which depend on this feature.
+dnl TEST-FOR-FEATURE is a test which sets HAVE_<FEATURE-NAME> to "yes"
+dnl or "no" depending on whether the feature is
+dnl available.
+dnl DISABLE-BY-DEFAULT if "disabled", the feature is disabled by default,
+dnl if any other value, the feature is enabled by default.
+dnl ACTION-IF-USE any extra actions to perform if the feature is to be
+dnl used.
+dnl ACTION-IF-NOTUSE any extra actions to perform if the feature is not to
+dnl be used.
+dnl
+dnl
+dnl thomas :
+dnl we also added a history.
+dnl GST_PLUGINS_YES will contain all plugins to be built
+dnl that were checked through AG_GST_CHECK_FEATURE
+dnl GST_PLUGINS_NO will contain those that won't be built
+
+AC_DEFUN([AG_GST_CHECK_FEATURE],
+[echo
+AC_MSG_NOTICE(*** checking feature: [$2] ***)
+if test "x[$3]" != "x"
+then
+ AC_MSG_NOTICE(*** for plug-ins: [$3] ***)
+fi
+dnl
+builtin(define, [gst_endisable], ifelse($5, [disabled], [enable], [disable]))dnl
+dnl if it is set to NO, then don't even consider it for building
+NOUSE=
+if test "x$USE_[$1]" = "xno"; then
+ NOUSE="yes"
+fi
+AC_ARG_ENABLE(translit([$1], A-Z, a-z),
+ [ ]builtin(format, --%-26s gst_endisable %s, gst_endisable-translit([$1], A-Z, a-z), [$2]ifelse([$3],,,: [$3])),
+ [ case "${enableval}" in
+ yes) USE_[$1]=yes;;
+ no) USE_[$1]=no;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-translit([$1], A-Z, a-z)) ;;
+ esac],
+ [ USE_$1=]ifelse($5, [disabled], [no], [yes])) dnl DEFAULT
+
+dnl *** set it back to no if it was preset to no
+if test "x$NOUSE" = "xyes"; then
+ USE_[$1]="no"
+ AC_MSG_WARN(*** $3 pre-configured not to be built)
+fi
+NOUSE=
+
+dnl *** If it's enabled
+
+if test x$USE_[$1] = xyes; then
+ dnl save compile variables before the test
+
+ gst_check_save_LIBS=$LIBS
+ gst_check_save_LDFLAGS=$LDFLAGS
+ gst_check_save_CFLAGS=$CFLAGS
+ gst_check_save_CPPFLAGS=$CPPFLAGS
+ gst_check_save_CXXFLAGS=$CXXFLAGS
+
+ HAVE_[$1]=no
+ dnl TEST_FOR_FEATURE
+ $4
+
+ LIBS=$gst_check_save_LIBS
+ LDFLAGS=$gst_check_save_LDFLAGS
+ CFLAGS=$gst_check_save_CFLAGS
+ CPPFLAGS=$gst_check_save_CPPFLAGS
+ CXXFLAGS=$gst_check_save_CXXFLAGS
+
+ dnl If it isn't found, unset USE_[$1]
+ if test x$HAVE_[$1] = xno; then
+ USE_[$1]=no
+ else
+ ifelse([$3], , :, [AC_MSG_NOTICE(*** These plugins will be built: [$3])])
+ fi
+fi
+dnl *** Warn if it's disabled or not found
+if test x$USE_[$1] = xyes; then
+ ifelse([$6], , :, [$6])
+ if test "x$3" != "x"; then
+ GST_PLUGINS_YES="\t[$3]\n$GST_PLUGINS_YES"
+ fi
+ AC_DEFINE(HAVE_[$1], , [support for features: $3])
+else
+ ifelse([$3], , :, [AC_MSG_NOTICE(*** These plugins will not be built: [$3])])
+ if test "x$3" != "x"; then
+ GST_PLUGINS_NO="\t[$3]\n$GST_PLUGINS_NO"
+ fi
+ ifelse([$7], , :, [$7])
+fi
+dnl *** Define the conditional as appropriate
+AM_CONDITIONAL(USE_[$1], test x$USE_[$1] = xyes)
+])
+
+dnl Use a -config program which accepts --cflags and --libs parameters
+dnl to set *_CFLAGS and *_LIBS and check existence of a feature.
+dnl Richard Boulton <richard-alsa@tartarus.org>
+dnl Last modification: 26/06/2001
+dnl AG_GST_CHECK_CONFIGPROG(FEATURE-NAME, CONFIG-PROG-FILENAME, MODULES)
+dnl
+dnl This check was written for GStreamer: it should be renamed and checked
+dnl for portability if you decide to use it elsewhere.
+dnl
+AC_DEFUN([AG_GST_CHECK_CONFIGPROG],
+[
+ AC_PATH_PROG([$1]_CONFIG, [$2], no)
+ if test x$[$1]_CONFIG = xno; then
+ [$1]_LIBS=
+ [$1]_CFLAGS=
+ HAVE_[$1]=no
+ else
+ if [$2] --plugin-libs [$3] &> /dev/null; then
+ [$1]_LIBS=`[$2] --plugin-libs [$3]`
+ else
+ [$1]_LIBS=`[$2] --libs [$3]`
+ fi
+ [$1]_CFLAGS=`[$2] --cflags [$3]`
+ HAVE_[$1]=yes
+ fi
+ AC_SUBST([$1]_LIBS)
+ AC_SUBST([$1]_CFLAGS)
+])
+
+dnl Use AC_CHECK_LIB and AC_CHECK_HEADER to do both tests at once
+dnl sets HAVE_module if we have it
+dnl Richard Boulton <richard-alsa@tartarus.org>
+dnl Last modification: 26/06/2001
+dnl AG_GST_CHECK_LIBHEADER(FEATURE-NAME, LIB NAME, LIB FUNCTION, EXTRA LD FLAGS,
+dnl HEADER NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
+dnl
+dnl This check was written for GStreamer: it should be renamed and checked
+dnl for portability if you decide to use it elsewhere.
+dnl
+AC_DEFUN([AG_GST_CHECK_LIBHEADER],
+[
+ AC_CHECK_LIB([$2], [$3], HAVE_[$1]=yes, HAVE_[$1]=no,[$4])
+ if test "x$HAVE_[$1]" = "xyes"; then
+ AC_CHECK_HEADER([$5], :, HAVE_[$1]=no)
+ if test "x$HAVE_[$1]" = "xyes"; then
+ dnl execute what needs to be
+ ifelse([$6], , :, [$6])
+ else
+ ifelse([$7], , :, [$7])
+ fi
+ else
+ ifelse([$7], , :, [$7])
+ fi
+ AC_SUBST(HAVE_[$1])
+]
+)
+
+dnl 2004-02-14 Thomas - changed to get set properly and use proper output
+dnl 2003-06-27 Benjamin Otte - changed to make this work with gstconfig.h
+dnl
+dnl Add a subsystem --disable flag and all the necessary symbols and substitions
+dnl
+dnl AG_GST_CHECK_SUBSYSTEM_DISABLE(SYSNAME, [subsystem name])
+dnl
+AC_DEFUN([AG_GST_CHECK_SUBSYSTEM_DISABLE],
+[
+ dnl this define will replace each literal subsys_def occurrence with
+ dnl the lowercase hyphen-separated subsystem
+ dnl e.g. if $1 is GST_DEBUG then subsys_def will be a macro with gst-debug
+ define([subsys_def],translit([$1], _A-Z, -a-z))
+
+ AC_ARG_ENABLE(subsys_def,
+ AC_HELP_STRING(--disable-subsys_def, [disable $2]),
+ [
+ case "${enableval}" in
+ yes) GST_DISABLE_[$1]=no ;;
+ no) GST_DISABLE_[$1]=yes ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-subsys_def]) ;;
+ esac
+ ],
+ [GST_DISABLE_[$1]=no]) dnl Default value
+
+ if test x$GST_DISABLE_[$1] = xyes; then
+ AC_MSG_NOTICE([disabled subsystem [$2]])
+ GST_DISABLE_[$1]_DEFINE="#define GST_DISABLE_$1 1"
+ else
+ GST_DISABLE_[$1]_DEFINE="/* #undef GST_DISABLE_$1 */"
+ fi
+ AC_SUBST(GST_DISABLE_[$1]_DEFINE)
+ undefine([subsys_def])
+])
+
+
+dnl Parse gstconfig.h for feature and defines add the symbols and substitions
+dnl
+dnl AG_GST_PARSE_SUBSYSTEM_DISABLE(GST_CONFIGPATH, FEATURE)
+dnl
+AC_DEFUN([AG_GST_PARSE_SUBSYSTEM_DISABLE],
+[
+ grep >/dev/null "#undef GST_DISABLE_$2" $1
+ if test $? = 0; then
+ GST_DISABLE_[$2]=0
+ else
+ GST_DISABLE_[$2]=1
+ fi
+ AC_SUBST(GST_DISABLE_[$2])
+])
+
+dnl Parse gstconfig.h and defines add the symbols and substitions
+dnl
+dnl GST_CONFIGPATH=`$PKG_CONFIG --variable=includedir gstreamer-0.10`"/gst/gstconfig.h"
+dnl AG_GST_PARSE_SUBSYSTEM_DISABLES(GST_CONFIGPATH)
+dnl
+AC_DEFUN([AG_GST_PARSE_SUBSYSTEM_DISABLES],
+[
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,GST_DEBUG)
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,LOADSAVE)
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,PARSE)
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,TRACE)
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,ALLOC_TRACE)
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,REGISTRY)
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,ENUMTYPES)
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,INDEX)
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,PLUGIN)
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,URI)
+ AG_GST_PARSE_SUBSYSTEM_DISABLE($1,XML)
+])
+
+
+
+dnl relies on GST_PLUGINS_ALL, GST_PLUGINS_SELECTED, GST_PLUGINS_YES,
+dnl GST_PLUGINS_NO, and BUILD_EXTERNAL
+AC_DEFUN([AG_GST_OUTPUT_PLUGINS], [
+
+echo "configure: *** Plug-ins without external dependencies that will be built:"
+( for i in $GST_PLUGINS_SELECTED; do /bin/echo -e '\t'$i; done ) | sort
+echo
+
+echo "configure: *** Plug-ins without external dependencies that will NOT be built:"
+( for i in $GST_PLUGINS_ALL; do
+ case $GST_PLUGINS_SELECTED in
+ *$i*)
+ ;;
+ *)
+ /bin/echo -e '\t'$i
+ ;;
+ esac
+ done ) | sort
+echo
+
+if test "x$BUILD_EXTERNAL" = "xno"; then
+ echo "configure: *** No plug-ins with external dependencies will be built"
+else
+ /bin/echo -n "configure: *** Plug-ins with dependencies that will be built:"
+ /bin/echo -e "$GST_PLUGINS_YES" | sort
+ /bin/echo
+ /bin/echo -n "configure: *** Plug-ins with dependencies that will NOT be built:"
+ /bin/echo -e "$GST_PLUGINS_NO" | sort
+ /bin/echo
+fi
+])
+
diff --git a/common/m4/gst-function.m4 b/common/m4/gst-function.m4
new file mode 100644
index 00000000..12166214
--- /dev/null
+++ b/common/m4/gst-function.m4
@@ -0,0 +1,63 @@
+dnl
+dnl Check for compiler mechanism to show functions in debugging
+dnl copied from an Ali patch floating on the internet
+dnl
+AC_DEFUN([AG_GST_CHECK_FUNCTION],[
+ dnl #1: __PRETTY_FUNCTION__
+ AC_MSG_CHECKING(whether $CC implements __PRETTY_FUNCTION__)
+ AC_CACHE_VAL(have_pretty_function,[
+ AC_TRY_LINK([#include <stdio.h>],
+ [printf("%s", __PRETTY_FUNCTION__);],
+ have_pretty_function=yes,
+ have_pretty_function=no)
+ ])
+ AC_MSG_RESULT($have_pretty_function)
+ if test "$have_pretty_function" = yes; then
+ AC_DEFINE(HAVE_PRETTY_FUNCTION, 1,
+ [defined if the compiler implements __PRETTY_FUNCTION__])
+ fi
+
+dnl #2: __FUNCTION__
+ AC_MSG_CHECKING(whether $CC implements __FUNCTION__)
+ AC_CACHE_VAL(have_function,[
+ AC_TRY_LINK([#include <stdio.h>],
+ [printf("%s", __FUNCTION__);],
+ have_function=yes,
+ have_function=no)
+ ])
+ AC_MSG_RESULT($have_function)
+ if test "$have_function" = yes; then
+ AC_DEFINE(HAVE_FUNCTION, 1,
+ [defined if the compiler implements __FUNCTION__])
+ fi
+
+dnl #3: __func__
+ AC_MSG_CHECKING(whether $CC implements __func__)
+ AC_CACHE_VAL(have_func,[
+ AC_TRY_LINK([#include <stdio.h>],
+ [printf("%s", __func__);],
+ have_func=yes,
+ have_func=no)
+ ])
+ AC_MSG_RESULT($have_func)
+ if test "$have_func" = yes; then
+ AC_DEFINE(HAVE_FUNC, 1,
+ [defined if the compiler implements __func__])
+ fi
+
+dnl now define FUNCTION to whatever works, and fallback to ""
+ if test "$have_pretty_function" = yes; then
+ function=__PRETTY_FUNCTION__
+ else
+ if test "$have_function" = yes; then
+ function=__FUNCTION__
+ else
+ if test "$have_func" = yes; then
+ function=__func__
+ else
+ function=\"\"
+ fi
+ fi
+ fi
+ AC_DEFINE_UNQUOTED(GST_FUNCTION, $function, [macro to use to show function name])
+])
diff --git a/common/m4/gst-gettext.m4 b/common/m4/gst-gettext.m4
new file mode 100644
index 00000000..a63651bf
--- /dev/null
+++ b/common/m4/gst-gettext.m4
@@ -0,0 +1,21 @@
+dnl gettext setup
+
+dnl AG_GST_GETTEXT([gettext-package])
+dnl defines GETTEXT_PACKAGE and LOCALEDIR
+
+AC_DEFUN([AG_GST_GETTEXT],
+[
+ if test "$USE_NLS" = "yes"; then
+ GETTEXT_PACKAGE=[$1]
+ else
+ GETTEXT_PACKAGE=[NULL]
+ fi
+ AC_SUBST(GETTEXT_PACKAGE)
+ AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
+ [gettext package name])
+
+ dnl define LOCALEDIR in config.h
+ AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
+ AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
+ [gettext locale dir])
+])
diff --git a/common/m4/gst-glib2.m4 b/common/m4/gst-glib2.m4
new file mode 100644
index 00000000..71e293b2
--- /dev/null
+++ b/common/m4/gst-glib2.m4
@@ -0,0 +1,26 @@
+dnl check for a minimum version of GLib
+
+dnl AG_GST_GLIB_CHECK([minimum-version-required])
+
+AC_DEFUN([AG_GST_GLIB_CHECK],
+[
+ dnl Minimum required version of GLib
+ GLIB_REQ=[$1]
+ if test "x$GLIB_REQ" = "x"
+ then
+ AC_MSG_ERROR([Please specify a required version for GLib 2.0])
+ fi
+ AC_SUBST(GLIB_REQ)
+
+ dnl Check for glib with everything
+ PKG_CHECK_MODULES(GLIB,
+ glib-2.0 >= $GLIB_REQ gobject-2.0 gthread-2.0 gmodule-no-export-2.0,
+ HAVE_GLIB=yes,HAVE_GLIB=no)
+
+ if test "x$HAVE_GLIB" = "xno"; then
+ AC_MSG_ERROR([This package requires GLib >= $GLIB_REQ to compile.])
+ fi
+
+ dnl for the poor souls who for example have glib in /usr/local
+ AS_SCRUB_INCLUDE(GLIB_CFLAGS)
+])
diff --git a/common/m4/gst-plugin-docs.m4 b/common/m4/gst-plugin-docs.m4
new file mode 100644
index 00000000..29ebbd6d
--- /dev/null
+++ b/common/m4/gst-plugin-docs.m4
@@ -0,0 +1,47 @@
+dnl AG_GST_PYXML_CHECK([MINIMUM-PYTHON-VERSION])
+
+AC_DEFUN([AG_GST_PYXML_CHECK],
+[
+ AC_BEFORE([AS_PATH_PYTHON],[$0])dnl find python first
+
+ have_pyxml=no
+ if test "x$PYTHON" != x; then
+ AC_MSG_CHECKING([pyxml])
+ if $PYTHON -c "from xml.dom.ext.reader import Sax2" 2>/dev/null \
+ && $PYTHON -c "from xml.dom.NodeFilter import NodeFilter" 2>/dev/null; then
+ AC_MSG_RESULT(yes)
+ have_pyxml=yes
+ else
+ AC_MSG_RESULT(no)
+ fi
+ fi
+])
+
+dnl AG_GST_PLUGIN_DOCS([MINIMUM-GTK-DOC-VERSION],[MINIMUM-PYTHON-VERSION])
+dnl
+dnl checks for prerequisites for the common/mangle-tmpl.py script
+dnl used when building the plugin documentation
+
+AC_DEFUN([AG_GST_PLUGIN_DOCS],
+[
+ AC_BEFORE([GTK_DOC_CHECK],[$0])dnl check for gtk-doc first
+
+ if test x$enable_gtk_doc = xyes -a x$have_gtk_doc = xyes; then
+ AG_GST_PYXML_CHECK([$1])
+ fi
+
+ build_plugin_docs=no
+ AC_MSG_CHECKING([whether to build plugin documentation])
+ if test x$enable_gtk_doc = xyes -a x$have_gtk_doc = xyes; then
+ if test "x$have_pyxml" != xyes; then
+ AC_MSG_RESULT([no (pyxml not installed)])
+ else
+ build_plugin_docs=yes
+ AC_MSG_RESULT([yes])
+ fi
+ else
+ AC_MSG_RESULT([no (gtk-doc disabled or not available)])
+ fi
+
+ AM_CONDITIONAL(ENABLE_PLUGIN_DOCS, test x$build_plugin_docs = xyes)
+])
diff --git a/common/m4/gst-plugindir.m4 b/common/m4/gst-plugindir.m4
new file mode 100644
index 00000000..09989d07
--- /dev/null
+++ b/common/m4/gst-plugindir.m4
@@ -0,0 +1,17 @@
+dnl AG_GST_SET_PLUGINDIR
+
+dnl AC_DEFINE PLUGINDIR to the full location where plug-ins will be installed
+dnl AC_SUBST plugindir, to be used in Makefile.am's
+
+AC_DEFUN([AG_GST_SET_PLUGINDIR],
+[
+ dnl define location of plugin directory
+ AS_AC_EXPAND(PLUGINDIR, ${libdir}/gstreamer-$GST_MAJORMINOR)
+ AC_DEFINE_UNQUOTED(PLUGINDIR, "$PLUGINDIR",
+ [directory where plugins are located])
+ AC_MSG_NOTICE([Using $PLUGINDIR as the plugin install location])
+
+ dnl plugin directory configure-time variable for use in Makefile.am
+ plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
+ AC_SUBST(plugindir)
+])
diff --git a/common/m4/gst-valgrind.m4 b/common/m4/gst-valgrind.m4
new file mode 100644
index 00000000..93c26357
--- /dev/null
+++ b/common/m4/gst-valgrind.m4
@@ -0,0 +1,35 @@
+AC_DEFUN([AG_GST_VALGRIND_CHECK],
+[
+ dnl valgrind inclusion
+ AC_ARG_ENABLE(valgrind,
+ AC_HELP_STRING([--disable-valgrind], [disable run-time valgrind detection]),
+ [
+ case "${enableval}" in
+ yes) USE_VALGRIND="$USE_DEBUG" ;;
+ no) USE_VALGRIND=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
+ esac],
+ [
+ USE_VALGRIND="$USE_DEBUG"
+ ]) dnl Default value
+
+ VALGRIND_REQ="2.1"
+ if test "x$USE_VALGRIND" = xyes; then
+ PKG_CHECK_MODULES(VALGRIND, valgrind > $VALGRIND_REQ,
+ USE_VALGRIND="yes",
+ [
+ USE_VALGRIND="no"
+ AC_MSG_RESULT([no])
+ ])
+ fi
+
+ if test "x$USE_VALGRIND" = xyes; then
+ AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
+ AC_MSG_NOTICE(Using extra code paths for valgrind)
+ fi
+ AC_SUBST(VALGRIND_CFLAGS)
+ AC_SUBST(VALGRIND_LIBS)
+
+ AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
+ AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
+])
diff --git a/common/m4/gst.m4 b/common/m4/gst.m4
new file mode 100644
index 00000000..04b466fb
--- /dev/null
+++ b/common/m4/gst.m4
@@ -0,0 +1,10 @@
+dnl AG_GST_INIT
+dnl sets up use of GStreamer configure.ac macros
+dnl all GStreamer autoconf macros are prefixed
+dnl with AG_GST_ for public macros
+dnl with _AG_GST_ for private macros
+
+AC_DEFUN([AG_GST_INIT],
+[
+ m4_pattern_forbid(^_?AG_GST_)
+])
diff --git a/common/m4/iconv.m4 b/common/m4/iconv.m4
new file mode 100644
index 00000000..c5f35798
--- /dev/null
+++ b/common/m4/iconv.m4
@@ -0,0 +1,103 @@
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST(LIBICONV)
+ AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
diff --git a/common/m4/intdiv0.m4 b/common/m4/intdiv0.m4
new file mode 100644
index 00000000..55dddcf1
--- /dev/null
+++ b/common/m4/intdiv0.m4
@@ -0,0 +1,72 @@
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+ gt_cv_int_divbyzero_sigfpe,
+ [
+ AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+ [
+ # Guess based on the CPU.
+ case "$host_cpu" in
+ alpha* | i[34567]86 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+ ])
+ ])
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+ [Define if integer division by zero raises signal SIGFPE.])
+])
diff --git a/common/m4/inttypes-pri.m4 b/common/m4/inttypes-pri.m4
new file mode 100644
index 00000000..fd007c31
--- /dev/null
+++ b/common/m4/inttypes-pri.m4
@@ -0,0 +1,32 @@
+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values. This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
+ if test $gt_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ gt_cv_inttypes_pri_broken,
+ [
+ AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ fi
+])
diff --git a/common/m4/inttypes.m4 b/common/m4/inttypes.m4
new file mode 100644
index 00000000..ab370ffe
--- /dev/null
+++ b/common/m4/inttypes.m4
@@ -0,0 +1,27 @@
+# inttypes.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+ [
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+ ])
+ if test $gt_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+ fi
+])
diff --git a/common/m4/inttypes_h.m4 b/common/m4/inttypes_h.m4
new file mode 100644
index 00000000..400a1118
--- /dev/null
+++ b/common/m4/inttypes_h.m4
@@ -0,0 +1,28 @@
+# inttypes_h.m4 serial 4 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_inttypes_h=yes,
+ jm_ac_cv_header_inttypes_h=no)])
+ if test $jm_ac_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
diff --git a/common/m4/isc-posix.m4 b/common/m4/isc-posix.m4
new file mode 100644
index 00000000..1319dd1c
--- /dev/null
+++ b/common/m4/isc-posix.m4
@@ -0,0 +1,26 @@
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
diff --git a/common/m4/lcmessage.m4 b/common/m4/lcmessage.m4
new file mode 100644
index 00000000..ffd4008b
--- /dev/null
+++ b/common/m4/lcmessage.m4
@@ -0,0 +1,32 @@
+# lcmessage.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
diff --git a/common/m4/lib-ld.m4 b/common/m4/lib-ld.m4
new file mode 100644
index 00000000..ddb57323
--- /dev/null
+++ b/common/m4/lib-ld.m4
@@ -0,0 +1,97 @@
+# lib-ld.m4 serial 1 (gettext-0.11)
+dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ acl_cv_prog_gnu_ld=yes
+else
+ acl_cv_prog_gnu_ld=no
+fi])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/common/m4/lib-link.m4 b/common/m4/lib-link.m4
new file mode 100644
index 00000000..6b942510
--- /dev/null
+++ b/common/m4/lib-link.m4
@@ -0,0 +1,554 @@
+# lib-link.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L,
+dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH([lib$1-prefix],
+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
diff --git a/common/m4/lib-prefix.m4 b/common/m4/lib-prefix.m4
new file mode 100644
index 00000000..b8b79ab9
--- /dev/null
+++ b/common/m4/lib-prefix.m4
@@ -0,0 +1,148 @@
+# lib-prefix.m4 serial 1 (gettext-0.11)
+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
diff --git a/common/m4/progtest.m4 b/common/m4/progtest.m4
new file mode 100644
index 00000000..443c8e30
--- /dev/null
+++ b/common/m4/progtest.m4
@@ -0,0 +1,59 @@
+# progtest.m4 serial 2 (gettext-0.10.40)
+dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
diff --git a/common/m4/stdint_h.m4 b/common/m4/stdint_h.m4
new file mode 100644
index 00000000..4b5a4ac6
--- /dev/null
+++ b/common/m4/stdint_h.m4
@@ -0,0 +1,28 @@
+# stdint_h.m4 serial 2 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_STDINT_H],
+[
+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <stdint.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_stdint_h=yes,
+ jm_ac_cv_header_stdint_h=no)])
+ if test $jm_ac_cv_header_stdint_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
diff --git a/common/m4/uintmax_t.m4 b/common/m4/uintmax_t.m4
new file mode 100644
index 00000000..ec3a8b92
--- /dev/null
+++ b/common/m4/uintmax_t.m4
@@ -0,0 +1,29 @@
+# uintmax_t.m4 serial 6 (gettext-0.11)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to `unsigned long' or `unsigned long long'
+# if <inttypes.h> does not exist.
+
+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
+[
+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
+ test $ac_cv_type_unsigned_long_long = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+ [Define to unsigned long or unsigned long long
+ if <inttypes.h> and <stdint.h> don't define.])
+ fi
+])
diff --git a/common/m4/ulonglong.m4 b/common/m4/ulonglong.m4
new file mode 100644
index 00000000..c375e474
--- /dev/null
+++ b/common/m4/ulonglong.m4
@@ -0,0 +1,23 @@
+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
+ [unsigned long long ullmax = (unsigned long long) -1;
+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
+ ac_cv_type_unsigned_long_long=yes,
+ ac_cv_type_unsigned_long_long=no)])
+ if test $ac_cv_type_unsigned_long_long = yes; then
+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+ [Define if you have the unsigned long long type.])
+ fi
+])
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000..a8558529
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,316 @@
+AC_PREREQ(2.60)
+
+dnl please read gstreamer/docs/random/autotools before changing this file
+
+dnl initialize autoconf
+dnl releases only do -Wall, cvs and prerelease does -Werror too
+dnl use a three digit version number for releases, and four for cvs/prerelease
+AC_INIT(Farsight2, 0.3.0.1,
+ https://bugs.freedesktop.org/enter_bug.cgi?product=Farsight,
+ farsight2)
+
+AG_GST_INIT
+
+dnl initialize automake
+AM_INIT_AUTOMAKE
+
+dnl define PACKAGE_VERSION_* variables
+AS_VERSION
+
+dnl check if this is a release version
+AS_NANO(FS2_CVS="no", FS2_CVS="yes")
+
+dnl can autoconf find the source ?
+AC_CONFIG_SRCDIR([gst-libs/gst/farsight/fs-candidate.c])
+
+dnl define the output header for config
+AM_CONFIG_HEADER([config.h])
+
+dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
+AM_MAINTAINER_MODE
+
+dnl sets host_* variables
+AC_CANONICAL_HOST
+
+dnl our libraries and install dirs use major.minor as a version
+FS2_MAJORMINOR=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR
+AC_SUBST(FS2_MAJORMINOR)
+
+GST_MAJORMINOR=0.10
+AC_SUBST(GST_MAJORMINOR)
+
+dnl CURRENT, REVISION, AGE
+dnl - library source changed -> increment REVISION
+dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
+dnl - interfaces added -> increment AGE
+dnl - interfaces removed -> AGE = 0
+dnl sets FS2_LT_LDFLAGS
+AS_LIBTOOL(FS2, 0, 0, 0)
+
+dnl FIXME: this macro doesn't actually work;
+dnl the generated libtool script has no support for the listed tags.
+dnl So this needs to be fixed first if we want to use this
+dnl AS_LIBTOOL_TAGS
+
+AM_PROG_LIBTOOL
+
+dnl *** required versions of GStreamer stuff ***
+GST_REQ=0.10.13.1
+GSTPB_REQ=0.10.13.1
+
+dnl *** autotools stuff ****
+
+dnl allow for different autotools
+AS_AUTOTOOLS_ALTERNATE
+
+dnl Add parameters for aclocal
+AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
+
+dnl *** check for arguments to configure ***
+
+AG_GST_ARG_DEBUG
+AG_GST_ARG_PROFILING
+AG_GST_ARG_VALGRIND
+AG_GST_ARG_GCOV
+
+AG_GST_ARG_WITH_PKG_CONFIG_PATH
+AG_GST_ARG_WITH_PACKAGE_NAME
+AG_GST_ARG_WITH_PACKAGE_ORIGIN
+
+dnl let distro override plugin install helper path
+AC_ARG_WITH(install-plugins-helper,
+ AC_HELP_STRING([--with-install-plugins-helper],
+ [specify path of helper script to call to install plugins]),
+ [
+ case "${withval}" in
+ yes) AC_MSG_ERROR(bad value ${withval} for --with-install-plugins-helper) ;;
+ no) AC_MSG_ERROR(bad value ${withval} for --with-install-plugins-helper) ;;
+ *) GST_INSTALL_PLUGINS_HELPER="${withval}" ;;
+ esac
+ ],
+ [
+ dnl Default value
+ AS_AC_EXPAND(GST_INSTALL_PLUGINS_HELPER,${libexecdir}/gst-install-plugins-helper)
+ ]
+)
+AC_MSG_NOTICE(Using $GST_INSTALL_PLUGINS_HELPER as plugin install helper)
+AC_DEFINE_UNQUOTED(GST_INSTALL_PLUGINS_HELPER, "$GST_INSTALL_PLUGINS_HELPER",
+ [plugin install helper script])
+AC_SUBST(GST_INSTALL_PLUGINS_HELPER)
+
+dnl these are all the gst plug-ins, compilable without additional libs
+FS2_PLUGINS_ALL=" \
+ fsrtpconference \
+ "
+AC_SUBST(FS2_PLUGINS_ALL)
+
+FS2_PLUGINS_SELECTED=""
+
+AC_ARG_WITH(plugins,
+ AC_HELP_STRING([--with-plugins],
+ [comma-separated list of plug-ins to compile]),
+ [for i in `echo $withval | tr , ' '`; do
+ if echo $FS2_PLUGINS_ALL | grep $i > /dev/null
+ then
+ FS2_PLUGINS_SELECTED="$FS2_PLUGINS_SELECTED $i"
+ else
+ echo "plug-in $i not recognized, ignoring..."
+ fi
+ done],
+ [FS2_PLUGINS_SELECTED=$FS2_PLUGINS_ALL])
+
+AC_SUBST(FS2_PLUGINS_SELECTED)
+
+dnl ext plug-ins; plug-ins that have external dependencies
+AG_GST_CHECK_FEATURE(EXTERNAL, [enable building of plug-ins with external deps],,
+ [HAVE_EXTERNAL=yes], enabled,
+ [
+ AC_MSG_NOTICE(building external plug-ins)
+ BUILD_EXTERNAL="yes"
+ ],[
+ AC_MSG_NOTICE(all plug-ins with external dependencies will not be built)
+ BUILD_EXTERNAL="no"
+ ])
+AM_CONDITIONAL(BUILD_EXTERNAL, test "x$BUILD_EXTERNAL" = "xyes")
+
+dnl *** checks for platform ***
+
+dnl * hardware/architecture *
+
+dnl *** checks for programs ***
+
+dnl find a compiler
+AC_PROG_CC
+
+AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
+AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
+
+dnl check for documentation tools
+GTK_DOC_CHECK([1.3])
+AS_PATH_PYTHON([2.1])
+dnl AG_GST_PLUGIN_DOCS([1.3],[2.1])
+
+dnl *** checks for libraries ***
+
+dnl For interactive UNIX (a Sun thing)
+dnl FIXME: this adds -lcposix to LIBS, but I doubt we use LIBS
+AC_ISC_POSIX
+
+dnl *** checks for header files ***
+
+dnl check if we have ANSI C header files
+AC_HEADER_STDC
+
+dnl used in gst/ffmpegcolorspace/mem.c
+dnl FIXME: could be fixed by redefining av_malloc and av_free to GLib's
+AC_CHECK_HEADERS([malloc.h])
+
+dnl *** checks for types/defines ***
+
+dnl *** checks for structures ***
+
+dnl *** checks for compiler characteristics ***
+
+dnl *** checks for library functions ***
+
+dnl Check for a way to display the function name in debug output
+AG_GST_CHECK_FUNCTION
+
+dnl *** checks for dependency libraries ***
+
+dnl GLib is required
+AG_GST_GLIB_CHECK([2.6])
+
+dnl checks for gstreamer
+dnl uninstalled is selected preferentially -- see pkg-config(1)
+AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
+AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
+AG_GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ])
+AG_GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ])
+AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
+AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GSTPB_REQ])
+AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
+
+dnl Check for documentation xrefs
+GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
+FS2_PREFIX="`$PKG_CONFIG --variable=prefix farsight-$FS2_MAJORMINOR`"
+AC_SUBST(GLIB_PREFIX)
+AC_SUBST(FS2_PREFIX)
+
+dnl *** set variables based on configure arguments ***
+
+dnl set license and copyright notice
+FS2_LICENSE="LGPL"
+AC_DEFINE_UNQUOTED(FS2_LICENSE, "$FS2_LICENSE", [Farsight2 license])
+AC_SUBST(FS2_LICENSE)
+
+dnl set location of plugin directory
+AG_GST_SET_PLUGINDIR
+
+dnl define an ERROR_CFLAGS Makefile variable
+AG_GST_SET_ERROR_CFLAGS($FS2_CVS)
+
+dnl define correct level for debugging messages
+AG_GST_SET_LEVEL_DEFAULT($FS2_CVS)
+
+dnl *** sys plug-ins ***
+
+echo
+AC_MSG_NOTICE([Checking libraries for plugins in sys/])
+echo
+
+dnl *** ext plug-ins ***
+dnl keep this list sorted alphabetically !
+
+if test "x$BUILD_EXTERNAL" = "xyes"; then
+
+echo
+AC_MSG_NOTICE([Checking libraries for plugins in ext/])
+echo
+
+else
+
+dnl not building plugins with external dependencies,
+dnl but we still need to set the conditionals
+echo
+
+fi dnl of EXT plugins
+
+dnl *** finalize CFLAGS, LDFLAGS, LIBS
+
+dnl Overview:
+dnl FS2_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
+dnl GST_*: flags shared by built objects to link against GStreamer
+dnl FS2_PLUGINS_BASE_CFLAGS: to link internally against the plugins base libs
+dnl (compare to other modules) or for i18n
+dnl FS2_ALL_LDFLAGS: linker flags shared by all
+dnl FS2_LIB_LDFLAGS: additional linker flags for all libaries
+dnl FS2_LT_LDFLAGS: library versioning of our libraries
+dnl FS2_PLUGIN_LDFLAGS: flags to be used for all plugins
+
+dnl FS2_OPTION_CFLAGS
+if test "x$USE_DEBUG" = xyes; then
+ PROFILE_CFLAGS="-g"
+fi
+AC_SUBST(PROFILE_CFLAGS)
+
+dnl every flag in FS2_OPTION_CFLAGS can be overridden at make time
+FS2_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS)"
+AC_SUBST(FS2_OPTION_CFLAGS)
+
+dnl our libraries need to be versioned correctly
+AC_SUBST(FS2_LT_LDFLAGS)
+
+dnl FS2_PLUGINS_BASE_CFLAGS
+dnl prefer internal headers to already installed ones
+dnl also add builddir include for enumtypes and marshal
+FS2_PLUGINS_BASE_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs"
+AC_SUBST(FS2_PLUGINS_BASE_CFLAGS)
+
+dnl FIXME: do we want to rename to GST_ALL_* ?
+dnl add FS2_OPTION_CFLAGS, but overridable
+FS2_CFLAGS="$GST_CFLAGS \$(FS2_OPTION_CFLAGS)"
+AC_SUBST(FS2_CFLAGS)
+
+dnl add GCOV libs because libtool strips -fprofile-arcs -ftest-coverage
+FS2_LIBS="$GST_LIBS \$(GCOV_LIBS)"
+AC_SUBST(FS2_LIBS)
+
+dnl LDFLAGS really should only contain flags, not libs - they get added before
+dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
+FS2_ALL_LDFLAGS="-no-undefined"
+AC_SUBST(FS2_ALL_LDFLAGS)
+
+dnl FS2_LIB_LDFLAGS
+dnl linker flags shared by all libraries
+dnl LDFLAGS modifier defining exported symbols from built libraries
+FS2_LIB_LDFLAGS="-export-symbols-regex [_]*\(fs_\|Fs\|FS_\).*"
+AC_SUBST(FS2_LIB_LDFLAGS)
+
+dnl this really should only contain flags, not libs - they get added before
+dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
+FS2_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
+AC_SUBST(FS2_PLUGIN_LDFLAGS)
+
+dnl *** output files ***
+
+AC_CONFIG_FILES(
+Makefile
+gst/Makefile
+gst/fsrtpconference/Makefile
+gst-libs/Makefile
+gst-libs/gst/Makefile
+gst-libs/gst/farsight/Makefile
+dnl pkgconfig/Makefile
+dnl pkgconfig/farsight2.pc
+dnl pkgconfig/farsight2-uninstalled.pc
+dnl tests/Makefile
+docs/Makefile
+ docs/libs/Makefile
+dnl docs/plugins/Makefile
+docs/version.entities
+dnl m4/Makefile
+)
+AC_OUTPUT
+
+AG_GST_OUTPUT_PLUGINS
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 00000000..e450efcb
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,6 @@
+PLUGIN_DOCS_DIRS =
+
+SUBDIRS = libs $(PLUGIN_DOCS_DIRS)
+DIST_SUBDIRS = libs
+
+EXTRA_DIST =
diff --git a/docs/libs/Makefile.am b/docs/libs/Makefile.am
new file mode 100644
index 00000000..1a118719
--- /dev/null
+++ b/docs/libs/Makefile.am
@@ -0,0 +1,73 @@
+## Process this file with automake to produce Makefile.in
+
+# FIXME: fix the docs then remove this variable
+DOCS_ARE_INCOMPLETE_PLEASE_FIXME=yespleasedo
+
+# The name of the module, e.g. 'glib'.
+#DOC_MODULE=gst-plugins-libs-@GST_MAJORMINOR@
+DOC_MODULE=farsight-libs
+
+# generated basefiles
+#basefiles = \
+## $(DOC_MODULE).types \
+# $(DOC_MODULE)-sections.txt \
+# $(DOC_MODULE)-docs.sgml
+
+# The top-level SGML file. Change it if you want.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
+
+# The directory containing the source code. Relative to $(top_srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting functions and macros.
+DOC_SOURCE_DIR=$(top_srcdir)/gst-libs/gst
+DOC_BUILD_DIR=$(top_builddir)/gst-libs/gst
+
+# Extra options to supply to gtkdoc-scan.
+SCAN_OPTIONS=
+
+# FIXME :
+# there's something wrong with gstreamer-sections.txt not being in the dist
+# maybe it doesn't resolve; we're adding it below for now
+#EXTRA_DIST = gstreamer.types.in gstreamer.hierarchy $(DOC_MODULE)-sections.txt gstreamer-sections.txt $(DOC_MAIN_SGML_FILE)
+
+# Extra options to supply to gtkdoc-mkdb.
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-fixref.
+FIXXREF_OPTIONS=--extra-dir=$(GLIB_PREFIX)/share/gtk-doc/html \
+ --extra-dir=$(GST_PREFIX)/share/gtk-doc/html
+
+# Used for dependencies.
+HFILE_GLOB=$(DOC_SOURCE_DIR)/*/*.h
+CFILE_GLOB=$(DOC_SOURCE_DIR)/*/*.c
+
+# this is a wingo addition
+# thomasvs: another nice wingo addition would be an explanation on why
+# this is useful ;)
+
+SCANOBJ_DEPS = \
+ $(top_builddir)/gst-libs/gst/farsight/libgstfarsight-@GST_MAJORMINOR@.la
+
+# Header files to ignore when scanning.
+IGNORE_HFILES =
+
+# Images to copy into HTML directory.
+HTML_IMAGES =
+
+# Other files to distribute.
+extra_files =
+
+# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
+# contains GtkObjects/GObjects and you want to document signals and properties.
+GTKDOC_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS)
+GTKDOC_LIBS = $(SCANOBJ_DEPS) $(GST_BASE_LIBS)
+
+GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC)
+GTKDOC_LD=$(LIBTOOL) --mode=link $(CC)
+
+# If you need to override some of the declarations, place them in this file
+# and uncomment this line.
+#DOC_OVERRIDES = $(DOC_MODULE)-overrides.txt
+DOC_OVERRIDES =
+
+include $(top_srcdir)/common/gtk-doc.mak
diff --git a/docs/libs/farsight-libs-docs.sgml b/docs/libs/farsight-libs-docs.sgml
new file mode 100644
index 00000000..b607c010
--- /dev/null
+++ b/docs/libs/farsight-libs-docs.sgml
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+ <bookinfo>
+ <title>[Insert name here] Reference Manual</title>
+ </bookinfo>
+
+ <chapter>
+ <title>[Insert title here]</title>
+ <xi:include href="xml/fs-participant.xml"/>
+ <xi:include href="xml/fs-stream.xml"/>
+ <xi:include href="xml/fs-session.xml"/>
+ <xi:include href="xml/fs-conference-iface.xml"/>
+ <xi:include href="xml/fs-candidate.xml"/>
+ <xi:include href="xml/fs-codec.xml"/>
+ <xi:include href="xml/fs-marshal.xml"/>
+ </chapter>
+</book>
diff --git a/docs/libs/farsight-libs-overrides.txt b/docs/libs/farsight-libs-overrides.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/docs/libs/farsight-libs-overrides.txt
diff --git a/docs/libs/farsight-libs-sections.txt b/docs/libs/farsight-libs-sections.txt
new file mode 100644
index 00000000..2d31ffd2
--- /dev/null
+++ b/docs/libs/farsight-libs-sections.txt
@@ -0,0 +1,111 @@
+<SECTION>
+<FILE>fs-participant</FILE>
+FsParticipantPrivate
+<TITLE>FsParticipant</TITLE>
+FsParticipant
+<SUBSECTION Standard>
+FS_PARTICIPANT
+FS_IS_PARTICIPANT
+FS_TYPE_PARTICIPANT
+fs_participant_get_type
+FS_PARTICIPANT_CLASS
+FS_IS_PARTICIPANT_CLASS
+FS_PARTICIPANT_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>fs-stream</FILE>
+FS_TYPE_STREAM_DIRECTION
+FsStreamDirection
+FsStreamPrivate
+<TITLE>FsStream</TITLE>
+FsStream
+<SUBSECTION Standard>
+FS_STREAM
+FS_IS_STREAM
+FS_TYPE_STREAM
+fs_stream_get_type
+FS_STREAM_CLASS
+FS_IS_STREAM_CLASS
+FS_STREAM_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>fs-session</FILE>
+FsSessionPrivate
+FsDTMFEvent
+FsDTMFMethod
+<TITLE>FsSession</TITLE>
+FsSession
+fs_session_add_participant
+fs_session_start_telephony_event
+fs_session_stop_telephony_event
+<SUBSECTION Standard>
+FS_SESSION
+FS_IS_SESSION
+FS_TYPE_SESSION
+fs_session_get_type
+FS_SESSION_CLASS
+FS_IS_SESSION_CLASS
+FS_SESSION_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>fs-conference-iface</FILE>
+FsConference
+FsConferenceInterface
+fs_conference_new_session
+fs_conference_new_participant
+<SUBSECTION Standard>
+FS_CONFERENCE
+FS_IS_CONFERENCE
+FS_TYPE_CONFERENCE
+fs_conference_get_type
+FS_CONFERENCE_GET_IFACE
+</SECTION>
+
+<SECTION>
+<FILE>fs-candidate</FILE>
+FS_TYPE_CANDIDATE
+FsCandidateType
+FsNetworkProtocol
+FsCandidate
+fs_candidate_destroy
+fs_candidate_copy
+fs_candidate_list_destroy
+fs_candidate_list_copy
+fs_candidate_get_by_id
+fs_candidate_are_equal
+</SECTION>
+
+<SECTION>
+<FILE>fs-codec</FILE>
+FsCodec
+FsCodecParameter
+FsCodecPreference
+FS_TYPE_CODEC
+FS_TYPE_CODEC_LIST
+FS_TYPE_MEDIA_TYPE
+FsMediaType
+fs_codec_get_type
+fs_codec_list_get_type
+fs_codec_init
+fs_codec_destroy
+fs_codec_copy
+fs_codec_list_destroy
+fs_codec_list_copy
+fs_codec_list_from_keyfile
+fs_codec_to_string
+fs_media_type_to_string
+</SECTION>
+
+<SECTION>
+<FILE>fs-base-conference</FILE>
+</SECTION>
+
+<SECTION>
+<FILE>fs-marshal</FILE>
+fs_marshal_VOID__INT_STRING_STRING
+fs_marshal_VOID__BOXED_BOXED
+</SECTION>
+
diff --git a/gst-libs/Makefile.am b/gst-libs/Makefile.am
new file mode 100644
index 00000000..062cb55a
--- /dev/null
+++ b/gst-libs/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = gst
diff --git a/gst-libs/gst/Makefile.am b/gst-libs/gst/Makefile.am
new file mode 100644
index 00000000..c8fa787f
--- /dev/null
+++ b/gst-libs/gst/Makefile.am
@@ -0,0 +1,8 @@
+# The interfaces directory has to be built before the others,
+# otherwise some generated header files will be missing for the
+# plugins in the other directories.
+# Also, the tag directory has to be built before the cdda directory.
+SUBDIRS = \
+ farsight
+
+noinst_HEADERS =
diff --git a/gst-libs/gst/farsight/Makefile.am b/gst-libs/gst/farsight/Makefile.am
new file mode 100644
index 00000000..a4672445
--- /dev/null
+++ b/gst-libs/gst/farsight/Makefile.am
@@ -0,0 +1,41 @@
+libgstfarsightincludedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/farsight
+
+libgstfarsightinclude_HEADERS = \
+ fs-base-conference.h \
+ fs-candidate.h \
+ fs-codec.h \
+ fs-participant.h \
+ fs-session.h \
+ fs-stream.h \
+ fs-conference-iface.h
+
+lib_LTLIBRARIES = libgstfarsight-@GST_MAJORMINOR@.la
+
+BUILT_SOURCES = \
+ fs-marshal.c \
+ fs-marshal.h
+
+libgstfarsight_@GST_MAJORMINOR@_la_SOURCES = \
+ fs-base-conference.c \
+ fs-candidate.c \
+ fs-codec.c \
+ fs-participant.c \
+ fs-session.c \
+ fs-stream.c \
+ fs-conference-iface.c
+
+EXTRA_libgstfarsight_@GST_MAJORMINOR@_la_SOURCES = fs-marshal.list
+
+fs-marshal.h: Makefile fs-marshal.list
+ glib-genmarshal --header --prefix=fs_marshal $(srcdir)/fs-marshal.list > fs-marshal.h.tmp
+ mv fs-marshal.h.tmp fs-marshal.h
+
+fs-marshal.c: Makefile fs-marshal.list
+ echo "#include \"glib-object.h\"" >> fs-marshal.c.tmp
+ echo "#include \"fs-marshal.h\"" >> fs-marshal.c.tmp
+ glib-genmarshal --body --prefix=fs_marshal $(srcdir)/fs-marshal.list >> fs-marshal.c.tmp
+ mv fs-marshal.c.tmp fs-marshal.c
+
+libgstfarsight_@GST_MAJORMINOR@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
+libgstfarsight_@GST_MAJORMINOR@_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS)
+libgstfarsight_@GST_MAJORMINOR@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS)
diff --git a/gst-libs/gst/farsight/fs-candidate.c b/gst-libs/gst/farsight/fs-candidate.c
index 7ba8b24a..b874b9c9 100644
--- a/gst-libs/gst/farsight/fs-candidate.c
+++ b/gst-libs/gst/farsight/fs-candidate.c
@@ -42,7 +42,7 @@ fs_candidate_get_type (void)
(GBoxedFreeFunc)fs_candidate_copy);
}
- return codec_type;
+ return candidate_type;
}
/**
diff --git a/gst-libs/gst/farsight/fs-candidate.h b/gst-libs/gst/farsight/fs-candidate.h
index 0689cdbf..c7e13d53 100644
--- a/gst-libs/gst/farsight/fs-candidate.h
+++ b/gst-libs/gst/farsight/fs-candidate.h
@@ -26,6 +26,7 @@
#define __FS_CANDIDATE_H__
#include <glib.h>
+#include <glib-object.h>
G_BEGIN_DECLS
diff --git a/gst-libs/gst/farsight/fs-codec.c b/gst-libs/gst/farsight/fs-codec.c
index 5ba886f9..66d616a7 100644
--- a/gst-libs/gst/farsight/fs-codec.c
+++ b/gst-libs/gst/farsight/fs-codec.c
@@ -87,14 +87,14 @@ fs_media_type_get_type (void)
* @codec: #FsCodec structure to initialise
* @id: codec identifier, if RTP this should be based on IETF RTP payload types
* @encoding_name: Name of media type this encodes
- * @media_type: #FarsightMediaType for type of codec
+ * @media_type: #FsMediaType for type of codec
* @clock_rate: The clock rate this codec encodes at, if applicable
*
* Initialises a #FsCodec structure
*/
void
fs_codec_init (FsCodec *codec, int id, const char *encoding_name,
- FarsightMediaType media_type, guint clock_rate)
+ FsMediaType media_type, guint clock_rate)
{
codec->id =id;
if (encoding_name)
@@ -228,7 +228,6 @@ fs_codec_list_copy (const GList *codec_list)
* a #GList of #FsCodec structures.
*
* Example:
- * <informalexample><programlisting>
* [audio/codec1]
* clock-rate=8000
*
@@ -238,7 +237,6 @@ fs_codec_list_copy (const GList *codec_list)
* [audio/codec2]
* one_param=QCIF
* another_param=WOW
- * </programlisting></informalexample>
*
* Return value: The read #GList of #FsCodec or %NULL if an error appended
*/
@@ -405,7 +403,7 @@ fs_codec_list_from_keyfile (const gchar *filename)
}
const gchar *
-fs_media_type_to_string (FarsightMediaType media_type)
+fs_media_type_to_string (FsMediaType media_type)
{
if (media_type == FS_MEDIA_TYPE_AUDIO) {
return "audio";
diff --git a/gst-libs/gst/farsight/fs-codec.h b/gst-libs/gst/farsight/fs-codec.h
index ec9d637e..2f540b30 100644
--- a/gst-libs/gst/farsight/fs-codec.h
+++ b/gst-libs/gst/farsight/fs-codec.h
@@ -29,6 +29,7 @@
#define __FS_CODEC_H__
#include <glib.h>
+#include <glib-object.h>
G_BEGIN_DECLS
@@ -56,6 +57,7 @@ typedef enum
{
FS_MEDIA_TYPE_AUDIO,
FS_MEDIA_TYPE_VIDEO,
+ FS_MEDIA_TYPE_AV,
FS_MEDIA_TYPE_LAST = FS_MEDIA_TYPE_VIDEO
} FsMediaType;
diff --git a/gst-libs/gst/farsight/fs-conference-iface.c b/gst-libs/gst/farsight/fs-conference-iface.c
index fa1301dd..d9c01557 100644
--- a/gst-libs/gst/farsight/fs-conference-iface.c
+++ b/gst-libs/gst/farsight/fs-conference-iface.c
@@ -27,7 +27,7 @@
#include "config.h"
#endif
-#include "fs-conference.h"
+#include "fs-conference-iface.h"
/**
* SECTION:FsConference
@@ -105,7 +105,7 @@ fs_conference_new_session (FsConference *conference, FsMediaType media_type)
/**
* fs_conference_new_participant
- * conference: #FsConference interface of a #GstElement
+ * @conference: #FsConference interface of a #GstElement
*
* Create a new Farsight participant for the given conference.
*
diff --git a/gst-libs/gst/farsight/fs-conference-iface.h b/gst-libs/gst/farsight/fs-conference-iface.h
index 60af7def..426b953f 100644
--- a/gst-libs/gst/farsight/fs-conference-iface.h
+++ b/gst-libs/gst/farsight/fs-conference-iface.h
@@ -29,15 +29,18 @@
#include <gst/gst.h>
#include <gst/interfaces/interfaces-enumtypes.h>
+#include "fs-session.h"
+#include "fs-codec.h"
+
G_BEGIN_DECLS
#define FS_TYPE_CONFERENCE \
(fs_conference_get_type ())
#define FS_CONFERENCE(obj) \
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), FS_TYPE_CONFERENCE, FsConference))
-#define GST_IS_VIDEO_ORIENTATION(obj) \
+#define FS_IS_CONFERENCE(obj) \
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), FS_TYPE_CONFERENCE))
-#define GST_VIDEO_ORIENTATION_GET_IFACE(inst) \
+#define FS_CONFERENCE_GET_IFACE(inst) \
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), FS_TYPE_CONFERENCE, FsConferenceInterface))
/**
diff --git a/gst-libs/gst/farsight/fs-participant.c b/gst-libs/gst/farsight/fs-participant.c
index 931ed6d7..d2e65b91 100644
--- a/gst-libs/gst/farsight/fs-participant.c
+++ b/gst-libs/gst/farsight/fs-participant.c
@@ -42,7 +42,8 @@
/* Signals */
enum
{
- ERROR
+ ERROR,
+ LAST_SIGNAL
};
/* props */
@@ -52,7 +53,7 @@ enum
PROP_CNAME
};
-struct _FsPrivate
+struct _FsParticipantPrivate
{
gboolean disposed;
@@ -124,7 +125,7 @@ fs_participant_class_init (FsParticipantClass *klass)
*
*/
g_object_class_install_property (gobject_class,
- PROP_DIRECTION,
+ PROP_CNAME,
g_param_spec_string ("cname",
"The cname of the participant",
"A string of the cname of the participant",
diff --git a/gst-libs/gst/farsight/fs-session.c b/gst-libs/gst/farsight/fs-session.c
index aa2ebe10..fee3cc57 100644
--- a/gst-libs/gst/farsight/fs-session.c
+++ b/gst-libs/gst/farsight/fs-session.c
@@ -43,6 +43,7 @@
#include "fs-session.h"
#include "fs-marshal.h"
#include "fs-codec.h"
+#include <gst/gst.h>
/* Signals */
enum
@@ -258,7 +259,7 @@ fs_session_class_init (FsSessionClass *klass)
0,
NULL,
NULL,
- g_cclosure_marshal_VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
/**
@@ -278,7 +279,7 @@ fs_session_class_init (FsSessionClass *klass)
0,
NULL,
NULL,
- g_cclosure_marshal_VOID,
+ g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
gobject_class->dispose = fs_session_dispose;
@@ -323,7 +324,7 @@ fs_session_finalize (GObject *object)
* fs_session_add_participant
* @session: #FsSession of a session in a conference
* @participants: #FsParticipant of a participant in a conference
- * @direction: #FsDirection describing the direction of the new stream that will
+ * @direction: #FsStreamDirection describing the direction of the new stream that will
* be created for this participant
*
* This function adds a participant into an active session therefore creating
@@ -333,7 +334,7 @@ fs_session_finalize (GObject *object)
*/
FsStream *
fs_session_add_participant (FsSession *session, FsParticipant *participant,
- FsDirection direction)
+ FsStreamDirection direction)
{
/* TODO make sure to link up to the error signal of the FsStream */
/* TODO make sure to set the direction as a construtor param */
@@ -400,7 +401,7 @@ fs_session_start_telephony_event_full (FsSession *session, guint8 ev,
* does not support telephony events or if no telephony event is being sent
*/
gboolean
-fs_session_stop_telephony_event (FSession *session, FsDTMFMethod method)
+fs_session_stop_telephony_event (FsSession *session, FsDTMFMethod method)
{
}
diff --git a/gst-libs/gst/farsight/fs-session.h b/gst-libs/gst/farsight/fs-session.h
index 2db23685..af3649fd 100644
--- a/gst-libs/gst/farsight/fs-session.h
+++ b/gst-libs/gst/farsight/fs-session.h
@@ -29,6 +29,7 @@
#include <glib-object.h>
#include "fs-stream.h"
+#include "fs-participant.h"
G_BEGIN_DECLS
@@ -102,13 +103,13 @@ struct _FsSessionClass
/*virtual functions */
FsStream *(* add_participant) (FsSession *session,
FsParticipant *participant,
- FsDirection direction);
+ FsStreamDirection direction);
gboolean (* start_telephony_event) (FsSession *session, guint8 event,
guint8 volume, FsDTMFMethod method);
gboolean (* start_telephony_event_full) (FsSession *session, guint8 ev,
guint8 volume, FsDTMFMethod method);
- gboolean (* stop_telephony_event) (FSession *session, FsDTMFMethod method);
+ gboolean (* stop_telephony_event) (FsSession *session, FsDTMFMethod method);
gboolean (* stop_telephony_event_full) (FsSession *session,
FsDTMFMethod method);
@@ -133,12 +134,12 @@ GType fs_session_get_type (void);
FsStream *fs_session_add_participant (FsSession *session,
FsParticipant *participant,
- FsDirection direction);
+ FsStreamDirection direction);
gboolean fs_session_start_telephony_event (FsSession *session, guint8 event,
guint8 volume, FsDTMFMethod method);
-gboolean fs_session_stop_telephony_event (FSession *session,
+gboolean fs_session_stop_telephony_event (FsSession *session,
FsDTMFMethod method);
G_END_DECLS
diff --git a/gst-libs/gst/farsight/fs-stream.c b/gst-libs/gst/farsight/fs-stream.c
index 5e883b7b..547416f9 100644
--- a/gst-libs/gst/farsight/fs-stream.c
+++ b/gst-libs/gst/farsight/fs-stream.c
@@ -38,9 +38,13 @@
#include "config.h"
#endif
+#include "fs-session.h"
#include "fs-stream.h"
#include "fs-marshal.h"
#include "fs-codec.h"
+#include "fs-candidate.h"
+
+#include <gst/gst.h>
/* Signals */
enum
diff --git a/gst/Makefile.am b/gst/Makefile.am
new file mode 100644
index 00000000..93522195
--- /dev/null
+++ b/gst/Makefile.am
@@ -0,0 +1,2 @@
+SUBDIRS = $(GST_PLUGINS_SELECTED)
+DIST_SUBDIRS = $(GST_PLUGINS_ALL)
diff --git a/gst/fsrtpconference/Makefile.am b/gst/fsrtpconference/Makefile.am
new file mode 100644
index 00000000..963fe9a4
--- /dev/null
+++ b/gst/fsrtpconference/Makefile.am
@@ -0,0 +1,8 @@
+plugin_LTLIBRARIES = libfsrtpconference.la
+
+libfsrtpconference_la_SOURCES = fsrtpconference.c
+libfsrtpconference_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+libfsrtpconference_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
+libfsrtpconference_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS)
+
+noinst_HEADERS = fsrtpconference.h