slim down iax build

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8321 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-05-08 23:25:36 +00:00
parent 752b0ff8f6
commit 5b77843583
56 changed files with 17 additions and 5666 deletions

View File

@ -593,7 +593,6 @@ AC_CONFIG_SUBDIRS(libs/apr-util)
AC_CONFIG_SUBDIRS(libs/voipcodecs)
AC_CONFIG_SUBDIRS(libs/codec/ilbc)
AC_CONFIG_SUBDIRS(libs/curl)
AC_CONFIG_SUBDIRS(libs/iax)
AC_CONFIG_SUBDIRS(libs/iksemel)
AC_CONFIG_SUBDIRS(libs/js/nsprpub)
AC_CONFIG_SUBDIRS(libs/js)

View File

@ -1 +0,0 @@
Sat Mar 10 12:59:56 EST 2007

View File

View File

@ -1,416 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, 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
Appendix: 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) 19yy <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., 675 Mass Ave, Cambridge, MA 02139, 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) 19yy 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.

View File

@ -1,482 +0,0 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, 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 library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, 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 companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, 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 library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete 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 distribute a copy of this License along with the
Library.
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 Library or any portion
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
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 Library, 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 Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you 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.
If distribution of 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 satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. 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.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library 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.
9. 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 Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
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.
11. 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 Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library 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 Library.
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.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library 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.
13. The Free Software Foundation may publish revised and/or new
versions of the Library 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 Library
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 Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
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
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "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
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. 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 LIBRARY 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
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@ -1,21 +0,0 @@
libiax
======
version 0.2.3:
* Allow password to be passed in connect
version 0.2.2 (Nov 13th, 2001):
* HTML Unlink requests
* HTML Reject link requests
* Text frames
version 0.2.1 (Oct 20th, 2001):
* More space for challenge in IAX
* Fixed strncpy security bug
* Accept larger packets
* Handle out of order packets better
* Implemented send_url
* Added an iax-config script :-)
version 0.2.0 (Oct 10th, 2001):
* Initial Public Release

View File

@ -1,231 +0,0 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PREFIX', the package will
use PREFIX as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
will cause the specified gcc to be used as the C compiler (unless it is
overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

View File

@ -1,6 +0,0 @@
SUBDIRS = src
bin_SCRIPTS=iax-config
BUILT_SCOURCES=iax-config
EXTRA_DIST=iax.spec libiax2.vcproj
iax-config: iax-config.in

View File

@ -1,12 +0,0 @@
libiax
======
0.2.3:
0.2.2:
0.2.1:
0.2.0 (Oct 10th, 2001):
Initial Release. Hooray! Rejoice! :)

View File

@ -1,4 +0,0 @@
libiax: An implementation of the Inter-Asterisk eXchange protocol distributed
under the terms of the GNU Lesser General Public License
Written by Mark Spencer <markster@linux-support.net>

View File

@ -1,6 +0,0 @@
m4_include([build/config/ax_compiler_vendor.m4])
m4_include([build/config/ax_cflags_warn_all_ansi.m4])
m4_include([build/config/ax_cc_maxopt.m4])
m4_include([build/config/ax_check_compiler_flags.m4])
m4_include([build/config/ac_gcc_archflag.m4])
m4_include([build/config/ac_gcc_x86_cpuid.m4])

View File

@ -1,6 +0,0 @@
echo If this fails you probably need to download the latest
echo libtool,aclocal,autoconf and automake
libtoolize --copy --force
aclocal --force
autoconf -f
automake -acf

View File

@ -1,13 +0,0 @@
echo configuring automake
./bootstrap.sh
echo configuring libiax2
./configure --enable-newjb
echo building libiax2
make
echo
echo
echo '##################################################################'
echo '# #'
echo '# If all is well, enter "make install" to complete installation. #'
echo '# #'
echo '##################################################################'

View File

@ -1,142 +0,0 @@
AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$2])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_C
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic % m4_ifval($2,$2,-option)" dnl GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl the only difference - the LANG selection... and the default FLAGS
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION_OLD], [dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc_option_$2])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_CXX
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic % m4_ifval($2,$2,-option)" dnl GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl -------------------------------------------------------------------------
AC_DEFUN([AX_CFLAGS_GCC_OPTION_NEW], [dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$1])dnl
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_C
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic % m4_ifval($1,$1,-option)" dnl GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl the only difference - the LANG selection... and the default FLAGS
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION_NEW], [dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc_option_$1])dnl
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_CXX
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic % m4_ifval($1,$1,-option)" dnl GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
AC_DEFUN([AX_CFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
[AX_CFLAGS_GCC_OPTION_NEW($@)],[AX_CFLAGS_GCC_OPTION_OLD($@)])])
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
[AX_CXXFLAGS_GCC_OPTION_NEW($@)],[AX_CXXFLAGS_GCC_OPTION_OLD($@)])])

View File

@ -1,140 +0,0 @@
AC_DEFUN([AX_CFLAGS_SUN_OPTION_OLD], [dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_sun_option_$2])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for sun/cc m4_ifval($2,$2,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_C
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "+xstrconst % -xc99=all m4_ifval($2,$2,-option)" dnl Solaris C
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl the only difference - the LANG selection... and the default FLAGS
AC_DEFUN([AX_CXXFLAGS_SUN_OPTION_OLD], [dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_sun_option_$2])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for sun/cc m4_ifval($2,$2,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_CXX
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "+xstrconst % -xc99=all m4_ifval($2,$2,-option)" dnl Solaris C
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl -----------------------------------------------------------------------
AC_DEFUN([AX_CFLAGS_SUN_OPTION_NEW], [dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_sun_option_$1])dnl
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for sun/cc m4_ifval($1,$1,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_C
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "+xstrconst % -xc99=all m4_ifval($1,$1,-option)" dnl Solaris C
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl the only difference - the LANG selection... and the default FLAGS
AC_DEFUN([AX_CXXFLAGS_SUN_OPTION_NEW], [dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_sun_option_$1])dnl
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for sun/cc m4_ifval($1,$1,-option)],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_CXX
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "+xstrconst % -xc99=all m4_ifval($1,$1,-option)" dnl Solaris C
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
AC_DEFUN([AX_CFLAGS_SUN_OPTION],[ifelse(m4_regexp([$2],[-]),-1,
[AX_CFLAGS_SUN_OPTION_NEW($@)],[AX_CFLAGS_SUN_OPTION_OLD($@)])])
AC_DEFUN([AX_CXXFLAGS_SUN_OPTION],[ifelse(m4_regexp([$2],[-]),-1,
[AX_CXXFLAGS_SUN_OPTION_NEW($@)],[AX_CXXFLAGS_SUN_OPTION_OLD($@)])])

View File

@ -1,148 +0,0 @@
AC_DEFUN([AX_GCC_ARCHFLAG],
[AC_REQUIRE([AC_PROG_CC])
AC_ARG_WITH(gcc-arch, [AC_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])],
ax_gcc_arch=$withval, ax_gcc_arch=yes)
AC_MSG_CHECKING([for gcc architecture flag])
AC_MSG_RESULT([])
AC_CACHE_VAL(ax_cv_gcc_archflag,
[
ax_cv_gcc_archflag="unknown"
if test "$GCC" = yes; then
if test "x$ax_gcc_arch" = xyes; then
ax_gcc_arch=""
if test "$cross_compiling" = no; then
case $host_cpu in
i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
AX_GCC_X86_CPUID(0)
AX_GCC_X86_CPUID(1)
case $ax_cv_gcc_x86_cpuid_0 in
*:756e6547:*:*) # Intel
case $ax_cv_gcc_x86_cpuid_1 in
*5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
*5??:*:*:*) ax_gcc_arch=pentium ;;
*6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
*6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
*6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
*6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
*6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
*6??:*:*:*) ax_gcc_arch=pentiumpro ;;
*f3[[347]]:*:*:*|*f4[1347]:*:*:*)
case $host_cpu in
x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
*) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
esac ;;
*f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
esac ;;
*:68747541:*:*) # AMD
case $ax_cv_gcc_x86_cpuid_1 in
*5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
*5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
*5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
*60?:*:*:*) ax_gcc_arch=k7 ;;
*6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
*6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
*67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
*6[[68a]]?:*:*:*)
AX_GCC_X86_CPUID(0x80000006) # L2 cache size
case $ax_cv_gcc_x86_cpuid_0x80000006 in
*:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256
ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
*) ax_gcc_arch="athlon-4 athlon k7" ;;
esac ;;
*f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
*f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
*f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
*f??:*:*:*) ax_gcc_arch="k8" ;;
esac ;;
*:746e6543:*:*) # IDT
case $ax_cv_gcc_x86_cpuid_1 in
*54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
*58?:*:*:*) ax_gcc_arch=winchip2 ;;
*6[[78]]?:*:*:*) ax_gcc_arch=c3 ;;
*69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
esac ;;
esac
if test x"$ax_gcc_arch" = x; then # fallback
case $host_cpu in
i586*) ax_gcc_arch=pentium ;;
i686*) ax_gcc_arch=pentiumpro ;;
esac
fi
;;
sparc*)
AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
case $cputype in
*ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
*ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
*ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
*supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;;
*hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;;
*cypress*) ax_gcc_arch=cypress ;;
esac ;;
alphaev5) ax_gcc_arch=ev5 ;;
alphaev56) ax_gcc_arch=ev56 ;;
alphapca56) ax_gcc_arch="pca56 ev56" ;;
alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
alphaev6) ax_gcc_arch=ev6 ;;
alphaev67) ax_gcc_arch=ev67 ;;
alphaev68) ax_gcc_arch="ev68 ev67" ;;
alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
powerpc*)
cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
case $cputype in
*750*) ax_gcc_arch="750 G3" ;;
*740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
*74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;;
*74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;;
*970*) ax_gcc_arch="970 G5 power4";;
*POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
*POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
603ev|8240) ax_gcc_arch="$cputype 603e 603";;
*) ax_gcc_arch=$cputype ;;
esac
ax_gcc_arch="$ax_gcc_arch powerpc"
;;
esac
fi # not cross-compiling
fi # guess arch
if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
for arch in $ax_gcc_arch; do
if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
flags="-mtune=$arch"
# -mcpu=$arch and m$arch generate nonportable code on every arch except
# x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr.
case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
else
flags="-march=$arch -mcpu=$arch -m$arch"
fi
for flag in $flags; do
AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break])
done
test "x$ax_cv_gcc_archflag" = xunknown || break
done
fi
fi # $GCC=yes
])
AC_MSG_CHECKING([for gcc architecture flag])
AC_MSG_RESULT($ax_cv_gcc_archflag)
if test "x$ax_cv_gcc_archflag" = xunknown; then
m4_default([$3],:)
else
m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
fi
])

View File

@ -1,21 +0,0 @@
AC_DEFUN([AX_GCC_X86_CPUID],
[AC_REQUIRE([AC_PROG_CC])
AC_LANG_PUSH([C])
AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
[AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
int op = $1, eax, ebx, ecx, edx;
FILE *f;
__asm__("cpuid"
: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
: "a" (op));
f = fopen("conftest_cpuid", "w"); if (!f) return 1;
fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
fclose(f);
return 0;
])],
[ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
[ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
[ax_cv_gcc_x86_cpuid_$1=unknown])])
AC_LANG_POP([C])
])

View File

@ -1,9 +0,0 @@
AC_DEFUN([AC_PROG_GZIP],[
AC_CHECK_PROGS(gzip,[gzip],no)
export gzip;
if test $gzip = "no" ;
then
AC_MSG_ERROR([Unable to find the gzip application]);
fi
AC_SUBST(gzip)
])

View File

@ -1,9 +0,0 @@
AC_DEFUN([AC_PROG_WGET],[
AC_CHECK_PROGS(wget,[wget],no)
export wget;
if test $wget = "no" ;
then
AC_MSG_ERROR([Unable to find the wget application]);
fi
AC_SUBST(wget)
])

View File

@ -1,120 +0,0 @@
AC_DEFUN([AX_CC_MAXOPT],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AX_COMPILER_VENDOR])
AC_ARG_ENABLE(portable-binary, [AC_HELP_STRING([--enable-portable-binary], [disable compiler optimizations that would produce unportable binaries])],
acx_maxopt_portable=$withval, acx_maxopt_portable=no)
# Try to determine "good" native compiler flags if none specified via CFLAGS
if test "$ac_test_CFLAGS" != "set"; then
CFLAGS=""
case $ax_cv_c_compiler_vendor in
dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
if test "x$acx_maxopt_portable" = xno; then
CFLAGS="$CFLAGS -arch host"
fi;;
sun) CFLAGS="-native -fast -xO5 -dalign -xc99=all"
if test "x$acx_maxopt_portable" = xyes; then
CFLAGS="$CFLAGS -xarch=generic"
fi;;
hp) CFLAGS="+Oall +Optrs_ansi +DSnative"
if test "x$acx_maxopt_portable" = xyes; then
CFLAGS="$CFLAGS +DAportable"
fi;;
ibm) if test "x$acx_maxopt_portable" = xno; then
xlc_opt="-qarch=auto -qtune=auto"
else
xlc_opt="-qtune=auto"
fi
AX_CHECK_COMPILER_FLAGS($xlc_opt,
CFLAGS="-O3 -qansialias -w $xlc_opt",
[CFLAGS="-O3 -qansialias -w"
echo "******************************************************"
echo "* You seem to have the IBM C compiler. It is *"
echo "* recommended for best performance that you use: *"
echo "* *"
echo "* CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *"
echo "* ^^^ ^^^ *"
echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *"
echo "* CPU you have. (Set the CFLAGS environment var. *"
echo "* and re-run configure.) For more info, man cc. *"
echo "******************************************************"])
;;
intel) CFLAGS="-O3 -ansi_alias"
if test "x$acx_maxopt_portable" = xno; then
icc_archflag=unknown
icc_flags=""
case $host_cpu in
i686*|x86_64*)
# icc accepts gcc assembly syntax, so these should work:
AX_GCC_X86_CPUID(0)
AX_GCC_X86_CPUID(1)
case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
*:756e6547:*:*) # Intel
case $ax_cv_gcc_x86_cpuid_1 in
*6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";;
*f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";;
*f??:*:*:*) icc_flags="-xN -xW -xK";;
esac ;;
esac ;;
esac
if test "x$icc_flags" != x; then
for flag in $icc_flags; do
AX_CHECK_COMPILER_FLAGS($flag, [icc_archflag=$flag; break])
done
fi
AC_MSG_CHECKING([for icc architecture flag])
AC_MSG_RESULT($icc_archflag)
if test "x$icc_archflag" != xunknown; then
CFLAGS="$CFLAGS $icc_archflag"
fi
fi
;;
gnu)
# default optimization flags for gcc on all systems
CFLAGS="-O3 -fomit-frame-pointer"
# -malign-double for x86 systems
AX_CHECK_COMPILER_FLAGS(-malign-double, CFLAGS="$CFLAGS -malign-double")
# -fstrict-aliasing for gcc-2.95+
AX_CHECK_COMPILER_FLAGS(-fstrict-aliasing,
CFLAGS="$CFLAGS -fstrict-aliasing")
# note that we enable "unsafe" fp optimization with other compilers, too
AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
AX_GCC_ARCHFLAG($acx_maxopt_portable)
;;
esac
if test -z "$CFLAGS"; then
echo ""
echo "********************************************************"
echo "* WARNING: Don't know the best CFLAGS for this system *"
echo "* Use ./configure CFLAGS=... to specify your own flags *"
echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
echo "********************************************************"
echo ""
CFLAGS="-O3"
fi
AX_CHECK_COMPILER_FLAGS($CFLAGS, [], [
echo ""
echo "********************************************************"
echo "* WARNING: The guessed CFLAGS don't seem to work with *"
echo "* your compiler. *"
echo "* Use ./configure CFLAGS=... to specify your own flags *"
echo "********************************************************"
echo ""
CFLAGS=""
])
fi
])

View File

@ -1,94 +0,0 @@
AC_DEFUN([AX_CFLAGS_WARN_ALL_ANSI],[dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all_ansi])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_C
ac_save_[]FLAGS="$[]FLAGS"
# IRIX C compiler:
# -use_readonly_const is the default for IRIX C,
# puts them into .rodata, but they are copied later.
# need to be "-G0 -rdatashared" for strictmode but
# I am not sure what effect that has really. - guidod
for ac_arg dnl
in "-pedantic % -Wall -std=c99 -pedantic" dnl GCC
"-xstrconst % -v -xc99=all" dnl Solaris C
"-std1 % -verbose -w0 -warnprotos -std1" dnl Digital Unix
" % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
" % -ansi -ansiE -fullwarn" dnl IRIX
"+ESlit % +w1 -Aa" dnl HP-UX C
"-Xc % -pvctl[,]fullmsg -Xc" dnl NEC SX-5 (Super-UX 10)
"-h conform % -h msglevel 2 -h conform" dnl Cray C (Unicos)
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl the only difference - the LANG selection... and the default FLAGS
AC_DEFUN([AX_CXXFLAGS_WARN_ALL_ANSI],[dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all_ansi])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum ansi warnings],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_CXX
ac_save_[]FLAGS="$[]FLAGS"
# IRIX C compiler:
# -use_readonly_const is the default for IRIX C,
# puts them into .rodata, but they are copied later.
# need to be "-G0 -rdatashared" for strictmode but
# I am not sure what effect that has really. - guidod
for ac_arg dnl
in "-pedantic % -Wall -ansi -pedantic" dnl GCC
"-xstrconst % -v -Xc" dnl Solaris C
"-std1 % -verbose -w0 -warnprotos -std1" dnl Digital Unix
" % -qlanglvl=ansi -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
" % -ansi -ansiE -fullwarn" dnl IRIX
"+ESlit % +w1 -Aa" dnl HP-UX C
"-Xc % -pvctl[,]fullmsg -Xc" dnl NEC SX-5 (Super-UX 10)
"-h conform % -h msglevel 2 -h conform" dnl Cray C (Unicos)
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])

View File

@ -1,26 +0,0 @@
AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
AS_LITERAL_IF([$1],
[AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1), [
ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$1"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
[ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$1"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=yes,
eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)=no)
_AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_$1)
AC_MSG_RESULT($ax_check_compiler_flags)
if test "x$ax_check_compiler_flags" = xyes; then
m4_default([$2], :)
else
m4_default([$3], :)
fi
])dnl AX_CHECK_COMPILER_FLAG

View File

@ -1,15 +0,0 @@
AC_DEFUN([AX_COMPILER_VENDOR],
[
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
# note: don't check for gcc first since some other compilers define __GNUC__
for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
#if !($vencpp)
thisisanerror;
#endif
])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
done
])
])

View File

@ -1,3 +0,0 @@
#! /bin/sh
./configure "$@" --enable-newjb --disable-shared

View File

@ -1,147 +0,0 @@
dnl Yo Yo Yo
AC_INIT(src/iax.c)
AC_CONFIG_AUX_DIR(build)
AM_INIT_AUTOMAKE([iax], [0.2.3])
#Set default language
AC_LANG_C
dnl Check for various goodies
AC_PROG_CC
AM_PROG_LIBTOOL
dnl LIBTOOL="$LIBTOOL --silent"
AC_PROG_INSTALL
#Check for compiler vendor
AX_COMPILER_VENDOR
# Optimize
AC_ARG_ENABLE(optimization,
[AC_HELP_STRING([--enable-optimization],[Set if you want us to add max optimising compiler flags])],[enable_optimizer="$enableval"],[enable_optimizer="no"])
if test "${enable_optimizer}" = "yes" ; then
AC_DEFINE([OPTIMZER],[],[Enable Optimization.])
AX_CC_MAXOPT
fi
# Enable debugging
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug],[build with debug information])],[enable_debug="$enable_debug"],[enable_debug="yes"])
if test "${enable_debug}" = "yes"; then
AC_DEFINE([DEBUG],[],[Enable extra debugging.])
AX_CFLAGS_WARN_ALL_ANSI
fi
AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
case "$host" in
*-solaris2*)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-KPIC -DPIC"
new_AM_LDFLAGS="-R${prefix}/lib"
IN_LINE=""
elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-fPIC"
new_AM_LDFLAGS=""
IN_LINE=inline
fi
DYNAMIC_LIB_EXTEN="so"
;;
*-darwin*)
if test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-dynamic -bundle -force-flat-namespace"
new_AM_CFLAGS="-DMACOSX"
new_AM_LDFLAGS=""
fi
DYNAMIC_LIB_EXTEN="dylib"
IN_LINE=inline
;;
x86_64-*-linux-gnu)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-KPIC -DPIC"
new_AM_LDFLAGS="-R${prefix}/lib"
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-shared -Xlinker -x"
new_AM_CFLAGS="-fPIC"
new_AM_LDFLAGS=""
fi
DYNAMIC_LIB_EXTEN="so"
IN_LINE=inline
;;
i*6-*-linux-gnu)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-KPIC -DPIC"
new_AM_LDFLAGS="-R${prefix}/lib"
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-shared -Xlinker -x"
new_AM_CFLAGS="-fpic"
new_AM_LDFLAGS=""
fi
DYNAMIC_LIB_EXTEN="so"
IN_LINE=inline
;;
*)
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
SOLINK="-Bdynamic -dy -G"
new_AM_CFLAGS="-KPIC -DPIC"
new_AM_LDFLAGS="-R${prefix}/lib"
elif test "x${ax_cv_c_compiler_vendor}"="xgnu" ; then
SOLINK="-shared -Xlinker -x"
new_AM_CFLAGS="-fPIC"
new_AM_LDFLAGS=""
fi
DYNAMIC_LIB_EXTEN="so"
IN_LINE=inline
;;
esac
# Enable 64 bit build
AC_ARG_ENABLE(64,
[AC_HELP_STRING([--enable-64],[build with 64 bit support])],[enable_64="$enable_64"],[enable_64="no"])
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
if test "${enable_64}" = "yes"; then
new_AM_CFLAGS="$new_AM_CFLAGS -m64"
fi
fi
AC_SUBST(new_AM_CFLAGS)
AC_SUBST(new_AM_LDFLAGS)
AC_SUBST(SOLINK)
AC_SUBST(DYNAMIC_LIB_EXTEN)
AC_DEFINE_UNQUOTED([__inline__],[$IN_LINE],[sunpro is bad at inline])
dnl Check for libraries
dnl None available
dnl Check header files
AC_HEADER_STDC
AC_SUBST(LIBS)
AC_ARG_ENABLE(snomhack, [ --enable-snomhack Use slower memset for SNOM phoneem ],,enable_snomhack=no)
AC_ARG_ENABLE(extreme_debug, [ --enable-extreme-debug Compile with extreme debugging code enabled ],,enable_extreme_debug=no)
AC_ARG_ENABLE(newjb, [ --enable-newjb Use new jitter buffer ], [CFLAGS="$CFLAGS -DNEWJB"])
if test "$enable_snomhack" = yes ; then
AC_DEFINE(SNOM_HACK)
fi
if test "$enable_extreme_debug" = yes ; then
AC_DEFINE(EXTREME_DEBUG)
fi
AC_SUBST(IAX_VERSION)
AC_OUTPUT([
Makefile
src/Makefile
iax.spec
iax-config],[case "$CONFIG_FILES" in
*iax-config*)chmod +x iax-config;;
esac])

View File

@ -1,74 +0,0 @@
#!/bin/sh
iax_libs="-L/usr/lib -liax"
iax_cflags=""
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
usage="\
Usage: iax-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags]"
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo @VERSION@
;;
--cflags)
# if test ${prefix}/include/iax != /usr/include/iax ; then
includes=-I${prefix}/include/iax
for i in $iax_cflags ; do
if test $i = -I${prefix}/include ; then
includes=""
fi
done
# fi
echo $includes $iax_cflags
;;
--libs)
my_iax_libs=
libdirs=-L${exec_prefix}/lib
for i in $iax_libs ; do
if test $i != -L${exec_prefix}/lib ; then
if test -z "$my_iax_libs" ; then
my_iax_libs="$i"
else
my_iax_libs="$my_iax_libs $i"
fi
fi
done
echo $libdirs $my_iax_libs
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done

View File

@ -1,91 +0,0 @@
%define name @PACKAGE@
%define version @VERSION@
%define release 1
%define prefix /usr
Summary: IAX (Inter Asterisk eXchange) Library
Name: %{name}
Version: %{version}
Release: %{release}
Copyright: LGPL
Group: Development/Libraries
Source: %{name}-%{version}.tar.gz
URL: http://www.linux-support.net/
Distribution: RedHat Linux
Vendor: Linux Support Services
Packager: Rob Flynn <rob@linux-support.net>
BuildRoot: /var/tmp/%{name}-%{version}-root
%description
Inter Asterisk eXchange, lovingly called IAX (pronounced: eeks), is the protocol used by the Asterisk PBX
system for inter-asterisk-communication. Other applications may use libiax to communicate with each other
and other asterisk servers. IAX is a high performance, feature rich protocol unrelated
to SIP or H.323. Its single-socket design allows it to interoperate with NAT and PAT
masquerade firewalls. It supports internationalization, remote dialplans,
and voice, HTML, image, DTMF, and video content. For more information see
http://www.gnophone.com.
%package devel
Summary: IAX (Inter Asterisk eXchange) Development Package
Group: Development/Libraries
Requires: iax
%description devel
Inter Asterisk eXchange, lovingly called IAX (pronounced: eeks), is the protocol used by the Asterisk PBX
system for inter-asterisk-communication. Other applications may use libiax to communicate with each other
and other asterisk servers. IAX is a high performance, feature rich protocol unrelated
to SIP or H.323. Its single-socket design allows it to interoperate with NAT and PAT
masquerade firewalls. It supports internationalization, remote dialplans,
and voice, HTML, image, DTMF, and video content. For more information see
http://www.gnophone.com.
This package contains all of the development files that you will need in order to compile IAX applications.
%prep
%setup
%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --enable-autoupdate
make
%install
rm -rf $RPM_BUILD_ROOT
make prefix=$RPM_BUILD_ROOT%{prefix} install-strip
%files
%defattr(-,root,root)
%doc NEWS COPYING AUTHORS README
%{prefix}/lib
%files devel
%defattr(-,root,root)
%{prefix}/include/iax
%{prefix}/bin/*
%clean
rm -r $RPM_BUILD_ROOT
%changelog
* Tue Nov 13 2001 Rob Flynn <rob@linux-support.net> (0.2.2 release)
- HTML Unlink requests
- HTML Reject link requests
- Text frames
* Sat Oct 20 2001 Rob Flynn <rob@linux-support.net> (0.2.1 release)
- More space for challenge in IAX
- Fixed strncpy security bug
- Accept larger packets
- Handle out of order packets better
- Implemented send_url
- Added an iax-config script :-)
* Wed Oct 10 2001 Rob Flynn <rob@linux-support.net> (0.2.0 release)
- Initial public release
%post
%preun
%postun

View File

@ -1,249 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="libiax2"
ProjectGUID="{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}"
RootNamespace="libiax2"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
InlineFunctionExpansion="0"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LIBIAX;DEBUG_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;NEWJB;WIN32_TIME_GET_TIME"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LIBIAX;DEBUG_SUPPORT;WIN32_TIME_GET_TIME;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\src\iax-mutex.c"
>
</File>
<File
RelativePath=".\src\iax.c"
>
</File>
<File
RelativePath=".\src\iax2-parser.c"
>
</File>
<File
RelativePath=".\src\jitterbuf.c"
>
</File>
<File
RelativePath=".\src\md5.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\src\answer.h"
>
</File>
<File
RelativePath=".\src\busy.h"
>
</File>
<File
RelativePath=".\src\dialtone.h"
>
</File>
<File
RelativePath=".\src\frame.h"
>
</File>
<File
RelativePath=".\src\iax-client.h"
>
</File>
<File
RelativePath=".\src\iax-mutex.h"
>
</File>
<File
RelativePath=".\src\iax.h"
>
</File>
<File
RelativePath=".\src\iax2-parser.h"
>
</File>
<File
RelativePath=".\src\iax2.h"
>
</File>
<File
RelativePath=".\src\jitterbuf.h"
>
</File>
<File
RelativePath=".\src\md5.h"
>
</File>
<File
RelativePath=".\src\miniphone.h"
>
</File>
<File
RelativePath=".\src\options.h"
>
</File>
<File
RelativePath=".\src\ring10.h"
>
</File>
<File
RelativePath=".\src\ringtone.h"
>
</File>
<File
RelativePath=".\src\winpoop.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,250 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="libiax2"
ProjectGUID="{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}"
RootNamespace="libiax2"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
InlineFunctionExpansion="0"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LIBIAX;DEBUG_SUPPORT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;NEWJB;WIN32_TIME_GET_TIME"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LIBIAX;DEBUG_SUPPORT;WIN32_TIME_GET_TIME;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\src\iax-mutex.c"
>
</File>
<File
RelativePath=".\src\iax.c"
>
</File>
<File
RelativePath=".\src\iax2-parser.c"
>
</File>
<File
RelativePath=".\src\jitterbuf.c"
>
</File>
<File
RelativePath=".\src\md5.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\src\answer.h"
>
</File>
<File
RelativePath=".\src\busy.h"
>
</File>
<File
RelativePath=".\src\dialtone.h"
>
</File>
<File
RelativePath=".\src\frame.h"
>
</File>
<File
RelativePath=".\src\iax-client.h"
>
</File>
<File
RelativePath=".\src\iax-mutex.h"
>
</File>
<File
RelativePath=".\src\iax.h"
>
</File>
<File
RelativePath=".\src\iax2-parser.h"
>
</File>
<File
RelativePath=".\src\iax2.h"
>
</File>
<File
RelativePath=".\src\jitterbuf.h"
>
</File>
<File
RelativePath=".\src\md5.h"
>
</File>
<File
RelativePath=".\src\miniphone.h"
>
</File>
<File
RelativePath=".\src\options.h"
>
</File>
<File
RelativePath=".\src\ring10.h"
>
</File>
<File
RelativePath=".\src\ringtone.h"
>
</File>
<File
RelativePath=".\src\winpoop.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -1,8 +0,0 @@
Makefile.in
Makefile
.deps
.libs
iax.lo
md5.lo
libiax.la

View File

@ -1,15 +0,0 @@
AM_CFLAGS = $(new_AM_CFLAGS)
AM_CPPFLAGS = $(AM_CFLAGS)
AM_LDFLAGS = $(new_AM_LDFLAGS)
AM_CFLAGS += -DDEBUG_SUPPORT -DLIBIAX
# -DDEBUG_DEFAULT
AM_CFLAGS += $(UCFLAGS)
pkgdir = $(libdir)
pkg_LTLIBRARIES=libiax.la
libiax_la_SOURCES = iax2-parser.c iax.c md5.c jitterbuf.c iax-mutex.c
library_includedir = $(prefix)/include/iax
library_include_HEADERS = md5.h frame.h iax-client.h iax2.h iax2-parser.h iax.h iax-mutex.h
noinst_HEADERS = jitterbuf.h

View File

@ -1,55 +0,0 @@
/* busy.h: Generated from frequencies 480 and 620
by gensound. 400 samples */
static short busy[400] = {
0, 13697, 24766, 31109, 31585, 26222, 16198, 3569,
-9162, -19575, -25812, -26935, -23069, -15322, -5493, 4339,
12277, 16985, 17934, 15440, 10519, 4585, -908, -4827,
-6592, -6269, -4489, -2220, -467, 30, -983, -3203,
-5839, -7844, -8215, -6301, -2035, 3975, 10543, 16141,
19260, 18787, 14322, 6338, -3845, -14296, -22858, -27611,
-27309, -21691, -11585, 1213, 14285, 25068, 31388, 31915,
26457, 16010, 2568, -11282, -22885, -30054, -31509, -27120,
-17908, -5805, 6760, 17379, 24147, 26028, 23020, 16094,
6931, -2478, -10279, -15136, -16474, -14538, -10253, -4949,
0, 3515, 5052, 4688, 3045, 1069, -268, -272,
1269, 3996, 7067, 9381, 9889, 7910, 3365, -3123,
-10320, -16622, -20424, -20510, -16384, -8448, 2006, 13026,
22383, 28040, 28613, 23696, 13996, 1232, -12193, -23670,
-30918, -32459, -27935, -18190, -5103, 8795, 20838, 28764,
31164, 27753, 19395, 7893, -4412, -15136, -22342, -24909,
-22717, -16609, -8143, 780, 8361, 13272, 14909, 13455,
9758, 5067, 678, -2387, -3624, -3133, -1538, 224,
1209, 751, -1315, -4580, -8145, -10848, -11585, -9628,
-4878, 2038, 9844, 16867, 21403, 22124, 18429, 10638,
0, -11524, -21643, -28211, -29702, -25561, -16364, -3737,
9946, 22044, 30180, 32733, 29182, 20210, 7573, -6269,
-18655, -27259, -30558, -28117, -20645, -9807, 2148, 12878,
20426, 23599, 22173, 16865, 9117, 731, -6552, -11426,
-13269, -12216, -9050, -4941, -1118, 1460, 2335, 1635,
0, -1635, -2335, -1460, 1118, 4941, 9050, 12216,
13269, 11426, 6552, -731, -9117, -16865, -22173, -23599,
-20426, -12878, -2148, 9807, 20645, 28117, 30558, 27259,
18655, 6269, -7573, -20210, -29182, -32733, -30180, -22044,
-9946, 3737, 16364, 25561, 29702, 28211, 21643, 11524,
0, -10638, -18429, -22124, -21403, -16867, -9844, -2038,
4878, 9628, 11585, 10848, 8145, 4580, 1315, -751,
-1209, -224, 1538, 3133, 3624, 2387, -678, -5067,
-9758, -13455, -14909, -13272, -8361, -780, 8143, 16609,
22717, 24909, 22342, 15136, 4412, -7893, -19395, -27753,
-31164, -28764, -20838, -8795, 5103, 18190, 27935, 32459,
30918, 23670, 12193, -1232, -13996, -23696, -28613, -28040,
-22383, -13026, -2006, 8448, 16384, 20510, 20424, 16622,
10320, 3123, -3365, -7910, -9889, -9381, -7067, -3996,
-1269, 272, 268, -1069, -3045, -4688, -5052, -3515,
0, 4949, 10253, 14538, 16474, 15136, 10279, 2478,
-6931, -16094, -23020, -26028, -24147, -17379, -6760, 5805,
17908, 27120, 31509, 30054, 22885, 11282, -2568, -16010,
-26457, -31915, -31388, -25068, -14285, -1213, 11585, 21691,
27309, 27611, 22858, 14296, 3845, -6338, -14322, -18787,
-19260, -16141, -10543, -3975, 2035, 6301, 8215, 7844,
5839, 3203, 983, -30, 467, 2220, 4489, 6269,
6592, 4827, 908, -4585, -10519, -15440, -17934, -16985,
-12277, -4339, 5493, 15322, 23069, 26935, 25812, 19575,
9162, -3569, -16198, -26222, -31585, -31109, -24766, -13697,
};

View File

@ -1,105 +0,0 @@
/* dialtone.h: Generated from frequencies 350 and 440
by gensound. 800 samples */
static short dialtone[800] = {
0, 9997, 19004, 26133, 30692, 32251, 30690, 26206,
19286, 10657, 1206, -8116, -16396, -22848, -26895, -28221,
-26797, -22878, -16960, -9723, -1954, 5545, 12044, 16954,
19887, 20687, 19434, 16420, 12107, 7061, 1881, -2866,
-6721, -9365, -10657, -10634, -9491, -7547, -5190, -2822,
-801, 607, 1263, 1168, 454, -633, -1784, -2669,
-2993, -2548, -1247, 855, 3558, 6538, 9388, 11665,
12955, 12933, 11408, 8370, 3996, -1349, -7152, -12797,
-17635, -21060, -22583, -21895, -18914, -13807, -6985, 934,
9180, 16913, 23309, 27654, 29422, 28342, 24429, 17998,
9630, 123, -9589, -18538, -25813, -30667, -32588, -31360,
-27088, -20185, -11332, -1411, 8594, 17694, 24997, 29805,
31675, 30473, 26374, 19844, 11585, 2455, -6618, -14745,
-21156, -25284, -26815, -25713, -22213, -16785, -10073, -2824,
4203, 10318, 14969, 17794, 18653, 17628, 14998, 11197,
6753, 2217, -1899, -5189, -7386, -8388, -8261, -7212,
-5555, -3657, -1881, -536, 169, 157, -515, -1664,
-3009, -4217, -4954, -4940, -3996, -2080, 697, 4081,
7689, 11059, 13710, 15199, 15187, 13489, 10114, 5272,
-630, -7031, -13263, -18632, -22491, -24320, -23794, -20823,
-15582, -8498, -218, 8457, 16651, 23507, 28276, 30407,
29606, 25876, 19524, 11134, 1511, -8401, -17616, -25208,
-30406, -32682, -31800, -27845, -21215, -12576, -2796, 7150,
16278, 23700, 28713, 30868, 30015, 26312, 20199, 12351,
3598, -5164, -13071, -19378, -23531, -25223, -24413, -21318,
-16384, -10218, -3526, 2980, 8655, 12985, 15642, 16505,
15661, 13381, 10073, 6228, 2348, -1110, -3796, -5495,
-6152, -5863, -4853, -3434, -1954, -744, -62, -60,
-757, -2037, -3664, -5317, -6637, -7283, -6985, -5590,
-3096, 334, 4390, 8631, 12544, 15605, 17339, 17393,
15582, 11928, 6672, 258, -6705, -13506, -19403, -23711,
-25879, -25558, -22653, -17341, -10061, -1480, 7570, 16185,
23475, 28661, 31164, 30670, 27167, 20951, 12603, 2930,
-7116, -16540, -24401, -29915, -32533, -32003, -28391, -22075,
-13704, -4128, 5690, 14781, 22262, 27432, 29838, 29319,
26014, 20339, 12940, 4614, -3777, -11401, -17540, -21660,
-23463, -22908, -20199, -15755, -10150, -4044, 1898, 7079,
11030, 13459, 14268, 13555, 11585, 8745, 5487, 2268,
-511, -2559, -3716, -3975, -3468, -2440, -1206, -101,
578, 618, -78, -1470, -3382, -5524, -7531, -9018,
-9630, -9103, -7308, -4280, -226, 4483, 9357, 13829,
17329, 19352, 19524, 17659, 13788, 8177, 1302, -6184,
-13528, -19945, -24710, -27240, -27167, -24381, -19058, -11646,
-2830, 6539, 15528, 23219, 28806, 31685, 31520, 28282,
22254, 14010, 4355, -5759, -15331, -23411, -29203, -32144,
-31966, -28714, -22748, -14695, -5384, 4241, 13228, 20707,
25981, 28600, 28391, 25479, 20256, 13337, 5482, -2482,
-9761, -15668, -19694, -21556, -21215, -18865, -14902, -9864,
-4366, 975, 5614, 9130, 11270, 11967, 11332, 9628,
7223, 4536, 1976, -113, -1495, -2071, -1882, -1102,
0, 1102, 1882, 2071, 1495, 113, -1976, -4536,
-7223, -9628, -11332, -11967, -11270, -9130, -5614, -975,
4366, 9864, 14902, 18865, 21215, 21556, 19694, 15668,
9761, 2482, -5482, -13337, -20256, -25479, -28391, -28600,
-25981, -20707, -13228, -4241, 5384, 14695, 22748, 28714,
31966, 32144, 29203, 23411, 15331, 5759, -4355, -14010,
-22254, -28282, -31520, -31685, -28806, -23219, -15528, -6539,
2830, 11646, 19058, 24381, 27167, 27240, 24710, 19945,
13528, 6184, -1302, -8177, -13788, -17659, -19524, -19352,
-17329, -13829, -9357, -4483, 226, 4280, 7308, 9103,
9630, 9018, 7531, 5524, 3382, 1470, 78, -618,
-578, 101, 1206, 2440, 3468, 3975, 3716, 2559,
511, -2268, -5487, -8745, -11585, -13555, -14268, -13459,
-11030, -7079, -1898, 4044, 10150, 15755, 20199, 22908,
23463, 21660, 17540, 11401, 3777, -4614, -12940, -20339,
-26014, -29319, -29838, -27432, -22262, -14781, -5690, 4128,
13704, 22075, 28391, 32003, 32533, 29915, 24401, 16540,
7116, -2930, -12603, -20951, -27167, -30670, -31164, -28661,
-23475, -16185, -7570, 1480, 10061, 17341, 22653, 25558,
25879, 23711, 19403, 13506, 6705, -258, -6672, -11928,
-15582, -17393, -17339, -15605, -12544, -8631, -4390, -334,
3096, 5590, 6985, 7283, 6637, 5317, 3664, 2037,
757, 60, 62, 744, 1954, 3434, 4853, 5863,
6152, 5495, 3796, 1110, -2348, -6228, -10073, -13381,
-15661, -16505, -15642, -12985, -8655, -2980, 3526, 10218,
16384, 21318, 24413, 25223, 23531, 19378, 13071, 5164,
-3598, -12351, -20199, -26312, -30015, -30868, -28713, -23700,
-16278, -7150, 2796, 12576, 21215, 27845, 31800, 32682,
30406, 25208, 17616, 8401, -1511, -11134, -19524, -25876,
-29606, -30407, -28276, -23507, -16651, -8457, 218, 8498,
15582, 20823, 23794, 24320, 22491, 18632, 13263, 7031,
630, -5272, -10114, -13489, -15187, -15199, -13710, -11059,
-7689, -4081, -697, 2080, 3996, 4940, 4954, 4217,
3009, 1664, 515, -157, -169, 536, 1881, 3657,
5555, 7212, 8261, 8388, 7386, 5189, 1899, -2217,
-6753, -11197, -14998, -17628, -18653, -17794, -14969, -10318,
-4203, 2824, 10073, 16785, 22213, 25713, 26815, 25284,
21156, 14745, 6618, -2455, -11585, -19844, -26374, -30473,
-31675, -29805, -24997, -17694, -8594, 1411, 11332, 20185,
27088, 31360, 32588, 30667, 25813, 18538, 9589, -123,
-9630, -17998, -24429, -28342, -29422, -27654, -23309, -16913,
-9180, -934, 6985, 13807, 18914, 21895, 22583, 21060,
17635, 12797, 7152, 1349, -3996, -8370, -11408, -12933,
-12955, -11665, -9388, -6538, -3558, -855, 1247, 2548,
2993, 2669, 1784, 633, -454, -1168, -1263, -607,
801, 2822, 5190, 7547, 9491, 10634, 10657, 9365,
6721, 2866, -1881, -7061, -12107, -16420, -19434, -20687,
-19887, -16954, -12044, -5545, 1954, 9723, 16960, 22878,
26797, 28221, 26895, 22848, 16396, 8116, -1206, -10657,
-19286, -26206, -30690, -32251, -30692, -26133, -19004, -9997,
};

View File

@ -1,776 +0,0 @@
/*
* Miniphone: A simple, command line telephone
*
* IAX Support for talking to Asterisk and other Gnophone clients
*
* Copyright (C) 1999, Linux Support Services, Inc.
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <iax-client.h>
#include <linux/soundcard.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/signal.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <gsm.h>
#include <miniphone.h>
#include <time.h>
#include "busy.h"
#include "dialtone.h"
#include "answer.h"
#include "ringtone.h"
#include "ring10.h"
#include "options.h"
#define FRAME_SIZE 160
static char callerid[80];
struct peer {
int time;
gsm gsmin;
gsm gsmout;
struct iax_session *session;
struct peer *next;
};
static char *audiodev = "/dev/dsp";
static int audiofd = -1;
static struct peer *peers;
static int answered_call = 0;
static struct peer *find_peer(struct iax_session *);
static int audio_setup(char *);
static void sighandler(int);
static void parse_args(FILE *, unsigned char *);
void do_iax_event(FILE *);
void call(FILE *, char *);
void answer_call(void);
void reject_call(void);
static void handle_event(FILE *, struct iax_event *e, struct peer *p);
void parse_cmd(FILE *, int, char **);
void issue_prompt(FILE *);
void dump_array(FILE *, char **);
struct sound {
short *data;
int datalen;
int samplen;
int silencelen;
int repeat;
};
static int cursound = -1;
static int sampsent = 0;
static int offset = 0;
static int silencelen = 0;
static int nosound = 0;
static int offhook = 0;
static int ringing = 0;
static int writeonly = 0;
static struct iax_session *registry = NULL;
static struct timeval regtime;
#define TONE_NONE -1
#define TONE_RINGTONE 0
#define TONE_BUSY 1
#define TONE_CONGEST 2
#define TONE_RINGER 3
#define TONE_ANSWER 4
#define TONE_DIALTONE 5
#define OUTPUT_NONE 0
#define OUTPUT_SPEAKER 1
#define OUTPUT_HANDSET 2
#define OUTPUT_BOTH 3
static struct sound sounds[] = {
{ ringtone, sizeof(ringtone)/2, 16000, 32000, 1 },
{ busy, sizeof(busy)/2, 4000, 4000, 1 },
{ busy, sizeof(busy)/2, 2000, 2000, 1 },
{ ring10, sizeof(ring10)/2, 16000, 32000, 1 },
{ answer, sizeof(answer)/2, 2200, 0, 0 },
{ dialtone, sizeof(dialtone)/2, 8000, 0, 1 },
};
static char *help[] = {
"Welcome to the miniphone telephony client, the commands are as follows:\n",
"Help\t\t-\tDisplays this screen.",
"Help <Command>\t-\tInqueries specific information on a command.",
"Dial <Number>\t-\tDials the number supplied in the first arguement",
"Status\t\t-\tLists the current sessions and their current status.",
"Quit\t\t-\tShuts down the client.",
"",
0
};
static short silence[FRAME_SIZE];
static struct peer *most_recent_answer;
static struct iax_session *newcall = 0;
static struct peer *find_peer(struct iax_session *session)
{
struct peer *cur = peers;
while(cur) {
if (cur->session == session)
return cur;
cur = cur->next;
}
return NULL;
}
static int audio_setup(char *dev)
{
int fd;
int fmt = AFMT_S16_LE;
int channels = 1;
int speed = 8000;
int fragsize = (40 << 16) | 6;
if ( (fd = open(dev, O_RDWR | O_NONBLOCK)) < 0) {
fprintf(stderr, "Unable to open audio device %s: %s\n", dev, strerror(errno));
return -1;
}
if (ioctl(fd, SNDCTL_DSP_SETFMT, &fmt) || (fmt != AFMT_S16_LE)) {
fprintf(stderr, "Unable to set in signed linear format.\n");
return -1;
}
if (ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0)) {
fprintf(stderr, "Unable to set full duplex operation.\n");
writeonly = 1;
/* return -1; */
}
if (ioctl(fd, SNDCTL_DSP_CHANNELS, &channels) || (channels != 1)) {
fprintf(stderr, "Unable to set to mono\n");
return -1;
}
if (ioctl(fd, SNDCTL_DSP_SPEED, &speed) || (speed != 8000)) {
fprintf(stderr, "Unable to set speed to 8000 hz\n");
return -1;
}
if (ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &fragsize)) {
fprintf(stderr, "Unable to set fragment size...\n");
return -1;
}
return fd;
}
static int send_sound(int soundfd)
{
/* Send FRAME_SIZE samples of whatever */
short myframe[FRAME_SIZE];
short *frame = NULL;
int total = FRAME_SIZE;
int amt=0;
int res;
int myoff;
audio_buf_info abi;
if (cursound > -1) {
res = ioctl(soundfd, SNDCTL_DSP_GETOSPACE ,&abi);
if (res) {
fprintf(stderr,"Unable to read output space\n");
return -1;
}
/* Calculate how many samples we can send, max */
if (total > (abi.fragments * abi.fragsize / 2))
total = abi.fragments * abi.fragsize / 2;
res = total;
if (sampsent < sounds[cursound].samplen) {
myoff=0;
while(total) {
amt = total;
if (amt > (sounds[cursound].datalen - offset))
amt = sounds[cursound].datalen - offset;
memcpy(myframe + myoff, sounds[cursound].data + offset, amt * 2);
total -= amt;
offset += amt;
sampsent += amt;
myoff += amt;
if (offset >= sounds[cursound].datalen)
offset = 0;
}
/* Set it up for silence */
if (sampsent >= sounds[cursound].samplen)
silencelen = sounds[cursound].silencelen;
frame = myframe;
} else {
if (silencelen > 0) {
frame = silence;
silencelen -= res;
} else {
if (sounds[cursound].repeat) {
/* Start over */
sampsent = 0;
offset = 0;
} else {
cursound = -1;
nosound = 0;
}
}
}
#if 0
if (frame)
printf("res is %d, frame[0] is %d\n", res, frame[0]);
#endif
res = write(soundfd, frame, res * 2);
if (res > 0)
return 0;
return res;
}
return 0;
}
static int iax_regtimeout(int timeout)
{
if (timeout) {
gettimeofday(&regtime, NULL);
regtime.tv_sec += timeout;
} else {
regtime.tv_usec = 0;
regtime.tv_sec = 0;
}
return 0;
}
static int check_iax_register(void)
{
int res;
if (strlen(regpeer) && strlen(server)) {
registry = iax_session_new();
res = iax_register(registry, server,regpeer,regsecret, refresh);
if (res) {
fprintf(stderr, "Failed registration: %s\n", iax_errstr);
return -1;
}
iax_regtimeout(5 * refresh / 6);
} else {
iax_regtimeout(0);
refresh = 60;
}
return 0;
}
static int check_iax_timeout(void)
{
struct timeval tv;
int ms;
if (!regtime.tv_usec || !regtime.tv_sec)
return -1;
gettimeofday(&tv, NULL);
if ((tv.tv_usec >= regtime.tv_usec) && (tv.tv_sec >= regtime.tv_sec)) {
check_iax_register();
/* Have it check again soon */
return 100;
}
ms = (regtime.tv_sec - tv.tv_sec) * 1000 + (regtime.tv_usec - tv.tv_usec) / 1000;
return ms;
}
static int gentone(int sound, int uninterruptible)
{
cursound = sound;
sampsent = 0;
offset = 0;
silencelen = 0;
nosound = uninterruptible;
printf("Sending tone %d\n", sound);
return 0;
}
void
sighandler(int sig)
{
if(sig == SIGHUP) {
puts("rehashing!");
} else if(sig == SIGINT) {
static int prev = 0;
int cur;
if ( (cur = time(0))-prev <= 5) {
printf("Terminating!\n");
exit(0);
} else {
prev = cur;
printf("Press interrupt key again in the next %d seconds to really terminate\n", 5-(cur-prev));
}
}
}
void
parse_args(FILE *f, unsigned char *cmd)
{
static char *argv[MAXARGS];
unsigned char *parse = cmd;
int argc = 0, t = 0;
// Don't mess with anything that doesn't exist...
if(!*parse)
return;
bzero(argv, sizeof(argv));
while(*parse) {
if(*parse < 33 || *parse > 128) {
*parse = 0, t++;
if(t > MAXARG) {
fprintf(f, "Warning: Argument exceeds maximum argument size, command ignored!\n");
return;
}
} else if(t || !argc) {
if(argc == MAXARGS) {
fprintf(f, "Warning: Command ignored, too many arguments\n");
return;
}
argv[argc++] = parse;
t = 0;
}
parse++;
}
if(argc)
parse_cmd(f, argc, argv);
}
int
main(int argc, char *argv[])
{
int port;
int netfd;
int c, h=0, m, regm;
FILE *f;
int fd = STDIN_FILENO;
char rcmd[RBUFSIZE];
fd_set readfd;
fd_set writefd;
struct timeval timer;
struct timeval *timerptr = NULL;
gsm_frame fo;
load_options();
if (!strlen(callerid))
gethostname(callerid, sizeof(callerid));
signal(SIGHUP, sighandler);
signal(SIGINT, sighandler);
if ( !(f = fdopen(fd, "w+"))) {
fprintf(stderr, "Unable to create file on fd %d\n", fd);
return -1;
}
if ( (audiofd = audio_setup(audiodev)) == -1) {
fprintf(stderr, "Fatal error: failed to open sound device");
return -1;
}
if ( (port = iax_init(0) < 0)) {
fprintf(stderr, "Fatal error: failed to initialize iax with port %d\n", port);
return -1;
}
iax_set_formats(AST_FORMAT_GSM);
netfd = iax_get_fd();
check_iax_register();
fprintf(f, "Text Based Telephony Client.\n\n");
issue_prompt(f);
timer.tv_sec = 0;
timer.tv_usec = 0;
while(1) {
FD_ZERO(&readfd);
FD_ZERO(&writefd);
FD_SET(fd, &readfd);
if(fd > h)
h = fd;
if(answered_call && !writeonly) {
FD_SET(audiofd, &readfd);
if(audiofd > h)
h = audiofd;
}
if (cursound > -1) {
FD_SET(audiofd, &writefd);
if (audiofd > h)
h = audiofd;
}
FD_SET(netfd, &readfd);
if(netfd > h)
h = netfd;
if ( (c = select(h+1, &readfd, &writefd, 0, timerptr)) >= 0) {
if(FD_ISSET(fd, &readfd)) {
if ( ( fgets(&*rcmd, 256, f))) {
rcmd[strlen(rcmd)-1] = 0;
parse_args(f, &*rcmd);
} else fprintf(f, "Fatal error: failed to read data!\n");
issue_prompt(f);
}
if(answered_call) {
if(FD_ISSET(audiofd, &readfd)) {
static int ret, rlen = 0;
static short rbuf[FRAME_SIZE];
if ( (ret = read(audiofd, rbuf + rlen, 2 * (FRAME_SIZE-rlen))) == -1) {
puts("Failed to read audio.");
return -1;
}
rlen += ret/2;
if(rlen == FRAME_SIZE) {
rlen = 0;
if(!most_recent_answer->gsmout)
most_recent_answer->gsmout = gsm_create();
gsm_encode(most_recent_answer->gsmout, rbuf, fo);
if(iax_send_voice(most_recent_answer->session,
AST_FORMAT_GSM, (char *)fo, sizeof(fo)) == -1)
puts("Failed to send voice!");
}
}
}
do_iax_event(f);
m = iax_time_to_next_event();
if(m > -1) {
timerptr = &timer;
timer.tv_sec = m /1000;
timer.tv_usec = (m % 1000) * 1000;
} else
timerptr = 0;
regm = check_iax_timeout();
if (!timerptr || (m > regm)) {
timerptr = &timer;
timer.tv_sec = regm /1000;
timer.tv_usec = (regm % 1000) * 1000;
}
if (FD_ISSET(audiofd, &writefd)) {
send_sound(audiofd);
}
} else {
if(errno == EINTR)
continue;
fprintf(stderr, "Fatal error in select(): %s\n", strerror(errno));
return -1;
}
}
return 0;
}
void
do_iax_event(FILE *f) {
int sessions = 0;
struct iax_event *e = 0;
struct peer *peer;
while ( (e = iax_get_event(0))) {
peer = find_peer(e->session);
if(peer) {
handle_event(f, e, peer);
} else if (e->session == registry) {
fprintf(stderr, "Registration complete: %s (%d)\n",
(e->event.regreply.status == IAX_REG_SUCCESS) ? "Success" : "Failed",
e->event.regreply.status);
registry = NULL;
} else {
if(e->etype != IAX_EVENT_CONNECT) {
fprintf(stderr, "Huh? This is an event for a non-existant session?\n");
continue;
}
sessions++;
if(sessions >= MAX_SESSIONS) {
fprintf(f, "Missed a call... too many sessions open.\n");
}
if(e->event.connect.callerid && e->event.connect.dnid)
fprintf(f, "Call from '%s' for '%s'", e->event.connect.callerid,
e->event.connect.dnid);
else if(e->event.connect.dnid) {
fprintf(f, "Call from '%s'", e->event.connect.dnid);
} else if(e->event.connect.callerid) {
fprintf(f, "Call from '%s'", e->event.connect.callerid);
} else printf("Call from");
fprintf(f, " (%s)\n", inet_ntoa(iax_get_peer_addr(e->session).sin_addr));
if(most_recent_answer) {
fprintf(f, "Incoming call ignored, there's already a call waiting for answer... \
please accept or reject first\n");
iax_reject(e->session, "Too many calls, we're busy!");
} else {
if ( !(peer = malloc(sizeof(struct peer)))) {
fprintf(f, "Warning: Unable to allocate memory!\n");
return;
}
peer->time = time(0);
peer->session = e->session;
if (peer->gsmin)
free(peer->gsmin);
peer->gsmin = 0;
if (peer->gsmout)
free(peer->gsmout);
peer->gsmout = 0;
peer->next = peers;
peers = peer;
iax_accept(peer->session);
iax_ring_announce(peer->session);
most_recent_answer = peer;
ringing = 1;
gentone(TONE_RINGER, 0);
fprintf(f, "Incoming call!\n");
}
issue_prompt(f);
}
iax_event_free(e);
}
}
void
call(FILE *f, char *num)
{
struct peer *peer;
if(!newcall)
newcall = iax_session_new();
else {
fprintf(f, "Already attempting to call somewhere, please cancel first!\n");
return;
}
if ( !(peer = malloc(sizeof(struct peer)))) {
fprintf(f, "Warning: Unable to allocate memory!\n");
return;
}
peer->time = time(0);
peer->session = newcall;
peer->gsmin = 0;
peer->gsmout = 0;
peer->next = peers;
peers = peer;
most_recent_answer = peer;
offhook = 1;
iax_call(peer->session, callerid, num, NULL, 10);
}
void
answer_call(void)
{
if(most_recent_answer)
iax_answer(most_recent_answer->session);
printf("Answering call!\n");
answered_call = 1;
offhook = 1;
ringing = 0;
gentone(TONE_ANSWER, 1);
}
void
reject_call(void)
{
iax_reject(most_recent_answer->session, "Call rejected manually.");
most_recent_answer = 0;
ringing = 0;
gentone(TONE_NONE, 1);
}
void
handle_event(FILE *f, struct iax_event *e, struct peer *p)
{
short fr[FRAME_SIZE];
int len;
switch(e->etype) {
case IAX_EVENT_HANGUP:
iax_hangup(most_recent_answer->session, "Byeee!");
fprintf(f, "Call disconnected by peer\n");
free(most_recent_answer);
most_recent_answer = 0;
answered_call = 0;
peers = 0;
newcall = 0;
if (offhook)
gentone(TONE_CONGEST, 0);
break;
case IAX_EVENT_REJECT:
fprintf(f, "Authentication was rejected\n");
break;
case IAX_EVENT_ACCEPT:
fprintf(f, "Accepted...\n");
issue_prompt(f);
break;
case IAX_EVENT_RINGA:
fprintf(f, "Ringing...\n");
issue_prompt(f);
gentone(TONE_RINGTONE, 0);
break;
case IAX_EVENT_ANSWER:
answer_call();
gentone(TONE_ANSWER, 1);
break;
case IAX_EVENT_VOICE:
switch(e->event.voice.format) {
case AST_FORMAT_GSM:
if(e->event.voice.datalen % 33) {
fprintf(stderr, "Weird gsm frame, not a multiple of 33.\n");
break;
}
if (!p->gsmin)
p->gsmin = gsm_create();
len = 0;
while(len < e->event.voice.datalen) {
if(gsm_decode(p->gsmin, e->event.voice.data + len, fr)) {
fprintf(stderr, "Bad GSM data\n");
break;
} else {
int res;
res = write(audiofd, fr, sizeof(fr));
if (res < 0)
fprintf(f, "Write failed: %s\n", strerror(errno));
}
len += 33;
}
break;
default :
fprintf(f, "Don't know how to handle that format %d\n", e->event.voice.format);
}
break;
default:
fprintf(f, "Unknown event: %d\n", e->etype);
}
}
void
dump_call(void)
{
if(most_recent_answer)
{
printf("Dumping call!\n");
iax_hangup(most_recent_answer->session,"");
free(most_recent_answer);
}
answered_call = 0;
most_recent_answer = 0;
answered_call = 0;
peers = 0;
newcall = 0;
offhook = 0;
ringing = 0;
gentone(TONE_NONE, 0);
}
void
parse_cmd(FILE *f, int argc, char **argv)
{
if(!strcasecmp(argv[0], "HELP")) {
if(argc == 1)
dump_array(f, help);
else if(argc == 2) {
if(!strcasecmp(argv[1], "HELP"))
fprintf(f, "Help <Command>\t-\tDisplays general help or specific help on command if supplied an arguement\n");
else if(!strcasecmp(argv[1], "QUIT"))
fprintf(f, "Quit\t\t-\tShuts down the miniphone\n");
else fprintf(f, "No help available on %s\n", argv[1]);
} else {
fprintf(f, "Too many arguements for command help.\n");
}
} else if(!strcasecmp(argv[0], "STATUS")) {
if(argc == 1) {
int c = 0;
struct peer *peerptr = peers;
if(!peerptr)
fprintf(f, "No session matches found.\n");
else while(peerptr) {
fprintf(f, "Listing sessions:\n\n");
fprintf(f, "Session %d\n", ++c);
fprintf(f, "Session existed for %d seconds\n", (int)time(0)-peerptr->time);
if(answered_call)
fprintf(f, "Call answered.\n");
else fprintf(f, "Call ringing.\n");
peerptr = peerptr->next;
}
} else fprintf(f, "Too many arguments for command status.\n");
} else if(!strcasecmp(argv[0], "ANSWER")) {
if(argc > 1)
fprintf(f, "Too many arguements for command answer\n");
else answer_call();
} else if(!strcasecmp(argv[0], "REJECT")) {
if(argc > 1)
fprintf(f, "Too many arguements for command reject\n");
else {
fprintf(f, "Rejecting current phone call.\n");
reject_call();
}
} else if (!strcasecmp(argv[0], "DUMP")) {
dump_call();
} else if (!strcasecmp(argv[0], "HANGUP")) {
dump_call();
} else if(!strcasecmp(argv[0], "CALL")) {
if(argc > 2)
fprintf(f, "Too many arguements for command call\n");
else {
call(f, argv[1]);
}
} else if(!strcasecmp(argv[0], "QUIT")) {
if(argc > 1)
fprintf(f, "Too many arguements for command quit\n");
else {
fprintf(f, "Good bye!\n");
exit(1);
}
} else fprintf(f, "Unknown command of %s\n", argv[0]);
}
void
issue_prompt(FILE *f)
{
fprintf(f, "TeleClient> ");
fflush(f);
}
void
dump_array(FILE *f, char **array) {
while(*array)
fprintf(f, "%s\n", *array++);
}

View File

@ -1,6 +0,0 @@
#define RBUFSIZE 256
#define MAXARGS 10
#define MAXARG 256
#define MAX_SESSIONS 4
extern void parse_cmd(FILE *, int, char **);

View File

@ -1,137 +0,0 @@
/*
* Snomphone: IAX software for SNOM 100 Phone
*
* IAX Support for talking to Asterisk and other Gnophone clients
*
* Copyright (C) 1999, Linux Support Services, Inc.
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
#define CONFIG_FILE "/etc/miniphone.conf"
#define USER_FILE "%s/.miniphone-conf"
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
char regpeer[256];
char regsecret[256];
char server[256];
int refresh = 60;
char context[256];
char language[256];
#define TYPE_STRING 0
#define TYPE_INT 1
struct opt {
char *name;
void *where;
int len;
int type;
};
static struct opt opts[] = {
{ "regpeer", regpeer, sizeof(regpeer), TYPE_STRING },
{ "regsecret", regsecret, sizeof(regsecret), TYPE_STRING },
{ "server", server, sizeof(server), TYPE_STRING },
{ "context", context, sizeof(context), TYPE_STRING },
{ "language", language, sizeof(language), TYPE_STRING },
{ "refresh", &refresh, sizeof(refresh), TYPE_INT },
};
static int __load_options(char *filename)
{
FILE *f;
int lineno = 0;
char buf[256];
char *var, *value;
int x;
char *c;
f = fopen(filename, "r");
if (!f) {
fprintf(stderr, "Failed to open '%s': %s\n", filename, strerror(errno));
return -1;
}
while(!feof(f)) {
fgets(buf, sizeof(buf), f);
if (!feof(f)) {
/* Ditch comments */
if ((c = strchr(buf, '#')))
*c = 0;
lineno++;
/* Strip CR */
buf[strlen(buf)-1] = '\0';
if (strlen(buf)) {
var = strtok(buf, "=");
value = strtok(NULL, "=");
if (!var || !value) {
fprintf(stderr, "Syntax error line %d\n", lineno);
continue;
}
for (x=0;x<sizeof(opts) / sizeof(opts[0]); x++) {
if (!strcasecmp(var, opts[x].name)) {
switch(opts[x].type) {
case TYPE_STRING:
strncpy((char *)opts[x].where, value, opts[x].len);
break;
case TYPE_INT:
if (sscanf(value, "%i", (int *)opts[x].where) != 1) {
fprintf(stderr, "Not a number at line %d\n", lineno);
}
break;
default:
fprintf(stderr, "Don't know what to do about type %d\n", opts[x].type);
}
break;
}
}
if (!(x < sizeof(opts) / sizeof(opts[0]))) {
fprintf(stderr, "Dunno keyword '%s'\n", var);
continue;
}
}
}
}
fclose(f);
return 0;
}
int load_options(void)
{
char fn[256];
__load_options(CONFIG_FILE);
if (getenv("HOME")) {
snprintf(fn, sizeof(fn), USER_FILE, getenv("HOME"));
__load_options(fn);
}
return 0;
}
static int __save_options(char *filename)
{
FILE *f;
f = fopen(filename, "w");
if (!f) {
fprintf(stderr, "Failed to open '%s': %s\n", filename, strerror(errno));
return -1;
}
fclose(f);
return 0;
}
int save_options(void)
{
char fn[256];
if (getenv("HOME")) {
snprintf(fn, sizeof(fn), USER_FILE, getenv("HOME"));
return __save_options(fn);
} else
return __save_options(CONFIG_FILE);
}

View File

@ -1,23 +0,0 @@
/*
* Snomphone: IAX software for SNOM 100 Phone
*
* IAX Support for talking to Asterisk and other Gnophone clients
*
* Copyright (C) 1999, Linux Support Services, Inc.
*
* Mark Spencer <markster@linux-support.net>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
*/
extern char regpeer[256];
extern char regsecret[256];
extern char regpeer[256];
extern char server[256];
extern int refresh;
extern char context[256];
extern char language[256];
int save_options(void);
int load_options(void);

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +0,0 @@
/* ringtone.h: Generated from frequencies 440 and 480
by gensound. 200 samples */
static short ringtone[200] = {
0, 11581, 21659, 28927, 32445, 31764, 26981, 18727,
8084, -3559, -14693, -23875, -29927, -32083, -30088, -24228,
-15290, -4453, 6864, 17195, 25212, 29902, 30693, 27526,
20856, 11585, 944, -9673, -18899, -25560, -28837, -28357,
-24244, -17089, -7868, 2192, 11780, 19667, 24872, 26779,
25212, 20450, 13179, 4396, -4731, -13019, -19421, -23164,
-23839, -21446, -16384, -9384, -1408, 6484, 13281, 18145,
20517, 20182, 17286, 12301, 5951, -887, -7314, -12519,
-15886, -17068, -16017, -12983, -8458, -3109, 2327, 7142,
10750, 12757, 13007, 11585, 8793, 5095, 1044, -2800,
-5951, -8053, -8921, -8560, -7141, -4967, -2421, 104,
2260, 3791, 4567, 4589, 3977, 2941, 1733, 600,
-257, -722, -772, -481, 0, 481, 772, 722,
257, -600, -1733, -2941, -3977, -4589, -4567, -3791,
-2260, -104, 2421, 4967, 7141, 8560, 8921, 8053,
5951, 2800, -1044, -5095, -8793, -11585, -13007, -12757,
-10750, -7142, -2327, 3109, 8458, 12983, 16017, 17068,
15886, 12519, 7314, 887, -5951, -12301, -17286, -20182,
-20517, -18145, -13281, -6484, 1408, 9384, 16384, 21446,
23839, 23164, 19421, 13019, 4731, -4396, -13179, -20450,
-25212, -26779, -24872, -19667, -11780, -2192, 7868, 17089,
24244, 28357, 28837, 25560, 18899, 9673, -944, -11585,
-20856, -27526, -30693, -29902, -25212, -17195, -6864, 4453,
15290, 24228, 30088, 32083, 29927, 23875, 14693, 3559,
-8084, -18727, -26981, -31764, -32445, -28927, -21659, -11581,
};

View File

@ -1,11 +1,6 @@
BASE=../../../..
LOCAL_CFLAGS=-I. -DNEWJB -DLIBIAX
LOCAL_OBJS=iax2-parser.o iax.o md5.o jitterbuf.o iax-mutex.o
IAX_DIR=$(BASE)/libs/iax
IAXLA=$(IAX_DIR)/src/libiax.la
LOCAL_CFLAGS=-I$(IAX_DIR)/src
LOCAL_LIBADD=$(IAXLA)
include $(BASE)/build/modmake.rules
$(IAXLA): $(IAX_DIR) $(IAX_DIR)/.update
cd $(IAX_DIR) && $(MAKE)

View File

@ -306,8 +306,7 @@ static int __debug(char *file, int lineno, const char *func, char *fmt, ...)
#ifdef WIN32
#define DEBU
#else
#define DEBU(fmt...) \
do {} while(0)
#define DEBU(...) (void)(0)
#endif
#define G
#endif
@ -847,9 +846,9 @@ static int get_sample_cnt(struct iax_event *e)
static int iax_xmit_frame(struct iax_frame *f)
{
struct ast_iax2_full_hdr *h = (f->data);
/* Send the frame raw */
#ifdef DEBUG_SUPPORT
struct ast_iax2_full_hdr *h = (f->data);
if (ntohs(h->scallno) & IAX_FLAG_FULL)
iax_showframe(f, NULL, 0, f->transfer ?
&(f->session->transfer) :

View File

@ -111,6 +111,7 @@ static void dump_byte(char *output, int maxlen, void *value, int len)
snprintf(output, maxlen, "Invalid BYTE");
}
#if 0
static void dump_ipaddr(char *output, int maxlen, void *value, int len)
{
struct sockaddr_in sin;
@ -121,7 +122,6 @@ static void dump_ipaddr(char *output, int maxlen, void *value, int len)
snprintf(output, maxlen, "Invalid IPADDR");
}
static void dump_prov_flags(char *output, int maxlen, void *value, int len)
{
if (len == (int)sizeof(unsigned int))
@ -130,6 +130,7 @@ static void dump_prov_flags(char *output, int maxlen, void *value, int len)
else
snprintf(output, maxlen, "Invalid INT");
}
#endif
static void dump_samprate(char *output, int maxlen, void *value, int len)
{

View File

@ -265,17 +265,17 @@ static void history_calc_maxbuf(jitterbuf *jb)
}
}
if (0) {
int k;
fprintf(stderr, "toins = %ld\n", toins);
fprintf(stderr, "maxbuf =");
for (k=0;k<JB_HISTORY_MAXBUF_SZ;k++)
fprintf(stderr, "%ld ", jb->hist_maxbuf[k]);
fprintf(stderr, "\nminbuf =");
for (k=0;k<JB_HISTORY_MAXBUF_SZ;k++)
fprintf(stderr, "%ld ", jb->hist_minbuf[k]);
fprintf(stderr, "\n");
}
#if 0
int k;
fprintf(stderr, "toins = %ld\n", toins);
fprintf(stderr, "maxbuf =");
for (k=0;k<JB_HISTORY_MAXBUF_SZ;k++)
fprintf(stderr, "%ld ", jb->hist_maxbuf[k]);
fprintf(stderr, "\nminbuf =");
for (k=0;k<JB_HISTORY_MAXBUF_SZ;k++)
fprintf(stderr, "%ld ", jb->hist_minbuf[k]);
fprintf(stderr, "\n");
#endif
}
jb->hist_maxbuf_valid = 1;