mirror of
https://github.com/VK3FNG/soundmodem.git
synced 2025-12-06 03:01:59 +01:00
First commit
This commit is contained in:
commit
f4c4438e0e
3
AUTHORS
Normal file
3
AUTHORS
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Thomas Sailer, <sailer@ife.ee.ethz.ch>
|
||||
|
||||
NEWQPSK code: Tomi Manninen, <tomi.manninen@hut.fi>
|
||||
339
COPYING
Normal file
339
COPYING
Normal file
|
|
@ -0,0 +1,339 @@
|
|||
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.
|
||||
15
ChangeLog
Normal file
15
ChangeLog
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
2011-06-18 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.am (ACLOCAL_AMFLAGS): New variable.
|
||||
(EXTRA_DIST): Add m4/ChangeLog.
|
||||
|
||||
2008-12-14 gettextize <bug-gnu-gettext@gnu.org>
|
||||
|
||||
* Makefile.am (SUBDIRS): Remove intl.
|
||||
(ACLOCAL_AMFLAGS): New variable.
|
||||
(EXTRA_DIST): Add m4/ChangeLog.
|
||||
|
||||
2000-07-29 Thomas Sailer <sailer@playstation.ampr.org>
|
||||
|
||||
* Initial release
|
||||
|
||||
182
INSTALL
Normal file
182
INSTALL
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
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, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
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 at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' 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. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
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 supports 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=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH 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=PATH' 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' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
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 host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
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.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--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.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
5
Makefile.am
Normal file
5
Makefile.am
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
SUBDIRS = po directx libmisc matlib afsk fsk pammodem pskmodem newqpsk p3dmodem soundcard flexdrv configapp doc
|
||||
|
||||
EXTRA_DIST = m4/ChangeLog ABOUT-NLS cfgwindows cfgwindowsnodebug soundmodem.spec soundmodem.initscript
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
748
Makefile.in
Normal file
748
Makefile.in
Normal file
|
|
@ -0,0 +1,748 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING ChangeLog \
|
||||
INSTALL NEWS config.guess config.rpath config.sub depcomp \
|
||||
install-sh missing mkinstalldirs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir dist dist-all distcheck
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d "$(distdir)" \
|
||||
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr "$(distdir)"; }; }
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
|
||||
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
HAVE_ALSA = @HAVE_ALSA@
|
||||
HAVE_BITTYPES = @HAVE_BITTYPES@
|
||||
HAVE_DIRECTX = @HAVE_DIRECTX@
|
||||
HAVE_IFRNEWNAME = @HAVE_IFRNEWNAME@
|
||||
HAVE_MKISS = @HAVE_MKISS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
M_PI = @M_PI@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USEMMX = @USEMMX@
|
||||
USEVIS = @USEVIS@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WIN32 = @WIN32@
|
||||
WINDRES = @WINDRES@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = po directx libmisc matlib afsk fsk pammodem pskmodem newqpsk p3dmodem soundcard flexdrv configapp doc
|
||||
EXTRA_DIST = m4/ChangeLog ABOUT-NLS cfgwindows cfgwindowsnodebug soundmodem.spec soundmodem.initscript
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@$(am__cd) '$(distuninstallcheck_dir)' \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
|
||||
ctags-recursive install-am install-strip tags-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
|
||||
distclean distclean-generic distclean-hdr distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
19
README.md
Normal file
19
README.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Soundmodem 0.16
|
||||
(c)2000 Thomas Sailer, Tomi Manninen.
|
||||
|
||||
This software appears to have been abandoned by it's authors, and I have
|
||||
uploaded it here as I continue to tidy up the code and work on it.
|
||||
|
||||
I will be adding features from versions 0.18 and 0.2 as time goes on, as
|
||||
v0.18 and above break compatability with quite a few radios, including
|
||||
my own - the venerable FT-857D.
|
||||
|
||||
This version throws compilation errors when compiling with GCC5 and
|
||||
above, so fixing this will be my first task - then I plan on removing
|
||||
all of the crazy externs in the code and tidying up.
|
||||
|
||||
Offers of help are welcome.
|
||||
|
||||
Soundmodem is a driver and userspace utilities for using a sound card as
|
||||
a packet radio modem (TNC).
|
||||
|
||||
1346
aclocal.m4
vendored
Normal file
1346
aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load diff
19
afsk/Makefile.am
Normal file
19
afsk/Makefile.am
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
INCLUDES = -I$(top_srcdir)/soundcard
|
||||
|
||||
noinst_LIBRARIES = libafsk.a
|
||||
libafsk_a_SOURCES = modem.c costab.c
|
||||
|
||||
noinst_HEADERS = costab.h
|
||||
|
||||
gentbl_SOURCES = gentbl.c
|
||||
|
||||
if CROSSCOMP
|
||||
|
||||
else
|
||||
|
||||
noinst_PROGRAMS = gentbl
|
||||
|
||||
$(srcdir)/costab.c: gentbl$(EXEEXT)
|
||||
bdir=`pwd`; cd $(srcdir); $$bdir/gentbl
|
||||
|
||||
endif
|
||||
508
afsk/Makefile.in
Normal file
508
afsk/Makefile.in
Normal file
|
|
@ -0,0 +1,508 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@CROSSCOMP_FALSE@noinst_PROGRAMS = gentbl$(EXEEXT)
|
||||
subdir = afsk
|
||||
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libafsk_a_AR = $(AR) $(ARFLAGS)
|
||||
libafsk_a_LIBADD =
|
||||
am_libafsk_a_OBJECTS = modem.$(OBJEXT) costab.$(OBJEXT)
|
||||
libafsk_a_OBJECTS = $(am_libafsk_a_OBJECTS)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_gentbl_OBJECTS = gentbl.$(OBJEXT)
|
||||
gentbl_OBJECTS = $(am_gentbl_OBJECTS)
|
||||
gentbl_LDADD = $(LDADD)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libafsk_a_SOURCES) $(gentbl_SOURCES)
|
||||
DIST_SOURCES = $(libafsk_a_SOURCES) $(gentbl_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
|
||||
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
HAVE_ALSA = @HAVE_ALSA@
|
||||
HAVE_BITTYPES = @HAVE_BITTYPES@
|
||||
HAVE_DIRECTX = @HAVE_DIRECTX@
|
||||
HAVE_IFRNEWNAME = @HAVE_IFRNEWNAME@
|
||||
HAVE_MKISS = @HAVE_MKISS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
M_PI = @M_PI@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USEMMX = @USEMMX@
|
||||
USEVIS = @USEVIS@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WIN32 = @WIN32@
|
||||
WINDRES = @WINDRES@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = -I$(top_srcdir)/soundcard
|
||||
noinst_LIBRARIES = libafsk.a
|
||||
libafsk_a_SOURCES = modem.c costab.c
|
||||
noinst_HEADERS = costab.h
|
||||
gentbl_SOURCES = gentbl.c
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu afsk/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu afsk/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libafsk.a: $(libafsk_a_OBJECTS) $(libafsk_a_DEPENDENCIES)
|
||||
-rm -f libafsk.a
|
||||
$(libafsk_a_AR) libafsk.a $(libafsk_a_OBJECTS) $(libafsk_a_LIBADD)
|
||||
$(RANLIB) libafsk.a
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
|
||||
gentbl$(EXEEXT): $(gentbl_OBJECTS) $(gentbl_DEPENDENCIES)
|
||||
@rm -f gentbl$(EXEEXT)
|
||||
$(LINK) $(gentbl_OBJECTS) $(gentbl_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/costab.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gentbl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modem.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \
|
||||
distclean-compile distclean-generic distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am
|
||||
|
||||
|
||||
@CROSSCOMP_FALSE@$(srcdir)/costab.c: gentbl$(EXEEXT)
|
||||
@CROSSCOMP_FALSE@ bdir=`pwd`; cd $(srcdir); $$bdir/gentbl
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
73
afsk/costab.c
Normal file
73
afsk/costab.c
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
#include "costab.h"
|
||||
|
||||
/*
|
||||
* cosine table
|
||||
*/
|
||||
|
||||
const int16_t afsk_costab[512] = {
|
||||
32767, 32764, 32757, 32744, 32727, 32705, 32678, 32646,
|
||||
32609, 32567, 32520, 32468, 32412, 32350, 32284, 32213,
|
||||
32137, 32056, 31970, 31880, 31785, 31684, 31580, 31470,
|
||||
31356, 31236, 31113, 30984, 30851, 30713, 30571, 30424,
|
||||
30272, 30116, 29955, 29790, 29621, 29446, 29268, 29085,
|
||||
28897, 28706, 28510, 28309, 28105, 27896, 27683, 27466,
|
||||
27244, 27019, 26789, 26556, 26318, 26077, 25831, 25582,
|
||||
25329, 25072, 24811, 24546, 24278, 24006, 23731, 23452,
|
||||
23169, 22883, 22594, 22301, 22004, 21705, 21402, 21096,
|
||||
20787, 20474, 20159, 19840, 19519, 19194, 18867, 18537,
|
||||
18204, 17868, 17530, 17189, 16845, 16499, 16150, 15799,
|
||||
15446, 15090, 14732, 14372, 14009, 13645, 13278, 12909,
|
||||
12539, 12166, 11792, 11416, 11038, 10659, 10278, 9895,
|
||||
9511, 9126, 8739, 8351, 7961, 7571, 7179, 6786,
|
||||
6392, 5997, 5601, 5205, 4807, 4409, 4011, 3611,
|
||||
3211, 2811, 2410, 2009, 1607, 1206, 804, 402,
|
||||
0, -402, -804, -1206, -1607, -2009, -2410, -2811,
|
||||
-3211, -3611, -4011, -4409, -4807, -5205, -5601, -5997,
|
||||
-6392, -6786, -7179, -7571, -7961, -8351, -8739, -9126,
|
||||
-9511, -9895, -10278, -10659, -11038, -11416, -11792, -12166,
|
||||
-12539, -12909, -13278, -13645, -14009, -14372, -14732, -15090,
|
||||
-15446, -15799, -16150, -16499, -16845, -17189, -17530, -17868,
|
||||
-18204, -18537, -18867, -19194, -19519, -19840, -20159, -20474,
|
||||
-20787, -21096, -21402, -21705, -22004, -22301, -22594, -22883,
|
||||
-23169, -23452, -23731, -24006, -24278, -24546, -24811, -25072,
|
||||
-25329, -25582, -25831, -26077, -26318, -26556, -26789, -27019,
|
||||
-27244, -27466, -27683, -27896, -28105, -28309, -28510, -28706,
|
||||
-28897, -29085, -29268, -29446, -29621, -29790, -29955, -30116,
|
||||
-30272, -30424, -30571, -30713, -30851, -30984, -31113, -31236,
|
||||
-31356, -31470, -31580, -31684, -31785, -31880, -31970, -32056,
|
||||
-32137, -32213, -32284, -32350, -32412, -32468, -32520, -32567,
|
||||
-32609, -32646, -32678, -32705, -32727, -32744, -32757, -32764,
|
||||
-32767, -32764, -32757, -32744, -32727, -32705, -32678, -32646,
|
||||
-32609, -32567, -32520, -32468, -32412, -32350, -32284, -32213,
|
||||
-32137, -32056, -31970, -31880, -31785, -31684, -31580, -31470,
|
||||
-31356, -31236, -31113, -30984, -30851, -30713, -30571, -30424,
|
||||
-30272, -30116, -29955, -29790, -29621, -29446, -29268, -29085,
|
||||
-28897, -28706, -28510, -28309, -28105, -27896, -27683, -27466,
|
||||
-27244, -27019, -26789, -26556, -26318, -26077, -25831, -25582,
|
||||
-25329, -25072, -24811, -24546, -24278, -24006, -23731, -23452,
|
||||
-23169, -22883, -22594, -22301, -22004, -21705, -21402, -21096,
|
||||
-20787, -20474, -20159, -19840, -19519, -19194, -18867, -18537,
|
||||
-18204, -17868, -17530, -17189, -16845, -16499, -16150, -15799,
|
||||
-15446, -15090, -14732, -14372, -14009, -13645, -13278, -12909,
|
||||
-12539, -12166, -11792, -11416, -11038, -10659, -10278, -9895,
|
||||
-9511, -9126, -8739, -8351, -7961, -7571, -7179, -6786,
|
||||
-6392, -5997, -5601, -5205, -4807, -4409, -4011, -3611,
|
||||
-3211, -2811, -2410, -2009, -1607, -1206, -804, -402,
|
||||
0, 402, 804, 1206, 1607, 2009, 2410, 2811,
|
||||
3211, 3611, 4011, 4409, 4807, 5205, 5601, 5997,
|
||||
6392, 6786, 7179, 7571, 7961, 8351, 8739, 9126,
|
||||
9511, 9895, 10278, 10659, 11038, 11416, 11792, 12166,
|
||||
12539, 12909, 13278, 13645, 14009, 14372, 14732, 15090,
|
||||
15446, 15799, 16150, 16499, 16845, 17189, 17530, 17868,
|
||||
18204, 18537, 18867, 19194, 19519, 19840, 20159, 20474,
|
||||
20787, 21096, 21402, 21705, 22004, 22301, 22594, 22883,
|
||||
23169, 23452, 23731, 24006, 24278, 24546, 24811, 25072,
|
||||
25329, 25582, 25831, 26077, 26318, 26556, 26789, 27019,
|
||||
27244, 27466, 27683, 27896, 28105, 28309, 28510, 28706,
|
||||
28897, 29085, 29268, 29446, 29621, 29790, 29955, 30116,
|
||||
30272, 30424, 30571, 30713, 30851, 30984, 31113, 31236,
|
||||
31356, 31470, 31580, 31684, 31785, 31880, 31970, 32056,
|
||||
32137, 32213, 32284, 32350, 32412, 32468, 32520, 32567,
|
||||
32609, 32646, 32678, 32705, 32727, 32744, 32757, 32764
|
||||
};
|
||||
|
||||
40
afsk/costab.h
Normal file
40
afsk/costab.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* costab.h -- User soundmodem commonly used tables.
|
||||
*
|
||||
* Copyright (C) 1996-2000
|
||||
* Thomas Sailer (sailer@ife.ee.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _COSTAB_H
|
||||
#define _COSTAB_H
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#include "modem.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
extern const int16_t afsk_costab[512];
|
||||
|
||||
#define COS(x) afsk_costab[((x)>>7)&0x1ff]
|
||||
#define SIN(x) COS((x)+0xc000)
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
#endif /* _COSTAB_H */
|
||||
70
afsk/gentbl.c
Normal file
70
afsk/gentbl.c
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* gentbl.c -- Soundmodem table generator.
|
||||
*
|
||||
* Copyright (C) 1996-2001
|
||||
* Thomas Sailer (t.sailer@alumni.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
static const char *progname;
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
static void gen_costab(unsigned size)
|
||||
{
|
||||
FILE *f;
|
||||
int i;
|
||||
|
||||
if (!(f = fopen("costab.c", "w"))) {
|
||||
fprintf(stderr, "cannot open file costab.c\n");
|
||||
exit(1);
|
||||
}
|
||||
fprintf(f, "#include \"costab.h\"\n\n/*\n * cosine table\n */\n\n"
|
||||
"const int16_t afsk_costab[%d] = {", size);
|
||||
for (i = 0; i < size; i++) {
|
||||
if (!(i & 7))
|
||||
fprintf(f, "\n\t");
|
||||
fprintf(f, "%6d", (int)(32767.0*cos(i*(2.0*M_PI)/size)));
|
||||
if (i != (size-1))
|
||||
fprintf(f, ", ");
|
||||
}
|
||||
fprintf(f, "\n};\n\n");
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
progname = argv[0];
|
||||
gen_costab(512);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
446
afsk/modem.c
Normal file
446
afsk/modem.c
Normal file
|
|
@ -0,0 +1,446 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* modem.c -- Linux Userland Soundmodem AFSK modem.
|
||||
*
|
||||
* Copyright (C) 1998-2000, 2003
|
||||
* Thomas Sailer <t.sailer@alumni.ethz.ch>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include "modem.h"
|
||||
#include "costab.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
struct modstate {
|
||||
struct modemchannel *chan;
|
||||
unsigned int bps, f0, f1, notdiff, maxbitlen;
|
||||
unsigned int bitinc, bitph;
|
||||
unsigned int dds, ddsinc[2];
|
||||
unsigned int bit;
|
||||
};
|
||||
|
||||
static const struct modemparams modparams[] = {
|
||||
{ "bps", "Bits/s", "Bits per second", "1200", MODEMPAR_NUMERIC, { n: { 100, 9600, 100, 1200 } } },
|
||||
{ "f0", "Frequency 0", "Frequency 0", "1200", MODEMPAR_NUMERIC, { n: { 0, 38400, 100, 1000 } } },
|
||||
{ "f1", "Frequency 1", "Frequency 1", "2200", MODEMPAR_NUMERIC, { n: { 0, 38400, 100, 1000 } } },
|
||||
{ "diffenc", "Differential Encoding", "Enable for differentially encoded waveforms (normally on!)", "1", MODEMPAR_CHECKBUTTON },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static void *modconfig(struct modemchannel *chan, unsigned int *samplerate, const char *params[])
|
||||
{
|
||||
struct modstate *s;
|
||||
|
||||
if (!(s = malloc(sizeof(struct modstate))))
|
||||
logprintf(MLOG_FATAL, "out of memory\n");
|
||||
s->chan = chan;
|
||||
if (params[0]) {
|
||||
s->bps = strtoul(params[0], NULL, 0);
|
||||
if (s->bps < 100)
|
||||
s->bps = 100;
|
||||
if (s->bps > 9600)
|
||||
s->bps= 9600;
|
||||
} else
|
||||
s->bps = 1200;
|
||||
if (params[1]) {
|
||||
s->f0 = strtoul(params[1], NULL, 0);
|
||||
if (s->f0 > s->bps * 4)
|
||||
s->f0 = s->bps * 4;
|
||||
} else
|
||||
s->f0 = 1200;
|
||||
if (params[2]) {
|
||||
s->f1 = strtoul(params[2], NULL, 0);
|
||||
if (s->f1 > s->bps * 4)
|
||||
s->f1 = s->bps * 4;
|
||||
} else
|
||||
s->f1 = 2200;
|
||||
s->notdiff = params[3] ? !strtoul(params[3], NULL, 0) : 0;
|
||||
*samplerate = 8 * s->bps;
|
||||
return s;
|
||||
}
|
||||
|
||||
static void modinit(void *state, unsigned int samplerate)
|
||||
{
|
||||
struct modstate *s = (struct modstate *)state;
|
||||
|
||||
s->maxbitlen = (samplerate + s->bps - 1) / s->bps;
|
||||
s->bitinc = (s->bps << 16) / samplerate;
|
||||
s->ddsinc[0] = (s->f0 << 16) / samplerate;
|
||||
s->ddsinc[1] = (s->f1 << 16) / samplerate;
|
||||
s->bit = 0;
|
||||
}
|
||||
|
||||
static void modsendbits(struct modstate *s, unsigned int bits, unsigned int nrsyms)
|
||||
{
|
||||
int16_t sbuf[512];
|
||||
int16_t *sptr = sbuf, *eptr = sbuf + sizeof(sbuf)/sizeof(sbuf[0]);
|
||||
|
||||
while (nrsyms > 0) {
|
||||
if (s->bitph >= 0x10000) {
|
||||
s->bitph &= 0xffff;
|
||||
s->bit = (~((s->bit | s->notdiff) ^ bits)) & 1;
|
||||
bits >>= 1;
|
||||
nrsyms--;
|
||||
}
|
||||
*sptr++ = COS(s->dds);
|
||||
s->dds += s->ddsinc[s->bit];
|
||||
s->bitph += s->bitinc;
|
||||
if (sptr >= eptr) {
|
||||
audiowrite(s->chan, sbuf, sptr - sbuf);
|
||||
sptr = sbuf;
|
||||
}
|
||||
}
|
||||
audiowrite(s->chan, sbuf, sptr - sbuf);
|
||||
}
|
||||
|
||||
static void modmodulate(void *state, unsigned int txdelay)
|
||||
{
|
||||
struct modstate *s = (struct modstate *)state;
|
||||
int i;
|
||||
unsigned char ch;
|
||||
|
||||
i = txdelay * s->bps / 1000;
|
||||
do {
|
||||
modsendbits(s, 0x7e, 8);
|
||||
i -= 8;
|
||||
} while (i > 0);
|
||||
while (pktget(s->chan, &ch, 1))
|
||||
modsendbits(s, ch, 8);
|
||||
modsendbits(s, 0x7e, 8);
|
||||
modsendbits(s, 0x7e, 8);
|
||||
}
|
||||
|
||||
struct modulator afskmodulator = {
|
||||
NULL,
|
||||
"afsk",
|
||||
modparams,
|
||||
modconfig,
|
||||
modinit,
|
||||
modmodulate,
|
||||
free
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
/* RxFilter */
|
||||
#define WINDOWEXPAND 1.5
|
||||
#define RXFILTLEN 16
|
||||
#define RXFILTOVERBITS 3
|
||||
#define RXFILTOVER (1<<(RXFILTOVERBITS))
|
||||
#define RXFILTFIDX(x) (((x)>>(16-(RXFILTOVERBITS)))&(RXFILTOVER-1))
|
||||
#define RXFILTFSAMP(x) ((x)>>16)
|
||||
|
||||
struct demodstate {
|
||||
struct modemchannel *chan;
|
||||
unsigned int bps, f0, f1, notdiff, firlen;
|
||||
unsigned int srate;
|
||||
unsigned int rxbits;
|
||||
unsigned int rxphase;
|
||||
unsigned int rxphinc;
|
||||
int dcdcnt;
|
||||
unsigned int dcdtim;
|
||||
|
||||
unsigned int div, divcnt;
|
||||
unsigned int pllinc, pll, pllthresh, pllcorr;
|
||||
unsigned int shreg, lastbit;
|
||||
int dcd_sum0, dcd_sum1, dcd_sum2;
|
||||
unsigned int dcd_time;
|
||||
u_int32_t raws, rawb;
|
||||
unsigned char dcd;
|
||||
|
||||
union {
|
||||
struct {
|
||||
int32_t f0r[RXFILTOVER][RXFILTLEN];
|
||||
int32_t f0i[RXFILTOVER][RXFILTLEN];
|
||||
int32_t f1r[RXFILTOVER][RXFILTLEN];
|
||||
int32_t f1i[RXFILTOVER][RXFILTLEN];
|
||||
} f32;
|
||||
struct {
|
||||
int16_t f0r[RXFILTOVER][RXFILTLEN];
|
||||
int16_t f0i[RXFILTOVER][RXFILTLEN];
|
||||
int16_t f1r[RXFILTOVER][RXFILTLEN];
|
||||
int16_t f1i[RXFILTOVER][RXFILTLEN];
|
||||
} f16;
|
||||
} f;
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
static const struct modemparams demodparams[] = {
|
||||
{ "bps", "Bits/s", "Bits per second", "1200", MODEMPAR_NUMERIC, { n: { 100, 9600, 100, 1200 } } },
|
||||
{ "f0", "Frequency 0", "Frequency 0", "1200", MODEMPAR_NUMERIC, { n: { 0, 38400, 100, 1000 } } },
|
||||
{ "f1", "Frequency 1", "Frequency 1", "2200", MODEMPAR_NUMERIC, { n: { 0, 38400, 100, 1000 } } },
|
||||
{ "diffdec", "Differential Decoding", "Enable for differentially encoded waveforms (normally on!)", "1", MODEMPAR_CHECKBUTTON },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static void *demodconfig(struct modemchannel *chan, unsigned int *samplerate, const char *params[])
|
||||
{
|
||||
struct demodstate *s;
|
||||
unsigned int f;
|
||||
|
||||
if (!(s = malloc(sizeof(struct demodstate))))
|
||||
logprintf(MLOG_FATAL, "out of memory\n");
|
||||
s->chan = chan;
|
||||
if (params[0]) {
|
||||
s->bps = strtoul(params[0], NULL, 0);
|
||||
if (s->bps < 100)
|
||||
s->bps = 100;
|
||||
if (s->bps > 9600)
|
||||
s->bps= 9600;
|
||||
} else
|
||||
s->bps = 1200;
|
||||
if (params[1]) {
|
||||
s->f0 = strtoul(params[1], NULL, 0);
|
||||
if (s->f0 > s->bps * 4)
|
||||
s->f0 = s->bps * 4;
|
||||
} else
|
||||
s->f0 = 1200;
|
||||
if (params[2]) {
|
||||
s->f1 = strtoul(params[2], NULL, 0);
|
||||
if (s->f1 > s->bps * 4)
|
||||
s->f1 = s->bps * 4;
|
||||
} else
|
||||
s->f1 = 2200;
|
||||
s->notdiff = params[3] ? !strtoul(params[3], NULL, 0) : 0;
|
||||
f = s->f0;
|
||||
if (s->f1 > f)
|
||||
f = s->f1;
|
||||
f += s->bps/2;
|
||||
f = (2*f) + (f >> 1);
|
||||
*samplerate = f;
|
||||
return s;
|
||||
}
|
||||
|
||||
static int demfilter(struct demodstate *state, const int16_t *val, unsigned int phase)
|
||||
{
|
||||
unsigned int fidx = RXFILTFIDX(phase);
|
||||
const int *c0r = state->f.f32.f0r[fidx];
|
||||
const int *c0i = state->f.f32.f0i[fidx];
|
||||
const int *c1r = state->f.f32.f1r[fidx];
|
||||
const int *c1i = state->f.f32.f1i[fidx];
|
||||
const int16_t *v1, *v2;
|
||||
unsigned int i;
|
||||
int st = 0, s;
|
||||
|
||||
v1 = val + RXFILTFSAMP(phase);
|
||||
for (v2 = v1, s = 0, i = 0; i < RXFILTLEN; i++, v2++, c1r++)
|
||||
s += (*v2) * (*c1r);
|
||||
s >>= 16;
|
||||
st = s * s;
|
||||
for (v2 = v1, s = 0, i = 0; i < RXFILTLEN; i++, v2++, c1i++)
|
||||
s += (*v2) * (*c1i);
|
||||
s >>= 16;
|
||||
st += s * s;
|
||||
for (v2 = v1, s = 0, i = 0; i < RXFILTLEN; i++, v2++, c0r++)
|
||||
s += (*v2) * (*c0r);
|
||||
s >>= 16;
|
||||
st -= s * s;
|
||||
for (v2 = v1, s = 0, i = 0; i < RXFILTLEN; i++, v2++, c0i++)
|
||||
s += (*v2) * (*c0i);
|
||||
s >>= 16;
|
||||
st -= s * s;
|
||||
return st;
|
||||
}
|
||||
|
||||
static void demod8bits(struct demodstate *s)
|
||||
{
|
||||
int16_t *samples;
|
||||
unsigned int phinc = s->rxphinc;
|
||||
unsigned int halfphinc = phinc >> 1;
|
||||
unsigned int dcdinterv = phinc >> 2;
|
||||
unsigned int phasecorr = phinc >> 4;
|
||||
unsigned int totsamp = ((12 * phinc) >> 16) + RXFILTLEN;
|
||||
unsigned int phase, nr;
|
||||
int oldv, newv, midv, thv;
|
||||
|
||||
samples = alloca(totsamp * sizeof(samples[0]));
|
||||
audioread(s->chan, samples, totsamp, s->rxphase >> 16);
|
||||
phase = s->rxphase & 0xffff;
|
||||
s->rxphase &= ~0xffff;
|
||||
oldv = demfilter(s, samples, phase);
|
||||
for (nr = 0; nr < 8; nr++) {
|
||||
if (logcheck(260)) {
|
||||
unsigned int i;
|
||||
for (i = 0; i < 8; i++)
|
||||
logprintf(260, "afsk: rxv[%1u]: %6d\n", i,
|
||||
demfilter(s, samples, phase + ((i * phinc) >> 3)) >> 16);
|
||||
}
|
||||
phase += phinc;
|
||||
newv = demfilter(s, samples, phase);
|
||||
s->rxbits >>= 1;
|
||||
if (!((newv > 0) ^ ((oldv > 0) | s->notdiff)))
|
||||
s->rxbits |= 0x80;
|
||||
else {
|
||||
midv = demfilter(s, samples, phase - halfphinc);
|
||||
if ((oldv > 0) ^ (midv > 0)) {
|
||||
thv = demfilter(s, samples, phase - halfphinc - dcdinterv);
|
||||
phase -= phasecorr;
|
||||
} else {
|
||||
thv = demfilter(s, samples, phase - halfphinc + dcdinterv);
|
||||
phase += phasecorr;
|
||||
}
|
||||
if ((midv > 0) ^ (thv > 0))
|
||||
s->dcdcnt++;
|
||||
else
|
||||
s->dcdcnt -= 2;
|
||||
}
|
||||
logprintf(258, "afsk: rx: oldv %10d midv %10d newv %10d\n", oldv, midv, newv);
|
||||
oldv = newv;
|
||||
s->dcdtim++;
|
||||
}
|
||||
s->rxphase += phase;
|
||||
}
|
||||
|
||||
|
||||
static void demoddemodulate(void *state)
|
||||
{
|
||||
struct demodstate *s = (struct demodstate *)state;
|
||||
int dcd0 = -2, dcd1 = -2, dcd2 = -2;
|
||||
unsigned char buf;
|
||||
char buf2[9];
|
||||
unsigned int i;
|
||||
|
||||
s->dcdcnt = -2;
|
||||
s->dcdtim = 0;
|
||||
s->rxphase = audiocurtime(s->chan) << 16;
|
||||
for (;;) {
|
||||
demod8bits(s);
|
||||
buf = s->rxbits;
|
||||
pktput(s->chan, &buf, 1);
|
||||
if (logcheck(256)) {
|
||||
for (i = 0; i < 8; i++)
|
||||
buf2[i] = '0' + ((buf >> i) & 1);
|
||||
buf2[8] = 0;
|
||||
logprintf(256, "afskrx: %s\n", buf2);
|
||||
}
|
||||
#if 0
|
||||
for (i = 0; i < 8; i++)
|
||||
putchar('0' + ((buf >> i) & 1));
|
||||
fflush(stdout);
|
||||
#endif
|
||||
if (s->dcdtim < 120)
|
||||
continue;
|
||||
dcd0 = dcd1;
|
||||
dcd1 = dcd2;
|
||||
dcd2 = s->dcdcnt;
|
||||
s->dcdcnt = -2;
|
||||
s->dcdtim = 0;
|
||||
pktsetdcd(s->chan, (dcd0 + dcd1 + dcd2) > 0);
|
||||
}
|
||||
}
|
||||
|
||||
static inline double sinc(double x)
|
||||
{
|
||||
double arg = x * M_PI;
|
||||
|
||||
if (arg == 0)
|
||||
return 1;
|
||||
return sin(arg) / arg;
|
||||
}
|
||||
|
||||
static inline double hamming(double x)
|
||||
{
|
||||
return 0.54-0.46*cos((2*M_PI)*x);
|
||||
}
|
||||
|
||||
static void demodinit(void *state, unsigned int samplerate, unsigned int *bitrate)
|
||||
{
|
||||
struct demodstate *s = (struct demodstate *)state;
|
||||
float f0r[RXFILTLEN*RXFILTOVER];
|
||||
float f0i[RXFILTLEN*RXFILTOVER];
|
||||
float f1r[RXFILTLEN*RXFILTOVER];
|
||||
float f1i[RXFILTLEN*RXFILTOVER];
|
||||
double ph0, ph1, w, tscale;
|
||||
float max, max0, max1, max2, max3;
|
||||
unsigned int i, j;
|
||||
|
||||
tscale = (float)s->bps / (float)samplerate / RXFILTOVER / WINDOWEXPAND;
|
||||
ph0 = 2.0 * M_PI * (float)s->f0 / (float)samplerate / RXFILTOVER;
|
||||
ph1 = 2.0 * M_PI * (float)s->f1 / (float)samplerate / RXFILTOVER;
|
||||
for (i = 0; i < RXFILTLEN * RXFILTOVER; i++) {
|
||||
w = i * tscale;
|
||||
if (w > 1)
|
||||
w = 0;
|
||||
else
|
||||
w = hamming(w);
|
||||
f0r[i] = w * cos(ph0 * i);
|
||||
f0i[i] = w * sin(ph0 * i);
|
||||
f1r[i] = w * cos(ph1 * i);
|
||||
f1i[i] = w * sin(ph1 * i);
|
||||
}
|
||||
/* determine maximum */
|
||||
max = 0;
|
||||
for (i = 0; i < RXFILTOVER; i++) {
|
||||
max0 = max1 = max2 = max3 = 0;
|
||||
for (j = i; j < RXFILTLEN * RXFILTOVER; j += RXFILTOVER) {
|
||||
max0 += fabs(f0r[j]);
|
||||
max1 += fabs(f0i[j]);
|
||||
max2 += fabs(f1r[j]);
|
||||
max3 += fabs(f1i[j]);
|
||||
}
|
||||
if (max0 > max)
|
||||
max = max0;
|
||||
if (max1 > max)
|
||||
max = max1;
|
||||
if (max2 > max)
|
||||
max = max2;
|
||||
if (max3 > max)
|
||||
max = max3;
|
||||
}
|
||||
w = 32767 / max;
|
||||
for (i = 0; i < RXFILTLEN * RXFILTOVER; i++) {
|
||||
f0r[i] *= w;
|
||||
f0i[i] *= w;
|
||||
f1r[i] *= w;
|
||||
f1i[i] *= w;
|
||||
}
|
||||
for (i = 0; i < RXFILTOVER; i++)
|
||||
for (j = 0; j < RXFILTLEN; j++) {
|
||||
s->f.f32.f0r[RXFILTOVER-1-i][j] = f0r[j*RXFILTOVER+i];
|
||||
s->f.f32.f0i[RXFILTOVER-1-i][j] = f0i[j*RXFILTOVER+i];
|
||||
s->f.f32.f1r[RXFILTOVER-1-i][j] = f1r[j*RXFILTOVER+i];
|
||||
s->f.f32.f1i[RXFILTOVER-1-i][j] = f1i[j*RXFILTOVER+i];
|
||||
}
|
||||
s->srate = samplerate;
|
||||
s->rxphinc = ((samplerate << 16) + s->bps / 2) / s->bps;
|
||||
*bitrate = s->bps;
|
||||
}
|
||||
|
||||
struct demodulator afskdemodulator = {
|
||||
NULL,
|
||||
"afsk",
|
||||
demodparams,
|
||||
demodconfig,
|
||||
demodinit,
|
||||
demoddemodulate,
|
||||
free
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
21
cfgwindows
Executable file
21
cfgwindows
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
if test -d /usr/local/cross/i686-pc-cygwin; then
|
||||
CROSSPATH=/usr/local/cross/i686-pc-cygwin/
|
||||
else
|
||||
CROSSPATH=/usr/local/cygwin/i686-pc-cygwin/
|
||||
fi
|
||||
PATH=${CROSSPATH}/bin:${PATH}
|
||||
CC=i686-pc-cygwin-gcc
|
||||
AR=i686-pc-cygwin-ar
|
||||
AS=i686-pc-cygwin-as
|
||||
LD=i686-pc-cygwin-ld
|
||||
RANLIB=i686-pc-cygwin-ranlib
|
||||
DLLTOOL=i686-pc-cygwin-dlltool
|
||||
WINDRES=i686-pc-cygwin-windres
|
||||
# for gcc3 and later, use -mms-bitfields instead of -fnative-struct
|
||||
CFLAGS="-O2 -g -I${CROSSPATH}/gtk/include -mno-cygwin -mpentium -fnative-struct"
|
||||
LDFLAGS="-L${CROSSPATH}/gtk/lib -mno-cygwin"
|
||||
export CC AS AR LD RANLIB DLLTOOL PATH CFLAGS LDFLAGS
|
||||
dir=`dirname $0`
|
||||
${dir}/configure --host=i686-pc-cygwin --build=i686-pc-linux-gnu --disable-nls $*
|
||||
20
cfgwindowsnodebug
Executable file
20
cfgwindowsnodebug
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
if test -d /usr/local/cross/i686-pc-cygwin; then
|
||||
CROSSPATH=/usr/local/cross/i686-pc-cygwin/
|
||||
else
|
||||
CROSSPATH=/usr/local/cygwin/i686-pc-cygwin/
|
||||
fi
|
||||
PATH=${CROSSPATH}/bin:${PATH}
|
||||
CC=i686-pc-cygwin-gcc
|
||||
AR=i686-pc-cygwin-ar
|
||||
AS=i686-pc-cygwin-as
|
||||
LD=i686-pc-cygwin-ld
|
||||
RANLIB=i686-pc-cygwin-ranlib
|
||||
DLLTOOL=i686-pc-cygwin-dlltool
|
||||
WINDRES=i686-pc-cygwin-windres
|
||||
CFLAGS="-O2 -I${CROSSPATH}/gtk/include -mno-cygwin -mcpu=pentium"
|
||||
LDFLAGS="-L${CROSSPATH}/gtk/lib -mno-cygwin"
|
||||
export CC AS AR LD RANLIB DLLTOOL PATH CFLAGS LDFLAGS
|
||||
dir=`dirname $0`
|
||||
${dir}/configure --host=i686-pc-cygwin --build=i686-pc-linux-gnu --disable-nls $*
|
||||
973
config.guess
vendored
Executable file
973
config.guess
vendored
Executable file
|
|
@ -0,0 +1,973 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# The master version of this file is at the FSF in /home/gd/gnu/lib.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
# exits with 0. Otherwise, it exits with 1.
|
||||
#
|
||||
# The plan is that this can be called by configure scripts if you
|
||||
# don't specify an explicit system type (host/target name).
|
||||
#
|
||||
# Only a few systems have been added to this list; please add others
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 8/24/94.)
|
||||
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
|
||||
PATH=$PATH:/.attbin ; export PATH
|
||||
fi
|
||||
|
||||
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
|
||||
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
|
||||
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
|
||||
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
|
||||
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
|
||||
|
||||
# Note: order is significant - the case branches are not exclusive.
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
fi
|
||||
# A Vn.n version is a released version.
|
||||
# A Tn.n version is a released field test version.
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
cat <<EOF >$dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
${CC-cc} $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
15)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
14)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
10)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
|
||||
exit 0 ;;
|
||||
21064:Windows_NT:50:3)
|
||||
echo alpha-dec-winnt3.5
|
||||
exit 0 ;;
|
||||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-cbm-sysv4
|
||||
exit 0;;
|
||||
amiga:NetBSD:*:*)
|
||||
echo m68k-cbm-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:[Aa]miga[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||
exit 0 ;;
|
||||
arc64:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hkmips:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
|
||||
echo arm-acorn-riscix${UNAME_RELEASE}
|
||||
exit 0;;
|
||||
arm32:NetBSD:*:*)
|
||||
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
SR2?01:HI-UX/MPP:*:*)
|
||||
echo hppa1.1-hitachi-hiuxmpp
|
||||
exit 0;;
|
||||
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*)
|
||||
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
|
||||
if test "`(/bin/universe) 2>/dev/null`" = att ; then
|
||||
echo pyramid-pyramid-sysv3
|
||||
else
|
||||
echo pyramid-pyramid-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
NILE:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
sun4H:SunOS:5.*:*)
|
||||
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
i86pc:SunOS:5.*:*)
|
||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# According to config.sub, this is the proper way to canonicalize
|
||||
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
|
||||
# it's likely to be more like Solaris than SunOS4.
|
||||
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
sun4*:SunOS:*:*)
|
||||
case "`/usr/bin/arch -k`" in
|
||||
Series*|S4*)
|
||||
UNAME_RELEASE=`uname -v`
|
||||
;;
|
||||
esac
|
||||
# Japanese Language versions have a version number like `4.1.3-JL'.
|
||||
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
|
||||
exit 0 ;;
|
||||
sun3*:SunOS:*:*)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
;;
|
||||
sun4)
|
||||
echo sparc-sun-sunos${UNAME_RELEASE}
|
||||
;;
|
||||
esac
|
||||
exit 0 ;;
|
||||
aushp:SunOS:*:*)
|
||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:NetBSD:*:*)
|
||||
echo m68k-atari-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:NetBSD:*:*)
|
||||
echo m68k-sun-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:NetBSD:*:*)
|
||||
echo m68k-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
macppc:NetBSD:*:*)
|
||||
echo powerpc-apple-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RISC*:Mach:*:*)
|
||||
echo mips-dec-mach_bsd4.3
|
||||
exit 0 ;;
|
||||
RISC*:ULTRIX:*:*)
|
||||
echo mips-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
VAX*:ULTRIX*:*:*)
|
||||
echo vax-dec-ultrix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
2020:CLIX:*:*)
|
||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
int main (argc, argv) int argc; char **argv; {
|
||||
#if defined (host_mips) && defined (MIPSEB)
|
||||
#if defined (SYSTYPE_SYSV)
|
||||
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#if defined (SYSTYPE_SVR4)
|
||||
printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
|
||||
printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} $dummy.c -o $dummy \
|
||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
echo powerpc-harris-powerunix
|
||||
exit 0 ;;
|
||||
m88k:CX/UX:7*:*)
|
||||
echo m88k-harris-cxux7
|
||||
exit 0 ;;
|
||||
m88k:*:4*:R4*)
|
||||
echo m88k-motorola-sysv4
|
||||
exit 0 ;;
|
||||
m88k:*:3*:R3*)
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
|
||||
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
|
||||
echo m88k-dg-dgux${UNAME_RELEASE}
|
||||
else
|
||||
echo m88k-dg-dguxbcs${UNAME_RELEASE}
|
||||
fi
|
||||
else echo i586-dg-dgux${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
|
||||
echo m88k-dolphin-sysv3
|
||||
exit 0 ;;
|
||||
M88*:*:R3*:*)
|
||||
# Delta 88k system running SVR3
|
||||
echo m88k-motorola-sysv3
|
||||
exit 0 ;;
|
||||
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
|
||||
echo m88k-tektronix-sysv3
|
||||
exit 0 ;;
|
||||
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
|
||||
echo m68k-tektronix-bsd
|
||||
exit 0 ;;
|
||||
*:IRIX*:*:*)
|
||||
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
|
||||
exit 0 ;;
|
||||
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
|
||||
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
|
||||
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
|
||||
i?86:AIX:*:*)
|
||||
echo i386-ibm-aix
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
main()
|
||||
{
|
||||
if (!__power_pc())
|
||||
exit(1);
|
||||
puts("powerpc-ibm-aix3.2.5");
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
else
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:4)
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
IBM_ARCH=powerpc
|
||||
fi
|
||||
if [ -x /usr/bin/oslevel ] ; then
|
||||
IBM_REV=`/usr/bin/oslevel`
|
||||
else
|
||||
IBM_REV=4.${UNAME_RELEASE}
|
||||
fi
|
||||
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
|
||||
exit 0 ;;
|
||||
*:AIX:*:*)
|
||||
echo rs6000-ibm-aix
|
||||
exit 0 ;;
|
||||
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
|
||||
echo romp-ibm-bsd4.4
|
||||
exit 0 ;;
|
||||
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
|
||||
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
|
||||
exit 0 ;; # report: romp-ibm BSD 4.3
|
||||
*:BOSX:*:*)
|
||||
echo rs6000-bull-bosx
|
||||
exit 0 ;;
|
||||
DPX/2?00:B.O.S.:*:*)
|
||||
echo m68k-bull-sysv3
|
||||
exit 0 ;;
|
||||
9000/[34]??:4.3bsd:1.*:*)
|
||||
echo m68k-hp-bsd
|
||||
exit 0 ;;
|
||||
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
|
||||
echo m68k-hp-bsd4.4
|
||||
exit 0 ;;
|
||||
9000/[34678]??:HP-UX:*:*)
|
||||
case "${UNAME_MACHINE}" in
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/6?? | 9000/7?? | 9000/80[24] | 9000/8?[13679] | 9000/892 )
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main ()
|
||||
{
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
long bits = sysconf(_SC_KERNEL_BITS);
|
||||
#endif
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
|
||||
case CPU_PA_RISC2_0:
|
||||
#if defined(_SC_KERNEL_BITS)
|
||||
switch (bits)
|
||||
{
|
||||
case 64: puts ("hppa2.0w"); break;
|
||||
case 32: puts ("hppa2.0n"); break;
|
||||
default: puts ("hppa2.0"); break;
|
||||
} break;
|
||||
#else /* !defined(_SC_KERNEL_BITS) */
|
||||
puts ("hppa2.0"); break;
|
||||
#endif
|
||||
default: puts ("hppa1.0"); break;
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
(${CC-cc} $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
rm -f $dummy.c $dummy
|
||||
esac
|
||||
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
long cpu = sysconf (_SC_CPU_VERSION);
|
||||
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
|
||||
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
|
||||
results, however. */
|
||||
if (CPU_IS_PA_RISC (cpu))
|
||||
{
|
||||
switch (cpu)
|
||||
{
|
||||
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
|
||||
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
|
||||
default: puts ("hppa-hitachi-hiuxwe2"); break;
|
||||
}
|
||||
}
|
||||
else if (CPU_IS_HP_MC68K (cpu))
|
||||
puts ("m68k-hitachi-hiuxwe2");
|
||||
else puts ("unknown-hitachi-hiuxwe2");
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
echo hppa1.1-hp-bsd
|
||||
exit 0 ;;
|
||||
9000/8??:4.3bsd:*:*)
|
||||
echo hppa1.0-hp-bsd
|
||||
exit 0 ;;
|
||||
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
|
||||
echo hppa1.1-hp-osf
|
||||
exit 0 ;;
|
||||
hp8??:OSF1:*:*)
|
||||
echo hppa1.0-hp-osf
|
||||
exit 0 ;;
|
||||
i?86:OSF1:*:*)
|
||||
if [ -x /usr/sbin/sysversion ] ; then
|
||||
echo ${UNAME_MACHINE}-unknown-osf1mk
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-osf1
|
||||
fi
|
||||
exit 0 ;;
|
||||
parisc*:Lites*:*:*)
|
||||
echo hppa1.1-hp-lites
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:*:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY*[A-Z]90:*:*:*)
|
||||
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
|
||||
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
|
||||
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
||||
exit 0 ;;
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo t3e-cray-unicosmk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
F300:UNIX_System_V:*:*)
|
||||
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
F301:UNIX_System_V:*:*)
|
||||
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
|
||||
exit 0 ;;
|
||||
hp3[0-9][05]:NetBSD:*:*)
|
||||
echo m68k-hp-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:BSD/OS:*:*)
|
||||
echo sparc-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:NetBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit 0 ;;
|
||||
i*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit 0 ;;
|
||||
p*:CYGWIN*:*)
|
||||
echo powerpcle-unknown-cygwin
|
||||
exit 0 ;;
|
||||
prep*:SunOS:5.*:*)
|
||||
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
# uname on the ARM produces all sorts of strangeness, and we need to
|
||||
# filter it out.
|
||||
case "$UNAME_MACHINE" in
|
||||
arm* | sa110*) UNAME_MACHINE="arm" ;;
|
||||
esac
|
||||
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us.
|
||||
ld_help_string=`ld --help 2>&1`
|
||||
ld_supported_emulations=`echo $ld_help_string \
|
||||
| sed -ne '/supported emulations:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported emulations: *//
|
||||
s/ .*//
|
||||
p'`
|
||||
case "$ld_supported_emulations" in
|
||||
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
|
||||
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
|
||||
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
|
||||
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
sed 's/^ //' <<EOF >$dummy.s
|
||||
.globl main
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,0,\$26,0
|
||||
.prologue 0
|
||||
.long 0x47e03d80 # implver $0
|
||||
lda \$2,259
|
||||
.long 0x47e20c21 # amask $2,$1
|
||||
srl \$1,8,\$2
|
||||
sll \$2,2,\$2
|
||||
sll \$0,3,\$0
|
||||
addl \$1,\$0,\$0
|
||||
addl \$2,\$0,\$0
|
||||
ret \$31,(\$26),1
|
||||
.end main
|
||||
EOF
|
||||
LIBC=""
|
||||
${CC-cc} $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
./$dummy
|
||||
case "$?" in
|
||||
7)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
15)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
14)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
10)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
16)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
esac
|
||||
|
||||
objdump --private-headers $dummy | \
|
||||
grep ld.so.1 > /dev/null
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
|
||||
elif test "${UNAME_MACHINE}" = "mips" ; then
|
||||
cat >$dummy.c <<EOF
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __MIPSEB__
|
||||
printf ("%s-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
#ifdef __MIPSEL__
|
||||
printf ("%sel-unknown-linux-gnu\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
# GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
|
||||
# If ld does not provide *any* "supported emulations:"
|
||||
# that means it is gnuoldld.
|
||||
echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
|
||||
test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
|
||||
|
||||
case "${UNAME_MACHINE}" in
|
||||
i?86)
|
||||
VENDOR=pc;
|
||||
;;
|
||||
*)
|
||||
VENDOR=unknown;
|
||||
;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
i?86:DYNIX/ptx:4*:*)
|
||||
echo i386-sequent-sysv4
|
||||
exit 0 ;;
|
||||
i?86:UNIX_SV:4.2MP:2.*)
|
||||
# Unixware is an offshoot of SVR4, but it has its own version
|
||||
# number series starting with 2...
|
||||
# I am not positive that other SVR4 systems won't match this,
|
||||
# I just have to hope. -- rms.
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:*:3.2:*)
|
||||
if test -f /usr/options/cb.name; then
|
||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i?86:UnixWare:*:*)
|
||||
if /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
# the processor, so we play safe by assuming i386.
|
||||
echo i386-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
Intel:Mach:3*:*)
|
||||
echo i386-pc-mach3
|
||||
exit 0 ;;
|
||||
paragon:*:*:*)
|
||||
echo i860-intel-osf1
|
||||
exit 0 ;;
|
||||
i860:*:4.*:*) # i860-SVR4
|
||||
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
|
||||
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
|
||||
else # Add other i860-SVR4 vendors below as they are discovered.
|
||||
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
|
||||
fi
|
||||
exit 0 ;;
|
||||
mini*:CTIX:SYS*5:*)
|
||||
# "miniframe"
|
||||
echo m68010-convergent-sysv
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4.3${OS_REL} && exit 0
|
||||
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||
&& echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
|
||||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& echo i486-ncr-sysv4 && exit 0 ;;
|
||||
m68*:LynxOS:2.*:*)
|
||||
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i?86:LynxOS:2.*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
|
||||
echo rs6000-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SM[BE]S:UNIX_SV:*:*)
|
||||
echo mips-dde-sysv${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
RM*:SINIX-*:*:*)
|
||||
echo mips-sni-sysv4
|
||||
exit 0 ;;
|
||||
*:SINIX-*:*:*)
|
||||
if uname -p 2>/dev/null >/dev/null ; then
|
||||
UNAME_MACHINE=`(uname -p) 2>/dev/null`
|
||||
echo ${UNAME_MACHINE}-sni-sysv4
|
||||
else
|
||||
echo ns32k-sni-sysv
|
||||
fi
|
||||
exit 0 ;;
|
||||
PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
|
||||
# says <Richard.M.Bartel@ccMail.Census.GOV>
|
||||
echo i586-unisys-sysv4
|
||||
exit 0 ;;
|
||||
*:UNIX_System_V:4*:FTX*)
|
||||
# From Gerald Hewes <hewes@openmarket.com>.
|
||||
# How about differentiating between stratus architectures? -djm
|
||||
echo hppa1.1-stratus-sysv4
|
||||
exit 0 ;;
|
||||
*:*:*:FTX*)
|
||||
# From seanf@swdc.stratus.com.
|
||||
echo i860-stratus-sysv4
|
||||
exit 0 ;;
|
||||
mc68*:A/UX:*:*)
|
||||
echo m68k-apple-aux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
news*:NEWS-OS:*:6*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
|
||||
if [ -d /usr/nec ]; then
|
||||
echo mips-nec-sysv${UNAME_RELEASE}
|
||||
else
|
||||
echo mips-unknown-sysv${UNAME_RELEASE}
|
||||
fi
|
||||
exit 0 ;;
|
||||
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
|
||||
echo powerpc-be-beos
|
||||
exit 0 ;;
|
||||
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
|
||||
echo powerpc-apple-beos
|
||||
exit 0 ;;
|
||||
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
||||
echo i586-pc-beos
|
||||
exit 0 ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SX-5:SUPER-UX:*:*)
|
||||
echo sx5-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Rhapsody:*:*)
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
# include <sys/utsname.h>
|
||||
#endif
|
||||
main ()
|
||||
{
|
||||
#if defined (sony)
|
||||
#if defined (MIPSEB)
|
||||
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
||||
I don't know.... */
|
||||
printf ("mips-sony-bsd\n"); exit (0);
|
||||
#else
|
||||
#include <sys/param.h>
|
||||
printf ("m68k-sony-newsos%s\n",
|
||||
#ifdef NEWSOS4
|
||||
"4"
|
||||
#else
|
||||
""
|
||||
#endif
|
||||
); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__arm) && defined (__acorn) && defined (__unix)
|
||||
printf ("arm-acorn-riscix"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (hp300) && !defined (hpux)
|
||||
printf ("m68k-hp-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (NeXT)
|
||||
#if !defined (__ARCHITECTURE__)
|
||||
#define __ARCHITECTURE__ "m68k"
|
||||
#endif
|
||||
int version;
|
||||
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
||||
if (version < 4)
|
||||
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
||||
else
|
||||
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
||||
exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (MULTIMAX) || defined (n16)
|
||||
#if defined (UMAXV)
|
||||
printf ("ns32k-encore-sysv\n"); exit (0);
|
||||
#else
|
||||
#if defined (CMU)
|
||||
printf ("ns32k-encore-mach\n"); exit (0);
|
||||
#else
|
||||
printf ("ns32k-encore-bsd\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (__386BSD__)
|
||||
printf ("i386-pc-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
#if defined (sequent)
|
||||
#if defined (i386)
|
||||
printf ("i386-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#if defined (ns32000)
|
||||
printf ("ns32k-sequent-dynix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (_SEQUENT_)
|
||||
struct utsname un;
|
||||
|
||||
uname(&un);
|
||||
|
||||
if (strncmp(un.version, "V2", 2) == 0) {
|
||||
printf ("i386-sequent-ptx2\n"); exit (0);
|
||||
}
|
||||
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
||||
printf ("i386-sequent-ptx1\n"); exit (0);
|
||||
}
|
||||
printf ("i386-sequent-ptx\n"); exit (0);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (vax)
|
||||
#if !defined (ultrix)
|
||||
printf ("vax-dec-bsd\n"); exit (0);
|
||||
#else
|
||||
printf ("vax-dec-ultrix\n"); exit (0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined (alliant) && defined (i860)
|
||||
printf ("i860-alliant-bsd\n"); exit (0);
|
||||
#endif
|
||||
|
||||
exit (1);
|
||||
}
|
||||
EOF
|
||||
|
||||
${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
|
||||
|
||||
# Convex versions that predate uname can use getsysinfo(1)
|
||||
|
||||
if [ -x /usr/convex/getsysinfo ]
|
||||
then
|
||||
case `getsysinfo -f cpu_type` in
|
||||
c1*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
c2*)
|
||||
if getsysinfo -f scalar_acc
|
||||
then echo c32-convex-bsd
|
||||
else echo c2-convex-bsd
|
||||
fi
|
||||
exit 0 ;;
|
||||
c34*)
|
||||
echo c34-convex-bsd
|
||||
exit 0 ;;
|
||||
c38*)
|
||||
echo c38-convex-bsd
|
||||
exit 0 ;;
|
||||
c4*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
#echo '(Unable to guess system type)' 1>&2
|
||||
|
||||
exit 1
|
||||
304
config.h.in
Normal file
304
config.h.in
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#undef HAVE_ALLOCA
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define if ALSA is available */
|
||||
#undef HAVE_ALSA
|
||||
|
||||
/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
|
||||
CoreFoundation framework. */
|
||||
#undef HAVE_CFLOCALECOPYCURRENT
|
||||
|
||||
/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
|
||||
the CoreFoundation framework. */
|
||||
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
|
||||
|
||||
/* Define to 1 if you have the `closelog' function. */
|
||||
#undef HAVE_CLOSELOG
|
||||
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* define if we have DirectX includes */
|
||||
#undef HAVE_DIRECTX
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H
|
||||
|
||||
/* Define to 1 if you have the `getopt_long' function. */
|
||||
#undef HAVE_GETOPT_LONG
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define to 1 if you have the `gtk_dialog_get_action_area' function. */
|
||||
#undef HAVE_GTK_DIALOG_GET_ACTION_AREA
|
||||
|
||||
/* Define to 1 if you have the `gtk_dialog_get_content_area' function. */
|
||||
#undef HAVE_GTK_DIALOG_GET_CONTENT_AREA
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_get_allocation' function. */
|
||||
#undef HAVE_GTK_WIDGET_GET_ALLOCATION
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_get_realized' function. */
|
||||
#undef HAVE_GTK_WIDGET_GET_REALIZED
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_get_state' function. */
|
||||
#undef HAVE_GTK_WIDGET_GET_STATE
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_get_window' function. */
|
||||
#undef HAVE_GTK_WIDGET_GET_WINDOW
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_is_drawable' function. */
|
||||
#undef HAVE_GTK_WIDGET_IS_DRAWABLE
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_set_allocation' function. */
|
||||
#undef HAVE_GTK_WIDGET_SET_ALLOCATION
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_set_can_default' function. */
|
||||
#undef HAVE_GTK_WIDGET_SET_CAN_DEFAULT
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_set_can_focus' function. */
|
||||
#undef HAVE_GTK_WIDGET_SET_CAN_FOCUS
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_set_has_window' function. */
|
||||
#undef HAVE_GTK_WIDGET_SET_HAS_WINDOW
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_set_realized' function. */
|
||||
#undef HAVE_GTK_WIDGET_SET_REALIZED
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_set_tooltip_text' function. */
|
||||
#undef HAVE_GTK_WIDGET_SET_TOOLTIP_TEXT
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_set_window' function. */
|
||||
#undef HAVE_GTK_WIDGET_SET_WINDOW
|
||||
|
||||
/* Define to 1 if you have the `gtk_widget_style_attach' function. */
|
||||
#undef HAVE_GTK_WIDGET_STYLE_ATTACH
|
||||
|
||||
/* Define if you have the iconv() function and it works. */
|
||||
#undef HAVE_ICONV
|
||||
|
||||
/* define if struct ifreq has the ifr_newname symbol */
|
||||
#undef HAVE_IFRNEWNAME
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `asound' library (-lasound). */
|
||||
#undef HAVE_LIBASOUND
|
||||
|
||||
/* Define to 1 if you have the `hamlib' library (-lhamlib). */
|
||||
#undef HAVE_LIBHAMLIB
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#undef HAVE_LIBM
|
||||
|
||||
/* Define to 1 if you have the `posix4' library (-lposix4). */
|
||||
#undef HAVE_LIBPOSIX4
|
||||
|
||||
/* Define to 1 if you have the `util' library (-lutil). */
|
||||
#undef HAVE_LIBUTIL
|
||||
|
||||
/* Define to 1 if you have the `uuid' library (-luuid). */
|
||||
#undef HAVE_LIBUUID
|
||||
|
||||
/* Define to 1 if you have the <linux/ax25.h> header file. */
|
||||
#undef HAVE_LINUX_AX25_H
|
||||
|
||||
/* Define to 1 if you have the <linux/hidraw.h> header file. */
|
||||
#undef HAVE_LINUX_HIDRAW_H
|
||||
|
||||
/* Define to 1 if you have the <linux/if.h> header file. */
|
||||
#undef HAVE_LINUX_IF_H
|
||||
|
||||
/* Define to 1 if you have the <linux/ppdev.h> header file. */
|
||||
#undef HAVE_LINUX_PPDEV_H
|
||||
|
||||
/* Define to 1 if you have the <linux/sockios.h> header file. */
|
||||
#undef HAVE_LINUX_SOCKIOS_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* define if struct ifreq has the ifr_newname symbol */
|
||||
#undef HAVE_MKISS
|
||||
|
||||
/* Define to 1 if you have the `mlockall' function. */
|
||||
#undef HAVE_MLOCKALL
|
||||
|
||||
/* Define to 1 if you have the <net/if_arp.h> header file. */
|
||||
#undef HAVE_NET_IF_ARP_H
|
||||
|
||||
/* Define to 1 if you have the `openlog' function. */
|
||||
#undef HAVE_OPENLOG
|
||||
|
||||
/* Define to 1 if you have the `openpty' function. */
|
||||
#undef HAVE_OPENPTY
|
||||
|
||||
/* Define to 1 if you have the <pty.h> header file. */
|
||||
#undef HAVE_PTY_H
|
||||
|
||||
/* Define to 1 if you have the `random' function. */
|
||||
#undef HAVE_RANDOM
|
||||
|
||||
/* Define to 1 if you have the <sched.h> header file. */
|
||||
#undef HAVE_SCHED_H
|
||||
|
||||
/* define if bittypes like int16_t are defined */
|
||||
#undef HAVE_SIGNED_BITTYPES
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#undef HAVE_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <stropts.h> header file. */
|
||||
#undef HAVE_STROPTS_H
|
||||
|
||||
/* Define to 1 if you have the `syslog' function. */
|
||||
#undef HAVE_SYSLOG
|
||||
|
||||
/* Define to 1 if you have the <syslog.h> header file. */
|
||||
#undef HAVE_SYSLOG_H
|
||||
|
||||
/* Define to 1 if you have the <sys/audioio.h> header file. */
|
||||
#undef HAVE_SYS_AUDIOIO_H
|
||||
|
||||
/* Define to 1 if you have the <sys/conf.h> header file. */
|
||||
#undef HAVE_SYS_CONF_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioccom.h> header file. */
|
||||
#undef HAVE_SYS_IOCCOM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/soundcard.h> header file. */
|
||||
#undef HAVE_SYS_SOUNDCARD_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* define if bittypes like u_int16_t are defined */
|
||||
#undef HAVE_UNSIGNED_BITTYPES
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#undef HAVE_VSNPRINTF
|
||||
|
||||
/* Define to 1 if you have the `vsyslog' function. */
|
||||
#undef HAVE_VSYSLOG
|
||||
|
||||
/* define if M_LOG10E is not defined by math.h */
|
||||
#undef M_LOG10E
|
||||
|
||||
/* define if M_PI is not defined by math.h */
|
||||
#undef M_PI
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* various directories */
|
||||
#undef PACKAGE_DATA_DIR
|
||||
|
||||
/* various directories */
|
||||
#undef PACKAGE_LOCALE_DIR
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* various directories */
|
||||
#undef PACKAGE_SOURCE_DIR
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at runtime.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
#undef STACK_DIRECTION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* define if MMX is to be used */
|
||||
#undef USEMMX
|
||||
|
||||
/* define if VIS is to be used */
|
||||
#undef USEVIS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* define if compiling under Windows32 */
|
||||
#undef WIN32
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
672
config.rpath
Executable file
672
config.rpath
Executable file
|
|
@ -0,0 +1,672 @@
|
|||
#! /bin/sh
|
||||
# Output a system dependent set of variables, describing how to set the
|
||||
# run time search path of shared libraries in an executable.
|
||||
#
|
||||
# Copyright 1996-2010 Free Software Foundation, Inc.
|
||||
# Taken from GNU libtool, 2001
|
||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# The first argument passed to this file is the canonical host specification,
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||
# or
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
||||
# should be set by the caller.
|
||||
#
|
||||
# The set of defined variables is at the end of this script.
|
||||
|
||||
# Known limitations:
|
||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
||||
# known workaround is to choose shorter directory names for the build
|
||||
# directory and/or the installation directory.
|
||||
|
||||
# All known linkers require a `.a' archive for static linking (except MSVC,
|
||||
# which needs '.lib').
|
||||
libext=a
|
||||
shrext=.so
|
||||
|
||||
host="$1"
|
||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
||||
# Code taken from libtool.m4's _LT_CC_BASENAME.
|
||||
|
||||
for cc_temp in $CC""; do
|
||||
case $cc_temp in
|
||||
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
|
||||
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
|
||||
\-*) ;;
|
||||
*) break;;
|
||||
esac
|
||||
done
|
||||
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
|
||||
|
||||
# Code taken from libtool.m4's _LT_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
darwin*)
|
||||
case $cc_basename in
|
||||
xlc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
linux* | k*bsd*-gnu)
|
||||
case $cc_basename in
|
||||
ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
icc* | ifort*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
lf95*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
pgcc | pgf77 | pgf90)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
*Sun\ C*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
rdos*)
|
||||
;;
|
||||
solaris*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sunos4*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
sysv4 | sysv4.2uw2* | sysv4.3*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
;;
|
||||
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
unicos*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
uts4*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
if test "$GCC" != yes; then
|
||||
with_gnu_ld=no
|
||||
fi
|
||||
;;
|
||||
interix*)
|
||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
||||
with_gnu_ld=yes
|
||||
;;
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
esac
|
||||
|
||||
ld_shlibs=yes
|
||||
if test "$with_gnu_ld" = yes; then
|
||||
# Set some defaults for GNU ld with shared library support. These
|
||||
# are reset later if shared libraries are not supported. Putting them
|
||||
# here allows them to be overridden if necessary.
|
||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
||||
# option of GNU ld is called -rpath, not --rpath.
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
case "$host_os" in
|
||||
aix[3-9]*)
|
||||
# On AIX/PPC, the GNU linker is very broken
|
||||
if test "$host_cpu" != ia64; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
|
||||
# that the semantics of dynamic libraries on AmigaOS, at least up
|
||||
# to version 4, is to share data among multiple programs linked
|
||||
# with the same dynamic library. Since this doesn't match the
|
||||
# behavior of shared libraries on other platforms, we cannot use
|
||||
# them.
|
||||
ld_shlibs=no
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
interix[3-9]*)
|
||||
hardcode_direct=no
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
gnu* | linux* | k*bsd*-gnu)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
solaris*)
|
||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
||||
ld_shlibs=no
|
||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
|
||||
case `$LD -v 2>&1` in
|
||||
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$ld_shlibs" = no; then
|
||||
hardcode_libdir_flag_spec=
|
||||
fi
|
||||
else
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
||||
# are no directories specified by -L.
|
||||
hardcode_minus_L=yes
|
||||
if test "$GCC" = yes; then
|
||||
# Neither direct hardcoding nor static linking is supported with a
|
||||
# broken collect2.
|
||||
hardcode_direct=unsupported
|
||||
fi
|
||||
;;
|
||||
aix[4-9]*)
|
||||
if test "$host_cpu" = ia64; then
|
||||
# On IA64, the linker does run time linking by default, so we don't
|
||||
# have to do anything special.
|
||||
aix_use_runtimelinking=no
|
||||
else
|
||||
aix_use_runtimelinking=no
|
||||
# Test if we are trying to use run time linking or normal
|
||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
||||
# need to do runtime linking.
|
||||
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
|
||||
for ld_flag in $LDFLAGS; do
|
||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
||||
aix_use_runtimelinking=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_separator=':'
|
||||
if test "$GCC" = yes; then
|
||||
case $host_os in aix4.[012]|aix4.[012].*)
|
||||
collect2name=`${CC} -print-prog-name=collect2`
|
||||
if test -f "$collect2name" && \
|
||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
||||
then
|
||||
# We have reworked collect2
|
||||
:
|
||||
else
|
||||
# We have old collect2
|
||||
hardcode_direct=unsupported
|
||||
hardcode_minus_L=yes
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_libdir_separator=
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
||||
echo 'int main () { return 0; }' > conftest.c
|
||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
||||
}'`
|
||||
fi
|
||||
if test -z "$aix_libpath"; then
|
||||
aix_libpath="/usr/lib:/lib"
|
||||
fi
|
||||
rm -f conftest.c conftest
|
||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
else
|
||||
if test "$host_cpu" = ia64; then
|
||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
||||
else
|
||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
# see comment about different semantics on the GNU ld section
|
||||
ld_shlibs=no
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# When not using gcc, we currently assume that we are using
|
||||
# Microsoft Visual C++.
|
||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||
# no search path for DLLs.
|
||||
hardcode_libdir_flag_spec=' '
|
||||
libext=lib
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
hardcode_direct=no
|
||||
if test "$GCC" = yes ; then
|
||||
:
|
||||
else
|
||||
case $cc_basename in
|
||||
xlc*)
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
freebsd1*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
freebsd2.2*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
freebsd2*)
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
hpux9*)
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
hpux10*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
fi
|
||||
;;
|
||||
hpux11*)
|
||||
if test "$with_gnu_ld" = no; then
|
||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
*)
|
||||
hardcode_direct=yes
|
||||
# hardcode_minus_L: Not really in the search PATH,
|
||||
# but as the default location of the library.
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
netbsd*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
hardcode_direct=yes
|
||||
;;
|
||||
newsos6)
|
||||
hardcode_direct=yes
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
openbsd*)
|
||||
if test -f /usr/libexec/ld.so; then
|
||||
hardcode_direct=yes
|
||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
else
|
||||
case "$host_os" in
|
||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
os2*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
osf3*)
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
osf4* | osf5*)
|
||||
if test "$GCC" = yes; then
|
||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
||||
else
|
||||
# Both cc and cxx compiler support -rpath directly
|
||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
||||
fi
|
||||
hardcode_libdir_separator=:
|
||||
;;
|
||||
solaris*)
|
||||
hardcode_libdir_flag_spec='-R$libdir'
|
||||
;;
|
||||
sunos4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_direct=yes
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
sysv4)
|
||||
case $host_vendor in
|
||||
sni)
|
||||
hardcode_direct=yes # is this really true???
|
||||
;;
|
||||
siemens)
|
||||
hardcode_direct=no
|
||||
;;
|
||||
motorola)
|
||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sysv4.3*)
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
ld_shlibs=yes
|
||||
fi
|
||||
;;
|
||||
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6*)
|
||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
|
||||
hardcode_libdir_separator=':'
|
||||
;;
|
||||
uts4*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
*)
|
||||
ld_shlibs=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Check dynamic linker characteristics
|
||||
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
|
||||
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
|
||||
# only about the one the linker finds when passed -lNAME. This is the last
|
||||
# element of library_names_spec in libtool.m4, or possibly two of them if the
|
||||
# linker has special search rules.
|
||||
library_names_spec= # the last element of library_names_spec in libtool.m4
|
||||
libname_spec='lib$name'
|
||||
case "$host_os" in
|
||||
aix3*)
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
aix[4-9]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
amigaos*)
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
beos*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
bsdi[45]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
shrext=.dll
|
||||
library_names_spec='$libname.dll.a $libname.lib'
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
shrext=.dylib
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
dgux*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
freebsd1*)
|
||||
;;
|
||||
freebsd* | dragonfly*)
|
||||
case "$host_os" in
|
||||
freebsd[123]*)
|
||||
library_names_spec='$libname$shrext$versuffix' ;;
|
||||
*)
|
||||
library_names_spec='$libname$shrext' ;;
|
||||
esac
|
||||
;;
|
||||
gnu*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case $host_cpu in
|
||||
ia64*)
|
||||
shrext=.so
|
||||
;;
|
||||
hppa*64*)
|
||||
shrext=.sl
|
||||
;;
|
||||
*)
|
||||
shrext=.sl
|
||||
;;
|
||||
esac
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
interix[3-9]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
library_names_spec='$libname$shrext'
|
||||
case "$host_os" in
|
||||
irix5* | nonstopux*)
|
||||
libsuff= shlibsuff=
|
||||
;;
|
||||
*)
|
||||
case $LD in
|
||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
||||
*) libsuff= shlibsuff= ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*oldld* | linux*aout* | linux*coff*)
|
||||
;;
|
||||
linux* | k*bsd*-gnu)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
knetbsd*-gnu)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
netbsd*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
newsos6)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
nto-qnx*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
openbsd*)
|
||||
library_names_spec='$libname$shrext$versuffix'
|
||||
;;
|
||||
os2*)
|
||||
libname_spec='$name'
|
||||
shrext=.dll
|
||||
library_names_spec='$libname.a'
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
rdos*)
|
||||
;;
|
||||
solaris*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sunos4*)
|
||||
library_names_spec='$libname$shrext$versuffix'
|
||||
;;
|
||||
sysv4 | sysv4.3*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sysv4*MP*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
uts4*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
esac
|
||||
|
||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
||||
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
||||
|
||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
||||
|
||||
# How to pass a linker flag through the compiler.
|
||||
wl="$escaped_wl"
|
||||
|
||||
# Static library suffix (normally "a").
|
||||
libext="$libext"
|
||||
|
||||
# Shared library suffix (normally "so").
|
||||
shlibext="$shlibext"
|
||||
|
||||
# Format of library name prefix.
|
||||
libname_spec="$escaped_libname_spec"
|
||||
|
||||
# Library names that the linker finds when passed -lNAME.
|
||||
library_names_spec="$escaped_library_names_spec"
|
||||
|
||||
# Flag to hardcode \$libdir into a binary during linking.
|
||||
# This must work even if \$libdir does not exist.
|
||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
||||
|
||||
# Whether we need a single -rpath flag with a separated argument.
|
||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
||||
|
||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_direct="$hardcode_direct"
|
||||
|
||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
||||
# resulting binary.
|
||||
hardcode_minus_L="$hardcode_minus_L"
|
||||
|
||||
EOF
|
||||
1579
config.sub
vendored
Executable file
1579
config.sub
vendored
Executable file
File diff suppressed because it is too large
Load diff
0
configapp/AUTHORS
Normal file
0
configapp/AUTHORS
Normal file
340
configapp/COPYING
Normal file
340
configapp/COPYING
Normal file
|
|
@ -0,0 +1,340 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
0
configapp/ChangeLog
Normal file
0
configapp/ChangeLog
Normal file
182
configapp/INSTALL
Normal file
182
configapp/INSTALL
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
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, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
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 at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' 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. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
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 supports 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=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH 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=PATH' 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' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
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 host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
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.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--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.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
26
configapp/Makefile.am
Normal file
26
configapp/Makefile.am
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = src
|
||||
|
||||
#install-data-local:
|
||||
# @$(NORMAL_INSTALL)
|
||||
# if test -d $(srcdir)/pixmaps; then \
|
||||
# $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
|
||||
# for pixmap in $(srcdir)/pixmaps/*; do \
|
||||
# if test -f $$pixmap; then \
|
||||
# $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
|
||||
# fi \
|
||||
# done \
|
||||
# fi
|
||||
|
||||
#dist-hook:
|
||||
# if test -d pixmaps; then \
|
||||
# mkdir $(distdir)/pixmaps; \
|
||||
# for pixmap in pixmaps/*; do \
|
||||
# if test -f $$pixmap; then \
|
||||
# cp -p $$pixmap $(distdir)/pixmaps; \
|
||||
# fi \
|
||||
# done \
|
||||
# fi
|
||||
|
||||
EXTRA_DIST = configapp.glade option1.png option1.xpm option2.png option2.xpm
|
||||
609
configapp/Makefile.in
Normal file
609
configapp/Makefile.in
Normal file
|
|
@ -0,0 +1,609 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = configapp
|
||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||
AUTHORS COPYING ChangeLog INSTALL NEWS
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
|
||||
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
|
||||
distdir
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
|
||||
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
HAVE_ALSA = @HAVE_ALSA@
|
||||
HAVE_BITTYPES = @HAVE_BITTYPES@
|
||||
HAVE_DIRECTX = @HAVE_DIRECTX@
|
||||
HAVE_IFRNEWNAME = @HAVE_IFRNEWNAME@
|
||||
HAVE_MKISS = @HAVE_MKISS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
M_PI = @M_PI@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USEMMX = @USEMMX@
|
||||
USEVIS = @USEVIS@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WIN32 = @WIN32@
|
||||
WINDRES = @WINDRES@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = src
|
||||
|
||||
#install-data-local:
|
||||
# @$(NORMAL_INSTALL)
|
||||
# if test -d $(srcdir)/pixmaps; then \
|
||||
# $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
|
||||
# for pixmap in $(srcdir)/pixmaps/*; do \
|
||||
# if test -f $$pixmap; then \
|
||||
# $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
|
||||
# fi \
|
||||
# done \
|
||||
# fi
|
||||
|
||||
#dist-hook:
|
||||
# if test -d pixmaps; then \
|
||||
# mkdir $(distdir)/pixmaps; \
|
||||
# for pixmap in pixmaps/*; do \
|
||||
# if test -f $$pixmap; then \
|
||||
# cp -p $$pixmap $(distdir)/pixmaps; \
|
||||
# fi \
|
||||
# done \
|
||||
# fi
|
||||
EXTRA_DIST = configapp.glade option1.png option1.xpm option2.png option2.xpm
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu configapp/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu configapp/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@fail= failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
*=* | --[!k]*);; \
|
||||
*k*) failcom='fail=yes';; \
|
||||
esac; \
|
||||
done; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
|
||||
install-am install-strip tags-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am check check-am clean clean-generic ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-tags \
|
||||
distdir dvi dvi-am html html-am info info-am install \
|
||||
install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
|
||||
tags-recursive uninstall uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
0
configapp/NEWS
Normal file
0
configapp/NEWS
Normal file
0
configapp/README
Normal file
0
configapp/README
Normal file
1630
configapp/configapp.glade
Normal file
1630
configapp/configapp.glade
Normal file
File diff suppressed because it is too large
Load diff
BIN
configapp/option1.png
Normal file
BIN
configapp/option1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 413 B |
58
configapp/option1.xpm
Normal file
58
configapp/option1.xpm
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/* XPM */
|
||||
static char * option1_xpm[] = {
|
||||
"10 10 45 1",
|
||||
" c None",
|
||||
". c #252525",
|
||||
"+ c #2D2D2D",
|
||||
"@ c #323232",
|
||||
"# c #313131",
|
||||
"$ c #292929",
|
||||
"% c #303030",
|
||||
"& c #322E2A",
|
||||
"* c #2E251D",
|
||||
"= c #261F19",
|
||||
"- c #2C2A29",
|
||||
"; c #2A2927",
|
||||
"> c #414141",
|
||||
", c #6A6057",
|
||||
"' c #6A5947",
|
||||
") c #5D4730",
|
||||
"! c #4B331B",
|
||||
"~ c #35200A",
|
||||
"{ c #302D29",
|
||||
"] c #2F2C29",
|
||||
"^ c #FFFFFF",
|
||||
"/ c #9A7C5E",
|
||||
"( c #835F3B",
|
||||
"_ c #704A23",
|
||||
": c #583410",
|
||||
"< c #402B16",
|
||||
"[ c #34302C",
|
||||
"} c #A1784F",
|
||||
"| c #9B6A39",
|
||||
"1 c #8D5924",
|
||||
"2 c #744312",
|
||||
"3 c #5D350E",
|
||||
"4 c #333231",
|
||||
"5 c #A56A2F",
|
||||
"6 c #9B6022",
|
||||
"7 c #8A4F14",
|
||||
"8 c #6F4011",
|
||||
"9 c #FFC55F",
|
||||
"0 c #905517",
|
||||
"a c #64401B",
|
||||
"b c #3C352E",
|
||||
"c c #864D15",
|
||||
"d c #3F352C",
|
||||
"e c #483D31",
|
||||
"f c #463B2F",
|
||||
" .+@#$. ",
|
||||
" $#%&*=-; ",
|
||||
".#>,')!~{]",
|
||||
"+%,^/(_:<[",
|
||||
"@&'/}|1234",
|
||||
"#*)(|56784",
|
||||
"$=!_1690ab",
|
||||
".-~:270cde",
|
||||
" ;{<38adf ",
|
||||
" ][44be "};
|
||||
BIN
configapp/option2.png
Normal file
BIN
configapp/option2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 433 B |
100
configapp/option2.xpm
Normal file
100
configapp/option2.xpm
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
/* XPM */
|
||||
static char * option2_xpm[] = {
|
||||
"10 10 87 1",
|
||||
" c None",
|
||||
". c #AF2B13",
|
||||
"+ c #B33A1B",
|
||||
"@ c #C44721",
|
||||
"# c #C2451F",
|
||||
"$ c #AF3216",
|
||||
"% c #AA3016",
|
||||
"& c #D0491F",
|
||||
"* c #E5531E",
|
||||
"= c #EE5517",
|
||||
"- c #ED400D",
|
||||
"; c #DF2E0B",
|
||||
"> c #CB3A16",
|
||||
", c #AA3015",
|
||||
"' c #B52C13",
|
||||
") c #D54C1F",
|
||||
"! c #F3863A",
|
||||
"~ c #FCD56F",
|
||||
"{ c #FDD047",
|
||||
"] c #FDAC1E",
|
||||
"^ c #FA710C",
|
||||
"/ c #EF3605",
|
||||
"( c #D34216",
|
||||
"_ c #C23A16",
|
||||
": c #BE3C1B",
|
||||
"< c #EA551E",
|
||||
"[ c #FCD76F",
|
||||
"} c #FFFFFF",
|
||||
"| c #FEF680",
|
||||
"1 c #FEE42E",
|
||||
"2 c #FEBE11",
|
||||
"3 c #FC7607",
|
||||
"4 c #EF4909",
|
||||
"5 c #C7421A",
|
||||
"6 c #D04C21",
|
||||
"7 c #F25A17",
|
||||
"8 c #FDD347",
|
||||
"9 c #FEF780",
|
||||
"0 c #FEF75A",
|
||||
"a c #FEF12B",
|
||||
"b c #FEDF12",
|
||||
"c c #FDA807",
|
||||
"d c #F96C06",
|
||||
"e c #D24C1F",
|
||||
"f c #D34C1F",
|
||||
"g c #F3470D",
|
||||
"h c #FDB31E",
|
||||
"i c #FEE62E",
|
||||
"j c #FEF22B",
|
||||
"k c #FEF21D",
|
||||
"l c #FEE710",
|
||||
"m c #FEC408",
|
||||
"n c #FB8B07",
|
||||
"o c #D54E1F",
|
||||
"p c #C43816",
|
||||
"q c #EB360B",
|
||||
"r c #FC7B0C",
|
||||
"s c #FEC411",
|
||||
"t c #FEE112",
|
||||
"u c #FEE810",
|
||||
"v c #FFFE83",
|
||||
"w c #FDC90A",
|
||||
"x c #F9860C",
|
||||
"y c #D8531C",
|
||||
"z c #C63213",
|
||||
"A c #DE4216",
|
||||
"B c #F63E05",
|
||||
"C c #FD8007",
|
||||
"D c #FEAF07",
|
||||
"E c #FEC708",
|
||||
"F c #FECB0A",
|
||||
"G c #FDAC09",
|
||||
"H c #E95D1A",
|
||||
"I c #E4691F",
|
||||
"J c #C43615",
|
||||
"K c #E44C16",
|
||||
"L c #F55309",
|
||||
"M c #FB7406",
|
||||
"N c #FC9007",
|
||||
"O c #FA880C",
|
||||
"P c #EB5F1A",
|
||||
"Q c #DF5F1D",
|
||||
"R c #D54016",
|
||||
"S c #D7491A",
|
||||
"T c #DF531F",
|
||||
"U c #DE551C",
|
||||
"V c #E7691F",
|
||||
" .+@#$. ",
|
||||
" %&*=-;>, ",
|
||||
"')!~{]^/(_",
|
||||
":<[}|12345",
|
||||
"67890abcde",
|
||||
"fghijklmno",
|
||||
"pqrstuvwxy",
|
||||
"zABCDEFGHI",
|
||||
" JKLMNOPQ ",
|
||||
" RSTTUV "};
|
||||
41
configapp/src/Makefile.am
Normal file
41
configapp/src/Makefile.am
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
INCLUDES = @GTK_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/matlib -I$(top_srcdir)/libmisc \
|
||||
-I$(top_srcdir)/soundcard -I$(top_srcdir)/directx/include -I$(top_srcdir)/directx/include/directx6 \
|
||||
-I$(top_srcdir)/configapp
|
||||
|
||||
man_MANS = soundmodemconfig.8
|
||||
|
||||
if WIN32
|
||||
#MWINDOWS = -mwindows
|
||||
MWINDOWS =
|
||||
RCOBJ = configapp.res
|
||||
else
|
||||
MWINDOWS =
|
||||
RCOBJ =
|
||||
endif
|
||||
|
||||
MODEMLIBS = ../../afsk/libafsk.a ../../fsk/libfsk.a ../../pammodem/libpam.a ../../pskmodem/libpsk.a ../../newqpsk/libnewqpsk.a ../../p3dmodem/libp3d.a
|
||||
|
||||
bin_PROGRAMS = soundmodemconfig
|
||||
|
||||
if WIN32
|
||||
configapp.res: configapp.rc
|
||||
$(WINDRES) $< -O coff -o $@
|
||||
endif
|
||||
|
||||
soundmodemconfig_SOURCES = \
|
||||
main.c app.c diag.c configapp.h \
|
||||
support.c support.h \
|
||||
interface.c interface.h \
|
||||
callbacks.h \
|
||||
spectrum.c spectrum.h \
|
||||
scope.c scope.h \
|
||||
snm-compat-gtk2.h
|
||||
|
||||
soundmodemconfig_LDADD = ../../soundcard/liblog.a ../../soundcard/libaudioio.a ../../soundcard/libpttio.a \
|
||||
$(MODEMLIBS) ../../matlib/libmat.a ../../libmisc/libmisc.a ../../soundcard/libcommon.a \
|
||||
@LIBTHREAD@ @GTK_LIBS@ @XML_LIBS@ @AUDIOFILE_LIBS@ @ALSA_LIBS@ $(RCOBJ)
|
||||
soundmodemconfig_LDFLAGS = $(MWINDOWS)
|
||||
|
||||
EXTRA_DIST = configapp.rc soundmodemconfig.8
|
||||
640
configapp/src/Makefile.in
Normal file
640
configapp/src/Makefile.in
Normal file
|
|
@ -0,0 +1,640 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
bin_PROGRAMS = soundmodemconfig$(EXEEXT)
|
||||
subdir = configapp/src
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_soundmodemconfig_OBJECTS = main.$(OBJEXT) app.$(OBJEXT) \
|
||||
diag.$(OBJEXT) support.$(OBJEXT) interface.$(OBJEXT) \
|
||||
spectrum.$(OBJEXT) scope.$(OBJEXT)
|
||||
soundmodemconfig_OBJECTS = $(am_soundmodemconfig_OBJECTS)
|
||||
@WIN32_TRUE@am__DEPENDENCIES_1 = configapp.res
|
||||
soundmodemconfig_DEPENDENCIES = ../../soundcard/liblog.a \
|
||||
../../soundcard/libaudioio.a ../../soundcard/libpttio.a \
|
||||
$(MODEMLIBS) ../../matlib/libmat.a ../../libmisc/libmisc.a \
|
||||
../../soundcard/libcommon.a $(am__DEPENDENCIES_1)
|
||||
soundmodemconfig_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(soundmodemconfig_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(soundmodemconfig_SOURCES)
|
||||
DIST_SOURCES = $(soundmodemconfig_SOURCES)
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
man8dir = $(mandir)/man8
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
|
||||
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
HAVE_ALSA = @HAVE_ALSA@
|
||||
HAVE_BITTYPES = @HAVE_BITTYPES@
|
||||
HAVE_DIRECTX = @HAVE_DIRECTX@
|
||||
HAVE_IFRNEWNAME = @HAVE_IFRNEWNAME@
|
||||
HAVE_MKISS = @HAVE_MKISS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
M_PI = @M_PI@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USEMMX = @USEMMX@
|
||||
USEVIS = @USEVIS@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WIN32 = @WIN32@
|
||||
WINDRES = @WINDRES@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = @GTK_CFLAGS@ @XML_CFLAGS@ -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/matlib -I$(top_srcdir)/libmisc \
|
||||
-I$(top_srcdir)/soundcard -I$(top_srcdir)/directx/include -I$(top_srcdir)/directx/include/directx6 \
|
||||
-I$(top_srcdir)/configapp
|
||||
|
||||
man_MANS = soundmodemconfig.8
|
||||
@WIN32_FALSE@MWINDOWS =
|
||||
|
||||
#MWINDOWS = -mwindows
|
||||
@WIN32_TRUE@MWINDOWS =
|
||||
@WIN32_FALSE@RCOBJ =
|
||||
@WIN32_TRUE@RCOBJ = configapp.res
|
||||
MODEMLIBS = ../../afsk/libafsk.a ../../fsk/libfsk.a ../../pammodem/libpam.a ../../pskmodem/libpsk.a ../../newqpsk/libnewqpsk.a ../../p3dmodem/libp3d.a
|
||||
soundmodemconfig_SOURCES = \
|
||||
main.c app.c diag.c configapp.h \
|
||||
support.c support.h \
|
||||
interface.c interface.h \
|
||||
callbacks.h \
|
||||
spectrum.c spectrum.h \
|
||||
scope.c scope.h \
|
||||
snm-compat-gtk2.h
|
||||
|
||||
soundmodemconfig_LDADD = ../../soundcard/liblog.a ../../soundcard/libaudioio.a ../../soundcard/libpttio.a \
|
||||
$(MODEMLIBS) ../../matlib/libmat.a ../../libmisc/libmisc.a ../../soundcard/libcommon.a \
|
||||
@LIBTHREAD@ @GTK_LIBS@ @XML_LIBS@ @AUDIOFILE_LIBS@ @ALSA_LIBS@ $(RCOBJ)
|
||||
|
||||
soundmodemconfig_LDFLAGS = $(MWINDOWS)
|
||||
EXTRA_DIST = configapp.rc soundmodemconfig.8
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu configapp/src/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu configapp/src/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p; \
|
||||
then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' `; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
soundmodemconfig$(EXEEXT): $(soundmodemconfig_OBJECTS) $(soundmodemconfig_DEPENDENCIES)
|
||||
@rm -f soundmodemconfig$(EXEEXT)
|
||||
$(soundmodemconfig_LINK) $(soundmodemconfig_OBJECTS) $(soundmodemconfig_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/app.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diag.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scope.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spectrum.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
install-man8: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
|
||||
@list=''; test -n "$(man8dir)" || exit 0; \
|
||||
{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.8[a-z]*$$/p'; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man8:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man8dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.8[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
test -z "$$files" || { \
|
||||
echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@list='$(MANS)'; if test -n "$$list"; then \
|
||||
list=`for p in $$list; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
|
||||
if test -n "$$list" && \
|
||||
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
|
||||
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
|
||||
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
|
||||
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
|
||||
echo " typically \`make maintainer-clean' will remove them" >&2; \
|
||||
exit 1; \
|
||||
else :; fi; \
|
||||
else :; fi
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS) $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man8dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man8
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man8
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic ctags distclean distclean-compile \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-man8 \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-binPROGRAMS \
|
||||
uninstall-man uninstall-man8
|
||||
|
||||
|
||||
@WIN32_TRUE@configapp.res: configapp.rc
|
||||
@WIN32_TRUE@ $(WINDRES) $< -O coff -o $@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
1049
configapp/src/app.c
Normal file
1049
configapp/src/app.c
Normal file
File diff suppressed because it is too large
Load diff
155
configapp/src/callbacks.h
Normal file
155
configapp/src/callbacks.h
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
#include <gtk/gtk.h>
|
||||
|
||||
|
||||
gboolean
|
||||
on_mainwindow_destroy_event (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data);
|
||||
|
||||
gboolean
|
||||
on_mainwindow_delete_event (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_new_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_newconfiguration_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_newchannel_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_deleteconfiguration_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_deletechannel_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_quit_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_diagscope_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_diagspectrum_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_diagtransmit_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_diagreceive_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_about_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_configtree_cursor_changed (GtkTreeView *tree_view,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_new_configuration_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_comboentry2_changed (GtkEditable *editable,
|
||||
gpointer user_data);
|
||||
|
||||
gboolean
|
||||
on_wspec_delete_event (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data);
|
||||
|
||||
gboolean
|
||||
on_spec_button_press_event (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer user_data);
|
||||
|
||||
gboolean
|
||||
on_spec_motion_event (GtkWidget *widget,
|
||||
GdkEventMotion *event,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_ptt_toggled (GtkToggleButton *togglebutton,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_clearbutton_clicked (GtkButton *button,
|
||||
gpointer user_data);
|
||||
|
||||
gboolean
|
||||
on_specwindow_delete_event (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data);
|
||||
|
||||
gboolean
|
||||
on_scopewindow_delete_event (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_dcdfreeze_toggled (GtkToggleButton *togglebutton,
|
||||
gpointer user_data);
|
||||
|
||||
gboolean
|
||||
on_receivewindow_delete_event (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_dcd_toggled (GtkToggleButton *togglebutton,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_diagmodem_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
GtkWidget*
|
||||
create_led_pixmap (gchar *widget_name, gchar *string1, gchar *string2,
|
||||
gint int1, gint int2);
|
||||
|
||||
GtkWidget*
|
||||
create_led_pixmap (gchar *widget_name, gchar *string1, gchar *string2,
|
||||
gint int1, gint int2);
|
||||
|
||||
GtkWidget*
|
||||
create_led_pixmap (gchar *widget_name, gchar *string1, gchar *string2,
|
||||
gint int1, gint int2);
|
||||
|
||||
GtkWidget*
|
||||
create_led_pixmap (gchar *widget_name, gchar *string1, gchar *string2,
|
||||
gint int1, gint int2);
|
||||
|
||||
GtkWidget*
|
||||
create_led_pixmap (gchar *widget_name, gchar *string1, gchar *string2,
|
||||
gint int1, gint int2);
|
||||
|
||||
GtkWidget*
|
||||
create_led_pixmap (gchar *widget_name, gchar *string1, gchar *string2,
|
||||
gint int1, gint int2);
|
||||
|
||||
gboolean
|
||||
on_p3dwindow_delete_event (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_diagp3dmodem_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
on_diagpassall_activate (GtkMenuItem *menuitem,
|
||||
gpointer user_data);
|
||||
71
configapp/src/configapp.h
Normal file
71
configapp/src/configapp.h
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* configapp.h -- Configuration Application Header File.
|
||||
*
|
||||
* Copyright (C) 2000
|
||||
* Thomas Sailer (sailer@ife.ee.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifndef _CONFIGAPP_H
|
||||
#define _CONFIGAPP_H
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _REENTRANT
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "modem.h"
|
||||
#include "soundio.h"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
extern struct modulator modchain_x;
|
||||
extern struct demodulator demodchain_x;
|
||||
extern struct modemparams chaccparams_x[];
|
||||
extern struct modemparams pktkissparams_x[];
|
||||
extern struct modemparams pktmkissparams_x[];
|
||||
extern struct modemparams ioparam_type[];
|
||||
|
||||
extern GtkWidget *mainwindow, *specwindow, *scopewindow, *receivewindow, *p3dwindow;
|
||||
extern GtkTreeModel *configmodel;
|
||||
extern void new_configuration(const gchar *name);
|
||||
extern void new_channel(const gchar *cfgname, const gchar *name);
|
||||
extern void renumber_channels(void);
|
||||
extern void error_dialog(const gchar *text);
|
||||
extern int xml_newconfig(const char *newname);
|
||||
extern const char *xml_newchannel(const char *cfgname);
|
||||
extern int xml_deleteconfig(const char *newname);
|
||||
extern int xml_deletechannel(const char *cfgname, const char *chname);
|
||||
extern int xml_setprop(const char *cfgname, const char *chname, const char *typname, const char *propname, const char *data);
|
||||
extern int xml_getprop(const char *cfgname, const char *chname, const char *typname, const char *propname, char *buf, unsigned int bufsz);
|
||||
extern GtkTreeModel *create_configmodel(void);
|
||||
|
||||
/* diagnostics stuff */
|
||||
extern void diag_stop(void);
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
#endif /* _CONFIGAPP_H */
|
||||
40
configapp/src/configapp.rc
Normal file
40
configapp/src/configapp.rc
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#include <windows.h>
|
||||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x0L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "\0"
|
||||
VALUE "CompanyName", "HB9JNX/AE4WA\0"
|
||||
VALUE "FileDescription", "SoundModem Configurator\0"
|
||||
VALUE "FileVersion", "1, 0, 0, 1\0"
|
||||
VALUE "InternalName", "soundmodemconfig\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1999-2000\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "soundmodemconfig.exe\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "SoundModem\0"
|
||||
VALUE "ProductVersion", "1.00a\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
885
configapp/src/diag.c
Normal file
885
configapp/src/diag.c
Normal file
|
|
@ -0,0 +1,885 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* diag.c -- Configuration Application, diagnostic part.
|
||||
*
|
||||
* Copyright (C) 2000
|
||||
* Thomas Sailer (sailer@ife.ee.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _REENTRANT
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "configapp.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "interface.h"
|
||||
#include "support.h"
|
||||
#include "callbacks.h"
|
||||
|
||||
#include "spectrum.h"
|
||||
#include "scope.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
#include "option1.xpm"
|
||||
#include "option2.xpm"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
//#ifdef WIN32
|
||||
#define TXTERMNOCANCEL
|
||||
//#endif
|
||||
|
||||
|
||||
#define DIAGFLG_MODEM 1
|
||||
#define DIAGFLG_SCOPE 2
|
||||
#define DIAGFLG_SPECTRUM 4
|
||||
#define DIAGFLG_RECEIVE 8
|
||||
#define DIAGFLG_P3DRECEIVE 16
|
||||
#define DIAGFLG_WINDOWMASK (DIAGFLG_P3DRECEIVE|DIAGFLG_RECEIVE|DIAGFLG_SCOPE|DIAGFLG_SPECTRUM)
|
||||
|
||||
static struct {
|
||||
unsigned int flags;
|
||||
struct modulator *modch;
|
||||
struct demodulator *demodch;
|
||||
const char *cfgname;
|
||||
const char *chname;
|
||||
guint timeoutid;
|
||||
unsigned int samplerate;
|
||||
struct {
|
||||
unsigned int newstate;
|
||||
unsigned int state;
|
||||
unsigned int carrierfreq;
|
||||
unsigned int newpacket;
|
||||
u_int16_t crc;
|
||||
unsigned char packet[512+2];
|
||||
} p3d;
|
||||
int dcd, upddcd, dcdfreeze;
|
||||
int ptt, updptt, pttthr, updpttthr;
|
||||
unsigned int count0, count1, updcount;
|
||||
unsigned int rxwr, rxrd;
|
||||
unsigned char rxbuf[1024];
|
||||
/* HDLC receiver */
|
||||
struct {
|
||||
unsigned int bitbuf, bitstream, numbits, state, passall;
|
||||
unsigned char *bufptr;
|
||||
int bufcnt;
|
||||
unsigned char buf[RXBUFFER_SIZE];
|
||||
} hrx;
|
||||
unsigned int traceupd;
|
||||
void *modstate, *demodstate;
|
||||
unsigned int bitrate;
|
||||
pthread_cond_t txcond;
|
||||
pthread_mutex_t txmutex;
|
||||
pthread_t rxthread, txthread;
|
||||
struct pttio pttio;
|
||||
struct audioio *audioio;
|
||||
#ifdef TXTERMNOCANCEL
|
||||
unsigned int txterminate;
|
||||
#endif
|
||||
} diagstate = {
|
||||
0, &modchain_x, &demodchain_x, NULL, NULL, 0,
|
||||
0, { 0, 0, 0, 0, },
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, { 0, },
|
||||
{ 0, 0, 0, 0, 0, },
|
||||
0,
|
||||
NULL, NULL, 0,
|
||||
PTHREAD_COND_INITIALIZER, PTHREAD_MUTEX_INITIALIZER,
|
||||
#if 0
|
||||
/* gcc3 no longer accepts {} as initializer */
|
||||
{ }, { },
|
||||
#endif
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
/*
|
||||
* the CRC routines are stolen from WAMPES
|
||||
* by Dieter Deyke
|
||||
*/
|
||||
|
||||
const u_int16_t crc_ccitt_table[0x100] = {
|
||||
0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
|
||||
0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
|
||||
0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
|
||||
0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876,
|
||||
0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd,
|
||||
0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5,
|
||||
0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c,
|
||||
0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974,
|
||||
0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb,
|
||||
0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3,
|
||||
0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a,
|
||||
0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72,
|
||||
0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9,
|
||||
0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1,
|
||||
0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738,
|
||||
0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70,
|
||||
0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7,
|
||||
0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff,
|
||||
0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036,
|
||||
0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e,
|
||||
0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5,
|
||||
0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd,
|
||||
0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134,
|
||||
0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c,
|
||||
0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3,
|
||||
0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb,
|
||||
0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232,
|
||||
0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a,
|
||||
0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1,
|
||||
0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9,
|
||||
0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
|
||||
0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static inline u_int16_t calc_crc_ccitt(const u_int8_t *buffer, int len)
|
||||
{
|
||||
u_int16_t crc = 0xffff;
|
||||
|
||||
for (;len>0;len--)
|
||||
crc = (crc >> 8) ^ crc_ccitt_table[(crc ^ *buffer++) & 0xff];
|
||||
crc ^= 0xffff;
|
||||
return crc;
|
||||
}
|
||||
|
||||
static inline void append_crc_ccitt(u_int8_t *buffer, int len)
|
||||
{
|
||||
u_int16_t crc = calc_crc_ccitt(buffer, len);
|
||||
buffer[len] = crc;
|
||||
buffer[len+1] = crc >> 8;
|
||||
}
|
||||
|
||||
static inline int check_crc_ccitt(const u_int8_t *buffer, int len)
|
||||
{
|
||||
u_int16_t crc = calc_crc_ccitt(buffer, len);
|
||||
return (crc & 0xffff) == 0x0f47;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static void do_rxpacket(void)
|
||||
{
|
||||
if (diagstate.hrx.bufcnt < 3)
|
||||
return;
|
||||
#if 1
|
||||
if (!diagstate.hrx.passall && !check_crc_ccitt(diagstate.hrx.buf, diagstate.hrx.bufcnt))
|
||||
return;
|
||||
#endif
|
||||
{
|
||||
GtkTextView *view;
|
||||
GtkTextBuffer *model;
|
||||
char buf[512];
|
||||
int i, len;
|
||||
len = snprintpkt(buf, sizeof(buf), diagstate.hrx.buf, diagstate.hrx.bufcnt-2);
|
||||
for (i = 0; i < len; i++) {
|
||||
if (!g_ascii_isprint(buf[i]) &&
|
||||
!g_ascii_isspace(buf[i]))
|
||||
buf[i] = '*';
|
||||
}
|
||||
|
||||
g_printerr("Packet: %s\n", buf);
|
||||
view = GTK_TEXT_VIEW(g_object_get_data(G_OBJECT(receivewindow), "packettext"));
|
||||
model = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view));
|
||||
gtk_text_buffer_insert_at_cursor(model, buf, len);
|
||||
gtk_text_view_scroll_mark_onscreen(view, gtk_text_buffer_get_insert(model));
|
||||
}
|
||||
}
|
||||
|
||||
#define DECODEITERA(j) \
|
||||
do { \
|
||||
if (!(notbitstream & (0x0fc << j))) /* flag or abort */ \
|
||||
goto flgabrt##j; \
|
||||
if ((bitstream & (0x1f8 << j)) == (0xf8 << j)) /* stuffed bit */ \
|
||||
goto stuff##j; \
|
||||
enditer##j:; \
|
||||
} while (0)
|
||||
|
||||
#define DECODEITERB(j) \
|
||||
do { \
|
||||
flgabrt##j: \
|
||||
if (!(notbitstream & (0x1fc << j))) { /* abort received */ \
|
||||
state = 0; \
|
||||
goto enditer##j; \
|
||||
} \
|
||||
if ((bitstream & (0x1fe << j)) != (0x0fc << j)) /* flag received */ \
|
||||
goto enditer##j; \
|
||||
if (state) \
|
||||
do_rxpacket(); \
|
||||
diagstate.hrx.bufcnt = 0; \
|
||||
diagstate.hrx.bufptr = diagstate.hrx.buf; \
|
||||
state = 1; \
|
||||
numbits = 7-j; \
|
||||
goto enditer##j; \
|
||||
stuff##j: \
|
||||
numbits--; \
|
||||
bitbuf = (bitbuf & ((~0xff) << j)) | ((bitbuf & ~((~0xff) << j)) << 1); \
|
||||
goto enditer##j; \
|
||||
} while (0)
|
||||
|
||||
static inline void hdlc_receive(const unsigned char *data, unsigned nrbytes)
|
||||
{
|
||||
unsigned bits, bitbuf, notbitstream, bitstream, numbits, state;
|
||||
|
||||
/* start of HDLC decoder */
|
||||
numbits = diagstate.hrx.numbits;
|
||||
state = diagstate.hrx.state;
|
||||
bitstream = diagstate.hrx.bitstream;
|
||||
bitbuf = diagstate.hrx.bitbuf;
|
||||
while (nrbytes > 0) {
|
||||
bits = *data++;
|
||||
nrbytes--;
|
||||
bitstream >>= 8;
|
||||
bitstream |= ((unsigned int)bits) << 8;
|
||||
bitbuf >>= 8;
|
||||
bitbuf |= ((unsigned int)bits) << 8;
|
||||
numbits += 8;
|
||||
notbitstream = ~bitstream;
|
||||
DECODEITERA(0);
|
||||
DECODEITERA(1);
|
||||
DECODEITERA(2);
|
||||
DECODEITERA(3);
|
||||
DECODEITERA(4);
|
||||
DECODEITERA(5);
|
||||
DECODEITERA(6);
|
||||
DECODEITERA(7);
|
||||
goto enddec;
|
||||
DECODEITERB(0);
|
||||
DECODEITERB(1);
|
||||
DECODEITERB(2);
|
||||
DECODEITERB(3);
|
||||
DECODEITERB(4);
|
||||
DECODEITERB(5);
|
||||
DECODEITERB(6);
|
||||
DECODEITERB(7);
|
||||
enddec:
|
||||
while (state && numbits >= 8) {
|
||||
if (diagstate.hrx.bufcnt >= RXBUFFER_SIZE) {
|
||||
state = 0;
|
||||
} else {
|
||||
*(diagstate.hrx.bufptr)++ = bitbuf >> (16-numbits);
|
||||
diagstate.hrx.bufcnt++;
|
||||
numbits -= 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
diagstate.hrx.numbits = numbits;
|
||||
diagstate.hrx.state = state;
|
||||
diagstate.hrx.bitstream = bitstream;
|
||||
diagstate.hrx.bitbuf = bitbuf;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void p3dreceive(struct modemchannel *chan, const unsigned char *pkt, u_int16_t crc)
|
||||
{
|
||||
memcpy(diagstate.p3d.packet, pkt, 512+2);
|
||||
diagstate.p3d.crc = crc;
|
||||
diagstate.p3d.newpacket = 1;
|
||||
}
|
||||
|
||||
void p3drxstate(struct modemchannel *chan, unsigned int synced, unsigned int carrierfreq)
|
||||
{
|
||||
diagstate.p3d.state = synced;
|
||||
diagstate.p3d.carrierfreq = carrierfreq;
|
||||
diagstate.p3d.newstate = 1;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static inline unsigned int hweight8(unsigned int w)
|
||||
{
|
||||
unsigned int res = (w & 0x55) + ((w >> 1) & 0x55);
|
||||
res = (res & 0x33) + ((res >> 2) & 0x33);
|
||||
return (res & 0x0F) + ((res >> 4) & 0x0F);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void audiowrite(struct modemchannel *chan, const int16_t *samples, unsigned int nr)
|
||||
{
|
||||
if (!diagstate.audioio->write)
|
||||
return;
|
||||
diagstate.audioio->write(diagstate.audioio, samples, nr);
|
||||
}
|
||||
|
||||
void audioread(struct modemchannel *chan, int16_t *samples, unsigned int nr, u_int16_t tim)
|
||||
{
|
||||
if (!diagstate.audioio->read) {
|
||||
pthread_exit(NULL);
|
||||
return;
|
||||
}
|
||||
diagstate.audioio->read(diagstate.audioio, samples, nr, tim);
|
||||
}
|
||||
|
||||
u_int16_t audiocurtime(struct modemchannel *chan)
|
||||
{
|
||||
if (!diagstate.audioio->curtime)
|
||||
return 0;
|
||||
return diagstate.audioio->curtime(diagstate.audioio);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int pktget(struct modemchannel *chan, unsigned char *data, unsigned int len)
|
||||
{
|
||||
memset(data, 0, len);
|
||||
#ifdef TXTERMNOCANCEL
|
||||
if (diagstate.txterminate)
|
||||
return 0;
|
||||
#endif
|
||||
return diagstate.ptt ? len : 0;
|
||||
}
|
||||
|
||||
void pktput(struct modemchannel *chan, const unsigned char *data, unsigned int len)
|
||||
{
|
||||
unsigned int l;
|
||||
|
||||
while (len > 0) {
|
||||
l = sizeof(diagstate.rxbuf) - diagstate.rxwr;
|
||||
if (l > len)
|
||||
l = len;
|
||||
memcpy(&diagstate.rxbuf[diagstate.rxwr], data, l);
|
||||
data += l;
|
||||
diagstate.rxwr = (diagstate.rxwr + l) % sizeof(diagstate.rxbuf);
|
||||
len -= l;
|
||||
}
|
||||
}
|
||||
|
||||
void pktsetdcd(struct modemchannel *chan, int dcd)
|
||||
{
|
||||
pttsetdcd(&diagstate.pttio, dcd);
|
||||
diagstate.dcd = dcd;
|
||||
diagstate.upddcd = 1;
|
||||
}
|
||||
|
||||
static void *transmitter(void *dummy)
|
||||
{
|
||||
diagstate.pttthr = 0;
|
||||
diagstate.updpttthr = 1;
|
||||
pthread_mutex_lock(&diagstate.txmutex);
|
||||
for (;;) {
|
||||
#ifdef TXTERMNOCANCEL
|
||||
if (diagstate.txterminate) {
|
||||
pthread_mutex_unlock(&diagstate.txmutex);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
if (!diagstate.ptt || !diagstate.modch->modulate || !diagstate.audioio->write) {
|
||||
pthread_cond_wait(&diagstate.txcond, &diagstate.txmutex);
|
||||
continue;
|
||||
}
|
||||
diagstate.pttthr = 1;
|
||||
diagstate.updpttthr = 1;
|
||||
pttsetptt(&diagstate.pttio, 1);
|
||||
if (diagstate.audioio->transmitstart)
|
||||
diagstate.audioio->transmitstart(diagstate.audioio);
|
||||
diagstate.modch->modulate(diagstate.modstate, 0);
|
||||
if (diagstate.audioio->transmitstop)
|
||||
diagstate.audioio->transmitstop(diagstate.audioio);
|
||||
pttsetptt(&diagstate.pttio, 0);
|
||||
diagstate.pttthr = 0;
|
||||
diagstate.updpttthr = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void *receiver(void *dummy)
|
||||
{
|
||||
if (diagstate.demodch->demodulate)
|
||||
diagstate.demodch->demodulate(diagstate.demodstate);
|
||||
pktsetdcd(NULL, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static void setled(GtkImage *image, int on)
|
||||
{
|
||||
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data(on ? (const char **)option2_xpm : (const char **)option1_xpm);
|
||||
|
||||
gtk_image_set_from_pixbuf(image, pixbuf);
|
||||
g_object_unref(pixbuf);
|
||||
}
|
||||
|
||||
GtkWidget* create_led_pixmap(gchar *widget_name, gchar *string1, gchar *string2, gint int1, gint int2)
|
||||
{
|
||||
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)option1_xpm);
|
||||
GtkWidget *image = gtk_image_new_from_pixbuf(pixbuf);
|
||||
|
||||
g_object_unref(pixbuf);
|
||||
return image;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static inline void update_display_p3d(void)
|
||||
{
|
||||
GtkTextView *view;
|
||||
GtkTextBuffer *model;
|
||||
GtkWidget *w;
|
||||
unsigned int i, j;
|
||||
char buf[4096], *cp;
|
||||
|
||||
if (diagstate.p3d.newstate) {
|
||||
diagstate.p3d.newstate = 0;
|
||||
snprintf(buf, sizeof(buf), "%s", diagstate.p3d.state == 2 ? "RECEIVE (SYNCSCAN)" : diagstate.p3d.state ? "RECEIVE" : "SYNC HUNT");
|
||||
w = GTK_WIDGET(g_object_get_data(G_OBJECT(p3dwindow), "rxstatus"));
|
||||
gtk_entry_set_text(GTK_ENTRY(w), buf);
|
||||
snprintf(buf, sizeof(buf), "%u", diagstate.p3d.carrierfreq);
|
||||
w = GTK_WIDGET(g_object_get_data(G_OBJECT(p3dwindow), "carrierfreq"));
|
||||
gtk_entry_set_text(GTK_ENTRY(w), buf);
|
||||
}
|
||||
if (diagstate.p3d.newpacket) {
|
||||
diagstate.p3d.newpacket = 0;
|
||||
cp = buf;
|
||||
cp += sprintf(cp, "P3D Telemetry Packet: CRC 0x%04x", diagstate.p3d.crc);
|
||||
for (i = 0; i < 512; i += 0x10) {
|
||||
cp += sprintf(cp, "\n%04x:", i);
|
||||
for (j = 0; j < 0x10; j++)
|
||||
cp += sprintf(cp, " %02x", diagstate.p3d.packet[i+j]);
|
||||
cp += sprintf(cp, " ");
|
||||
for (j = 0; j < 0x10; j++) {
|
||||
if (diagstate.p3d.packet[i+j] < ' ' || diagstate.p3d.packet[i+j] >= 0x80)
|
||||
cp += sprintf(cp, ".");
|
||||
else
|
||||
cp += sprintf(cp, "%c", diagstate.p3d.packet[i+j]);
|
||||
}
|
||||
}
|
||||
cp += sprintf(cp, "\n%04x: %02x %02x%44s", 512, diagstate.p3d.packet[512], diagstate.p3d.packet[514], " ");
|
||||
for (i = 512; i < 514; i++) {
|
||||
if (diagstate.p3d.packet[i] < ' ' || diagstate.p3d.packet[i] >= 0x80)
|
||||
cp += sprintf(cp, ".");
|
||||
else
|
||||
cp += sprintf(cp, "%c", diagstate.p3d.packet[i]);
|
||||
}
|
||||
cp += sprintf(cp, "\n\n");
|
||||
view = GTK_TEXT_VIEW(g_object_get_data(G_OBJECT(receivewindow), "packettext"));
|
||||
model = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view));
|
||||
gtk_text_buffer_insert_at_cursor(model, buf, cp-buf);
|
||||
i = gtk_text_buffer_get_char_count(model);
|
||||
if (i > 16384) {
|
||||
GtkTextIter start, end;
|
||||
gchar *text;
|
||||
|
||||
gtk_text_buffer_get_iter_at_offset(model, &start, 16384);
|
||||
gtk_text_buffer_get_iter_at_offset(model, &end, -1);
|
||||
text = gtk_text_buffer_get_text(model, &start, &end, TRUE);
|
||||
gtk_text_buffer_set_text(model, text, -1);
|
||||
g_free(text);
|
||||
}
|
||||
gtk_text_view_scroll_mark_onscreen(view, gtk_text_buffer_get_insert(model));
|
||||
/* decode cooked packet if CRC ok or passall selected */
|
||||
if (!diagstate.p3d.crc ||
|
||||
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g_object_get_data(G_OBJECT(p3dwindow), "buttonpassall")))) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void update_display(void)
|
||||
{
|
||||
GtkWidget *w;
|
||||
gboolean b;
|
||||
unsigned int c0, c1;
|
||||
char buf[64];
|
||||
unsigned char ch;
|
||||
|
||||
if (diagstate.upddcd) {
|
||||
setled(GTK_IMAGE(g_object_get_data(G_OBJECT(receivewindow), "leddcd")), diagstate.dcd);
|
||||
setled(GTK_IMAGE(g_object_get_data(G_OBJECT(scopewindow), "leddcd")), diagstate.dcd);
|
||||
setled(GTK_IMAGE(g_object_get_data(G_OBJECT(specwindow), "leddcd")), diagstate.dcd);
|
||||
diagstate.upddcd = 0;
|
||||
}
|
||||
if (diagstate.updptt) {
|
||||
b = diagstate.ptt ? TRUE : FALSE;
|
||||
w = GTK_WIDGET(g_object_get_data(G_OBJECT(receivewindow), "ptt"));
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), b);
|
||||
w = GTK_WIDGET(g_object_get_data(G_OBJECT(scopewindow), "ptt"));
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), b);
|
||||
w = GTK_WIDGET(g_object_get_data(G_OBJECT(specwindow), "ptt"));
|
||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), b);
|
||||
diagstate.updptt = 0;
|
||||
}
|
||||
if (diagstate.updpttthr) {
|
||||
setled(GTK_IMAGE(g_object_get_data(G_OBJECT(receivewindow), "ledptt")), diagstate.pttthr);
|
||||
setled(GTK_IMAGE(g_object_get_data(G_OBJECT(scopewindow), "ledptt")), diagstate.pttthr);
|
||||
setled(GTK_IMAGE(g_object_get_data(G_OBJECT(specwindow), "ledptt")), diagstate.pttthr);
|
||||
diagstate.updpttthr = 0;
|
||||
}
|
||||
if (diagstate.rxrd != diagstate.rxwr) {
|
||||
GtkTextView *view;
|
||||
GtkTextBuffer *model;
|
||||
|
||||
view = GTK_TEXT_VIEW(g_object_get_data(G_OBJECT(receivewindow), "bitstext"));
|
||||
model = gtk_text_view_get_buffer(GTK_TEXT_VIEW(view));
|
||||
while (diagstate.rxrd != diagstate.rxwr) {
|
||||
ch = diagstate.rxbuf[diagstate.rxrd];
|
||||
diagstate.rxrd = (diagstate.rxrd + 1) % sizeof(diagstate.rxbuf);
|
||||
hdlc_receive(&ch, 1);
|
||||
c0 = hweight8(ch);
|
||||
diagstate.count0 += 8-c0;
|
||||
diagstate.count1 += c0;
|
||||
buf[0] = '0'+(ch & 1);
|
||||
buf[1] = '0'+((ch >> 1) & 1);
|
||||
buf[2] = '0'+((ch >> 2) & 1);
|
||||
buf[3] = '0'+((ch >> 3) & 1);
|
||||
buf[4] = '0'+((ch >> 4) & 1);
|
||||
buf[5] = '0'+((ch >> 5) & 1);
|
||||
buf[6] = '0'+((ch >> 6) & 1);
|
||||
buf[7] = '0'+((ch >> 7) & 1);
|
||||
gtk_text_buffer_insert_at_cursor(model, buf, 8);
|
||||
}
|
||||
c0 = gtk_text_buffer_get_char_count(model);
|
||||
if (c0 > 2048) {
|
||||
GtkTextIter start, end;
|
||||
gchar *text;
|
||||
|
||||
gtk_text_buffer_get_iter_at_offset(model, &start, 2048);
|
||||
gtk_text_buffer_get_iter_at_offset(model, &end, -1);
|
||||
text = gtk_text_buffer_get_text(model, &start, &end, TRUE);
|
||||
gtk_text_buffer_set_text(model, text, -1);
|
||||
g_free(text);
|
||||
}
|
||||
gtk_text_view_scroll_mark_onscreen(view, gtk_text_buffer_get_insert(model));
|
||||
diagstate.updcount = 1;
|
||||
}
|
||||
if (diagstate.updcount) {
|
||||
c0 = diagstate.count0;
|
||||
c1 = diagstate.count1;
|
||||
diagstate.updcount = 0;
|
||||
sprintf(buf, "%d", c0);
|
||||
w = GTK_WIDGET(g_object_get_data(G_OBJECT(receivewindow), "count0"));
|
||||
gtk_entry_set_text(GTK_ENTRY(w), buf);
|
||||
sprintf(buf, "%d", c1);
|
||||
w = GTK_WIDGET(g_object_get_data(G_OBJECT(receivewindow), "count1"));
|
||||
gtk_entry_set_text(GTK_ENTRY(w), buf);
|
||||
sprintf(buf, "%d", c0+c1);
|
||||
w = GTK_WIDGET(g_object_get_data(G_OBJECT(receivewindow), "counttot"));
|
||||
gtk_entry_set_text(GTK_ENTRY(w), buf);
|
||||
}
|
||||
update_display_p3d();
|
||||
}
|
||||
|
||||
static gint periodictasks(gpointer user_data)
|
||||
{
|
||||
int16_t samp[SPECTRUM_NUMSAMPLES];
|
||||
|
||||
update_display();
|
||||
diagstate.traceupd++;
|
||||
if (diagstate.traceupd > 1)
|
||||
diagstate.traceupd = 0;
|
||||
if (diagstate.traceupd || (diagstate.dcdfreeze && !diagstate.dcd) || !(diagstate.flags & (DIAGFLG_SCOPE|DIAGFLG_SPECTRUM)) ||
|
||||
!diagstate.audioio->read || !diagstate.audioio->curtime)
|
||||
return TRUE; /* repeat */
|
||||
diagstate.audioio->read(diagstate.audioio, samp, SPECTRUM_NUMSAMPLES, diagstate.audioio->curtime(diagstate.audioio)-SPECTRUM_NUMSAMPLES);
|
||||
if (diagstate.flags & DIAGFLG_SCOPE) {
|
||||
Scope *scope = SCOPE(g_object_get_data(G_OBJECT(scopewindow), "scope"));
|
||||
scope_setdata(scope, &samp[SPECTRUM_NUMSAMPLES-SCOPE_NUMSAMPLES]);
|
||||
}
|
||||
if (diagstate.flags & DIAGFLG_SPECTRUM) {
|
||||
Spectrum *spec = SPECTRUM(g_object_get_data(G_OBJECT(specwindow), "spec"));
|
||||
spectrum_setdata(spec, samp);
|
||||
}
|
||||
return TRUE; /* repeat */
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void diag_stop(void)
|
||||
{
|
||||
if (!(diagstate.flags & DIAGFLG_MODEM)) {
|
||||
diagstate.flags = 0;
|
||||
return;
|
||||
}
|
||||
g_source_remove(diagstate.timeoutid);
|
||||
#ifdef TXTERMNOCANCEL
|
||||
diagstate.txterminate = 1;
|
||||
pthread_cond_broadcast(&diagstate.txcond);
|
||||
#else
|
||||
pthread_cancel(diagstate.txthread);
|
||||
#endif
|
||||
#if 0
|
||||
pthread_cancel(diagstate.rxthread);
|
||||
#else
|
||||
if (diagstate.audioio->terminateread)
|
||||
diagstate.audioio->terminateread(diagstate.audioio);
|
||||
#endif
|
||||
g_printerr("Joining TxThread\n");
|
||||
pthread_join(diagstate.txthread, NULL);
|
||||
g_printerr("Joining RxThread\n");
|
||||
pthread_join(diagstate.rxthread, NULL);
|
||||
g_printerr("Releasing IO\n");
|
||||
diagstate.audioio->release(diagstate.audioio);
|
||||
if (diagstate.modch->free)
|
||||
diagstate.modch->free(diagstate.modstate);
|
||||
if (diagstate.demodch->free)
|
||||
diagstate.demodch->free(diagstate.demodstate);
|
||||
pttsetptt(&diagstate.pttio, 0);
|
||||
pttrelease(&diagstate.pttio);
|
||||
diagstate.flags = 0;
|
||||
diagstate.ptt = 0;
|
||||
diagstate.pttthr = 0;
|
||||
diagstate.updptt = 1;
|
||||
diagstate.updpttthr = 1;
|
||||
}
|
||||
|
||||
#define MAX_PAR 10
|
||||
|
||||
static void getparam(const char *cfgname, const char *chname, const char *typname,
|
||||
const struct modemparams *par, const char *parptr[MAX_PAR], char params[MAX_PAR][64])
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
memset(parptr, 0, sizeof(parptr));
|
||||
for (i = 0; i < MAX_PAR && par->name; i++, par++)
|
||||
if (xml_getprop(cfgname, chname, typname, par->name, params[i], sizeof(params[i])) > 0)
|
||||
parptr[i] = params[i];
|
||||
}
|
||||
|
||||
static int diag_start(void)
|
||||
{
|
||||
struct modulator *modch = &modchain_x;
|
||||
struct demodulator *demodch = &demodchain_x;
|
||||
char params[MAX_PAR][64];
|
||||
const char *parptr[MAX_PAR];
|
||||
unsigned int i;
|
||||
|
||||
if (diagstate.flags & DIAGFLG_MODEM)
|
||||
return 0;
|
||||
pthread_mutex_init(&diagstate.txmutex, NULL);
|
||||
pthread_cond_init(&diagstate.txcond, NULL);
|
||||
#ifdef TXTERMNOCANCEL
|
||||
diagstate.txterminate = 0;
|
||||
#endif
|
||||
/* get current config/channel name */
|
||||
diagstate.cfgname = diagstate.chname = NULL;
|
||||
diagstate.cfgname = g_object_get_data(G_OBJECT(configmodel), "cfgname");
|
||||
diagstate.chname = g_object_get_data(G_OBJECT(configmodel), "chname");
|
||||
if (!diagstate.cfgname || !diagstate.chname) {
|
||||
g_printerr("diag activate: no channel selected\n");
|
||||
return -1;
|
||||
}
|
||||
/* search current modulator/demodulator */
|
||||
if (xml_getprop(diagstate.cfgname, diagstate.chname, "mod", "mode", params[0], sizeof(params[0])) > 0) {
|
||||
for (; modch && strcmp(modch->name, params[0]); modch = modch->next);
|
||||
}
|
||||
if (modch)
|
||||
diagstate.modch = modch;
|
||||
else
|
||||
diagstate.modch = &modchain_x;
|
||||
if (xml_getprop(diagstate.cfgname, diagstate.chname, "demod", "mode", params[0], sizeof(params[0])) > 0) {
|
||||
for (; demodch && strcmp(demodch->name, params[0]); demodch = demodch->next);
|
||||
}
|
||||
if (demodch)
|
||||
diagstate.demodch = demodch;
|
||||
else
|
||||
diagstate.demodch = &demodchain_x;
|
||||
g_print("Modulator: %s Demodulator: %s\n", diagstate.modch->name, diagstate.demodch->name);
|
||||
/* prepare modulator/demodulator and find minimum sampling rate */
|
||||
diagstate.samplerate = 5000;
|
||||
if (diagstate.modch->params && diagstate.modch->config) {
|
||||
getparam(diagstate.cfgname, diagstate.chname, "mod", diagstate.modch->params, parptr, params);
|
||||
for (i = 0; i < MAX_PAR && diagstate.modch->params[i].name; i++)
|
||||
g_print("Modulator: parameter %s value %s\n",
|
||||
diagstate.modch->params[i].name, parptr[i] ? : "(null)");
|
||||
i = diagstate.samplerate;
|
||||
diagstate.modstate = diagstate.modch->config(NULL, &i, parptr);
|
||||
if (i > diagstate.samplerate)
|
||||
diagstate.samplerate = i;
|
||||
}
|
||||
if (diagstate.demodch->params && diagstate.demodch->config) {
|
||||
getparam(diagstate.cfgname, diagstate.chname, "demod", diagstate.demodch->params, parptr, params);
|
||||
for (i = 0; i < MAX_PAR && diagstate.demodch->params[i].name; i++)
|
||||
g_print("Demodulator: parameter %s value %s\n",
|
||||
diagstate.demodch->params[i].name, parptr[i] ? : "(null)");
|
||||
i = diagstate.samplerate;
|
||||
diagstate.demodstate = diagstate.demodch->config(NULL, &i, parptr);
|
||||
if (i > diagstate.samplerate)
|
||||
diagstate.samplerate = i;
|
||||
}
|
||||
g_print("Minimum sampling rate: %u\n", diagstate.samplerate);
|
||||
/* start Audio */
|
||||
getparam(diagstate.cfgname, NULL, "audio", ioparam_type, parptr, params);
|
||||
g_print("Audio IO: type %s\n", parptr[0] ? : "(null)");
|
||||
if (parptr[0] && !strcmp(parptr[0], ioparam_type[0].u.c.combostr[1])) {
|
||||
getparam(diagstate.cfgname, NULL, "audio", ioparams_filein, parptr, params);
|
||||
diagstate.audioio = ioopen_filein(&diagstate.samplerate, IO_RDONLY, parptr);
|
||||
} else if (parptr[0] && !strcmp(parptr[0], ioparam_type[0].u.c.combostr[2])) {
|
||||
getparam(diagstate.cfgname, NULL, "audio", ioparams_sim, parptr, params);
|
||||
diagstate.audioio = ioopen_sim(&diagstate.samplerate, IO_RDWR, parptr);
|
||||
#ifdef HAVE_ALSA
|
||||
} else if (parptr[0] && !strcmp(parptr[0], ioparam_type[0].u.c.combostr[3])) {
|
||||
getparam(diagstate.cfgname, NULL, "audio", ioparams_alsasoundcard, parptr, params);
|
||||
diagstate.audioio = ioopen_alsasoundcard(&diagstate.samplerate, diagstate.modch->modulate ? IO_RDWR : IO_RDONLY, parptr);
|
||||
#endif /* HAVE_ALSA */
|
||||
} else {
|
||||
getparam(diagstate.cfgname, NULL, "audio", ioparams_soundcard, parptr, params);
|
||||
diagstate.audioio = ioopen_soundcard(&diagstate.samplerate, diagstate.modch->modulate ? IO_RDWR : IO_RDONLY, parptr);
|
||||
}
|
||||
if (!diagstate.audioio) {
|
||||
if (diagstate.modch->free)
|
||||
diagstate.modch->free(diagstate.modstate);
|
||||
if (diagstate.demodch->free)
|
||||
diagstate.demodch->free(diagstate.demodstate);
|
||||
error_dialog("Cannot start audio IO\n");
|
||||
return -1;
|
||||
}
|
||||
/* start modems */
|
||||
g_print("Real sampling rate: %u\n", diagstate.samplerate);
|
||||
if (diagstate.modch->init)
|
||||
diagstate.modch->init(diagstate.modstate, diagstate.samplerate);
|
||||
if (diagstate.demodch->init)
|
||||
diagstate.demodch->init(diagstate.demodstate, diagstate.samplerate, &diagstate.bitrate);
|
||||
/* start PTT */
|
||||
getparam(diagstate.cfgname, NULL, "ptt", pttparams, parptr, params);
|
||||
if (pttinit(&diagstate.pttio, parptr))
|
||||
g_printerr("cannot start PTT output\n");
|
||||
/* periodic start */
|
||||
diagstate.timeoutid = g_timeout_add(100, periodictasks, NULL);
|
||||
diagstate.flags |= DIAGFLG_MODEM;
|
||||
if (pthread_create(&diagstate.rxthread, NULL, receiver, NULL))
|
||||
logerr(MLOG_FATAL, "pthread_create");
|
||||
if (pthread_create(&diagstate.txthread, NULL, transmitter, NULL))
|
||||
logerr(MLOG_FATAL, "pthread_create");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void on_diagscope_activate(GtkMenuItem *menuitem, gpointer user_data)
|
||||
{
|
||||
if (diag_start())
|
||||
return;
|
||||
diagstate.flags |= DIAGFLG_SCOPE;
|
||||
gtk_widget_show(scopewindow);
|
||||
}
|
||||
|
||||
void on_diagspectrum_activate(GtkMenuItem *menuitem, gpointer user_data)
|
||||
{
|
||||
if (diag_start())
|
||||
return;
|
||||
diagstate.flags |= DIAGFLG_SPECTRUM;
|
||||
gtk_widget_show(specwindow);
|
||||
}
|
||||
|
||||
void on_diagmodem_activate(GtkMenuItem *menuitem, gpointer user_data)
|
||||
{
|
||||
if (diag_start())
|
||||
return;
|
||||
diagstate.flags |= DIAGFLG_RECEIVE;
|
||||
gtk_widget_show(receivewindow);
|
||||
}
|
||||
|
||||
void on_diagp3dmodem_activate(GtkMenuItem *menuitem, gpointer user_data)
|
||||
{
|
||||
if (diag_start())
|
||||
return;
|
||||
diagstate.flags |= DIAGFLG_P3DRECEIVE;
|
||||
gtk_widget_show(p3dwindow);
|
||||
}
|
||||
|
||||
void on_diagpassall_activate(GtkMenuItem *menuitem, gpointer user_data)
|
||||
{
|
||||
GtkCheckMenuItem *citem = GTK_CHECK_MENU_ITEM(menuitem);
|
||||
printf("passall: %u\n", gtk_check_menu_item_get_active(citem));
|
||||
diagstate.hrx.passall = gtk_check_menu_item_get_active(citem);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void on_ptt_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||
{
|
||||
diagstate.ptt = gtk_toggle_button_get_active(togglebutton) ? 1 : 0;
|
||||
diagstate.updptt = 1;
|
||||
pthread_cond_broadcast(&diagstate.txcond);
|
||||
}
|
||||
|
||||
void on_clearbutton_clicked(GtkButton *button, gpointer user_data)
|
||||
{
|
||||
diagstate.count0 = diagstate.count1 = 0;
|
||||
diagstate.updcount = 1;
|
||||
update_display();
|
||||
}
|
||||
|
||||
gboolean on_spec_motion_event(GtkWidget *widget, GdkEventMotion *event, gpointer user_data)
|
||||
{
|
||||
Spectrum *spec;
|
||||
GtkEntry *entry;
|
||||
char buf[16];
|
||||
|
||||
snprintf(buf, sizeof(buf), "%d Hz", (int)(event->x * diagstate.samplerate * (1.0 / SPECTRUM_NUMSAMPLES)));
|
||||
entry = GTK_ENTRY(g_object_get_data(G_OBJECT(specwindow), "specfreqpointer"));
|
||||
gtk_entry_set_text(entry, buf);
|
||||
spec = SPECTRUM(g_object_get_data(G_OBJECT(specwindow), "spec"));
|
||||
spectrum_setmarker(spec, event->x);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean on_specwindow_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
|
||||
{
|
||||
diagstate.flags &= ~DIAGFLG_SPECTRUM;
|
||||
gtk_widget_hide(specwindow);
|
||||
if (!(diagstate.flags & DIAGFLG_WINDOWMASK))
|
||||
diag_stop();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean on_scopewindow_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
|
||||
{
|
||||
diagstate.flags &= ~DIAGFLG_SCOPE;
|
||||
gtk_widget_hide(scopewindow);
|
||||
if (!(diagstate.flags & DIAGFLG_WINDOWMASK))
|
||||
diag_stop();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void on_dcdfreeze_toggled(GtkToggleButton *togglebutton, gpointer user_data)
|
||||
{
|
||||
diagstate.dcdfreeze = gtk_toggle_button_get_active(togglebutton);
|
||||
}
|
||||
|
||||
gboolean on_receivewindow_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
|
||||
{
|
||||
diagstate.flags &= ~DIAGFLG_RECEIVE;
|
||||
gtk_widget_hide(receivewindow);
|
||||
if (!(diagstate.flags & DIAGFLG_WINDOWMASK))
|
||||
diag_stop();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean on_p3dwindow_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data)
|
||||
{
|
||||
diagstate.flags &= ~DIAGFLG_P3DRECEIVE;
|
||||
gtk_widget_hide(p3dwindow);
|
||||
if (!(diagstate.flags & DIAGFLG_WINDOWMASK))
|
||||
diag_stop();
|
||||
return TRUE;
|
||||
}
|
||||
1089
configapp/src/interface.c
Normal file
1089
configapp/src/interface.c
Normal file
File diff suppressed because it is too large
Load diff
12
configapp/src/interface.h
Normal file
12
configapp/src/interface.h
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||
*/
|
||||
|
||||
GtkWidget* create_mainwindow (void);
|
||||
GtkWidget* create_aboutwindow (void);
|
||||
GtkWidget* create_newconfigwindow (void);
|
||||
GtkWidget* create_errordialog (void);
|
||||
GtkWidget* create_specwindow (void);
|
||||
GtkWidget* create_scopewindow (void);
|
||||
GtkWidget* create_receivewindow (void);
|
||||
GtkWidget* create_p3dwindow (void);
|
||||
664
configapp/src/main.c
Normal file
664
configapp/src/main.c
Normal file
|
|
@ -0,0 +1,664 @@
|
|||
/*
|
||||
* Initial main.c file generated by Glade. Edit as required.
|
||||
* Glade will not overwrite this file.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "configapp.h"
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "interface.h"
|
||||
#include "support.h"
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#else
|
||||
|
||||
/* libxml includes */
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "simd.h"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
GtkWidget *mainwindow, *specwindow, *scopewindow, *receivewindow, *p3dwindow;
|
||||
GtkTreeModel *configmodel;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
extern struct modulator afskmodulator;
|
||||
extern struct demodulator afskdemodulator;
|
||||
|
||||
extern struct modulator fskmodulator;
|
||||
extern struct demodulator fskdemodulator;
|
||||
extern struct demodulator fskpspdemodulator;
|
||||
extern struct modulator fskeqmodulator;
|
||||
extern struct demodulator fskeqdemodulator;
|
||||
|
||||
extern struct modulator pammodulator;
|
||||
extern struct demodulator pamdemodulator;
|
||||
|
||||
extern struct modulator pskmodulator;
|
||||
extern struct demodulator pskdemodulator;
|
||||
|
||||
extern struct modulator newqpskmodulator;
|
||||
extern struct demodulator newqpskdemodulator;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
struct modulator modchain_x = {
|
||||
&afskmodulator,
|
||||
"Off",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
struct demodulator demodchain_x = {
|
||||
&afskdemodulator,
|
||||
"Off",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
#ifdef HAVE_ALSA
|
||||
#define ALSA_STR , "alsa"
|
||||
#else /* HAVE_ALSA */
|
||||
#define ALSA_STR
|
||||
#endif /* HAVE_ALSA */
|
||||
|
||||
struct modemparams ioparam_type[] = {
|
||||
{ "type", "Audio IO Mode", "Audio IO Mode", "soundcard", MODEMPAR_COMBO,
|
||||
{ c: { { "soundcard", "file", "simulation" ALSA_STR } } } },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
#undef ALSA_STR
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
struct modemparams chaccparams_x[] = {
|
||||
{ "txdelay", "TxDelay", "Transmitter Keyup delay in ms", "150", MODEMPAR_NUMERIC, { n: { 0, 2550, 10, 50 } } },
|
||||
{ "fulldup", "Full Duplex", "Full Duplex", "0", MODEMPAR_CHECKBUTTON },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
#else /* WIN32 */
|
||||
|
||||
struct modemparams pktkissparams_x[] = {
|
||||
{ "file", "File", "File (symlink) to send the KISS stream to", "/dev/soundmodem0",
|
||||
MODEMPAR_COMBO, { c: { { "/dev/soundmodem0", "/dev/soundmodem1", "/dev/soundmodem2", "/dev/soundmodem3" } } } },
|
||||
{ "unlink", "Unlink File", "Unlink File (above) on setup", "1", MODEMPAR_CHECKBUTTON },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
struct modemparams pktmkissparams_x[] = {
|
||||
{ "ifname", "Interface Name", "Name of the Kernel KISS Interface", "sm0", MODEMPAR_COMBO,
|
||||
{ c: { { "sm0", "sm1", "sm2", "ax0" } } } },
|
||||
{ "hwaddr", "Callsign", "Callsign (Hardware Address)", "", MODEMPAR_STRING },
|
||||
{ "ip", "IP Address", "IP Address (mandatory)", "10.0.0.1", MODEMPAR_STRING },
|
||||
{ "netmask", "Network Mask", "Network Mask", "255.255.255.0", MODEMPAR_STRING },
|
||||
{ "broadcast", "Broadcast Address", "Broadcast Address", "10.0.0.255", MODEMPAR_STRING },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
struct modemparams chaccparams_x[] = {
|
||||
{ "txdelay", "TxDelay", "Transmitter Keyup delay in ms", "150", MODEMPAR_NUMERIC, { n: { 0, 2550, 10, 50 } } },
|
||||
{ "slottime", "Slot Time", "Slot Time in ms (normally 100ms)", "100", MODEMPAR_NUMERIC, { n: { 0, 2550, 10, 50 } } },
|
||||
{ "ppersist", "P-Persistence", "P-Persistence", "40", MODEMPAR_NUMERIC, { n: { 0, 255, 1, 10 } } },
|
||||
{ "fulldup", "Full Duplex", "Full Duplex", "0", MODEMPAR_CHECKBUTTON },
|
||||
{ "txtail", "TxTail", "Transmitter Tail delay in ms", "10", MODEMPAR_NUMERIC, { n: { 0, 2550, 10, 50 } } },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#define REGISTRYPATH "SOFTWARE\\FlexNet\\SoundModem"
|
||||
#define REGISTRYKEY HKEY_LOCAL_MACHINE
|
||||
|
||||
#define MAXCHAN 16
|
||||
|
||||
static struct {
|
||||
unsigned int nrchan;
|
||||
struct onechannel {
|
||||
char name[16];
|
||||
} chan[MAXCHAN];
|
||||
} channels;
|
||||
|
||||
static int chancompare(struct onechannel *i, struct onechannel *j)
|
||||
{
|
||||
return strcmp(i->name, j->name);
|
||||
}
|
||||
|
||||
static int enumchannels(const char *cfgname)
|
||||
{
|
||||
char name[256];
|
||||
HKEY regkey;
|
||||
LONG err;
|
||||
DWORD len;
|
||||
DWORD index = 0;
|
||||
|
||||
channels.nrchan = 0;
|
||||
snprintf(name, sizeof(name), "%s\\%s", REGISTRYPATH, cfgname);
|
||||
if ((err = RegOpenKeyEx(REGISTRYKEY, name, 0, KEY_READ, ®key)) != ERROR_SUCCESS) {
|
||||
g_printerr("RegOpenKeyEx(%s) returned 0x%lx\n", name, err);
|
||||
return -1;
|
||||
}
|
||||
while (channels.nrchan < MAXCHAN) {
|
||||
len = sizeof(channels.chan[channels.nrchan].name);
|
||||
if ((RegEnumKeyEx(regkey, index, channels.chan[channels.nrchan].name, &len,
|
||||
NULL, NULL, NULL, NULL)) != ERROR_SUCCESS)
|
||||
break;
|
||||
index++;
|
||||
if (isdigit(channels.chan[channels.nrchan].name[0]))
|
||||
channels.nrchan++;
|
||||
}
|
||||
RegCloseKey(regkey);
|
||||
if (!channels.nrchan)
|
||||
return 0;
|
||||
qsort(&channels.chan[0], channels.nrchan, sizeof(channels.chan[0]), chancompare);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xml_newconfig(const char *newname)
|
||||
{
|
||||
HKEY regkey;
|
||||
LONG err;
|
||||
DWORD dispo;
|
||||
char name[256];
|
||||
|
||||
if (strchr(newname, '\\'))
|
||||
return -1;
|
||||
snprintf(name, sizeof(name), "%s\\%s", REGISTRYPATH, newname);
|
||||
if ((err = RegCreateKeyEx(REGISTRYKEY, name, 0, "", REG_OPTION_NON_VOLATILE,
|
||||
KEY_ALL_ACCESS, NULL, ®key, &dispo)) != ERROR_SUCCESS) {
|
||||
g_printerr("RegCreateKeyEx(%s) returned 0x%lx\n", name, err);
|
||||
return -1;
|
||||
}
|
||||
RegCloseKey(regkey);
|
||||
return (dispo == REG_CREATED_NEW_KEY) ? 0 : -1;
|
||||
}
|
||||
|
||||
const char *xml_newchannel(const char *cfgname)
|
||||
{
|
||||
if (enumchannels(cfgname))
|
||||
return NULL;
|
||||
if (channels.nrchan >= MAXCHAN)
|
||||
return NULL;
|
||||
if (channels.nrchan == 0)
|
||||
strncpy(channels.chan[channels.nrchan].name, "0",
|
||||
sizeof(channels.chan[channels.nrchan].name));
|
||||
else
|
||||
snprintf(channels.chan[channels.nrchan].name,
|
||||
sizeof(channels.chan[channels.nrchan].name),
|
||||
"%ld", strtoul(channels.chan[channels.nrchan-1].name, NULL, 0)+1);
|
||||
channels.nrchan++;
|
||||
return channels.chan[channels.nrchan-1].name;
|
||||
}
|
||||
|
||||
static int deletekeyx(HKEY key)
|
||||
{
|
||||
char name[128];
|
||||
LONG err;
|
||||
DWORD len;
|
||||
HKEY key2;
|
||||
int ret = 0;
|
||||
|
||||
for (;;) {
|
||||
len = sizeof(name);
|
||||
if ((RegEnumKeyEx(key, 0, name, &len, NULL, NULL, NULL, NULL)) != ERROR_SUCCESS)
|
||||
return ret;
|
||||
if ((err = RegOpenKeyEx(key, name, 0, KEY_ALL_ACCESS, &key2)) != ERROR_SUCCESS) {
|
||||
g_printerr("RegOpenKeyEx(%s) returned 0x%lx\n", name, err);
|
||||
return -1;
|
||||
}
|
||||
ret |= deletekeyx(key2);
|
||||
RegCloseKey(key2);
|
||||
RegDeleteKey(key, name);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int deletekey(const char *name)
|
||||
{
|
||||
HKEY key;
|
||||
int ret;
|
||||
DWORD err;
|
||||
|
||||
if ((err = RegOpenKeyEx(REGISTRYKEY, name, 0, KEY_ALL_ACCESS, &key)) != ERROR_SUCCESS) {
|
||||
g_printerr("RegOpenKeyEx(%s) returned 0x%lx\n", name, err);
|
||||
return -1;
|
||||
}
|
||||
ret = deletekeyx(key);
|
||||
RegCloseKey(key);
|
||||
RegDeleteKey(REGISTRYKEY, name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int xml_deleteconfig(const char *newname)
|
||||
{
|
||||
char name[256];
|
||||
|
||||
snprintf(name, sizeof(name), "%s\\%s", REGISTRYPATH, newname);
|
||||
return deletekey(name);
|
||||
}
|
||||
|
||||
int xml_deletechannel(const char *cfgname, const char *chname)
|
||||
{
|
||||
char name[256];
|
||||
|
||||
snprintf(name, sizeof(name), "%s\\%s\\%s", REGISTRYPATH, cfgname, chname);
|
||||
return deletekey(name);
|
||||
}
|
||||
|
||||
int xml_setprop(const char *cfgname, const char *chname, const char *typname, const char *propname, const char *data)
|
||||
{
|
||||
char name[256];
|
||||
HKEY key;
|
||||
DWORD err;
|
||||
|
||||
if (chname)
|
||||
snprintf(name, sizeof(name), "%s\\%s\\%s\\%s", REGISTRYPATH, cfgname, chname, typname);
|
||||
else
|
||||
snprintf(name, sizeof(name), "%s\\%s\\%s", REGISTRYPATH, cfgname, typname);
|
||||
if ((err = RegCreateKeyEx(REGISTRYKEY, name, 0, "", REG_OPTION_NON_VOLATILE,
|
||||
KEY_WRITE, NULL, &key, NULL)) != ERROR_SUCCESS) {
|
||||
g_printerr("RegCreateKeyEx(%s) returned 0x%lx\n", name, err);
|
||||
return -1;
|
||||
}
|
||||
err = RegSetValueEx(key, propname, 0, REG_SZ, data, strlen(data)+1);
|
||||
RegCloseKey(key);
|
||||
if (err != ERROR_SUCCESS) {
|
||||
g_printerr("RegSetValueEx(%s,%s) returned 0x%lx\n", propname, data, err);
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xml_getprop(const char *cfgname, const char *chname, const char *typname, const char *propname, char *buf, unsigned int bufsz)
|
||||
{
|
||||
HKEY key;
|
||||
DWORD err, vtype, len;
|
||||
char name[256];
|
||||
|
||||
buf[0] = 0;
|
||||
if (chname)
|
||||
snprintf(name, sizeof(name), "%s\\%s\\%s\\%s", REGISTRYPATH, cfgname, chname, typname);
|
||||
else
|
||||
snprintf(name, sizeof(name), "%s\\%s\\%s", REGISTRYPATH, cfgname, typname);
|
||||
if ((err = RegCreateKeyEx(REGISTRYKEY, name, 0, "", REG_OPTION_NON_VOLATILE,
|
||||
KEY_READ, NULL, &key, NULL)) != ERROR_SUCCESS) {
|
||||
g_printerr("RegCreateKeyEx(%s) returned 0x%lx\n", name, err);
|
||||
return -1;
|
||||
}
|
||||
len = bufsz;
|
||||
err = RegQueryValueEx(key, propname, NULL, &vtype, buf, &len);
|
||||
RegCloseKey(key);
|
||||
if (len >= bufsz)
|
||||
len = bufsz-1;
|
||||
buf[len] = 0;
|
||||
if (err != ERROR_SUCCESS) {
|
||||
g_printerr("RegQueryValueEx(%s) returned 0x%lx\n", propname, err);
|
||||
return -1;
|
||||
}
|
||||
if (vtype != REG_SZ)
|
||||
return -1;
|
||||
return len;
|
||||
}
|
||||
|
||||
static void buildtree(void)
|
||||
{
|
||||
DWORD err;
|
||||
HKEY key;
|
||||
DWORD index = 0;
|
||||
DWORD len;
|
||||
char name[64];
|
||||
unsigned int i;
|
||||
|
||||
if ((err = RegOpenKeyEx(REGISTRYKEY, REGISTRYPATH, 0, KEY_READ, &key)) != ERROR_SUCCESS) {
|
||||
g_printerr("RegOpenKeyEx(" REGISTRYPATH ") returned 0x%lx\n", err);
|
||||
return;
|
||||
}
|
||||
for (;;) {
|
||||
len = sizeof(name);
|
||||
if ((RegEnumKeyEx(key, index, name, &len, NULL, NULL, NULL, NULL)) != ERROR_SUCCESS)
|
||||
break;
|
||||
g_print("Configuration: %s\n", name);
|
||||
index++;
|
||||
new_configuration(name);
|
||||
if (enumchannels(name))
|
||||
continue;
|
||||
for (i = 0; i < channels.nrchan; i++)
|
||||
new_channel(name, channels.chan[i].name);
|
||||
}
|
||||
RegCloseKey(key);
|
||||
}
|
||||
|
||||
#else /* WIN32 */
|
||||
|
||||
static xmlDocPtr doc = NULL;
|
||||
static const char *cfgfile = "/etc/ax25/soundmodem.conf";
|
||||
|
||||
static xmlNodePtr findconfig(const char *newname)
|
||||
{
|
||||
xmlNodePtr node;
|
||||
const char *name;
|
||||
|
||||
for (node = doc->children->children; node; node = node->next) {
|
||||
if (!node->name || strcmp(node->name, "configuration"))
|
||||
continue;
|
||||
name = xmlGetProp(node, "name");
|
||||
if (!name)
|
||||
continue;
|
||||
if (!strcmp(name, newname))
|
||||
return node;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static xmlNodePtr findchannel(xmlNodePtr cfg, const char *newname)
|
||||
{
|
||||
xmlNodePtr node;
|
||||
const char *name;
|
||||
|
||||
if (!cfg)
|
||||
return NULL;
|
||||
for (node = cfg->children; node; node = node->next) {
|
||||
if (!node->name || strcmp(node->name, "channel"))
|
||||
continue;
|
||||
name = xmlGetProp(node, "name");
|
||||
if (!name)
|
||||
continue;
|
||||
if (!strcmp(name, newname))
|
||||
return node;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void namechannels(xmlNodePtr cfg)
|
||||
{
|
||||
xmlNodePtr node, node2;
|
||||
unsigned int ch = 0;
|
||||
char buf[64];
|
||||
const char *name;
|
||||
|
||||
for (node = cfg->children; node; node = node->next) {
|
||||
if (!node->name || strcmp(node->name, "channel"))
|
||||
continue;
|
||||
name = xmlGetProp(node, "name");
|
||||
if (name) {
|
||||
node2 = findchannel(cfg, name);
|
||||
if (node2 == node)
|
||||
continue;
|
||||
}
|
||||
for (;;) {
|
||||
sprintf(buf, "Channel %u", ch++);
|
||||
xmlSetProp(node, "name", buf);
|
||||
node2 = findchannel(cfg, buf);
|
||||
if (node2 == node)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int xml_newconfig(const char *newname)
|
||||
{
|
||||
xmlNodePtr node = findconfig(newname);
|
||||
|
||||
if (node)
|
||||
return -1;
|
||||
node = xmlNewChild(doc->children, NULL, "configuration", NULL);
|
||||
xmlSetProp(node, "name", newname);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *xml_newchannel(const char *cfgname)
|
||||
{
|
||||
xmlNodePtr node, node2;
|
||||
|
||||
node = findconfig(cfgname);
|
||||
if (!node)
|
||||
return NULL;
|
||||
node2 = xmlNewChild(node, NULL, "channel", NULL);
|
||||
namechannels(node);
|
||||
return xmlGetProp(node2, "name");
|
||||
}
|
||||
|
||||
int xml_deleteconfig(const char *newname)
|
||||
{
|
||||
xmlNodePtr node = findconfig(newname);
|
||||
if (!node)
|
||||
return -1;
|
||||
xmlUnlinkNode(node);
|
||||
xmlFreeNode(node);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xml_deletechannel(const char *cfgname, const char *chname)
|
||||
{
|
||||
xmlNodePtr node = findconfig(cfgname);
|
||||
node = findchannel(node, chname);
|
||||
if (!node)
|
||||
return -1;
|
||||
xmlUnlinkNode(node);
|
||||
xmlFreeNode(node);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static xmlNodePtr propnode(const char *cfgname, const char *chname, const char *typname, int create)
|
||||
{
|
||||
xmlNodePtr node2, node = findconfig(cfgname);
|
||||
if (chname)
|
||||
node = findchannel(node, chname);
|
||||
if (!node)
|
||||
return NULL;
|
||||
for (node2 = node->children; node2; node2 = node2->next) {
|
||||
if (!node2->name || strcmp(node2->name, typname))
|
||||
continue;
|
||||
return node2;
|
||||
}
|
||||
if (!create)
|
||||
return NULL;
|
||||
return xmlNewChild(node, NULL, typname, NULL);
|
||||
}
|
||||
|
||||
int xml_setprop(const char *cfgname, const char *chname, const char *typname, const char *propname, const char *data)
|
||||
{
|
||||
xmlNodePtr node = propnode(cfgname, chname, typname, 1);
|
||||
if (!node)
|
||||
return -1;
|
||||
xmlSetProp(node, propname, data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xml_getprop(const char *cfgname, const char *chname, const char *typname, const char *propname, char *buf, unsigned int bufsz)
|
||||
{
|
||||
xmlNodePtr node = propnode(cfgname, chname, typname, 0);
|
||||
const char *cp;
|
||||
|
||||
buf[0] = 0;
|
||||
if (!node)
|
||||
return -1;
|
||||
if (!(cp = xmlGetProp(node, propname)))
|
||||
return -1;
|
||||
strncpy(buf, cp, bufsz);
|
||||
buf[bufsz-1] = 0;
|
||||
return strlen(buf);
|
||||
}
|
||||
|
||||
static void buildtree(xmlNodePtr xnode)
|
||||
{
|
||||
xmlNodePtr node;
|
||||
const char *name;
|
||||
|
||||
for (; xnode; xnode = xnode->next) {
|
||||
if (!xnode->name || strcmp(xnode->name, "configuration"))
|
||||
continue;
|
||||
name = xmlGetProp(xnode, "name");
|
||||
if (!name)
|
||||
continue;
|
||||
namechannels(xnode);
|
||||
new_configuration(name);
|
||||
/* now add channels */
|
||||
for (node = xnode->children; node; node = node->next) {
|
||||
if (!node->name || strcmp(node->name, "channel"))
|
||||
continue;
|
||||
new_channel(name, xmlGetProp(node, "name"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
{
|
||||
static const struct option long_options[] = {
|
||||
{ "expert", no_argument, 0, 'x' },
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
int c, err = 0;
|
||||
unsigned int verblevel = 10, tosyslog = 0, simd = 1, expert = 0;
|
||||
|
||||
afskmodulator.next = &fskmodulator;
|
||||
afskdemodulator.next = &fskdemodulator;
|
||||
fskmodulator.next = &pammodulator;
|
||||
fskdemodulator.next = &fskpspdemodulator;
|
||||
fskpspdemodulator.next = &pamdemodulator;
|
||||
fskeqdemodulator.next = &pamdemodulator;
|
||||
pammodulator.next = &pskmodulator;
|
||||
pamdemodulator.next = &pskdemodulator;
|
||||
pskmodulator.next = &newqpskmodulator;
|
||||
pskdemodulator.next = &newqpskdemodulator;
|
||||
newqpskdemodulator.next = &p3ddemodulator;
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
|
||||
bind_textdomain_codeset (PACKAGE, "UTF-8");
|
||||
textdomain(PACKAGE);
|
||||
#endif
|
||||
|
||||
gtk_set_locale();
|
||||
gtk_init(&argc, &argv);
|
||||
|
||||
add_pixmap_directory(PACKAGE_DATA_DIR "/pixmaps");
|
||||
add_pixmap_directory(PACKAGE_SOURCE_DIR "/pixmaps");
|
||||
|
||||
mainwindow = create_mainwindow();
|
||||
gtk_notebook_remove_page(GTK_NOTEBOOK(g_object_get_data(G_OBJECT(mainwindow), "confignotebook")), 0);
|
||||
gtk_notebook_remove_page(GTK_NOTEBOOK(g_object_get_data(G_OBJECT(mainwindow), "confignotebook")), 0);
|
||||
gtk_widget_hide(GTK_WIDGET(g_object_get_data(G_OBJECT(mainwindow), "newchannel")));
|
||||
gtk_widget_hide(GTK_WIDGET(g_object_get_data(G_OBJECT(mainwindow), "deleteconfiguration")));
|
||||
gtk_widget_hide(GTK_WIDGET(g_object_get_data(G_OBJECT(mainwindow), "deletechannel")));
|
||||
gtk_widget_hide(GTK_WIDGET(g_object_get_data(G_OBJECT(mainwindow), "diagnostics")));
|
||||
specwindow = create_specwindow();
|
||||
scopewindow = create_scopewindow();
|
||||
receivewindow = create_receivewindow();
|
||||
p3dwindow = create_p3dwindow();
|
||||
configmodel = create_configmodel();
|
||||
|
||||
{
|
||||
GtkWidget *w;
|
||||
GtkStyle *st;
|
||||
PangoFontDescription *font_desc = pango_font_description_from_string ("monospace 10");
|
||||
if (!font_desc) {
|
||||
g_printerr("Cannot load monospace\n");
|
||||
} else {
|
||||
w = GTK_WIDGET(g_object_get_data(G_OBJECT(p3dwindow), "packetraw"));
|
||||
st = gtk_style_copy(gtk_widget_get_style(w));
|
||||
st->font_desc = font_desc;
|
||||
gtk_widget_set_style(w, st);
|
||||
w = GTK_WIDGET(g_object_get_data(G_OBJECT(p3dwindow), "packetcooked"));
|
||||
gtk_widget_set_style(w, st);
|
||||
}
|
||||
}
|
||||
|
||||
while ((c = getopt_long(argc, argv, "v:sS", long_options, NULL)) != EOF) {
|
||||
switch (c) {
|
||||
case 'v':
|
||||
verblevel = strtoul(optarg, NULL, 0);
|
||||
break;
|
||||
|
||||
case 's':
|
||||
tosyslog = 1;
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
simd = 0;
|
||||
break;
|
||||
|
||||
case 'x':
|
||||
expert = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
err++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (err) {
|
||||
fprintf(stderr, "usage: [<configfile>]\n");
|
||||
exit(1);
|
||||
}
|
||||
if (expert) {
|
||||
fskpspdemodulator.next = &fskeqdemodulator;
|
||||
}
|
||||
loginit(verblevel, tosyslog);
|
||||
initsimd(simd);
|
||||
ioinit_sim();
|
||||
ioinit_filein();
|
||||
ioinit_soundcard();
|
||||
#ifdef WIN32
|
||||
buildtree();
|
||||
#else /* WIN32 */
|
||||
if (optind < argc)
|
||||
cfgfile = argv[optind];
|
||||
doc = xmlParseFile(cfgfile);
|
||||
if (doc && (!doc->children || !doc->children->name || strcmp(doc->children->name, "modem"))) {
|
||||
g_printerr("SoundModem Config: Invalid configuration file %s\n", cfgfile);
|
||||
exit(1);
|
||||
}
|
||||
if (!doc && (doc = xmlNewDoc("1.0")))
|
||||
doc->children = xmlNewDocNode(doc, NULL, "modem", NULL);
|
||||
if (!doc || !doc->children) {
|
||||
g_printerr("SoundModem Config: out of memory\n");
|
||||
exit(1);
|
||||
}
|
||||
buildtree(doc->children->children);
|
||||
#endif /* WIN32 */
|
||||
renumber_channels();
|
||||
gtk_tree_view_expand_all(GTK_TREE_VIEW(g_object_get_data(G_OBJECT(mainwindow), "configtree")));
|
||||
gtk_widget_show(mainwindow);
|
||||
gtk_main();
|
||||
#ifdef WIN32
|
||||
#else /* WIN32 */
|
||||
if (!xmlSaveFormatFile(cfgfile, doc, 1))
|
||||
g_printerr("SoundModem Config: error saving configuration file %s\n", cfgfile);
|
||||
xmlFreeDoc(doc);
|
||||
#endif /* WIN32 */
|
||||
return 0;
|
||||
}
|
||||
|
||||
346
configapp/src/scope.c
Normal file
346
configapp/src/scope.c
Normal file
|
|
@ -0,0 +1,346 @@
|
|||
/*
|
||||
* Sooundmodem Scope Widget
|
||||
* Copyright (C) 1999-2000 Thomas Sailer <sailer@ife.ee.ethz.ch>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "scope.h"
|
||||
#include "snm-compat-gtk2.h"
|
||||
#include <gtk/gtkgc.h>
|
||||
#include <gtk/gtkmain.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define PRIO G_PRIORITY_LOW
|
||||
|
||||
static void scope_class_init(ScopeClass *klass);
|
||||
static void scope_init(Scope *scope);
|
||||
static void scope_finalize(GObject *object);
|
||||
static gint scope_expose(GtkWidget *widget, GdkEventExpose *event);
|
||||
static void scope_realize(GtkWidget *widget);
|
||||
static void scope_unrealize(GtkWidget *widget);
|
||||
static void scope_size_allocate(GtkWidget *widget, GtkAllocation *allocation);
|
||||
static void scope_send_configure (Scope *scope);
|
||||
static gint idle_callback(gpointer data);
|
||||
|
||||
static GtkWidgetClass *parent_class = NULL;
|
||||
static ScopeClass *scope_class = NULL;
|
||||
|
||||
|
||||
guint scope_get_type(void)
|
||||
{
|
||||
static guint scope_type = 0;
|
||||
|
||||
if (!scope_type)
|
||||
{
|
||||
static const GTypeInfo scope_info =
|
||||
{
|
||||
sizeof(ScopeClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)scope_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(Scope),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)scope_init,
|
||||
};
|
||||
scope_type = g_type_register_static
|
||||
(GTK_TYPE_WIDGET, "Scope", &scope_info, 0);
|
||||
}
|
||||
return scope_type;
|
||||
}
|
||||
|
||||
static void scope_class_init(ScopeClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
|
||||
object_class = (GObjectClass*)klass;
|
||||
widget_class = (GtkWidgetClass*)klass;
|
||||
|
||||
parent_class = g_type_class_peek(GTK_TYPE_WIDGET);
|
||||
scope_class = klass;
|
||||
|
||||
object_class->finalize = scope_finalize;
|
||||
widget_class->expose_event = scope_expose;
|
||||
widget_class->realize = scope_realize;
|
||||
widget_class->unrealize = scope_unrealize;
|
||||
widget_class->size_allocate = scope_size_allocate;
|
||||
}
|
||||
|
||||
static void scope_init(Scope *scope)
|
||||
{
|
||||
scope->idlefunc = 0;
|
||||
/* initialize the colors */
|
||||
scope->tracecol.red = 11796;
|
||||
scope->tracecol.green = 53740;
|
||||
scope->tracecol.blue = 4588;
|
||||
scope->gridcol.red = 52429;
|
||||
scope->gridcol.green = 52429;
|
||||
scope->gridcol.blue = 52429;
|
||||
scope->trace_gc = scope->grid_gc = NULL;
|
||||
scope->pixmap = NULL;
|
||||
/* initialize the data */
|
||||
memset(&scope->y, 0, sizeof(scope->y));
|
||||
}
|
||||
|
||||
static void scope_realize(GtkWidget *widget)
|
||||
{
|
||||
Scope *scope;
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
GdkGCValues gc_values;
|
||||
GtkAllocation allocation;
|
||||
GdkWindow *window;
|
||||
GtkStyle *style;
|
||||
|
||||
g_return_if_fail(widget != NULL);
|
||||
g_return_if_fail(IS_SCOPE(widget));
|
||||
|
||||
scope = SCOPE(widget);
|
||||
gtk_widget_set_realized(widget, TRUE);
|
||||
gtk_widget_get_allocation(widget, &allocation);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
attributes.x = allocation.x;
|
||||
attributes.y = allocation.y;
|
||||
attributes.width = allocation.width;
|
||||
attributes.height = allocation.height;
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
attributes.visual = gtk_widget_get_visual(widget);
|
||||
attributes.colormap = gtk_widget_get_colormap(widget);
|
||||
attributes.event_mask = gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
|
||||
gtk_widget_set_has_window(widget, TRUE);
|
||||
window = gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, attributes_mask);
|
||||
gtk_widget_set_window(widget, window);
|
||||
gdk_window_set_user_data(window, scope);
|
||||
|
||||
gtk_widget_style_attach(widget);
|
||||
style = gtk_widget_get_style(widget);
|
||||
gtk_style_set_background(style, window, GTK_STATE_NORMAL);
|
||||
|
||||
/* gc's if necessary */
|
||||
if (!gdk_colormap_alloc_color(style->colormap, &scope->tracecol,
|
||||
FALSE, TRUE))
|
||||
g_warning("unable to allocate color: ( %d %d %d )",
|
||||
scope->tracecol.red, scope->tracecol.green, scope->tracecol.blue);
|
||||
gc_values.foreground = scope->tracecol;
|
||||
scope->trace_gc = gtk_gc_get(style->depth,
|
||||
style->colormap,
|
||||
&gc_values, GDK_GC_FOREGROUND);
|
||||
if (!gdk_colormap_alloc_color(style->colormap, &scope->gridcol,
|
||||
FALSE, TRUE))
|
||||
g_warning("unable to allocate color: ( %d %d %d )",
|
||||
scope->gridcol.red, scope->gridcol.green, scope->gridcol.blue);
|
||||
gc_values.foreground = scope->gridcol;
|
||||
scope->grid_gc = gtk_gc_get(style->depth,
|
||||
style->colormap,
|
||||
&gc_values, GDK_GC_FOREGROUND);
|
||||
/* create backing store */
|
||||
scope->pixmap = gdk_pixmap_new(window, SCOPE_WIDTH, SCOPE_HEIGHT, -1);
|
||||
|
||||
scope_send_configure(SCOPE(widget));
|
||||
}
|
||||
|
||||
static void scope_unrealize(GtkWidget *widget)
|
||||
{
|
||||
Scope *scope;
|
||||
|
||||
g_return_if_fail(widget != NULL);
|
||||
g_return_if_fail(IS_SCOPE(widget));
|
||||
|
||||
scope = SCOPE(widget);
|
||||
if (scope->idlefunc)
|
||||
g_source_remove(scope->idlefunc);
|
||||
if (scope->trace_gc)
|
||||
gtk_gc_release(scope->trace_gc);
|
||||
if (scope->grid_gc)
|
||||
gtk_gc_release(scope->grid_gc);
|
||||
scope->trace_gc = scope->grid_gc = NULL;
|
||||
if (scope->pixmap)
|
||||
g_object_unref(scope->pixmap);
|
||||
scope->pixmap = NULL;
|
||||
if (GTK_WIDGET_CLASS(parent_class)->unrealize)
|
||||
(*GTK_WIDGET_CLASS(parent_class)->unrealize)(widget);
|
||||
}
|
||||
|
||||
static void scope_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
|
||||
{
|
||||
GtkAllocation alloc;
|
||||
|
||||
g_return_if_fail(widget != NULL);
|
||||
g_return_if_fail(IS_SCOPE(widget));
|
||||
g_return_if_fail(allocation != NULL);
|
||||
|
||||
alloc = *allocation;
|
||||
alloc.width = SCOPE_WIDTH;
|
||||
alloc.height = SCOPE_HEIGHT;
|
||||
gtk_widget_set_allocation(widget, &alloc);
|
||||
|
||||
if (gtk_widget_get_realized(widget)) {
|
||||
gdk_window_move_resize (gtk_widget_get_window(widget),
|
||||
allocation->x, allocation->y,
|
||||
allocation->width, allocation->height);
|
||||
scope_send_configure(SCOPE(widget));
|
||||
}
|
||||
}
|
||||
|
||||
static void scope_send_configure(Scope *scope)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GdkEventConfigure event;
|
||||
GtkAllocation allocation;
|
||||
|
||||
widget = GTK_WIDGET(scope);
|
||||
gtk_widget_get_allocation(widget, &allocation);
|
||||
|
||||
event.type = GDK_CONFIGURE;
|
||||
event.window = gtk_widget_get_window(widget);
|
||||
event.send_event = TRUE;
|
||||
event.x = allocation.x;
|
||||
event.y = allocation.y;
|
||||
event.width = allocation.width;
|
||||
event.height = allocation.height;
|
||||
|
||||
gtk_widget_event(widget, (GdkEvent*)&event);
|
||||
}
|
||||
|
||||
|
||||
GtkWidget* scope_new(const char *name, void *dummy0, void *dummy1, unsigned int dummy2, unsigned int dummy3)
|
||||
{
|
||||
Scope *scope;
|
||||
|
||||
scope = g_object_new(scope_get_type(), NULL);
|
||||
memset(&scope->y, 0, sizeof(scope->y));
|
||||
return GTK_WIDGET(scope);
|
||||
}
|
||||
|
||||
static void scope_finalize(GObject *object)
|
||||
{
|
||||
g_return_if_fail(object != NULL);
|
||||
g_return_if_fail(IS_SCOPE(object));
|
||||
(*G_OBJECT_CLASS(parent_class)->finalize)(object);
|
||||
}
|
||||
|
||||
static gint scope_expose(GtkWidget *widget, GdkEventExpose *event)
|
||||
{
|
||||
Scope *scope;
|
||||
|
||||
g_return_val_if_fail(widget != NULL, FALSE);
|
||||
g_return_val_if_fail(IS_SCOPE(widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
if (gtk_widget_is_drawable(widget)) {
|
||||
scope = SCOPE(widget);
|
||||
if (!scope->idlefunc)
|
||||
scope->idlefunc = g_idle_add_full(PRIO, idle_callback, scope, NULL);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void draw(Scope *scope)
|
||||
{
|
||||
guint segcnt, i;
|
||||
GdkPoint pt[SCOPE_WIDTH+1];
|
||||
GdkSegment seg[100], *segp;
|
||||
GtkWidget *widget;
|
||||
GtkAllocation allocation;
|
||||
GtkStyle *style;
|
||||
|
||||
widget = GTK_WIDGET(scope);
|
||||
g_return_if_fail(gtk_widget_is_drawable(widget));
|
||||
g_return_if_fail(scope->pixmap);
|
||||
gtk_widget_get_allocation(widget, &allocation);
|
||||
style = gtk_widget_get_style(widget);
|
||||
/* calculate grid segments */
|
||||
for (segp = seg, segcnt = i = 0; i < SCOPE_WIDTH; i += SCOPE_WIDTH/8) {
|
||||
segp->x1 = segp->x2 = i;
|
||||
segp->y1 = SCOPE_HEIGHT/2-5;
|
||||
segp->y2 = SCOPE_HEIGHT/2+5;
|
||||
segp++;
|
||||
segcnt++;
|
||||
}
|
||||
segp->y1 = segp->y2 = SCOPE_HEIGHT/2;
|
||||
segp->x1 = 0;
|
||||
segp->x2 = SCOPE_WIDTH-1;
|
||||
segp++;
|
||||
segcnt++;
|
||||
/* copy data points */
|
||||
for (i = 0; i < SCOPE_WIDTH; i++) {
|
||||
pt[i].x = i;
|
||||
pt[i].y = ((32767-(int)scope->y[i])*SCOPE_HEIGHT) >> 16;
|
||||
}
|
||||
/* clear window */
|
||||
gdk_draw_rectangle(scope->pixmap, style->base_gc[gtk_widget_get_state(widget)],
|
||||
TRUE, 0, 0,
|
||||
allocation.width,
|
||||
allocation.height);
|
||||
/* draw grid */
|
||||
gdk_draw_segments(scope->pixmap, scope->grid_gc, seg, segcnt);
|
||||
/* draw trace */
|
||||
gdk_draw_lines(scope->pixmap, scope->trace_gc, pt, SCOPE_WIDTH);
|
||||
/* draw to screen */
|
||||
gdk_draw_drawable(gtk_widget_get_window(widget), style->base_gc[gtk_widget_get_state(widget)], scope->pixmap,
|
||||
0, 0, 0, 0, allocation.width, allocation.height);
|
||||
}
|
||||
|
||||
|
||||
static gint idle_callback(gpointer data)
|
||||
{
|
||||
g_return_val_if_fail(data != NULL, FALSE);
|
||||
g_return_val_if_fail(IS_SCOPE(data), FALSE);
|
||||
SCOPE(data)->idlefunc = 0;
|
||||
if (!gtk_widget_is_drawable(GTK_WIDGET(data)))
|
||||
return FALSE;
|
||||
draw(SCOPE(data));
|
||||
return FALSE; /* don't call this callback again */
|
||||
}
|
||||
|
||||
void scope_setdata(Scope *scope, short *samples)
|
||||
{
|
||||
g_return_if_fail(scope != NULL);
|
||||
g_return_if_fail(IS_SCOPE(scope));
|
||||
memcpy(scope->y, samples, sizeof(scope->y));
|
||||
if (gtk_widget_is_drawable(GTK_WIDGET(scope))) {
|
||||
if (!scope->idlefunc)
|
||||
scope->idlefunc = g_idle_add_full(PRIO, idle_callback, scope, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
void scope_setmarker(Scope *scope, int pointer)
|
||||
{
|
||||
g_return_if_fail(scope != NULL);
|
||||
g_return_if_fail(IS_SCOPE(scope));
|
||||
if (pointer >= 0 && pointer < SCOPE_WIDTH)
|
||||
scope->pointer = pointer;
|
||||
if (GTK_WIDGET_DRAWABLE(GTK_WIDGET(scope))) {
|
||||
if (!scope->idlefunc)
|
||||
scope->idlefunc = g_idle_add_full(PRIO, idle_callback, scope, NULL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
75
configapp/src/scope.h
Normal file
75
configapp/src/scope.h
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Scope Widget
|
||||
* Copyright (C) 1999-2000 Thomas Sailer <sailer@ife.ee.ethz.ch>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __SCOPE_H__
|
||||
#define __SCOPE_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define SCOPE(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, scope_get_type(), Scope)
|
||||
#define SCOPE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, scope_get_type(), ScopeClass)
|
||||
#define IS_SCOPE(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, scope_get_type())
|
||||
|
||||
typedef struct _Scope Scope;
|
||||
typedef struct _ScopeClass ScopeClass;
|
||||
|
||||
#define SCOPE_NUMSAMPLES 512
|
||||
|
||||
#define SCOPE_WIDTH (SCOPE_NUMSAMPLES)
|
||||
#define SCOPE_HEIGHT 384
|
||||
|
||||
struct _Scope
|
||||
{
|
||||
GtkWidget widget;
|
||||
|
||||
guint idlefunc;
|
||||
GdkGC *trace_gc;
|
||||
GdkGC *grid_gc;
|
||||
GdkGC *pointer_gc;
|
||||
GdkColor tracecol;
|
||||
GdkColor gridcol;
|
||||
|
||||
GdkPixmap *pixmap;
|
||||
|
||||
short y[SCOPE_WIDTH];
|
||||
};
|
||||
|
||||
struct _ScopeClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
guint scope_get_type(void);
|
||||
GtkWidget* scope_new(const char *name, void *dummy0, void *dummy1, unsigned int dummy2, unsigned int dummy3);
|
||||
void scope_setdata(Scope *scope, short *samples);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __SCOPE_H__ */
|
||||
63
configapp/src/snm-compat-gtk2.h
Normal file
63
configapp/src/snm-compat-gtk2.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
#ifndef SNM_COMPAT_GTK2_H
|
||||
#define SNM_COMPAT_GTK2_H
|
||||
|
||||
/* To be included only from C files, not headers. */
|
||||
|
||||
|
||||
#ifndef HAVE_GTK_DIALOG_GET_ACTION_AREA
|
||||
#define gtk_dialog_get_action_area(_d_) (_d_)->action_area
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_DIALOG_GET_CONTENT_AREA
|
||||
#define gtk_dialog_get_content_area(_d_) (_d_)->vbox
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_GET_ALLOCATION
|
||||
#define gtk_widget_get_allocation(_w_,_a_) (*(_a_) = (_w_)->allocation)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_SET_ALLOCATION
|
||||
#define gtk_widget_set_allocation(_w_,_a_) ((_w_)->allocation = *(_a_))
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_GET_REALIZED
|
||||
#define gtk_widget_get_realized(_w_) GTK_WIDGET_REALIZED(_w_)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_SET_REALIZED
|
||||
#define gtk_widget_set_realized(_w_,_r_) do { if (_r_) GTK_WIDGET_SET_FLAGS(_w_, GTK_REALIZED); else GTK_WIDGET_UNSET_FLAGS(_w_, GTK_REALIZED); } while (0)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_GET_STATE
|
||||
#define gtk_widget_get_state(_w_) (_w_)->state
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_GET_WINDOW
|
||||
#define gtk_widget_get_window(_w_) (_w_)->window
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_SET_WINDOW
|
||||
#define gtk_widget_set_window(_w_,_o_) ((_w_)->window = (_o_))
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_SET_HAS_WINDOW
|
||||
#define gtk_widget_set_has_window(_w_, _h_) {}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_IS_DRAWABLE
|
||||
#define gtk_widget_is_drawable(_w_) GTK_WIDGET_DRAWABLE(_w_)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_SET_CAN_DEFAULT
|
||||
#define gtk_widget_set_can_default(_w_,_d_) do { if (_d_) GTK_WIDGET_SET_FLAGS(_w_, GTK_CAN_DEFAULT); else GTK_WIDGET_UNSET_FLAGS(_w_, GTK_CAN_DEFAULT); } while (0)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_SET_CAN_FOCUS
|
||||
#define gtk_widget_set_can_focus(_w_,_f_) do { if (_f_) GTK_WIDGET_SET_FLAGS(_w_, GTK_CAN_FOCUS); else GTK_WIDGET_UNSET_FLAGS(_w_, GTK_CAN_FOCUS); } while (0)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GTK_WIDGET_STYLE_ATTACH
|
||||
#define gtk_widget_style_attach(_w_) (_w_->style = gtk_style_attach (_w_->style, _w_->window))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
28
configapp/src/soundmodemconfig.8
Normal file
28
configapp/src/soundmodemconfig.8
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
.\" Copyright 2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
|
||||
.\" May be distributed under the GNU General Public License
|
||||
.\"
|
||||
.\" "
|
||||
.TH SOUNDMODEMCONFIG 8 "1 August 2000" "SOUNDMODEM 0.2" "Linux AX.25 Utilities Manual"
|
||||
.SH NAME
|
||||
soundmodemconfig \- Soundcard modem configuration utility
|
||||
.SH SYNOPSIS
|
||||
.B soundmodemconfig
|
||||
.B "[ \-sSRM ]"
|
||||
.B "[\-v verbosity level]"
|
||||
.B "[\-c configuration name]"
|
||||
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B soundmodemconfig
|
||||
is a GUI tool for creating a configuration file for soundmodem (8).
|
||||
The default file name is /etc/ax25/soundmodem.conf, though
|
||||
any other file name may be specified on the command line.
|
||||
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.nf
|
||||
.BR ifconfig "\ (8), " soundmodem "\ (8)"
|
||||
.fi
|
||||
|
||||
.SH AUTHOR
|
||||
soundmodemconfig was written by Thomas Sailer, HB9JNX/AE4WA (sailer@ife.ee.ethz.ch).
|
||||
476
configapp/src/spectrum.c
Normal file
476
configapp/src/spectrum.c
Normal file
|
|
@ -0,0 +1,476 @@
|
|||
/*
|
||||
* Sooundmodem Spectrum Widget
|
||||
* Copyright (C) 1999-2000 Thomas Sailer <sailer@ife.ee.ethz.ch>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "spectrum.h"
|
||||
#include "snm-compat-gtk2.h"
|
||||
#include <gtk/gtkgc.h>
|
||||
#include <gtk/gtkmain.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
static inline float hamming(float x)
|
||||
{
|
||||
return 0.54-0.46*cos(2*M_PI*x);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* This fft routine is from ~gabriel/src/filters/fft/fft.c;
|
||||
* I am unsure of the original source. The file contains no
|
||||
* copyright notice or description.
|
||||
* The declaration is changed to the prototype form but the
|
||||
* function body is unchanged. (J. T. Buck)
|
||||
*/
|
||||
|
||||
#define SWAP(a, b) tempr=(a); (a)=(b); (b)=tempr
|
||||
|
||||
/*
|
||||
* Replace data by its discrete Fourier transform, if isign is
|
||||
* input as 1, or by its inverse discrete Fourier transform, if
|
||||
* "isign" is input as -1. "data'"is a complex array of length "nn",
|
||||
* input as a real array data[0..2*nn-1]. "nn" MUST be an integer
|
||||
* power of 2 (this is not checked for!?)
|
||||
*/
|
||||
|
||||
static void fft_rif(float *data, int nn, int isign)
|
||||
{
|
||||
int n;
|
||||
int mmax;
|
||||
int m, j, istep, i;
|
||||
float wtemp, wr, wpr, wpi, wi, theta;
|
||||
float tempr, tempi;
|
||||
|
||||
data--;
|
||||
n = nn << 1;
|
||||
j = 1;
|
||||
|
||||
for (i = 1; i < n; i += 2) {
|
||||
if(j > i) {
|
||||
SWAP(data[j], data[i]);
|
||||
SWAP(data[j+1], data[i+1]);
|
||||
}
|
||||
m= n >> 1;
|
||||
while (m >= 2 && j >m) {
|
||||
j -= m;
|
||||
m >>= 1;
|
||||
}
|
||||
j += m;
|
||||
}
|
||||
mmax = 2;
|
||||
while (n > mmax) {
|
||||
istep = 2*mmax;
|
||||
theta = -6.28318530717959/(isign*mmax);
|
||||
wtemp = sin(0.5*theta);
|
||||
wpr = -2.0*wtemp*wtemp;
|
||||
wpi = sin(theta);
|
||||
wr = 1.0;
|
||||
wi = 0.0;
|
||||
for (m = 1; m < mmax; m += 2) {
|
||||
for (i = m; i < n; i += istep) {
|
||||
j = i + mmax;
|
||||
tempr = wr*data[j] - wi*data[j+1];
|
||||
tempi = wr*data[j+1] + wi*data[j];
|
||||
data[j] = data[i] - tempr;
|
||||
data[j+1] = data[i+1] - tempi;
|
||||
data[i] += tempr;
|
||||
data[i+1] += tempi;
|
||||
}
|
||||
wr = (wtemp=wr)*wpr - wi*wpi+wr;
|
||||
wi = wi*wpr + wtemp*wpi + wi;
|
||||
}
|
||||
mmax = istep;
|
||||
}
|
||||
}
|
||||
|
||||
#undef SWAP
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
static inline float fsqr(float x)
|
||||
{
|
||||
return x*x;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define PRIO G_PRIORITY_LOW
|
||||
#define DBSPAN 80
|
||||
|
||||
static void spectrum_class_init(SpectrumClass *klass);
|
||||
static void spectrum_init(Spectrum *spec);
|
||||
static void spectrum_finalize(GObject *object);
|
||||
static gint spectrum_expose(GtkWidget *widget, GdkEventExpose *event);
|
||||
static void spectrum_realize(GtkWidget *widget);
|
||||
static void spectrum_unrealize(GtkWidget *widget);
|
||||
static void spectrum_size_allocate(GtkWidget *widget, GtkAllocation *allocation);
|
||||
static void spectrum_send_configure (Spectrum *spec);
|
||||
static gint idle_callback(gpointer data);
|
||||
|
||||
static GtkWidgetClass *parent_class = NULL;
|
||||
static SpectrumClass *spectrum_class = NULL;
|
||||
|
||||
|
||||
guint spectrum_get_type(void)
|
||||
{
|
||||
static guint spectrum_type = 0;
|
||||
|
||||
if (!spectrum_type)
|
||||
{
|
||||
static const GTypeInfo spectrum_info =
|
||||
{
|
||||
sizeof(SpectrumClass),
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc)spectrum_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof(Spectrum),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc)spectrum_init,
|
||||
};
|
||||
spectrum_type = g_type_register_static
|
||||
(GTK_TYPE_WIDGET, "Spectrum", &spectrum_info, 0);
|
||||
}
|
||||
return spectrum_type;
|
||||
}
|
||||
|
||||
static void spectrum_class_init(SpectrumClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
|
||||
object_class = (GObjectClass*)klass;
|
||||
widget_class = (GtkWidgetClass*)klass;
|
||||
|
||||
parent_class = g_type_class_peek(GTK_TYPE_WIDGET);
|
||||
spectrum_class = klass;
|
||||
|
||||
object_class->finalize = spectrum_finalize;
|
||||
widget_class->expose_event = spectrum_expose;
|
||||
widget_class->realize = spectrum_realize;
|
||||
widget_class->unrealize = spectrum_unrealize;
|
||||
widget_class->size_allocate = spectrum_size_allocate;
|
||||
}
|
||||
|
||||
static void spectrum_init(Spectrum *spec)
|
||||
{
|
||||
spec->idlefunc = 0;
|
||||
/* initialize the colors */
|
||||
spec->tracecol.red = 11796;
|
||||
spec->tracecol.green = 53740;
|
||||
spec->tracecol.blue = 4588;
|
||||
spec->gridcol.red = 52429;
|
||||
spec->gridcol.green = 52429;
|
||||
spec->gridcol.blue = 52429;
|
||||
spec->pointercol.red = 65535;
|
||||
spec->pointercol.green = 0;
|
||||
spec->pointercol.blue = 65535;
|
||||
spec->trace_gc = spec->grid_gc = spec->pointer_gc = NULL;
|
||||
spec->pixmap = NULL;
|
||||
/* initialize the data */
|
||||
memset(&spec->y, 0, sizeof(spec->y));
|
||||
spec->pointer = 0;
|
||||
}
|
||||
|
||||
static void spectrum_realize(GtkWidget *widget)
|
||||
{
|
||||
Spectrum *spec;
|
||||
GdkWindowAttr attributes;
|
||||
gint attributes_mask;
|
||||
GdkGCValues gc_values;
|
||||
GtkAllocation allocation;
|
||||
GdkWindow *window;
|
||||
GtkStyle *style;
|
||||
|
||||
g_return_if_fail(widget != NULL);
|
||||
g_return_if_fail(IS_SPECTRUM(widget));
|
||||
|
||||
spec = SPECTRUM(widget);
|
||||
gtk_widget_set_realized(widget, TRUE);
|
||||
gtk_widget_get_allocation(widget, &allocation);
|
||||
|
||||
attributes.window_type = GDK_WINDOW_CHILD;
|
||||
|
||||
attributes.x = allocation.x;
|
||||
attributes.y = allocation.y;
|
||||
attributes.width = allocation.width;
|
||||
attributes.height = allocation.height;
|
||||
attributes.wclass = GDK_INPUT_OUTPUT;
|
||||
attributes.visual = gtk_widget_get_visual(widget);
|
||||
attributes.colormap = gtk_widget_get_colormap(widget);
|
||||
attributes.event_mask = gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK;
|
||||
|
||||
attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
|
||||
|
||||
gtk_widget_set_has_window(widget, TRUE);
|
||||
window = gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, attributes_mask);
|
||||
gtk_widget_set_window(widget, window);
|
||||
gdk_window_set_user_data(window, spec);
|
||||
|
||||
gtk_widget_style_attach(widget);
|
||||
style = gtk_widget_get_style(widget);
|
||||
gtk_style_set_background(style, window, GTK_STATE_NORMAL);
|
||||
|
||||
/* gc's if necessary */
|
||||
if (!gdk_colormap_alloc_color(style->colormap, &spec->tracecol,
|
||||
FALSE, TRUE))
|
||||
g_warning("unable to allocate color: ( %d %d %d )",
|
||||
spec->tracecol.red, spec->tracecol.green, spec->tracecol.blue);
|
||||
gc_values.foreground = spec->tracecol;
|
||||
spec->trace_gc = gtk_gc_get(style->depth,
|
||||
style->colormap,
|
||||
&gc_values, GDK_GC_FOREGROUND);
|
||||
if (!gdk_colormap_alloc_color(style->colormap, &spec->gridcol,
|
||||
FALSE, TRUE))
|
||||
g_warning("unable to allocate color: ( %d %d %d )",
|
||||
spec->gridcol.red, spec->gridcol.green, spec->gridcol.blue);
|
||||
gc_values.foreground = spec->gridcol;
|
||||
spec->grid_gc = gtk_gc_get(style->depth,
|
||||
style->colormap,
|
||||
&gc_values, GDK_GC_FOREGROUND);
|
||||
if (!gdk_colormap_alloc_color(style->colormap,
|
||||
&spec->pointercol, FALSE, TRUE))
|
||||
g_warning("unable to allocate color: ( %d %d %d )",
|
||||
spec->pointercol.red, spec->pointercol.green, spec->pointercol.blue);
|
||||
gc_values.foreground = spec->pointercol;
|
||||
spec->pointer_gc = gtk_gc_get(style->depth,
|
||||
style->colormap,
|
||||
&gc_values, GDK_GC_FOREGROUND);
|
||||
/* create backing store */
|
||||
spec->pixmap = gdk_pixmap_new(window, SPECTRUM_WIDTH, SPECTRUM_HEIGHT, -1);
|
||||
|
||||
spectrum_send_configure(SPECTRUM(widget));
|
||||
}
|
||||
|
||||
static void spectrum_unrealize(GtkWidget *widget)
|
||||
{
|
||||
Spectrum *spec;
|
||||
|
||||
g_return_if_fail(widget != NULL);
|
||||
g_return_if_fail(IS_SPECTRUM(widget));
|
||||
|
||||
spec = SPECTRUM(widget);
|
||||
if (spec->idlefunc)
|
||||
g_source_remove(spec->idlefunc);
|
||||
if (spec->trace_gc)
|
||||
gtk_gc_release(spec->trace_gc);
|
||||
if (spec->grid_gc)
|
||||
gtk_gc_release(spec->grid_gc);
|
||||
if (spec->pointer_gc)
|
||||
gtk_gc_release(spec->pointer_gc);
|
||||
spec->trace_gc = spec->grid_gc = spec->pointer_gc = NULL;
|
||||
if (spec->pixmap)
|
||||
g_object_unref(spec->pixmap);
|
||||
spec->pixmap = NULL;
|
||||
if (GTK_WIDGET_CLASS(parent_class)->unrealize)
|
||||
(*GTK_WIDGET_CLASS(parent_class)->unrealize)(widget);
|
||||
}
|
||||
|
||||
static void spectrum_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
|
||||
{
|
||||
GtkAllocation alloc;
|
||||
|
||||
g_return_if_fail(widget != NULL);
|
||||
g_return_if_fail(IS_SPECTRUM(widget));
|
||||
g_return_if_fail(allocation != NULL);
|
||||
|
||||
alloc = *allocation;
|
||||
alloc.width = SPECTRUM_WIDTH;
|
||||
alloc.height = SPECTRUM_HEIGHT;
|
||||
gtk_widget_set_allocation(widget, &alloc);
|
||||
|
||||
if (gtk_widget_get_realized(widget)) {
|
||||
gdk_window_move_resize (gtk_widget_get_window(widget),
|
||||
allocation->x, allocation->y,
|
||||
allocation->width, allocation->height);
|
||||
spectrum_send_configure(SPECTRUM(widget));
|
||||
}
|
||||
}
|
||||
|
||||
static void spectrum_send_configure(Spectrum *spec)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GdkEventConfigure event;
|
||||
GtkAllocation allocation;
|
||||
|
||||
widget = GTK_WIDGET(spec);
|
||||
gtk_widget_get_allocation(widget, &allocation);
|
||||
|
||||
event.type = GDK_CONFIGURE;
|
||||
event.window = gtk_widget_get_window(widget);
|
||||
event.send_event = TRUE;
|
||||
event.x = allocation.x;
|
||||
event.y = allocation.y;
|
||||
event.width = allocation.width;
|
||||
event.height = allocation.height;
|
||||
|
||||
gtk_widget_event(widget, (GdkEvent*)&event);
|
||||
}
|
||||
|
||||
|
||||
GtkWidget* spectrum_new(const char *name, void *dummy0, void *dummy1, unsigned int dummy2, unsigned int dummy3)
|
||||
{
|
||||
Spectrum *spec;
|
||||
unsigned int i;
|
||||
|
||||
spec = g_object_new(spectrum_get_type(), NULL);
|
||||
memset(&spec->y, 0, sizeof(spec->y));
|
||||
for (i = 0; i < SPECTRUM_NUMSAMPLES; i++)
|
||||
spec->window[i] = (1.0 / 32767.0 / SPECTRUM_NUMSAMPLES) * hamming(i * (1.0 / (SPECTRUM_NUMSAMPLES-1)));
|
||||
return GTK_WIDGET(spec);
|
||||
}
|
||||
|
||||
static void spectrum_finalize(GObject *object)
|
||||
{
|
||||
g_return_if_fail(object != NULL);
|
||||
g_return_if_fail(IS_SPECTRUM(object));
|
||||
(*G_OBJECT_CLASS(parent_class)->finalize)(object);
|
||||
}
|
||||
|
||||
static gint spectrum_expose(GtkWidget *widget, GdkEventExpose *event)
|
||||
{
|
||||
Spectrum *spec;
|
||||
|
||||
g_return_val_if_fail(widget != NULL, FALSE);
|
||||
g_return_val_if_fail(IS_SPECTRUM(widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
if (gtk_widget_is_drawable(widget)) {
|
||||
spec = SPECTRUM(widget);
|
||||
if (!spec->idlefunc)
|
||||
spec->idlefunc = g_idle_add_full(PRIO, idle_callback, spec, NULL);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void draw(Spectrum *spec)
|
||||
{
|
||||
guint segcnt, i;
|
||||
GdkPoint pt[SPECTRUM_WIDTH+1];
|
||||
GdkSegment seg[100], *segp;
|
||||
GtkWidget *widget;
|
||||
GtkAllocation allocation;
|
||||
GtkStyle *style;
|
||||
|
||||
widget = GTK_WIDGET(spec);
|
||||
g_return_if_fail(gtk_widget_is_drawable(widget));
|
||||
g_return_if_fail(spec->pixmap);
|
||||
gtk_widget_get_allocation(widget, &allocation);
|
||||
style = gtk_widget_get_style(widget);
|
||||
/* calculate grid segments */
|
||||
for (segp = seg, segcnt = i = 0; i < SPECTRUM_WIDTH; i += SPECTRUM_WIDTH/8) {
|
||||
segp->x1 = segp->x2 = i;
|
||||
segp->y1 = 0;
|
||||
segp->y2 = SPECTRUM_HEIGHT-1;
|
||||
segp++;
|
||||
segcnt++;
|
||||
}
|
||||
for (i = 0; i < SPECTRUM_HEIGHT; i += (SPECTRUM_HEIGHT * 10 + DBSPAN/2) / DBSPAN) {
|
||||
segp->y1 = segp->y2 = i;
|
||||
segp->x1 = 0;
|
||||
segp->x2 = SPECTRUM_WIDTH-1;
|
||||
segp++;
|
||||
segcnt++;
|
||||
}
|
||||
/* copy data points */
|
||||
for (i = 0; i < SPECTRUM_WIDTH; i++) {
|
||||
pt[i].x = i;
|
||||
pt[i].y = spec->y[i];
|
||||
}
|
||||
/* clear window */
|
||||
gdk_draw_rectangle(spec->pixmap, style->base_gc[gtk_widget_get_state(widget)],
|
||||
TRUE, 0, 0,
|
||||
allocation.width,
|
||||
allocation.height);
|
||||
/* draw grid */
|
||||
gdk_draw_segments(spec->pixmap, spec->grid_gc, seg, segcnt);
|
||||
/* draw markers */
|
||||
gdk_draw_line(spec->pixmap, spec->pointer_gc,
|
||||
spec->pointer,
|
||||
0,
|
||||
spec->pointer,
|
||||
allocation.height-1);
|
||||
/* draw trace */
|
||||
gdk_draw_lines(spec->pixmap, spec->trace_gc, pt, SPECTRUM_WIDTH);
|
||||
/* draw to screen */
|
||||
gdk_draw_drawable(gtk_widget_get_window(widget), style->base_gc[gtk_widget_get_state(widget)], spec->pixmap,
|
||||
0, 0, 0, 0, allocation.width, allocation.height);
|
||||
}
|
||||
|
||||
|
||||
static gint idle_callback(gpointer data)
|
||||
{
|
||||
g_return_val_if_fail(data != NULL, FALSE);
|
||||
g_return_val_if_fail(IS_SPECTRUM(data), FALSE);
|
||||
SPECTRUM(data)->idlefunc = 0;
|
||||
if (!gtk_widget_is_drawable(GTK_WIDGET(data)))
|
||||
return FALSE;
|
||||
draw(SPECTRUM(data));
|
||||
return FALSE; /* don't call this callback again */
|
||||
}
|
||||
|
||||
void spectrum_setdata(Spectrum *spec, short *samples)
|
||||
{
|
||||
float fdata[2*SPECTRUM_NUMSAMPLES];
|
||||
float f;
|
||||
unsigned int i;
|
||||
|
||||
g_return_if_fail(spec != NULL);
|
||||
g_return_if_fail(IS_SPECTRUM(spec));
|
||||
for (i = 0; i < SPECTRUM_NUMSAMPLES; i++) {
|
||||
fdata[2*i] = samples[i] * spec->window[i];
|
||||
fdata[2*i+1] = 0;
|
||||
}
|
||||
fft_rif(fdata, SPECTRUM_NUMSAMPLES, 1);
|
||||
for (i = 0; i < SPECTRUM_NUMSAMPLES; i++) {
|
||||
f = log10(fsqr(fdata[2*i]) + fsqr(fdata[2*i+1]));
|
||||
f *= -(10.0 * SPECTRUM_HEIGHT / DBSPAN);
|
||||
if (f < 0)
|
||||
f = 0;
|
||||
if (f > SPECTRUM_HEIGHT-1)
|
||||
f = SPECTRUM_HEIGHT-1;
|
||||
spec->y[i] = f;
|
||||
}
|
||||
if (gtk_widget_is_drawable(GTK_WIDGET(spec))) {
|
||||
if (!spec->idlefunc)
|
||||
spec->idlefunc = g_idle_add_full(PRIO, idle_callback, spec, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void spectrum_setmarker(Spectrum *spec, int pointer)
|
||||
{
|
||||
g_return_if_fail(spec != NULL);
|
||||
g_return_if_fail(IS_SPECTRUM(spec));
|
||||
if (pointer >= 0 && pointer < SPECTRUM_WIDTH)
|
||||
spec->pointer = pointer;
|
||||
if (gtk_widget_is_drawable(GTK_WIDGET(spec))) {
|
||||
if (!spec->idlefunc)
|
||||
spec->idlefunc = g_idle_add_full(PRIO, idle_callback, spec, NULL);
|
||||
}
|
||||
}
|
||||
81
configapp/src/spectrum.h
Normal file
81
configapp/src/spectrum.h
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Spectrum Widget
|
||||
* Copyright (C) 1999-2000 Thomas Sailer <sailer@ife.ee.ethz.ch>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __SPECTRUM_H__
|
||||
#define __SPECTRUM_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define SPECTRUM(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, spectrum_get_type(), Spectrum)
|
||||
#define SPECTRUM_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, spectrum_get_type(), SpectrumClass)
|
||||
#define IS_SPECTRUM(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, spectrum_get_type())
|
||||
|
||||
typedef struct _Spectrum Spectrum;
|
||||
typedef struct _SpectrumClass SpectrumClass;
|
||||
|
||||
#define SPECTRUM_NUMSAMPLES 1024
|
||||
|
||||
#define SPECTRUM_WIDTH ((SPECTRUM_NUMSAMPLES) >> 1)
|
||||
#define SPECTRUM_HEIGHT 384
|
||||
|
||||
struct _Spectrum
|
||||
{
|
||||
GtkWidget widget;
|
||||
|
||||
guint idlefunc;
|
||||
GdkGC *trace_gc;
|
||||
GdkGC *grid_gc;
|
||||
GdkGC *pointer_gc;
|
||||
GdkColor tracecol;
|
||||
GdkColor gridcol;
|
||||
GdkColor pointercol;
|
||||
|
||||
GdkPixmap *pixmap;
|
||||
|
||||
/* marker */
|
||||
unsigned int pointer;
|
||||
|
||||
unsigned short y[SPECTRUM_WIDTH];
|
||||
float window[SPECTRUM_NUMSAMPLES];
|
||||
};
|
||||
|
||||
struct _SpectrumClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
guint spectrum_get_type(void);
|
||||
GtkWidget* spectrum_new(const char *name, void *dummy0, void *dummy1, unsigned int dummy2, unsigned int dummy3);
|
||||
void spectrum_setdata(Spectrum *spec, short *samples);
|
||||
void spectrum_setmarker(Spectrum *spec, int pointer);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __SPECTRUM_H__ */
|
||||
144
configapp/src/support.c
Normal file
144
configapp/src/support.c
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "support.h"
|
||||
|
||||
GtkWidget*
|
||||
lookup_widget (GtkWidget *widget,
|
||||
const gchar *widget_name)
|
||||
{
|
||||
GtkWidget *parent, *found_widget;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (GTK_IS_MENU (widget))
|
||||
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
|
||||
else
|
||||
parent = gtk_widget_get_parent(widget);
|
||||
if (!parent)
|
||||
parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
|
||||
if (parent == NULL)
|
||||
break;
|
||||
widget = parent;
|
||||
}
|
||||
|
||||
found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
|
||||
widget_name);
|
||||
if (!found_widget)
|
||||
g_warning ("Widget not found: %s", widget_name);
|
||||
return found_widget;
|
||||
}
|
||||
|
||||
static GList *pixmaps_directories = NULL;
|
||||
|
||||
/* Use this function to set the directory containing installed pixmaps. */
|
||||
void
|
||||
add_pixmap_directory (const gchar *directory)
|
||||
{
|
||||
pixmaps_directories = g_list_prepend (pixmaps_directories,
|
||||
g_strdup (directory));
|
||||
}
|
||||
|
||||
/* This is an internally used function to find pixmap files. */
|
||||
static gchar*
|
||||
find_pixmap_file (const gchar *filename)
|
||||
{
|
||||
GList *elem;
|
||||
|
||||
/* We step through each of the pixmaps directory to find it. */
|
||||
elem = pixmaps_directories;
|
||||
while (elem)
|
||||
{
|
||||
gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
|
||||
G_DIR_SEPARATOR_S, filename);
|
||||
if (g_file_test (pathname, G_FILE_TEST_EXISTS))
|
||||
return pathname;
|
||||
g_free (pathname);
|
||||
elem = elem->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* This is an internally used function to create pixmaps. */
|
||||
GtkWidget*
|
||||
create_pixmap (GtkWidget *widget,
|
||||
const gchar *filename)
|
||||
{
|
||||
gchar *pathname = NULL;
|
||||
GtkWidget *pixmap;
|
||||
|
||||
if (!filename || !filename[0])
|
||||
return gtk_image_new ();
|
||||
|
||||
pathname = find_pixmap_file (filename);
|
||||
|
||||
if (!pathname)
|
||||
{
|
||||
g_warning (_("Couldn't find pixmap file: %s"), filename);
|
||||
return gtk_image_new ();
|
||||
}
|
||||
|
||||
pixmap = gtk_image_new_from_file (pathname);
|
||||
g_free (pathname);
|
||||
return pixmap;
|
||||
}
|
||||
|
||||
/* This is an internally used function to create pixmaps. */
|
||||
GdkPixbuf*
|
||||
create_pixbuf (const gchar *filename)
|
||||
{
|
||||
gchar *pathname = NULL;
|
||||
GdkPixbuf *pixbuf;
|
||||
GError *error = NULL;
|
||||
|
||||
if (!filename || !filename[0])
|
||||
return NULL;
|
||||
|
||||
pathname = find_pixmap_file (filename);
|
||||
|
||||
if (!pathname)
|
||||
{
|
||||
g_warning (_("Couldn't find pixmap file: %s"), filename);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
|
||||
if (!pixbuf)
|
||||
{
|
||||
fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
|
||||
pathname, error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
g_free (pathname);
|
||||
return pixbuf;
|
||||
}
|
||||
|
||||
/* This is used to set ATK action descriptions. */
|
||||
void
|
||||
glade_set_atk_action_description (AtkAction *action,
|
||||
const gchar *action_name,
|
||||
const gchar *description)
|
||||
{
|
||||
gint n_actions, i;
|
||||
|
||||
n_actions = atk_action_get_n_actions (action);
|
||||
for (i = 0; i < n_actions; i++)
|
||||
{
|
||||
if (!strcmp (atk_action_get_name (action, i), action_name))
|
||||
atk_action_set_description (action, i, description);
|
||||
}
|
||||
}
|
||||
|
||||
69
configapp/src/support.h
Normal file
69
configapp/src/support.h
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/*
|
||||
* Standard gettext macros.
|
||||
*/
|
||||
#ifdef ENABLE_NLS
|
||||
# include <libintl.h>
|
||||
# undef _
|
||||
# define _(String) dgettext (PACKAGE, String)
|
||||
# define Q_(String) g_strip_context ((String), gettext (String))
|
||||
# ifdef gettext_noop
|
||||
# define N_(String) gettext_noop (String)
|
||||
# else
|
||||
# define N_(String) (String)
|
||||
# endif
|
||||
#else
|
||||
# define textdomain(String) (String)
|
||||
# define gettext(String) (String)
|
||||
# define dgettext(Domain,Message) (Message)
|
||||
# define dcgettext(Domain,Message,Type) (Message)
|
||||
# define bindtextdomain(Domain,Directory) (Domain)
|
||||
# define _(String) (String)
|
||||
# define Q_(String) g_strip_context ((String), (String))
|
||||
# define N_(String) (String)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Public Functions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This function returns a widget in a component created by Glade.
|
||||
* Call it with the toplevel widget in the component (i.e. a window/dialog),
|
||||
* or alternatively any widget in the component, and the name of the widget
|
||||
* you want returned.
|
||||
*/
|
||||
GtkWidget* lookup_widget (GtkWidget *widget,
|
||||
const gchar *widget_name);
|
||||
|
||||
|
||||
/* Use this function to set the directory containing installed pixmaps. */
|
||||
void add_pixmap_directory (const gchar *directory);
|
||||
|
||||
|
||||
/*
|
||||
* Private Functions.
|
||||
*/
|
||||
|
||||
/* This is used to create the pixmaps used in the interface. */
|
||||
GtkWidget* create_pixmap (GtkWidget *widget,
|
||||
const gchar *filename);
|
||||
|
||||
/* This is used to create the pixbufs used in the interface. */
|
||||
GdkPixbuf* create_pixbuf (const gchar *filename);
|
||||
|
||||
/* This is used to set ATK action descriptions. */
|
||||
void glade_set_atk_action_description (AtkAction *action,
|
||||
const gchar *action_name,
|
||||
const gchar *description);
|
||||
|
||||
299
configure.in
Normal file
299
configure.in
Normal file
|
|
@ -0,0 +1,299 @@
|
|||
AC_INIT(soundmodem.spec)
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
AM_INIT_AUTOMAKE(soundmodem, 0.16)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_PREREQ(2.53)
|
||||
|
||||
dnl AC_CHECK_TOOL()
|
||||
|
||||
AC_PROG_MAKE_SET
|
||||
AC_ISC_POSIX
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
dnl AC_PROG_RANLIB
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_HEADER_STDC
|
||||
AC_FUNC_ALLOCA
|
||||
AC_PROG_CXX
|
||||
|
||||
AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)
|
||||
AC_CHECK_PROG(DLLTOOL, dlltool, dlltool, dlltool)
|
||||
AC_CHECK_PROG(AS, as, as, as, as)
|
||||
AC_CHECK_PROG(AR, ar, ar, ar, ar)
|
||||
AC_CHECK_PROG(LD, ld, ld, ld, ld)
|
||||
AC_CHECK_PROG(WINDRES, windres, windres, i686-pc-cygwin-windres)
|
||||
|
||||
AC_CYGWIN
|
||||
AC_MINGW32
|
||||
AC_EXEEXT
|
||||
AC_OBJEXT
|
||||
|
||||
dnl check for cross compiler path
|
||||
if test x$cross_compiling = xyes; then
|
||||
AC_MSG_CHECKING(for cross compiler path)
|
||||
if test -d /usr/local/cross/i686-pc-cygwin; then
|
||||
CROSSCOMPPATH=/usr/local/cross/i686-pc-cygwin
|
||||
elif test -d /usr/local/cygwin/i686-pc-cygwin; then
|
||||
CROSSCOMPPATH=/usr/local/cygwin/i686-pc-cygwin
|
||||
else
|
||||
AC_ERROR("cross compiler not found")
|
||||
fi
|
||||
AC_MSG_RESULT($CROSSCOMPPATH)
|
||||
fi
|
||||
|
||||
if test x$CYGWIN != xyes -a x$MINGW32 != xyes; then
|
||||
AC_CHECK_LIB(m,sqrt)
|
||||
fi
|
||||
AC_CHECK_LIB(pthread32,pthread_create,LIBTHREAD="$LIBTHREAD -lpthread32",AC_CHECK_LIB(pthread,pthread_create,LIBTHREAD="$LIBTHREAD -lpthread"))
|
||||
AC_CHECK_LIB(posix4,sched_setscheduler)
|
||||
AC_CHECK_LIB(uuid,GUID_NULL)
|
||||
AC_CHECK_FUNCS(getopt_long,,[AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1])])
|
||||
AC_CHECK_HEADERS(sys/audioio.h stropts.h sys/conf.h sys/soundcard.h sys/ioctl.h time.h inttypes.h net/if_arp.h)
|
||||
AC_CHECK_HEADERS(pty.h getopt.h syslog.h sched.h linux/sockios.h sys/ioccom.h linux/ppdev.h linux/hidraw.h)
|
||||
AC_CHECK_HEADERS(sys/socket.h linux/if.h,,,
|
||||
[[
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
]])
|
||||
AC_CHECK_HEADERS(sys/socket.h linux/ax25.h,,,
|
||||
[[
|
||||
#if HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
]])
|
||||
AC_CHECK_FUNCS(snprintf vsnprintf syslog vsyslog openlog closelog)
|
||||
AC_CHECK_FUNCS(mlockall)
|
||||
|
||||
AC_MSG_CHECKING(for signed bittypes)
|
||||
signedbittypes=no
|
||||
AC_TRY_COMPILE([#include <sys/types.h>],
|
||||
[ int8_t a; int16_t c; int32_t e; ],
|
||||
AC_DEFINE(HAVE_SIGNED_BITTYPES,1,[define if bittypes like int16_t are defined]) signedbittypes=yes)
|
||||
AC_MSG_RESULT($signedbittypes)
|
||||
|
||||
AC_MSG_CHECKING(for unsigned bittypes)
|
||||
unsignedbittypes=no
|
||||
AC_TRY_COMPILE([#include <sys/types.h>],
|
||||
[ u_int8_t b; u_int16_t d; u_int32_t f; ],
|
||||
AC_DEFINE(HAVE_UNSIGNED_BITTYPES,1,[define if bittypes like u_int16_t are defined]) unsignedbittypes=yes)
|
||||
AC_MSG_RESULT($unsignedbittypes)
|
||||
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_MSG_CHECKING(for M_PI)
|
||||
mpi=no
|
||||
AC_TRY_COMPILE([#include <math.h>],
|
||||
[ double f = M_PI; ],
|
||||
mpi=yes,AC_DEFINE(M_PI,3.14159265358979323846,[define if M_PI is not defined by math.h]))
|
||||
AC_MSG_RESULT($mpi)
|
||||
|
||||
AC_MSG_CHECKING(for M_LOG10E)
|
||||
mlog10e=no
|
||||
AC_TRY_COMPILE([#include <math.h>],
|
||||
[ double f = M_LOG10E; ],
|
||||
mlog10e=yes,AC_DEFINE(M_LOG10E,0.43429448190325182765,[define if M_LOG10E is not defined by math.h]))
|
||||
AC_MSG_RESULT($mlog10e)
|
||||
|
||||
dnl check for ALSA
|
||||
case $target_os in
|
||||
linux*)
|
||||
AM_PATH_ALSA(1.0.0, AC_DEFINE(HAVE_ALSA,1,[Define if ALSA is available]))
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(HAVE_ALSA)
|
||||
|
||||
dnl Add the languages which your application supports here.
|
||||
ALL_LINGUAS="sv fr"
|
||||
AM_GNU_GETTEXT([external])
|
||||
|
||||
dnl Set PACKAGE_LOCALE_DIR in config.h.
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR,"${ac_default_prefix}/${DATADIRNAME}/locale",[various directories])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR,"${prefix}/${DATADIRNAME}/locale",[various directories])
|
||||
fi
|
||||
|
||||
dnl Set PACKAGE_DATA_DIR in config.h.
|
||||
if test "x${datadir}" = 'x${prefix}/share'; then
|
||||
if test "x${prefix}" = "xNONE"; then
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR,"${ac_default_prefix}/share/${PACKAGE}",[various directories])
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR,"${prefix}/share/${PACKAGE}",[various directories])
|
||||
fi
|
||||
else
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR,"${datadir}/${PACKAGE}",[various directories])
|
||||
fi
|
||||
|
||||
dnl Set PACKAGE_SOURCE_DIR in config.h.
|
||||
packagesrcdir=`cd $srcdir && pwd`
|
||||
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR,"${packagesrcdir}",[various directories])
|
||||
|
||||
if test x$CYGWIN = xyes -o x$MINGW32 = xyes; then
|
||||
AC_DEFINE(WIN32,1,[define if compiling under Windows32])
|
||||
LIBS="$LIBS -ldsound -lgdi32"
|
||||
fi
|
||||
|
||||
if test x$cross_compiling = xyes; then
|
||||
gtk=no
|
||||
xlibs="$LIBS"
|
||||
LIBS="$LIBS -L$CROSSCOMPPATH/gtk/lib"
|
||||
AC_CHECK_LIB(gtk,gtk_main,gtk=yes)
|
||||
LIBS="$xlibs"
|
||||
if test x$gtk = xyes; then
|
||||
GTK_CFLAGS="-I$CROSSCOMPPATH/gtk/include -I$CROSSCOMPPATH/gtk/include/glib -I$CROSSCOMPPATH/gtk/include/gdk"
|
||||
GTK_LIBS="-L$CROSSCOMPPATH/gtk/lib -lgtk -lgdk -lglib"
|
||||
PTHREAD_CFLAGS="-I$CROSSCOMPPATH/gtk/include"
|
||||
PTHREAD_LIBS="-L$CROSSCOMPPATH/gtk/lib"
|
||||
AUDIOFILE_CFLAGS="-I$CROSSCOMPPATH/audiofile/include"
|
||||
AUDIOFILE_LIBS="-L$CROSSCOMPPATH/audiofile/lib -laudiofile"
|
||||
fi
|
||||
else
|
||||
PKG_CHECK_MODULES(XML,libxml-2.0)
|
||||
PKG_CHECK_MODULES(GTK,gtk+-2.0 >= 2.6.0)
|
||||
PKG_CHECK_MODULES(AUDIOFILE,audiofile)
|
||||
fi
|
||||
|
||||
dnl Check for recently introduced GTK symbols
|
||||
xlibs="$LIBS"
|
||||
LIBS="$GTK_LIBS $LIBS"
|
||||
AC_CHECK_FUNCS(gtk_widget_set_tooltip_text gtk_widget_is_drawable gtk_widget_get_realized gtk_widget_set_realized gtk_widget_set_can_default gtk_widget_set_can_focus gtk_dialog_get_action_area gtk_dialog_get_content_area gtk_widget_get_allocation gtk_widget_set_allocation gtk_widget_get_state gtk_widget_get_window gtk_widget_set_window gtk_widget_set_has_window gtk_widget_style_attach)
|
||||
LIBS="$xlibs"
|
||||
|
||||
dnl Enable to try building with XXX_DISABLE_DEPRECATED. Never ship with
|
||||
dnl them enabled!
|
||||
dnl GTK_CFLAGS="$GTK_CFLAGS -DPANGO_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGSEAL_ENABLE"
|
||||
dnl Only use -Wall if we have gcc
|
||||
if test "x$GCC" = "xyes"; then
|
||||
if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
|
||||
CFLAGS="$CFLAGS -Wall -O2"
|
||||
CXXFLAGS="$CXXFLAGS -Wall -O2"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$CYGWIN = xyes -o x$MINGW32 = xyes; then
|
||||
XML_CFLAGS=
|
||||
XML_LIBS=
|
||||
else
|
||||
xlibs=$LIBS
|
||||
LIBS=
|
||||
AC_CHECK_LIB(util,openpty)
|
||||
AC_CHECK_FUNCS(openpty,LIBTHREAD="$LIBTHREAD $LIBS",[AC_LIBOBJ([openpty])])
|
||||
LIBS=$xlibs
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(hamlib,rigerror)
|
||||
|
||||
xcflags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -I$srcdir/directx/include -I$srcdir/directx/include/directx6"
|
||||
AC_MSG_CHECKING(for DirectX includes)
|
||||
directx=no
|
||||
AC_TRY_COMPILE([#include <directx.h>],
|
||||
[ LPDIRECTSOUND dsplay; LPDIRECTSOUNDCAPTURE dsrec; ],
|
||||
AC_DEFINE(HAVE_DIRECTX,1,[define if we have DirectX includes]) directx=yes)
|
||||
AC_MSG_RESULT($directx)
|
||||
CFLAGS="$xcflags"
|
||||
|
||||
AC_MSG_CHECKING(for ifr_newname in struct ifreq)
|
||||
ifrnewname=no
|
||||
AC_TRY_COMPILE([#include <linux/if.h>],
|
||||
[struct ifreq ifr; ifr.ifr_newname[0]=0; ], AC_DEFINE(HAVE_IFRNEWNAME,1,[define if struct ifreq has the ifr_newname symbol]) ifrnewname=yes)
|
||||
AC_MSG_RESULT($ifrnewname)
|
||||
|
||||
xlibs=$LIBS
|
||||
LIBS=
|
||||
AC_CHECK_FUNCS(vsnprintf,,[AC_LIBOBJ([vsnprintf])])
|
||||
AC_CHECK_FUNCS(random,,[AC_LIBOBJ([random])])
|
||||
LIBS=$xlibs
|
||||
|
||||
AC_MSG_CHECKING(for MKISS (N_AX25 line discipline))
|
||||
mkiss=no
|
||||
AC_EGREP_CPP(yes,
|
||||
[#include <sys/ioctl.h>
|
||||
#ifdef N_AX25
|
||||
yes
|
||||
#endif
|
||||
], AC_DEFINE(HAVE_MKISS,1,[define if struct ifreq has the ifr_newname symbol]) mkiss=yes)
|
||||
AC_MSG_RESULT($mkiss)
|
||||
|
||||
dnl Use -Wall if we have gcc.
|
||||
changequote(,)dnl
|
||||
if test "x$GCC" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wall[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wall" ;;
|
||||
esac
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
AC_ARG_ENABLE(mmx,
|
||||
[ --enable-mmx Utilize MMX(tm) instructions if available (x86 only)],
|
||||
[case "${enableval}" in
|
||||
yes) usemmx=true ;;
|
||||
no) usemmx=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-mmx) ;;
|
||||
esac],[usemmx=false])
|
||||
|
||||
AC_ARG_ENABLE(vis,
|
||||
[ --enable-vis Utilize VIS(tm) instructions if available (ultrasparc only)],
|
||||
[case "${enableval}" in
|
||||
yes) usevis=true ;;
|
||||
no) usevis=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-vis) ;;
|
||||
esac],[usevis=false])
|
||||
|
||||
if test x$usemmx = xtrue; then
|
||||
AC_DEFINE(USEMMX,1,[define if MMX is to be used])
|
||||
fi
|
||||
|
||||
if test x$usevis = xtrue; then
|
||||
AC_DEFINE(USEVIS,1,[define if VIS is to be used])
|
||||
dnl CFLAGS="$CFLAGS -mv8plus -mvis -Wa,-xarch=v8plusa"
|
||||
CFLAGS="$CFLAGS -Wa,-xarch=v8plusa"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(USEMMX, test x$usemmx = xtrue)
|
||||
AM_CONDITIONAL(USEVIS, test x$usevis = xtrue)
|
||||
AM_CONDITIONAL(CROSSCOMP, test x$cross_compiling = xyes)
|
||||
AM_CONDITIONAL(DIRECTX, test x$directx = xyes)
|
||||
AM_CONDITIONAL(WIN32, test x$CYGWIN = xyes -o x$MINGW32 = xyes)
|
||||
|
||||
AC_SUBST(HAVE_BITTYPES)
|
||||
AC_SUBST(HAVE_DIRECTX)
|
||||
AC_SUBST(HAVE_MKISS)
|
||||
AC_SUBST(HAVE_IFRNEWNAME)
|
||||
AC_SUBST(M_PI)
|
||||
AC_SUBST(LIBTHREAD)
|
||||
AC_SUBST(USEMMX)
|
||||
AC_SUBST(USEVIS)
|
||||
AC_SUBST(XML_CFLAGS)
|
||||
AC_SUBST(XML_LIBS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(PTHREAD_LIBS)
|
||||
AC_SUBST(PTHREAD_CFLAGS)
|
||||
AC_SUBST(WIN32)
|
||||
AC_SUBST(AR)
|
||||
AC_SUBST(AS)
|
||||
AC_SUBST(LD)
|
||||
AC_SUBST(RANLIB)
|
||||
|
||||
AC_OUTPUT([Makefile
|
||||
po/Makefile.in
|
||||
directx/Makefile
|
||||
libmisc/Makefile
|
||||
matlib/Makefile
|
||||
afsk/Makefile
|
||||
fsk/Makefile
|
||||
pammodem/Makefile
|
||||
pskmodem/Makefile
|
||||
newqpsk/Makefile
|
||||
p3dmodem/Makefile
|
||||
soundcard/Makefile
|
||||
flexdrv/Makefile
|
||||
doc/Makefile
|
||||
configapp/Makefile
|
||||
configapp/src/Makefile])
|
||||
423
depcomp
Executable file
423
depcomp
Executable file
|
|
@ -0,0 +1,423 @@
|
|||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# 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, 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., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. This file always lives in the current directory.
|
||||
# Also, the AIX compiler puts `$object:' at the start of each line;
|
||||
# $object doesn't have directory information.
|
||||
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
outname="$stripped.o"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a space and a tab in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'. We will use -o /dev/null later,
|
||||
# however we can't do the remplacement now because
|
||||
# `-o $object' might simply not be used
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
-*)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the proprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
29
directx/Makefile.am
Normal file
29
directx/Makefile.am
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
INCLUDES = -DCONFIGDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" \
|
||||
-I$(top_srcdir)/directx/include -I$(top_srcdir)/directx/include/directx6
|
||||
|
||||
if DIRECTX
|
||||
BUILT_SOURCES = libddraw.a libdsound.a libdinput.a libdplayx.a
|
||||
|
||||
noinst_LIBRARIES = libdinput1.a
|
||||
libdinput1_a_SOURCES = dinput.c
|
||||
|
||||
endif
|
||||
|
||||
libddraw.a libdsound.a libdplayx.a: libddraw.def libdsound.def libdplayx.def
|
||||
for i in ddraw dsound dplayx; do \
|
||||
$(DLLTOOL) --as $(AS) -k --dllname $$i.dll --output-lib lib$$i.a --def $(srcdir)/lib$$i.def; \
|
||||
done
|
||||
|
||||
libdinput.a: libdinput1.a libdinput.def
|
||||
$(DLLTOOL) --as $(AS) -k --dllname dinput.dll --output-lib $@ --def $(srcdir)/libdinput.def
|
||||
$(AR) xv libdinput1.a dinput.$(OBJEXT)
|
||||
$(AR) rv $@ dinput.$(OBJEXT)
|
||||
$(RM) -f $<
|
||||
|
||||
EXTRA_DIST = libddraw.def libdinput.def libdplayx.def libdsound.def dinput.c \
|
||||
fixdirectx.sh deunion.pl include/directx.h
|
||||
|
||||
# include/mmsystem.h include/objbase.h
|
||||
|
||||
CLEANFILES = libddraw.a libdinput.a libdplayx.a libdsound.a
|
||||
511
directx/Makefile.in
Normal file
511
directx/Makefile.in
Normal file
|
|
@ -0,0 +1,511 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = directx
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libdinput1_a_AR = $(AR) $(ARFLAGS)
|
||||
libdinput1_a_LIBADD =
|
||||
am__libdinput1_a_SOURCES_DIST = dinput.c
|
||||
@DIRECTX_TRUE@am_libdinput1_a_OBJECTS = dinput.$(OBJEXT)
|
||||
libdinput1_a_OBJECTS = $(am_libdinput1_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libdinput1_a_SOURCES)
|
||||
DIST_SOURCES = $(am__libdinput1_a_SOURCES_DIST)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
|
||||
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
HAVE_ALSA = @HAVE_ALSA@
|
||||
HAVE_BITTYPES = @HAVE_BITTYPES@
|
||||
HAVE_DIRECTX = @HAVE_DIRECTX@
|
||||
HAVE_IFRNEWNAME = @HAVE_IFRNEWNAME@
|
||||
HAVE_MKISS = @HAVE_MKISS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
M_PI = @M_PI@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USEMMX = @USEMMX@
|
||||
USEVIS = @USEVIS@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WIN32 = @WIN32@
|
||||
WINDRES = @WINDRES@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = -DCONFIGDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" \
|
||||
-I$(top_srcdir)/directx/include -I$(top_srcdir)/directx/include/directx6
|
||||
|
||||
@DIRECTX_TRUE@BUILT_SOURCES = libddraw.a libdsound.a libdinput.a libdplayx.a
|
||||
@DIRECTX_TRUE@noinst_LIBRARIES = libdinput1.a
|
||||
@DIRECTX_TRUE@libdinput1_a_SOURCES = dinput.c
|
||||
EXTRA_DIST = libddraw.def libdinput.def libdplayx.def libdsound.def dinput.c \
|
||||
fixdirectx.sh deunion.pl include/directx.h
|
||||
|
||||
|
||||
# include/mmsystem.h include/objbase.h
|
||||
CLEANFILES = libddraw.a libdinput.a libdplayx.a libdsound.a
|
||||
all: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu directx/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu directx/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libdinput1.a: $(libdinput1_a_OBJECTS) $(libdinput1_a_DEPENDENCIES)
|
||||
-rm -f libdinput1.a
|
||||
$(libdinput1_a_AR) libdinput1.a $(libdinput1_a_OBJECTS) $(libdinput1_a_LIBADD)
|
||||
$(RANLIB) libdinput1.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dinput.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-am
|
||||
all-am: Makefile $(LIBRARIES)
|
||||
installdirs:
|
||||
install: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: all check install install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-noinstLIBRARIES ctags distclean distclean-compile \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am
|
||||
|
||||
|
||||
libddraw.a libdsound.a libdplayx.a: libddraw.def libdsound.def libdplayx.def
|
||||
for i in ddraw dsound dplayx; do \
|
||||
$(DLLTOOL) --as $(AS) -k --dllname $$i.dll --output-lib lib$$i.a --def $(srcdir)/lib$$i.def; \
|
||||
done
|
||||
|
||||
libdinput.a: libdinput1.a libdinput.def
|
||||
$(DLLTOOL) --as $(AS) -k --dllname dinput.dll --output-lib $@ --def $(srcdir)/libdinput.def
|
||||
$(AR) xv libdinput1.a dinput.$(OBJEXT)
|
||||
$(AR) rv $@ dinput.$(OBJEXT)
|
||||
$(RM) -f $<
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
47
directx/deunion.pl
Executable file
47
directx/deunion.pl
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# Ack! gcc doesn't support unnamed unions -- we have to fake them.
|
||||
#
|
||||
# Expected format:
|
||||
#
|
||||
#struct blah
|
||||
#{
|
||||
# union
|
||||
# {
|
||||
# type1 blah1;
|
||||
# type2 blah2;
|
||||
# };
|
||||
#}
|
||||
|
||||
$lineno = 0;
|
||||
$union = 0;
|
||||
$ucount = 1;
|
||||
while ( ($line = <STDIN>) ) {
|
||||
++$lineno;
|
||||
|
||||
$line =~ s/\r//;
|
||||
if ( $line =~ /\sunion\s/ ) {
|
||||
if ( $union ) {
|
||||
die("Nested union at line $lineno -- Exiting.\n");
|
||||
}
|
||||
$union = 1;
|
||||
}
|
||||
if ( $union ) {
|
||||
if ( $line =~ /}/ ) {
|
||||
if ( $line =~ /};/ ) {
|
||||
chomp($line);
|
||||
$gnuline = $line;
|
||||
$gnuline =~ s/};/} u$ucount;/;
|
||||
$line =
|
||||
"#if defined(NONAMELESSUNION)\n$gnuline\n#else\n$line\n#endif\n";
|
||||
$ucount++;
|
||||
}
|
||||
$union = 0;
|
||||
}
|
||||
} else {
|
||||
if ( $line =~ /^}/ ) {
|
||||
$ucount = 1;
|
||||
}
|
||||
}
|
||||
print $line;
|
||||
}
|
||||
338
directx/dinput.c
Normal file
338
directx/dinput.c
Normal file
|
|
@ -0,0 +1,338 @@
|
|||
|
||||
#include <directx.h>
|
||||
|
||||
/*
|
||||
* This file contains experimentally determined values for the c_cfDI*
|
||||
* constants used in DirectX 5.0
|
||||
*/
|
||||
|
||||
/* Keyboard */
|
||||
|
||||
static DIOBJECTDATAFORMAT KBD_fmt[] = {
|
||||
{ &GUID_Key, 0, 0x8000000C, 0x00000000 },
|
||||
{ &GUID_Key, 1, 0x8000010C, 0x00000000 },
|
||||
{ &GUID_Key, 2, 0x8000020C, 0x00000000 },
|
||||
{ &GUID_Key, 3, 0x8000030C, 0x00000000 },
|
||||
{ &GUID_Key, 4, 0x8000040C, 0x00000000 },
|
||||
{ &GUID_Key, 5, 0x8000050C, 0x00000000 },
|
||||
{ &GUID_Key, 6, 0x8000060C, 0x00000000 },
|
||||
{ &GUID_Key, 7, 0x8000070C, 0x00000000 },
|
||||
{ &GUID_Key, 8, 0x8000080C, 0x00000000 },
|
||||
{ &GUID_Key, 9, 0x8000090C, 0x00000000 },
|
||||
{ &GUID_Key, 10, 0x80000A0C, 0x00000000 },
|
||||
{ &GUID_Key, 11, 0x80000B0C, 0x00000000 },
|
||||
{ &GUID_Key, 12, 0x80000C0C, 0x00000000 },
|
||||
{ &GUID_Key, 13, 0x80000D0C, 0x00000000 },
|
||||
{ &GUID_Key, 14, 0x80000E0C, 0x00000000 },
|
||||
{ &GUID_Key, 15, 0x80000F0C, 0x00000000 },
|
||||
{ &GUID_Key, 16, 0x8000100C, 0x00000000 },
|
||||
{ &GUID_Key, 17, 0x8000110C, 0x00000000 },
|
||||
{ &GUID_Key, 18, 0x8000120C, 0x00000000 },
|
||||
{ &GUID_Key, 19, 0x8000130C, 0x00000000 },
|
||||
{ &GUID_Key, 20, 0x8000140C, 0x00000000 },
|
||||
{ &GUID_Key, 21, 0x8000150C, 0x00000000 },
|
||||
{ &GUID_Key, 22, 0x8000160C, 0x00000000 },
|
||||
{ &GUID_Key, 23, 0x8000170C, 0x00000000 },
|
||||
{ &GUID_Key, 24, 0x8000180C, 0x00000000 },
|
||||
{ &GUID_Key, 25, 0x8000190C, 0x00000000 },
|
||||
{ &GUID_Key, 26, 0x80001A0C, 0x00000000 },
|
||||
{ &GUID_Key, 27, 0x80001B0C, 0x00000000 },
|
||||
{ &GUID_Key, 28, 0x80001C0C, 0x00000000 },
|
||||
{ &GUID_Key, 29, 0x80001D0C, 0x00000000 },
|
||||
{ &GUID_Key, 30, 0x80001E0C, 0x00000000 },
|
||||
{ &GUID_Key, 31, 0x80001F0C, 0x00000000 },
|
||||
{ &GUID_Key, 32, 0x8000200C, 0x00000000 },
|
||||
{ &GUID_Key, 33, 0x8000210C, 0x00000000 },
|
||||
{ &GUID_Key, 34, 0x8000220C, 0x00000000 },
|
||||
{ &GUID_Key, 35, 0x8000230C, 0x00000000 },
|
||||
{ &GUID_Key, 36, 0x8000240C, 0x00000000 },
|
||||
{ &GUID_Key, 37, 0x8000250C, 0x00000000 },
|
||||
{ &GUID_Key, 38, 0x8000260C, 0x00000000 },
|
||||
{ &GUID_Key, 39, 0x8000270C, 0x00000000 },
|
||||
{ &GUID_Key, 40, 0x8000280C, 0x00000000 },
|
||||
{ &GUID_Key, 41, 0x8000290C, 0x00000000 },
|
||||
{ &GUID_Key, 42, 0x80002A0C, 0x00000000 },
|
||||
{ &GUID_Key, 43, 0x80002B0C, 0x00000000 },
|
||||
{ &GUID_Key, 44, 0x80002C0C, 0x00000000 },
|
||||
{ &GUID_Key, 45, 0x80002D0C, 0x00000000 },
|
||||
{ &GUID_Key, 46, 0x80002E0C, 0x00000000 },
|
||||
{ &GUID_Key, 47, 0x80002F0C, 0x00000000 },
|
||||
{ &GUID_Key, 48, 0x8000300C, 0x00000000 },
|
||||
{ &GUID_Key, 49, 0x8000310C, 0x00000000 },
|
||||
{ &GUID_Key, 50, 0x8000320C, 0x00000000 },
|
||||
{ &GUID_Key, 51, 0x8000330C, 0x00000000 },
|
||||
{ &GUID_Key, 52, 0x8000340C, 0x00000000 },
|
||||
{ &GUID_Key, 53, 0x8000350C, 0x00000000 },
|
||||
{ &GUID_Key, 54, 0x8000360C, 0x00000000 },
|
||||
{ &GUID_Key, 55, 0x8000370C, 0x00000000 },
|
||||
{ &GUID_Key, 56, 0x8000380C, 0x00000000 },
|
||||
{ &GUID_Key, 57, 0x8000390C, 0x00000000 },
|
||||
{ &GUID_Key, 58, 0x80003A0C, 0x00000000 },
|
||||
{ &GUID_Key, 59, 0x80003B0C, 0x00000000 },
|
||||
{ &GUID_Key, 60, 0x80003C0C, 0x00000000 },
|
||||
{ &GUID_Key, 61, 0x80003D0C, 0x00000000 },
|
||||
{ &GUID_Key, 62, 0x80003E0C, 0x00000000 },
|
||||
{ &GUID_Key, 63, 0x80003F0C, 0x00000000 },
|
||||
{ &GUID_Key, 64, 0x8000400C, 0x00000000 },
|
||||
{ &GUID_Key, 65, 0x8000410C, 0x00000000 },
|
||||
{ &GUID_Key, 66, 0x8000420C, 0x00000000 },
|
||||
{ &GUID_Key, 67, 0x8000430C, 0x00000000 },
|
||||
{ &GUID_Key, 68, 0x8000440C, 0x00000000 },
|
||||
{ &GUID_Key, 69, 0x8000450C, 0x00000000 },
|
||||
{ &GUID_Key, 70, 0x8000460C, 0x00000000 },
|
||||
{ &GUID_Key, 71, 0x8000470C, 0x00000000 },
|
||||
{ &GUID_Key, 72, 0x8000480C, 0x00000000 },
|
||||
{ &GUID_Key, 73, 0x8000490C, 0x00000000 },
|
||||
{ &GUID_Key, 74, 0x80004A0C, 0x00000000 },
|
||||
{ &GUID_Key, 75, 0x80004B0C, 0x00000000 },
|
||||
{ &GUID_Key, 76, 0x80004C0C, 0x00000000 },
|
||||
{ &GUID_Key, 77, 0x80004D0C, 0x00000000 },
|
||||
{ &GUID_Key, 78, 0x80004E0C, 0x00000000 },
|
||||
{ &GUID_Key, 79, 0x80004F0C, 0x00000000 },
|
||||
{ &GUID_Key, 80, 0x8000500C, 0x00000000 },
|
||||
{ &GUID_Key, 81, 0x8000510C, 0x00000000 },
|
||||
{ &GUID_Key, 82, 0x8000520C, 0x00000000 },
|
||||
{ &GUID_Key, 83, 0x8000530C, 0x00000000 },
|
||||
{ &GUID_Key, 84, 0x8000540C, 0x00000000 },
|
||||
{ &GUID_Key, 85, 0x8000550C, 0x00000000 },
|
||||
{ &GUID_Key, 86, 0x8000560C, 0x00000000 },
|
||||
{ &GUID_Key, 87, 0x8000570C, 0x00000000 },
|
||||
{ &GUID_Key, 88, 0x8000580C, 0x00000000 },
|
||||
{ &GUID_Key, 89, 0x8000590C, 0x00000000 },
|
||||
{ &GUID_Key, 90, 0x80005A0C, 0x00000000 },
|
||||
{ &GUID_Key, 91, 0x80005B0C, 0x00000000 },
|
||||
{ &GUID_Key, 92, 0x80005C0C, 0x00000000 },
|
||||
{ &GUID_Key, 93, 0x80005D0C, 0x00000000 },
|
||||
{ &GUID_Key, 94, 0x80005E0C, 0x00000000 },
|
||||
{ &GUID_Key, 95, 0x80005F0C, 0x00000000 },
|
||||
{ &GUID_Key, 96, 0x8000600C, 0x00000000 },
|
||||
{ &GUID_Key, 97, 0x8000610C, 0x00000000 },
|
||||
{ &GUID_Key, 98, 0x8000620C, 0x00000000 },
|
||||
{ &GUID_Key, 99, 0x8000630C, 0x00000000 },
|
||||
{ &GUID_Key, 100, 0x8000640C, 0x00000000 },
|
||||
{ &GUID_Key, 101, 0x8000650C, 0x00000000 },
|
||||
{ &GUID_Key, 102, 0x8000660C, 0x00000000 },
|
||||
{ &GUID_Key, 103, 0x8000670C, 0x00000000 },
|
||||
{ &GUID_Key, 104, 0x8000680C, 0x00000000 },
|
||||
{ &GUID_Key, 105, 0x8000690C, 0x00000000 },
|
||||
{ &GUID_Key, 106, 0x80006A0C, 0x00000000 },
|
||||
{ &GUID_Key, 107, 0x80006B0C, 0x00000000 },
|
||||
{ &GUID_Key, 108, 0x80006C0C, 0x00000000 },
|
||||
{ &GUID_Key, 109, 0x80006D0C, 0x00000000 },
|
||||
{ &GUID_Key, 110, 0x80006E0C, 0x00000000 },
|
||||
{ &GUID_Key, 111, 0x80006F0C, 0x00000000 },
|
||||
{ &GUID_Key, 112, 0x8000700C, 0x00000000 },
|
||||
{ &GUID_Key, 113, 0x8000710C, 0x00000000 },
|
||||
{ &GUID_Key, 114, 0x8000720C, 0x00000000 },
|
||||
{ &GUID_Key, 115, 0x8000730C, 0x00000000 },
|
||||
{ &GUID_Key, 116, 0x8000740C, 0x00000000 },
|
||||
{ &GUID_Key, 117, 0x8000750C, 0x00000000 },
|
||||
{ &GUID_Key, 118, 0x8000760C, 0x00000000 },
|
||||
{ &GUID_Key, 119, 0x8000770C, 0x00000000 },
|
||||
{ &GUID_Key, 120, 0x8000780C, 0x00000000 },
|
||||
{ &GUID_Key, 121, 0x8000790C, 0x00000000 },
|
||||
{ &GUID_Key, 122, 0x80007A0C, 0x00000000 },
|
||||
{ &GUID_Key, 123, 0x80007B0C, 0x00000000 },
|
||||
{ &GUID_Key, 124, 0x80007C0C, 0x00000000 },
|
||||
{ &GUID_Key, 125, 0x80007D0C, 0x00000000 },
|
||||
{ &GUID_Key, 126, 0x80007E0C, 0x00000000 },
|
||||
{ &GUID_Key, 127, 0x80007F0C, 0x00000000 },
|
||||
{ &GUID_Key, 128, 0x8000800C, 0x00000000 },
|
||||
{ &GUID_Key, 129, 0x8000810C, 0x00000000 },
|
||||
{ &GUID_Key, 130, 0x8000820C, 0x00000000 },
|
||||
{ &GUID_Key, 131, 0x8000830C, 0x00000000 },
|
||||
{ &GUID_Key, 132, 0x8000840C, 0x00000000 },
|
||||
{ &GUID_Key, 133, 0x8000850C, 0x00000000 },
|
||||
{ &GUID_Key, 134, 0x8000860C, 0x00000000 },
|
||||
{ &GUID_Key, 135, 0x8000870C, 0x00000000 },
|
||||
{ &GUID_Key, 136, 0x8000880C, 0x00000000 },
|
||||
{ &GUID_Key, 137, 0x8000890C, 0x00000000 },
|
||||
{ &GUID_Key, 138, 0x80008A0C, 0x00000000 },
|
||||
{ &GUID_Key, 139, 0x80008B0C, 0x00000000 },
|
||||
{ &GUID_Key, 140, 0x80008C0C, 0x00000000 },
|
||||
{ &GUID_Key, 141, 0x80008D0C, 0x00000000 },
|
||||
{ &GUID_Key, 142, 0x80008E0C, 0x00000000 },
|
||||
{ &GUID_Key, 143, 0x80008F0C, 0x00000000 },
|
||||
{ &GUID_Key, 144, 0x8000900C, 0x00000000 },
|
||||
{ &GUID_Key, 145, 0x8000910C, 0x00000000 },
|
||||
{ &GUID_Key, 146, 0x8000920C, 0x00000000 },
|
||||
{ &GUID_Key, 147, 0x8000930C, 0x00000000 },
|
||||
{ &GUID_Key, 148, 0x8000940C, 0x00000000 },
|
||||
{ &GUID_Key, 149, 0x8000950C, 0x00000000 },
|
||||
{ &GUID_Key, 150, 0x8000960C, 0x00000000 },
|
||||
{ &GUID_Key, 151, 0x8000970C, 0x00000000 },
|
||||
{ &GUID_Key, 152, 0x8000980C, 0x00000000 },
|
||||
{ &GUID_Key, 153, 0x8000990C, 0x00000000 },
|
||||
{ &GUID_Key, 154, 0x80009A0C, 0x00000000 },
|
||||
{ &GUID_Key, 155, 0x80009B0C, 0x00000000 },
|
||||
{ &GUID_Key, 156, 0x80009C0C, 0x00000000 },
|
||||
{ &GUID_Key, 157, 0x80009D0C, 0x00000000 },
|
||||
{ &GUID_Key, 158, 0x80009E0C, 0x00000000 },
|
||||
{ &GUID_Key, 159, 0x80009F0C, 0x00000000 },
|
||||
{ &GUID_Key, 160, 0x8000A00C, 0x00000000 },
|
||||
{ &GUID_Key, 161, 0x8000A10C, 0x00000000 },
|
||||
{ &GUID_Key, 162, 0x8000A20C, 0x00000000 },
|
||||
{ &GUID_Key, 163, 0x8000A30C, 0x00000000 },
|
||||
{ &GUID_Key, 164, 0x8000A40C, 0x00000000 },
|
||||
{ &GUID_Key, 165, 0x8000A50C, 0x00000000 },
|
||||
{ &GUID_Key, 166, 0x8000A60C, 0x00000000 },
|
||||
{ &GUID_Key, 167, 0x8000A70C, 0x00000000 },
|
||||
{ &GUID_Key, 168, 0x8000A80C, 0x00000000 },
|
||||
{ &GUID_Key, 169, 0x8000A90C, 0x00000000 },
|
||||
{ &GUID_Key, 170, 0x8000AA0C, 0x00000000 },
|
||||
{ &GUID_Key, 171, 0x8000AB0C, 0x00000000 },
|
||||
{ &GUID_Key, 172, 0x8000AC0C, 0x00000000 },
|
||||
{ &GUID_Key, 173, 0x8000AD0C, 0x00000000 },
|
||||
{ &GUID_Key, 174, 0x8000AE0C, 0x00000000 },
|
||||
{ &GUID_Key, 175, 0x8000AF0C, 0x00000000 },
|
||||
{ &GUID_Key, 176, 0x8000B00C, 0x00000000 },
|
||||
{ &GUID_Key, 177, 0x8000B10C, 0x00000000 },
|
||||
{ &GUID_Key, 178, 0x8000B20C, 0x00000000 },
|
||||
{ &GUID_Key, 179, 0x8000B30C, 0x00000000 },
|
||||
{ &GUID_Key, 180, 0x8000B40C, 0x00000000 },
|
||||
{ &GUID_Key, 181, 0x8000B50C, 0x00000000 },
|
||||
{ &GUID_Key, 182, 0x8000B60C, 0x00000000 },
|
||||
{ &GUID_Key, 183, 0x8000B70C, 0x00000000 },
|
||||
{ &GUID_Key, 184, 0x8000B80C, 0x00000000 },
|
||||
{ &GUID_Key, 185, 0x8000B90C, 0x00000000 },
|
||||
{ &GUID_Key, 186, 0x8000BA0C, 0x00000000 },
|
||||
{ &GUID_Key, 187, 0x8000BB0C, 0x00000000 },
|
||||
{ &GUID_Key, 188, 0x8000BC0C, 0x00000000 },
|
||||
{ &GUID_Key, 189, 0x8000BD0C, 0x00000000 },
|
||||
{ &GUID_Key, 190, 0x8000BE0C, 0x00000000 },
|
||||
{ &GUID_Key, 191, 0x8000BF0C, 0x00000000 },
|
||||
{ &GUID_Key, 192, 0x8000C00C, 0x00000000 },
|
||||
{ &GUID_Key, 193, 0x8000C10C, 0x00000000 },
|
||||
{ &GUID_Key, 194, 0x8000C20C, 0x00000000 },
|
||||
{ &GUID_Key, 195, 0x8000C30C, 0x00000000 },
|
||||
{ &GUID_Key, 196, 0x8000C40C, 0x00000000 },
|
||||
{ &GUID_Key, 197, 0x8000C50C, 0x00000000 },
|
||||
{ &GUID_Key, 198, 0x8000C60C, 0x00000000 },
|
||||
{ &GUID_Key, 199, 0x8000C70C, 0x00000000 },
|
||||
{ &GUID_Key, 200, 0x8000C80C, 0x00000000 },
|
||||
{ &GUID_Key, 201, 0x8000C90C, 0x00000000 },
|
||||
{ &GUID_Key, 202, 0x8000CA0C, 0x00000000 },
|
||||
{ &GUID_Key, 203, 0x8000CB0C, 0x00000000 },
|
||||
{ &GUID_Key, 204, 0x8000CC0C, 0x00000000 },
|
||||
{ &GUID_Key, 205, 0x8000CD0C, 0x00000000 },
|
||||
{ &GUID_Key, 206, 0x8000CE0C, 0x00000000 },
|
||||
{ &GUID_Key, 207, 0x8000CF0C, 0x00000000 },
|
||||
{ &GUID_Key, 208, 0x8000D00C, 0x00000000 },
|
||||
{ &GUID_Key, 209, 0x8000D10C, 0x00000000 },
|
||||
{ &GUID_Key, 210, 0x8000D20C, 0x00000000 },
|
||||
{ &GUID_Key, 211, 0x8000D30C, 0x00000000 },
|
||||
{ &GUID_Key, 212, 0x8000D40C, 0x00000000 },
|
||||
{ &GUID_Key, 213, 0x8000D50C, 0x00000000 },
|
||||
{ &GUID_Key, 214, 0x8000D60C, 0x00000000 },
|
||||
{ &GUID_Key, 215, 0x8000D70C, 0x00000000 },
|
||||
{ &GUID_Key, 216, 0x8000D80C, 0x00000000 },
|
||||
{ &GUID_Key, 217, 0x8000D90C, 0x00000000 },
|
||||
{ &GUID_Key, 218, 0x8000DA0C, 0x00000000 },
|
||||
{ &GUID_Key, 219, 0x8000DB0C, 0x00000000 },
|
||||
{ &GUID_Key, 220, 0x8000DC0C, 0x00000000 },
|
||||
{ &GUID_Key, 221, 0x8000DD0C, 0x00000000 },
|
||||
{ &GUID_Key, 222, 0x8000DE0C, 0x00000000 },
|
||||
{ &GUID_Key, 223, 0x8000DF0C, 0x00000000 },
|
||||
{ &GUID_Key, 224, 0x8000E00C, 0x00000000 },
|
||||
{ &GUID_Key, 225, 0x8000E10C, 0x00000000 },
|
||||
{ &GUID_Key, 226, 0x8000E20C, 0x00000000 },
|
||||
{ &GUID_Key, 227, 0x8000E30C, 0x00000000 },
|
||||
{ &GUID_Key, 228, 0x8000E40C, 0x00000000 },
|
||||
{ &GUID_Key, 229, 0x8000E50C, 0x00000000 },
|
||||
{ &GUID_Key, 230, 0x8000E60C, 0x00000000 },
|
||||
{ &GUID_Key, 231, 0x8000E70C, 0x00000000 },
|
||||
{ &GUID_Key, 232, 0x8000E80C, 0x00000000 },
|
||||
{ &GUID_Key, 233, 0x8000E90C, 0x00000000 },
|
||||
{ &GUID_Key, 234, 0x8000EA0C, 0x00000000 },
|
||||
{ &GUID_Key, 235, 0x8000EB0C, 0x00000000 },
|
||||
{ &GUID_Key, 236, 0x8000EC0C, 0x00000000 },
|
||||
{ &GUID_Key, 237, 0x8000ED0C, 0x00000000 },
|
||||
{ &GUID_Key, 238, 0x8000EE0C, 0x00000000 },
|
||||
{ &GUID_Key, 239, 0x8000EF0C, 0x00000000 },
|
||||
{ &GUID_Key, 240, 0x8000F00C, 0x00000000 },
|
||||
{ &GUID_Key, 241, 0x8000F10C, 0x00000000 },
|
||||
{ &GUID_Key, 242, 0x8000F20C, 0x00000000 },
|
||||
{ &GUID_Key, 243, 0x8000F30C, 0x00000000 },
|
||||
{ &GUID_Key, 244, 0x8000F40C, 0x00000000 },
|
||||
{ &GUID_Key, 245, 0x8000F50C, 0x00000000 },
|
||||
{ &GUID_Key, 246, 0x8000F60C, 0x00000000 },
|
||||
{ &GUID_Key, 247, 0x8000F70C, 0x00000000 },
|
||||
{ &GUID_Key, 248, 0x8000F80C, 0x00000000 },
|
||||
{ &GUID_Key, 249, 0x8000F90C, 0x00000000 },
|
||||
{ &GUID_Key, 250, 0x8000FA0C, 0x00000000 },
|
||||
{ &GUID_Key, 251, 0x8000FB0C, 0x00000000 },
|
||||
{ &GUID_Key, 252, 0x8000FC0C, 0x00000000 },
|
||||
{ &GUID_Key, 253, 0x8000FD0C, 0x00000000 },
|
||||
{ &GUID_Key, 254, 0x8000FE0C, 0x00000000 },
|
||||
{ &GUID_Key, 255, 0x8000FF0C, 0x00000000 },
|
||||
};
|
||||
|
||||
const DIDATAFORMAT c_dfDIKeyboard = { 24, 16, 0x00000002, 256, 256, KBD_fmt };
|
||||
|
||||
|
||||
/* Mouse */
|
||||
|
||||
static DIOBJECTDATAFORMAT PTR_fmt[] = {
|
||||
{ &GUID_XAxis, 0, 0x00FFFF03, 0x00000000 },
|
||||
{ &GUID_YAxis, 4, 0x00FFFF03, 0x00000000 },
|
||||
{ &GUID_ZAxis, 8, 0x80FFFF03, 0x00000000 },
|
||||
{ NULL, 12, 0x00FFFF0C, 0x00000000 },
|
||||
{ NULL, 13, 0x00FFFF0C, 0x00000000 },
|
||||
{ NULL, 14, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 15, 0x80FFFF0C, 0x00000000 },
|
||||
};
|
||||
|
||||
const DIDATAFORMAT c_dfDIMouse = { 24, 16, 0x00000002, 16, 7, PTR_fmt };
|
||||
|
||||
|
||||
/* Joystick */
|
||||
|
||||
static DIOBJECTDATAFORMAT JOY_fmt[] = {
|
||||
{ &GUID_XAxis, 0, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_YAxis, 4, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_ZAxis, 8, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_RxAxis, 12, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_RyAxis, 16, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_RzAxis, 20, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_Slider, 24, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_Slider, 28, 0x80FFFF03, 0x00000100 },
|
||||
{ &GUID_POV, 32, 0x80FFFF10, 0x00000000 },
|
||||
{ &GUID_POV, 36, 0x80FFFF10, 0x00000000 },
|
||||
{ &GUID_POV, 40, 0x80FFFF10, 0x00000000 },
|
||||
{ &GUID_POV, 44, 0x80FFFF10, 0x00000000 },
|
||||
{ NULL, 48, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 49, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 50, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 51, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 52, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 53, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 54, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 55, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 56, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 57, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 58, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 59, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 60, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 61, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 62, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 63, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 64, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 65, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 66, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 67, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 68, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 69, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 70, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 71, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 72, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 73, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 74, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 75, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 76, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 77, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 78, 0x80FFFF0C, 0x00000000 },
|
||||
{ NULL, 79, 0x80FFFF0C, 0x00000000 },
|
||||
};
|
||||
|
||||
const DIDATAFORMAT c_dfDIJoystick = { 24, 16, 0x00000001, 80, 44, JOY_fmt };
|
||||
|
||||
17
directx/fixdirectx.sh
Executable file
17
directx/fixdirectx.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# A script to fix the DirectX includes so that gcc can compile them...
|
||||
|
||||
#cd `dirname $0`
|
||||
for file in include/directx6/*.h
|
||||
do echo "Stripping $file..."
|
||||
tr -d '\r' <$file >$file.new && mv $file.new $file
|
||||
done
|
||||
|
||||
# Fix the few remaining headers that have anonymous unions
|
||||
for file in include/directx6/d3dtypes.h
|
||||
do if [ -f $file ]; then
|
||||
echo "Fixing $file..."
|
||||
perl ./deunion.pl <$file >$file.new && mv $file.new $file
|
||||
fi
|
||||
done
|
||||
79
directx/include/directx.h
Normal file
79
directx/include/directx.h
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
#ifndef _directx_h_
|
||||
#define _directx_h
|
||||
|
||||
/* Include all of the DirectX 5.0 headers and adds any necessary tweaks */
|
||||
|
||||
#include <windows.h>
|
||||
#include <mmsystem.h>
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif
|
||||
#undef WINNT
|
||||
|
||||
/* Far pointers don't exist in 32-bit code */
|
||||
#ifndef FAR
|
||||
#define FAR
|
||||
#endif
|
||||
|
||||
/* Error codes not yet included in Win32 API header files */
|
||||
#ifndef MAKE_HRESULT
|
||||
#define MAKE_HRESULT(sev,fac,code) \
|
||||
((HRESULT)(((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))))
|
||||
#endif
|
||||
|
||||
#ifndef S_OK
|
||||
#define S_OK (HRESULT)0x00000000L
|
||||
#endif
|
||||
|
||||
#ifndef SUCCEEDED
|
||||
#define SUCCEEDED(x) ((HRESULT)(x) >= 0)
|
||||
#endif
|
||||
#ifndef FAILED
|
||||
#define FAILED(x) ((HRESULT)(x)<0)
|
||||
#endif
|
||||
|
||||
#ifndef E_FAIL
|
||||
#define E_FAIL (HRESULT)0x80000008L
|
||||
#endif
|
||||
#ifndef E_NOINTERFACE
|
||||
#define E_NOINTERFACE (HRESULT)0x80004002L
|
||||
#endif
|
||||
#ifndef E_OUTOFMEMORY
|
||||
#define E_OUTOFMEMORY (HRESULT)0x8007000EL
|
||||
#endif
|
||||
#ifndef E_INVALIDARG
|
||||
#define E_INVALIDARG (HRESULT)0x80070057L
|
||||
#endif
|
||||
#ifndef E_NOTIMPL
|
||||
#define E_NOTIMPL (HRESULT)0x80004001L
|
||||
#endif
|
||||
#ifndef REGDB_E_CLASSNOTREG
|
||||
#define REGDB_E_CLASSNOTREG (HRESULT)0x80040154L
|
||||
#endif
|
||||
|
||||
/* Severity codes */
|
||||
#ifndef SEVERITY_ERROR
|
||||
#define SEVERITY_ERROR 1
|
||||
#endif
|
||||
|
||||
/* Error facility codes */
|
||||
#ifndef FACILITY_WIN32
|
||||
#define FACILITY_WIN32 7
|
||||
#endif
|
||||
|
||||
#ifndef FIELD_OFFSET
|
||||
#define FIELD_OFFSET(type, field) ((LONG)&(((type *)0)->field))
|
||||
#endif
|
||||
|
||||
/* DirectX 6.0 header includes
|
||||
(if it isn't included, I haven't tested it yet)
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#define NONAMELESSUNION
|
||||
#endif
|
||||
#include <ddraw.h>
|
||||
#include <dsound.h>
|
||||
#include <dinput.h>
|
||||
|
||||
#endif /* _directx_h */
|
||||
3
directx/libddraw.def
Normal file
3
directx/libddraw.def
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
EXPORTS
|
||||
DirectDrawCreate@12
|
||||
DirectDrawEnumerateA@8
|
||||
2
directx/libdinput.def
Normal file
2
directx/libdinput.def
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
EXPORTS
|
||||
DirectInputCreateA@16
|
||||
2
directx/libdplayx.def
Normal file
2
directx/libdplayx.def
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
EXPORTS
|
||||
DirectPlayLobbyCreateA@20
|
||||
9
directx/libdsound.def
Normal file
9
directx/libdsound.def
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
EXPORTS
|
||||
DirectSoundCaptureEnumerateW@8
|
||||
DirectSoundCaptureEnumerateA@8
|
||||
DirectSoundCaptureCreate@12
|
||||
DllGetClassObject
|
||||
DllCanUnloadNow
|
||||
DirectSoundEnumerateW@8
|
||||
DirectSoundEnumerateA@8
|
||||
DirectSoundCreate@12
|
||||
22
doc/Makefile.am
Normal file
22
doc/Makefile.am
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
DOC = main
|
||||
SECTS = $(DOC).sgml intro.sgml
|
||||
SRC = $(SECTS) builddate
|
||||
|
||||
EXTRA_DIST = $(SECTS)
|
||||
|
||||
builddate:
|
||||
date "+%e %B %Y" > $@
|
||||
|
||||
$(DOC).dvi: $(SRC)
|
||||
db2dvi $<
|
||||
|
||||
$(DOC).ps: $(DOC).dvi
|
||||
dvips $< -o $@
|
||||
|
||||
$(DOC).pdf: $(SRC)
|
||||
db2pdf $<
|
||||
|
||||
$(DOC): $(SRC)
|
||||
-rm -rf $(DOC)
|
||||
db2html $<
|
||||
|
||||
403
doc/Makefile.in
Normal file
403
doc/Makefile.in
Normal file
|
|
@ -0,0 +1,403 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
|
||||
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
HAVE_ALSA = @HAVE_ALSA@
|
||||
HAVE_BITTYPES = @HAVE_BITTYPES@
|
||||
HAVE_DIRECTX = @HAVE_DIRECTX@
|
||||
HAVE_IFRNEWNAME = @HAVE_IFRNEWNAME@
|
||||
HAVE_MKISS = @HAVE_MKISS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
M_PI = @M_PI@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USEMMX = @USEMMX@
|
||||
USEVIS = @USEVIS@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WIN32 = @WIN32@
|
||||
WINDRES = @WINDRES@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
DOC = main
|
||||
SECTS = $(DOC).sgml intro.sgml
|
||||
SRC = $(SECTS) builddate
|
||||
EXTRA_DIST = $(SECTS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
|
||||
|
||||
builddate:
|
||||
date "+%e %B %Y" > $@
|
||||
|
||||
$(DOC).dvi: $(SRC)
|
||||
db2dvi $<
|
||||
|
||||
$(DOC).ps: $(DOC).dvi
|
||||
dvips $< -o $@
|
||||
|
||||
$(DOC).pdf: $(SRC)
|
||||
db2pdf $<
|
||||
|
||||
$(DOC): $(SRC)
|
||||
-rm -rf $(DOC)
|
||||
db2html $<
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
16
doc/intro.sgml
Normal file
16
doc/intro.sgml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!-- -*- sgml -*- -->
|
||||
<chapter id="index"> <!-- so generated HTML starts here -->
|
||||
|
||||
<title>SoundModem Documentation</title>
|
||||
|
||||
<!-- <para>This was built on &builddate;</para> -->
|
||||
|
||||
<para>Blah</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- Local Variables: -->
|
||||
<!-- sgml-indent-step: 1 -->
|
||||
<!-- sgml-indent-data: 1 -->
|
||||
<!-- sgml-parent-document: "main.sgml" -->
|
||||
<!-- End: -->
|
||||
36
doc/main.sgml
Normal file
36
doc/main.sgml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!-- -*- sgml -*- -->
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN"[
|
||||
<!-- <!ENTITY builddate SYSTEM "builddate"> -->
|
||||
<!ENTITY intro SYSTEM "intro.sgml">
|
||||
|
||||
|
||||
]>
|
||||
|
||||
<book id="soundmodemdoc">
|
||||
<bookinfo>
|
||||
<title>SoundModem Documentation</title>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Thomas</firstname>
|
||||
<surname>Sailer</surname>
|
||||
<affiliation>
|
||||
<address><email>sailer@ife.ee.ethz.ch</email></address>
|
||||
</affiliation>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<copyright>
|
||||
<year>2000</year>
|
||||
<holder>Thomas Sailer</holder>
|
||||
</copyright>
|
||||
|
||||
</bookinfo>
|
||||
|
||||
&intro;
|
||||
|
||||
</book>
|
||||
|
||||
<!-- Local Variables: -->
|
||||
<!-- sgml-indent-step: 1 -->
|
||||
<!-- sgml-indent-data: 1 -->
|
||||
<!-- End: -->
|
||||
35
flexdrv/Makefile.am
Normal file
35
flexdrv/Makefile.am
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
EXTRA_DIST = soundmodem.c soundmodem.rc driver.c drv32.h driver.obj flexdriv.def flexdrv.h resource.h
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/matlib -I$(top_srcdir)/libmisc \
|
||||
-I$(top_srcdir)/soundcard -I$(top_srcdir)/directx/include -I$(top_srcdir)/directx/include/directx6 \
|
||||
@PTHREAD_CFLAGS@
|
||||
|
||||
|
||||
MODEMLIBS = ../afsk/libafsk.a ../fsk/libfsk.a ../pammodem/libpam.a ../pskmodem/libpsk.a ../newqpsk/libnewqpsk.a ../p3dmodem/libp3d.a
|
||||
|
||||
if WIN32
|
||||
|
||||
noinst_LIBRARIES = libflxdrv.a
|
||||
|
||||
libflxdrv_a_SOURCES = driver.c soundmodem.c
|
||||
|
||||
soundmodem.res: soundmodem.rc resource.h
|
||||
$(WINDRES) $< -O coff -o $@
|
||||
|
||||
DLLNAME = soundmodem
|
||||
DLLOBJ = driver.o soundmodem.o soundmodem.res $(MODEMLIBS) ../soundcard/libcommon.a ../soundcard/libaudioio.a ../soundcard/libpttio.a \
|
||||
../matlib/libmat.a ../libmisc/libmisc.a
|
||||
DLLLDARGS = @PTHREAD_LIBS@ @LIBTHREAD@ $(LIBS)
|
||||
DLLDEF = --def $(srcdir)/flexdriv.def
|
||||
|
||||
noinst_SCRIPTS = $(DLLNAME).dll
|
||||
|
||||
$(DLLNAME).dll: $(DLLOBJ)
|
||||
$(CC) -mdll -mno-cygwin -Wl,--base-file,$(DLLNAME).base -o $(DLLNAME).dll $(DLLOBJ) $(DLLLDARGS)
|
||||
$(DLLTOOL) --as=$(AS) --dllname $(DLLNAME).dll $(DLLDEF) --base-file $(DLLNAME).base --output-exp $(DLLNAME).exp $(DLLOBJ)
|
||||
$(CC) -mdll -mno-cygwin -Wl,--base-file,$(DLLNAME).base,$(DLLNAME).exp -o $(DLLNAME).dll $(DLLOBJ) $(DLLLDARGS)
|
||||
$(DLLTOOL) --as=$(AS) --dllname $(DLLNAME).dll $(DLLDEF) --base-file $(DLLNAME).base --output-exp $(DLLNAME).exp $(DLLOBJ)
|
||||
$(CC) -mdll -mno-cygwin -Wl,$(DLLNAME).exp -o $(DLLNAME).dll $(DLLOBJ) $(DLLLDARGS)
|
||||
$(DLLTOOL) --as=$(AS) --dllname $(DLLNAME).dll $(DLLDEF) --output-lib lib$(DLLNAME).a $(DLLOBJ)
|
||||
|
||||
endif
|
||||
513
flexdrv/Makefile.in
Normal file
513
flexdrv/Makefile.in
Normal file
|
|
@ -0,0 +1,513 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = flexdrv
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libflxdrv_a_AR = $(AR) $(ARFLAGS)
|
||||
libflxdrv_a_LIBADD =
|
||||
am__libflxdrv_a_SOURCES_DIST = driver.c soundmodem.c
|
||||
@WIN32_TRUE@am_libflxdrv_a_OBJECTS = driver.$(OBJEXT) \
|
||||
@WIN32_TRUE@ soundmodem.$(OBJEXT)
|
||||
libflxdrv_a_OBJECTS = $(am_libflxdrv_a_OBJECTS)
|
||||
SCRIPTS = $(noinst_SCRIPTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libflxdrv_a_SOURCES)
|
||||
DIST_SOURCES = $(am__libflxdrv_a_SOURCES_DIST)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
|
||||
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
HAVE_ALSA = @HAVE_ALSA@
|
||||
HAVE_BITTYPES = @HAVE_BITTYPES@
|
||||
HAVE_DIRECTX = @HAVE_DIRECTX@
|
||||
HAVE_IFRNEWNAME = @HAVE_IFRNEWNAME@
|
||||
HAVE_MKISS = @HAVE_MKISS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
M_PI = @M_PI@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USEMMX = @USEMMX@
|
||||
USEVIS = @USEVIS@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WIN32 = @WIN32@
|
||||
WINDRES = @WINDRES@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = soundmodem.c soundmodem.rc driver.c drv32.h driver.obj flexdriv.def flexdrv.h resource.h
|
||||
INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/matlib -I$(top_srcdir)/libmisc \
|
||||
-I$(top_srcdir)/soundcard -I$(top_srcdir)/directx/include -I$(top_srcdir)/directx/include/directx6 \
|
||||
@PTHREAD_CFLAGS@
|
||||
|
||||
MODEMLIBS = ../afsk/libafsk.a ../fsk/libfsk.a ../pammodem/libpam.a ../pskmodem/libpsk.a ../newqpsk/libnewqpsk.a ../p3dmodem/libp3d.a
|
||||
@WIN32_TRUE@noinst_LIBRARIES = libflxdrv.a
|
||||
@WIN32_TRUE@libflxdrv_a_SOURCES = driver.c soundmodem.c
|
||||
@WIN32_TRUE@DLLNAME = soundmodem
|
||||
@WIN32_TRUE@DLLOBJ = driver.o soundmodem.o soundmodem.res $(MODEMLIBS) ../soundcard/libcommon.a ../soundcard/libaudioio.a ../soundcard/libpttio.a \
|
||||
@WIN32_TRUE@ ../matlib/libmat.a ../libmisc/libmisc.a
|
||||
|
||||
@WIN32_TRUE@DLLLDARGS = @PTHREAD_LIBS@ @LIBTHREAD@ $(LIBS)
|
||||
@WIN32_TRUE@DLLDEF = --def $(srcdir)/flexdriv.def
|
||||
@WIN32_TRUE@noinst_SCRIPTS = $(DLLNAME).dll
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu flexdrv/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu flexdrv/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libflxdrv.a: $(libflxdrv_a_OBJECTS) $(libflxdrv_a_DEPENDENCIES)
|
||||
-rm -f libflxdrv.a
|
||||
$(libflxdrv_a_AR) libflxdrv.a $(libflxdrv_a_OBJECTS) $(libflxdrv_a_LIBADD)
|
||||
$(RANLIB) libflxdrv.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soundmodem.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES) $(SCRIPTS)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-noinstLIBRARIES ctags distclean distclean-compile \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am
|
||||
|
||||
|
||||
@WIN32_TRUE@soundmodem.res: soundmodem.rc resource.h
|
||||
@WIN32_TRUE@ $(WINDRES) $< -O coff -o $@
|
||||
|
||||
@WIN32_TRUE@$(DLLNAME).dll: $(DLLOBJ)
|
||||
@WIN32_TRUE@ $(CC) -mdll -mno-cygwin -Wl,--base-file,$(DLLNAME).base -o $(DLLNAME).dll $(DLLOBJ) $(DLLLDARGS)
|
||||
@WIN32_TRUE@ $(DLLTOOL) --as=$(AS) --dllname $(DLLNAME).dll $(DLLDEF) --base-file $(DLLNAME).base --output-exp $(DLLNAME).exp $(DLLOBJ)
|
||||
@WIN32_TRUE@ $(CC) -mdll -mno-cygwin -Wl,--base-file,$(DLLNAME).base,$(DLLNAME).exp -o $(DLLNAME).dll $(DLLOBJ) $(DLLLDARGS)
|
||||
@WIN32_TRUE@ $(DLLTOOL) --as=$(AS) --dllname $(DLLNAME).dll $(DLLDEF) --base-file $(DLLNAME).base --output-exp $(DLLNAME).exp $(DLLOBJ)
|
||||
@WIN32_TRUE@ $(CC) -mdll -mno-cygwin -Wl,$(DLLNAME).exp -o $(DLLNAME).dll $(DLLOBJ) $(DLLLDARGS)
|
||||
@WIN32_TRUE@ $(DLLTOOL) --as=$(AS) --dllname $(DLLNAME).dll $(DLLDEF) --output-lib lib$(DLLNAME).a $(DLLOBJ)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
74
flexdrv/driver.c
Normal file
74
flexdrv/driver.c
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
#define STRICT
|
||||
#include <windows.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include <process.h>
|
||||
#include "flexdrv.h" // der offizielle Header
|
||||
#include "drv32.h"
|
||||
|
||||
HANDLE hInst;
|
||||
//--------------------------------------------------------------------
|
||||
// Einziger Treiberaufruf
|
||||
u32 flexnet_driver(int func, int kanal, int a, int b)
|
||||
{
|
||||
static byte base_kanal;
|
||||
static byte tx_kanal;
|
||||
static L1FRAME *l1f;
|
||||
L1FRAME *rxf;
|
||||
switch (func)
|
||||
{
|
||||
case drv_interfaceversion:
|
||||
return DRIVER_INTERFACE_VERSION;
|
||||
case drv_ident: return (u32)l1_ident((byte)(kanal-base_kanal));
|
||||
case drv_version: return (u32)l1_version((byte)(kanal - base_kanal));
|
||||
case drv_config: return config_device((byte)(kanal), (HWND)a, (byte)(b - base_kanal));
|
||||
case drv_confinfo: return (u32)config_info((byte)(kanal - base_kanal));
|
||||
case drv_init_device:
|
||||
base_kanal = kanal;
|
||||
return init_device((HKEY)b);
|
||||
case drv_get_ch_cnt: return l1_get_ch_cnt();
|
||||
case drv_exit: l1_exit((HKEY)a); break;
|
||||
case drv_ch_active: return l1_ch_active((byte)(kanal - base_kanal));
|
||||
case drv_init_kanal: return l1_init_kanal((byte)(kanal - base_kanal), (u16)a, (u16)b);
|
||||
case drv_stat: return (u32)l1_stat((byte)(kanal - base_kanal), (byte)a);
|
||||
case drv_ch_state: return l1_ch_state((byte)(kanal - base_kanal));
|
||||
case drv_scale: return l1_scale((byte)(kanal - base_kanal));
|
||||
case drv_tx_calib: l1_tx_calib((byte)(kanal - base_kanal), (byte)a); break;
|
||||
case drv_set_led: set_led((byte)(kanal - base_kanal), (byte)a); break;
|
||||
case drv_rx_frame:
|
||||
if (rxf = l1_rx_frame())
|
||||
rxf->kanal += base_kanal;
|
||||
return (u32)rxf;
|
||||
case drv_get_framebuf: return (u32)(l1f = l1_get_framebuf(tx_kanal = (byte)(kanal - base_kanal)));
|
||||
case drv_tx_frame:
|
||||
if (l1f) l1f->kanal = tx_kanal;
|
||||
return l1_tx_frame();
|
||||
case drv_get_txdelay: return get_txdelay((byte)(kanal - base_kanal));
|
||||
case drv_get_mode: return get_mode((byte)(kanal - base_kanal));
|
||||
case drv_get_baud: return get_baud((byte)(kanal - base_kanal));
|
||||
case drv_set_txdelay: set_txdelay((byte)(kanal - base_kanal), (byte)a); break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//--------------------------------------------------------------------
|
||||
BOOL WINAPI DllMain (HANDLE hModule, DWORD dwFunction, LPVOID lpNot)
|
||||
{
|
||||
switch(dwFunction)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
// hier evtl. noch Test ob mehrfach geladen, dazu brauchts aber Handle (mutex oder sowas)
|
||||
hInst = hModule;
|
||||
// kein break, auch neuer Prozess istn Thread
|
||||
case DLL_THREAD_ATTACH:
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
// vor allem wenn harter Abbruch: Alles deinitialisieren!
|
||||
break; // kein Durchfall, Prozessende gibt eh alles frei und schliesst pipes
|
||||
case DLL_THREAD_DETACH:
|
||||
break;
|
||||
}
|
||||
return 1; // Indicate that the DLL was initialized successfully.
|
||||
}
|
||||
//--------------------------------------------------------------------
|
||||
BIN
flexdrv/driver.obj
Normal file
BIN
flexdrv/driver.obj
Normal file
Binary file not shown.
15
flexdrv/drv32.h
Normal file
15
flexdrv/drv32.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
#define DRIVER_INTERFACE_VERSION 1
|
||||
|
||||
enum drvc
|
||||
{
|
||||
drv_interfaceversion=1, drv_ident, drv_version,
|
||||
drv_config, drv_confinfo, drv_init_device, drv_get_ch_cnt,
|
||||
drv_exit, drv_ch_active, drv_init_kanal,
|
||||
drv_stat, drv_ch_state, drv_scale,
|
||||
drv_tx_calib, drv_set_led, drv_rx_frame,
|
||||
drv_get_framebuf, drv_tx_frame,
|
||||
drv_get_txdelay, drv_get_mode, drv_get_baud,
|
||||
drv_set_txdelay
|
||||
};
|
||||
|
||||
11
flexdrv/flexdriv.def
Normal file
11
flexdrv/flexdriv.def
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
;LIBRARY FLEXNET_DRIVER
|
||||
DESCRIPTION "FlexNet Channel Driver"
|
||||
|
||||
VERSION 1.0
|
||||
|
||||
CODE READ SHARED EXECUTE
|
||||
DATA READ WRITE
|
||||
|
||||
EXPORTS
|
||||
|
||||
flexnet_driver
|
||||
491
flexdrv/flexdrv.h
Normal file
491
flexdrv/flexdrv.h
Normal file
|
|
@ -0,0 +1,491 @@
|
|||
/***************************************************************
|
||||
|
||||
FlexNet / BayCom Layer 1 Service Interface
|
||||
|
||||
(C) 7/1994 DK7WJ, DL8MBT
|
||||
Translation by HB9JNX
|
||||
|
||||
Definitionen und Prototypes f<EFBFBD>r Aufruf von Layer1-Funktionen
|
||||
Definitions and prototypes for calling Layer1 functions
|
||||
|
||||
|
||||
28.08.94 DK7WJ Erste verteilte Version
|
||||
First distributed version
|
||||
10.09.94 DK7WJ Modebefehl geaendert
|
||||
Changed the mode command
|
||||
Prototypen neu f. Speichermodell MEDIUM
|
||||
New prototypes for the MEDIUM memory model
|
||||
25.09.94 DK7WJ FDX an Treiber uebergeben
|
||||
FDX now forwarded to the driver
|
||||
20.02.95 DK7WJ CH_TBY neu
|
||||
CH_TBY added
|
||||
31.03.95 DK7WJ Device-Versionkennungen
|
||||
Device version identifier
|
||||
01.03.96 DK7WJ Windows extensions, comments pending :-)
|
||||
22.04.96 DK7WJ .
|
||||
25.03.97 HB9JNX IO trapping changes
|
||||
|
||||
10.01.00 DK7WJ WIN32 definitions
|
||||
|
||||
19.06.00 DK7WJ CH_DEAD included
|
||||
***************************************************************/
|
||||
|
||||
//#ifndef _FLEXTYPES_DEFINED
|
||||
//#define _FLEXTYPES_DEFINED
|
||||
typedef unsigned char byte;
|
||||
typedef signed char i8;
|
||||
typedef signed short i16;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned long u32;
|
||||
#ifdef _WIN32
|
||||
#define far
|
||||
#define near
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma pack(push, flexdrv)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
|
||||
#define MAXFLEN 400 /* Maximale Laenge eines Frames */
|
||||
/* maximum length of a frame */
|
||||
|
||||
/* Struct f. Treiberkommunikation bei TX und RX */
|
||||
/* struct for communicating RX and TX packets to the driver */
|
||||
typedef struct
|
||||
{
|
||||
i16 len; /* Laenge des Frames - length of the frame */
|
||||
byte kanal; /* Kanalnummer - channel number */
|
||||
byte txdelay; /* RX: Gemessenes TxDelay [*10ms],
|
||||
0 wenn nicht unterstuetzt
|
||||
TX: Zu sendendes TxDelay */
|
||||
/* RX: measured transmitter keyup delay (TxDelay) in 10ms units,
|
||||
0 if not supported
|
||||
TX: transmitter keyup delay (TxDelay) that should be sent */
|
||||
byte frame[MAXFLEN]; /* L1-Frame (ohne CRC) - L1 frame without CRC */
|
||||
} L1FRAME;
|
||||
|
||||
/* Struct f. Kanalstatistik (wird noch erweitert) */
|
||||
/* struct for channel statistics (still being extended) */
|
||||
#ifndef _FLEXAPPL
|
||||
typedef struct
|
||||
{
|
||||
u32 tx_error; /* Underrun oder anderes Problem - underrun or some other problem */
|
||||
u32 rx_overrun; /* Wenn Hardware das unterstuetzt - if supported by the hardware */
|
||||
u32 rx_bufferoverflow;
|
||||
u32 tx_frames; /* Gesamt gesendete Frames - total number of sent frames */
|
||||
u32 rx_frames; /* Gesamt empfangene Frames - total number of received frames */
|
||||
u32 io_error; /* Reset von IO-Device - number of resets of the IO device */
|
||||
u32 reserve[4]; /* f. Erweiterungen, erstmal 0 lassen! - reserved for extensions, leave 0! */
|
||||
} L1_STATISTICS;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
extern HANDLE hInst;
|
||||
#pragma pack(pop, flexdrv)
|
||||
#endif
|
||||
|
||||
/* Masken f<>r den Mode-Parameter - bitmasks for the mode parameter */
|
||||
#define MODE_d 0x0080
|
||||
#define MODE_r 0x0040
|
||||
#define MODE_t 0x0020
|
||||
#define MODE_z 0x0010
|
||||
#define MODE_p 0x0004 /* needs also MODE_d */
|
||||
#define MODE_c 0x0002
|
||||
#define MODE_off 0x0001 /* Special: Wenn 1, Kanal abgeschaltet */
|
||||
/* special: if one, the channel is switched off */
|
||||
|
||||
/* Masken f<>r den L1-Kanalstatus */
|
||||
/* masks for the L1 channel status */
|
||||
#define CH_DEAD 0x01
|
||||
#define CH_RXB 0x40
|
||||
#define CH_PTT 0x20
|
||||
#define CH_DCD 0x10
|
||||
#define CH_FDX 0x08
|
||||
#define CH_TBY 0x04
|
||||
|
||||
#ifdef _WIN32
|
||||
// Konfiguration. Wenn geaendert, TRUE returnen, dann erfolgt exit() und Re-Init
|
||||
// max_channels: Maximal moegliche Kanalanzahl f. diesen Treiber
|
||||
int config_device(byte max_channels, HWND hParentWindow, byte channel);
|
||||
// Return: Anzahl belegte Kanaele!
|
||||
|
||||
byte *config_info(byte channel);
|
||||
/* Liefert String der die treiberspezifische Konfiguration beschreibt, z.B. Resourcen-Name
|
||||
Wenn keine treiberspezifische Konfiguration vorhanden (config_device() ist Dummy),
|
||||
Nullpointer liefern */
|
||||
/* Returns a string describing the channel configuration, i.e. the name of hardware resource
|
||||
If config_device() is a dummy, this call must return a null pointer
|
||||
*/
|
||||
int init_device(HKEY kHey);
|
||||
|
||||
void far l1_exit(HKEY hKey);
|
||||
|
||||
void set_txdelay(byte channel, byte txdel);
|
||||
byte get_txdelay(byte channel);
|
||||
u16 get_baud(byte channel);
|
||||
u16 get_mode(byte channel);
|
||||
#else
|
||||
u16 far init_device(int argc, char near *argv[]);
|
||||
/* Treiberinterner Aufruf aus Treiberkopf bei Installation: kann benutzt
|
||||
werden um Command Line Parameter zu parsen
|
||||
Return: 0=OK; sonst Exit mit Returnwert als Exit-Argument
|
||||
ACHTUNG: Wenn Returnwert >0, erfolgt Abbruch, es duerfen dann also keine
|
||||
aktiven oder umgelegten Interrupts verbleiben!
|
||||
*/
|
||||
/* This procedure is called from the driver stub at installation time. It
|
||||
may be used to parse the command line
|
||||
Return value: 0=OK; otherwise installation is cancelled and the value
|
||||
returned as exit argument
|
||||
WARNING: If return value >0 the installation is cancelled, active or
|
||||
patched interrupt vectors must not be left!
|
||||
*/
|
||||
void far l1_exit(void);
|
||||
/* Wird bei Verlassen des Programms aufgerufen und kann zum Aufr„umen
|
||||
verwendet werden (Interrupts und Schnittstellen abschalten)
|
||||
*/
|
||||
/* Is called when the driver terminates and may be used to clean up everything
|
||||
(switch off interrupts and interfaces)
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
u16 far l1_get_ch_cnt(void);
|
||||
/* Aufruf aus Treiberkopf bei Programmstart; muss Anzahl der im Treiber
|
||||
definierten Kanaele liefern
|
||||
*/
|
||||
/* called from the driver stub at installation time; should return the number
|
||||
of channels defined by the driver
|
||||
*/
|
||||
|
||||
|
||||
byte far l1_ch_active(byte kanal);
|
||||
/* Zurueckliefern, ob Kanal im Prinzip funktionstuechtig ist.
|
||||
Also immer, ausser wenn Dummykanal, >0 liefern!
|
||||
*/
|
||||
/* report if the channel could work in principle. Thus always return >0 if
|
||||
not a dummy channel.
|
||||
*/
|
||||
|
||||
byte far l1_init_kanal(byte kanal, u16 baud, u16 mode);
|
||||
/*
|
||||
Kanalnummer: 0-15
|
||||
Baud: Baudrate / 100, z.B. 115200 Baud wird als 1152 uebergeben
|
||||
Mode: Kanalmodus, Bitflaggen, derzeit definiert:
|
||||
0x0080 d Vollduplex
|
||||
0x0040 r Externer RX-Takt
|
||||
0x0020 t Externer TX-Takt
|
||||
0x0010 z NRZ-Kodierung (Anstatt NRZI), nur f. HDLC
|
||||
0x0002 c Kanal macht immer CRC, nur f. KISS
|
||||
Baycom: Soft-DCD aktivieren
|
||||
0x0001 - Kanal per Modebefehl deaktiviert
|
||||
Es sind noch weitere Bits definiert, die sind aber im L1-Treiber nicht
|
||||
relevant!
|
||||
Um eventuelle Verklemmungen zu beseitigen, sollte in diesem Modul der
|
||||
Treiber soweit als moeglich (re)initialisiert werden!
|
||||
|
||||
Return: 1 wenn alles ok;
|
||||
0 wenn Parameterfehler, dann Anzeige von '---' in der Modeliste
|
||||
|
||||
Aufruf erfolgt beim Programmstart sowie bei jeder Baud- oder Mode„nderung,
|
||||
ausserdem wenn der Kanal seit 3 Minuten nichts mehr empfangen hat.
|
||||
*/
|
||||
/*
|
||||
kanal: channel number (0-15)
|
||||
baud: the baud rate / 100, for example 115200 baud is specified as
|
||||
baud = 1152
|
||||
mode: the channel mode, a bit field, currently the following bits are
|
||||
defined:
|
||||
0x0080 d Full duplex
|
||||
0x0040 r External RX clock
|
||||
0x0020 t External TX clock
|
||||
0x0010 z NRZ coding (instead of NRZI) (only for HDLC)
|
||||
0x0002 c KISS: driver forces checksum
|
||||
Baycom: activate software DCD
|
||||
0x0001 - channel inactivated
|
||||
There are some additional bits defined which are not relevant to the
|
||||
L1 driver.
|
||||
|
||||
To recover from lockups, this function should (re)initialize as much of the
|
||||
driver and the hardware as possible.
|
||||
|
||||
Return value: 1 if everything is ok;
|
||||
0 if a parameter error; '---' is then displayed in the ports
|
||||
list
|
||||
|
||||
This procedure is called at program start, at every baud rate or mode
|
||||
change, or if the driver has not received anything for 3 minutes.
|
||||
*/
|
||||
|
||||
L1FRAME far * far l1_rx_frame(void);
|
||||
/*
|
||||
Wird zyklisch aufgerufen
|
||||
|
||||
Return: *Frame oder 0 wenn nichts empfangen
|
||||
Der Frame muá jeweils bis zum n„chsten Aufruf verf<EFBFBD>gbar bleiben,
|
||||
d.h. jeder Aufruf l”scht den zuletzt gemeldeten Frame
|
||||
*/
|
||||
/*
|
||||
Is called periodically
|
||||
|
||||
Return value: *Frame or null pointer if nothing was received
|
||||
The frame has to be readable until the next call to this
|
||||
function, i.e. every call removes the frame returned by the
|
||||
last call.
|
||||
*/
|
||||
|
||||
|
||||
L1FRAME far * far l1_get_framebuf(byte kanal);
|
||||
/* L2 fordert hiermit einen Sendepuffer an. Er muá die Maximall„nge aufnehmen
|
||||
k”nnen. Wenn erfolgreich, folgt vielleicht l1_tx_frame(), es kann aber
|
||||
auch vorkommen dass ein weiterer Aufruf erfolgt! Also nicht dynamisch
|
||||
allokieren, sondern nur einen Pointer liefern!
|
||||
Return: *Frame, der Frame wird hier hineingebaut
|
||||
0 wenn kein Platz verfuegbar
|
||||
*/
|
||||
/* L2 requests a transmitter buffer. The buffer must be able to store the
|
||||
maximum length. If successful, a l1_tx_frame() probably follows, but
|
||||
it may also happen that another call to l1_get_framebuf() follows!
|
||||
Therefore, do not allocate dynamically, just return a pointer!
|
||||
Return value: *Frame : the frame is stored here
|
||||
0 : no storage available
|
||||
*/
|
||||
|
||||
|
||||
byte far l1_tx_frame(void);
|
||||
/* Aussenden des Frames in vorher mit l1_get_framebuf angefordeten Buffers;
|
||||
Return: 1 wenn ok, sonst 0
|
||||
Wenn der Sender aus ist, muss jetzt die Entscheidung fallen ob gesendet
|
||||
werden kann!!!
|
||||
ACHTUNG: Wenn die Sendung nicht moeglich ist, darf der Frame auf keinen
|
||||
Fall gespeichert werden! Stattdessen den Frame verwerfen und 0 returnen.
|
||||
DCD darf den Sender auch bei Halbduplex NICHT sperren! Dies ist Bedingung
|
||||
fuer das Funktionieren des FlexNet-OPTIMA-Zugriffsverfahrens. Die DCD-
|
||||
Verriegelung ist bereits in FlexNet enthalten!
|
||||
Wenn der TX bereits an ist (PTT an) und es werden bereits Frames gesendet,
|
||||
sollte der Frame zur Sendung zwischengespeichert werden, sofern der Puffer-
|
||||
platz dafuer ausreicht. Wenn nicht, 0 returnen, dann erfolgt spaeter ein
|
||||
neuer Versuch. In diesem Fall muss jedoch sichergestellt sein, dass der
|
||||
Frame auf jeden Fall noch in DIESEM Durchgang gesendet wird!
|
||||
Das Kanalzugriffstiming findet bereits im FlexNet-Kern statt!
|
||||
*/
|
||||
/* Transmit the frame in the buffer that was returned by the last
|
||||
l1_get_framebuf()
|
||||
Return value: 1 if ok, 0 if not.
|
||||
If the transmitter is off, then the decision must now be made if
|
||||
transmission is possible!!!
|
||||
WARNING: If transmission is not possible now, the frame MUST NOT be stored!
|
||||
The frame should be thrown away and zero should be returned. DCD must not
|
||||
inhibit the transmitter, not even in half duplex mode! This is a necessity
|
||||
for the FlexNet-OPTIMA-Channel access algorithm. The Kernel already
|
||||
contains the DCD transmitter inhibit.
|
||||
If the transmitter is already on (PTT keyed) and frames are being sent,
|
||||
then the frame should be stored if the buffer memory suffices. If not,
|
||||
zero should be returned, the kernel will try again later. If the frame
|
||||
is stored, it is important that it gets transmitted during the same
|
||||
transmission!
|
||||
The channel access timing is already handled by the FlexNet kernel!
|
||||
*/
|
||||
|
||||
void far l1_tx_calib(byte kanal, byte minutes);
|
||||
/* Sofern die Hardware es erlaubt, Sender in Calibrate-Modus schalten.
|
||||
Minutes=0 stoppt den Calibrate-Mode sofort.
|
||||
*/
|
||||
/* If the hardware allows it, switch the transmitter into the calibrate mode
|
||||
(i.e. start transmitting a calibration pattern)
|
||||
minutes=0 should immediately stop the calibration mode.
|
||||
*/
|
||||
|
||||
byte far l1_ch_state(byte kanal);
|
||||
/* Gibt verschiedene Kanalzust„nde zur<75>ck, Bits sind 1 wenn wahr:
|
||||
0x40 RxB RxBuffer ist nicht leer
|
||||
0x20 PTT Sender ist an
|
||||
0x10 DCD Empf„nger ist aktiv
|
||||
0x08 FDX Kanal ist Vollduplex, kann also immer empfangen
|
||||
0x04 TBY Sender ist nicht bereit, z.B. wegen Calibrate
|
||||
|
||||
Anmerkung: Die korrekte Bedienung dieser Flags ist essentiell fuer das
|
||||
Funktionieren des FlexNet-Kanalzugriffstimings incl. DAMA-Master und -Slave.
|
||||
|
||||
Erlaeuterungen zu den Flags:
|
||||
|
||||
RxB ist 1 wenn gueltige RX-Frames im Puffer liegen. Verriegelt u.a. den Sender
|
||||
bei Halbduplex, da immer erst alle Frames verarbeitet werden sollen.
|
||||
Waehrend des Empfangs muss dieses Flag mit DCD ueberlappend bedient werden,
|
||||
d.h. sobald ein RX-Frame als gueltig erkannt wird, muss RxB spaetestens
|
||||
1 werden, wenn DCD 0 wird!
|
||||
PTT 1 wenn der TX bereits an ist. Dann setzt FlexNet voraus dass uebergebene
|
||||
Frames in diesem Durchgang noch gesendet werden koennen. Braucht nicht
|
||||
bedient zu werden bei reinen Vollduplextreibern, also wenn FDX 1 ist.
|
||||
DCD 1 wenn der Kanal belegt ist. Darf im Treiber den Sender nicht blockieren,
|
||||
die Entscheidung ob gesendet werden kann faellt stets im FlexNet-Kern!
|
||||
FDX Ist eine typabhaengige Konstante. Stets 0 bei Treibern die einen Halb-
|
||||
duplexkanal bedienen koennen, also die PTT- und DCD-Flags korrekt
|
||||
ansteuern. Treiber die kein Kanalzugriffstiming benoetigen (z.B. Ethernet,
|
||||
SLIP, KISS f. reine Rechnerkopplung usw.), liefern hier 1.
|
||||
TBY Dient nur zur Beschleunigung des Kernels. Wenn 1, wird nichts gesendet.
|
||||
Kann also z.B. waehrend Calibrate oder bei abgeschaltetem Kanal gesetzt
|
||||
werden
|
||||
*/
|
||||
/* return different channel states. The following bits are one if true:
|
||||
0x40 RxB RxBuffer is not empty
|
||||
0x20 PTT Transmitter is keyed on
|
||||
0x10 DCD Receiver is active
|
||||
0x08 FDX Channel is full duplex, receiver can always receive
|
||||
0x04 TBY Transmitter not ready, for example because of ongoing
|
||||
calibration
|
||||
|
||||
Note: It is essential that these flags are services correctly. Otherwise,
|
||||
the channel access timing including DAMA master and slave will not work
|
||||
correctly.
|
||||
|
||||
Explanation of the flags:
|
||||
|
||||
RxB is 1 if valid RX frames are available in the buffer. Inhibits for example
|
||||
the transmitter in half duplex mode, because all frames should be processed
|
||||
before transmitting. During receipt this flag should overlap the DCD flag,
|
||||
i.e. RxB should go to one before DCD transitions to zero!
|
||||
PTT 1 if the transmitter is already keyed up. In this case, FlexNet assumes
|
||||
that frames passed are sent during the same transmission. Needs not be
|
||||
serviced by full duplex drivers (i.e. if FDX is one)
|
||||
DCD 1 if the channel is busy. Must not inhibit the transmitter in the driver,
|
||||
since the decision if one should transmit is made by the FlexNet kernel!
|
||||
FDX is a driver dependent constant. Always 0 for drivers that may service a
|
||||
half duplex channel, i.e. that serve the PTT and DCD flags correctly.
|
||||
Drivers that do not need a channel access timing (for example Ethernet,
|
||||
SLIP, KISS for connecting PCs and so on), should return 1.
|
||||
TBY Speeds up the kernel. If 1, it will not try to send. May be set to one
|
||||
for example during calibration or if the channel is switched off.
|
||||
*/
|
||||
|
||||
u16 far l1_scale(byte kanal);
|
||||
/* Baudratenabh„ngigen Faktor liefern, wird f<>r diverse adaptive Parms
|
||||
gebraucht, u.a. T2-Steuerung.
|
||||
|
||||
Return: 300 Baud: 2048
|
||||
9600 Baud: 64
|
||||
|
||||
oder anders ausgedr<EFBFBD>ckt: Return = 614400/[Baudrate]
|
||||
|
||||
Sollte die real moegliche Geschwindigkeit des Kanals liefern. Bei Treibern,
|
||||
die die in init_kanal() uebergebene Baudrate verwenden, berechnen. Treiber,
|
||||
die diese nicht verwenden, sollten einen Schaetzwert liefern. Bei sehr
|
||||
schnellen Kanaelen (z.B. Ethernet) immer 0 liefern!
|
||||
*/
|
||||
/* Return a baud rate dependent factor. Is needed to calculate several adaptive
|
||||
parameters, for example T2 control
|
||||
|
||||
Return value: 300 baud: 2048
|
||||
9600 baud: 64
|
||||
|
||||
or as a formula: Return value = 614400/[baud rate]
|
||||
|
||||
Should return the real speed of the channel. Drivers that use the baud rate
|
||||
specified in init_kanal() should calculate the return value. Drivers that do
|
||||
not use this parameter should estimate the speed of the channel. Drivers for
|
||||
very fast channels (for example Ethernet) should always return 0!
|
||||
*/
|
||||
|
||||
char far * far l1_ident(byte kanal);
|
||||
/* Kennung f<>r Kanalhardware bzw. Treibertyp zur<75>ckgeben.
|
||||
Geliefert wird ein far-pointer auf einen null-terminierten String.
|
||||
Der String f<EFBFBD>r die Kanalhardware ist maximal 8 Zeichen lang,
|
||||
z.B. "SCC0" .. "SCC3", "RS232", "PAR96", "KISS", "IPX", usw.
|
||||
*/
|
||||
/* Return an identifier for the channel hardware or the driver type.
|
||||
The return value must be a far pointer to a zero terminated string.
|
||||
The string should be at most 8 characters long.
|
||||
Examples are "SCC0" .. "SCC3", "RS232", "PAR96", "KISS", "IPX", etc.
|
||||
*/
|
||||
|
||||
char far * far l1_version(byte kanal);
|
||||
/* Versionsnummernstring liefern. Maximal 5 Zeichen
|
||||
*/
|
||||
/* Return a version number string. At most 5 characters.
|
||||
*/
|
||||
|
||||
L1_STATISTICS far * far l1_stat(byte kanal, byte delete);
|
||||
/* Statistikwerte liefern
|
||||
Delete = 1: Werte auf 0 zuruecksetzen!
|
||||
Wenn nicht implementiert, Nullpointer liefern!
|
||||
*/
|
||||
/* Return the statistics.
|
||||
Delete = 1: clear the statistics values!
|
||||
If not implemented, return a null pointer!
|
||||
*/
|
||||
|
||||
void set_led(byte kanal, byte ledcode);
|
||||
/* Falls der Kanal Status-LEDs hat (z.B. TNC), kommen hier die Zustaende
|
||||
bei jeder Aenderung an; kann sicherlich meistens Dummy sein:
|
||||
Bitmasken dazu: */
|
||||
/* If the channel hardware has status LEDs (for example a TNC), this procedure
|
||||
may be used to drive them; in most cases, this procedure may be a dummy.
|
||||
Bitmasks used: */
|
||||
#define LED_CON 2 /* Mindestens 1 Connect - at least one connect */
|
||||
#define LED_STA 4 /* Sendeseitig ausstehende Frames - frames in the transmitter buffer */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#ifndef _WIN32
|
||||
/* Pointer auf unsigned-Timertic, f. schnellen Zugriff wenn Zeitintervalle
|
||||
geprueft werden muessen. Inkrementiert alle 100ms mit Phasenjitter */
|
||||
/* Pointer to an unsigned timer_tic, for fast access if timing intervals
|
||||
need to be measured. Increments every 100ms with phase jitter */
|
||||
extern const volatile far u16 *timer_tic;
|
||||
|
||||
/* Variable fuer externe Kommunikation zwischen Modulen
|
||||
Koennen bei Bedarf besetzt werden */
|
||||
/* Variables for intermodule communications
|
||||
May be used if needed */
|
||||
extern u16 device_type; /* Bitte vor Vergabe DK7WJ konsultieren! */
|
||||
/* Please consult DK7WJ prior to usage! */
|
||||
extern u16 device_version; /* Versionskennung - version identifier */
|
||||
extern void far *device_vector; /* Beliebiger Vektor, wird zurueckgeliefert */
|
||||
/* arbitrary vector returned by device_vec() */
|
||||
extern void far (*drv_cb)(void);
|
||||
typedef struct
|
||||
{
|
||||
u16 ds;
|
||||
u16 es;
|
||||
u16 cs;
|
||||
u16 dsize;
|
||||
u16 esize;
|
||||
u16 csize;
|
||||
u16 offset;
|
||||
u16 irq;
|
||||
u16 revision;
|
||||
u16 ioport1;
|
||||
u16 ioextent1;
|
||||
u16 ioport2;
|
||||
u16 ioextent2;
|
||||
} defint;
|
||||
extern defint intsegs;
|
||||
|
||||
#define DEFINT_REVISION 1
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Die folgenden Aufrufe werden durch den Treiberkern bereitgestellt */
|
||||
/* The following procedures are supplied by the driver library */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* Einige einfache Ausgaberoutinen, die die Verwendung von printf() ersparen */
|
||||
/* Nur waehrend der Initialisierung in init_device() verwenden!! */
|
||||
/* Some simple console output routines, that make printf() unnecessary */
|
||||
/* May only be used during initialisation, inside init_device()!! */
|
||||
void far pch(byte character);
|
||||
/* Gibt ein Zeichen auf die Konsole aus
|
||||
Print a character onto the console
|
||||
*/
|
||||
void far pstr(byte near *string);
|
||||
/* Gibt einen C-String auf die Konsole aus
|
||||
Print a C string onto the console
|
||||
*/
|
||||
void far pnum(u16 num);
|
||||
/* Gibt einen numerischen Wert dezimal aus
|
||||
Print a decimal numerical value onto the console
|
||||
*/
|
||||
void far phex(u16 hex);
|
||||
/* Gibt einen numerischen Wert hexadezimal aus
|
||||
Print a hexadecimal numerical value onto the console
|
||||
*/
|
||||
#endif // _WIN32
|
||||
4
flexdrv/resource.h
Normal file
4
flexdrv/resource.h
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#define IDD_DIALOG1 101
|
||||
#define IDC_CONFIG 1000
|
||||
#define IDC_MAXCHANNELSSPIN 1001
|
||||
#define IDC_MAXCHANNELS 1002
|
||||
1295
flexdrv/soundmodem.c
Normal file
1295
flexdrv/soundmodem.c
Normal file
File diff suppressed because it is too large
Load diff
58
flexdrv/soundmodem.rc
Normal file
58
flexdrv/soundmodem.rc
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
#include "resource.h"
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
#define IDC_STATIC -1
|
||||
|
||||
IDD_DIALOG1 DIALOGEX 0, 0, 232, 70
|
||||
STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Dialog"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,175,12,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,175,37,50,14
|
||||
RTEXT "Configuration",IDC_STATIC,15,16,55,8,0,WS_EX_RIGHT
|
||||
COMBOBOX IDC_CONFIG,73,13,50,145,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Author: Thomas Sailer, HB9JNX/AE4WA",IDC_STATIC,"Static",
|
||||
SS_LEFTNOWORDWRAP | WS_GROUP,3,60,130,8
|
||||
END
|
||||
|
||||
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x0L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "080704b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "\0"
|
||||
VALUE "CompanyName", "HB9JNX\0"
|
||||
VALUE "FileDescription", "SoundModem\0"
|
||||
VALUE "FileVersion", "1, 0, 0, 1\0"
|
||||
VALUE "InternalName", "SoundModem FlexNet driver\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1999-2000\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "soundmodem.dll\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "SoundModem\0"
|
||||
VALUE "ProductVersion", "1.00a\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
25
fsk/Makefile.am
Normal file
25
fsk/Makefile.am
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
INCLUDES = -I$(top_srcdir)/soundcard -I$(top_srcdir)/matlib -I$(top_srcdir)/libmisc -I.
|
||||
|
||||
|
||||
noinst_LIBRARIES = libfsk.a
|
||||
libfsk_a_SOURCES = fskic.c fskic.h modem.c modempsp.c psp.h modemeq.c
|
||||
|
||||
genpsptbl_SOURCES = genpsptbl.c
|
||||
genpsptbl_LDADD = ../matlib/libmat.a
|
||||
|
||||
gendf9icfilt_SOURCES = gendf9icfilt.cc
|
||||
gendf9icfilt_LDADD = ../matlib/libmat.a ../libmisc/libmisc.a
|
||||
|
||||
if CROSSCOMP
|
||||
|
||||
else
|
||||
|
||||
noinst_PROGRAMS = genpsptbl gendf9icfilt
|
||||
|
||||
$(srcdir)/psp.h: genpsptbl$(EXEEXT)
|
||||
./genpsptbl$(EXEEXT) > $@
|
||||
|
||||
$(srcdir)/fskic.h: gendf9icfilt$(EXEEXT)
|
||||
./gendf9icfilt$(EXEEXT) > $@
|
||||
|
||||
endif
|
||||
542
fsk/Makefile.in
Normal file
542
fsk/Makefile.in
Normal file
|
|
@ -0,0 +1,542 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
@CROSSCOMP_FALSE@noinst_PROGRAMS = genpsptbl$(EXEEXT) \
|
||||
@CROSSCOMP_FALSE@ gendf9icfilt$(EXEEXT)
|
||||
subdir = fsk
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libfsk_a_AR = $(AR) $(ARFLAGS)
|
||||
libfsk_a_LIBADD =
|
||||
am_libfsk_a_OBJECTS = fskic.$(OBJEXT) modem.$(OBJEXT) \
|
||||
modempsp.$(OBJEXT) modemeq.$(OBJEXT)
|
||||
libfsk_a_OBJECTS = $(am_libfsk_a_OBJECTS)
|
||||
PROGRAMS = $(noinst_PROGRAMS)
|
||||
am_gendf9icfilt_OBJECTS = gendf9icfilt.$(OBJEXT)
|
||||
gendf9icfilt_OBJECTS = $(am_gendf9icfilt_OBJECTS)
|
||||
gendf9icfilt_DEPENDENCIES = ../matlib/libmat.a ../libmisc/libmisc.a
|
||||
am_genpsptbl_OBJECTS = genpsptbl.$(OBJEXT)
|
||||
genpsptbl_OBJECTS = $(am_genpsptbl_OBJECTS)
|
||||
genpsptbl_DEPENDENCIES = ../matlib/libmat.a
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
-o $@
|
||||
SOURCES = $(libfsk_a_SOURCES) $(gendf9icfilt_SOURCES) \
|
||||
$(genpsptbl_SOURCES)
|
||||
DIST_SOURCES = $(libfsk_a_SOURCES) $(gendf9icfilt_SOURCES) \
|
||||
$(genpsptbl_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
|
||||
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
HAVE_ALSA = @HAVE_ALSA@
|
||||
HAVE_BITTYPES = @HAVE_BITTYPES@
|
||||
HAVE_DIRECTX = @HAVE_DIRECTX@
|
||||
HAVE_IFRNEWNAME = @HAVE_IFRNEWNAME@
|
||||
HAVE_MKISS = @HAVE_MKISS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
M_PI = @M_PI@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USEMMX = @USEMMX@
|
||||
USEVIS = @USEVIS@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WIN32 = @WIN32@
|
||||
WINDRES = @WINDRES@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = -I$(top_srcdir)/soundcard -I$(top_srcdir)/matlib -I$(top_srcdir)/libmisc -I.
|
||||
noinst_LIBRARIES = libfsk.a
|
||||
libfsk_a_SOURCES = fskic.c fskic.h modem.c modempsp.c psp.h modemeq.c
|
||||
genpsptbl_SOURCES = genpsptbl.c
|
||||
genpsptbl_LDADD = ../matlib/libmat.a
|
||||
gendf9icfilt_SOURCES = gendf9icfilt.cc
|
||||
gendf9icfilt_LDADD = ../matlib/libmat.a ../libmisc/libmisc.a
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .cc .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu fsk/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu fsk/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libfsk.a: $(libfsk_a_OBJECTS) $(libfsk_a_DEPENDENCIES)
|
||||
-rm -f libfsk.a
|
||||
$(libfsk_a_AR) libfsk.a $(libfsk_a_OBJECTS) $(libfsk_a_LIBADD)
|
||||
$(RANLIB) libfsk.a
|
||||
|
||||
clean-noinstPROGRAMS:
|
||||
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
|
||||
gendf9icfilt$(EXEEXT): $(gendf9icfilt_OBJECTS) $(gendf9icfilt_DEPENDENCIES)
|
||||
@rm -f gendf9icfilt$(EXEEXT)
|
||||
$(CXXLINK) $(gendf9icfilt_OBJECTS) $(gendf9icfilt_LDADD) $(LIBS)
|
||||
genpsptbl$(EXEEXT): $(genpsptbl_OBJECTS) $(genpsptbl_DEPENDENCIES)
|
||||
@rm -f genpsptbl$(EXEEXT)
|
||||
$(LINK) $(genpsptbl_OBJECTS) $(genpsptbl_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fskic.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gendf9icfilt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/genpsptbl.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modem.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modemeq.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modempsp.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cc.o:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cc.obj:
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES) $(PROGRAMS)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \
|
||||
distclean-compile distclean-generic distclean-tags distdir dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am
|
||||
|
||||
|
||||
@CROSSCOMP_FALSE@$(srcdir)/psp.h: genpsptbl$(EXEEXT)
|
||||
@CROSSCOMP_FALSE@ ./genpsptbl$(EXEEXT) > $@
|
||||
|
||||
@CROSSCOMP_FALSE@$(srcdir)/fskic.h: gendf9icfilt$(EXEEXT)
|
||||
@CROSSCOMP_FALSE@ ./gendf9icfilt$(EXEEXT) > $@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
56
fsk/fskic.c
Normal file
56
fsk/fskic.c
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* fskic.c -- DF9IC FSK Modem filter curves.
|
||||
*
|
||||
* Copyright (C) 2003
|
||||
* Thomas Sailer (t.sailer@alumni.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include "modem.h"
|
||||
#include "raisedcosine.h"
|
||||
#include "fskic.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
double df9ic_rxfilter(double t)
|
||||
{
|
||||
unsigned int i;
|
||||
double sum = 0;
|
||||
|
||||
t *= FSKIC_RXOVER;
|
||||
t += 0.5 * sizeof(fskic_rxpulse) / sizeof(fskic_rxpulse[0]);
|
||||
for (i = 0; i < sizeof(fskic_rxpulse) / sizeof(fskic_rxpulse[0]); i++)
|
||||
sum += fskic_rxpulse[i] * sinc(i - t);
|
||||
return sum;
|
||||
}
|
||||
|
||||
double df9ic_txfilter(double t)
|
||||
{
|
||||
unsigned int i;
|
||||
double sum = 0;
|
||||
|
||||
t *= FSKIC_TXOVER;
|
||||
t += 0.5 * sizeof(fskic_txpulse) / sizeof(fskic_txpulse[0]);
|
||||
for (i = 0; i < sizeof(fskic_txpulse) / sizeof(fskic_txpulse[0]); i++)
|
||||
sum += fskic_txpulse[i] * sinc(i - t);
|
||||
return sum;
|
||||
}
|
||||
48
fsk/fskic.h
Normal file
48
fsk/fskic.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/* this file is automatically generated, do not edit!! */
|
||||
|
||||
#define FSKIC_RXOVER 16
|
||||
|
||||
static float fskic_rxpulse[64] = {
|
||||
0.000890478, 0.0974088, 0.332671, 0.621645,
|
||||
0.916502, 1.17425, 1.37626, 1.50776,
|
||||
1.56942, 1.56285, 1.49889, 1.38671,
|
||||
1.24045, 1.07079, 0.890749, 0.709024,
|
||||
0.535291, 0.374779, 0.233216, 0.112303,
|
||||
0.0142867, -0.061933, -0.116605, -0.152585,
|
||||
-0.17152, -0.177011, -0.171155, -0.157503,
|
||||
-0.137937, -0.115461, -0.0913712, -0.0679072,
|
||||
-0.0456628, -0.0261097, -0.00920401, 0.0042194,
|
||||
0.0146807, 0.0217903, 0.0263536, 0.0282322,
|
||||
0.028343, 0.026639, 0.0240178, 0.0204135,
|
||||
0.0166248, 0.012507, 0.00872616, 0.00504081,
|
||||
0.00198556, -0.000767996, -0.00279431, -0.00448333,
|
||||
-0.00548732, -0.00622814, -0.00640473, -0.00644437,
|
||||
-0.00606727, -0.00568666, -0.00502671, -0.0044752,
|
||||
-0.00375098, -0.00321219, -0.0025696, -0.00215283
|
||||
};
|
||||
|
||||
#define FSKIC_TXOVER 8
|
||||
|
||||
static float fskic_txpulse[96] = {
|
||||
-8.89964e-05, 5.0355e-05, 0.000234463, 0.000420846,
|
||||
0.000557468, 0.000596838, 0.000509613, 0.000296303,
|
||||
-1.30278e-05, -0.0003514, -0.000651903, -0.000824791,
|
||||
-0.000841548, -0.000668018, -0.000363734, -7.03831e-06,
|
||||
0.000346464, 0.000444599, 0.00046553, 0.000119019,
|
||||
-0.000277057, -0.00075427, -0.00101198, -0.000925374,
|
||||
-0.000310504, 0.000817119, 0.00239079, 0.00406327,
|
||||
0.00551389, 0.00617868, 0.0057039, 0.00374024,
|
||||
0.000299999, -0.00436966, -0.00953453, -0.014307,
|
||||
-0.0174382, -0.0177176, -0.0140972, -0.00583524,
|
||||
0.00715598, 0.0245933, 0.0448985, 0.0672416,
|
||||
0.0881474, 0.107226, 0.120641, 0.128038,
|
||||
0.128276, 0.120497, 0.106941, 0.0872594,
|
||||
0.0652762, 0.0417601, 0.019935, 0.00120331,
|
||||
-0.0129246, -0.021837, -0.0254833, -0.0246909,
|
||||
-0.0203538, -0.0140835, -0.00705189, -0.00062926,
|
||||
0.00442428, 0.00753531, 0.00872837, 0.00818526,
|
||||
0.00646528, 0.00412531, 0.00174425, -0.000228692,
|
||||
-0.00155499, -0.00212582, -0.00208806, -0.00156349,
|
||||
-0.000932976, -0.000208682, 0.000149419, 0.000401453
|
||||
};
|
||||
|
||||
316
fsk/gendf9icfilt.cc
Normal file
316
fsk/gendf9icfilt.cc
Normal file
|
|
@ -0,0 +1,316 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* gendf9icfilt.cc -- Compute DF9IC Hardware Modem Filter Curves.
|
||||
*
|
||||
* Copyright (C) 2003
|
||||
* Thomas Sailer (t.sailer@alumni.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
#include <complex>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include "fft.hh"
|
||||
#include "mat.hh"
|
||||
#include "raisedcosine.h"
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
template<typename T> complex<T> rxfilter(T freq)
|
||||
{
|
||||
complex<T> g1(T(1)/100e3,0);
|
||||
complex<T> g2(T(1)/82e3,0);
|
||||
complex<T> g3(T(1)/39e3,0);
|
||||
complex<T> g4(T(1)/27e3,0);
|
||||
freq *= 2 * M_PI * 9600;
|
||||
complex<T> y1(0,freq*470e-9);
|
||||
complex<T> y2(0,freq*1e-9);
|
||||
complex<T> y3(0,freq*220e-12);
|
||||
complex<T> y4(0,freq*1e-9);
|
||||
|
||||
return y1 * g2 * g3 * g4 /
|
||||
(((g3 + y3) * g2 * (y1 + g1) + y3 * (y2 + g3) * (y1 + g1 + g2)) * (g4 + y4));
|
||||
}
|
||||
|
||||
template<typename T> complex<T> txfilter(T freq)
|
||||
{
|
||||
complex<T> g1(T(1)/100,0);
|
||||
complex<T> g2(T(1)/10e3,0);
|
||||
complex<T> g3(T(1)/100e3,0);
|
||||
complex<T> g4(T(1)/100e3,0);
|
||||
complex<T> g5(T(1)/56e3,0);
|
||||
complex<T> g6(T(1)/8.2e3,0);
|
||||
complex<T> g7(T(1)/12e3,0);
|
||||
freq *= 2 * M_PI * 9600;
|
||||
complex<T> y1(0,freq*3.3e-9);
|
||||
complex<T> y2(0,freq*470e-12);
|
||||
complex<T> y3(0,freq*100e-12);
|
||||
complex<T> y4(0,freq*1e-9);
|
||||
|
||||
return g1 * g4 * g5 * g6 /
|
||||
(((g1 + g2 + g3 + y1) * (g5 + y3) * g4 +
|
||||
(g1 + g2 + g3 + y1 + g4) * y3 * (y2 + g5)) * (y4 + g7));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static void printtransferfunc(ostream& os, unsigned int nr, double over)
|
||||
{
|
||||
over /= nr;
|
||||
os << "# name: rxf\n"
|
||||
"# type: complex matrix\n"
|
||||
"# rows: " << nr << "\n"
|
||||
"# columns: 1\n";
|
||||
for (unsigned int i = 0; i < nr; i++) {
|
||||
complex<double> tf = rxfilter(i * over);
|
||||
os << "(" << tf.real() << "," << tf.imag() << ")\n";
|
||||
}
|
||||
os << "# name: txf\n"
|
||||
"# type: complex matrix\n"
|
||||
"# rows: " << nr << "\n"
|
||||
"# columns: 1\n";
|
||||
for (unsigned int i = 0; i < nr; i++) {
|
||||
complex<double> tf = txfilter(i * over);
|
||||
os << "(" << tf.real() << "," << tf.imag() << ")\n";
|
||||
}
|
||||
os.flush();
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
template<typename T> static void matprintf(ostream& os, const char *name,
|
||||
unsigned int size1, unsigned int stride1,
|
||||
unsigned int size2, unsigned int stride2, const T *m)
|
||||
{
|
||||
os << "# name: " << name << "\n# type: matrix\n# rows: " << size1 << "\n# columns: " << size2 << "\n";
|
||||
for (unsigned int i = 0; i < size1; i++) {
|
||||
for (unsigned int j = 0; j < size2; j++)
|
||||
os << " " << m[i*stride1 + j*stride2];
|
||||
os << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static double comptx(ostream& os, double *filt, const double *pulse, unsigned int filtlen, unsigned int pulselen,
|
||||
unsigned int over, unsigned int odiv, double shift, unsigned int oct)
|
||||
{
|
||||
unsigned int rlen = 2 * filtlen + pulselen;
|
||||
double C[rlen * filtlen];
|
||||
double CT[rlen * filtlen];
|
||||
double CTC[filtlen * filtlen];
|
||||
double CTr[filtlen];
|
||||
double Cf[rlen];
|
||||
double r[rlen];
|
||||
double e, e1;
|
||||
double rcosalpha = 3.0 / 8;
|
||||
int pidx;
|
||||
unsigned int i, j;
|
||||
|
||||
for (i = 0; i < rlen; i++) {
|
||||
pidx = i - 2 * filtlen + 1;
|
||||
if (pidx >= (signed int)pulselen) {
|
||||
rlen = i;
|
||||
break;
|
||||
}
|
||||
for (j = 0; j < filtlen; j++, pidx += odiv) {
|
||||
if (pidx < 0 || pidx >= (int)pulselen)
|
||||
C[i*filtlen+j] = 0;
|
||||
else
|
||||
C[i*filtlen+j] = pulse[pidx];
|
||||
}
|
||||
}
|
||||
for (i = 0; i < rlen; i++)
|
||||
r[i] = raised_cosine_time((i - 0.5 * (rlen-1)) / (double)over + shift, rcosalpha);
|
||||
if (oct) {
|
||||
matprintf(os, "C", rlen, filtlen, filtlen, 1, C);
|
||||
matprintf(os, "r", rlen, 1, 1, 1, r);
|
||||
}
|
||||
mtranspose(CT, C, rlen, filtlen);
|
||||
mmul(CTC, CT, C, filtlen, rlen, filtlen);
|
||||
mmul(CTr, CT, r, filtlen, rlen, 1);
|
||||
mchol(CTC, CTr, filt, filtlen);
|
||||
if (oct)
|
||||
matprintf(os, "filt", filtlen, 1, 1, 1, filt);
|
||||
mmul(Cf, C, filt, rlen, filtlen, 1);
|
||||
for (i = 0, e = 0; i < rlen; i++) {
|
||||
e1 = Cf[i] - r[i];
|
||||
e += e1 * e1;
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
static void printfcoeff(ostream& os, unsigned int fftsz, unsigned int over, unsigned int oct)
|
||||
{
|
||||
if (oct)
|
||||
printtransferfunc(os, fftsz, over);
|
||||
else
|
||||
os << "/* this file is automatically generated, do not edit!! */\n\n";
|
||||
complex<double> fftb[fftsz];
|
||||
double rpulse[fftsz], tpulse[fftsz];
|
||||
double dover = double(over) / fftsz;
|
||||
double sum;
|
||||
|
||||
/* compute rx pulse */
|
||||
for (unsigned int i = 1; i < fftsz/2; i++)
|
||||
fftb[i] = rxfilter(i * dover);
|
||||
fftb[0] = complex<double>(fftb[1].real(), 0);
|
||||
fftb[fftsz/2] = 0;
|
||||
for (unsigned int i = 1; i < fftsz/2; i++)
|
||||
fftb[fftsz-i] = conj(fftb[i]);
|
||||
if (oct) {
|
||||
os << "# name: rxs\n"
|
||||
"# type: complex matrix\n"
|
||||
"# rows: " << fftsz << "\n"
|
||||
"# columns: 1\n";
|
||||
for (unsigned int i = 0; i < fftsz; i++)
|
||||
os << "(" << fftb[i].real() << "," << fftb[i].imag() << ")\n";
|
||||
}
|
||||
fft_rif(fftb, fftsz, -1);
|
||||
sum = 0;
|
||||
for (unsigned int i = fftsz/2; i < fftsz; i++)
|
||||
sum -= fftb[i].real();
|
||||
sum *= double(2) / fftsz;
|
||||
for (unsigned int i = 0; i < fftsz; i++)
|
||||
rpulse[i] = dover * (fftb[i].real() + sum);
|
||||
if (oct) {
|
||||
os << "# name: rx\n"
|
||||
"# type: matrix\n"
|
||||
"# rows: " << fftsz << "\n"
|
||||
"# columns: 1\n";
|
||||
for (unsigned int i = 0; i < fftsz; i++)
|
||||
os << rpulse[i] << "\n";
|
||||
} else {
|
||||
os << "#define FSKIC_RXOVER " << over << "\n";
|
||||
os << "\nstatic float fskic_rxpulse[" << 4 * over << "] = {";
|
||||
for (unsigned int i = 0;;) {
|
||||
if (!(i & 3))
|
||||
os << "\n\t";
|
||||
os << " " << rpulse[i];
|
||||
i++;
|
||||
if (i >= 4 * over)
|
||||
break;
|
||||
os << ",";
|
||||
}
|
||||
os << "\n};\n\n";
|
||||
}
|
||||
/* compute tx pulse */
|
||||
for (unsigned int i = 1; i < fftsz/2; i++)
|
||||
fftb[i] = txfilter(i * dover);
|
||||
fftb[0] = complex<double>(fftb[1].real(), 0);
|
||||
fftb[fftsz/2] = 0;
|
||||
for (unsigned int i = 1; i < fftsz/2; i++)
|
||||
fftb[fftsz-i] = conj(fftb[i]);
|
||||
if (oct) {
|
||||
os << "# name: txs\n"
|
||||
"# type: complex matrix\n"
|
||||
"# rows: " << fftsz << "\n"
|
||||
"# columns: 1\n";
|
||||
for (unsigned int i = 0; i < fftsz; i++)
|
||||
os << "(" << fftb[i].real() << "," << fftb[i].imag() << ")\n";
|
||||
}
|
||||
fft_rif(fftb, fftsz, -1);
|
||||
sum = 0;
|
||||
for (unsigned int i = fftsz/2; i < fftsz; i++)
|
||||
sum -= fftb[i].real();
|
||||
sum *= double(2) / fftsz;
|
||||
for (unsigned int i = 0; i < fftsz; i++)
|
||||
tpulse[i] = dover * (fftb[i].real() + sum);
|
||||
if (oct) {
|
||||
os << "# name: tx\n"
|
||||
"# type: matrix\n"
|
||||
"# rows: " << fftsz << "\n"
|
||||
"# columns: 1\n";
|
||||
for (unsigned int i = 0; i < fftsz; i++)
|
||||
os << tpulse[i] << "\n";
|
||||
}
|
||||
/* compute tx compensation filter */
|
||||
double filt[8 * over];
|
||||
double shift = 0;
|
||||
ostringstream oss;
|
||||
double err = comptx(oss, filt, rpulse, sizeof(filt) / sizeof(filt[0]), 4 * over, over, 2, shift, oct);
|
||||
double maxf = 0;
|
||||
for (unsigned int i = 0; i < sizeof(filt) / sizeof(filt[0]); i++)
|
||||
if (filt[i] > maxf) {
|
||||
maxf = filt[i];
|
||||
shift = i;
|
||||
}
|
||||
shift -= sizeof(filt) / sizeof(filt[0]) / double(2);
|
||||
shift *= double(2) / over;
|
||||
shift = -shift;
|
||||
err = comptx(os, filt, rpulse, sizeof(filt) / sizeof(filt[0]), 4 * over, over, 2, shift, oct);
|
||||
if (oct) {
|
||||
os << "# name: err\n"
|
||||
<< "# type: scalar\n"
|
||||
<< err << "\n";
|
||||
} else {
|
||||
os << "#define FSKIC_TXOVER " << over / 2 << "\n";
|
||||
os << "\nstatic float fskic_txpulse[" << sizeof(filt) / sizeof(filt[0]) - 2 * over << "] = {";
|
||||
for (unsigned int i = over;;) {
|
||||
if (!(i & 3))
|
||||
os << "\n\t";
|
||||
os << " " << filt[i];
|
||||
i++;
|
||||
if (i >= sizeof(filt) / sizeof(filt[0]) - 2 * over)
|
||||
break;
|
||||
os << ",";
|
||||
}
|
||||
os << "\n};\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
static const struct option long_options[] = {
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
int c, err = 0;
|
||||
unsigned int oct = 0;
|
||||
|
||||
while ((c = getopt_long(argc, argv, "o", long_options, NULL)) != EOF) {
|
||||
switch (c) {
|
||||
case 'o':
|
||||
oct = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
err++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (err) {
|
||||
cerr << "usage: [-o]\n";
|
||||
exit(1);
|
||||
}
|
||||
printfcoeff(cout, 2048, 16, oct);
|
||||
return 0;
|
||||
}
|
||||
149
fsk/genpsptbl.c
Normal file
149
fsk/genpsptbl.c
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* genpsptbl.c -- Per Survivor Processing Table Generator.
|
||||
*
|
||||
* Copyright (C) 2000
|
||||
* Thomas Sailer (sailer@ife.ee.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mat.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define DEBUG
|
||||
|
||||
#define VECLENGTH 3
|
||||
|
||||
#define ESTDATASYMS 8
|
||||
#define ESTPARAMS (VECLENGTH+1)
|
||||
#define ESTSYMBOLS (ESTDATASYMS-VECLENGTH+1)
|
||||
#define ESTSHIFT 8
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static int fcmatprintf(FILE *f, const char *name, unsigned int size1, unsigned int stride1,
|
||||
unsigned int size2, unsigned int stride2, const cplxfloat_t *m)
|
||||
{
|
||||
unsigned int i, j;
|
||||
int ret = 0;
|
||||
|
||||
fprintf(f, "%s = [", name);
|
||||
for (i = 0; i < size1; i++) {
|
||||
for (j = 0; j < size2; j++) {
|
||||
ret += fprintf(f, " %g", real(m[i*stride1 + j*stride2]));
|
||||
if (imag(m[i*stride1 + j*stride2]) != 0)
|
||||
ret += fprintf(f, "%+gi", imag(m[i*stride1 + j*stride2]));
|
||||
}
|
||||
if (i+1 < size1)
|
||||
ret += fprintf(f, " ; ...\n ");
|
||||
}
|
||||
ret += fprintf(f, " ];\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
static void gentrainmats(FILE *f)
|
||||
{
|
||||
cplxfloat_t ma[ESTSYMBOLS*ESTPARAMS], mah[ESTPARAMS*ESTSYMBOLS], maha[ESTPARAMS*ESTPARAMS];
|
||||
cplxfloat_t mahainv[ESTPARAMS*ESTPARAMS], mahainvah[ESTPARAMS*ESTSYMBOLS];
|
||||
cplxfloat_t det;
|
||||
unsigned int i, j, k;
|
||||
unsigned long singular[1<<(ESTDATASYMS-5)];
|
||||
|
||||
fprintf(f, "/* this file is automatically generated, do not edit!! */\n\n"
|
||||
"#define VECLENGTH %u\n"
|
||||
"#define ESTDATAMASK %u\n"
|
||||
"#define ESTDATASYMS %u\n"
|
||||
"#define ESTPARAMS %u\n"
|
||||
"#define ESTSYMBOLS %u\n"
|
||||
"#define ESTSHIFT %u\n"
|
||||
"\n\nstatic const int16_t estmat[%u][ESTPARAMS*ESTSYMBOLS] = {",
|
||||
VECLENGTH, (1<<ESTDATASYMS)-1, ESTDATASYMS, ESTPARAMS, ESTSYMBOLS,
|
||||
ESTSHIFT, 1<<ESTDATASYMS);
|
||||
memset(singular, 0, sizeof(singular));
|
||||
for (i = 0; i < (1<<ESTDATASYMS); i++) {
|
||||
if (i)
|
||||
fputc(',', f);
|
||||
fprintf(f, "\n\t");
|
||||
for (j = 0; j < ESTSYMBOLS; j++) {
|
||||
cplx(ma[j*ESTPARAMS], 1, 0);
|
||||
for (k = 0; k < VECLENGTH; k++)
|
||||
cplx(ma[j*ESTPARAMS+k+1], (i & (1 << (j+VECLENGTH-1-k))) ? 1 : -1, 0);
|
||||
}
|
||||
#ifdef DEBUG
|
||||
fprintf(f, "/*\n");
|
||||
fcmatprintf(f, "a", ESTSYMBOLS, ESTPARAMS, ESTPARAMS, 1, ma);
|
||||
#endif
|
||||
/* transpose it */
|
||||
fchermtranspose(mah, ma, ESTSYMBOLS, ESTPARAMS);
|
||||
fcmul(maha, mah, ma, ESTPARAMS, ESTSYMBOLS, ESTPARAMS);
|
||||
det = fcdet(maha, ESTPARAMS);
|
||||
if (det.re == 0) {
|
||||
singular[i >> 5] |= 1 << (i & 31);
|
||||
for (j = 0; j < ESTPARAMS*ESTSYMBOLS; j++)
|
||||
cplx(mahainvah[j], 0, 0);
|
||||
#ifdef DEBUG
|
||||
fprintf(f, " singular\n");
|
||||
#endif
|
||||
} else {
|
||||
fcinv(mahainv, maha, ESTPARAMS);
|
||||
fcmul(mahainvah, mahainv, mah, ESTPARAMS, ESTPARAMS, ESTSYMBOLS);
|
||||
#ifdef DEBUG
|
||||
fcmatprintf(f, "ahainvah", ESTPARAMS, ESTSYMBOLS, ESTSYMBOLS, 1, mahainvah);
|
||||
#endif
|
||||
}
|
||||
#ifdef DEBUG
|
||||
fprintf(f, "*/\n\t");
|
||||
#endif
|
||||
fprintf(f, "{ ");
|
||||
for (j = 0;; j++) {
|
||||
fprintf(f, "%d", (int)(mahainvah[j].re * (double)(1<<ESTSHIFT)));
|
||||
if (j >= (ESTPARAMS*ESTSYMBOLS-1))
|
||||
break;
|
||||
fprintf(f, ", ");
|
||||
}
|
||||
fprintf(f, " }");
|
||||
}
|
||||
fprintf(f, "\n};\n\nstatic const unsigned long estsingular[%u] = {\n\t",
|
||||
1<<(ESTDATASYMS-5));
|
||||
for (i = 0; ; i++) {
|
||||
fprintf(f, "0x%08lx", singular[i]);
|
||||
if (i >= (1<<(ESTDATASYMS-5))-1)
|
||||
break;
|
||||
fprintf(f, ", ");
|
||||
}
|
||||
fprintf(f, "\n};\n\n");
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
gentrainmats(stdout);
|
||||
return 0;
|
||||
}
|
||||
634
fsk/modem.c
Normal file
634
fsk/modem.c
Normal file
|
|
@ -0,0 +1,634 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* modem.c -- Linux Userland Soundmodem FSK modulator.
|
||||
*
|
||||
* Copyright (C) 1999-2000, 2003
|
||||
* Thomas Sailer (t.sailer@alumni.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <pthread.h>
|
||||
#include "modem.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "raisedcosine.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
extern double df9ic_rxfilter(double t);
|
||||
extern double df9ic_txfilter(double t);
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define DESCRAM17_TAPSH1 0
|
||||
#define DESCRAM17_TAPSH2 5
|
||||
#define DESCRAM17_TAPSH3 17
|
||||
|
||||
#define SCRAM17_TAP1 (1<<DESCRAM17_TAPSH3)
|
||||
#define SCRAM17_TAPN ((1<<DESCRAM17_TAPSH1)|(1<<DESCRAM17_TAPSH2))
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define FILTERLEN 8U
|
||||
#define NUMFILTER 32U
|
||||
#define FILTERIDX(x) (((x) >> 11U) & 31U)
|
||||
|
||||
#define RCOSALPHA (3.0/8)
|
||||
|
||||
#define FILTERRELAX 1.4
|
||||
|
||||
struct modstate {
|
||||
struct modemchannel *chan;
|
||||
unsigned int filtermode;
|
||||
unsigned int phase, phaseinc, bps;
|
||||
unsigned int shreg, txbits, scram;
|
||||
int16_t filter[NUMFILTER][FILTERLEN];
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#if defined(__i386__) && 0
|
||||
|
||||
static inline int mfilter(unsigned txbits, const int16_t *coeff, int len)
|
||||
{
|
||||
int sum, temp1;
|
||||
|
||||
__asm__("\n1:\n\t"
|
||||
"shrl $1,%1\n\t"
|
||||
"sbbl %4,%4\n\t"
|
||||
"subl %4,%0\n\t"
|
||||
"xorl (%2),%4\n\t"
|
||||
"addl $2,%2\n\t"
|
||||
"addl %4,%0\n\t"
|
||||
"decl %3\n\t"
|
||||
"jnz 1b\n\t"
|
||||
: "=r" (sum), "=r" (txbits), "=r" (coeff), "=r" (len), "=r" (temp1)
|
||||
: "0" (0), "1" (txbits), "2" (coeff), "3" (len));
|
||||
return sum;
|
||||
}
|
||||
|
||||
#else /* __i386__ */
|
||||
|
||||
static inline int32_t mfilter(unsigned txbits, const int16_t *coeff, int len)
|
||||
{
|
||||
int32_t sum = 0;
|
||||
|
||||
for (; len > 0; len--, coeff++, txbits >>= 1)
|
||||
if (txbits & 1)
|
||||
sum += *coeff;
|
||||
else
|
||||
sum -= *coeff;
|
||||
return sum;
|
||||
}
|
||||
|
||||
#endif /* __i386__ */
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
static const struct modemparams modparams[] = {
|
||||
{ "bps", "Bits/s", "Bits per second", "9600", MODEMPAR_NUMERIC, { n: { 4800, 38400, 100, 1200 } } },
|
||||
{ "filter", "Filter Curve", "Filter Curve", "df9ic/g3ruh", MODEMPAR_COMBO,
|
||||
{ c: { { "df9ic/g3ruh", "rootraisedcosine", "raisedcosine", "hamming" } } } },
|
||||
{ NULL }
|
||||
|
||||
};
|
||||
|
||||
static void *modconfig(struct modemchannel *chan, unsigned int *samplerate, const char *params[])
|
||||
{
|
||||
struct modstate *s;
|
||||
unsigned int i;
|
||||
|
||||
if (!(s = calloc(1, sizeof(struct modstate))))
|
||||
logprintf(MLOG_FATAL, "out of memory\n");
|
||||
s->chan = chan;
|
||||
if (params[0]) {
|
||||
s->bps = strtoul(params[0], NULL, 0);
|
||||
if (s->bps < 4800)
|
||||
s->bps = 4800;
|
||||
if (s->bps > 38400)
|
||||
s->bps= 38400;
|
||||
} else
|
||||
s->bps = 9600;
|
||||
s->filtermode = 0;
|
||||
if (params[1]) {
|
||||
for (i = 1; i < 4; i++)
|
||||
if (!strcmp(params[1], modparams[1].u.c.combostr[i])) {
|
||||
s->filtermode = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*samplerate = s->bps + s->bps / 2;
|
||||
return s;
|
||||
}
|
||||
|
||||
static void modinit(void *state, unsigned int samplerate)
|
||||
{
|
||||
struct modstate *s = (struct modstate *)state;
|
||||
int i, j;
|
||||
float f1, f2, time, alphatime;
|
||||
float c[NUMFILTER * FILTERLEN];
|
||||
|
||||
s->phaseinc = (s->bps << 16) / samplerate;
|
||||
switch (s->filtermode) {
|
||||
case 1: /* root raised cosine */
|
||||
for (i = 0; i < NUMFILTER * FILTERLEN; i++) {
|
||||
time = i - (NUMFILTER * FILTERLEN - 1.0) / 2.0;
|
||||
time *= (1.0 / NUMFILTER);
|
||||
c[i] = root_raised_cosine_time(time, RCOSALPHA);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: /* raised cosine */
|
||||
for (i = 0; i < NUMFILTER * FILTERLEN; i++) {
|
||||
time = i - (NUMFILTER * FILTERLEN - 1.0) / 2.0;
|
||||
time *= (1.0 / NUMFILTER);
|
||||
c[i] = raised_cosine_time(time, RCOSALPHA);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: /* hamming */
|
||||
for (i = 0; i < NUMFILTER * FILTERLEN; i++) {
|
||||
f1 = i - (NUMFILTER * FILTERLEN - 1.0) / 2.0;
|
||||
f1 *= (FILTERRELAX / NUMFILTER);
|
||||
f2 = i * (1.0 / (NUMFILTER * FILTERLEN - 1.0));
|
||||
c[i] = sinc(f1) * hamming(f2);
|
||||
}
|
||||
break;
|
||||
|
||||
default: /* DF9IC */
|
||||
for (i = 0; i < NUMFILTER * FILTERLEN; i++) {
|
||||
time = i - (NUMFILTER * FILTERLEN - 1.0) / 2.0;
|
||||
time *= (1.0 / NUMFILTER);
|
||||
c[i] = df9ic_txfilter(time);
|
||||
}
|
||||
break;
|
||||
}
|
||||
f1 = 0;
|
||||
for (i = 0; i < NUMFILTER; i++) {
|
||||
for (f2 = 0, j = i; j < NUMFILTER * FILTERLEN; j += NUMFILTER)
|
||||
f2 += fabs(c[j]);
|
||||
if (f2 > f1)
|
||||
f1 = f2;
|
||||
}
|
||||
f1 = 32767.0 / f1;
|
||||
for (i = 0; i < NUMFILTER; i++)
|
||||
for (j = 0; j < FILTERLEN; j++)
|
||||
s->filter[i][j] = f1 * c[j * NUMFILTER + i];
|
||||
#if 1
|
||||
if (logcheck(258)) {
|
||||
char buf[4096];
|
||||
char *cp = buf;
|
||||
for (i = 0; i < NUMFILTER * FILTERLEN; i++)
|
||||
cp += snprintf(cp, buf + sizeof(buf) - cp, " %f", f1 * c[i]);
|
||||
logprintf(258, "fsk: txp = [%s];\n", buf+1);
|
||||
for (i = 0; i < NUMFILTER; i++) {
|
||||
cp = buf;
|
||||
for (j = 0; j < FILTERLEN; j++)
|
||||
cp += snprintf(cp, buf + sizeof(buf) - cp, " %d", s->filter[i][j]);
|
||||
logprintf(258, "fsk: txp%u = [%s];\n", i, buf+1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void modsendbits(struct modstate *s, unsigned char *data, unsigned int nrbits)
|
||||
{
|
||||
int16_t sbuf[512];
|
||||
int16_t *sptr = sbuf, *eptr = sbuf + sizeof(sbuf)/sizeof(sbuf[0]);
|
||||
unsigned int bitcnt, bits;
|
||||
|
||||
bits = *data++;
|
||||
bitcnt = 0;
|
||||
while (bitcnt < nrbits) {
|
||||
s->phase += s->phaseinc;
|
||||
if (s->phase >= 0x10000) {
|
||||
s->phase &= 0xffff;
|
||||
bitcnt++;
|
||||
s->scram = (s->scram << 1) | ((s->scram ^ bits ^ 1) & 1);
|
||||
bits >>= 1;
|
||||
if (s->scram & (SCRAM17_TAP1 << 1))
|
||||
s->scram ^= SCRAM17_TAPN << 1;
|
||||
s->txbits = (s->txbits << 1) | ((s->scram >> DESCRAM17_TAPSH3) & 1);
|
||||
if (!(bitcnt & 7))
|
||||
bits = *data++;
|
||||
}
|
||||
*sptr++ = mfilter(s->txbits, s->filter[FILTERIDX(s->phase)], FILTERLEN);
|
||||
if (sptr >= eptr) {
|
||||
audiowrite(s->chan, sbuf, sptr - sbuf);
|
||||
sptr = sbuf;
|
||||
}
|
||||
}
|
||||
audiowrite(s->chan, sbuf, sptr - sbuf);
|
||||
}
|
||||
|
||||
static void modmodulate(void *state, unsigned int txdelay)
|
||||
{
|
||||
struct modstate *s = (struct modstate *)state;
|
||||
unsigned char ch[8];
|
||||
unsigned int i, j;
|
||||
|
||||
i = txdelay * s->bps / 1000;
|
||||
if (i < 24)
|
||||
i = 24;
|
||||
memset(ch, 0x7e, sizeof(ch));
|
||||
while (i > 0) {
|
||||
j = i;
|
||||
if (j > 8*sizeof(ch))
|
||||
j = 8*sizeof(ch);
|
||||
modsendbits(s, ch, j);
|
||||
i -= j;
|
||||
}
|
||||
while (pktget(s->chan, ch, sizeof(ch)))
|
||||
modsendbits(s, ch, 8*sizeof(ch));
|
||||
ch[0] = ch[1] = 0x7e;
|
||||
modsendbits(s, ch, 16);
|
||||
}
|
||||
|
||||
struct modulator fskmodulator = {
|
||||
NULL,
|
||||
"fsk",
|
||||
modparams,
|
||||
modconfig,
|
||||
modinit,
|
||||
modmodulate,
|
||||
free
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
static inline int16_t fir(const int32_t *p1, const int16_t *p2, int len)
|
||||
{
|
||||
int32_t sum, temp;
|
||||
|
||||
__asm__("\n0:\n\t"
|
||||
"movswl (%4),%1\n\t"
|
||||
"imull (%3),%1\n\t"
|
||||
"addl $-2,%4\n\t"
|
||||
"addl $4,%3\n\t"
|
||||
"addl %1,%0\n\t"
|
||||
"decl %2\n\t"
|
||||
"jnz 0b\n\t"
|
||||
: "=r" (sum), "=r" (temp), "=r" (len), "=S" (p1), "=D" (p2)
|
||||
: "0" (0), "2" (len), "3" (p1), "4" (p2));
|
||||
return sum >> 16;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline int16_t fir(const int32_t *p1, const int16_t *p2, int len)
|
||||
{
|
||||
int32_t sum = 0;
|
||||
|
||||
for(; len > 0; len--, p1++, p2--)
|
||||
sum += ((int32_t)*p1) * ((int32_t)*p2);
|
||||
return sum >> 16;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#define MAXFIRLEN 64U
|
||||
#define FILTEROVER 16U
|
||||
#define FILTERSPANBITS 8U
|
||||
|
||||
#define WHICHFILTER(x) (((x)>>12)&0xFU) /* must correspond to FILTEROVER */
|
||||
#define WHICHSAMPLE(x) ((x)>>16)
|
||||
|
||||
#define EQLENGTH 5
|
||||
#define EQGAIN 100
|
||||
|
||||
struct demodstate {
|
||||
struct modemchannel *chan;
|
||||
unsigned int filtermode;
|
||||
unsigned int bps, firlen;
|
||||
unsigned int pllinc, pllcorr;
|
||||
int pll;
|
||||
u_int16_t stime;
|
||||
|
||||
unsigned int div, divcnt;
|
||||
unsigned int shreg, descram;
|
||||
int dcd_sum0, dcd_sum1, dcd_sum2;
|
||||
unsigned int dcd_time, dcd;
|
||||
u_int32_t mean, meansq;
|
||||
int32_t dcoffsp;
|
||||
unsigned int dcoffscnt;
|
||||
int16_t dcoffs;
|
||||
|
||||
unsigned int eqbits;
|
||||
int16_t eqs[EQLENGTH], eqf[EQLENGTH];
|
||||
|
||||
int32_t filter[FILTEROVER][MAXFIRLEN];
|
||||
};
|
||||
|
||||
#define DCD_TIME_SHIFT 7
|
||||
#define DCD_TIME (1<<DCD_TIME_SHIFT)
|
||||
|
||||
static int16_t filter(struct demodstate *s, int16_t *samples, int ph)
|
||||
{
|
||||
return fir(s->filter[WHICHFILTER(ph)], samples + WHICHSAMPLE(ph), s->firlen);
|
||||
}
|
||||
|
||||
static int16_t equalizer(struct demodstate *s, int16_t s1, int16_t s2)
|
||||
{
|
||||
int16_t target;
|
||||
int32_t sum, corr;
|
||||
int i;
|
||||
|
||||
memmove(s->eqs + 2, s->eqs, sizeof(s->eqs) - 2 * sizeof(s->eqs[0]));
|
||||
s->eqs[1] = s1;
|
||||
s->eqs[0] = s2;
|
||||
s->eqbits = (s->eqbits << 1) | (s2 > 0);
|
||||
target = (s->eqbits & (1 << ((EQLENGTH-1)/4))) ? 0x4000 : -0x4000;
|
||||
for (sum = i = 0; i < EQLENGTH; i++)
|
||||
sum += ((int32_t)s->eqs[i]) * ((int32_t)s->eqf[i]);
|
||||
sum >>= 14;
|
||||
corr = ((target - sum) * EQGAIN) >> 15;
|
||||
for (i = 0; i < EQLENGTH; i++)
|
||||
s->eqf[i] += (s->eqs[i] * corr) >> 15;
|
||||
printf("%5d %5d %5d %5d %5d\n", s->eqf[0], s->eqf[1], s->eqf[2], s->eqf[3], s->eqf[4]);
|
||||
return sum;
|
||||
}
|
||||
|
||||
static const struct modemparams demodparams[] = {
|
||||
{ "bps", "Bits/s", "Bits per second", "9600", MODEMPAR_NUMERIC, { n: { 4800, 38400, 100, 1200 } } },
|
||||
{ "filter", "Filter Curve", "Filter Curve", "df9ic/g3ruh", MODEMPAR_COMBO,
|
||||
{ c: { { "df9ic/g3ruh", "rootraisedcosine", "raisedcosine", "hamming" } } } },
|
||||
{ NULL }
|
||||
|
||||
};
|
||||
|
||||
static void *demodconfig(struct modemchannel *chan, unsigned int *samplerate, const char *params[])
|
||||
{
|
||||
struct demodstate *s;
|
||||
unsigned int i;
|
||||
|
||||
if (!(s = calloc(1, sizeof(struct demodstate))))
|
||||
logprintf(MLOG_FATAL, "out of memory\n");
|
||||
s->chan = chan;
|
||||
if (params[0]) {
|
||||
s->bps = strtoul(params[0], NULL, 0);
|
||||
if (s->bps < 4800)
|
||||
s->bps = 4800;
|
||||
if (s->bps > 38400)
|
||||
s->bps= 38400;
|
||||
} else
|
||||
s->bps = 9600;
|
||||
s->filtermode = 0;
|
||||
if (params[1]) {
|
||||
for (i = 1; i < 4; i++)
|
||||
if (!strcmp(params[1], demodparams[1].u.c.combostr[i])) {
|
||||
s->filtermode = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*samplerate = s->bps + s->bps / 2;
|
||||
return s;
|
||||
}
|
||||
|
||||
static void demodrx(struct demodstate *s, unsigned nsamples)
|
||||
{
|
||||
int16_t *samples;
|
||||
int16_t curs, nexts, mids, xs, eq;
|
||||
int32_t gardner;
|
||||
unsigned int d, descx;
|
||||
unsigned char ch[3];
|
||||
int corr, dcd;
|
||||
|
||||
samples = alloca((nsamples + s->firlen) * sizeof(samples[0]));
|
||||
audioread(s->chan, samples, nsamples + s->firlen, s->stime);
|
||||
s->stime += nsamples;
|
||||
samples += s->firlen;
|
||||
while (WHICHSAMPLE(s->pll + s->pllinc) < nsamples) {
|
||||
#if 0
|
||||
for (corr = 0; corr < 16; corr++)
|
||||
printf("%d\n", filter(s, samples, s->pll+corr*s->pllinc/16));
|
||||
#endif
|
||||
curs = filter(s, samples, s->pll);
|
||||
mids = filter(s, samples, s->pll+s->pllinc/2);
|
||||
nexts = filter(s, samples, s->pll+s->pllinc);
|
||||
/* dc offset prediction */
|
||||
s->dcoffsp += curs;
|
||||
s->dcoffscnt++;
|
||||
if (s->dcoffscnt >= 4096) {
|
||||
s->dcoffs = -(s->dcoffsp >> 12);
|
||||
logprintf(257, "fskrx: DC offset %d\n", -s->dcoffs);
|
||||
s->dcoffscnt = 0;
|
||||
s->dcoffsp = 0;
|
||||
}
|
||||
/* dc offset compensation */
|
||||
curs += s->dcoffs;
|
||||
mids += s->dcoffs;
|
||||
nexts += s->dcoffs;
|
||||
/* sample clock recovery */
|
||||
gardner = ((nexts > 0 ? 1 : -1) - (curs > 0 ? 1 : -1)) * mids;
|
||||
#if 0
|
||||
eq = equalizer(s, mids, nexts);
|
||||
#endif
|
||||
s->pll += s->pllinc;
|
||||
#if 0
|
||||
corr = (gardner * s->pllinc) >> 20;
|
||||
s->pll -= corr;
|
||||
#elif 0
|
||||
if (gardner < 0)
|
||||
s->pll += s->pllinc >> 4;
|
||||
else
|
||||
s->pll -= s->pllinc >> 4;
|
||||
#else
|
||||
if ((curs > 0) ^ (nexts > 0)) {
|
||||
if ((curs > 0) ^ (mids > 0))
|
||||
s->pll -= s->pllinc >> 5;
|
||||
if ((nexts > 0) ^ (mids > 0))
|
||||
s->pll += s->pllinc >> 5;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* accumulate values for DCD */
|
||||
s->mean += abs(curs);
|
||||
s->meansq += (((int32_t)curs) * ((int32_t)curs)) >> DCD_TIME_SHIFT;
|
||||
/* process sample */
|
||||
s->descram <<= 1;
|
||||
s->descram |= (curs >> 15) & 1;
|
||||
descx = ~(s->descram ^ (s->descram >> 1));
|
||||
descx ^= (descx >> DESCRAM17_TAPSH3) ^ (descx >> (DESCRAM17_TAPSH3-DESCRAM17_TAPSH2));
|
||||
s->shreg >>= 1;
|
||||
s->shreg |= (descx & 1) << 24;
|
||||
if (s->shreg & 1) {
|
||||
ch[0] = s->shreg >> 1;
|
||||
ch[1] = s->shreg >> 9;
|
||||
ch[2] = s->shreg >> 17;
|
||||
pktput(s->chan, ch, 3);
|
||||
if (logcheck(257)) {
|
||||
char buf2[25];
|
||||
unsigned int i;
|
||||
for (i = 0; i < 24; i++)
|
||||
buf2[i] = '0' + ((s->shreg >> (i+1)) & 1);
|
||||
buf2[24] = 0;
|
||||
logprintf(257, "fskrx: %s\n", buf2);
|
||||
}
|
||||
s->shreg = 0x1000000;
|
||||
}
|
||||
/* DCD */
|
||||
s->dcd_time++;
|
||||
if (s->dcd_time < DCD_TIME)
|
||||
continue;
|
||||
s->mean >>= DCD_TIME_SHIFT;
|
||||
s->mean *= s->mean;
|
||||
if (s->meansq < 512)
|
||||
dcd = 0;
|
||||
else
|
||||
dcd = (s->mean + (s->mean >> 2)) > s->meansq;
|
||||
logprintf(256, "DCD: mean: %8u meansq: %8u diff: %8d DCD: %u\n", s->mean, s->meansq, s->meansq-s->mean, dcd);
|
||||
s->dcd_time = 0;
|
||||
pktsetdcd(s->chan, /*(s->dcd_sum0 + s->dcd_sum1 + s->dcd_sum2) < 0*/ dcd);
|
||||
s->dcd_sum2 = s->dcd_sum1;
|
||||
s->dcd_sum1 = s->dcd_sum0;
|
||||
s->dcd_sum0 = 2; /* slight bias */
|
||||
s->meansq = s->mean = 0;
|
||||
}
|
||||
s->pll -= (nsamples << 16);
|
||||
}
|
||||
|
||||
static void demoddemodulate(void *state)
|
||||
{
|
||||
struct demodstate *s = (struct demodstate *)state;
|
||||
|
||||
s->stime = audiocurtime(s->chan);
|
||||
for (;;)
|
||||
demodrx(s, 256);
|
||||
}
|
||||
|
||||
static void demodinit(void *state, unsigned int samplerate, unsigned int *bitrate)
|
||||
{
|
||||
struct demodstate *s = (struct demodstate *)state;
|
||||
float coeff[FILTEROVER][MAXFIRLEN];
|
||||
float pulseen[FILTEROVER];
|
||||
double tmul;
|
||||
float max1, max2, t, at, f1, f2;
|
||||
int i, j;
|
||||
|
||||
s->firlen = (samplerate * FILTERSPANBITS + s->bps - 1) / s->bps;
|
||||
if (s->firlen > MAXFIRLEN) {
|
||||
logprintf(MLOG_WARNING, "demodfsk: input filter length too long\n");
|
||||
s->firlen = MAXFIRLEN;
|
||||
}
|
||||
tmul = ((double)s->bps) / FILTEROVER / ((double)samplerate);
|
||||
switch (s->filtermode) {
|
||||
case 1: /* root raised cosine */
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++) {
|
||||
t = (signed)(i - s->firlen*FILTEROVER/2) * tmul;
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] = root_raised_cosine_time(t, RCOSALPHA);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: /* raised cosine */
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++) {
|
||||
t = (signed)(i - s->firlen*FILTEROVER/2) * tmul;
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] = raised_cosine_time(t, RCOSALPHA);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: /* hamming */
|
||||
tmul *= FILTERRELAX;
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++)
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] =
|
||||
sinc((i - (signed)s->firlen*FILTEROVER/2)*tmul)
|
||||
* hamming((double)i / (double)(FILTEROVER*s->firlen-1));
|
||||
break;
|
||||
|
||||
default: /* DF9IC */
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++) {
|
||||
t = (signed)(i - s->firlen*FILTEROVER/2) * tmul;
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] = df9ic_rxfilter(t);
|
||||
}
|
||||
break;
|
||||
}
|
||||
max1 = 0;
|
||||
for (i = 0; i < FILTEROVER; i++) {
|
||||
max2 = 0;
|
||||
for (j = 0; j < s->firlen; j++)
|
||||
max2 += fabs(coeff[i][j]);
|
||||
if (max2 > max1)
|
||||
max1 = max2;
|
||||
}
|
||||
max2 = ((float)0x3fffffff / (float)0x7fff) / max1;
|
||||
for (i = 0; i < FILTEROVER; i++) {
|
||||
f1 = 0;
|
||||
for (j = 0; j < s->firlen; j++) {
|
||||
s->filter[i][j] = max2 * coeff[i][j];
|
||||
f1 += s->filter[i][j] * s->filter[i][j];
|
||||
}
|
||||
pulseen[i] = f1;
|
||||
}
|
||||
#if 1
|
||||
if (logcheck(258)) {
|
||||
char buf[4096];
|
||||
char *cp = buf;
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++)
|
||||
cp += snprintf(cp, buf + sizeof(buf) - cp, " %f", coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER]);
|
||||
logprintf(258, "fsk: rxp = [%s];\n", buf+1);
|
||||
for (i = 0; i < FILTEROVER; i++) {
|
||||
cp = buf;
|
||||
for (j = 0; j < s->firlen; j++)
|
||||
cp += snprintf(cp, buf + sizeof(buf) - cp, " %d", s->filter[i][j]);
|
||||
logprintf(258, "fsk: rxp%u = [%s];\n", i, buf+1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (logcheck(257)) {
|
||||
char buf[512];
|
||||
char *cp = buf;
|
||||
for (i = 0; i < FILTEROVER; i++)
|
||||
cp += sprintf(cp, ", %6.2gdB", 10*M_LOG10E*log(pulseen[i]) - 10*M_LOG10E*log(32768.0 * (1<<16)));
|
||||
logprintf(257, "fsk: rxpulse energies: %s\n", buf+2);
|
||||
}
|
||||
s->pllinc = (0x10000 * samplerate + s->bps/2) / s->bps;
|
||||
s->pll = 0;
|
||||
s->pllcorr = s->pllinc / 8;
|
||||
s->eqbits = 0;
|
||||
memset(s->eqs, 0, sizeof(s->eqs));
|
||||
memset(s->eqf, 0, sizeof(s->eqf));
|
||||
s->shreg = 0x1000000;
|
||||
*bitrate = s->bps;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
struct demodulator fskdemodulator = {
|
||||
NULL,
|
||||
"fsk",
|
||||
demodparams,
|
||||
demodconfig,
|
||||
demodinit,
|
||||
demoddemodulate,
|
||||
free
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
488
fsk/modemeq.c
Normal file
488
fsk/modemeq.c
Normal file
|
|
@ -0,0 +1,488 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* modemeq.c -- Linux Userland Soundmodem FSK demodulator with equalizer.
|
||||
*
|
||||
* Copyright (C) 1999-2000, 2003
|
||||
* Thomas Sailer (t.sailer@alumni.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <pthread.h>
|
||||
#include "modem.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "raisedcosine.h"
|
||||
#include "mat.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
extern double df9ic_rxfilter(double t);
|
||||
extern double df9ic_txfilter(double t);
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define DESCRAM17_TAPSH1 0
|
||||
#define DESCRAM17_TAPSH2 5
|
||||
#define DESCRAM17_TAPSH3 17
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define RCOSALPHA (3.0/8)
|
||||
|
||||
#define FILTERRELAX 1.4
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
static inline int16_t fir(const int32_t *p1, const int16_t *p2, int len)
|
||||
{
|
||||
int32_t sum, temp;
|
||||
|
||||
__asm__("\n0:\n\t"
|
||||
"movswl (%4),%1\n\t"
|
||||
"imull (%3),%1\n\t"
|
||||
"addl $-2,%4\n\t"
|
||||
"addl $4,%3\n\t"
|
||||
"addl %1,%0\n\t"
|
||||
"decl %2\n\t"
|
||||
"jnz 0b\n\t"
|
||||
: "=r" (sum), "=r" (temp), "=r" (len), "=S" (p1), "=D" (p2)
|
||||
: "0" (0), "2" (len), "3" (p1), "4" (p2));
|
||||
return sum >> 16;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline int16_t fir(const int32_t *p1, const int16_t *p2, int len)
|
||||
{
|
||||
int32_t sum = 0;
|
||||
|
||||
for(; len > 0; len--, p1++, p2--)
|
||||
sum += ((int32_t)*p1) * ((int32_t)*p2);
|
||||
return sum >> 16;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#define MAXFIRLEN 64U
|
||||
#define FILTEROVER 16U
|
||||
#define FILTERSPANBITS 8U
|
||||
|
||||
#define WHICHFILTER(x) (((x)>>12)&0xFU) /* must correspond to FILTEROVER */
|
||||
#define WHICHSAMPLE(x) ((x)>>16)
|
||||
|
||||
#define EQFLENGTH 8 /* last is DC-offset */
|
||||
#define TRAINBITS 40
|
||||
#define RHSLENGTH ((TRAINBITS+2-EQFLENGTH)/2)
|
||||
|
||||
|
||||
|
||||
|
||||
#define EQLENGTH 5
|
||||
#define EQGAIN 100
|
||||
|
||||
struct demodstate {
|
||||
struct modemchannel *chan;
|
||||
unsigned int filtermode;
|
||||
unsigned int bps, firlen;
|
||||
unsigned int pllinc, pllcorr;
|
||||
int pll;
|
||||
u_int16_t stime;
|
||||
|
||||
unsigned int div, divcnt;
|
||||
unsigned int shreg, descram, shregeq, descrameq;
|
||||
int dcd_sum0, dcd_sum1, dcd_sum2;
|
||||
unsigned int dcd_time, dcd;
|
||||
u_int32_t mean, meansq;
|
||||
|
||||
int32_t eqfilt[EQFLENGTH];
|
||||
int16_t eqsamp[EQFLENGTH & ~1];
|
||||
|
||||
unsigned int eqbits;
|
||||
int16_t eqs[EQLENGTH], eqf[EQLENGTH];
|
||||
|
||||
int32_t filter[FILTEROVER][MAXFIRLEN];
|
||||
};
|
||||
|
||||
#define DCD_TIME_SHIFT 7
|
||||
#define DCD_TIME (1<<DCD_TIME_SHIFT)
|
||||
|
||||
static int16_t filter(struct demodstate *s, int16_t *samples, int ph)
|
||||
{
|
||||
return fir(s->filter[WHICHFILTER(ph)], samples + WHICHSAMPLE(ph), s->firlen);
|
||||
}
|
||||
|
||||
static int16_t equalizer(struct demodstate *s, int16_t s1, int16_t s2)
|
||||
{
|
||||
int16_t target;
|
||||
int32_t sum, corr;
|
||||
int i;
|
||||
|
||||
memmove(s->eqs + 2, s->eqs, sizeof(s->eqs) - 2 * sizeof(s->eqs[0]));
|
||||
s->eqs[1] = s1;
|
||||
s->eqs[0] = s2;
|
||||
s->eqbits = (s->eqbits << 1) | (s2 > 0);
|
||||
target = (s->eqbits & (1 << ((EQLENGTH-1)/4))) ? 0x4000 : -0x4000;
|
||||
for (sum = i = 0; i < EQLENGTH; i++)
|
||||
sum += ((int32_t)s->eqs[i]) * ((int32_t)s->eqf[i]);
|
||||
sum >>= 14;
|
||||
corr = ((target - sum) * EQGAIN) >> 15;
|
||||
for (i = 0; i < EQLENGTH; i++)
|
||||
s->eqf[i] += (s->eqs[i] * corr) >> 15;
|
||||
printf("%5d %5d %5d %5d %5d\n", s->eqf[0], s->eqf[1], s->eqf[2], s->eqf[3], s->eqf[4]);
|
||||
return sum;
|
||||
}
|
||||
|
||||
static const struct modemparams demodparams[] = {
|
||||
{ "bps", "Bits/s", "Bits per second", "9600", MODEMPAR_NUMERIC, { n: { 4800, 38400, 100, 1200 } } },
|
||||
{ "filter", "Filter Curve", "Filter Curve", "df9ic/g3ruh", MODEMPAR_COMBO,
|
||||
{ c: { { "df9ic/g3ruh", "rootraisedcosine", "raisedcosine", "hamming" } } } },
|
||||
{ NULL }
|
||||
|
||||
};
|
||||
|
||||
static void *demodconfig(struct modemchannel *chan, unsigned int *samplerate, const char *params[])
|
||||
{
|
||||
struct demodstate *s;
|
||||
unsigned int i;
|
||||
|
||||
if (!(s = calloc(1, sizeof(struct demodstate))))
|
||||
logprintf(MLOG_FATAL, "out of memory\n");
|
||||
s->chan = chan;
|
||||
if (params[0]) {
|
||||
s->bps = strtoul(params[0], NULL, 0);
|
||||
if (s->bps < 4800)
|
||||
s->bps = 4800;
|
||||
if (s->bps > 38400)
|
||||
s->bps= 38400;
|
||||
} else
|
||||
s->bps = 9600;
|
||||
s->filtermode = 0;
|
||||
if (params[1]) {
|
||||
for (i = 1; i < 4; i++)
|
||||
if (!strcmp(params[1], demodparams[1].u.c.combostr[i])) {
|
||||
s->filtermode = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*samplerate = s->bps + s->bps / 2;
|
||||
return s;
|
||||
}
|
||||
|
||||
static void compute_eq(struct demodstate *s, u_int32_t time)
|
||||
{
|
||||
int16_t *samples;
|
||||
u_int32_t etime = time + TRAINBITS * s->pllinc;
|
||||
unsigned int nsamples = ((etime - time) >> 16) + s->firlen;
|
||||
unsigned int i, j;
|
||||
int16_t es[2*TRAINBITS];
|
||||
float f[EQFLENGTH];
|
||||
float C[RHSLENGTH * EQFLENGTH];
|
||||
float CT[RHSLENGTH * EQFLENGTH];
|
||||
float CTC[EQFLENGTH * EQFLENGTH];
|
||||
float CTr[EQFLENGTH];
|
||||
float Cf[RHSLENGTH];
|
||||
float r[RHSLENGTH];
|
||||
float e, e1;
|
||||
|
||||
logprintf(257, "fskeq: txstart 0x%08x\n", time);
|
||||
samples = alloca(nsamples * sizeof(samples[0]));
|
||||
audioread(s->chan, samples, nsamples, time >> 16);
|
||||
for (i = 0; i < 2*TRAINBITS; i++)
|
||||
es[i] = filter(s, samples, (time & 0xffff) + i * s->pllinc / 2);
|
||||
if (logcheck(258)) {
|
||||
char buf[16*2*TRAINBITS];
|
||||
char *cp = buf;
|
||||
for (i = 0; i < 2*TRAINBITS; i++)
|
||||
cp += snprintf(cp, buf + sizeof(buf) - cp, " %d", es[i]);
|
||||
logprintf(258, "fskeq: es = [%s];\n", buf+1);
|
||||
}
|
||||
for (i = 0; i < RHSLENGTH; i++) {
|
||||
for (j = 0; j < EQFLENGTH-1; j++)
|
||||
C[i*EQFLENGTH+j] = es[2*i+j];
|
||||
C[i*EQFLENGTH+EQFLENGTH-1] = 1; /* DC component */
|
||||
r[i] = (es[2*i+(((EQFLENGTH-2)/2) & ~1)] > 0) ? 16384 : -16384;
|
||||
}
|
||||
frtranspose(CT, C, RHSLENGTH, EQFLENGTH);
|
||||
frmul(CTC, CT, C, EQFLENGTH, RHSLENGTH, EQFLENGTH);
|
||||
frmul(CTr, CT, r, EQFLENGTH, RHSLENGTH, 1);
|
||||
frchol(CTC, CTr, f, EQFLENGTH);
|
||||
frmul(Cf, C, f, RHSLENGTH, EQFLENGTH, 1);
|
||||
for (i = 0, e = 0; i < RHSLENGTH; i++) {
|
||||
e1 = Cf[i] - r[i];
|
||||
e += e1 * e1;
|
||||
}
|
||||
e *= (1.0 / 16384 / 16384 / EQFLENGTH);
|
||||
if (logcheck(258)) {
|
||||
char buf[16*EQFLENGTH];
|
||||
char *cp = buf;
|
||||
for (i = 0; i < EQFLENGTH; i++)
|
||||
cp += snprintf(cp, buf + sizeof(buf) - cp, " %f", f[i]);
|
||||
logprintf(258, "fskeq: e = %f; f = [%s];\n", e, buf+1);
|
||||
}
|
||||
if (e > 0.2)
|
||||
return;
|
||||
for (i = 0; i < EQFLENGTH; i++)
|
||||
s->eqfilt[i] = 32768 * f[i];
|
||||
}
|
||||
|
||||
static int16_t filter_eq(struct demodstate *s, int16_t samp0, int16_t samp1)
|
||||
{
|
||||
int32_t sum = s->eqfilt[EQFLENGTH-1];
|
||||
unsigned int i;
|
||||
|
||||
memmove(&s->eqsamp[0], &s->eqsamp[2], sizeof(s->eqsamp) - 2 * sizeof(s->eqsamp[0]));
|
||||
s->eqsamp[(EQFLENGTH-1) & ~1] = samp0;
|
||||
s->eqsamp[(EQFLENGTH-1) | 1] = samp1;
|
||||
for (i = 0; i < EQFLENGTH-1; i++)
|
||||
sum += s->eqsamp[i] * s->eqfilt[i];
|
||||
return sum >> 15;
|
||||
}
|
||||
|
||||
static void demodrx(struct demodstate *s, unsigned nsamples)
|
||||
{
|
||||
int16_t *samples;
|
||||
int16_t curs, nexts, mids, xs, eqs;
|
||||
int32_t gardner;
|
||||
unsigned int d, descx;
|
||||
unsigned char ch[3];
|
||||
int corr, dcd;
|
||||
|
||||
samples = alloca((nsamples + s->firlen) * sizeof(samples[0]));
|
||||
audioread(s->chan, samples, nsamples + s->firlen, s->stime);
|
||||
s->stime += nsamples;
|
||||
samples += s->firlen;
|
||||
while (WHICHSAMPLE(s->pll + s->pllinc) < nsamples) {
|
||||
#if 0
|
||||
for (corr = 0; corr < 16; corr++)
|
||||
printf("%d\n", filter(s, samples, s->pll+corr*s->pllinc/16));
|
||||
#endif
|
||||
curs = filter(s, samples, s->pll);
|
||||
mids = filter(s, samples, s->pll+s->pllinc/2);
|
||||
nexts = filter(s, samples, s->pll+s->pllinc);
|
||||
gardner = ((nexts > 0 ? 1 : -1) - (curs > 0 ? 1 : -1)) * mids;
|
||||
#if 0
|
||||
eqs = equalizer(s, mids, nexts);
|
||||
#endif
|
||||
eqs = filter_eq(s, curs, mids);
|
||||
|
||||
s->pll += s->pllinc;
|
||||
#if 0
|
||||
corr = (gardner * s->pllinc) >> 20;
|
||||
s->pll -= corr;
|
||||
#elif 0
|
||||
if (gardner < 0)
|
||||
s->pll += s->pllinc >> 4;
|
||||
else
|
||||
s->pll -= s->pllinc >> 4;
|
||||
#else
|
||||
if ((curs > 0) ^ (nexts > 0)) {
|
||||
if ((curs > 0) ^ (mids > 0))
|
||||
s->pll -= s->pllinc >> 5;
|
||||
if ((nexts > 0) ^ (mids > 0))
|
||||
s->pll += s->pllinc >> 5;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* accumulate values for DCD */
|
||||
s->mean += abs(eqs);
|
||||
s->meansq += (((int32_t)eqs) * ((int32_t)eqs)) >> DCD_TIME_SHIFT;
|
||||
/* process sample */
|
||||
s->descram <<= 1;
|
||||
s->descram |= (eqs >> 15) & 1;
|
||||
descx = ~(s->descram ^ (s->descram >> 1));
|
||||
descx ^= (descx >> DESCRAM17_TAPSH3) ^ (descx >> (DESCRAM17_TAPSH3-DESCRAM17_TAPSH2));
|
||||
s->shreg >>= 1;
|
||||
s->shreg |= (descx & 1) << 24;
|
||||
s->descrameq <<= 1;
|
||||
s->descrameq |= (curs >> 15) & 1;
|
||||
descx = ~(s->descram ^ (s->descram >> 1));
|
||||
descx ^= (descx >> DESCRAM17_TAPSH3) ^ (descx >> (DESCRAM17_TAPSH3-DESCRAM17_TAPSH2));
|
||||
s->shregeq <<= 1;
|
||||
s->shregeq |= descx & 1;
|
||||
if (s->shreg & 1) {
|
||||
ch[0] = s->shreg >> 1;
|
||||
ch[1] = s->shreg >> 9;
|
||||
ch[2] = s->shreg >> 17;
|
||||
pktput(s->chan, ch, 3);
|
||||
if (logcheck(257)) {
|
||||
char buf2[25];
|
||||
unsigned int i;
|
||||
for (i = 0; i < 24; i++)
|
||||
buf2[i] = '0' + ((s->shreg >> (i+1)) & 1);
|
||||
buf2[24] = 0;
|
||||
logprintf(257, "fskrx: %s\n", buf2);
|
||||
}
|
||||
s->shreg = 0x1000000;
|
||||
}
|
||||
if ((((s->shregeq & 0xffffff00) == 0x7e7e7e00) || ((s->shregeq & 0xffffff00) == 0x00007e00)) &&
|
||||
(s->shregeq & 0xff) != 0x7e) {
|
||||
/* start of transmission detected */
|
||||
compute_eq(s, (s->stime << 16) + s->pll - (TRAINBITS + 8 - 1) * s->pllinc);
|
||||
}
|
||||
/* DCD */
|
||||
s->dcd_time++;
|
||||
if (s->dcd_time < DCD_TIME)
|
||||
continue;
|
||||
s->mean >>= DCD_TIME_SHIFT;
|
||||
s->mean *= s->mean;
|
||||
if (s->meansq < 512)
|
||||
dcd = 0;
|
||||
else
|
||||
dcd = (s->mean + (s->mean >> 2)) > s->meansq;
|
||||
logprintf(256, "DCD: mean: %8u meansq: %8u diff: %8d DCD: %u\n", s->mean, s->meansq, s->meansq-s->mean, dcd);
|
||||
s->dcd_time = 0;
|
||||
pktsetdcd(s->chan, /*(s->dcd_sum0 + s->dcd_sum1 + s->dcd_sum2) < 0*/ dcd);
|
||||
s->dcd_sum2 = s->dcd_sum1;
|
||||
s->dcd_sum1 = s->dcd_sum0;
|
||||
s->dcd_sum0 = 2; /* slight bias */
|
||||
s->meansq = s->mean = 0;
|
||||
}
|
||||
s->pll -= (nsamples << 16);
|
||||
}
|
||||
|
||||
static void demoddemodulate(void *state)
|
||||
{
|
||||
struct demodstate *s = (struct demodstate *)state;
|
||||
|
||||
s->stime = audiocurtime(s->chan);
|
||||
for (;;)
|
||||
demodrx(s, 256);
|
||||
}
|
||||
|
||||
static void demodinit(void *state, unsigned int samplerate, unsigned int *bitrate)
|
||||
{
|
||||
struct demodstate *s = (struct demodstate *)state;
|
||||
float coeff[FILTEROVER][MAXFIRLEN];
|
||||
float pulseen[FILTEROVER];
|
||||
double tmul;
|
||||
float max1, max2, t, at, f1, f2;
|
||||
int i, j;
|
||||
|
||||
s->firlen = (samplerate * FILTERSPANBITS + s->bps - 1) / s->bps;
|
||||
if (s->firlen > MAXFIRLEN) {
|
||||
logprintf(MLOG_WARNING, "demodfsk: input filter length too long\n");
|
||||
s->firlen = MAXFIRLEN;
|
||||
}
|
||||
tmul = ((double)s->bps) / FILTEROVER / ((double)samplerate);
|
||||
switch (s->filtermode) {
|
||||
case 1: /* root raised cosine */
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++) {
|
||||
t = (signed)(i - s->firlen*FILTEROVER/2) * tmul;
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] = root_raised_cosine_time(t, RCOSALPHA);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: /* raised cosine */
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++) {
|
||||
t = (signed)(i - s->firlen*FILTEROVER/2) * tmul;
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] = raised_cosine_time(t, RCOSALPHA);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: /* hamming */
|
||||
tmul *= FILTERRELAX;
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++)
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] =
|
||||
sinc((i - (signed)s->firlen*FILTEROVER/2)*tmul)
|
||||
* hamming((double)i / (double)(FILTEROVER*s->firlen-1));
|
||||
break;
|
||||
|
||||
default: /* DF9IC */
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++) {
|
||||
t = (signed)(i - s->firlen*FILTEROVER/2) * tmul;
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] = df9ic_rxfilter(t);
|
||||
}
|
||||
break;
|
||||
}
|
||||
max1 = 0;
|
||||
for (i = 0; i < FILTEROVER; i++) {
|
||||
max2 = 0;
|
||||
for (j = 0; j < s->firlen; j++)
|
||||
max2 += fabs(coeff[i][j]);
|
||||
if (max2 > max1)
|
||||
max1 = max2;
|
||||
}
|
||||
max2 = ((float)0x3fffffff / (float)0x7fff) / max1;
|
||||
for (i = 0; i < FILTEROVER; i++) {
|
||||
f1 = 0;
|
||||
for (j = 0; j < s->firlen; j++) {
|
||||
s->filter[i][j] = max2 * coeff[i][j];
|
||||
f1 += s->filter[i][j] * s->filter[i][j];
|
||||
}
|
||||
pulseen[i] = f1;
|
||||
}
|
||||
#if 1
|
||||
if (logcheck(258)) {
|
||||
char buf[4096];
|
||||
char *cp = buf;
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++)
|
||||
cp += snprintf(cp, buf + sizeof(buf) - cp, " %f", coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER]);
|
||||
logprintf(258, "fsk: rxp = [%s];\n", buf+1);
|
||||
for (i = 0; i < FILTEROVER; i++) {
|
||||
cp = buf;
|
||||
for (j = 0; j < s->firlen; j++)
|
||||
cp += snprintf(cp, buf + sizeof(buf) - cp, " %d", s->filter[i][j]);
|
||||
logprintf(258, "fsk: rxp%u = [%s];\n", i, buf+1);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (logcheck(257)) {
|
||||
char buf[512];
|
||||
char *cp = buf;
|
||||
for (i = 0; i < FILTEROVER; i++)
|
||||
cp += sprintf(cp, ", %6.2gdB", 10*M_LOG10E*log(pulseen[i]) - 10*M_LOG10E*log(32768.0 * (1<<16)));
|
||||
logprintf(257, "fsk: rxpulse energies: %s\n", buf+2);
|
||||
}
|
||||
s->pllinc = (0x10000 * samplerate + s->bps/2) / s->bps;
|
||||
s->pll = 0;
|
||||
s->pllcorr = s->pllinc / 8;
|
||||
s->eqbits = 0;
|
||||
memset(s->eqs, 0, sizeof(s->eqs));
|
||||
memset(s->eqf, 0, sizeof(s->eqf));
|
||||
s->shreg = 0x1000000;
|
||||
*bitrate = s->bps;
|
||||
s->eqfilt[((EQFLENGTH-2)/2) & ~1] = 32768;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
struct demodulator fskeqdemodulator = {
|
||||
NULL,
|
||||
"fskeq",
|
||||
demodparams,
|
||||
demodconfig,
|
||||
demodinit,
|
||||
demoddemodulate,
|
||||
free
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
476
fsk/modempsp.c
Normal file
476
fsk/modempsp.c
Normal file
|
|
@ -0,0 +1,476 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* modempsp.c -- Linux Userland Soundmodem FSK PSP VE enhanced demodulator.
|
||||
*
|
||||
* Copyright (C) 1999-2000, 2003
|
||||
* Thomas Sailer (t.sailer@alumni.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include "modem.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "raisedcosine.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
extern double df9ic_rxfilter(double t);
|
||||
extern double df9ic_txfilter(double t);
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define RCOSALPHA (3.0/8)
|
||||
|
||||
#define FILTERRELAX 1.4
|
||||
|
||||
#define DESCRAM17_TAPSH1 0
|
||||
#define DESCRAM17_TAPSH2 5
|
||||
#define DESCRAM17_TAPSH3 17
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#include "psp.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
static inline int isqr(int x)
|
||||
{
|
||||
return x * x;
|
||||
}
|
||||
|
||||
static inline u_int8_t rev_nibble(u_int8_t in)
|
||||
{
|
||||
u_int8_t nibbletab[16] = {0x0,0x8,0x4,0xc,0x2,0xa,0x6,0xe,0x1,0x9,0x5,0xd,0x3,0xb,0x7,0xf};
|
||||
return nibbletab[in & 0xf];
|
||||
}
|
||||
|
||||
static inline u_int8_t rev_byte(u_int8_t in) {
|
||||
return (rev_nibble(in) << 4) | rev_nibble(in >> 4);
|
||||
}
|
||||
|
||||
#ifdef __i386__
|
||||
|
||||
static inline int16_t fir(const int32_t *p1, const int16_t *p2, int len)
|
||||
{
|
||||
int32_t sum, temp;
|
||||
|
||||
__asm__("\n0:\n\t"
|
||||
"movswl (%4),%1\n\t"
|
||||
"imull (%3),%1\n\t"
|
||||
"addl $-2,%4\n\t"
|
||||
"addl $4,%3\n\t"
|
||||
"addl %1,%0\n\t"
|
||||
"decl %2\n\t"
|
||||
"jnz 0b\n\t"
|
||||
: "=r" (sum), "=r" (temp), "=r" (len), "=S" (p1), "=D" (p2)
|
||||
: "0" (0), "2" (len), "3" (p1), "4" (p2));
|
||||
return sum >> 16;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline int16_t fir(const int32_t *p1, const int16_t *p2, int len)
|
||||
{
|
||||
int32_t sum = 0;
|
||||
|
||||
for(; len > 0; len--, p1++, p2--)
|
||||
sum += ((int32_t)*p1) * ((int32_t)*p2);
|
||||
return sum >> 16;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#define MAXFIRLEN 64U
|
||||
#define FILTEROVER 16U
|
||||
#define FILTERSPANBITS 8U
|
||||
|
||||
#define WHICHFILTER(x) (((x)>>12)&0xFU) /* must correspond to FILTEROVER */
|
||||
#define WHICHSAMPLE(x) ((x)>>16)
|
||||
|
||||
#define SNRESTSHIFT 7
|
||||
|
||||
#define PARAMSMOOTH 0.95
|
||||
|
||||
#define PARSMMUL1 ((int)(PARAMSMOOTH*(1<<16)))
|
||||
#define PARSMMUL2 ((1<<16)-PARSMMUL1)
|
||||
|
||||
struct venode {
|
||||
unsigned int metric;
|
||||
unsigned int data;
|
||||
};
|
||||
|
||||
struct demodstate {
|
||||
struct modemchannel *chan;
|
||||
unsigned int filtermode;
|
||||
unsigned int bps, firlen;
|
||||
unsigned int pllinc, pllcorr;
|
||||
int pll;
|
||||
u_int16_t stime;
|
||||
|
||||
unsigned int descram;
|
||||
unsigned int shistcnt;
|
||||
unsigned int snracc, snrcnt;
|
||||
int16_t shist[16];
|
||||
|
||||
/*
|
||||
* 0: DC level
|
||||
* 1: postcursor of previous bit
|
||||
* 2: bit amplitude
|
||||
* 3: precursor of following bit
|
||||
*/
|
||||
int16_t params[4];
|
||||
|
||||
struct venode venodes[8];
|
||||
|
||||
int32_t filter[FILTEROVER][MAXFIRLEN];
|
||||
};
|
||||
|
||||
#define DCD_TIME_SHIFT 7
|
||||
#define DCD_TIME (1<<DCD_TIME_SHIFT)
|
||||
|
||||
static int16_t filter(struct demodstate *s, int16_t *samples, int ph)
|
||||
{
|
||||
return fir(s->filter[WHICHFILTER(ph)], samples + WHICHSAMPLE(ph), s->firlen);
|
||||
}
|
||||
|
||||
static const struct modemparams demodparams[] = {
|
||||
{ "bps", "Bits/s", "Bits per second", "9600", MODEMPAR_NUMERIC, { n: { 4800, 38400, 100, 1200 } } },
|
||||
{ "filter", "Filter Curve", "Filter Curve", "df9ic/g3ruh", MODEMPAR_COMBO,
|
||||
{ c: { { "df9ic/g3ruh", "rootraisedcosine", "raisedcosine", "hamming" } } } },
|
||||
{ NULL }
|
||||
|
||||
};
|
||||
|
||||
static void *demodconfig(struct modemchannel *chan, unsigned int *samplerate, const char *params[])
|
||||
{
|
||||
struct demodstate *s;
|
||||
unsigned int i;
|
||||
|
||||
if (!(s = calloc(1, sizeof(struct demodstate))))
|
||||
logprintf(MLOG_FATAL, "out of memory\n");
|
||||
s->chan = chan;
|
||||
if (params[0]) {
|
||||
s->bps = strtoul(params[0], NULL, 0);
|
||||
if (s->bps < 4800)
|
||||
s->bps = 4800;
|
||||
if (s->bps > 38400)
|
||||
s->bps= 38400;
|
||||
} else
|
||||
s->bps = 9600;
|
||||
s->filtermode = 0;
|
||||
if (params[1]) {
|
||||
for (i = 1; i < 4; i++)
|
||||
if (!strcmp(params[1], demodparams[1].u.c.combostr[i])) {
|
||||
s->filtermode = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*samplerate = s->bps + s->bps / 2;
|
||||
return s;
|
||||
}
|
||||
|
||||
static inline int estparams(struct demodstate *s, unsigned int deschist)
|
||||
{
|
||||
int16_t params[ESTPARAMS];
|
||||
const int16_t *shist, *sptr, *cptr;
|
||||
int sum;
|
||||
unsigned int i, j;
|
||||
|
||||
deschist &= ESTDATAMASK;
|
||||
if (estsingular[deschist >> 5] & (1 << (deschist & 31))) {
|
||||
logprintf(250, "singular pattern\n");
|
||||
return 0;
|
||||
}
|
||||
shist = s->shist + s->shistcnt + ESTSYMBOLS - 1;
|
||||
cptr = estmat[deschist];
|
||||
for (i = 0; i < ESTPARAMS; i++) {
|
||||
sptr = shist;
|
||||
sum = 0;
|
||||
for (j = 0; j < ESTSYMBOLS; j++, sptr--, cptr++)
|
||||
sum += (int)(*sptr) * (int)(*cptr);
|
||||
params[i] = sum >> ESTSHIFT;
|
||||
sum = PARSMMUL1 * s->params[i] + PARSMMUL2 * params[i];
|
||||
s->params[i] = sum >> 16;
|
||||
}
|
||||
/* clamp params to sane values */
|
||||
if (s->params[2] < 250)
|
||||
s->params[2] = 250;
|
||||
sum = s->params[2] >> 1;
|
||||
if (abs(s->params[1]) > sum)
|
||||
s->params[1] = (s->params[1] > 0) ? sum : -sum;
|
||||
if (abs(s->params[3]) > sum)
|
||||
s->params[3] = (s->params[3] > 0) ? sum : -sum;
|
||||
logprintf(250, "Par: est: %5d %5d %5d %5d sm: %5d %5d %5d %5d\n",
|
||||
params[0], params[1], params[2], params[3],
|
||||
s->params[0], s->params[1], s->params[2], s->params[3]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline void viterbieq(struct demodstate *s, int16_t curs)
|
||||
{
|
||||
int blevel = s->params[0] - s->params[1] - s->params[2] - s->params[3] - curs;
|
||||
int ampl0 = 2 * s->params[1];
|
||||
int ampl1 = 2 * s->params[2];
|
||||
int ampl2 = 2 * s->params[3];
|
||||
unsigned int metric0, metric1;
|
||||
struct venode *node1, *node2;
|
||||
unsigned char ch;
|
||||
unsigned int i;
|
||||
float snr;
|
||||
|
||||
if (s->shistcnt & 1) {
|
||||
node1 = s->venodes+4;
|
||||
node2 = s->venodes;
|
||||
} else {
|
||||
node1 = s->venodes;
|
||||
node2 = s->venodes+4;
|
||||
}
|
||||
s->shist[s->shistcnt++] = curs;
|
||||
s->shistcnt &= 15;
|
||||
/* unrolled viterbi equalizer loop */
|
||||
metric0 = node1[0].metric + isqr(blevel);
|
||||
metric1 = node1[2].metric + isqr(blevel + ampl2);
|
||||
if (metric0 < metric1) {
|
||||
node2[0].metric = metric0;
|
||||
node2[0].data = node1[0].data << 1;
|
||||
} else {
|
||||
node2[0].metric = metric1;
|
||||
node2[0].data = node1[2].data << 1;
|
||||
}
|
||||
metric0 = node1[0].metric + isqr(blevel + ampl0);
|
||||
metric1 = node1[2].metric + isqr(blevel + ampl2 + ampl0);
|
||||
if (metric0 < metric1) {
|
||||
node2[1].metric = metric0;
|
||||
node2[1].data = (node1[0].data << 1) | 1;
|
||||
} else {
|
||||
node2[1].metric = metric1;
|
||||
node2[1].data = (node1[2].data << 1) | 1;
|
||||
}
|
||||
metric0 = node1[1].metric + isqr(blevel + ampl1);
|
||||
metric1 = node1[3].metric + isqr(blevel + ampl2 + ampl1);
|
||||
if (metric0 < metric1) {
|
||||
node2[2].metric = metric0;
|
||||
node2[2].data = node1[1].data << 1;
|
||||
} else {
|
||||
node2[2].metric = metric1;
|
||||
node2[2].data = node1[3].data << 1;
|
||||
}
|
||||
metric0 = node1[1].metric + isqr(blevel + ampl1 + ampl0);
|
||||
metric1 = node1[3].metric + isqr(blevel + ampl2 + ampl1 + ampl0);
|
||||
if (metric0 < metric1) {
|
||||
node2[3].metric = metric0;
|
||||
node2[3].data = (node1[1].data << 1) | 1;
|
||||
} else {
|
||||
node2[3].metric = metric1;
|
||||
node2[3].data = (node1[3].data << 1) | 1;
|
||||
}
|
||||
/* end of viterbi "loop"; special actions periodically */
|
||||
if (s->shistcnt & 7)
|
||||
return;
|
||||
/* find node with best metric */
|
||||
metric0 = ~0;
|
||||
metric1 = 0;
|
||||
for (i = 0; i < 4; i++)
|
||||
if (node2[i].metric < metric0) {
|
||||
metric0 = node2[i].metric;
|
||||
metric1 = node2[i].data;
|
||||
}
|
||||
/* decide data, send to decoder */
|
||||
s->descram <<= 8;
|
||||
s->descram |= (metric1 >> 16) & 0xff; /* 16 is about 5*constraint length */
|
||||
i = ~(s->descram ^ (s->descram >> 1));
|
||||
i ^= (i >> DESCRAM17_TAPSH3) ^ (i >> (DESCRAM17_TAPSH3-DESCRAM17_TAPSH2));
|
||||
ch = rev_byte(i);
|
||||
pktput(s->chan, &ch, 1);
|
||||
if (logcheck(257)) {
|
||||
char buf2[9];
|
||||
for (i = 0; i < 8; i++)
|
||||
buf2[i] = '0' + ((ch >> i) & 1);
|
||||
buf2[8] = 0;
|
||||
logprintf(257, "fskrx: %s\n", buf2);
|
||||
}
|
||||
/* subtract metric */
|
||||
s->snracc += metric0 >> SNRESTSHIFT;
|
||||
for (i = 0; i < 4; i++) {
|
||||
node2[i].metric -= metric0;
|
||||
if (node2[i].metric > 0x7fffffff)
|
||||
node2[i].metric = 0x7fffffff; /* prevent overflow */
|
||||
}
|
||||
/* new parameter estimate */
|
||||
estparams(s, metric1 >> (16-ESTSYMBOLS));
|
||||
/* SNR estimate */
|
||||
s->snrcnt++;
|
||||
if (s->snrcnt < (1<<(SNRESTSHIFT-3)))
|
||||
return;
|
||||
s->snrcnt = 0;
|
||||
metric0 = isqr(s->params[1]) + isqr(s->params[2]) + isqr(s->params[3]);
|
||||
metric1 = metric0;
|
||||
if (!metric1)
|
||||
metric1 = 1;
|
||||
snr = -10*M_LOG10E*log(s->snracc / (float)metric1);
|
||||
logprintf(128, "SNR: signal power %u noise+interference pwr %u S/(N+I) %6.2fdB\n", metric0, s->snracc, snr);
|
||||
pktsetdcd(s->chan, s->snracc < (metric0 >> 2));
|
||||
s->snracc = 0;
|
||||
}
|
||||
|
||||
static void demodrx(struct demodstate *s, unsigned nsamples)
|
||||
{
|
||||
int16_t *samples;
|
||||
int16_t curs, nexts, mids;
|
||||
int32_t gardner;
|
||||
int corr;
|
||||
|
||||
samples = alloca((nsamples + s->firlen) * sizeof(samples[0]));
|
||||
audioread(s->chan, samples, nsamples + s->firlen, s->stime);
|
||||
s->stime += nsamples;
|
||||
samples += s->firlen;
|
||||
while (WHICHSAMPLE(s->pll + s->pllinc) < nsamples) {
|
||||
#if 0
|
||||
for (corr = 0; corr < 16; corr++)
|
||||
printf("%d\n", filter(s, samples, s->pll+corr*s->pllinc/16));
|
||||
#endif
|
||||
curs = filter(s, samples, s->pll);
|
||||
mids = filter(s, samples, s->pll+s->pllinc/2);
|
||||
nexts = filter(s, samples, s->pll+s->pllinc);
|
||||
gardner = ((nexts > 0 ? 1 : -1) - (curs > 0 ? 1 : -1)) * mids;
|
||||
s->pll += s->pllinc;
|
||||
#if 0
|
||||
corr = (gardner * s->pllinc) >> 20;
|
||||
s->pll -= corr;
|
||||
#elif 0
|
||||
if (gardner < 0)
|
||||
s->pll += s->pllinc >> 4;
|
||||
else
|
||||
s->pll -= s->pllinc >> 4;
|
||||
#else
|
||||
if ((curs > 0) ^ (nexts > 0)) {
|
||||
if ((curs > 0) ^ (mids > 0))
|
||||
s->pll -= s->pllinc >> 5;
|
||||
if ((nexts > 0) ^ (mids > 0))
|
||||
s->pll += s->pllinc >> 5;
|
||||
}
|
||||
#endif
|
||||
viterbieq(s, curs);
|
||||
}
|
||||
s->pll -= (nsamples << 16);
|
||||
}
|
||||
|
||||
static void demoddemodulate(void *state)
|
||||
{
|
||||
struct demodstate *s = (struct demodstate *)state;
|
||||
|
||||
s->stime = audiocurtime(s->chan);
|
||||
for (;;)
|
||||
demodrx(s, 256);
|
||||
}
|
||||
|
||||
static void demodinit(void *state, unsigned int samplerate, unsigned int *bitrate)
|
||||
{
|
||||
struct demodstate *s = (struct demodstate *)state;
|
||||
float coeff[FILTEROVER][MAXFIRLEN];
|
||||
double tmul;
|
||||
float max1, max2, t, at, f1, f2, f3;
|
||||
int i, j;
|
||||
|
||||
s->firlen = (samplerate * FILTERSPANBITS + s->bps - 1) / s->bps;
|
||||
if (s->firlen > MAXFIRLEN) {
|
||||
logprintf(MLOG_WARNING, "demodfsk: input filter length too long\n");
|
||||
s->firlen = MAXFIRLEN;
|
||||
}
|
||||
tmul = ((double)s->bps) / FILTEROVER / ((double)samplerate);
|
||||
switch (s->filtermode) {
|
||||
case 1: /* root raised cosine */
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++) {
|
||||
t = (signed)(i - s->firlen*FILTEROVER/2) * tmul;
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] = root_raised_cosine_time(t, RCOSALPHA);
|
||||
}
|
||||
break;
|
||||
|
||||
case 2: /* raised cosine */
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++) {
|
||||
t = (signed)(i - s->firlen*FILTEROVER/2) * tmul;
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] = raised_cosine_time(t, RCOSALPHA);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: /* hamming */
|
||||
tmul *= FILTERRELAX;
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++)
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] =
|
||||
sinc((i - (signed)s->firlen*FILTEROVER/2)*tmul)
|
||||
* hamming((double)i / (double)(FILTEROVER*s->firlen-1));
|
||||
break;
|
||||
|
||||
default: /* DF9IC */
|
||||
for (i = 0; i < FILTEROVER*s->firlen; i++) {
|
||||
t = (signed)(i - s->firlen*FILTEROVER/2) * tmul;
|
||||
coeff[((unsigned)i) % FILTEROVER][((unsigned)i) / FILTEROVER] = df9ic_rxfilter(t);
|
||||
}
|
||||
break;
|
||||
}
|
||||
max1 = 0;
|
||||
for (i = 0; i < FILTEROVER; i++) {
|
||||
max2 = 0;
|
||||
for (j = 0; j < s->firlen; j++)
|
||||
max2 += fabs(coeff[i][j]);
|
||||
if (max2 > max1)
|
||||
max1 = max2;
|
||||
}
|
||||
max2 = ((float)0x7fffffff / (float)0x7fff) / max1;
|
||||
for (i = 0; i < FILTEROVER; i++)
|
||||
for (j = 0; j < s->firlen; j++)
|
||||
s->filter[i][j] = max2 * coeff[i][j];
|
||||
s->pllinc = (0x10000 * samplerate + s->bps/2) / s->bps;
|
||||
s->pll = 0;
|
||||
s->pllcorr = s->pllinc / 8;
|
||||
|
||||
s->shistcnt = s->snracc = s->snrcnt = 0;
|
||||
s->params[0] = 0;
|
||||
s->params[1] = 300;
|
||||
s->params[2] = 11000;
|
||||
s->params[3] = 300;
|
||||
for (i = 0; i < 8; i++)
|
||||
s->venodes[i].metric = 0x7fffffff;
|
||||
*bitrate = s->bps;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
struct demodulator fskpspdemodulator = {
|
||||
NULL,
|
||||
"fskpsp",
|
||||
demodparams,
|
||||
demodconfig,
|
||||
demodinit,
|
||||
demoddemodulate,
|
||||
free
|
||||
};
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
251
install-sh
Executable file
251
install-sh
Executable file
|
|
@ -0,0 +1,251 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
chmodcmd=""
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
||||
8
libmisc/Makefile.am
Normal file
8
libmisc/Makefile.am
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
EXTRA_DIST = getopt.c getopt.h getopt1.c openpty.c vsnprintf.c random.c
|
||||
|
||||
noinst_LIBRARIES = libmisc.a
|
||||
|
||||
noinst_HEADERS = raisedcosine.h
|
||||
|
||||
libmisc_a_SOURCES = sinc.c hamming.c rctime.c rcfreq.c rrctime.c rrcfreq.c
|
||||
libmisc_a_LIBADD = @LIBOBJS@
|
||||
503
libmisc/Makefile.in
Normal file
503
libmisc/Makefile.in
Normal file
|
|
@ -0,0 +1,503 @@
|
|||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = libmisc
|
||||
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in getopt.c getopt1.c openpty.c random.c \
|
||||
vsnprintf.c
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LIBRARIES = $(noinst_LIBRARIES)
|
||||
ARFLAGS = cru
|
||||
libmisc_a_AR = $(AR) $(ARFLAGS)
|
||||
libmisc_a_DEPENDENCIES = @LIBOBJS@
|
||||
am_libmisc_a_OBJECTS = sinc.$(OBJEXT) hamming.$(OBJEXT) \
|
||||
rctime.$(OBJEXT) rcfreq.$(OBJEXT) rrctime.$(OBJEXT) \
|
||||
rrcfreq.$(OBJEXT)
|
||||
libmisc_a_OBJECTS = $(am_libmisc_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libmisc_a_SOURCES)
|
||||
DIST_SOURCES = $(libmisc_a_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
ALSA_CFLAGS = @ALSA_CFLAGS@
|
||||
ALSA_LIBS = @ALSA_LIBS@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUDIOFILE_CFLAGS = @AUDIOFILE_CFLAGS@
|
||||
AUDIOFILE_LIBS = @AUDIOFILE_LIBS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GMSGFMT_015 = @GMSGFMT_015@
|
||||
GREP = @GREP@
|
||||
GTK_CFLAGS = @GTK_CFLAGS@
|
||||
GTK_LIBS = @GTK_LIBS@
|
||||
HAVE_ALSA = @HAVE_ALSA@
|
||||
HAVE_BITTYPES = @HAVE_BITTYPES@
|
||||
HAVE_DIRECTX = @HAVE_DIRECTX@
|
||||
HAVE_IFRNEWNAME = @HAVE_IFRNEWNAME@
|
||||
HAVE_MKISS = @HAVE_MKISS@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INTLLIBS = @INTLLIBS@
|
||||
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBINTL = @LTLIBINTL@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGFMT_015 = @MSGFMT_015@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
M_PI = @M_PI@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
POSUB = @POSUB@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USEMMX = @USEMMX@
|
||||
USEVIS = @USEVIS@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WIN32 = @WIN32@
|
||||
WINDRES = @WINDRES@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
XGETTEXT_015 = @XGETTEXT_015@
|
||||
XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
|
||||
XML_CFLAGS = @XML_CFLAGS@
|
||||
XML_LIBS = @XML_LIBS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = getopt.c getopt.h getopt1.c openpty.c vsnprintf.c random.c
|
||||
noinst_LIBRARIES = libmisc.a
|
||||
noinst_HEADERS = raisedcosine.h
|
||||
libmisc_a_SOURCES = sinc.c hamming.c rctime.c rcfreq.c rrctime.c rrcfreq.c
|
||||
libmisc_a_LIBADD = @LIBOBJS@
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libmisc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu libmisc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLIBRARIES:
|
||||
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
|
||||
libmisc.a: $(libmisc_a_OBJECTS) $(libmisc_a_DEPENDENCIES)
|
||||
-rm -f libmisc.a
|
||||
$(libmisc_a_AR) libmisc.a $(libmisc_a_OBJECTS) $(libmisc_a_LIBADD)
|
||||
$(RANLIB) libmisc.a
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt1.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/openpty.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/random.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vsnprintf.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hamming.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcfreq.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rctime.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrcfreq.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrctime.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sinc.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LIBRARIES) $(HEADERS)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf $(DEPDIR) ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf $(DEPDIR) ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-noinstLIBRARIES ctags distclean distclean-compile \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
731
libmisc/getopt.c
Normal file
731
libmisc/getopt.c
Normal file
|
|
@ -0,0 +1,731 @@
|
|||
/* Getopt for GNU.
|
||||
NOTE: getopt is now part of the C library, so if you don't know what
|
||||
"Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
|
||||
before changing it!
|
||||
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 1993
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
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, 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
/* NOTE!!! AIX requires this to be the first thing in the file.
|
||||
Do not put ANYTHING before it! */
|
||||
#if !defined (__GNUC__) && defined (_AIX)
|
||||
#pragma alloca
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define alloca __builtin_alloca
|
||||
#else /* not __GNUC__ */
|
||||
#if defined (HAVE_ALLOCA_H) || (defined(sparc) && (defined(sun) || (!defined(USG) && !defined(SVR4) && !defined(__svr4__))))
|
||||
#include <alloca.h>
|
||||
#else
|
||||
#ifndef _AIX
|
||||
char *alloca ();
|
||||
#endif
|
||||
#endif /* alloca.h */
|
||||
#endif /* not __GNUC__ */
|
||||
|
||||
#if !__STDC__ && !defined(const) && IN_GCC
|
||||
#define const
|
||||
#endif
|
||||
|
||||
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. */
|
||||
#ifndef _NO_PROTO
|
||||
#define _NO_PROTO
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||
actually compiling the library itself. This code is part of the GNU C
|
||||
Library, but also included in many other GNU distributions. Compiling
|
||||
and linking in this code is a waste when using the GNU C library
|
||||
(especially if it is a shared library). Rather than having every GNU
|
||||
program understand `configure --with-gnu-libc' and omit the object files,
|
||||
it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
|
||||
|
||||
|
||||
/* This needs to come after some library #include
|
||||
to get __GNU_LIBRARY__ defined. */
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#undef alloca
|
||||
/* Don't include stdlib.h for non-GNU C libraries because some of them
|
||||
contain conflicting prototypes for getopt. */
|
||||
#include <stdlib.h>
|
||||
#else /* Not GNU C library. */
|
||||
#define __alloca alloca
|
||||
#endif /* GNU C library. */
|
||||
|
||||
/* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a
|
||||
long-named option. Because this is not POSIX.2 compliant, it is
|
||||
being phased out. */
|
||||
/* #define GETOPT_COMPAT */
|
||||
|
||||
/* This version of `getopt' appears to the caller like standard Unix `getopt'
|
||||
but it behaves differently for the user, since it allows the user
|
||||
to intersperse the options with the other arguments.
|
||||
|
||||
As `getopt' works, it permutes the elements of ARGV so that,
|
||||
when it is done, all the options precede everything else. Thus
|
||||
all application programs are extended to handle flexible argument order.
|
||||
|
||||
Setting the environment variable POSIXLY_CORRECT disables permutation.
|
||||
Then the behavior is completely standard.
|
||||
|
||||
GNU application programs can use a third alternative mode in which
|
||||
they can distinguish the relative order of options and other arguments. */
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
/* For communication from `getopt' to the caller.
|
||||
When `getopt' finds an option that takes an argument,
|
||||
the argument value is returned here.
|
||||
Also, when `ordering' is RETURN_IN_ORDER,
|
||||
each non-option ARGV-element is returned here. */
|
||||
|
||||
char *optarg = 0;
|
||||
|
||||
/* Index in ARGV of the next element to be scanned.
|
||||
This is used for communication to and from the caller
|
||||
and for communication between successive calls to `getopt'.
|
||||
|
||||
On entry to `getopt', zero means this is the first call; initialize.
|
||||
|
||||
When `getopt' returns EOF, this is the index of the first of the
|
||||
non-option elements that the caller should itself scan.
|
||||
|
||||
Otherwise, `optind' communicates from one call to the next
|
||||
how much of ARGV has been scanned so far. */
|
||||
|
||||
/* XXX 1003.2 says this must be 1 before any call. */
|
||||
int optind = 0;
|
||||
|
||||
/* The next char to be scanned in the option-element
|
||||
in which the last option character we returned was found.
|
||||
This allows us to pick up the scan where we left off.
|
||||
|
||||
If this is zero, or a null string, it means resume the scan
|
||||
by advancing to the next ARGV-element. */
|
||||
|
||||
static char *nextchar;
|
||||
|
||||
/* Callers store zero here to inhibit the error message
|
||||
for unrecognized options. */
|
||||
|
||||
int opterr = 1;
|
||||
|
||||
/* Set to an option character which was unrecognized.
|
||||
This must be initialized on some systems to avoid linking in the
|
||||
system's own getopt implementation. */
|
||||
|
||||
int optopt = '?';
|
||||
|
||||
/* Describe how to deal with options that follow non-option ARGV-elements.
|
||||
|
||||
If the caller did not specify anything,
|
||||
the default is REQUIRE_ORDER if the environment variable
|
||||
POSIXLY_CORRECT is defined, PERMUTE otherwise.
|
||||
|
||||
REQUIRE_ORDER means don't recognize them as options;
|
||||
stop option processing when the first non-option is seen.
|
||||
This is what Unix does.
|
||||
This mode of operation is selected by either setting the environment
|
||||
variable POSIXLY_CORRECT, or using `+' as the first character
|
||||
of the list of option characters.
|
||||
|
||||
PERMUTE is the default. We permute the contents of ARGV as we scan,
|
||||
so that eventually all the non-options are at the end. This allows options
|
||||
to be given in any order, even with programs that were not written to
|
||||
expect this.
|
||||
|
||||
RETURN_IN_ORDER is an option available to programs that were written
|
||||
to expect options and other ARGV-elements in any order and that care about
|
||||
the ordering of the two. We describe each non-option ARGV-element
|
||||
as if it were the argument of an option with character code 1.
|
||||
Using `-' as the first character of the list of option characters
|
||||
selects this mode of operation.
|
||||
|
||||
The special argument `--' forces an end of option-scanning regardless
|
||||
of the value of `ordering'. In the case of RETURN_IN_ORDER, only
|
||||
`--' can cause `getopt' to return EOF with `optind' != ARGC. */
|
||||
|
||||
static enum
|
||||
{
|
||||
REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
|
||||
} ordering;
|
||||
|
||||
#ifdef __GNU_LIBRARY__
|
||||
/* We want to avoid inclusion of string.h with non-GNU libraries
|
||||
because there are many ways it can cause trouble.
|
||||
On some systems, it contains special magic macros that don't work
|
||||
in GCC. */
|
||||
#include <string.h>
|
||||
#define my_index strchr
|
||||
#define my_bcopy(src, dst, n) memcpy ((dst), (src), (n))
|
||||
#else
|
||||
|
||||
/* Avoid depending on library functions or files
|
||||
whose names are inconsistent. */
|
||||
|
||||
char *getenv ();
|
||||
|
||||
static char *
|
||||
my_index (str, chr)
|
||||
const char *str;
|
||||
int chr;
|
||||
{
|
||||
while (*str)
|
||||
{
|
||||
if (*str == chr)
|
||||
return (char *) str;
|
||||
str++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
my_bcopy (from, to, size)
|
||||
const char *from;
|
||||
char *to;
|
||||
int size;
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < size; i++)
|
||||
to[i] = from[i];
|
||||
}
|
||||
#endif /* GNU C library. */
|
||||
|
||||
/* Handle permutation of arguments. */
|
||||
|
||||
/* Describe the part of ARGV that contains non-options that have
|
||||
been skipped. `first_nonopt' is the index in ARGV of the first of them;
|
||||
`last_nonopt' is the index after the last of them. */
|
||||
|
||||
static int first_nonopt;
|
||||
static int last_nonopt;
|
||||
|
||||
/* Exchange two adjacent subsequences of ARGV.
|
||||
One subsequence is elements [first_nonopt,last_nonopt)
|
||||
which contains all the non-options that have been skipped so far.
|
||||
The other is elements [last_nonopt,optind), which contains all
|
||||
the options processed since those non-options were skipped.
|
||||
|
||||
`first_nonopt' and `last_nonopt' are relocated so that they describe
|
||||
the new indices of the non-options in ARGV after they are moved. */
|
||||
|
||||
static void
|
||||
exchange (argv)
|
||||
char **argv;
|
||||
{
|
||||
int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *);
|
||||
char **temp = (char **) __alloca (nonopts_size);
|
||||
|
||||
/* Interchange the two blocks of data in ARGV. */
|
||||
|
||||
my_bcopy ((char *) &argv[first_nonopt], (char *) temp, nonopts_size);
|
||||
my_bcopy ((char *) &argv[last_nonopt], (char *) &argv[first_nonopt],
|
||||
(optind - last_nonopt) * sizeof (char *));
|
||||
my_bcopy ((char *) temp,
|
||||
(char *) &argv[first_nonopt + optind - last_nonopt],
|
||||
nonopts_size);
|
||||
|
||||
/* Update records for the slots the non-options now occupy. */
|
||||
|
||||
first_nonopt += (optind - last_nonopt);
|
||||
last_nonopt = optind;
|
||||
}
|
||||
|
||||
/* Scan elements of ARGV (whose length is ARGC) for option characters
|
||||
given in OPTSTRING.
|
||||
|
||||
If an element of ARGV starts with '-', and is not exactly "-" or "--",
|
||||
then it is an option element. The characters of this element
|
||||
(aside from the initial '-') are option characters. If `getopt'
|
||||
is called repeatedly, it returns successively each of the option characters
|
||||
from each of the option elements.
|
||||
|
||||
If `getopt' finds another option character, it returns that character,
|
||||
updating `optind' and `nextchar' so that the next call to `getopt' can
|
||||
resume the scan with the following option character or ARGV-element.
|
||||
|
||||
If there are no more option characters, `getopt' returns `EOF'.
|
||||
Then `optind' is the index in ARGV of the first ARGV-element
|
||||
that is not an option. (The ARGV-elements have been permuted
|
||||
so that those that are not options now come last.)
|
||||
|
||||
OPTSTRING is a string containing the legitimate option characters.
|
||||
If an option character is seen that is not listed in OPTSTRING,
|
||||
return '?' after printing an error message. If you set `opterr' to
|
||||
zero, the error message is suppressed but we still return '?'.
|
||||
|
||||
If a char in OPTSTRING is followed by a colon, that means it wants an arg,
|
||||
so the following text in the same ARGV-element, or the text of the following
|
||||
ARGV-element, is returned in `optarg'. Two colons mean an option that
|
||||
wants an optional arg; if there is text in the current ARGV-element,
|
||||
it is returned in `optarg', otherwise `optarg' is set to zero.
|
||||
|
||||
If OPTSTRING starts with `-' or `+', it requests different methods of
|
||||
handling the non-option ARGV-elements.
|
||||
See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
|
||||
|
||||
Long-named options begin with `--' instead of `-'.
|
||||
Their names may be abbreviated as long as the abbreviation is unique
|
||||
or is an exact match for some defined option. If they have an
|
||||
argument, it follows the option name in the same ARGV-element, separated
|
||||
from the option name by a `=', or else the in next ARGV-element.
|
||||
When `getopt' finds a long-named option, it returns 0 if that option's
|
||||
`flag' field is nonzero, the value of the option's `val' field
|
||||
if the `flag' field is zero.
|
||||
|
||||
The elements of ARGV aren't really const, because we permute them.
|
||||
But we pretend they're const in the prototype to be compatible
|
||||
with other systems.
|
||||
|
||||
LONGOPTS is a vector of `struct option' terminated by an
|
||||
element containing a name which is zero.
|
||||
|
||||
LONGIND returns the index in LONGOPT of the long-named option found.
|
||||
It is only valid when a long-named option has been found by the most
|
||||
recent call.
|
||||
|
||||
If LONG_ONLY is nonzero, '-' as well as '--' can introduce
|
||||
long-named options. */
|
||||
|
||||
int
|
||||
_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *optstring;
|
||||
const struct option *longopts;
|
||||
int *longind;
|
||||
int long_only;
|
||||
{
|
||||
int option_index;
|
||||
|
||||
optarg = 0;
|
||||
|
||||
/* Initialize the internal data when the first call is made.
|
||||
Start processing options with ARGV-element 1 (since ARGV-element 0
|
||||
is the program name); the sequence of previously skipped
|
||||
non-option ARGV-elements is empty. */
|
||||
|
||||
if (optind == 0)
|
||||
{
|
||||
first_nonopt = last_nonopt = optind = 1;
|
||||
|
||||
nextchar = NULL;
|
||||
|
||||
/* Determine how to handle the ordering of options and nonoptions. */
|
||||
|
||||
if (optstring[0] == '-')
|
||||
{
|
||||
ordering = RETURN_IN_ORDER;
|
||||
++optstring;
|
||||
}
|
||||
else if (optstring[0] == '+')
|
||||
{
|
||||
ordering = REQUIRE_ORDER;
|
||||
++optstring;
|
||||
}
|
||||
else if (getenv ("POSIXLY_CORRECT") != NULL)
|
||||
ordering = REQUIRE_ORDER;
|
||||
else
|
||||
ordering = PERMUTE;
|
||||
}
|
||||
|
||||
if (nextchar == NULL || *nextchar == '\0')
|
||||
{
|
||||
if (ordering == PERMUTE)
|
||||
{
|
||||
/* If we have just processed some options following some non-options,
|
||||
exchange them so that the options come first. */
|
||||
|
||||
if (first_nonopt != last_nonopt && last_nonopt != optind)
|
||||
exchange ((char **) argv);
|
||||
else if (last_nonopt != optind)
|
||||
first_nonopt = optind;
|
||||
|
||||
/* Now skip any additional non-options
|
||||
and extend the range of non-options previously skipped. */
|
||||
|
||||
while (optind < argc
|
||||
&& (argv[optind][0] != '-' || argv[optind][1] == '\0')
|
||||
#ifdef GETOPT_COMPAT
|
||||
&& (longopts == NULL
|
||||
|| argv[optind][0] != '+' || argv[optind][1] == '\0')
|
||||
#endif /* GETOPT_COMPAT */
|
||||
)
|
||||
optind++;
|
||||
last_nonopt = optind;
|
||||
}
|
||||
|
||||
/* Special ARGV-element `--' means premature end of options.
|
||||
Skip it like a null option,
|
||||
then exchange with previous non-options as if it were an option,
|
||||
then skip everything else like a non-option. */
|
||||
|
||||
if (optind != argc && !strcmp (argv[optind], "--"))
|
||||
{
|
||||
optind++;
|
||||
|
||||
if (first_nonopt != last_nonopt && last_nonopt != optind)
|
||||
exchange ((char **) argv);
|
||||
else if (first_nonopt == last_nonopt)
|
||||
first_nonopt = optind;
|
||||
last_nonopt = argc;
|
||||
|
||||
optind = argc;
|
||||
}
|
||||
|
||||
/* If we have done all the ARGV-elements, stop the scan
|
||||
and back over any non-options that we skipped and permuted. */
|
||||
|
||||
if (optind == argc)
|
||||
{
|
||||
/* Set the next-arg-index to point at the non-options
|
||||
that we previously skipped, so the caller will digest them. */
|
||||
if (first_nonopt != last_nonopt)
|
||||
optind = first_nonopt;
|
||||
return EOF;
|
||||
}
|
||||
|
||||
/* If we have come to a non-option and did not permute it,
|
||||
either stop the scan or describe it to the caller and pass it by. */
|
||||
|
||||
if ((argv[optind][0] != '-' || argv[optind][1] == '\0')
|
||||
#ifdef GETOPT_COMPAT
|
||||
&& (longopts == NULL
|
||||
|| argv[optind][0] != '+' || argv[optind][1] == '\0')
|
||||
#endif /* GETOPT_COMPAT */
|
||||
)
|
||||
{
|
||||
if (ordering == REQUIRE_ORDER)
|
||||
return EOF;
|
||||
optarg = argv[optind++];
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* We have found another option-ARGV-element.
|
||||
Start decoding its characters. */
|
||||
|
||||
nextchar = (argv[optind] + 1
|
||||
+ (longopts != NULL && argv[optind][1] == '-'));
|
||||
}
|
||||
|
||||
if (longopts != NULL
|
||||
&& ((argv[optind][0] == '-'
|
||||
&& (argv[optind][1] == '-' || long_only))
|
||||
#ifdef GETOPT_COMPAT
|
||||
|| argv[optind][0] == '+'
|
||||
#endif /* GETOPT_COMPAT */
|
||||
))
|
||||
{
|
||||
const struct option *p;
|
||||
char *s = nextchar;
|
||||
int exact = 0;
|
||||
int ambig = 0;
|
||||
const struct option *pfound = NULL;
|
||||
int indfound;
|
||||
|
||||
while (*s && *s != '=')
|
||||
s++;
|
||||
|
||||
/* Test all options for either exact match or abbreviated matches. */
|
||||
for (p = longopts, option_index = 0; p->name;
|
||||
p++, option_index++)
|
||||
if (!strncmp (p->name, nextchar, s - nextchar))
|
||||
{
|
||||
if (s - nextchar == strlen (p->name))
|
||||
{
|
||||
/* Exact match found. */
|
||||
pfound = p;
|
||||
indfound = option_index;
|
||||
exact = 1;
|
||||
break;
|
||||
}
|
||||
else if (pfound == NULL)
|
||||
{
|
||||
/* First nonexact match found. */
|
||||
pfound = p;
|
||||
indfound = option_index;
|
||||
}
|
||||
else
|
||||
/* Second nonexact match found. */
|
||||
ambig = 1;
|
||||
}
|
||||
|
||||
if (ambig && !exact)
|
||||
{
|
||||
if (opterr)
|
||||
fprintf (stderr, "%s: option `%s' is ambiguous\n",
|
||||
argv[0], argv[optind]);
|
||||
nextchar += strlen (nextchar);
|
||||
optind++;
|
||||
return '?';
|
||||
}
|
||||
|
||||
if (pfound != NULL)
|
||||
{
|
||||
option_index = indfound;
|
||||
optind++;
|
||||
if (*s)
|
||||
{
|
||||
/* Don't test has_arg with >, because some C compilers don't
|
||||
allow it to be used on enums. */
|
||||
if (pfound->has_arg)
|
||||
optarg = s + 1;
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
{
|
||||
if (argv[optind - 1][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr,
|
||||
"%s: option `--%s' doesn't allow an argument\n",
|
||||
argv[0], pfound->name);
|
||||
else
|
||||
/* +option or -option */
|
||||
fprintf (stderr,
|
||||
"%s: option `%c%s' doesn't allow an argument\n",
|
||||
argv[0], argv[optind - 1][0], pfound->name);
|
||||
}
|
||||
nextchar += strlen (nextchar);
|
||||
return '?';
|
||||
}
|
||||
}
|
||||
else if (pfound->has_arg == 1)
|
||||
{
|
||||
if (optind < argc)
|
||||
optarg = argv[optind++];
|
||||
else
|
||||
{
|
||||
if (opterr)
|
||||
fprintf (stderr, "%s: option `%s' requires an argument\n",
|
||||
argv[0], argv[optind - 1]);
|
||||
nextchar += strlen (nextchar);
|
||||
return optstring[0] == ':' ? ':' : '?';
|
||||
}
|
||||
}
|
||||
nextchar += strlen (nextchar);
|
||||
if (longind != NULL)
|
||||
*longind = option_index;
|
||||
if (pfound->flag)
|
||||
{
|
||||
*(pfound->flag) = pfound->val;
|
||||
return 0;
|
||||
}
|
||||
return pfound->val;
|
||||
}
|
||||
/* Can't find it as a long option. If this is not getopt_long_only,
|
||||
or the option starts with '--' or is not a valid short
|
||||
option, then it's an error.
|
||||
Otherwise interpret it as a short option. */
|
||||
if (!long_only || argv[optind][1] == '-'
|
||||
#ifdef GETOPT_COMPAT
|
||||
|| argv[optind][0] == '+'
|
||||
#endif /* GETOPT_COMPAT */
|
||||
|| my_index (optstring, *nextchar) == NULL)
|
||||
{
|
||||
if (opterr)
|
||||
{
|
||||
if (argv[optind][1] == '-')
|
||||
/* --option */
|
||||
fprintf (stderr, "%s: unrecognized option `--%s'\n",
|
||||
argv[0], nextchar);
|
||||
else
|
||||
/* +option or -option */
|
||||
fprintf (stderr, "%s: unrecognized option `%c%s'\n",
|
||||
argv[0], argv[optind][0], nextchar);
|
||||
}
|
||||
nextchar = (char *) "";
|
||||
optind++;
|
||||
return '?';
|
||||
}
|
||||
}
|
||||
|
||||
/* Look at and handle the next option-character. */
|
||||
|
||||
{
|
||||
char c = *nextchar++;
|
||||
char *temp = my_index (optstring, c);
|
||||
|
||||
/* Increment `optind' when we start to process its last character. */
|
||||
if (*nextchar == '\0')
|
||||
++optind;
|
||||
|
||||
if (temp == NULL || c == ':')
|
||||
{
|
||||
if (opterr)
|
||||
{
|
||||
#if 0
|
||||
if (c < 040 || c >= 0177)
|
||||
fprintf (stderr, "%s: unrecognized option, character code 0%o\n",
|
||||
argv[0], c);
|
||||
else
|
||||
fprintf (stderr, "%s: unrecognized option `-%c'\n", argv[0], c);
|
||||
#else
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c);
|
||||
#endif
|
||||
}
|
||||
optopt = c;
|
||||
return '?';
|
||||
}
|
||||
if (temp[1] == ':')
|
||||
{
|
||||
if (temp[2] == ':')
|
||||
{
|
||||
/* This is an option that accepts an argument optionally. */
|
||||
if (*nextchar != '\0')
|
||||
{
|
||||
optarg = nextchar;
|
||||
optind++;
|
||||
}
|
||||
else
|
||||
optarg = 0;
|
||||
nextchar = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This is an option that requires an argument. */
|
||||
if (*nextchar != '\0')
|
||||
{
|
||||
optarg = nextchar;
|
||||
/* If we end this ARGV-element by taking the rest as an arg,
|
||||
we must advance to the next element now. */
|
||||
optind++;
|
||||
}
|
||||
else if (optind == argc)
|
||||
{
|
||||
if (opterr)
|
||||
{
|
||||
#if 0
|
||||
fprintf (stderr, "%s: option `-%c' requires an argument\n",
|
||||
argv[0], c);
|
||||
#else
|
||||
/* 1003.2 specifies the format of this message. */
|
||||
fprintf (stderr, "%s: option requires an argument -- %c\n",
|
||||
argv[0], c);
|
||||
#endif
|
||||
}
|
||||
optopt = c;
|
||||
if (optstring[0] == ':')
|
||||
c = ':';
|
||||
else
|
||||
c = '?';
|
||||
}
|
||||
else
|
||||
/* We already incremented `optind' once;
|
||||
increment it again when taking next ARGV-elt as argument. */
|
||||
optarg = argv[optind++];
|
||||
nextchar = NULL;
|
||||
}
|
||||
}
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
getopt (argc, argv, optstring)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *optstring;
|
||||
{
|
||||
return _getopt_internal (argc, argv, optstring,
|
||||
(const struct option *) 0,
|
||||
(int *) 0,
|
||||
0);
|
||||
}
|
||||
|
||||
#endif /* _LIBC or not __GNU_LIBRARY__. */
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
/* Compile with -DTEST to make an executable for use in testing
|
||||
the above definition of `getopt'. */
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
int c;
|
||||
int digit_optind = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
int this_option_optind = optind ? optind : 1;
|
||||
|
||||
c = getopt (argc, argv, "abc:d:0123456789");
|
||||
if (c == EOF)
|
||||
break;
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
printf ("digits occur in two different argv-elements.\n");
|
||||
digit_optind = this_option_optind;
|
||||
printf ("option %c\n", c);
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
printf ("option a\n");
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
printf ("option b\n");
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
printf ("option c with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case '?':
|
||||
break;
|
||||
|
||||
default:
|
||||
printf ("?? getopt returned character code 0%o ??\n", c);
|
||||
}
|
||||
}
|
||||
|
||||
if (optind < argc)
|
||||
{
|
||||
printf ("non-option ARGV-elements: ");
|
||||
while (optind < argc)
|
||||
printf ("%s ", argv[optind++]);
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
#endif /* TEST */
|
||||
129
libmisc/getopt.h
Normal file
129
libmisc/getopt.h
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
/* Declarations for getopt.
|
||||
Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
|
||||
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, 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
#define _GETOPT_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* For communication from `getopt' to the caller.
|
||||
When `getopt' finds an option that takes an argument,
|
||||
the argument value is returned here.
|
||||
Also, when `ordering' is RETURN_IN_ORDER,
|
||||
each non-option ARGV-element is returned here. */
|
||||
|
||||
extern char *optarg;
|
||||
|
||||
/* Index in ARGV of the next element to be scanned.
|
||||
This is used for communication to and from the caller
|
||||
and for communication between successive calls to `getopt'.
|
||||
|
||||
On entry to `getopt', zero means this is the first call; initialize.
|
||||
|
||||
When `getopt' returns EOF, this is the index of the first of the
|
||||
non-option elements that the caller should itself scan.
|
||||
|
||||
Otherwise, `optind' communicates from one call to the next
|
||||
how much of ARGV has been scanned so far. */
|
||||
|
||||
extern int optind;
|
||||
|
||||
/* Callers store zero here to inhibit the error message `getopt' prints
|
||||
for unrecognized options. */
|
||||
|
||||
extern int opterr;
|
||||
|
||||
/* Set to an option character which was unrecognized. */
|
||||
|
||||
extern int optopt;
|
||||
|
||||
/* Describe the long-named options requested by the application.
|
||||
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
|
||||
of `struct option' terminated by an element containing a name which is
|
||||
zero.
|
||||
|
||||
The field `has_arg' is:
|
||||
no_argument (or 0) if the option does not take an argument,
|
||||
required_argument (or 1) if the option requires an argument,
|
||||
optional_argument (or 2) if the option takes an optional argument.
|
||||
|
||||
If the field `flag' is not NULL, it points to a variable that is set
|
||||
to the value given in the field `val' when the option is found, but
|
||||
left unchanged if the option is not found.
|
||||
|
||||
To have a long-named option do something other than set an `int' to
|
||||
a compiled-in constant, such as set a value from `optarg', set the
|
||||
option's `flag' field to zero and its `val' field to a nonzero
|
||||
value (the equivalent single-letter option character, if there is
|
||||
one). For long options that have a zero `flag' field, `getopt'
|
||||
returns the contents of the `val' field. */
|
||||
|
||||
struct option
|
||||
{
|
||||
#if __STDC__
|
||||
const char *name;
|
||||
#else
|
||||
char *name;
|
||||
#endif
|
||||
/* has_arg can't be an enum because some compilers complain about
|
||||
type mismatches in all the code that assumes it is an int. */
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
/* Names for the values of the `has_arg' field of `struct option'. */
|
||||
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
#define optional_argument 2
|
||||
|
||||
#if __STDC__
|
||||
#if defined(__GNU_LIBRARY__)
|
||||
/* Many other libraries have conflicting prototypes for getopt, with
|
||||
differences in the consts, in stdlib.h. To avoid compilation
|
||||
errors, only prototype getopt for the GNU C library. */
|
||||
extern int getopt (int argc, char *const *argv, const char *shortopts);
|
||||
#else /* not __GNU_LIBRARY__ */
|
||||
extern int getopt ();
|
||||
#endif /* not __GNU_LIBRARY__ */
|
||||
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
|
||||
const struct option *longopts, int *longind);
|
||||
extern int getopt_long_only (int argc, char *const *argv,
|
||||
const char *shortopts,
|
||||
const struct option *longopts, int *longind);
|
||||
|
||||
/* Internal only. Users should not call this directly. */
|
||||
extern int _getopt_internal (int argc, char *const *argv,
|
||||
const char *shortopts,
|
||||
const struct option *longopts, int *longind,
|
||||
int long_only);
|
||||
#else /* not __STDC__ */
|
||||
extern int getopt ();
|
||||
extern int getopt_long ();
|
||||
extern int getopt_long_only ();
|
||||
|
||||
extern int _getopt_internal ();
|
||||
#endif /* not __STDC__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GETOPT_H */
|
||||
176
libmisc/getopt1.c
Normal file
176
libmisc/getopt1.c
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||
Copyright (C) 1987, 88, 89, 90, 91, 92, 1993
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
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, 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, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#if !__STDC__ && !defined(const) && IN_GCC
|
||||
#define const
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||
actually compiling the library itself. This code is part of the GNU C
|
||||
Library, but also included in many other GNU distributions. Compiling
|
||||
and linking in this code is a waste when using the GNU C library
|
||||
(especially if it is a shared library). Rather than having every GNU
|
||||
program understand `configure --with-gnu-libc' and omit the object files,
|
||||
it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#if defined (_LIBC) || !defined (__GNU_LIBRARY__)
|
||||
|
||||
|
||||
/* This needs to come after some library #include
|
||||
to get __GNU_LIBRARY__ defined. */
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
char *getenv ();
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
int
|
||||
getopt_long (argc, argv, options, long_options, opt_index)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *options;
|
||||
const struct option *long_options;
|
||||
int *opt_index;
|
||||
{
|
||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
||||
}
|
||||
|
||||
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
|
||||
If an option that starts with '-' (not '--') doesn't match a long option,
|
||||
but does match a short option, it is parsed as a short option
|
||||
instead. */
|
||||
|
||||
int
|
||||
getopt_long_only (argc, argv, options, long_options, opt_index)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *options;
|
||||
const struct option *long_options;
|
||||
int *opt_index;
|
||||
{
|
||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
||||
}
|
||||
|
||||
|
||||
#endif /* _LIBC or not __GNU_LIBRARY__. */
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
int c;
|
||||
int digit_optind = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
int this_option_optind = optind ? optind : 1;
|
||||
int option_index = 0;
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{"add", 1, 0, 0},
|
||||
{"append", 0, 0, 0},
|
||||
{"delete", 1, 0, 0},
|
||||
{"verbose", 0, 0, 0},
|
||||
{"create", 0, 0, 0},
|
||||
{"file", 1, 0, 0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
c = getopt_long (argc, argv, "abc:d:0123456789",
|
||||
long_options, &option_index);
|
||||
if (c == EOF)
|
||||
break;
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case 0:
|
||||
printf ("option %s", long_options[option_index].name);
|
||||
if (optarg)
|
||||
printf (" with arg %s", optarg);
|
||||
printf ("\n");
|
||||
break;
|
||||
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
printf ("digits occur in two different argv-elements.\n");
|
||||
digit_optind = this_option_optind;
|
||||
printf ("option %c\n", c);
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
printf ("option a\n");
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
printf ("option b\n");
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
printf ("option c with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
printf ("option d with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case '?':
|
||||
break;
|
||||
|
||||
default:
|
||||
printf ("?? getopt returned character code 0%o ??\n", c);
|
||||
}
|
||||
}
|
||||
|
||||
if (optind < argc)
|
||||
{
|
||||
printf ("non-option ARGV-elements: ");
|
||||
while (optind < argc)
|
||||
printf ("%s ", argv[optind++]);
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
#endif /* TEST */
|
||||
44
libmisc/hamming.c
Normal file
44
libmisc/hamming.c
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* hamming.c -- Hamming Window.
|
||||
*
|
||||
* Copyright (C) 1999-2000, 2003
|
||||
* Thomas Sailer (t.sailer@alumni.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#include "raisedcosine.h"
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
double hamming(double x)
|
||||
{
|
||||
return 0.54-0.46*cos(2*M_PI*x);
|
||||
}
|
||||
83
libmisc/openpty.c
Normal file
83
libmisc/openpty.c
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* openpty.c -- openpty.
|
||||
*
|
||||
* From glibc2, Copyright (C) Free Software Foundation
|
||||
* Modified by Thomas Sailer, sailer@ife.ee.ethz.ch
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifndef HAVE_OPENPTY
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <termios.h>
|
||||
#include <fcntl.h>
|
||||
#include <grp.h>
|
||||
#include <errno.h>
|
||||
|
||||
int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp)
|
||||
{
|
||||
char line[11];
|
||||
const char *cp1, *cp2;
|
||||
int master, slave, ttygid;
|
||||
struct group *gr;
|
||||
|
||||
strcpy (line, "/dev/ptyXX");
|
||||
if (gr = getgrnam("tty"))
|
||||
ttygid = gr->gr_gid;
|
||||
else
|
||||
ttygid = -1;
|
||||
for (cp1 = "pqrs"; *cp1; cp1++) {
|
||||
line[8] = *cp1;
|
||||
for (cp2 = "0123456789abcdef"; *cp2; cp2++) {
|
||||
line[9] = *cp2;
|
||||
if ((master = open(line, O_RDWR, 0)) == -1) {
|
||||
if (errno == ENOENT)
|
||||
return (-1); /* out of ptys */
|
||||
} else {
|
||||
line[5] = 't';
|
||||
(void)chown(line, getuid(), ttygid);
|
||||
(void)chmod(line, S_IRUSR|S_IWUSR|S_IWGRP);
|
||||
#ifdef HAVE_REVOKE
|
||||
revoke(line);
|
||||
#endif
|
||||
if ((slave = open(line, O_RDWR, 0)) != -1) {
|
||||
*amaster = master;
|
||||
*aslave = slave;
|
||||
if (name)
|
||||
strcpy(name, line);
|
||||
if (termp)
|
||||
(void)tcsetattr(slave, TCSAFLUSH, termp);
|
||||
if (winp)
|
||||
(void)ioctl(slave, TIOCSWINSZ, (char *)winp);
|
||||
return 0;
|
||||
}
|
||||
(void)close(master);
|
||||
line[5] = 'p';
|
||||
}
|
||||
}
|
||||
}
|
||||
errno = ENOENT; /* out of ptys */
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* HAVE_OPENPTY */
|
||||
53
libmisc/raisedcosine.h
Normal file
53
libmisc/raisedcosine.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
/*
|
||||
* raisedcosine.h -- Raised Cosine Functions.
|
||||
*
|
||||
* Copyright (C) 2002
|
||||
* Thomas Sailer (t.sailer@alumni.ethz.ch)
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifndef _RAISEDCOSINE_H
|
||||
#define _RAISEDCOSINE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
||||
extern double sinc(double x);
|
||||
extern double hamming(double x);
|
||||
extern double raised_cosine_time(double time, double alpha);
|
||||
extern double raised_cosine_freq(double freq, double alpha);
|
||||
extern double root_raised_cosine_time(double time, double alpha);
|
||||
extern double root_raised_cosine_freq(double freq, double alpha);
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _RAISEDCOSINE_H */
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue