[hamradio-commits] [gsmc] 01/07: Imported Upstream version 1.1
Iain Learmonth
irl-guest at moszumanska.debian.org
Tue Aug 11 14:14:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
irl-guest pushed a commit to branch master
in repository gsmc.
commit 34c7b77be0c966702a2186c8477e26bc1106f8aa
Author: Iain R. Learmonth <irl at fsfe.org>
Date: Tue Aug 11 12:48:52 2015 +0100
Imported Upstream version 1.1
---
AUTHORS | 13 +
COPYING | 340 ++++
ChangeLog | 1 +
INSTALL | 182 ++
Makefile.am | 9 +
Makefile.in | 422 +++++
NEWS | 6 +
README | 26 +
TODO | 6 +
aclocal.m4 | 551 ++++++
autom4te.cache/output.0 | 4586 +++++++++++++++++++++++++++++++++++++++++++++++
autom4te.cache/requests | 111 ++
autom4te.cache/traces.0 | 148 ++
autotune.c | 106 ++
autotune.h | 26 +
calc.c | 253 +++
calc.h | 35 +
configure | 4586 +++++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 41 +
dataconv.c | 143 ++
dataconv.h | 27 +
depcomp | 411 +++++
draw.c | 625 +++++++
draw.h | 35 +
example1.eps | 232 +++
example1.gdt | 10 +
example2.gdt | 12 +
example2.ps | 171 ++
example3.gdt | 20 +
gsmc.1.in | 375 ++++
gtkrc | 9 +
install-sh | 1 +
main.c | 488 +++++
main.h | 115 ++
missing | 1 +
mkinstalldirs | 1 +
print.c | 579 ++++++
print.h | 35 +
widget.c | 1682 +++++++++++++++++
widget.h | 97 +
40 files changed, 16517 insertions(+)
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..81baad1
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,13 @@
+gsmc has been developed by
+
+- Lapo Pieri
+ via A. dei Corbizi, 9
+ I-50127 FIRENZE (ITALY)
+
+ Phone +39 055 410209
+ ik5nax at amsat.org
+ lapo_pieri at virgilio.it
+
+
+- Johannes van der Horst
+ jvdhorst at cs.sun.ac.za
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..60549be
--- /dev/null
+++ b/COPYING
@@ -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) 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., 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) 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.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..c3b0556
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1 @@
+ First released version --> gsmc 1.0
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..b42a17a
--- /dev/null
+++ b/INSTALL
@@ -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.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..0881339
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,9 @@
+## Process this file with automake to produce Makefile.in
+
+bin_PROGRAMS=gsmc
+gsmc_SOURCES= autotune.c calc.c dataconv.c draw.c main.c print.c widget.c autotune.h calc.h dataconv.h draw.h main.h print.h widget.h
+INCLUDES=@PACKAGE_CFLAGS@
+LIBS=@PACKAGE_LIBS@
+
+EXTRA_DIST=gsmc.1.in gtkrc TODO
+man_MANS=gsmc.1
\ No newline at end of file
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..ef9e678
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,422 @@
+# Makefile.in generated automatically by automake 1.5 from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# 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.
+
+ at SET_MAKE@
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+DEPDIR = @DEPDIR@
+EXEEXT = @EXEEXT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PKG_CONFIG = @PKG_CONFIG@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+bin_PROGRAMS = gsmc
+gsmc_SOURCES = autotune.c calc.c dataconv.c draw.c main.c print.c widget.c autotune.h calc.h dataconv.h draw.h main.h print.h widget.h
+INCLUDES = @PACKAGE_CFLAGS@
+LIBS = @PACKAGE_LIBS@
+
+EXTRA_DIST = gsmc.1.in gtkrc TODO
+man_MANS = gsmc.1
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_CLEAN_FILES = gsmc.1
+bin_PROGRAMS = gsmc$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_gsmc_OBJECTS = autotune.$(OBJEXT) calc.$(OBJEXT) dataconv.$(OBJEXT) \
+ draw.$(OBJEXT) main.$(OBJEXT) print.$(OBJEXT) widget.$(OBJEXT)
+gsmc_OBJECTS = $(am_gsmc_OBJECTS)
+gsmc_LDADD = $(LDADD)
+gsmc_DEPENDENCIES =
+gsmc_LDFLAGS =
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I. -I$(srcdir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+ at AMDEP_TRUE@DEP_FILES = $(DEPDIR)/autotune.Po $(DEPDIR)/calc.Po \
+ at AMDEP_TRUE@ $(DEPDIR)/dataconv.Po $(DEPDIR)/draw.Po \
+ at AMDEP_TRUE@ $(DEPDIR)/main.Po $(DEPDIR)/print.Po \
+ at AMDEP_TRUE@ $(DEPDIR)/widget.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+DIST_SOURCES = $(gsmc_SOURCES)
+
+NROFF = nroff
+MANS = $(man_MANS)
+DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
+ Makefile.in NEWS TODO aclocal.m4 configure configure.ac depcomp \
+ gsmc.1.in install-sh missing mkinstalldirs
+SOURCES = $(gsmc_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$@ $(SHELL) ./config.status
+
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4): configure.ac
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+gsmc.1: $(top_builddir)/config.status gsmc.1.in
+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ ; then \
+ f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
+
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+gsmc$(EXEEXT): $(gsmc_OBJECTS) $(gsmc_DEPENDENCIES)
+ @rm -f gsmc$(EXEEXT)
+ $(LINK) $(gsmc_LDFLAGS) $(gsmc_OBJECTS) $(gsmc_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/autotune.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/calc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/dataconv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/draw.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/print.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/widget.Po at am__quote@
+
+distclean-depend:
+ -rm -rf $(DEPDIR)
+
+.c.o:
+ at AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$<
+
+.c.obj:
+ at AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c `cygpath -w $<`
+CCDEPMODE = @CCDEPMODE@
+uninstall-info-am:
+
+man1dir = $(mandir)/man1
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(man1dir)
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ done
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+ for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique $(LISP)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(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; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+ || etags $(ETAGS_ARGS) $$tags $$unique $(LISP)
+
+GTAGS:
+ here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+# Avoid unsightly `./'.
+distdir = $(PACKAGE)-$(VERSION)
+
+GZIP_ENV = --best
+
+distdir: $(DISTFILES)
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+ mkdir $(distdir)
+ $(mkinstalldirs) $(distdir)/.
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ $(mkinstalldirs) "$(distdir)/$$dir"; \
+ fi; \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(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
+ -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ chmod a-w $(distdir)
+ dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
+ && cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+ || (echo "Error: files left after uninstall" 1>&2; \
+ exit 1) ) \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && $(MAKE) $(AM_MAKEFLAGS) distclean \
+ && rm -f $(distdir).tar.gz \
+ && (test `find . -type f -print | wc -l` -eq 0 \
+ || (echo "Error: files left after distclean" 1>&2; \
+ exit 1) )
+ -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=/g;p;x;p;x'
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS)
+
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
+
+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)" \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
+
+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
+
+dist-all: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+distclean: distclean-am
+ -rm -f config.status config.cache config.log
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man: install-man1
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
+
+uninstall-man: uninstall-man1
+
+.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic dist dist-all distcheck distclean \
+ distclean-compile distclean-depend distclean-generic \
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-binPROGRAMS install-data install-data-am \
+ install-exec install-exec-am install-info install-info-am \
+ install-man install-man1 install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic tags uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-info-am uninstall-man \
+ uninstall-man1
+
+# 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:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..c0f620e
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,6 @@
+20030901:
+ gsmc 1.0 -- First released version (based on xsmc v1.0)
+20040728:
+ gsmc 1.1 -- Postscript print added (mainly by JVDH), save and load
+ jobs, autotune (very primitive), frequency adj
+
diff --git a/README b/README
new file mode 100644
index 0000000..ffbe166
--- /dev/null
+++ b/README
@@ -0,0 +1,26 @@
+ gsmc
+ ====
+
+ A GTK Smith Chart Calulator for RF impedance matching
+
+gsmc is a simple smith chart calculator used for automatic calculation in
+radio frequency impedance matching.
+Many good program for doing this job are available for non free OS or are non
+free themself; so getting what I retain the best characteristic from each of
+thes that I've seen in the past I decided to write one and release it under
+GNU/GPL license.
+
+Program is under development: help is needed and welcomed; in my hope it
+will be the first part of a suite of rf designing tool all to be released
+under GPL. Write me if you are interested; my experience in write software
+is limitated, neither I have knolwedge in building up large and distributed
+software project.
+
+Prior to gsmc I wrote xsmc a very similar program that run under X and use
+direct Xlib call, his aspect is not particular user friendly.
+
+For using gsmc reading the manual (man gsmc) should be enough...
+
+Have nice matching!
+
+Lapo Pieri (IK5NAX)
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..8e4c776
--- /dev/null
+++ b/TODO
@@ -0,0 +1,6 @@
+- transmission line specified in meter and with attenuation
+- improve autotune
+
+Patchs and mods are welcome!
+
+Lapo
\ No newline at end of file
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..9b743aa
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,551 @@
+# aclocal.m4 generated automatically by aclocal 1.5
+
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# 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.
+
+# 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.
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 5
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# We require 2.13 because we rely on SHELL being computed by configure.
+AC_PREREQ([2.13])
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
+# The purpose of this macro is to provide the user with a means to
+# check macros which are provided without letting her know how the
+# information is coded.
+# If this macro is not defined by Autoconf, define it here.
+ifdef([AC_PROVIDE_IFELSE],
+ [],
+ [define([AC_PROVIDE_IFELSE],
+ [ifdef([AC_PROVIDE_$1],
+ [$2], [$3])])])
+
+
+# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
+# ----------------------------------------------
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
+fi
+
+# Define the identity of the package.
+PACKAGE=$1
+AC_SUBST(PACKAGE)dnl
+VERSION=$2
+AC_SUBST(VERSION)dnl
+ifelse([$3],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+ifdef([m4_pattern_allow],
+ [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
+
+# Autoconf 2.50 always computes EXEEXT. However we need to be
+# compatible with 2.13, for now. So we always define EXEEXT, but we
+# don't compute it.
+AC_SUBST(EXEEXT)
+# Similar for OBJEXT -- only we only use OBJEXT if the user actually
+# requests that it be used. This is a bit dumb.
+: ${OBJEXT=o}
+AC_SUBST(OBJEXT)
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal)
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake)
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_PROVIDE_IFELSE([AC_PROG_][CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_][CC],
+ defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_][CXX],
+ defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+
+# serial 2
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ am_backtick='`'
+ AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# serial 4 -*- Autoconf -*-
+
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ---------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX" or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
+ echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=conftest.c object=conftest.o \
+ depfile=conftest.Po tmpdepfile=conftest.TPo \
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
+AC_SUBST([$1DEPMODE])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+ DEPDIR=.deps
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+AC_SUBST(DEPDIR)
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+pushdef([subst], defn([AC_SUBST]))
+subst(AMDEPBACKSLASH)
+popdef([subst])
+])
+
+# Generate code to set up dependency tracking.
+# This macro should only be invoked once -- use via AC_REQUIRE.
+# Usage:
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
+AC_OUTPUT_COMMANDS([
+test x"$AMDEP_TRUE" != x"" ||
+for mf in $CONFIG_FILES; do
+ case "$mf" in
+ Makefile) dirpart=.;;
+ */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+ *) continue;;
+ esac
+ grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
+ $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+], [AMDEP_TRUE="$AMDEP_TRUE"
+ac_aux_dir="$ac_aux_dir"])])
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+ @echo done
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include='#'
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote='"'
+ _am_result=BSD
+ fi
+fi
+AC_SUBST(am__include)
+AC_SUBST(am__quote)
+AC_MSG_RESULT($_am_result)
+rm -f confinc confmf
+])
+
+# serial 3
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+#
+# FIXME: Once using 2.50, use this:
+# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],
+ [errprint(__file__:__line__: [$0: invalid condition: $1
+])dnl
+m4exit(1)])dnl
+ifelse([$1], [FALSE],
+ [errprint(__file__:__line__: [$0: invalid condition: $1
+])dnl
+m4exit(1)])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
+
+dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
+dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
+dnl also defines GSTUFF_PKG_ERRORS on error
+AC_DEFUN(PKG_CHECK_MODULES, [
+ succeeded=no
+
+ if test -z "$PKG_CONFIG"; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ fi
+
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** The pkg-config script could not be found. Make sure it is"
+ echo "*** in your path, or set the PKG_CONFIG environment variable"
+ echo "*** to the full path to pkg-config."
+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+ else
+ PKG_CONFIG_MIN_VERSION=0.9.0
+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+ AC_MSG_CHECKING(for $2)
+
+ if $PKG_CONFIG --exists "$2" ; then
+ AC_MSG_RESULT(yes)
+ succeeded=yes
+
+ AC_MSG_CHECKING($1_CFLAGS)
+ $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
+ AC_MSG_RESULT($$1_CFLAGS)
+
+ AC_MSG_CHECKING($1_LIBS)
+ $1_LIBS=`$PKG_CONFIG --libs "$2"`
+ AC_MSG_RESULT($$1_LIBS)
+ else
+ $1_CFLAGS=""
+ $1_LIBS=""
+ ## If we have a custom action on failure, don't print errors, but
+ ## do set a variable so people can do so.
+ $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ ifelse([$4], ,echo $$1_PKG_ERRORS,)
+ fi
+
+ AC_SUBST($1_CFLAGS)
+ AC_SUBST($1_LIBS)
+ else
+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig"
+ fi
+ fi
+
+ if test $succeeded = yes; then
+ ifelse([$3], , :, [$3])
+ else
+ ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
+ fi
+])
+
+
+
diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0
new file mode 100644
index 0000000..1d8b415
--- /dev/null
+++ b/autom4te.cache/output.0
@@ -0,0 +1,4586 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.57 for gsmc 1.0.
+@%:@
+@%:@ Report bugs to <ik5nax at amsat.org>.
+@%:@
+@%:@ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+@%:@ Free Software Foundation, Inc.
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='gsmc'
+PACKAGE_TARNAME='gsmc'
+PACKAGE_VERSION='1.0'
+PACKAGE_STRING='gsmc 1.0'
+PACKAGE_BUGREPORT='ik5nax at amsat.org'
+
+ac_unique_file="calc.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION EXEEXT OBJEXT ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh INSTALL_STR [...]
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures gsmc 1.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of gsmc 1.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <ik5nax at amsat.org>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+gsmc configure 1.0
+generated by GNU Autoconf 2.57
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by gsmc $as_me 1.0, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+@%:@@%:@ --------- @%:@@%:@
+@%:@@%:@ Platform. @%:@@%:@
+@%:@@%:@ --------- @%:@@%:@
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ Core tests. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ---------------- @%:@@%:@
+@%:@@%:@ Cache variables. @%:@@%:@
+@%:@@%:@ ---------------- @%:@@%:@
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+@%:@@%:@ ----------------- @%:@@%:@
+@%:@@%:@ Output variables. @%:@@%:@
+@%:@@%:@ ----------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+@%:@@%:@ ------------- @%:@@%:@
+@%:@@%:@ Output files. @%:@@%:@
+@%:@@%:@ ------------- @%:@@%:@
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+@%:@@%:@ ----------- @%:@@%:@
+@%:@@%:@ confdefs.h. @%:@@%:@
+@%:@@%:@ ----------- @%:@@%:@
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ am_backtick='`'
+ { echo "$as_me:$LINENO: WARNING: ${am_backtick}missing' script is too old or missing" >&5
+echo "$as_me: WARNING: ${am_backtick}missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+
+rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+ DEPDIR=.deps
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+
+
+# test to see if srcdir already configured
+if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Define the identity of the package.
+PACKAGE=gsmc
+VERSION=1.0
+
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+
+# Autoconf 2.50 always computes EXEEXT. However we need to be
+# compatible with 2.13, for now. So we always define EXEEXT, but we
+# don't compute it.
+
+# Similar for OBJEXT -- only we only use OBJEXT if the user actually
+# requests that it be used. This is a bit dumb.
+: ${OBJEXT=o}
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $@%:@ != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+@%:@ifndef __cplusplus
+ choke me
+@%:@endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+@%:@include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_config_commands="$ac_config_commands default-1"
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+ @echo done
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include='#'
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote='"'
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
+ echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=conftest.c object=conftest.o \
+ depfile=conftest.Po tmpdepfile=conftest.TPo \
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"
+
+
+pkg_modules="gtk+-2.0"
+
+ succeeded=no
+
+ if test -z "$PKG_CONFIG"; then
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+ echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ fi
+
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** The pkg-config script could not be found. Make sure it is"
+ echo "*** in your path, or set the PKG_CONFIG environment variable"
+ echo "*** to the full path to pkg-config."
+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+ else
+ PKG_CONFIG_MIN_VERSION=0.9.0
+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+ echo "$as_me:$LINENO: checking for $pkg_modules" >&5
+echo $ECHO_N "checking for $pkg_modules... $ECHO_C" >&6
+
+ if $PKG_CONFIG --exists "$pkg_modules" ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ succeeded=yes
+
+ echo "$as_me:$LINENO: checking PACKAGE_CFLAGS" >&5
+echo $ECHO_N "checking PACKAGE_CFLAGS... $ECHO_C" >&6
+ PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules"`
+ echo "$as_me:$LINENO: result: $PACKAGE_CFLAGS" >&5
+echo "${ECHO_T}$PACKAGE_CFLAGS" >&6
+
+ echo "$as_me:$LINENO: checking PACKAGE_LIBS" >&5
+echo $ECHO_N "checking PACKAGE_LIBS... $ECHO_C" >&6
+ PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules"`
+ echo "$as_me:$LINENO: result: $PACKAGE_LIBS" >&5
+echo "${ECHO_T}$PACKAGE_LIBS" >&6
+ else
+ PACKAGE_CFLAGS=""
+ PACKAGE_LIBS=""
+ ## If we have a custom action on failure, don't print errors, but
+ ## do set a variable so people can do so.
+ PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"`
+ echo $PACKAGE_PKG_ERRORS
+ fi
+
+
+
+ else
+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig"
+ fi
+ fi
+
+ if test $succeeded = yes; then
+ :
+ else
+ { { echo "$as_me:$LINENO: error: Library requirements ($pkg_modules) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements ($pkg_modules) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+
+
+
+# Checks for libraries.
+LIBS=" "
+PKG_LIB2=`pkg-config --libs gtk+-2.0`
+PKG_LIB=""
+for i in $PKG_LIB2 ; do
+ case $i in
+ -l*) PKG_LIB="$i $PKG_LIB" ;;
+ -L*) LIBS="$i $LIBS" ;;
+ esac
+done
+for i in $PKG_LIB ; do
+ j=${i#'-l'}
+
+
+as_ac_Lib=`echo "ac_cv_lib_$j''_main" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for main in -l$j" >&5
+echo $ECHO_N "checking for main in -l$j... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$j $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_LIB$j" | $as_tr_cpp` 1
+_ACEOF
+
+ LIBS="-l$j $LIBS"
+
+fi
+
+done
+
+# Checks for header files.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+for ac_header in fcntl.h string.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+@%:@include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+@%:@include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to bug-autoconf at gnu.org. @%:@@%:@
+@%:@@%:@ ------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+@%:@@%:@ ------------------------------------ @%:@@%:@
+@%:@@%:@ Report this to bug-autoconf at gnu.org. @%:@@%:@
+@%:@@%:@ ------------------------------------ @%:@@%:@
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+@%:@define const
+_ACEOF
+
+fi
+
+
+# Checks for library functions.
+
+for ac_func in sqrt
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ ac_config_files="$ac_config_files Makefile gsmc.1"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t at OBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIB@&t at OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by gsmc $as_me 1.0, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+gsmc config.status 1.0
+configured by $0, generated by GNU Autoconf 2.57,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE"
+ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "gsmc.1" ) CONFIG_FILES="$CONFIG_FILES gsmc.1" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at PACKAGE@,$PACKAGE,;t t
+s, at VERSION@,$VERSION,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at ACLOCAL@,$ACLOCAL,;t t
+s, at AUTOCONF@,$AUTOCONF,;t t
+s, at AUTOMAKE@,$AUTOMAKE,;t t
+s, at AUTOHEADER@,$AUTOHEADER,;t t
+s, at MAKEINFO@,$MAKEINFO,;t t
+s, at AMTAR@,$AMTAR,;t t
+s, at install_sh@,$install_sh,;t t
+s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s, at AWK@,$AWK,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s, at DEPDIR@,$DEPDIR,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at am__include@,$am__include,;t t
+s, at am__quote@,$am__quote,;t t
+s, at CCDEPMODE@,$CCDEPMODE,;t t
+s, at PKG_CONFIG@,$PKG_CONFIG,;t t
+s, at PACKAGE_CFLAGS@,$PACKAGE_CFLAGS,;t t
+s, at PACKAGE_LIBS@,$PACKAGE_LIBS,;t t
+s, at CPP@,$CPP,;t t
+s, at EGREP@,$EGREP,;t t
+s, at LIB@&t at OBJS@,$LIB@&t at OBJS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ default-1 )
+test x"$AMDEP_TRUE" != x"" ||
+for mf in $CONFIG_FILES; do
+ case "$mf" in
+ Makefile) dirpart=.;;
+ */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+ *) continue;;
+ esac
+ grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
+ $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
diff --git a/autom4te.cache/requests b/autom4te.cache/requests
new file mode 100644
index 0000000..62415c1
--- /dev/null
+++ b/autom4te.cache/requests
@@ -0,0 +1,111 @@
+# This file was created by autom4te.
+# It contains the lists of macros which have been traced.
+# It can be safely removed.
+
+ at request = (
+ bless( [
+ '0',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ 'aclocal.m4',
+ 'configure.ac'
+ ],
+ {
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'AC_HEADER_STAT' => 1,
+ 'AC_FUNC_STRFTIME' => 1,
+ 'AC_PROG_RANLIB' => 1,
+ 'AC_C_VOLATILE' => 1,
+ 'AC_FUNC_WAIT3' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'AC_REPLACE_FNMATCH' => 1,
+ 'AC_FUNC_SETPGRP' => 1,
+ 'AC_HEADER_TIME' => 1,
+ 'AC_FUNC_SETVBUF_REVERSED' => 1,
+ 'AC_HEADER_SYS_WAIT' => 1,
+ 'AC_TYPE_UID_T' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AC_CHECK_LIB' => 1,
+ 'AC_PROG_LN_S' => 1,
+ 'AC_FUNC_MEMCMP' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AC_FUNC_FORK' => 1,
+ 'AC_FUNC_GETGROUPS' => 1,
+ 'AC_HEADER_MAJOR' => 1,
+ 'AC_FUNC_STRNLEN' => 1,
+ 'AC_FUNC_STRTOD' => 1,
+ 'AC_HEADER_DIRENT' => 1,
+ 'AC_FUNC_UTIME_NULL' => 1,
+ 'AC_FUNC_MBRTOWC' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'AC_FUNC_ALLOCA' => 1,
+ 'AC_C_CONST' => 1,
+ 'AC_CHECK_MEMBERS' => 1,
+ 'AC_FUNC_REALLOC' => 1,
+ 'AC_FUNC_OBSTACK' => 1,
+ 'include' => 1,
+ 'AC_FUNC_LSTAT' => 1,
+ 'AC_STRUCT_TIMEZONE' => 1,
+ 'AC_FUNC_GETPGRP' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ 'AC_CHECK_HEADERS' => 1,
+ 'AC_CHECK_TYPES' => 1,
+ 'AC_TYPE_MODE_T' => 1,
+ 'AC_PROG_YACC' => 1,
+ 'AC_TYPE_PID_T' => 1,
+ 'AC_FUNC_STRERROR_R' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AC_STRUCT_ST_BLOCKS' => 1,
+ 'AC_FUNC_SELECT_ARGTYPES' => 1,
+ 'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
+ 'AC_PROG_GCC_TRADITIONAL' => 1,
+ 'AC_TYPE_SIGNAL' => 1,
+ 'AC_PROG_CPP' => 1,
+ 'AC_FUNC_STAT' => 1,
+ 'AC_PROG_INSTALL' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ 'AC_FUNC_STRCOLL' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AC_C_INLINE' => 1,
+ 'AC_FUNC_GETMNTENT' => 1,
+ 'AC_FUNC_CHOWN' => 1,
+ 'AC_PROG_LEX' => 1,
+ 'AC_INIT' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_HEADER_STDC' => 1,
+ 'AC_FUNC_GETLOADAVG' => 1,
+ 'AC_CHECK_FUNCS' => 1,
+ 'AC_TYPE_SIZE_T' => 1,
+ 'AC_FUNC_MKTIME' => 1,
+ 'AC_DECL_SYS_SIGLIST' => 1,
+ 'AC_PROG_MAKE_SET' => 1,
+ 'AC_PROG_CXX' => 1,
+ 'AC_CANONICAL_HOST' => 1,
+ 'AC_FUNC_CLOSEDIR_VOID' => 1,
+ 'm4_pattern_allow' => 1,
+ 'm4_include' => 1,
+ 'AC_PROG_AWK' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AC_FUNC_VPRINTF' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AC_TYPE_OFF_T' => 1,
+ 'AC_PATH_X' => 1,
+ 'AC_FUNC_MALLOC' => 1,
+ 'AC_FUNC_ERROR_AT_LINE' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'AC_FUNC_FSEEKO' => 1,
+ 'AC_STRUCT_TM' => 1,
+ 'AC_FUNC_MMAP' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'AC_SUBST' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AC_PROG_CC' => 1
+ }
+ ], 'Request' )
+ );
+
diff --git a/autom4te.cache/traces.0 b/autom4te.cache/traces.0
new file mode 100644
index 0000000..8ecc56c
--- /dev/null
+++ b/autom4te.cache/traces.0
@@ -0,0 +1,148 @@
+m4trace:configure.ac:5: -1- AC_INIT([gsmc], [1.0], [ik5nax at amsat.org])
+m4trace:configure.ac:5: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:5: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:5: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:5: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:5: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
+m4trace:configure.ac:5: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
+m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
+m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
+m4trace:configure.ac:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.ac:5: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.ac:5: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.ac:5: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.ac:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.ac:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.ac:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.ac:5: -1- AC_SUBST([datadir], ['${prefix}/share'])
+m4trace:configure.ac:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.ac:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.ac:5: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.ac:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.ac:5: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.ac:5: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.ac:5: -1- AC_SUBST([infodir], ['${prefix}/info'])
+m4trace:configure.ac:5: -1- AC_SUBST([mandir], ['${prefix}/man'])
+m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+#undef PACKAGE_NAME])
+m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME])
+m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+#undef PACKAGE_VERSION])
+m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING])
+m4trace:configure.ac:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.ac:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT])
+m4trace:configure.ac:5: -1- AC_SUBST([build_alias])
+m4trace:configure.ac:5: -1- AC_SUBST([host_alias])
+m4trace:configure.ac:5: -1- AC_SUBST([target_alias])
+m4trace:configure.ac:5: -1- AC_SUBST([DEFS])
+m4trace:configure.ac:5: -1- AC_SUBST([ECHO_C])
+m4trace:configure.ac:5: -1- AC_SUBST([ECHO_N])
+m4trace:configure.ac:5: -1- AC_SUBST([ECHO_T])
+m4trace:configure.ac:5: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:7: -1- AM_INIT_AUTOMAKE([gsmc], [1.0], [ik5nax at amsat.org])
+m4trace:configure.ac:7: -1- AC_PROG_INSTALL
+m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.ac:7: -1- AC_SUBST([PACKAGE])
+m4trace:configure.ac:7: -1- AC_SUBST([VERSION])
+m4trace:configure.ac:7: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS])
+m4trace:configure.ac:7: -1- AC_SUBST([EXEEXT])
+m4trace:configure.ac:7: -1- AC_SUBST([OBJEXT])
+m4trace:configure.ac:7: -1- AC_SUBST([ACLOCAL])
+m4trace:configure.ac:7: -1- AC_SUBST([AUTOCONF])
+m4trace:configure.ac:7: -1- AC_SUBST([AUTOMAKE])
+m4trace:configure.ac:7: -1- AC_SUBST([AUTOHEADER])
+m4trace:configure.ac:7: -1- AC_SUBST([MAKEINFO])
+m4trace:configure.ac:7: -1- AC_SUBST([AMTAR])
+m4trace:configure.ac:7: -1- AC_SUBST([install_sh])
+m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
+m4trace:configure.ac:7: -1- AC_PROG_AWK
+m4trace:configure.ac:7: -1- AC_SUBST([AWK])
+m4trace:configure.ac:7: -1- AC_PROG_MAKE_SET
+m4trace:configure.ac:7: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.ac:7: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+m4trace:configure.ac:7: -1- AC_SUBST([AMDEP_TRUE])
+m4trace:configure.ac:7: -1- AC_SUBST([AMDEP_FALSE])
+m4trace:configure.ac:7: -1- AC_SUBST([DEPDIR])
+m4trace:configure.ac:10: -1- AC_PROG_CC
+m4trace:configure.ac:10: -1- AC_SUBST([CC])
+m4trace:configure.ac:10: -1- AC_SUBST([CFLAGS])
+m4trace:configure.ac:10: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.ac:10: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:10: -1- AC_SUBST([CC])
+m4trace:configure.ac:10: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.ac:10: -1- AC_SUBST([CC])
+m4trace:configure.ac:10: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.ac:10: -1- AC_SUBST([CC])
+m4trace:configure.ac:10: -1- AC_SUBST([CC])
+m4trace:configure.ac:10: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.ac:10: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
+m4trace:configure.ac:10: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
+m4trace:configure.ac:10: -1- AC_SUBST([am__include])
+m4trace:configure.ac:10: -1- AC_SUBST([am__quote])
+m4trace:configure.ac:10: -1- AC_SUBST([CCDEPMODE])
+m4trace:configure.ac:12: -1- AC_SUBST([PKG_CONFIG], [$ac_cv_path_PKG_CONFIG])
+m4trace:configure.ac:12: -1- AC_SUBST([PACKAGE_CFLAGS])
+m4trace:configure.ac:12: -1- AC_SUBST([PACKAGE_LIBS])
+m4trace:configure.ac:13: -1- AC_SUBST([PACKAGE_CFLAGS])
+m4trace:configure.ac:14: -1- AC_SUBST([PACKAGE_LIBS])
+m4trace:configure.ac:28: -1- AC_CHECK_LIB([$j], [main])
+m4trace:configure.ac:32: -1- AC_HEADER_STDC
+m4trace:configure.ac:32: -1- AC_PROG_CPP
+m4trace:configure.ac:32: -1- AC_SUBST([CPP])
+m4trace:configure.ac:32: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:32: -1- AC_SUBST([CPP])
+m4trace:configure.ac:32: -1- AC_SUBST([EGREP])
+m4trace:configure.ac:32: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
+m4trace:configure.ac:32: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS])
+m4trace:configure.ac:33: -1- AC_CHECK_HEADERS([fcntl.h string.h unistd.h])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H])
+m4trace:configure.ac:33: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H])
+m4trace:configure.ac:33: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H])
+m4trace:configure.ac:36: -1- AC_C_CONST
+m4trace:configure.ac:36: -1- AC_DEFINE_TRACE_LITERAL([const])
+m4trace:configure.ac:36: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */
+#undef const])
+m4trace:configure.ac:39: -1- AC_CHECK_FUNCS([sqrt])
+m4trace:configure.ac:39: -1- AH_OUTPUT([HAVE_SQRT], [/* Define to 1 if you have the `sqrt\' function. */
+#undef HAVE_SQRT])
+m4trace:configure.ac:40: -1- AC_CONFIG_FILES([Makefile gsmc.1])
+m4trace:configure.ac:40: -1- AC_SUBST([LIB@&t at OBJS], [$ac_libobjs])
+m4trace:configure.ac:40: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
diff --git a/autotune.c b/autotune.c
new file mode 100644
index 0000000..72b89f3
--- /dev/null
+++ b/autotune.c
@@ -0,0 +1,106 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <stdio.h>
+#include <math.h>
+#include "main.h"
+#include "autotune.h"
+#include <unistd.h>
+
+
+extern SMCDATA smcdata;
+extern GtkWidget *scarea;
+extern float tunestep;
+
+#define MAXAUTOITER 50
+
+float weigthfu(void){
+ int i;
+ float m, qm=0., q;
+ const float p=0.6;
+
+ m=sqrt((smcdata.rerhoIP[smcdata.ne]*smcdata.rerhoIP[smcdata.ne])+
+ (smcdata.imrhoIP[smcdata.ne]*smcdata.imrhoIP[smcdata.ne]));
+
+ for(i=0; i<smcdata.ne; i++){
+ q=fabs(smcdata.imrhoIP[i]/smcdata.rerhoIP[i]);
+ qm+=q*q;
+ }
+
+ return p*m+(1-p)*sqrt(qm);
+}
+
+/* Very simple "screwdriver" strategy for tuning, i.e.: adjust (aka rotate)
+ each value and then pass to the next and so on restarting from the first
+ if the result is not good enough. Algritm stops when error function
+ cannot go lower; error function is a weighted mean of matching and
+ lowered Q.
+
+ I don't think this could be a good algorithm, but it work in most case and
+ is usefull if some manual adjust are taken; multiple invoking of autotune
+ can be usefull as well as tunestep varying.
+
+ TO BE IMPROVED!
+*/
+void autotune(void){
+ int i, j;
+ float r, oldr, wf;
+
+ for(i=1; i<=smcdata.ne; i++){
+ if(smcdata.ELlocked[i]==1)
+ continue;
+
+ r=sqrt((smcdata.rerhoIP[smcdata.ne]*smcdata.rerhoIP[smcdata.ne])+
+ (smcdata.imrhoIP[smcdata.ne]*smcdata.imrhoIP[smcdata.ne]));
+ for(j=0; j<MAXAUTOITER; j++){
+ oldr=r;
+ smcdata.ELval0[i]*=tunestep;
+ recalc();
+ r=sqrt((smcdata.rerhoIP[smcdata.ne]*smcdata.rerhoIP[smcdata.ne])+
+ (smcdata.imrhoIP[smcdata.ne]*smcdata.imrhoIP[smcdata.ne]));
+ if(r>oldr){
+ smcdata.ELval0[i]/=tunestep;
+ break;
+ }
+ }
+
+ oldr=r;
+ for(j=0; j<MAXAUTOITER; j++){
+ oldr=r;
+ smcdata.ELval0[i]/=tunestep;
+ recalc();
+ r=sqrt((smcdata.rerhoIP[smcdata.ne]*smcdata.rerhoIP[smcdata.ne])+
+ (smcdata.imrhoIP[smcdata.ne]*smcdata.imrhoIP[smcdata.ne]));
+ if(r>oldr){
+ smcdata.ELval0[i]*=tunestep;
+ break;
+ }
+ }
+ }
+
+ drawchart(); gtk_widget_draw(scarea, NULL);
+}
diff --git a/autotune.h b/autotune.h
new file mode 100644
index 0000000..d9d58dc
--- /dev/null
+++ b/autotune.h
@@ -0,0 +1,26 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+void autotune(void);
+float weigthfu(void);
diff --git a/calc.c b/calc.c
new file mode 100644
index 0000000..4f18965
--- /dev/null
+++ b/calc.c
@@ -0,0 +1,253 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <stdio.h>
+#include <math.h>
+#include "main.h"
+#include "calc.h"
+
+extern SMCDATA smcdata;
+
+void rhoz1z2(float *rerho, float *imrho, float z1, float z2) {
+ float A, B, x, y;
+ A=z1-z2; B=z1+z2;
+ x=*rerho; y=*imrho;
+ *rerho=(A*B*(1+x*x+y*y)+x*(A*A+B*B))/((B+A*x)*(B+A*x)+A*A*y*y);
+ *imrho=(y*(B*B-A*A))/((B+A*x)*(B+A*x)+A*A*y*y);
+}
+
+
+void z2rho(float r, float x, float *rerho, float *imrho) {
+
+ *rerho=(r*r+x*x-1)/((r+1)*(r+1)+x*x);
+ *imrho=2*x/((r+1)*(r+1)+x*x);
+}
+
+void y2rho(float g, float b, float *rerho, float *imrho) {
+
+ *rerho=(1-g*g-b*b)/((1+g)*(1+g)+b*b);
+ *imrho=-2*b/((1+g)*(1+g)+b*b);
+}
+
+void rho2z(float rerho, float imrho, float *r, float *x) {
+
+ *r=(1-rerho*rerho-imrho*imrho)/((1-rerho)*(1-rerho)+imrho*imrho);
+ *x=2*imrho/((1-rerho)*(1-rerho)+imrho*imrho);
+}
+
+void rho2y(float rerho, float imrho, float *g, float *b) {
+
+ *g=(1-rerho*rerho-imrho*imrho)/((1+rerho)*(1+rerho)+imrho*imrho);
+ *b=-2*imrho/((1+rerho)*(1+rerho)+imrho*imrho);
+}
+
+float thetaonR(float rerho, float imrho, float R) {
+
+ return (atan2(imrho, rerho-R/(1.+R)));
+}
+
+float thetaonX(float rerho, float imrho, float X) {
+ if(X!=0.)
+ return atan2(imrho-1./X, rerho-1.);
+ else
+ return 0;
+}
+
+float thetaonG(float rerho, float imrho, float G) {
+
+ return (atan2(imrho, rerho+G/(1.+G)));
+}
+
+float thetaonB(float rerho, float imrho, float B) {
+ if(B!=0.)
+ return atan2(imrho+1./B, rerho+1.);
+ else
+ return 0;
+}
+
+/* Polar to rectangular conversion; angle in degrees */
+void polar2rect(float *a, float *b) {
+ float re, im;
+
+ re=*a*cos(*b/180.*M_PI); im=*a*sin(*b/180.*M_PI);
+ *a=re; *b=im;
+}
+
+/* Polar to rectangular conversion; angle in degrees */
+void rect2polar(float *a, float *b) {
+ float mod, arg;
+
+ mod=sqrt(*a**a+*b**b); arg=atan2(*b, *a);
+ *a=mod; *b=arg;
+}
+
+
+/* Do recalculation when some of data in smcdata are changed */
+void recalc(void){
+ int i;
+ float reap, imap;
+
+
+ /* Recalculate start point rho */
+ switch(smcdata.SPtype) {
+ case SPTYPE_Z: z2rho(smcdata.reentrySP/smcdata.z0,
+ smcdata.imentrySP/smcdata.z0,
+ &smcdata.rerhoSP, &smcdata.imrhoSP); break;
+
+ case SPTYPE_Y: y2rho(smcdata.reentrySP*smcdata.z0,
+ smcdata.imentrySP*smcdata.z0,
+ &smcdata.rerhoSP, &smcdata.imrhoSP); break;
+
+ case SPTYPE_RHO: smcdata.rerhoSP=smcdata.reentrySP;
+ smcdata.imrhoSP=smcdata.imentrySP; break;
+ }
+
+ /* Recalculation of impedance when component value are given */
+ smcdata.rerhoIP[0]=smcdata.rerhoSP; smcdata.imrhoIP[0]=smcdata.imrhoSP;
+ for(i=1; i<=smcdata.ne; i++) {
+ switch(smcdata.ELtype[i]) {
+ case 'r':
+ if(smcdata.ELplace[i]=='s') {
+ rho2z(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], &reap, &imap);
+ reap+=smcdata.ELval0[i]/smcdata.z0;
+ z2rho(reap, imap, &smcdata.rerhoIP[i], &smcdata.imrhoIP[i]);
+ }
+ else if(smcdata.ELplace[i]=='p') {
+ rho2y(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], &reap, &imap);
+ reap+=smcdata.z0/smcdata.ELval0[i];
+ y2rho(reap, imap, &smcdata.rerhoIP[i], &smcdata.imrhoIP[i]);
+ }
+ else { fprintf(stderr, "Impossible connection (%c)\n",
+ smcdata.ELplace[i]); }
+ break;
+ case 'l':
+ if(smcdata.ELplace[i]=='s') {
+ rho2z(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], &reap, &imap);
+ imap+=2*M_PI*smcdata.f0*smcdata.ELval0[i]/smcdata.z0;
+ z2rho(reap, imap, &smcdata.rerhoIP[i], &smcdata.imrhoIP[i]);
+ }
+ else if(smcdata.ELplace[i]=='p') {
+ rho2y(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], &reap, &imap);
+ imap-=smcdata.z0/(2*M_PI*smcdata.f0*smcdata.ELval0[i]);
+ y2rho(reap, imap, &smcdata.rerhoIP[i], &smcdata.imrhoIP[i]);
+ }
+ else { fprintf(stderr, "Impossible connection (%c)\n",
+ smcdata.ELplace[i]); }
+ break;
+ case 'c':
+ if(smcdata.ELplace[i]=='s') {
+ rho2z(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], &reap, &imap);
+ imap-=1./(2*M_PI*smcdata.f0*smcdata.ELval0[i])/smcdata.z0;
+ z2rho(reap, imap, &smcdata.rerhoIP[i], &smcdata.imrhoIP[i]);
+ }
+ else if(smcdata.ELplace[i]=='p') {
+ rho2y(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], &reap, &imap);
+ imap+=2*M_PI*smcdata.f0*smcdata.ELval0[i]*smcdata.z0;
+ y2rho(reap, imap, &smcdata.rerhoIP[i], &smcdata.imrhoIP[i]);
+ }
+ else { fprintf(stderr, "Impossible connection (%c)\n",
+ smcdata.ELplace[i]); }
+ break;
+
+ case 't':
+ switch(smcdata.ELplace[i]) {
+ case 't': /* Trasmission line */
+ reap=smcdata.rerhoIP[i-1]; imap=smcdata.imrhoIP[i-1];
+ rhoz1z2(&reap, &imap, smcdata.z0, smcdata.ELval1[i]);
+ smcdata.rerhoIP[i]=reap*cos(2.*smcdata.ELval0[i]/180.*M_PI)+
+ imap*sin(2.*smcdata.ELval0[i]/180.*M_PI);
+ smcdata.imrhoIP[i]=-reap*sin(2.*smcdata.ELval0[i]/180.*M_PI)+
+ imap*cos(2.*smcdata.ELval0[i]/180.*M_PI);
+ rhoz1z2(&smcdata.rerhoIP[i], &smcdata.imrhoIP[i],
+ smcdata.ELval1[i], smcdata.z0);
+ break;
+ case 'o': /* Open parallel stub */
+ rho2y(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], &reap, &imap);
+ imap+=tan(smcdata.ELval0[i]/180.*M_PI)/smcdata.ELval1[i]*smcdata.z0;
+ y2rho(reap, imap, &smcdata.rerhoIP[i], &smcdata.imrhoIP[i]);
+ break;
+ case 'c': /* Short parallel stub */
+ rho2y(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], &reap, &imap);
+ imap+=-1./tan(smcdata.ELval0[i]/180.*M_PI)/
+ smcdata.ELval1[i]*smcdata.z0;
+ y2rho(reap, imap, &smcdata.rerhoIP[i], &smcdata.imrhoIP[i]);
+ break;
+ case 'l': /* Short serial stub */
+ rho2z(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], &reap, &imap);
+ imap+=smcdata.ELval1[i]*tan(smcdata.ELval0[i]/180.*M_PI)/smcdata.z0;
+ z2rho(reap, imap, &smcdata.rerhoIP[i], &smcdata.imrhoIP[i]);
+ break;
+ case 'a': /* Open serial stub */
+ rho2z(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], &reap, &imap);
+ imap+=-smcdata.ELval1[i]/tan(smcdata.ELval0[i]/180.*M_PI)/smcdata.z0;
+ z2rho(reap, imap, &smcdata.rerhoIP[i], &smcdata.imrhoIP[i]);
+ break;
+ default:
+ fprintf(stderr, "Impossible connection (%c)\n",
+ smcdata.ELplace[i]);
+ }
+ }
+ }
+
+ /*
+ for(i=0; i<=smcdata.ne; i++)
+ printf("%f %f\n", smcdata.rerhoIP[i], smcdata.imrhoIP[i]);
+ printf("\n");
+ */
+
+}
+
+
+
+void float2prefs(float v, char *b, int isspice) {
+ float p;
+
+ if(v!=0.){
+ p=log10(fabs(v));
+ if(p>=-18. && p<-15.) sprintf(b, "%6.2fa", v*1e18);
+ else if(p>=-15. && p<-12.) sprintf(b, "%6.2ff", v*1e15);
+ else if(p>=-12. && p<-9.) sprintf(b, "%6.2fp", v*1e12);
+ else if(p>=-9. && p<-6.) sprintf(b, "%6.2fn", v*1e9);
+ else if(p>=-6. && p<-3.) sprintf(b, "%6.2fu", v*1e6);
+ else if(p>=-3. && p<0.) sprintf(b, "%6.2fm", v*1e3);
+ else if(p>=0. && p<3.) sprintf(b, "%6.2f ", v);
+ else if(p>=3. && p<6.) sprintf(b, "%6.2fk", v*1e-3);
+ else if(p>=6. && p<9.) {
+ if(isspice) sprintf(b, "%6.2fMEG", v*1e-6);
+ else sprintf(b, "%6.2fM", v*1e-6);
+ }
+ else if(p>=9. && p<12.) sprintf(b, "%6.2fG", v*1e-9);
+ else if(p>=12. && p<15.) sprintf(b, "%6.2fT", v*1e-12);
+
+ else sprintf(b, "%6.2g", v);
+ }
+ else sprintf(b, "0");
+}
+
+
+
+
diff --git a/calc.h b/calc.h
new file mode 100644
index 0000000..3d39f30
--- /dev/null
+++ b/calc.h
@@ -0,0 +1,35 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+
+void z2rho(float, float, float*, float*), y2rho(float, float, float*, float*),
+ rho2z(float, float, float*, float*), rho2y(float, float, float*, float*),
+ rhoz1z2(float *, float *, float, float);
+void rect2polar(float *, float *), polar2rect(float *, float *);
+void recalc(void);
+
+float thetaonR(float, float, float), thetaonX(float, float, float),
+ thetaonG(float, float, float), thetaonB(float, float, float);
+
+void float2prefs(float, char *, int);
diff --git a/configure b/configure
new file mode 100755
index 0000000..588af1e
--- /dev/null
+++ b/configure
@@ -0,0 +1,4586 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.57 for gsmc 1.0.
+#
+# Report bugs to <ik5nax at amsat.org>.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='gsmc'
+PACKAGE_TARNAME='gsmc'
+PACKAGE_VERSION='1.0'
+PACKAGE_STRING='gsmc 1.0'
+PACKAGE_BUGREPORT='ik5nax at amsat.org'
+
+ac_unique_file="calc.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION EXEEXT OBJEXT ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh INSTALL_STR [...]
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures gsmc 1.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of gsmc 1.0:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <ik5nax at amsat.org>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+gsmc configure 1.0
+generated by GNU Autoconf 2.57
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by gsmc $as_me 1.0, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ am_backtick='`'
+ { echo "$as_me:$LINENO: WARNING: ${am_backtick}missing' script is too old or missing" >&5
+echo "$as_me: WARNING: ${am_backtick}missing' script is too old or missing" >&2;}
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+
+rm -f .deps 2>/dev/null
+mkdir .deps 2>/dev/null
+if test -d .deps; then
+ DEPDIR=.deps
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ DEPDIR=_deps
+fi
+rmdir .deps 2>/dev/null
+
+
+# test to see if srcdir already configured
+if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Define the identity of the package.
+PACKAGE=gsmc
+VERSION=1.0
+
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+
+# Autoconf 2.50 always computes EXEEXT. However we need to be
+# compatible with 2.13, for now. So we always define EXEEXT, but we
+# don't compute it.
+
+# Similar for OBJEXT -- only we only use OBJEXT if the user actually
+# requests that it be used. This is a bit dumb.
+: ${OBJEXT=o}
+
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
+
+# Checks for programs.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_config_commands="$ac_config_commands default-1"
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+ @echo done
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include='#'
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote='"'
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+
+depcc="$CC" am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
+ echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=conftest.c object=conftest.o \
+ depfile=conftest.Po tmpdepfile=conftest.TPo \
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ grep conftest.h conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"
+
+
+pkg_modules="gtk+-2.0"
+
+ succeeded=no
+
+ if test -z "$PKG_CONFIG"; then
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+ echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ fi
+
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** The pkg-config script could not be found. Make sure it is"
+ echo "*** in your path, or set the PKG_CONFIG environment variable"
+ echo "*** to the full path to pkg-config."
+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
+ else
+ PKG_CONFIG_MIN_VERSION=0.9.0
+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+ echo "$as_me:$LINENO: checking for $pkg_modules" >&5
+echo $ECHO_N "checking for $pkg_modules... $ECHO_C" >&6
+
+ if $PKG_CONFIG --exists "$pkg_modules" ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ succeeded=yes
+
+ echo "$as_me:$LINENO: checking PACKAGE_CFLAGS" >&5
+echo $ECHO_N "checking PACKAGE_CFLAGS... $ECHO_C" >&6
+ PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules"`
+ echo "$as_me:$LINENO: result: $PACKAGE_CFLAGS" >&5
+echo "${ECHO_T}$PACKAGE_CFLAGS" >&6
+
+ echo "$as_me:$LINENO: checking PACKAGE_LIBS" >&5
+echo $ECHO_N "checking PACKAGE_LIBS... $ECHO_C" >&6
+ PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules"`
+ echo "$as_me:$LINENO: result: $PACKAGE_LIBS" >&5
+echo "${ECHO_T}$PACKAGE_LIBS" >&6
+ else
+ PACKAGE_CFLAGS=""
+ PACKAGE_LIBS=""
+ ## If we have a custom action on failure, don't print errors, but
+ ## do set a variable so people can do so.
+ PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"`
+ echo $PACKAGE_PKG_ERRORS
+ fi
+
+
+
+ else
+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig"
+ fi
+ fi
+
+ if test $succeeded = yes; then
+ :
+ else
+ { { echo "$as_me:$LINENO: error: Library requirements ($pkg_modules) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
+echo "$as_me: error: Library requirements ($pkg_modules) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+
+
+
+# Checks for libraries.
+LIBS=" "
+PKG_LIB2=`pkg-config --libs gtk+-2.0`
+PKG_LIB=""
+for i in $PKG_LIB2 ; do
+ case $i in
+ -l*) PKG_LIB="$i $PKG_LIB" ;;
+ -L*) LIBS="$i $LIBS" ;;
+ esac
+done
+for i in $PKG_LIB ; do
+ j=${i#'-l'}
+
+
+as_ac_Lib=`echo "ac_cv_lib_$j''_main" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for main in -l$j" >&5
+echo $ECHO_N "checking for main in -l$j... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Lib+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$j $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_LIB$j" | $as_tr_cpp` 1
+_ACEOF
+
+ LIBS="-l$j $LIBS"
+
+fi
+
+done
+
+# Checks for header files.
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+for ac_header in fcntl.h string.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+ yes:no )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+ no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset x;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *ccp;
+ char **p;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ ccp = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++ccp;
+ p = (char**) ccp;
+ ccp = (char const *const *) p;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ }
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_const=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+
+# Checks for library functions.
+
+for ac_func in sqrt
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ ac_config_files="$ac_config_files Makefile gsmc.1"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by gsmc $as_me 1.0, which was
+generated by GNU Autoconf 2.57. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+gsmc config.status 1.0
+configured by $0, generated by GNU Autoconf 2.57,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
+
+AMDEP_TRUE="$AMDEP_TRUE"
+ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "gsmc.1" ) CONFIG_FILES="$CONFIG_FILES gsmc.1" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at PACKAGE@,$PACKAGE,;t t
+s, at VERSION@,$VERSION,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at ACLOCAL@,$ACLOCAL,;t t
+s, at AUTOCONF@,$AUTOCONF,;t t
+s, at AUTOMAKE@,$AUTOMAKE,;t t
+s, at AUTOHEADER@,$AUTOHEADER,;t t
+s, at MAKEINFO@,$MAKEINFO,;t t
+s, at AMTAR@,$AMTAR,;t t
+s, at install_sh@,$install_sh,;t t
+s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s, at AWK@,$AWK,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s, at DEPDIR@,$DEPDIR,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at am__include@,$am__include,;t t
+s, at am__quote@,$am__quote,;t t
+s, at CCDEPMODE@,$CCDEPMODE,;t t
+s, at PKG_CONFIG@,$PKG_CONFIG,;t t
+s, at PACKAGE_CFLAGS@,$PACKAGE_CFLAGS,;t t
+s, at PACKAGE_LIBS@,$PACKAGE_LIBS,;t t
+s, at CPP@,$CPP,;t t
+s, at EGREP@,$EGREP,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+ ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+ ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ default-1 )
+test x"$AMDEP_TRUE" != x"" ||
+for mf in $CONFIG_FILES; do
+ case "$mf" in
+ Makefile) dirpart=.;;
+ */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+ *) continue;;
+ esac
+ grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
+ $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..f9550bd
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,41 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.57)
+AC_INIT(gsmc, 1.0, ik5nax at amsat.org)
+AC_CONFIG_SRCDIR([calc.c])
+AM_INIT_AUTOMAKE(gsmc, 1.0, ik5nax at amsat.org)
+
+# Checks for programs.
+AC_PROG_CC
+pkg_modules="gtk+-2.0"
+PKG_CHECK_MODULES(PACKAGE,[$pkg_modules])
+AC_SUBST(PACKAGE_CFLAGS)
+AC_SUBST(PACKAGE_LIBS)
+
+# Checks for libraries.
+LIBS=" "
+PKG_LIB2=`pkg-config --libs gtk+-2.0`
+PKG_LIB=""
+for i in $PKG_LIB2 ; do
+ case $i in
+ -l*) PKG_LIB="$i $PKG_LIB" ;;
+ -L*) LIBS="$i $LIBS" ;;
+ esac
+done
+for i in $PKG_LIB ; do
+ j=${i#'-l'}
+ AC_CHECK_LIB($j,main)
+done
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([fcntl.h string.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+# Checks for library functions.
+AC_CHECK_FUNCS([sqrt])
+AC_OUTPUT([Makefile gsmc.1])
+
diff --git a/dataconv.c b/dataconv.c
new file mode 100644
index 0000000..2e4a61f
--- /dev/null
+++ b/dataconv.c
@@ -0,0 +1,143 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <stdio.h>
+#include <string.h>
+#include "dataconv.h"
+#include "calc.h"
+
+int entrystringdecode(char *is, float *re, float *im){
+ int i, fn, err;
+ char *b;
+
+ /* Remove initial spaces, it will be usefull later */
+ b=is; while(b[0]==' ' || b[0]=='\t') b++;
+
+ err=0;
+ for(i=0; i<(int)strlen(b); i++) {
+ /* If a 'j' is present than swap it with the sign and replace it
+ with blank, e.g.: "12+j56" --> "12 +56" */
+ if(b[i]=='j' || b[i]=='i') {
+ /* Except if 'j' is the first character as in "j78.34" */
+ if(i!=0) {
+ b[i]=b[i-1]; b[i-1]=' '; }
+ else
+ b[0]=' ';
+ /* The string is ready to be read by a scanf, but if only one field
+ is found this mean that it's a pure immaginary number */
+ if(sscanf(b, "%f %f", re, im)<2) { *im=*re; *re=0; }
+ break;
+ }
+ }
+ /* If no 'j' are found there may be one or more field separated by
+ space or tab*/
+ if(i==(int)strlen(b)) {
+ if(strlen(b)==0)
+ err=1;
+ else
+ fn=1;
+
+ /* Search for field delimiter */
+ for(i=0; i<(int)strlen(b); i++) {
+ /* To do better: to detect multiple spaces or tab or trailing ones */
+ if(b[i]==' ') fn++;
+ }
+
+ switch(fn) {
+ case 1: /* Single field, a real number */
+ if(sscanf(b, "%f", re)==0)
+ err=1;
+ *im=0; break;
+
+ case 2: /* Complex number in polar format */
+ if(sscanf(b, "%f %f", re, im)==0)
+ err=1;
+ polar2rect(re, im); break;
+
+ case 3: /* In futuro per le linee (Z0, E, Att) */
+ break;
+
+ default:
+ err=1;
+ }
+ }
+
+ return err;
+}
+
+/* Decode values of component from string received by dialogwin() */
+int componentvaluestringdecode(char *is, float *val0, float *val1,
+ float *val2, char *place) {
+ int ni;
+ char f0[10], f1[10], f2[10], f3[10];
+
+ ni=sscanf(is, "%s %s %s %s", f0, f1, f2, f3);
+ switch(ni) {
+ case 0: fprintf(stderr, "Invalid component value\n"); return 1;
+
+ case 1: *place=' '; *val0=psdec(f0); *val1=0.; *val2=0.; break;
+
+ case 2: *place=f1[0]; *val0=psdec(f0); *val1=0.; *val2=0.; break;
+
+ case 3: *place=f2[0]; *val0=psdec(f0); *val1=psdec(f1); *val2=0; break;
+
+ default: fprintf(stderr, "Invalid component value\n"); return 1;
+ }
+
+ return 0;
+}
+
+/* Decode float value with unit of measure prefix (but not unit of measure
+ symbol) */
+float psdec(char *b) {
+ int i;
+ float pf=1., v;
+ char b2[40];
+
+ for(i=0; i<(int)strlen(b); i++)
+ if((b[i]>'9' || b[i]<'0') && b[i]!='.' && b[i]!='-' && b[i]!='+') break;
+
+ if(i!=(int)strlen(b))
+ switch(b[i]) {
+ case 'f': pf=1.e-15; break;
+ case 'p': pf=1.e-12; break;
+ case 'n': pf=1.e-9; break;
+ case 'u': pf=1.e-6; break;
+ case 'm': pf=1.e-3; break;
+ case 'k': pf=1.e+3; break;
+ case 'M': pf=1.e+6; break;
+ case 'G': pf=1.e+9; break;
+ case 'T': pf=1.e+12; break;
+ case ' ': pf=1.; break;
+ default: fprintf(stderr, "Invalid prefix (%c)\n", b[i]); return(0.);
+ }
+
+ strncpy(b2, b, i+2);
+ sscanf(b2, "%f", &v);
+
+ return (v*pf);
+}
diff --git a/dataconv.h b/dataconv.h
new file mode 100644
index 0000000..228a02d
--- /dev/null
+++ b/dataconv.h
@@ -0,0 +1,27 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+float psdec(char *);
+int entrystringdecode(char *, float *, float *),
+ componentvaluestringdecode(char *, float *, float *, float *, char *);
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..6589965
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,411 @@
+#! /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 at 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'.
+
+depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
+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 AIX 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.
+
+ tmpdepfile1="$object.d"
+ tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'`
+ if test "$libtool" = yes; then
+ "$@" -Wc,-MD
+ else
+ "$@" -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,
+ # because we must use -o when running libtool.
+ test -z "$dashmflag" && dashmflag=-M
+ ( IFS=" "
+ case " $* " in
+ *" --mode=compile "*) # this is libtool, let us make it quiet
+ for arg
+ do # cycle over the arguments
+ case "$arg" in
+ "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+ esac
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # "$arg"
+ done
+ ;;
+ esac
+ "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ 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)
+ # 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} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tail +3 "$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, regardless of -o,
+ # because we must use -o when running libtool.
+ ( IFS=" "
+ case " $* " in
+ *" --mode=compile "*)
+ for arg
+ do # cycle over the arguments
+ case $arg in
+ "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+ esac
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # "$arg"
+ done
+ ;;
+ esac
+ "$@" -E |
+ sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ 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.
+ ( IFS=" "
+ case " $* " in
+ *" --mode=compile "*)
+ for arg
+ do # cycle over the arguments
+ case $arg in
+ "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+ esac
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # "$arg"
+ done
+ ;;
+ esac
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ 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
diff --git a/draw.c b/draw.c
new file mode 100644
index 0000000..33d99e1
--- /dev/null
+++ b/draw.c
@@ -0,0 +1,625 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <ctype.h>
+#include "main.h"
+#include "calc.h"
+#include "draw.h"
+
+extern SMCDATA smcdata;
+extern GtkWidget *statarr[20];
+extern const char statlabelname[20][15];
+extern GtkTextBuffer *txtcircbuff;
+extern GtkWidget *maindrawingwidget, *win_main, *textcircdesc, *scarea;
+extern GdkPixmap *mainpixmap;
+extern gint scdim;
+GdkGC *impgc, *admgc, *qgc, *rhogc, *spgc, *arcgc;
+
+extern int Zcirc, Ycirc, RHOcirc, Qcirc;
+extern float tunestep, freqstep;
+
+void setup_gcs(void) {
+
+ /* Constant impedance circle */
+ impgc=gdk_gc_new(mainpixmap);
+ gdk_rgb_gc_set_foreground(impgc, 0xff0000);
+
+ /* Constant admittance circle */
+ admgc=gdk_gc_new(mainpixmap);
+ gdk_rgb_gc_set_foreground(admgc, 0x0000ff);
+
+ /* Constant Q circle */
+ qgc=gdk_gc_new(mainpixmap);
+ gdk_rgb_gc_set_foreground(qgc, 0x00ff00);
+
+ /* Constant refl coeff circle */
+ rhogc=gdk_gc_new(mainpixmap);
+ gdk_rgb_gc_set_foreground(rhogc, 0x808080);
+
+ /* Start point */
+ spgc=gdk_gc_new(mainpixmap);
+ gdk_rgb_gc_set_foreground(spgc, 0xf000f0);
+
+ /* Arcs */
+ arcgc=gdk_gc_new(mainpixmap);
+ gdk_rgb_gc_set_foreground(arcgc, 0x000000);
+ gdk_gc_set_line_attributes(arcgc, 2, GDK_LINE_SOLID,
+ GDK_CAP_ROUND, GDK_JOIN_ROUND);
+}
+
+void drawGk(float G) {
+ float xc, yc, r;
+ int x, y, w, h;
+
+ xc=-G/(1.+G); yc=0; r=1./(1.+G);
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+
+ gdk_draw_arc(mainpixmap,
+ admgc, FALSE,
+ x-w/2, y-h/2, w, h,
+ 0, 23040);
+}
+
+void drawRk(float R) {
+ float xc, yc, r;
+ int x, y, w, h;
+
+ xc=R/(1.+R); yc=0; r=1./(1.+R);
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+
+ gdk_draw_arc(mainpixmap,
+ impgc, FALSE,
+ x-w/2, y-h/2, w, h,
+ 0, 23040);
+}
+
+
+void drawXk(float X) {
+ float xc, yc, r;
+ int x, y, w, h;
+
+ if(X!=0.) {
+ xc=1.; yc=1./X; r=1./fabs(X);
+
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+ if(X<0.)
+ gdk_draw_arc(mainpixmap,
+ impgc, FALSE,
+ x-w/2, y-h/2, w, h,
+ 90*64, (int)(-64.*2.*180./M_PI*atan(X)));
+ else
+ gdk_draw_arc(mainpixmap,
+ impgc, FALSE,
+ x-w/2, y-h/2, w, h,
+ -90*64, (int)(-64.*2.*180./M_PI*atan(X)));
+ }
+}
+
+void drawBk(float B) {
+ float xc, yc, r;
+ int x, y, w, h;
+
+ if(B!=0.) {
+ xc=-1.; yc=1./B; r=1./fabs(B);
+
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+ if(B<0.)
+ gdk_draw_arc(mainpixmap,
+ admgc, FALSE,
+ x-w/2, y-h/2, w, h,
+ 90*64, (int)(64.*2.*180./M_PI*atan(B)));
+
+ else
+ gdk_draw_arc(mainpixmap,
+ admgc, FALSE,
+ x-w/2, y-h/2, w, h,
+ -90*64, (int)(64.*2.*180./M_PI*atan(B)));
+ }
+}
+
+
+void drawRHOk(float RHO) {
+ float xc, yc, r;
+ int x, y, w, h;
+
+ xc=0; yc=0; r=RHO;
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+
+ gdk_draw_arc(mainpixmap,
+ rhogc, FALSE,
+ x-w/2, y-h/2, w, h,
+ 0, 23040);
+}
+
+void drawQk(float Q) {
+ float xc, yc, r;
+ int x, y, w, h;
+
+ xc=0.; yc=1./Q; r=sqrt(1.+1./Q/Q);
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+
+ gdk_draw_arc(mainpixmap,
+ qgc, FALSE,
+ x-w/2, y-h/2, w, h,
+ (int)(64*(-90+180/M_PI*atan(Q))),(int)(-64*(180/M_PI*2*atan(Q))));
+
+ xc=0.; yc=-1./Q; r=sqrt(1.+1./Q/Q);
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+
+ gdk_draw_arc(mainpixmap,
+ qgc, FALSE,
+ x-w/2, y-h/2, w, h,
+ (int)(64*(90-180/M_PI*atan(Q))),(int)(64*(180/M_PI*2*atan(Q))));
+}
+
+void drawSP(float rerho, float imrho) {
+ int x, y;
+
+ x=(int)((rerho+1.)/2.*scdim); y=(int)((1.-imrho)/2.*scdim);
+
+ gdk_draw_arc(mainpixmap,
+ spgc, TRUE, x-2, y-2, 4, 4, 0, 23040);
+}
+
+
+
+void drawchart(void) {
+ int i, n, step;
+ float R, X, G, B, sa, ea, a;
+ float rer, imr, rer1, imr1, rer2, imr2;
+
+ gdk_draw_rectangle (mainpixmap,
+ scarea->style->white_gc,
+ TRUE,
+ 0, 0,
+ scarea->allocation.width,
+ scarea->allocation.height);
+
+ gdk_draw_arc(mainpixmap,
+ scarea->style->black_gc, FALSE, 0, 0,
+ scdim, scdim,
+ 0, 23040);
+
+ gdk_draw_line(mainpixmap,
+ scarea->style->black_gc,
+ 0, scarea->allocation.width/2,
+ scdim, scdim/2);
+
+
+ gdk_draw_rectangle(mainpixmap,
+ scarea->style->white_gc,
+ TRUE,
+ 0, 0,
+ scdim, scdim);
+
+ gdk_draw_arc(mainpixmap,
+ scarea->style->black_gc, FALSE, 0, 0,
+ scdim, scdim,
+ 100, 36000);
+
+ gdk_draw_line(mainpixmap,
+ scarea->style->black_gc,
+ 0, scdim/2, scdim, scdim/2);
+
+
+ if(Zcirc) {
+ drawRk(0.2); drawRk(0.5); drawRk(1); drawRk(2);
+ drawXk(0.2); drawXk(0.5); drawXk(1); drawXk(2);
+ drawXk(-0.2); drawXk(-0.5); drawXk(-1); drawXk(-2);
+ }
+
+ if(Ycirc) {
+ drawGk(0.2); drawGk(0.5); drawGk(1); drawGk(2);
+ drawBk(0.2); drawBk(0.5); drawBk(1); drawBk(2);
+ drawBk(-0.2); drawBk(-0.5); drawBk(-1); drawBk(-2);
+ }
+
+ if(RHOcirc) {
+ drawRHOk(0.25); drawRHOk(0.5); drawRHOk(0.75);
+ }
+
+ if(Qcirc) {
+ drawQk(0.5); drawQk(1); drawQk(2); drawQk(5);
+ }
+
+
+ drawSP(smcdata.rerhoSP, smcdata.imrhoSP);
+
+ /* Draw arcs */
+ for(i=1; i<=smcdata.ne; i++) {
+
+ /* Series placed element, that could be an R, L, or C */
+ switch(smcdata.ELplace[i]) {
+ case 's':
+ rho2z(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &R, &X);
+ if(smcdata.ELtype[i]=='r') {
+ if(fabs(X)>QZ) {
+ sa=thetaonX(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], X)*180/M_PI;
+ ea=thetaonX(smcdata.rerhoIP[i], smcdata.imrhoIP[i], X)*180/M_PI;
+ if(ea<0.) ea+=360; if(sa<0.) sa+=360;
+ drawX(X, sa, ea-sa);
+ }
+ else
+ drawX(X, smcdata.rerhoIP[i-1], smcdata.rerhoIP[i]);
+ }
+ else if(smcdata.ELtype[i]=='l' || smcdata.ELtype[i]=='c') {
+ sa=thetaonR(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], R)*180/M_PI;
+ ea=thetaonR(smcdata.rerhoIP[i], smcdata.imrhoIP[i], R)*180/M_PI;
+ if(ea<0.) ea+=360; if(sa<0.) sa+=360;
+ drawR(R, sa, ea-sa);
+ }
+ break;
+
+ /* Parallel placed element, that could be an R, L, or C */
+ case'p':
+ rho2y(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &G, &B);
+ if(smcdata.ELtype[i]=='r') {
+ if(fabs(B)>QZ) {
+ sa=thetaonB(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], B)*180/M_PI;
+ ea=thetaonB(smcdata.rerhoIP[i], smcdata.imrhoIP[i], B)*180/M_PI;
+ drawB(B, sa, ea-sa);
+ }
+ else
+ drawB(B, smcdata.rerhoIP[i-1], smcdata.rerhoIP[i]);
+
+ }
+ else if(smcdata.ELtype[i]=='l' || smcdata.ELtype[i]=='c') {
+ sa=thetaonG(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], G)*180/M_PI;
+ ea=thetaonG(smcdata.rerhoIP[i], smcdata.imrhoIP[i], G)*180/M_PI;
+
+ drawG(G, sa, ea-sa);
+ }
+ break;
+
+ /* The rest are for transmission line */
+ case 't':
+ rer1=smcdata.rerhoIP[i-1]; imr1=smcdata.imrhoIP[i-1];
+ step=36*(1+(int)(smcdata.ELval0[i]/360));
+ a=smcdata.ELval0[i]/180.*M_PI/step;
+ for(n=0; n<step; n++) {
+ rhoz1z2(&rer1, &imr1, smcdata.z0, smcdata.ELval1[i]);
+ rer=rer1; imr=imr1;
+ rer2=rer*cos(2.*a)+imr*sin(2.*a);
+ imr2=-rer*sin(2.*a)+imr*cos(2.*a);
+ rhoz1z2(&rer1, &imr1, smcdata.ELval1[i], smcdata.z0);
+ rhoz1z2(&rer2, &imr2, smcdata.ELval1[i], smcdata.z0);
+ drawLINE(rer1, imr1, rer2, imr2);
+ rer1=rer2; imr1=imr2;
+ }
+ break;
+ case 'c':
+ case 'o':
+ rho2y(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &G, &B);
+ sa=thetaonG(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], G)*180/M_PI;
+ ea=thetaonG(smcdata.rerhoIP[i], smcdata.imrhoIP[i], G)*180/M_PI;
+ drawG(G, sa, ea-sa);
+ break;
+ case 'l':
+ case 'a':
+ rho2z(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &R, &X);
+ sa=thetaonR(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], R)*180/M_PI;
+ ea=thetaonR(smcdata.rerhoIP[i], smcdata.imrhoIP[i], R)*180/M_PI;
+ if(ea<0.) ea+=360; if(sa<0.) sa+=360;
+ drawR(R, sa, ea-sa);
+ break;
+
+ default:
+ fprintf(stderr, "Unallowed connection\n");
+ }
+ }
+
+}
+
+void drawR(float R, float sa, float al) {
+
+ float xc, yc, r;
+ int x, y, w, h;
+
+ xc=R/(1.+R); yc=0; r=1./(1.+R);
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1.-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+
+ gdk_draw_arc(mainpixmap, arcgc, FALSE,
+ x-w/2, y-h/2, w, h, sa*64, al*64);
+}
+
+
+void drawX(float X, float sa, float al) {
+ float xc, yc, r;
+ int x, y, w, h;
+
+ if(fabs(X)>QZ) {
+ xc=1.; yc=1./X; r=1./fabs(X);
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1.-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+
+ gdk_draw_arc(mainpixmap, arcgc, FALSE,
+ x-w/2, y-h/2, w, h, sa*64, al*64);
+ }
+
+ else {
+ yc=X/2.; y=(int)((1.-yc)/2.*scdim);
+ yc=0; h=(int)((1.-yc)/2.*scdim);
+ xc=sa; x=(int)((xc+1.)/2.*scdim);
+ xc=al; w=(int)((xc+1.)/2.*scdim);
+ gdk_draw_line(mainpixmap, arcgc, x, y, w, h);
+ }
+
+}
+
+void drawG(float G, float sa, float al){
+ float xc, yc, r;
+ int x, y, w, h;
+
+ xc=-G/(1.+G); yc=0; r=1./(1.+G);
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1.-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+
+
+ gdk_draw_arc(mainpixmap, arcgc, FALSE,
+ x-w/2, y-h/2, w, h, sa*64, al*64);
+}
+
+
+void drawB(float B, float sa, float al) {
+ float xc, yc, r;
+ int x, y, w, h;
+
+
+ if(fabs(B)>QZ) {
+ xc=-1.; yc=-1./B; r=1./fabs(B);
+ x=(int)((xc+1.)/2.*scdim); y=(int)((1.-yc)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+
+ gdk_draw_arc(mainpixmap, arcgc, FALSE,
+ x-w/2, y-h/2, w, h, sa*64, al*64);
+ }
+
+ else {
+ yc=-B/2.; y=(int)((1.-yc)/2.*scdim);
+ yc=0; h=(int)((1.-yc)/2.*scdim);
+ xc=sa; x=(int)((xc+1.)/2.*scdim);
+ xc=al; w=(int)((xc+1.)/2.*scdim);
+
+ gdk_draw_line(mainpixmap, arcgc, x, y, w, h);
+ }
+}
+
+
+void drawRHO(float RHO, float sa, float ea) {
+ float xc, yc, r;
+ int x, y, w, h;
+
+ xc=0; yc=0; r=RHO;
+ x=(int)((xc+1.)/2.*scdim); y=(int)((yc+1.)/2.*scdim);
+ w=(int)(r*scdim); h=(int)(r*scdim);
+
+ gdk_draw_arc(mainpixmap, arcgc, FALSE,
+ x-w/2, y-h/2, w, h, sa*64, ea*64);
+
+}
+
+void drawLINE(float rerhoi, float imrhoi, float rerhof, float imrhof) {
+ int x1, y1a, x2, y2;
+
+ x1=(int)((rerhoi+1.)/2.*scdim); y1a=(int)((1.-imrhoi)/2.*scdim);
+ x2=(int)((rerhof+1.)/2.*scdim); y2=(int)((1.-imrhof)/2.*scdim);
+
+ gdk_draw_line(mainpixmap, arcgc, x1, y1a, x2, y2);
+}
+
+
+
+void showtextstat(void) {
+ char b[80], b2[80];
+ float r, j;
+
+ /* Display general data */
+ float2prefs(smcdata.z0, b2, 0); sprintf(b, statlabelname[labelZ0], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelZ0]), b);
+
+ float2prefs(smcdata.f0, b2, 0); sprintf(b, statlabelname[labelf0], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelf0]), b);
+
+ /* Start point */
+ rho2z(smcdata.rerhoIP[0], smcdata.imrhoIP[0], &r, &j);
+ r*=smcdata.z0; j*=smcdata.z0;
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelzSP], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelzSP]), b);
+
+ rho2y(smcdata.rerhoIP[0], smcdata.imrhoIP[0], &r, &j);
+ r/=smcdata.z0; j/=smcdata.z0;
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelySP], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelySP]), b);
+
+ r=smcdata.rerhoIP[0]; j=smcdata.imrhoIP[0];
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelrhoSP], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelrhoSP]), b);
+
+ r=sqrt((smcdata.rerhoIP[0]*smcdata.rerhoIP[0])+
+ (smcdata.imrhoIP[0]*smcdata.imrhoIP[0]));
+ sprintf(b, " %5.2f", (1.+r)/(1.-r));
+ strcpy(b2, b); sprintf(b, statlabelname[labelSWRSP], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelSWRSP]), b);
+
+
+ /* End point */
+ rho2z(smcdata.rerhoIP[smcdata.ne], smcdata.imrhoIP[smcdata.ne], &r, &j);
+ r*=smcdata.z0; j*=smcdata.z0;
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelzEP], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelzEP]), b);
+
+ rho2y(smcdata.rerhoIP[smcdata.ne], smcdata.imrhoIP[smcdata.ne], &r, &j);
+ r/=smcdata.z0; j/=smcdata.z0;
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelyEP], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelyEP]), b);
+
+ r=smcdata.rerhoIP[smcdata.ne]; j=smcdata.imrhoIP[smcdata.ne];
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelrhoEP], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelrhoEP]), b);
+
+ r=sqrt((smcdata.rerhoIP[smcdata.ne]*smcdata.rerhoIP[smcdata.ne])+
+ (smcdata.imrhoIP[smcdata.ne]*smcdata.imrhoIP[smcdata.ne]));
+ sprintf(b, "%5.2f", (1.+r)/(1.-r));
+ strcpy(b2, b); sprintf(b, statlabelname[labelSWREP], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelSWREP]), b);
+
+ /* Other data */
+ sprintf(b2, "%3.0f", (tunestep-1.)*100.);
+ sprintf(b, statlabelname[labeltunestep], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labeltunestep]), b);
+ sprintf(b2, "%3.1f", freqstep*100.);
+ sprintf(b, statlabelname[labelfreqstep], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelfreqstep]), b);
+
+ /* Cursor point */
+ rho2z(smcdata.rerhoCU, smcdata.imrhoCU, &r, &j);
+ r*=smcdata.z0; j*=smcdata.z0;
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelzCU], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelzCU]), b);
+
+ rho2y(smcdata.rerhoCU, smcdata.imrhoCU, &r, &j);
+ r/=smcdata.z0; j/=smcdata.z0;
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelyCU], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelyCU]), b);
+
+ r=smcdata.rerhoCU; j=smcdata.imrhoCU;
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelrhoCU], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelrhoCU]), b);
+
+ r=sqrt((smcdata.rerhoCU*smcdata.rerhoCU)+
+ (smcdata.imrhoCU*smcdata.imrhoCU));
+ sprintf(b, "%5.2f", (1.+r)/(1.-r));
+ strcpy(b2, b); sprintf(b, statlabelname[labelSWRCU], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelSWRCU]), b);
+
+}
+
+void showcircdesc(void) {
+ int i;
+ char b[40], t[80], b2[3];
+ GtkTextIter dummy, tep;
+
+ gtk_text_buffer_set_text(txtcircbuff, "\0", -1);
+ gtk_text_buffer_get_bounds(txtcircbuff, &dummy, &tep);
+
+ for(i=1; i<=smcdata.ne; i++) {
+
+ switch(smcdata.ELtype[i]) {
+ case 'r':
+ case 'l':
+ case 'c':
+ float2prefs(smcdata.ELval0[i], b, 0);
+ sprintf(t, "#%d: %c %c %s %s\n", i, toupper(smcdata.ELtype[i]),
+ smcdata.ELplace[i], b, smcdata.ELlocked[i]==1?" - locked -":"");
+ if(i==smcdata.neidx){
+ gtk_text_buffer_insert_with_tags_by_name(GTK_TEXT_BUFFER(txtcircbuff),
+ &tep,
+ t, -1, "highlighted", NULL);
+ gtk_text_buffer_get_bounds(txtcircbuff, &dummy, &tep);
+ }
+
+ else{
+ gtk_text_buffer_insert(GTK_TEXT_BUFFER(txtcircbuff),
+ &tep,
+ t, -1);
+ gtk_text_buffer_get_bounds(txtcircbuff, &dummy, &tep);
+ }
+
+ break;
+ case 't':
+ float2prefs(smcdata.ELval0[i], b, 0);
+ exptlpln(smcdata.ELplace[i], b2);
+ sprintf(t, "#%d: %c %s %s", i, toupper(smcdata.ELtype[i]),
+ b2, b);
+ float2prefs(smcdata.ELval1[i], b, 0); strcat(t, b);
+ if(smcdata.ELlocked[i]==1)
+ strcat(t," - locked -");
+ strcat(t, "\n");
+ if(i==smcdata.neidx){
+ gtk_text_buffer_insert_with_tags_by_name(GTK_TEXT_BUFFER(txtcircbuff),
+ &tep,
+ t, -1, "highlighted", NULL);
+ gtk_text_buffer_get_bounds(txtcircbuff, &dummy, &tep);
+ }
+
+ else{
+ gtk_text_buffer_insert_with_tags(GTK_TEXT_BUFFER(txtcircbuff),
+ &tep,
+ t, -1, NULL);
+ gtk_text_buffer_get_bounds(txtcircbuff, &dummy, &tep);
+ }
+
+ break;
+
+ }
+
+ }
+
+}
+
+void exptlpln(char ep, char *rv){
+
+ switch(ep){
+ case 't': strcpy(rv, "tr"); break;
+ case 'a': strcpy(rv, "os"); break;
+ case 'l': strcpy(rv, "ss"); break;
+ case 'o': strcpy(rv, "op"); break;
+ case 'c': strcpy(rv, "sp"); break;
+ }
+
+}
+
+
diff --git a/draw.h b/draw.h
new file mode 100644
index 0000000..bfcf802
--- /dev/null
+++ b/draw.h
@@ -0,0 +1,35 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+
+void setup_gcs(void);
+void drawRk(float), drawGk(float), drawXk(float), drawBk(float),
+ drawRHOk(float), drawQk(float);
+void drawR(float, float, float), drawX(float, float, float),
+ drawG(float, float, float), drawB(float, float, float),
+ drawRHO(float, float, float), drawLINE(float, float, float, float);
+void drawSP(float, float), drawchart(void);
+
+/* Non dovrebbero essere qui (?) */
+void showtextstat(void), showcircdesc(void), exptlpln(char, char*);
diff --git a/example1.eps b/example1.eps
new file mode 100644
index 0000000..74dce48
--- /dev/null
+++ b/example1.eps
@@ -0,0 +1,232 @@
+%!PS-Adobe EPSF-3.0
+%%Title: GSMC printout
+%%BoundingBox: 0 0 595 842
+50.00 225.12 translate
+%Page heading
+/Helvetica findfont
+20 scalefont
+setfont
+newpath
+185.12 560.24 moveto
+(GSMC printout) show
+/Helvetica findfont
+10 scalefont
+setfont
+10.00 530.24 moveto
+(source file: /work/gsmc-1.0-dev/example1.gdt) show
+10.00 515.24 moveto
+(Date: Wed Jul 28 10:21:34 2004
+) show
+
+%Chart border and j=0 line
+newpath
+0 setlinewidth
+255.12 255.12 255.12 0.00 360.00 arc
+0.00 255.12 moveto
+510.24 255.12 lineto
+0. 0. 0. setrgbcolor
+stroke
+
+%Constant Impedance circle
+newpath
+510.24 255.12 moveto
+297.64 255.12 212.60 0.00 360.00 arc
+1.0 0. 0. setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+87.04 247.12 moveto
+1.0 0. 0. setrgbcolor
+(10.0) show
+510.24 255.12 moveto
+340.16 255.12 170.08 0.00 360.00 arc
+1.0 0. 0. setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+172.08 247.12 moveto
+1.0 0. 0. setrgbcolor
+(25.0) show
+510.24 255.12 moveto
+382.68 255.12 127.56 0.00 360.00 arc
+1.0 0. 0. setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+257.12 247.12 moveto
+1.0 0. 0. setrgbcolor
+(50.0) show
+510.24 255.12 moveto
+425.20 255.12 85.04 0.00 360.00 arc
+1.0 0. 0. setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+342.16 247.12 moveto
+1.0 0. 0. setrgbcolor
+(100.0) show
+510.24 255.12 moveto
+510.00 1531.00 1275.50 270.00 247.38 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+-24.00 8.00 rmoveto
+(+j10.0) show
+510.24 255.12 moveto
+510.00 765.00 510.00 270.00 216.87 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+-24.00 8.00 rmoveto
+(+j25.0) show
+510.24 255.12 moveto
+510.00 510.00 255.00 270.00 180.00 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+6.00 8.00 rmoveto
+(+j50.0) show
+510.24 255.12 moveto
+510.00 382.00 127.50 270.00 143.13 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+6.00 8.00 rmoveto
+(+j100.0) show
+510.24 255.12 moveto
+510.00 -1021.00 1275.50 90.00 112.62 arc
+510.24 255.12 moveto
+510.00 -255.00 510.00 90.00 143.13 arc
+510.24 255.12 moveto
+510.00 0.00 255.00 90.00 180.00 arc
+510.24 255.12 moveto
+510.00 127.00 127.50 90.00 216.87 arc
+stroke
+
+%Constant Admittance circle
+newpath
+-0.50 255.00 moveto
+212.00 255.00 212.50 0.00 360.00 arc
+0. 0. 1.0 setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+399.50 257.12 moveto
+0. 0. 1.0 setrgbcolor
+(0.004) show
+0.00 255.00 moveto
+170.00 255.00 170.00 0.00 360.00 arc
+0. 0. 1.0 setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+315.00 257.12 moveto
+0. 0. 1.0 setrgbcolor
+(0.010) show
+-0.50 255.00 moveto
+127.00 255.00 127.50 0.00 360.00 arc
+0. 0. 1.0 setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+229.50 257.12 moveto
+0. 0. 1.0 setrgbcolor
+(0.020) show
+0.00 255.00 moveto
+85.00 255.00 85.00 0.00 360.00 arc
+0. 0. 1.0 setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+145.00 257.12 moveto
+0. 0. 1.0 setrgbcolor
+(0.040) show
+0.00 255.12 moveto
+0.00 1531.00 1275.50 270.00 -67.38 arc
+0.00 255.12 moveto
+0.00 765.00 510.00 270.00 -36.87 arc
+0.00 255.12 moveto
+0.00 510.00 255.00 270.00 -0.00 arc
+0.00 255.12 moveto
+0.00 382.00 127.50 270.00 36.87 arc
+0.00 255.12 moveto
+0.00 -1021.00 1275.50 90.00 67.38 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+6.00 -8.00 rmoveto
+(-j0.004) show
+0.00 255.12 moveto
+0.00 -255.00 510.00 90.00 36.87 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+6.00 -8.00 rmoveto
+(-j0.010) show
+0.00 255.12 moveto
+0.00 0.00 255.00 90.00 0.00 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+6.00 -8.00 rmoveto
+(-j0.020) show
+0.00 255.12 moveto
+0.00 127.00 127.50 90.00 -36.87 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+-24.00 -8.00 rmoveto
+(-j0.040) show
+stroke
+
+%Start Point
+newpath
+1.0 0. 0. setrgbcolor
+194.99 70.06 moveto
+192.99 70.06 2. 0. 360. arc
+fill
+/Helvetica findfont
+8 scalefont
+setfont
+168.99 60.06 moveto
+(10.000-j35.000) show
+
+%Arcs
+newpath
+2 setlinewidth
+1 setlinejoin
+1 setlinecap
+297.64 255.12 212.60 240.51 143.93 arcn
+125.00 255.00 125.00 89.72 7.23 arcn
+0. 0. 0. setrgbcolor
+stroke
+125.80 380.30 moveto
+1.0 0.0 0.0 setrgbcolor
+( 10.00 +j 19.54 ) show
+249.38 270.88 moveto
+1.0 0.0 0.0 setrgbcolor
+( 47.44 +j 5.89 ) show
+
+%Textual circuit description
+newpath
+0.0 0.0 0.0 setrgbcolor
+0 setlinewidth
+0.00 -36.00 moveto
+510.24 0.00 rlineto
+0.00 -36.00 moveto
+0.00 0.00 rlineto
+255.12 -36.00 moveto
+0.00 0.00 rlineto
+510.24 -36.00 moveto
+0.00 0.00 rlineto
+0.00 -48.00 moveto
+(z0= 50.00 ) show
+80.00 -48.00 moveto
+(f0= 15.50M) show
+0.00 -68.00 moveto
+(#1: L s 560.00n
+) show
+0.00 -78.00 moveto
+(#2: C p 390.00p
+) show
+stroke
diff --git a/example1.gdt b/example1.gdt
new file mode 100644
index 0000000..e09642e
--- /dev/null
+++ b/example1.gdt
@@ -0,0 +1,10 @@
+GSMC Data File /work/gsmc-1.0-dev/example1.gdt on Wed Jul 28 10:02:33 2004
+
+z0: 50
+f0: 1.55e+07
+StartPoint: 1 10 -35 0 0 0 0 -0.243523 -0.725389
+Elements: 2 2
+0 0 0 0 0
+6c 5.6e-07 0 0 73
+63 3.9e-10 0 0 70
+GSMC Data File - end
diff --git a/example2.gdt b/example2.gdt
new file mode 100644
index 0000000..4d4997e
--- /dev/null
+++ b/example2.gdt
@@ -0,0 +1,12 @@
+GSMC Data File /work/gsmc-1.0-dev/example2.gdt on Wed Jul 28 10:02:53 2004
+
+z0: 50
+f0: 2e+07
+StartPoint: 1 10 -30 0 0 0 0 -0.333333 -0.666667
+Elements: 4 4
+0 0 0 0 0
+6c 3.45843e-07 0 0 73
+63 3.57772e-10 0 0 70
+6c 1.816e-07 0 0 73
+63 1.41573e-10 0 0 70
+GSMC Data File - end
diff --git a/example2.ps b/example2.ps
new file mode 100644
index 0000000..5ad7350
--- /dev/null
+++ b/example2.ps
@@ -0,0 +1,171 @@
+%!PS-Adobe-3.0
+%%Title: GSMC printout
+%%BoundingBox: 0 0 595 842
+50.00 225.12 translate
+%Page heading
+/Helvetica findfont
+20 scalefont
+setfont
+newpath
+185.12 560.24 moveto
+(GSMC printout) show
+/Helvetica findfont
+10 scalefont
+setfont
+10.00 530.24 moveto
+(source file: /work/gsmc-1.0-dev/example2.gdt) show
+10.00 515.24 moveto
+(Date: Wed Jul 28 10:20:16 2004
+) show
+
+%Chart border and j=0 line
+newpath
+0 setlinewidth
+255.12 255.12 255.12 0.00 360.00 arc
+0.00 255.12 moveto
+510.24 255.12 lineto
+0. 0. 0. setrgbcolor
+stroke
+
+%Constant Impedance circle
+newpath
+510.24 255.12 moveto
+297.64 255.12 212.60 0.00 360.00 arc
+1.0 0. 0. setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+87.04 247.12 moveto
+1.0 0. 0. setrgbcolor
+(10.0) show
+510.24 255.12 moveto
+340.16 255.12 170.08 0.00 360.00 arc
+1.0 0. 0. setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+172.08 247.12 moveto
+1.0 0. 0. setrgbcolor
+(25.0) show
+510.24 255.12 moveto
+382.68 255.12 127.56 0.00 360.00 arc
+1.0 0. 0. setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+257.12 247.12 moveto
+1.0 0. 0. setrgbcolor
+(50.0) show
+510.24 255.12 moveto
+425.20 255.12 85.04 0.00 360.00 arc
+1.0 0. 0. setrgbcolor
+/Helvetica findfont
+8 scalefont
+setfont
+342.16 247.12 moveto
+1.0 0. 0. setrgbcolor
+(100.0) show
+510.24 255.12 moveto
+510.00 1531.00 1275.50 270.00 247.38 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+-24.00 8.00 rmoveto
+(+j10.0) show
+510.24 255.12 moveto
+510.00 765.00 510.00 270.00 216.87 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+-24.00 8.00 rmoveto
+(+j25.0) show
+510.24 255.12 moveto
+510.00 510.00 255.00 270.00 180.00 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+6.00 8.00 rmoveto
+(+j50.0) show
+510.24 255.12 moveto
+510.00 382.00 127.50 270.00 143.13 arcn
+/Helvetica findfont
+8 scalefont
+setfont
+6.00 8.00 rmoveto
+(+j100.0) show
+510.24 255.12 moveto
+510.00 -1021.00 1275.50 90.00 112.62 arc
+510.24 255.12 moveto
+510.00 -255.00 510.00 90.00 143.13 arc
+510.24 255.12 moveto
+510.00 0.00 255.00 90.00 180.00 arc
+510.24 255.12 moveto
+510.00 127.00 127.50 90.00 216.87 arc
+stroke
+
+%Start Point
+newpath
+1.0 0. 0. setrgbcolor
+172.08 85.04 moveto
+170.08 85.04 2. 0. 360. arc
+fill
+/Helvetica findfont
+8 scalefont
+setfont
+146.08 75.04 moveto
+(10.000-j30.000) show
+
+%Arcs
+newpath
+2 setlinewidth
+1 setlinejoin
+1 setlinecap
+297.64 255.12 212.60 233.13 154.71 arcn
+91.00 255.00 91.50 81.49 6.00 arcn
+346.55 255.12 163.68 176.64 144.28 arcn
+128.00 255.00 128.00 48.19 0.03 arcn
+0. 0. 0. setrgbcolor
+stroke
+105.41 345.93 moveto
+1.0 0.0 0.0 setrgbcolor
+( 10.00 +j 13.46 ) show
+183.15 264.72 moveto
+1.0 0.0 0.0 setrgbcolor
+( 27.93 +j 2.29 ) show
+213.65 350.67 moveto
+1.0 0.0 0.0 setrgbcolor
+( 27.93 +j 25.11 ) show
+256.39 255.19 moveto
+1.0 0.0 0.0 setrgbcolor
+( 50.50 +j 26.63m) show
+
+%Textual circuit description
+newpath
+0.0 0.0 0.0 setrgbcolor
+0 setlinewidth
+0.00 -36.00 moveto
+510.24 0.00 rlineto
+0.00 -36.00 moveto
+0.00 0.00 rlineto
+255.12 -36.00 moveto
+0.00 0.00 rlineto
+510.24 -36.00 moveto
+0.00 0.00 rlineto
+0.00 -48.00 moveto
+(z0= 50.00 ) show
+80.00 -48.00 moveto
+(f0= 20.00M) show
+0.00 -68.00 moveto
+(#1: L s 345.84n
+) show
+0.00 -78.00 moveto
+(#2: C p 357.77p
+) show
+0.00 -88.00 moveto
+(#3: L s 181.60n
+) show
+0.00 -98.00 moveto
+(#4: C p 141.57p
+) show
+stroke
+showpage
diff --git a/example3.gdt b/example3.gdt
new file mode 100644
index 0000000..c8aa5c4
--- /dev/null
+++ b/example3.gdt
@@ -0,0 +1,20 @@
+GSMC Data File /work/gsmc-1.0-dev/example3.gdt on Wed Jul 28 10:03:39 2004
+
+z0: 50
+f0: 2e+07
+StartPoint: 1 10 -30 0 0 0 0 -0.333333 -0.666667
+Elements: 12 12
+0 0 0 0 0
+6c 3.45843e-07 0 0 73
+63 3.57772e-10 0 0 70
+6c 1.816e-07 0 0 73
+63 1.41573e-10 0 0 70
+72 10 0 0 73
+74 90 49.5868 0 74
+6c 2.39392e-07 0 0 70
+63 1.1e-10 0 0 73
+74 158.631 20 0 74
+72 100 0 0 70
+63 8.05255e-11 0 0 70
+6c 1.331e-07 0 0 73
+GSMC Data File - end
diff --git a/gsmc.1.in b/gsmc.1.in
new file mode 100644
index 0000000..d6796c1
--- /dev/null
+++ b/gsmc.1.in
@@ -0,0 +1,375 @@
+.TH GSMC 1 "SEPTEMBER 2003" Linux "User Manuals"
+.SH NAME
+gsmc \- A GTK Smith Chart Calulator for RF impedance matching
+
+
+.SH SYNOPSIS
+.B gsmc
+
+.SH DESCRIPTION
+.B gsmc
+is a GTK application that allow to do all the calculation usually done
+on a Smith Chart.
+It permits to make calculation for network composed by resistor,
+capacitor, inductance, and trasmission line (also as stub).
+Network topology is limitated to series, parallel and as trasmissive
+for trasmission line. No series connection are allowed in parallel
+branch, neither parallel connection in series branch.
+Trasmission line can be placed as quadrupole or as a parallel or
+series stub, either opened or shorted at the other end.
+
+Calculation procedure starts with setting the initial impedance to be
+matched, next network elements are added and tuned to obtain the
+desidered impedance value.
+
+The network so obtained can be saved in spice format for other analisys;
+current work can be saved for succesive retrieve.
+
+The initial (start) impedance is thought as "the load" so when
+adding a trasmission line placed as a quadrupole rotation is
+clockwise, going "toward generator"; generator is placed after the
+last network element, as can be seen from spice output.
+
+
+.SH OPTIONS
+.TP
+None
+
+
+.SH INTERACTIVE COMMANDS
+.B gsmc
+is a menu based GTK application with as much as possible accelerators
+and mnemonics. Nearly all the command can to be issued as a single
+keystroke or keystroke with modifiers. This is, in the author's
+opinion, the preferable way for very specialistic programs that has to
+be used extensively.
+
+.IP Ctrl+q
+Quit the program.
+
+.IP Ctrl+1
+Toggle visualization of impedance (Z) circle
+
+.IP Ctrl+2
+Toggle visualization of admittance (Y) circle
+
+.IP Ctrl+3
+Toggle visualization of reflection coefficient (RHO) circle
+
+.IP Ctrl+4
+Toggle visualization of constant Q circle
+
+.IP s
+Set start point: can be entered as impedance, admittance or reflection
+coefficient
+
+.IP "Ctrl+0 (zero)"
+Set characteristic impedance z0
+
+.IP f
+Set frequency (f0)
+
+.IP r
+Add a resistor
+
+.IP l
+Add an inductor
+
+.IP c
+Add a capacitor
+
+.IP t
+Add a transmission line or stub
+
+.IP Shift+r
+Insert a resistor before the highlighted element
+
+.IP Shift+l
+Insert an inductor before the highlighted element
+
+.IP Shift+c
+Insert a capacitor before the highlighted element
+
+.IP Shift+t
+Insert a transmission line or stub before the highlighted element
+
+.IP d
+Delete the currently highligthed element
+
+.IP "Shift+Curs Up"
+Highlight previous element
+
+.IP "Shift+Curs Down"
+Highlight next element
+
+.IP "Shift+Curs Left"
+Decrease the first field of currently highlighted element
+
+.IP "Shift+Curs Rigth"
+Increase the first field of currently highlighted element
+
+.IP "Mod+Curs Left"
+Decrease the second field of currently highlighted element
+
+.IP "Mod+Curs Rigth"
+Increase the second field of currently highlighted element
+
+.IP "Mod+Curs Up"
+Increase the tuning step
+
+.IP "Mod+Curs Down"
+Decrease the tuning step
+
+.IP "Ctrl+w"
+Write network file in spice format
+
+.IP "Ctrl+n"
+Restart for a new calculation with a clean chart
+
+.IP =
+Change first field of currently highlighted element
+
+.IP "Mod+="
+Change second field of currently highlighted element
+
+.IP "Ctrl+a"
+Start autotune procedure (tune goal is characteristic impedance)
+
+.IP "Ctrl+x"
+Toggle lock flag in autotune procedure
+
+.IP "Ctrl+p"
+Write an EPS or PS file
+
+.IP "Ctrl+l"
+Load a previously saved .B gsmc
+job
+
+.IP "Ctrl+l"
+Save a .B gsmc
+job
+
+.IP "Ctrl+f"
+Increase frequency
+
+.IP "Shift+Ctrl+f"
+Decrease frequency
+
+.RE
+Check online keystroke for an updated list of commands.
+
+.B "DIALOG WIN"
+
+For operation that requires data entry a widget is created; it is
+composed by an text entry field and optionaly some radio button to
+chose the format of data entry.
+
+The format for data entry can be a single number, or a more complex
+string. First of all every number can be supplyed using standar prefix
+for unit of measure i.e.:
+.RS
+.IP a
+(atto) 1e-18
+.IP f
+(femto) 1e-15
+.IP p
+(pico) 1e-12
+.IP n
+(nano) 1e-9
+.IP u
+(micro) 1e-6
+.IP m
+(milli) 1e-3
+.IP k
+(kilo) 1e3
+.IP M
+(mega) 1e6
+.IP G
+(giga) 1e9
+.IP T
+(tera) 1e12
+.RE
+Note that for spice output format mega is written as MEG instead of M,
+that will be otherwise recognized by spice as milli.
+Unit of measure are not allowed to be in the text entered.
+
+Where a complex number is required both the rectangular and the polar
+format are recognized: the former can be supplied as '12.3-j456m'
+while the latter can be supplied as '34.2 145' meaning a modulus of
+34.2 with a phase of 145 degrees. If the complex number is purely
+immaginary only something like 'j82' can be supplied, while if
+immaginary part is zero a single number can be given. Immaginary operator
+can be issued as 'i' as well as 'j'.
+
+.SH DATA PRESENTATION
+The single window of
+.B gsmc
+is divided in four parts:
+.TP
+.BI \-
+The Smith chart itself in the upper left portion, where arcs and
+constant circle are drawn.
+
+.TP
+.BI \-
+The vertical bar on the rigth of the Smith chart, where initial, final
+and cursor impedance are presented togheter general data.
+
+.TP
+.BI \-
+The horizontal bar on the bottom of Smith chart where the network
+element are listed.
+
+.TP
+.BI \-
+The portion in the lower right portion, for future use...
+
+
+.SH EXAMPLE OF USE
+Let's try a simple example to understand how
+.B gsmc
+work. Suppose to have a load of 10-j35ohm to be matched to 50+j0ohm at
+an operating frequency of 15.5MHz and we can use only concentrated
+reactive elements, i.e. inductances and capacitors.
+
+So start with setting operating frequency: press 'f' and a dialog win
+will appear. Type in the string '15.5M' and then press enter. Now in the
+vertical bar the frequency entered is displayed.
+
+Next set the start point impedance: press 's' and a dialog win will
+appear with the title "Start Point"; select the format for start point
+either clicking the "Z" radio buttono or using the menmonic via Mod+Z.
+Now the impedance can be entered as the string '10-j35' followed by
+enter. The starting point is now displayed as a small circle.
+
+
+The network has now to be constructed: let start with a series
+inductance of 800nH, so press 'l' and next introduce the value as
+'800n', be sure that "Series" radio button is selected before pressing
+enter. TAB and Shift+TAB is usefull to move across items in dialog win
+without leave hands from keyboard.
+This value is really too large, use Shft+Left cursor to reduce a
+bit. Up to where? Let's help you displaing the admittance constant
+circles pressing "Ctrl+2", the arc should arrive to the G=1 circle
+(also called the mirror circle), it's arround 546nH.
+
+Now add a capacitor in parallel connection, saying of 200pF: press 'c'
+and insert the string '200p' and select Parallel either with mouse or
+with "Mod+p". Now the admittance circles may confuse, remove it by
+pressing "Ctrl+2" again. The value of 200pF is too small, enlarge it
+by pressing Shift+Left cursor up to get the end point near to the
+chart's center. The point reached with 429pF has nearly zero imaginary
+but is 43ohm of real part instead of 50ohm.
+
+So back to the inductance and try to modify it, with Shift+Cursor up
+move to the first component and then try to change the inductance value by
+pressing cursor left and right. The changes are too large and 50+j0
+cannot be reached. So press "Mod+Cursor down" and the "tunestep" value shown
+in the vertical bar is reduced from 10% to 5%, try again to use Shift+Curors
+left and right. It feel better. Now do the same on the capacitor,
+moving to it by pressing cursor down and than adjusting value as for
+the inductance.
+
+Final values should be arround 568nH and 408pF. Now you want to see
+what appen using the closest standard commercial values, that is 560nH
+and 390pF in the E12 series. Select (with Shift+Cursor Up), if needed, the
+inductance and then press '=', the dialog window appear (middle line
+is unused) and the string '560n s' has to be introduced. Next move to
+capacitor (Shift+Curs Down) and pressing '=' here insert '390p p'. The
+final result is of SWR=1.14, if it's enough for you...
+
+Moving the mouse to the point where the two arcs ends you can see that
+the point has an impedance of about 10+j20ohm.
+
+Trasmission line and resistor can be used similary refer to the
+section INTERACTIVE COMMANDS for knowing how they can be placed.
+The major difference with transmission line is that they have two
+parameter, the electrical lenght and the caracteristic impedance: the
+former can be adjusted with Shift+Cursor left/rigth as for resistor,
+inductance and capacitor; the latter can be adjusted with Mod+cursor
+left/right.
+
+Now the network can be saved either in a
+.B gsmc
+format (.gdt extension) by pressing Ctrl+s or in spice format pressing
+Ctrl+w: The file so generated can be now analized with a spice simulator or
+.B gnucap
+or
+.B ngspice
+; maybe you are interested in simulating it sweeping arround 15.5MHz,
+so modify the line
+
+ .ac lin 1 15.50MEG 15.50MEG
+
+in
+
+ .ac lin 51 10MEG 30MEG
+
+and run spice or
+.B gnucap
+.
+
+This example should be included in gsmc package an can be retreived by
+pressing Ctrl+l and selecting example1.gdt.
+
+Autotune algorithm is very primitive and may not reach what is very simple
+to do by hand, do not ask to much from it, work in progress...
+
+Charts so drawed can be printed to a Postscript or Encapsulated Postscript
+file; in printed file some information are added on the chart drawing as well
+as Circuit Description and some of the Current Value are transcripted.
+Automatic recognition of filename extension .eps or .ps allow to specify
+if the file has to be in encapsulated format or not.
+
+.SH FILES
+.B gsmc
+don't use special configuration file, a gtkrc file is supplied and can
+be tuned to user preferences; if present it must be in /root/.gsmc/gtkrc.
+File describing the network currently analized can be generated, it's
+only needed that a minimum file permission is allowed, if not the
+program will work but data could not be saved.
+
+Data file (.gdt) contain a copy of internal data structures in a quite
+human readable format; by inspection one can recognize and modify some
+parts using a text editor. For more details compare a .gdt file with
+smcdata struct defined in source file main.h.
+
+.SH LIMITATIONS
+Porting can be very very difficult, since all is based on X windows
+programming and GTK library, but for other platform a plenty of
+similar program are available, free and good one too.
+
+.SH BUGS
+Help me to find.
+
+.SH TODO
+
+.B \(bu
+Improve autotune algorithm
+
+.B \(bu
+Target settting (not alwais one want to match to z0) for autotune.
+
+.B \(bu
+Auxiliary window for error reporting instead of stderr.
+
+
+.SH COPYING
+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.
+
+
+.SH AUTHOR
+ Lapo Pieri (IK5NAX)
+
+ Home address: via A. dei Corbizi 9 I-50127 Firenze Italy
+ Phone: +39 055 410209
+ e-mail: ik5nax at amsat.org, lapo_pieri at virgilio.it
+ website: www.qsl.net/ik5nax
+
+.SH SEE ALSO
+.BR spice3 (?),
+.BR gnucap (1),
+.BR ngspice (1)
diff --git a/gtkrc b/gtkrc
new file mode 100644
index 0000000..66c5eb8
--- /dev/null
+++ b/gtkrc
@@ -0,0 +1,9 @@
+style "default"
+{
+ bg[NORMAL]={0.7, 0.8, 0.8}
+ font="-adobe-helvetica-medium-r-normal--*-75-*-*-*-*-*-*"
+
+}
+
+widget_class "*" style "default"
+
diff --git a/install-sh b/install-sh
new file mode 120000
index 0000000..85febee
--- /dev/null
+++ b/install-sh
@@ -0,0 +1 @@
+/usr/share/automake/install-sh
\ No newline at end of file
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..35b70ef
--- /dev/null
+++ b/main.c
@@ -0,0 +1,488 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+
+#include <stdio.h>
+#include <gtk/gtk.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <math.h>
+#include <time.h>
+#include "main.h"
+#include "widget.h"
+#include "calc.h"
+#include "draw.h"
+
+const char statlabelname[21][15]={"Z0= %sohm",
+ "f0= %sHz",
+ "",
+ "zSP= %sohm",
+ "ySP= %smho",
+ "rhoSP= %s",
+ "SWR= %s",
+ "",
+ "zEP= %sohm",
+ "yEP= %smho",
+ "rhoEP= %s",
+ "SWR= %s",
+ "",
+ "Tunestep= %s%%",
+ "Freqstep= %s%%",
+ "",
+ "zCU= %sohm",
+ "yCU= %smho",
+ "rhoCU= %s",
+ "SWR= %s"
+};
+
+GtkWidget *topwindow, *toptable, *scarea, *menubar;
+GtkTextBuffer *txtcircbuff, *txtstatbuff;
+GtkWidget *textcircdesc, *textstat;
+GtkWidget *statZ0, *statf0;
+GtkWidget *statarr[21];
+
+extern GtkItemFactoryEntry menu_items[];
+extern GtkItemFactory *item_factory;
+
+GdkPixmap *mainpixmap=NULL;
+int scdim;
+
+int Zcirc=0, Ycirc=0, RHOcirc=0, Qcirc=0, tsidx, i, fsidx;
+const float tunesteptab[6]={1.01, 1.02, 1.05, 1.1, 1.2, 1.5};
+const float freqsteptab[7]={.001, .002, .005, .01, .02, .05, .1};
+float tunestep=1.1;
+float freqstep=.01;
+
+SMCDATA smcdata;
+
+int main(int argc, char **argv) {
+ GtkWidget *tdscw, *tcfr, *statfr, *align;
+ int i, fdrc;
+ char buff[40];
+
+ /* GTK and top window init */
+ gtk_init(&argc, &argv);
+ if((fdrc=open("/root/.gsmc/gtkrc", O_RDONLY))!=-1){
+ close(fdrc);
+ gtk_rc_parse("/root/.gsmc/gtkrc");
+ }
+ topwindow=gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_usize(GTK_WIDGET(topwindow), 600, 550);
+ gtk_widget_set_name(topwindow, "topwindow");
+ gtk_window_set_title(GTK_WINDOW(topwindow), "GSMC - Smith Chart Calculator");
+ gtk_signal_connect(GTK_OBJECT(topwindow), "delete_event",
+ (GtkSignalFunc)main_quit, NULL);
+
+
+ /* Main table (toptable)*/
+ /* 0 1 2
+ 0+--------------------------+---------------+
+ | Menu |
+ 1+--------------------------+---------------+
+ | | |
+ | | |
+ | | "Status" |
+ | Smith Chart | |
+ | | |
+ | | |
+ | | |
+ | | |
+ | | |
+ | | |
+ 2+--------------------------+---------------+
+ | | |
+ | | |
+ | Circuit description | Entry |
+ | | dialog |
+ | | |
+ | | |
+ 3+--------------------------+---------------+
+ */
+ toptable=gtk_table_new(3, 2, FALSE);
+ gtk_container_add(GTK_CONTAINER(topwindow), toptable);
+
+ /* Menu creation */
+ menu_create(topwindow, &menubar);
+ gtk_table_attach(GTK_TABLE(toptable), menubar, 0, 3, 0, 1,
+ GTK_FILL, 0, 0, 1);
+ gtk_widget_show(menubar);
+
+ /* Smith Chart drawing area */
+ scarea=gtk_drawing_area_new();
+ gtk_drawing_area_size(GTK_DRAWING_AREA(scarea), 400, 400);
+ gtk_signal_connect(GTK_OBJECT(scarea), "expose_event",
+ GTK_SIGNAL_FUNC(mdw_expose_event), NULL);
+ gtk_signal_connect(GTK_OBJECT(scarea), "configure_event",
+ GTK_SIGNAL_FUNC(mdw_configure_event), NULL);
+
+ gtk_table_attach(GTK_TABLE(toptable), scarea, 0, 1, 1, 2,
+ GTK_FILL|GTK_EXPAND, GTK_FILL|GTK_EXPAND, 0, 2);
+ gtk_widget_show(scarea);
+
+ /* Text Circuit Description */
+ tcfr=gtk_frame_new("Circuit Description");
+ tdscw=gtk_scrolled_window_new(NULL, NULL);
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(tdscw),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
+ gtk_widget_set_usize(GTK_WIDGET(tdscw), 400, 90);
+
+ txtcircbuff=gtk_text_buffer_new(NULL);
+ gtk_text_buffer_set_text(txtcircbuff, "", 0);
+ textcircdesc=gtk_text_view_new_with_buffer(txtcircbuff);
+ gtk_text_buffer_create_tag(txtcircbuff, "highlighted",
+ "background", "green", NULL);
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(textcircdesc), FALSE);
+ gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(textcircdesc), FALSE);
+ gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(tdscw),
+ textcircdesc);
+ gtk_container_add(GTK_CONTAINER(tcfr), tdscw);
+ gtk_table_attach(GTK_TABLE(toptable), tcfr, 0, 1, 2, 3,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show(textcircdesc);
+ gtk_widget_show(tcfr); gtk_widget_show(tdscw);
+
+ /* Text Status */
+ statfr=gtk_frame_new("Current value");
+ textstat=gtk_table_new(21, 1, TRUE);
+ gtk_widget_set_usize(GTK_WIDGET(textstat), 200, 350);
+
+ for(i=0; i<21; i++){
+ sprintf(buff, statlabelname[i], "0.00");
+ statarr[i]=gtk_label_new(buff);
+ gtk_label_set_justify(GTK_LABEL(statarr[i]), GTK_JUSTIFY_LEFT);
+ align=gtk_fixed_new(); gtk_fixed_put(GTK_FIXED(align), statarr[i], 5, 0);
+ gtk_table_attach(GTK_TABLE(textstat), align, 0, 1, i, i+1,
+ GTK_FILL, 0, 0, 0);
+ gtk_widget_show(statarr[i]);
+ gtk_widget_show(align);
+ }
+
+ gtk_container_add(GTK_CONTAINER(statfr), textstat);
+ gtk_table_attach(GTK_TABLE(toptable), statfr, 1, 2, 1, 2,
+ GTK_FILL, GTK_FILL, 0, 0);
+ gtk_widget_show(statfr); gtk_widget_show(textstat);
+
+
+ /* Data init */
+ smcdata.SPtype=SPTYPE_Z; smcdata.reentrySP=50.; smcdata.imentrySP=0.;
+ smcdata.z0=50.; smcdata.f0=1e6; tsidx=3; fsidx=3;
+ tunestep=tunesteptab[tsidx]; tunestep=tunesteptab[fsidx];
+ recalc(); showtextstat();
+ for(i=0; i<=NEL; i++)
+ smcdata.ELlocked[i]=0;
+ smcdata.projectname[0]='\0';
+
+ /* Signal for cursor position display */
+ g_signal_connect(G_OBJECT(scarea), "motion_notify_event",
+ G_CALLBACK(cursor_motion_in_sc), NULL);
+
+ gtk_widget_set_events(scarea,GDK_POINTER_MOTION_MASK
+ | GDK_POINTER_MOTION_HINT_MASK);
+
+
+ /* Startup */
+ gtk_widget_show(toptable);
+ gtk_widget_show(topwindow);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtk_item_factory_get_item(item_factory, "/View/Impedance")), TRUE);
+ gtk_main();
+
+ return 0;
+}
+
+
+gint mdw_expose_event(GtkWidget *widget, GdkEventExpose *event,
+ gpointer user_data __attribute__((unused))){
+ gdk_draw_pixmap(widget->window,
+ widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
+ mainpixmap,
+ event->area.x, event->area.y,
+ event->area.x, event->area.y,
+ event->area.width, event->area.height);
+
+ return FALSE;
+}
+
+gint mdw_configure_event(GtkWidget *widget,
+ GdkEventExpose *event __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+
+ if(mainpixmap)
+ gdk_pixmap_unref(mainpixmap);
+
+ /* Smith Chart dimension retrieve */
+ scdim=widget->allocation.width;
+ if(widget->allocation.height<scdim)
+ scdim=widget->allocation.height;
+
+ mainpixmap=gdk_pixmap_new(widget->window, scdim, scdim, -1);
+ gdk_draw_rectangle(mainpixmap,
+ widget->style->white_gc,
+ TRUE,
+ 0, 0,
+ scdim, scdim);
+ setup_gcs();
+ drawchart();
+ return TRUE;
+}
+
+
+
+/* Non va qui, ma non mi ricordo cosa faccia */
+void removene(void) {
+ int i;
+ for(i=smcdata.neidx; i<smcdata.ne; i++) {
+ smcdata.ELtype[i]=smcdata.ELtype[i+1];
+ smcdata.ELval0[i]=smcdata.ELval0[i+1];
+ smcdata.ELval1[i]=smcdata.ELval1[i+1];
+ smcdata.ELval2[i]=smcdata.ELval2[i+1];
+ smcdata.ELplace[i]=smcdata.ELplace[i+1];
+ smcdata.rerhoIP[i]=smcdata.rerhoIP[i+1];
+ smcdata.imrhoIP[i]=smcdata.imrhoIP[i+1];
+ }
+ smcdata.ne--; if(smcdata.neidx>smcdata.ne) smcdata.neidx--;
+}
+
+
+void writespice(char *b) {
+ FILE *spf;
+ int i, nr=0, nc=0, nl=0, nt=0, nod=0, nos=0, node=0;
+ float vr, vi;
+ char buff[40];
+
+ if((spf=fopen(b, "w"))==NULL) {
+ fprintf(stderr, "Unable to open file %s for writing\n", b);
+ return;
+ }
+
+ fprintf(spf, "Network generated by GTK Smith Chart Calculator\n");
+ fprintf(spf, "* Check/modify this file before simulation\n\n");
+
+ /* Start impedance is saved as a series of a resistance and a reactance
+ and as a parallel network, the last is commented */
+ rho2z(smcdata.rerhoIP[0], smcdata.imrhoIP[0], &vr, &vi);
+ node++;
+ float2prefs(vr*smcdata.z0, buff, 1);
+ fprintf(spf, "rsp %d %d %s\n", node-1, node, buff);
+ node++;
+ if(vi<0.) {
+ float2prefs(-1./(2.*M_PI*smcdata.f0*vi*smcdata.z0), buff, 1);
+ fprintf(spf, "csp %d %d %s\n", node-1, node, buff);
+ }
+ else {
+ float2prefs(vi*smcdata.z0/(2.*M_PI*smcdata.f0) ,buff, 1);
+ fprintf(spf, "lsp %d %d %s\n", node-1, node, buff);
+ }
+
+ rho2y(smcdata.rerhoIP[0], smcdata.imrhoIP[0], &vr, &vi);
+ float2prefs(smcdata.z0/vr ,buff, 1);
+ fprintf(spf, "* rsp %d %d %s\n", node, 0, buff);
+ if(vi>=0.) {
+ float2prefs(vi/smcdata.z0/(2.*M_PI*smcdata.f0), buff, 1);
+ fprintf(spf, "* csp %d %d %s\n", node, 0, buff);
+ }
+ else {
+ float2prefs(-1./(2.*M_PI*smcdata.f0*vi/smcdata.z0), buff, 1);
+ fprintf(spf, "* lsp %d %d %s\n", node, 0, buff);
+ }
+
+ for(i=1; i<=smcdata.ne; i++) {
+ switch(tolower(smcdata.ELtype[i])) {
+ case 'r':
+ nr++;
+ if(smcdata.ELplace[i]=='s') {
+ node++; float2prefs(smcdata.ELval0[i], buff, 1);
+ fprintf(spf, "r%d %d %d %s\n", nr, node-1, node, buff);
+ }
+ else {
+ float2prefs(smcdata.ELval0[i], buff, 1);
+ fprintf(spf, "r%d %d %d %s\n", nr, node, 0, buff);
+ }
+ break;
+ case 'l':
+ nl++;
+ if(smcdata.ELplace[i]=='s') {
+ node++; float2prefs(smcdata.ELval0[i], buff, 1);
+ fprintf(spf, "l%d %d %d %s\n", nl, node-1, node, buff);
+ }
+ else {
+ float2prefs(smcdata.ELval0[i], buff, 1);
+ fprintf(spf, "l%d %d %d %s\n", nl, node, 0, buff);
+ }
+ break;
+ case 'c':
+ nc++;
+ if(smcdata.ELplace[i]=='s') {
+ node++; float2prefs(smcdata.ELval0[i], buff, 1);
+ fprintf(spf, "c%d %d %d %s\n", nc, node-1, node, buff);
+ }
+ else {
+ float2prefs(smcdata.ELval0[i], buff, 1);
+ fprintf(spf, "c%d %d %d %s\n", nc, node, 0, buff);
+ }
+ break;
+ case 't':
+ nt++;
+ switch(tolower(smcdata.ELplace[i])) {
+ case 't':
+ node++; float2prefs(smcdata.ELval1[i], buff, 1);
+ fprintf(spf, "t%d %d %d %d %d z0=%s ", nt, node-1, 0, node, 0, buff);
+ float2prefs(smcdata.f0, buff, 1);
+ fprintf(spf, "f=%s nl=%f\n", buff, smcdata.ELval0[i]/360.);
+ break;
+ case 'o':
+ nod+=2; float2prefs(smcdata.ELval1[i], buff, 1);
+ fprintf(spf, "t%d %d %d %dd %dd z0=%s ",
+ nt, node, 0, nod-1, nod, buff);
+ float2prefs(smcdata.f0, buff, 1);
+ fprintf(spf, "f=%s nl=%f\n", buff, smcdata.ELval0[i]/360.);
+ break;
+ case 'c':
+ nos++; float2prefs(smcdata.ELval1[i], buff, 1);
+ fprintf(spf, "t%d %d %d %dd %dd z0=%s ", nt, node, 0, nos, nos, buff);
+ float2prefs(smcdata.f0, buff, 1);
+ fprintf(spf, "f=%s nl=%f\n", buff, smcdata.ELval0[i]/360.);
+ break;
+ case 'l':
+ node++; nos++; float2prefs(smcdata.ELval1[i], buff, 1);
+ fprintf(spf, "t%d %d %d %dd %dd z0=%s ",
+ nt, node-1, node, nos, nos, buff);
+ float2prefs(smcdata.f0, buff, 1);
+ fprintf(spf, "f=%s nl=%f\n", buff, smcdata.ELval0[i]/360.);
+ break;
+ case 'a':
+ node++; nos+=2; float2prefs(smcdata.ELval1[i], buff, 1);
+ fprintf(spf, "t%d %d %d %dd %dd z0=%s ",
+ nt, node-1, node, nos-1, nos, buff);
+ float2prefs(smcdata.f0, buff, 1);
+ fprintf(spf, "f=%s nl=%f\n", buff, smcdata.ELval0[i]/360.);
+ break;
+
+ }
+ break;
+ default: fprintf(spf, "* Unknown component '%c'\n", smcdata.ELtype[i]);
+ }
+ }
+
+ node++;
+ float2prefs(smcdata.z0, buff, 1);
+ fprintf(spf, "r0 %d %d %s\n", node-1, node, buff);
+ fprintf(spf, "v1 %d %d dc 0 ac 1\n", node, 0);
+
+ float2prefs(smcdata.f0, buff, 1);
+ fprintf(spf, "\n.ac lin 1 %s %s\n", buff, buff);
+ fprintf(spf, ".end\n");
+ fclose(spf);
+}
+
+
+void savegw(char *b) {
+ FILE *gwd;
+ int i;
+ time_t now;
+
+ if((gwd=fopen(b, "w"))==NULL) {
+ fprintf(stderr, "Unable to open file %s for writing\n", b);
+ return;
+ }
+
+ strncpy(smcdata.projectname, b, 255);
+
+ now=time(NULL);
+ fprintf(gwd, "GSMC Data File %s on %s\n", b, ctime(&now));
+
+ fprintf(gwd, "z0: %g\n", smcdata.z0);
+ fprintf(gwd, "f0: %g\n", smcdata.f0);
+
+ fprintf(gwd, "StartPoint: %x %g %g %g %g %g %g %g %g\n",
+ smcdata.SPtype, smcdata.reentrySP, smcdata.imentrySP,
+ smcdata.rezSP, smcdata.imzSP, smcdata.reySP, smcdata.imySP,
+ smcdata.rerhoSP, smcdata.imrhoSP);
+
+ fprintf(gwd, "Elements: %d %d\n", smcdata.ne, smcdata.neidx);
+
+ for(i=0; i<=smcdata.ne; i++)
+ fprintf(gwd, "%x %g %g %g %x\n", smcdata.ELtype[i], smcdata.ELval0[i],
+ smcdata.ELval1[i], smcdata.ELval2[i], smcdata.ELplace[i]);
+
+ fprintf(gwd, "GSMC Data File - end\n");
+
+ fclose(gwd);
+}
+
+void loadgw(char *b) {
+ FILE *gwd;
+ char buff[101], c;
+ float v;
+ int i;
+
+ if((gwd=fopen(b, "r"))==NULL) {
+ fprintf(stderr, "Unable to open file %s\n", b);
+ restart(NULL, NULL); return;
+ }
+
+ strncpy(smcdata.projectname, b, 255);
+
+ fgets(buff, 100, gwd);
+ fscanf(gwd, "%s %g", buff, &smcdata.z0);
+ if(strcmp(buff, "z0:")!=0){
+ fprintf(stderr, "Error reading file %s\n", b);
+ restart(NULL, NULL); return;
+ }
+
+ fscanf(gwd, "%s %g", buff, &smcdata.f0);
+ if(strcmp(buff, "f0:")!=0){
+ fprintf(stderr, "Error reading file %s\n", b);
+ restart(NULL, NULL); return;
+ }
+
+ fscanf(gwd, "%s %x %g %g %g %g %g %g %g %g", buff,
+ &smcdata.SPtype, &smcdata.reentrySP, &smcdata.imentrySP,
+ &smcdata.rezSP, &smcdata.imzSP, &smcdata.reySP, &smcdata.imySP,
+ &smcdata.rerhoSP, &smcdata.imrhoSP);
+ if(strcmp(buff, "StartPoint:")!=0){
+ fprintf(stderr, "Error reading file %s\n", b);
+ restart(NULL, NULL); return;
+ }
+
+ fscanf(gwd, "%s %d %d\n", buff, &smcdata.ne, &smcdata.neidx);
+ if(strcmp(buff, "Elements:")!=0){
+ fprintf(stderr, "Error reading file %s\n", b);
+ restart(NULL, NULL); return;
+ }
+
+ for(i=0; i<=smcdata.ne; i++)
+ if(fscanf(gwd, "%x %g %g %g %x", &smcdata.ELtype[i], &smcdata.ELval0[i],
+ &smcdata.ELval1[i], &smcdata.ELval2[i], &smcdata.ELplace[i])!=5)
+ {
+ fprintf(stderr, "Error reading file %s\n", b);
+ restart(NULL, NULL); return;
+ }
+
+ fclose(gwd);
+ recalc(); drawchart(); showtextstat(); showcircdesc();
+}
+
diff --git a/main.h b/main.h
new file mode 100644
index 0000000..1355e4d
--- /dev/null
+++ b/main.h
@@ -0,0 +1,115 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+/*---------------------------------------------------------------------------
+ Definitions & Constants
+ ---------------------------------------------------------------------------*/
+#define NEL 32 /* Max number of network elements (???) */
+#define QZ 0.05 /* Quasi-Zero: to draw arc as lines */
+#define __VERSION "1.1" /* Current version */
+
+#define SPTYPE_UNDEF 0
+#define SPTYPE_Z 1
+#define SPTYPE_Y 2
+#define SPTYPE_RHO 3
+
+#define labelZ0 0
+#define labelf0 1
+#define labelzSP 3
+#define labelySP 4
+#define labelrhoSP 5
+#define labelSWRSP 6
+#define labelzEP 8
+#define labelyEP 9
+#define labelrhoEP 10
+#define labelSWREP 11
+#define labeltunestep 13
+#define labelfreqstep 14
+#define labelzCU 16
+#define labelyCU 17
+#define labelrhoCU 18
+#define labelSWRCU 19
+
+
+/*---------------------------------------------------------------------------
+ Data Strucutures
+ ---------------------------------------------------------------------------*/
+typedef struct maindata{
+ /* General data */
+ float z0; /* Characteristic impedance [ohm] */
+ float f0; /* Main frequency [Hz] */
+
+ /* Cursor point */
+ float rerhoCU; /* Real part of reflection coefficient at cursor */
+ float imrhoCU; /* Imaginary part of reflection coefficient at cursor */
+
+ /* Start Point */
+ char SPtype; /* Type of start point supplyed */
+ float reentrySP;/* Real part of start point impedance [ohm] */
+ float imentrySP;/* Imaginary part of start point impedance [ohm] */
+
+
+ float rezSP; /* Real part of start point impedance [ohm] */
+ float imzSP; /* Imaginary part of start point impedance [ohm] */
+ float reySP; /* Real part of start point admittance [S] */
+ float imySP; /* Imaginary part of start point admittance [S] */
+ float rerhoSP; /* Real part of start point reflection coefficient [] */
+ float imrhoSP; /* Immaginary part of start point reflection coefficient []*/
+
+ /* Network data */
+ int ne; /* Number of element present in network (<=NEL) */
+ int neidx; /* Currently selected element */
+ char ELtype[NEL+1]; /* Network element type: R, L, C, T */
+ /* R=resistor, C=capacitor, L=inductor,
+ T=transmision line */
+ float ELval0[NEL+1]; /* Value 0 for network element (R, L, C, lenght of T)
+ [ohm], [H], [F], [m] */
+ float ELval1[NEL+1]; /* Value 0 for network element (z0 of T) [ohm] */
+ float ELval2[NEL+1]; /* Value 0 for network element (atten of T) [dB/m]*/
+ char ELplace[NEL+1]; /* Placement of component: s=series, p=parallel, ...
+ to be enlarged with transmission line */
+
+ char ELlocked[NEL+1]; /* =1 if element is locked for autotune (i.e. cannot
+ be touched from autotune algorithm), 0 otherwise */
+
+ /* Impedance point */
+ float rerhoIP[NEL+1];
+ float imrhoIP[NEL+1];
+
+ /* Misc */
+ char projectname[256]; /* Name of the project (i.e. the .gdt file) */
+
+}SMCDATA;
+
+
+
+/*---------------------------------------------------------------------------
+ Function Prototypes
+ ---------------------------------------------------------------------------*/
+gint mdw_expose_event(GtkWidget *, GdkEventExpose *, gpointer),
+ mdw_configure_event(GtkWidget *, GdkEventExpose *, gpointer);
+
+void writespice(char *);
+void removene(void);
+
diff --git a/missing b/missing
new file mode 120000
index 0000000..8d846eb
--- /dev/null
+++ b/missing
@@ -0,0 +1 @@
+/usr/share/automake/missing
\ No newline at end of file
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 120000
index 0000000..6f7fb8c
--- /dev/null
+++ b/mkinstalldirs
@@ -0,0 +1 @@
+/usr/share/automake/mkinstalldirs
\ No newline at end of file
diff --git a/print.c b/print.c
new file mode 100644
index 0000000..5485b97
--- /dev/null
+++ b/print.c
@@ -0,0 +1,579 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+#include <stdio.h>
+#include <math.h>
+#include <string.h>
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <ctype.h>
+#include <time.h>
+#include "main.h"
+#include "calc.h"
+#include "print.h"
+// jvdh 2004-3-30
+
+extern SMCDATA smcdata;
+extern int Zcirc, Ycirc, RHOcirc, Qcirc;
+
+float psdim=510.236; /* chart diameter=180mm */
+
+void psdrawchart(FILE *f){
+ int i, n, step;
+ float R, X, G, B, sa, ea, a;
+ float rer, imr, rer1, imr1, rer2, imr2;
+
+ fprintf(f, "\n%%Chart border and j=0 line\nnewpath\n0 setlinewidth\n");
+ psdrawArc(f, psdim/2, psdim/2, psdim, psdim, 0, 360);
+ psdrawLine(f, -1., 0., 1., 0.);
+ fprintf(f, "0. 0. 0. setrgbcolor\nstroke\n");
+
+ if(Zcirc) {
+ fprintf(f, "\n%%Constant Impedance circle\nnewpath\n");
+ psdrawRk(f, 0.2); psdrawRk(f, 0.5); psdrawRk(f, 1); psdrawRk(f, 2);
+ psdrawXk(f, 0.2); psdrawXk(f, 0.5); psdrawXk(f, 1); psdrawXk(f, 2);
+ psdrawXk(f, -0.2); psdrawXk(f, -0.5); psdrawXk(f, -1); psdrawXk(f, -2);
+ fprintf(f, "stroke\n");
+ }
+
+ if(Ycirc) {
+ fprintf(f, "\n%%Constant Admittance circle\nnewpath\n");
+ psdrawGk(f, 0.2); psdrawGk(f, 0.5); psdrawGk(f, 1); psdrawGk(f, 2);
+ psdrawBk(f, 0.2); psdrawBk(f, 0.5); psdrawBk(f, 1); psdrawBk(f, 2);
+ psdrawBk(f, -0.2); psdrawBk(f, -0.5); psdrawBk(f, -1); psdrawBk(f, -2);
+ fprintf(f, "stroke\n");
+ }
+
+
+ if(RHOcirc) {
+ fprintf(f, "\n%%Constant Coefficient of Reflection circle\nnewpath\n");
+ psdrawRHOk(f, 0.25); psdrawRHOk(f, 0.5); psdrawRHOk(f, 0.75);
+ }
+
+ if(Qcirc) {
+ fprintf(f, "\n%%Constant Q circle\nnewpath\n");
+ psdrawQk(f, 0.5); psdrawQk(f, 1); psdrawQk(f, 2); psdrawQk(f, 5);
+ }
+
+ /* Start point */
+ fprintf(f, "\n%%Start Point\nnewpath\n");
+ psdrawSP(f, smcdata.rerhoSP, smcdata.imrhoSP);
+
+}
+
+void psdrawArc(FILE* f, float x0,float y0,float w,float h,float a0,float a1){
+ if (w==h) {
+ fprintf(f,"%.2f %.2f %.2f %.2f %.2f arc",x0,y0,w/2.,a0,a1);
+ if (a0>a1) {
+ fprintf(f,"n"); //clockwise arc - default is anticlockwise
+ }
+ fprintf(f,"\n");
+ }
+ else { //ellipse!!
+ }
+}
+
+void psdrawLine(FILE* f,float rerhoi, float imrhoi,
+ float rerhof, float imrhof) {
+ float x1, y1, x2, y2;
+
+ x1=(rerhoi+1.)/2.*psdim; y1=(1.+imrhoi)/2.*psdim;
+ x2=(rerhof+1.)/2.*psdim; y2=(1.+imrhof)/2.*psdim;
+ fprintf(f,"%.2f %.2f moveto\n",x1,y1);
+ fprintf(f,"%.2f %.2f lineto\n",x2,y2);
+}
+
+void psdrawX(FILE* f, float X, float sa, float al) {
+ float xc, yc, r;
+ float x, y, w, h;
+
+ if(fabs(X)>QZ) {
+ xc=1.; yc=1./X; r=1./fabs(X);
+ x=((xc+1.)/2.*psdim); y=((1.+yc)/2.*psdim);//#
+ w=(r*psdim); h=(r*psdim);
+ psdrawArc(f,x, y, w, h, sa, al);
+ }
+
+ else {
+ yc=X/2.; y=((1.-yc)/2.*psdim);
+ yc=0; h=((1.-yc)/2.*psdim);
+ xc=sa; x=((xc+1.)/2.*psdim);
+ xc=al; w=((xc+1.)/2.*psdim);
+ fprintf(f,"%.2f %.2f moveto\n",x,y);
+ fprintf(f,"%.2f %.2f lineto\n",w,h);
+ }
+}
+
+
+void psdrawRk(FILE* f, float R) {
+ float xc, yc, r;
+ float x, y, w, h;
+
+ xc=R/(1.+R); yc=0; r=1./(1.+R);
+ x=((xc+1.)/2.*psdim); y=((1.-yc)/2.*psdim);
+ w=(r*psdim); h=(r*psdim);
+
+ fprintf(f, "%.2f %.2f moveto\n", x+w/2., y);
+ fprintf(f, "%.2f %.2f %.2f 0.00 360.00 arc\n", x, y, w/2.);
+ fprintf(f, "1.0 0. 0. setrgbcolor\n");
+ fprintf(f, "/Helvetica findfont\n8 scalefont\nsetfont\n");
+ fprintf(f, "%.2f %.2f moveto\n", x-h/2.+2., (float)(psdim/2.-8.));
+ fprintf(f, "1.0 0. 0. setrgbcolor\n(%.1f) show\n", R*smcdata.z0);
+}
+
+void psdrawXk(FILE* f, float X){
+ float xc, yc, r;
+ float x, y, w, h;
+
+ if(X!=0.) {
+ xc=1.; yc=1./X; r=1./fabs(X);
+
+ x=(int)((xc+1.)/2.*psdim); y=(int)((1-yc)/2.*psdim);
+ w=(int)(r*psdim); h=(int)(r*psdim);
+ if(X<0.){
+ fprintf(f, "%.2f %.2f moveto\n", (float)psdim, (float)psdim/2.);
+ fprintf(f, "%.2f %.2f %.2f %.2f %.2f arc\n",
+ x, y-h, h/2., 90., -2.*180./M_PI*atan(X)+90.);
+ }
+ else{
+ fprintf(f, "%.2f %.2f moveto\n", (float)psdim, (float)psdim/2.);
+ fprintf(f, "%.2f %.2f %.2f %.2f %.2f arcn\n",
+ x, y+h, h/2., 270., -2.*180./M_PI*atan(X)+270.);
+ fprintf(f, "/Helvetica findfont\n8 scalefont\nsetfont\n");
+ fprintf(f, "%.2f %.2f rmoveto\n", fabs(X)<1.?-24.:+6., +8.);
+ fprintf(f, "(+j%.1f) show\n", X*smcdata.z0);
+
+ }
+ }
+}
+
+
+void psdrawGk(FILE* f, float G){
+ float xc, yc, r;
+ float x, y, w, h;
+
+ xc=-G/(1.+G); yc=0; r=1./(1.+G);
+ x=(int)((xc+1.)/2.*psdim); y=(int)((1.-yc)/2.*psdim);
+ w=(int)(r*psdim); h=(int)(r*psdim);
+
+ fprintf(f, "%.2f %.2f moveto\n", x-w/2., y);
+ fprintf(f, "%.2f %.2f %.2f 0.00 360.00 arc\n", x, y, w/2.);
+ fprintf(f, "0. 0. 1.0 setrgbcolor\n");
+ fprintf(f, "/Helvetica findfont\n8 scalefont\nsetfont\n");
+ fprintf(f, "%.2f %.2f moveto\n", x+h/2.-25., (float)(psdim/2.+2.));
+ fprintf(f, "0. 0. 1.0 setrgbcolor\n(%.3f) show\n", G/smcdata.z0);
+}
+
+
+void psdrawBk(FILE* f,float B) {
+ float xc, yc, r;
+ float x, y, w, h;
+
+ if(B!=0.) {
+ xc=-1.; yc=1./B; r=1./fabs(B);
+
+ x=(int)((xc+1.)/2.*psdim); y=(int)((1-yc)/2.*psdim);
+ w=(int)(r*psdim); h=(int)(r*psdim);
+ if(B<0.){
+ fprintf(f, "%.2f %.2f moveto\n", 0., (float)psdim/2.);
+ fprintf(f, "%.2f %.2f %.2f %.2f %.2f arcn\n",
+ x, y-h, h/2., 90., -2.*180./M_PI*atan(1./B)-90.);
+ fprintf(f, "/Helvetica findfont\n8 scalefont\nsetfont\n");
+ fprintf(f, "%.2f %.2f rmoveto\n", fabs(B)>1.?-24.:+6., -8.);
+ fprintf(f, "(-j%.3f) show\n", fabs(B)/smcdata.z0);
+
+ }
+ else{
+ fprintf(f, "%.2f %.2f moveto\n", 0., (float)psdim/2.);
+ fprintf(f, "%.2f %.2f %.2f %.2f %.2f arc\n",
+ x, y+h, h/2., 270., -2.*180./M_PI*atan(1./B)+90.);
+
+ }
+ }
+
+}
+
+
+void psdrawRHOk(FILE* f, float RHO) {
+ float xc, yc, r;
+ float x, y, w, h;
+
+ xc=0.; yc=0.; r=RHO;
+ x=((xc+1.)/2.*psdim); y=((1.-yc)/2.*psdim);
+ w=(r*psdim); h=(r*psdim);
+
+ fprintf(f, "0.5 0.5 0.5 setrgbcolor\n");
+ fprintf(f, "%.2f %.2f moveto\n", 0., psdim/2.);
+ fprintf(f, "%.2f %.2f %.2f 0.00 360.00 arc\n", x, y, w/2.);
+ fprintf(f, "/Helvetica findfont\n8 scalefont\nsetfont\n");
+ fprintf(f, "%.2f %.2f moveto\n", x+w/2./sqrt(2.)+2., y+h/2./sqrt(2.)+2.);
+ fprintf(f, "(%.2f) show\nstroke\n", RHO);
+}
+
+void psdrawQk(FILE* f, float Q) {
+ float xc, yc, r;
+ float x, y, w, h;
+
+ xc=0.; yc=1./Q; r=sqrt(1.+1./Q/Q);
+ x=((xc+1.)/2.*psdim); y=((1.-yc)/2.*psdim);
+ w=(r*psdim); h=(r*psdim);
+
+ fprintf(f, "0. 1.0 0. setrgbcolor\n");
+ fprintf(f, "%.2f %.2f moveto\n", (float)psdim, (float)psdim/2.);
+ fprintf(f, "%.2f %.2f %.2f %.2f %.2f arc\n", x, y, w/2.,
+ 90.-180./M_PI*atan(Q), 90+180./M_PI*atan(Q));
+ fprintf(f, "/Helvetica findfont\n8 scalefont\nsetfont\n");
+ fprintf(f, "%.2f %.2f moveto\n", x-8., y+h/2.+2.);
+ fprintf(f, "(%.1f) show\n", Q);
+
+ xc=0.; yc=-1./Q; r=sqrt(1.+1./Q/Q);
+ x=((xc+1.)/2.*psdim); y=((1.-yc)/2.*psdim);
+ w=(r*psdim); h=(r*psdim);
+
+ fprintf(f, "%.2f %.2f moveto\n", (float)psdim/2., (float)psdim);
+ fprintf(f, "%.2f %.2f %.2f %.2f %.2f arc\n", x, y, w/2.,
+ 270.-180./M_PI*atan(Q), 270.+180/M_PI*atan(Q));
+
+ fprintf(f, "stroke\n");
+}
+
+
+void psdrawR(FILE* f, float R, float sa, float al) {
+ float xc, yc, r;
+ float x, y, w, h;
+
+ xc=R/(1.+R); yc=0; r=1./(1.+R);
+ x=((xc+1.)/2.*psdim); y=((1.-yc)/2.*psdim);
+ w=(r*psdim); h=(r*psdim);
+
+ psdrawArc(f,x, y, w, h, sa, al);
+}
+
+
+
+void psdrawG(FILE* f, float G, float sa, float al){
+ float xc, yc, r;
+ float x, y, w, h;
+
+ xc=-G/(1.+G); yc=0; r=1./(1.+G);
+ x=(int)((xc+1.)/2.*psdim); y=(int)((1.-yc)/2.*psdim);
+ w=(int)(r*psdim); h=(int)(r*psdim);
+ psdrawArc(f,x, y, w, h, sa, al);
+}
+
+
+void psdrawB(FILE* f,float B, float sa, float al) {
+ float xc, yc, r;
+ int x, y, w, h;
+
+ if(fabs(B)>QZ) {
+ xc=-1.; yc=-1./B; r=1./fabs(B);
+ x=(int)((xc+1.)/2.*psdim); y=(int)((1.+yc)/2.*psdim);
+ w=(int)(r*psdim); h=(int)(r*psdim);
+
+ psdrawArc(f,x, y, w, h, sa, al);
+ }
+
+ else {
+ yc=-B/2.; y=(int)((1.-yc)/2.*psdim);
+ yc=0; h=(int)((1.-yc)/2.*psdim);
+ xc=sa; x=(int)((xc+1.)/2.*psdim);
+ xc=al; w=(int)((xc+1.)/2.*psdim);
+
+ fprintf(f,"%.2f %.2f moveto\n",x,y);
+ fprintf(f,"%.2f %.2f lineto\n",w,h);
+ }
+}
+
+
+void psdrawSP(FILE *f, float rerho, float imrho) {
+ float x, y, r, i;
+
+ switch(smcdata.SPtype){
+ case SPTYPE_Z: rho2z(rerho, imrho, &r, &i);
+ r*=smcdata.z0; i*=smcdata.z0; fprintf(f, "1.0 0. 0. setrgbcolor\n");
+ break;
+ case SPTYPE_Y: rho2y(rerho, imrho, &r, &i);
+ r/=smcdata.z0; i/=smcdata.z0; fprintf(f, "0. 0. 1.0 setrgbcolor\n");
+ break;
+ case SPTYPE_RHO: r=rerho; i=imrho; fprintf(f, "0.5 0.5 0.5 setrgbcolor\n");
+
+ break;
+ case SPTYPE_UNDEF:
+ default:
+ return;
+ }
+
+ x=((rerho+1.)/2.*psdim); y=((1.+imrho)/2.*psdim);
+ fprintf(f, "%.2f %.2f moveto\n", x+2., y);
+ fprintf(f, "%.2f %.2f 2. 0. 360. arc\nfill\n",
+ x, y);
+ fprintf(f, "/Helvetica findfont\n8 scalefont\nsetfont\n");
+ fprintf(f, "%.2f %.2f moveto\n", x-24., y-10.);
+ fprintf(f, "(%5.3f%cj%5.3f) show\n", r, i<0.?'-':'+', fabs(i));
+}
+
+
+void writePS(char* b){
+ FILE *psf, *templ;
+ int i, n, step, eps;
+ float R, X, G, B, sa, ea, a, x1, y1;
+ float rer, imr, rer1, imr1, rer2, imr2;
+ int x,y;
+ char buff[256], buff2[256], fname[80];
+ time_t t;
+
+ if((psf=fopen(b, "w"))==NULL) {
+ fprintf(stderr, "Unable to open file %s for writing\n", b);
+ return;
+ }
+
+ if(strstr(b, ".eps")!=NULL)
+ eps=1;
+ else if (strstr(b, ".ps")!=NULL)
+ eps=0;
+ else{
+ fprintf(stderr,
+ "Unable to determine file format for %s (.ps and .eps allowed)\n",
+ b);
+ return;
+ }
+
+ /* Beginning of PS file */
+ if(eps)
+ fprintf(psf, "%%!PS-Adobe EPSF-3.0\n%%%%Title: %s\n", "GSMC printout");
+ else
+ fprintf(psf, "%%!PS-Adobe-3.0\n%%%%Title: %s\n", "GSMC printout");
+ fprintf(psf, "%%%%BoundingBox: %d %d %d %d\n", 0, 0, 595, 842); /*A4 paper*/
+
+ fprintf(psf, "%.2f %.2f translate\n", 50., (float)psdim/2.-30.);
+
+ fprintf(psf, "%%Page heading\n");
+ fprintf(psf, "/Helvetica findfont\n20 scalefont\nsetfont\n");
+ fprintf(psf, "newpath\n%.2f %.2f moveto\n(GSMC printout) show\n",
+ (float)psdim/2.-70., (float)psdim+50.);
+ fprintf(psf, "/Helvetica findfont\n10 scalefont\nsetfont\n");
+ fprintf(psf, "%.2f %.2f moveto\n(source file: %s) show\n",
+ 10., (float)psdim+20., smcdata.projectname);
+ t=time(NULL);
+ fprintf(psf, "%.2f %.2f moveto\n", 10., (float)psdim+5.);
+ fprintf(psf, "(Date: %s) show\n", ctime(&t));
+
+ psdrawchart(psf);
+
+ fprintf(psf,
+ "\n%%Arcs\nnewpath\n2 setlinewidth\n1 setlinejoin\n1 setlinecap\n");
+
+/***
+ * Draw arcs
+ */
+ for(i=1; i<=smcdata.ne; i++) {
+
+ /* Series placed element, that could be an R, L, or C */
+ switch(smcdata.ELplace[i]) {
+ case 's':
+ rho2z(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &R, &X);
+ if(smcdata.ELtype[i]=='r') {
+ if(fabs(X)>QZ) {
+ sa=thetaonX(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], X)*180/M_PI;
+ ea=thetaonX(smcdata.rerhoIP[i], smcdata.imrhoIP[i], X)*180/M_PI;
+ if(ea<0.) ea+=360; if(sa<0.) sa+=360;
+ psdrawX(psf,X, sa, ea);
+ }
+ else
+ psdrawX(psf,X, smcdata.rerhoIP[i-1], smcdata.rerhoIP[i]);
+ }
+ else if(smcdata.ELtype[i]=='l' || smcdata.ELtype[i]=='c') {
+ sa=thetaonR(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], R)*180/M_PI;
+ ea=thetaonR(smcdata.rerhoIP[i], smcdata.imrhoIP[i], R)*180/M_PI;
+ if(ea<0.) ea+=360; if(sa<0.) sa+=360;
+ psdrawR(psf, R, sa, ea);
+ }
+ break;
+
+ /* Parallel placed element, that could be an R, L, or C */
+ case'p':
+ rho2y(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &G, &B);
+ if(smcdata.ELtype[i]=='r') {
+ if(fabs(B)>QZ) {
+ sa=thetaonB(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], B)*180/M_PI;
+ ea=thetaonB(smcdata.rerhoIP[i], smcdata.imrhoIP[i], B)*180/M_PI;
+ psdrawB(psf,B, sa, ea);
+ }
+ else
+ psdrawB(psf,B, smcdata.rerhoIP[i-1], smcdata.rerhoIP[i]);
+
+ }
+ else if(smcdata.ELtype[i]=='l' || smcdata.ELtype[i]=='c') {
+ sa=thetaonG(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], G)*180/M_PI;
+ ea=thetaonG(smcdata.rerhoIP[i], smcdata.imrhoIP[i], G)*180/M_PI;
+
+ psdrawG(psf,G, sa, ea);
+ }
+ break;
+
+ /* The rest are for transmission line */
+ case 't':
+ rer1=smcdata.rerhoIP[i-1]; imr1=smcdata.imrhoIP[i-1];
+ step=36*(1+(int)(smcdata.ELval0[i]/360));
+ a=smcdata.ELval0[i]/180.*M_PI/step;
+ for(n=0; n<step; n++) {
+ rhoz1z2(&rer1, &imr1, smcdata.z0, smcdata.ELval1[i]);
+ rer=rer1; imr=imr1;
+ rer2=rer*cos(2.*a)+imr*sin(2.*a);
+ imr2=-rer*sin(2.*a)+imr*cos(2.*a);
+ rhoz1z2(&rer1, &imr1, smcdata.ELval1[i], smcdata.z0);
+ rhoz1z2(&rer2, &imr2, smcdata.ELval1[i], smcdata.z0);
+ psdrawLine(psf,rer1, imr1, rer2, imr2);
+ rer1=rer2; imr1=imr2;
+ }
+ break;
+ case 'c':
+ case 'o':
+ rho2y(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &G, &B);
+ sa=thetaonG(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], G)*180/M_PI;
+ ea=thetaonG(smcdata.rerhoIP[i], smcdata.imrhoIP[i], G)*180/M_PI;
+ psdrawG(psf,G, sa, ea);
+ break;
+ case 'l':
+ case 'a':
+ rho2z(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &R, &X);
+ sa=thetaonR(smcdata.rerhoIP[i-1], smcdata.imrhoIP[i-1], R)*180/M_PI;
+ ea=thetaonR(smcdata.rerhoIP[i], smcdata.imrhoIP[i], R)*180/M_PI;
+ if(ea<0.) ea+=360; if(sa<0.) sa+=360;
+ psdrawR(psf,R, sa, ea);
+ break;
+ default:
+ fprintf(stderr, "Unallowed connection\n");
+ }
+
+ }
+ fprintf(psf,"0. 0. 0. setrgbcolor\nstroke\n");
+ /**
+ * end arcs
+ */
+
+ /* Intermediate point impedance value print as text*/
+ for(i=1; i<=smcdata.ne; i++) {
+ x1=((smcdata.rerhoIP[i]+1.)/2.*psdim);
+ y1=((1.+smcdata.imrhoIP[i])/2.*psdim);
+ fprintf(psf, "%.2f %.2f moveto\n", x1, y1);
+ if(Zcirc){
+ fprintf(psf, "1.0 0.0 0.0 setrgbcolor\n");
+ rho2z(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &rer, &imr);
+ float2prefs(rer*smcdata.z0, buff, 0);
+ float2prefs(fabs(imr*smcdata.z0), buff2, 0);
+ fprintf(psf, "(%s%cj%s) show\n", buff, smcdata.imrhoIP[i]>0.?'+':'-',
+ buff2);
+ }
+ else if(Ycirc){
+ fprintf(psf, "0.0 0.0 1.0 setrgbcolor\n");
+ rho2y(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &rer, &imr);
+ float2prefs(rer/smcdata.z0, buff, 0);
+ float2prefs(imr/smcdata.z0, buff2, 0);
+ fprintf(psf, "(%s%cj%s) show\n", buff, smcdata.imrhoIP[i]>0.?'+':'-',
+ buff2);
+ }
+ else if(RHOcirc){
+ fprintf(psf, "0.5 0.5 0.5 setrgbcolor\n");
+ float2prefs(smcdata.rerhoIP[i], buff, 0);
+ float2prefs(smcdata.imrhoIP[i], buff2, 0);
+ fprintf(psf, "(%s%cj%s) show\n", buff, smcdata.imrhoIP[i]>0.?'+':'-',
+ buff2);
+ }
+ else{ /* If no chart arc are selcted point are written as impedance */
+ fprintf(psf, "1.0 0.0 0.0 setrgbcolor\n");
+ rho2z(smcdata.rerhoIP[i], smcdata.imrhoIP[i], &rer, &imr);
+ float2prefs(rer*smcdata.z0, buff, 0);
+ float2prefs(imr*smcdata.z0, buff2, 0);
+ fprintf(psf, "(%s%cj%s) show\n", buff, smcdata.imrhoIP[i]>0.?'+':'-',
+ buff2);
+ }
+
+ }
+
+ /* Textual circuit description */
+ pscircdesc(psf);
+
+ if(!eps)
+ fprintf(psf, "showpage\n");
+
+ fclose(psf);
+}
+
+
+void pscircdesc(FILE *f) {
+ int i;
+ char b[40], t[80], b2[3];
+
+ fprintf(f, "\n%%Textual circuit description\nnewpath\n");
+ fprintf(f, "0.0 0.0 0.0 setrgbcolor\n0 setlinewidth\n");
+ fprintf(f, "%.2f %.2f moveto\n%.2f %.2f rlineto\n",
+ 0., -36., (float)psdim, 0.);
+ fprintf(f, "%.2f %.2f moveto\n%.2f %.2f rlineto\n",
+ 0., -36., 0., +10);
+ fprintf(f, "%.2f %.2f moveto\n%.2f %.2f rlineto\n",
+ (float)psdim/2., -36., 0., +10);
+ fprintf(f, "%.2f %.2f moveto\n%.2f %.2f rlineto\n",
+ (float)psdim, -36., 0., +10);
+
+ float2prefs(smcdata.z0, b, 0);
+ fprintf(f, "%.2f %.2f moveto\n(z0= %s) show\n",
+ 0., -48., b);
+ float2prefs(smcdata.f0, b, 0);
+ fprintf(f, "%.2f %.2f moveto\n(f0= %s) show\n",
+ 80., -48., b);
+
+ for(i=1; i<=smcdata.ne; i++) {
+
+ switch(smcdata.ELtype[i]) {
+ case 'r':
+ case 'l':
+ case 'c':
+ float2prefs(smcdata.ELval0[i], b, 0);
+ sprintf(t, "#%d: %c %c %s %s\n", i, toupper(smcdata.ELtype[i]),
+ smcdata.ELplace[i], b, smcdata.ELlocked[i]==1?" - locked -":"");
+ fprintf(f, "%.2f %.2f moveto\n",(int)((i-1)/5)*120., -68.-10.*((i-1)%5));
+ fprintf(f, "(%s) show\n", t);
+ break;
+ case 't':
+ float2prefs(smcdata.ELval0[i], b, 0);
+ exptlpln(smcdata.ELplace[i], b2);
+ sprintf(t, "#%d: %c %s %s", i, toupper(smcdata.ELtype[i]),
+ b2, b);
+ float2prefs(smcdata.ELval1[i], b, 0); strcat(t, b);
+ if(smcdata.ELlocked[i]==1)
+ strcat(t," - locked -");
+ strcat(t, "\n");
+ fprintf(f, "%.2f %.2f moveto\n",(int)((i-1)/5)*120., -68.-10.*((i-1)%5));
+ fprintf(f, "(%s) show\n", t);
+ break;
+
+ }
+
+ }
+
+ fprintf(f, "stroke\n");
+}
+
diff --git a/print.h b/print.h
new file mode 100644
index 0000000..5fb2366
--- /dev/null
+++ b/print.h
@@ -0,0 +1,35 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+
+void psdrawArc(FILE* f, float x0,float y0,float w,float h,float a0,float a1);
+void psdrawLine(FILE *, float, float, float, float);
+void writePS(char* b);
+void psdrawX(FILE* f, float x, float sa, float al);
+void psdrawR(FILE* f, float x, float sa, float al);
+void psdrawchart(FILE *);
+void psdrawRk(FILE *, float), psdrawXk(FILE *, float),
+ psdrawGk(FILE *, float), psdrawBk(FILE *, float),
+ psdrawRHOk(FILE *, float), psdrawQk(FILE *, float),
+ psdrawSP(FILE *, float, float), pscircdesc(FILE *f);
diff --git a/widget.c b/widget.c
new file mode 100644
index 0000000..5fb6f94
--- /dev/null
+++ b/widget.c
@@ -0,0 +1,1682 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <gtk/gtk.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <math.h>
+#include <string.h>
+#include "calc.h"
+#include "main.h"
+#include "dataconv.h"
+#include "widget.h"
+#include "draw.h"
+#include "print.h"
+
+extern GtkTextBuffer *txtcircbuff;
+extern int Zcirc, Ycirc, RHOcirc, Qcirc, tsidx, fsidx;
+extern GtkWidget *scarea, *toptable, *menubar, *topwindow;
+extern SMCDATA smcdata;
+extern float tunestep, freqstep;
+extern const float tunesteptab[6], freqsteptab[7];
+extern gint scdim;
+extern GtkWidget *statarr[20];
+extern const char statlabelname[20][15];
+
+GtkItemFactory *item_factory;
+GtkWidget *filew, *about;
+GtkWidget *evb, *etb1, *etb2, *etb3;
+gchar *entry_text, entry_text_type;
+GtkWidget *entryval;
+
+static GtkItemFactoryEntry menu_items[] = {
+ { "/_File", NULL, NULL, 0, "<Branch>", NULL },
+ { "/File/New", "<control>N", restart, 0, NULL, NULL },
+ { "/File/Write spice", "<control>W", write_activate, 0, NULL, NULL },
+ { "/File/Postscript", "<control>P", print_activate, 0, NULL, NULL },
+ { "/File/sep1", NULL, NULL, 0, "<Separator>", NULL },
+ { "/File/Load", "<control>L", load_activate, 0, NULL, NULL },
+ { "/File/Save", "<control>S", save_activate, 0, NULL, NULL },
+ { "/File/sep1", NULL, NULL, 0, "<Separator>", NULL },
+ { "/File/Quit", "<control>Q", main_quit, 0, NULL, NULL },
+
+ { "/_Set", NULL, NULL, 0, "<Branch>", NULL },
+ { "/Set/Start Point","S", sp_activate, 0, NULL, NULL },
+ { "/Set/Frequency","F", f0_activate, 0, NULL, NULL },
+ { "/Set/Characteristic Impedance","<control>0",z0_activate, 0,
+ NULL, NULL },
+
+ { "/_Add", NULL, NULL, 0, "<Branch>", NULL },
+ { "/Add/[add] Resistance", "R", add_resistance_activate, 0,
+ NULL, NULL },
+ { "/Add/[add] Inductance", "L", add_inductance_activate, 0,
+ NULL, NULL },
+ { "/Add/[add] Capacitance", "C", add_capacitance_activate, 0,
+ NULL, NULL },
+ { "/Add/[add] Transmission Line","T", add_tline_activate, 0, NULL, NULL },
+ { "/Add/sep2", NULL, NULL, 0, "<Separator>", NULL },
+ { "/Add/[ins] Resistance", "<shift>R",
+ ins_resistance_activate, 0, NULL, NULL },
+ { "/Add/[ins] Inductance", "<shift>L",
+ ins_inductance_activate, 0, NULL, NULL },
+ { "/Add/[ins] Capacitance", "<shift>C",
+ ins_capacitance_activate, 0, NULL, NULL },
+ { "/Add/[ins] Transmission Line","<shift>T",
+ ins_tline_activate, 0, NULL, NULL },
+
+ { "/_Edit", NULL, NULL, 0, "<Branch>", NULL},
+ { "/Edit/Delete component", "D", delete_component_activate, 0,
+ NULL, NULL },
+ { "/Edit/sep3", NULL, NULL, 0, "<Separator>" , NULL},
+ { "/Edit/Decrease first value", "<shift>Left",
+ decrease_first_activate, 0, NULL, NULL },
+ { "/Edit/Increase first value", "<shift>Right",
+ increase_first_activate, 0, NULL, NULL },
+ { "/Edit/Decrease second value", "<alt>Left",
+ decrease_second_activate, 0, NULL, NULL },
+ { "/Edit/Increase second value", "<alt>Right",
+ increase_second_activate, 0, NULL, NULL },
+ { "/Edit/Select previous element", "<shift>Up",
+ select_previous, 0, NULL, NULL },
+ { "/Edit/Select next element", "<shift>Down",
+ select_next, 0, NULL , NULL},
+
+ { "/Edit/Increase tuning step", "<alt>Up",
+ increase_tunestep, 0, NULL, NULL },
+ { "/Edit/Decrease tuning step", "<alt>Down",
+ decrease_tunestep, 0, NULL, NULL },
+ { "/Edit/Increase freq step", "<shift><alt>Up",
+ increase_freqstep, 0, NULL, NULL },
+ { "/Edit/Decrease freq step", "<shift><alt>Down",
+ decrease_freqstep, 0, NULL, NULL },
+
+ { "/Edit/Set first value", "equal",
+ set_first_val, 0, NULL, NULL },
+ { "/Edit/Set second value", "<alt>equal",
+ set_second_val, 0, NULL, NULL },
+
+ { "/Edit/Increase frequency", "<control>f",
+ increase_freq, 0, NULL, NULL },
+ { "/Edit/Decrease frequency", "<control><shift>f",
+ decrease_freq, 0, NULL, NULL },
+
+ { "/_View", NULL, NULL, 0, "<Branch>", NULL},
+ { "/View/Impedance", "<control>1", on_imped_activate, 0,
+ "<CheckItem>", NULL},
+ { "/View/Admittance", "<control>2", on_admit_activate, 0,
+ "<CheckItem>", NULL},
+ { "/View/Coefficient of Reflection",
+ "<control>3", on_cor_activate, 0, "<CheckItem>", NULL},
+ { "/View/Quality Factor (Q)", "<control>4", on_qfac_activate, 0,
+ "<CheckItem>", NULL},
+
+ { "/_Tools", NULL, NULL, 0, "<Branch>", NULL},
+ { "/Tools/Autotune", "<control>A", do_autotune, 0, NULL, NULL },
+ { "/Tools/Lock for autotune", "<control>X", lock_autotune_activate,
+ 0, NULL, NULL },
+
+ { "/_Help", NULL, NULL, 0, "<LastBranch>", NULL },
+ { "/Help/Keystrokes", NULL, help_keystrokes, 0, NULL, NULL },
+ { "/Help/About", NULL, help_about, 0, NULL, NULL},
+};
+
+void help_about(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ GtkWidget *label, *button;
+
+ about=gtk_dialog_new();
+ label=gtk_label_new("\n GSMC - A Smith Chart Calculator\n" \
+ "Version 1.1 - Apr. 2004\n\n\n" \
+ "(c) 2003-2004 by Lapo Pieri\n" \
+ " ik5nax at amsat.org\n" \
+ " lapo_pieri at virgilio.it\n\n" \
+ " and\n\n" \
+ " Johannes van der Horst\n" \
+ " jvdhorst at cs.sun.ac.za\n"\
+ );
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(about)->vbox), label, TRUE, TRUE, 0);
+ button=gtk_button_new_from_stock(GTK_STOCK_OK);
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(about)->action_area),
+ button, TRUE, TRUE, 0);
+ gtk_signal_connect(GTK_OBJECT(button), "clicked",
+ (GtkSignalFunc)help_about_destroy, NULL);
+
+ gtk_widget_show(button); gtk_widget_show(label); gtk_widget_show(about);
+}
+
+void help_about_destroy(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ gtk_widget_destroy(about);
+}
+
+void help_keystrokes(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ GtkWidget *label, *button, *label2;
+
+ about=gtk_dialog_new();
+ label=gtk_label_new("GSMC Keystrokes");
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(about)->vbox), label, TRUE, TRUE, 0);
+
+ label2=gtk_label_new("\
+Ctrl+q\t\t Quit the program\n\
+Ctrl+1\t\t Toggle visualization of impedance (Z) circle\n\
+Ctrl+2\t\t Toggle visualization of admittance (Y) circle\n\
+Ctrl+3\t\t Toggle visualization of reflection coefficient (RHO) circle\n\
+Ctrl+4\t\t Toggle visualization of constant Q circle\n\
+s\t\t\t Set start point\n\
+Ctrl+0\t\t (zero) Set characteristic impedance z0\n\
+f\t\t\t Set frequency (f0)\n\
+r\t\t\t Add a resistor\n\
+l\t\t\t Add an inductor\n\
+c\t\t\t Add a capacitor\n\
+t\t\t\t Add a transmission line or stub\n\
+Shift+r\t\t Insert a resistor before the highlighted element\n\
+Shift+l\t\t Insert an inductor before the highlighted element\n\
+Shift+c\t\t Insert a capacitor before the highlighted element\n\
+Shift+t\t\t Insert a transmission line or stub before the highlighted element\n\
+d\t\t\t Delete the currently highligthed element\n\
+Shift+Curs\t Up Highlight previous element\n\
+Shift+Curs\t Down Highlight next element\n\
+Shift+Curs\t Left Decrease the first field of currently highlighted element\n\
+Shift+Curs\t Rigth Increase the first field of currently highlighted element\n\
+Mod+Curs\t Left Decrease the second field of currently highlighted element\n\
+Mod+Curs\t Rigth Increase the second field of currently highlighted element\n\
+Mod+Curs\t Up Increase the tuning step\n\
+Mod+Curs\t Down Decrease the tuning step\n\
+Mod+Shift+Curs\t Up Increase the freq step\n\
+Mod+Shift+Curs\t Down Decrease the freq step\n\
+Ctrl+w\t\t Write network file in spice format\n\
+Ctrl+p\t\t Write postscript file with Smith chart image\n\
+Ctrl+n\t\t Restart for a new calculation with a clean chart\n\
+=\t\t\t Change first field of currently highlighted element\n\
+Mod+=\t\t Change second field of currently highlighted element\n\
+Ctrl+a\t\t Autotune\n\
+Ctrl+x\t\t Lock current element for autotuning\n\
+");
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(about)->vbox), label2, TRUE, TRUE, 0);
+
+
+ button=gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(about)->action_area),
+ button, TRUE, TRUE, 0);
+ gtk_signal_connect(GTK_OBJECT(button), "clicked",
+ (GtkSignalFunc)help_about_destroy, NULL);
+
+ gtk_widget_show(button); gtk_widget_show(label);
+ gtk_widget_show(label2); gtk_widget_show(about);
+}
+
+void help_keystrokes_destroy(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ gtk_widget_destroy(about);
+}
+
+void main_quit(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ gtk_main_quit();
+}
+
+void on_imped_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ Zcirc^=1;
+ drawchart();
+ gtk_widget_draw(scarea, NULL);
+}
+
+void on_admit_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ Ycirc^=1;
+ drawchart();
+ gtk_widget_draw(scarea, NULL);
+}
+
+void on_cor_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ RHOcirc^=1;
+ drawchart();
+ gtk_widget_draw(scarea, NULL);
+}
+
+void on_qfac_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ Qcirc^=1;
+ drawchart();
+ gtk_widget_draw(scarea, NULL);
+}
+
+void sp_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ GtkWidget *lb, *hbb, *b1, *b2, *b3, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Start point");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+
+ /* Button for various type of entry format */
+ hbb=gtk_hbox_new(FALSE, 0);
+ b1=gtk_radio_button_new_with_mnemonic(NULL, "_Z");
+ gtk_box_pack_start(GTK_BOX(hbb), b1, TRUE, FALSE, FALSE);
+ gtk_widget_show(b1);
+ b2=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b1)), "_Y");
+ gtk_box_pack_start(GTK_BOX(hbb), b2, TRUE, FALSE, FALSE);
+ gtk_widget_show(b2);
+ b3=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b2)), "_RHO");
+ gtk_box_pack_start(GTK_BOX(hbb), b3, TRUE, FALSE, FALSE);
+ gtk_widget_show(b3);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(hbb);
+ switch(smcdata.SPtype){ /* Start with previous button toggled */
+ case SPTYPE_Z: gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b1),
+ TRUE); break;
+ case SPTYPE_Y: gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b2),
+ TRUE); break;
+ case SPTYPE_RHO: gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b3),
+ TRUE); break;
+ }
+
+ /* connecting radio button the signal */
+ gtk_signal_connect(GTK_OBJECT(b1), "toggled",
+ GTK_SIGNAL_FUNC(set_spZ), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b2), "toggled",
+ GTK_SIGNAL_FUNC(set_spY), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b3), "toggled",
+ GTK_SIGNAL_FUNC(set_spRHO), GTK_OBJECT(evb));
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etb_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+ gtk_widget_grab_focus(etb);
+
+ entry_text_type=ETTSP;
+}
+
+void f0_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ GtkWidget *lb, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Center frequency");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etb_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+ gtk_widget_grab_focus(etb);
+
+ entry_text_type=ETTF0;
+}
+
+void z0_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ GtkWidget *lb, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Caracteristic Impedance");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etb_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+ gtk_widget_grab_focus(etb);
+
+ entry_text_type=ETTZ0;
+}
+
+
+void add_resistance_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ GtkWidget *lb, *hbb, *b1, *b2, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Add Resistance");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* Button for various type of entry format */
+ hbb=gtk_hbox_new(FALSE, 0);
+ b1=gtk_radio_button_new_with_mnemonic(NULL, "_Series");
+ gtk_box_pack_start(GTK_BOX(hbb), b1, TRUE, FALSE, FALSE);
+ gtk_widget_show(b1);
+ b2=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b1)), "_Parallel");
+ gtk_box_pack_start(GTK_BOX(hbb), b2, TRUE, FALSE, FALSE);
+ gtk_widget_show(b2);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(hbb);
+
+
+ /* connecting radio button the signal */
+ gtk_signal_connect(GTK_OBJECT(b1), "toggled",
+ GTK_SIGNAL_FUNC(set_series), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b2), "toggled",
+ GTK_SIGNAL_FUNC(set_parallel), GTK_OBJECT(evb));
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etb_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+
+ gtk_widget_grab_focus(etb);
+
+ /* Rivedere */
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b1), TRUE);
+ set_series();
+
+ entry_text_type=ETTAR;
+}
+
+void add_inductance_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ GtkWidget *lb, *hbb, *b1, *b2, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Add Inductance");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* Button for various type of entry format */
+ hbb=gtk_hbox_new(FALSE, 0);
+ b1=gtk_radio_button_new_with_mnemonic(NULL, "_Series");
+ gtk_box_pack_start(GTK_BOX(hbb), b1, TRUE, FALSE, FALSE);
+ gtk_widget_show(b1);
+ b2=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b1)), "_Parallel");
+ gtk_box_pack_start(GTK_BOX(hbb), b2, TRUE, FALSE, FALSE);
+ gtk_widget_show(b2);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(hbb);
+
+ /* Rivedere */
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b1), TRUE);
+ set_series();
+
+ /* connecting radio button the signal */
+ gtk_signal_connect(GTK_OBJECT(b1), "toggled",
+ GTK_SIGNAL_FUNC(set_series), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b2), "toggled",
+ GTK_SIGNAL_FUNC(set_parallel), GTK_OBJECT(evb));
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etb_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+ gtk_widget_grab_focus(etb);
+
+ entry_text_type=ETTAL;
+}
+
+void add_capacitance_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ GtkWidget *lb, *hbb, *b1, *b2, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Add Capacitance");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* Button for various type of entry format */
+ hbb=gtk_hbox_new(FALSE, 0);
+ b1=gtk_radio_button_new_with_mnemonic(NULL, "_Series");
+ gtk_box_pack_start(GTK_BOX(hbb), b1, TRUE, FALSE, FALSE);
+ gtk_widget_show(b1);
+ b2=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b1)), "_Parallel");
+ gtk_box_pack_start(GTK_BOX(hbb), b2, TRUE, FALSE, FALSE);
+ gtk_widget_show(b2);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(hbb);
+
+ /* Rivedere */
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b1), TRUE);
+ set_series();
+
+ /* connecting radio button the signal */
+ gtk_signal_connect(GTK_OBJECT(b1), "toggled",
+ GTK_SIGNAL_FUNC(set_series), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b2), "toggled",
+ GTK_SIGNAL_FUNC(set_parallel), GTK_OBJECT(evb));
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etb_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+ gtk_widget_grab_focus(etb);
+
+ entry_text_type=ETTAC;
+}
+
+void add_tline_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ GtkWidget *lb, *vbb, *hbb, *b1, *b2, *b3, *b4, *b5, *bok, *label;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Add Transmission line");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* Button for various type of entry format */
+ vbb=gtk_vbox_new(TRUE, 0);
+ hbb=gtk_hbox_new(TRUE, 0);
+ b1=gtk_radio_button_new_with_mnemonic(NULL, "Open series stub (_a)");
+ gtk_box_pack_start(GTK_BOX(hbb), b1, TRUE, FALSE, FALSE);
+ gtk_widget_show(b1);
+ b2=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b1)),
+ "Short series stub (_l)");
+ gtk_box_pack_start(GTK_BOX(hbb), b2, TRUE, FALSE, FALSE);
+ gtk_widget_show(b2);
+ gtk_box_pack_start(GTK_BOX(vbb), hbb, TRUE, FALSE, FALSE);
+ gtk_widget_show(hbb); hbb=gtk_hbox_new(TRUE, 0);
+ b3=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b2)),
+ "Open parallel stub (_o)");
+ gtk_box_pack_start(GTK_BOX(hbb), b3, TRUE, FALSE, FALSE);
+ gtk_widget_show(b3);
+ b4=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b3)),
+ "Short parallel stub (_c)");
+ gtk_box_pack_start(GTK_BOX(hbb), b4, TRUE, FALSE, FALSE);
+ gtk_widget_show(b4);
+ gtk_box_pack_start(GTK_BOX(vbb), hbb, TRUE, FALSE, FALSE);
+ gtk_widget_show(hbb); hbb=gtk_hbox_new(TRUE, 0);
+ b5=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b4)),
+ "Transmissive (_t)");
+ gtk_box_pack_start(GTK_BOX(hbb), b5, TRUE, FALSE, FALSE);
+ gtk_widget_show(b5);
+ bok=gtk_button_new_with_label("OK"); gtk_widget_show(bok);
+ gtk_signal_connect(GTK_OBJECT(bok), "clicked",
+ GTK_SIGNAL_FUNC(etbt_callback), GTK_OBJECT(bok));
+ gtk_box_pack_start(GTK_BOX(hbb), bok, TRUE, FALSE, FALSE);
+ gtk_widget_show(hbb);
+ gtk_box_pack_start(GTK_BOX(vbb), hbb, TRUE, FALSE, FALSE);
+
+ gtk_box_pack_start(GTK_BOX(evb), vbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(vbb);
+
+ /* connecting radio button the signal */
+ gtk_signal_connect(GTK_OBJECT(b1), "toggled",
+ GTK_SIGNAL_FUNC(set_open_series), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b2), "toggled",
+ GTK_SIGNAL_FUNC(set_short_series), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b3), "toggled",
+ GTK_SIGNAL_FUNC(set_open_parallel), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b4), "toggled",
+ GTK_SIGNAL_FUNC(set_short_parallel), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b5), "toggled",
+ GTK_SIGNAL_FUNC(set_transmissive), GTK_OBJECT(evb));
+
+ /* Rivedere */
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b5), TRUE);
+ set_transmissive();
+
+ /* entry box */
+ hbb=gtk_hbox_new(FALSE, 0);
+ etb1=gtk_entry_new_with_max_length(16);
+ gtk_entry_set_editable(GTK_ENTRY(etb1), TRUE);
+ label=gtk_label_new(" Len [deg] ");
+ gtk_box_pack_start(GTK_BOX(hbb), label, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(hbb), etb1, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(label); gtk_widget_show(etb1); gtk_widget_show(hbb);
+
+ hbb=gtk_hbox_new(FALSE, 0);
+ etb2=gtk_entry_new_with_max_length(16);
+ gtk_entry_set_editable(GTK_ENTRY(etb2), TRUE);
+ label=gtk_label_new(" Z [ohm] ");
+ gtk_box_pack_start(GTK_BOX(hbb), label, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(hbb), etb2, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(label); gtk_widget_show(etb2); gtk_widget_show(hbb);
+
+ /*
+ hbb=gtk_hbox_new(FALSE, 0);
+ etb3=gtk_entry_new_with_max_length(16);
+ gtk_entry_set_editable(GTK_ENTRY(etb3), TRUE);
+ label=gtk_label_new(" Att [dB/m] ");
+ gtk_box_pack_start(GTK_BOX(hbb), label, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(hbb), etb3, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(label); gtk_widget_show(etb3); gtk_widget_show(hbb);
+ */
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+ gtk_widget_grab_focus(etb1);
+
+ entry_text_type=ETTAT;
+}
+
+void ins_resistance_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ GtkWidget *lb, *hbb, *b1, *b2, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Ins Resistance");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* Button for various type of entry format */
+ hbb=gtk_hbox_new(FALSE, 0);
+ b1=gtk_radio_button_new_with_mnemonic(NULL, "_Series");
+ gtk_box_pack_start(GTK_BOX(hbb), b1, TRUE, FALSE, FALSE);
+ gtk_widget_show(b1);
+ b2=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b1)), "_Parallel");
+ gtk_box_pack_start(GTK_BOX(hbb), b2, TRUE, FALSE, FALSE);
+ gtk_widget_show(b2);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(hbb);
+
+ /* Rivedere */
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b1), TRUE);
+ set_series();
+
+ /* connecting radio button the signal */
+ gtk_signal_connect(GTK_OBJECT(b1), "toggled",
+ GTK_SIGNAL_FUNC(set_series), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b2), "toggled",
+ GTK_SIGNAL_FUNC(set_parallel), GTK_OBJECT(evb));
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etb_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+ gtk_widget_grab_focus(etb);
+
+ entry_text_type=ETTIR;
+}
+
+void ins_inductance_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ GtkWidget *lb, *hbb, *b1, *b2, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Ins Inductance");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* Button for various type of entry format */
+ hbb=gtk_hbox_new(FALSE, 0);
+ b1=gtk_radio_button_new_with_mnemonic(NULL, "_Series");
+ gtk_box_pack_start(GTK_BOX(hbb), b1, TRUE, FALSE, FALSE);
+ gtk_widget_show(b1);
+ b2=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b1)), "_Parallel");
+ gtk_box_pack_start(GTK_BOX(hbb), b2, TRUE, FALSE, FALSE);
+ gtk_widget_show(b2);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(hbb);
+
+ /* Rivedere */
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b1), TRUE);
+ set_series();
+
+ /* connecting radio button the signal */
+ gtk_signal_connect(GTK_OBJECT(b1), "toggled",
+ GTK_SIGNAL_FUNC(set_series), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b2), "toggled",
+ GTK_SIGNAL_FUNC(set_parallel), GTK_OBJECT(evb));
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etb_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+ gtk_widget_grab_focus(etb);
+
+ entry_text_type=ETTIL;
+}
+
+void ins_capacitance_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ GtkWidget *lb, *hbb, *b1, *b2, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Add Capacitance");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* Button for various type of entry format */
+ hbb=gtk_hbox_new(FALSE, 0);
+ b1=gtk_radio_button_new_with_mnemonic(NULL, "_Series");
+ gtk_box_pack_start(GTK_BOX(hbb), b1, TRUE, FALSE, FALSE);
+ gtk_widget_show(b1);
+ b2=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b1)), "_Parallel");
+ gtk_box_pack_start(GTK_BOX(hbb), b2, TRUE, FALSE, FALSE);
+ gtk_widget_show(b2);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(hbb);
+
+ /* Rivedere */
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b1), TRUE);
+ set_series();
+
+ /* connecting radio button the signal */
+ gtk_signal_connect(GTK_OBJECT(b1), "toggled",
+ GTK_SIGNAL_FUNC(set_series), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b2), "toggled",
+ GTK_SIGNAL_FUNC(set_parallel), GTK_OBJECT(evb));
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etb_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+ gtk_widget_grab_focus(etb);
+
+ entry_text_type=ETTIC;
+}
+
+
+void ins_tline_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ GtkWidget *lb, *vbb, *hbb, *b1, *b2, *b3, *b4, *b5, *bok, *label;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Ins Transmission line");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* Button for various type of entry format */
+ vbb=gtk_vbox_new(TRUE, 0);
+ hbb=gtk_hbox_new(TRUE, 0);
+ b1=gtk_radio_button_new_with_mnemonic(NULL, "Open series stub (_a)");
+ gtk_box_pack_start(GTK_BOX(hbb), b1, TRUE, FALSE, FALSE);
+ gtk_widget_show(b1);
+ b2=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b1)),
+ "Short series stub (_l)");
+ gtk_box_pack_start(GTK_BOX(hbb), b2, TRUE, FALSE, FALSE);
+ gtk_widget_show(b2);
+ gtk_box_pack_start(GTK_BOX(vbb), hbb, TRUE, FALSE, FALSE);
+ gtk_widget_show(hbb); hbb=gtk_hbox_new(TRUE, 0);
+ b3=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b2)),
+ "Open parallel stub (_o)");
+ gtk_box_pack_start(GTK_BOX(hbb), b3, TRUE, FALSE, FALSE);
+ gtk_widget_show(b3);
+ b4=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b3)),
+ "Short parallel stub (_c)");
+ gtk_box_pack_start(GTK_BOX(hbb), b4, TRUE, FALSE, FALSE);
+ gtk_widget_show(b4);
+ gtk_box_pack_start(GTK_BOX(vbb), hbb, TRUE, FALSE, FALSE);
+ gtk_widget_show(hbb); hbb=gtk_hbox_new(TRUE, 0);
+ b5=gtk_radio_button_new_with_mnemonic(gtk_radio_button_group(
+ GTK_RADIO_BUTTON(b4)),
+ "Transmissive (_t)");
+ gtk_box_pack_start(GTK_BOX(hbb), b5, TRUE, FALSE, FALSE);
+ gtk_widget_show(b5);
+ bok=gtk_button_new_with_label("OK"); gtk_widget_show(bok);
+ gtk_signal_connect(GTK_OBJECT(bok), "clicked",
+ GTK_SIGNAL_FUNC(etbt_callback), GTK_OBJECT(bok));
+ gtk_box_pack_start(GTK_BOX(hbb), bok, TRUE, FALSE, FALSE);
+ gtk_widget_show(hbb);
+ gtk_box_pack_start(GTK_BOX(vbb), hbb, TRUE, FALSE, FALSE);
+
+ gtk_box_pack_start(GTK_BOX(evb), vbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(vbb);
+
+ /* connecting radio button the signal */
+ gtk_signal_connect(GTK_OBJECT(b1), "toggled",
+ GTK_SIGNAL_FUNC(set_open_series), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b2), "toggled",
+ GTK_SIGNAL_FUNC(set_short_series), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b3), "toggled",
+ GTK_SIGNAL_FUNC(set_open_parallel), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b4), "toggled",
+ GTK_SIGNAL_FUNC(set_short_parallel), GTK_OBJECT(evb));
+ gtk_signal_connect(GTK_OBJECT(b5), "toggled",
+ GTK_SIGNAL_FUNC(set_transmissive), GTK_OBJECT(evb));
+
+ /* Rivedere */
+ gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(b5), TRUE);
+ set_transmissive();
+
+ /* entry box */
+ hbb=gtk_hbox_new(FALSE, 0);
+ etb1=gtk_entry_new_with_max_length(16);
+ gtk_entry_set_editable(GTK_ENTRY(etb1), TRUE);
+ label=gtk_label_new(" Len [deg] ");
+ gtk_box_pack_start(GTK_BOX(hbb), label, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(hbb), etb1, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(label); gtk_widget_show(etb1); gtk_widget_show(hbb);
+
+ hbb=gtk_hbox_new(FALSE, 0);
+ etb2=gtk_entry_new_with_max_length(16);
+ gtk_entry_set_editable(GTK_ENTRY(etb2), TRUE);
+ label=gtk_label_new(" Z [ohm] ");
+ gtk_box_pack_start(GTK_BOX(hbb), label, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(hbb), etb2, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(label); gtk_widget_show(etb2); gtk_widget_show(hbb);
+
+ /*
+ hbb=gtk_hbox_new(FALSE, 0);
+ etb3=gtk_entry_new_with_max_length(16);
+ gtk_entry_set_editable(GTK_ENTRY(etb3), TRUE);
+ label=gtk_label_new(" Att [dB/m] ");
+ gtk_box_pack_start(GTK_BOX(hbb), label, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(hbb), etb3, FALSE, FALSE, FALSE);
+ gtk_box_pack_start(GTK_BOX(evb), hbb, FALSE, FALSE, FALSE);
+ gtk_widget_show(label); gtk_widget_show(etb3); gtk_widget_show(hbb);
+ */
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+ gtk_widget_grab_focus(etb1);
+
+ entry_text_type=ETTIT;
+}
+
+
+gint etb_callback(GtkWidget *widget __attribute__((unused)),
+ GtkWidget *entry) {
+ float re, im, val0, val1, val2;
+ char c, temp;
+ int i;
+
+ entry_text=(gchar*)gtk_entry_get_text(GTK_ENTRY(entry));
+ if(strlen(entry_text)!=0){
+ switch(entry_text_type) {
+ case ETTSP:
+ entrystringdecode(entry_text, &smcdata.reentrySP, &smcdata.imentrySP);
+ break;
+ case ETTZ0:
+ if(entrystringdecode(entry_text, &re, &im)==0) {
+ if(re<=0.)
+ fprintf(stderr, "Invalid characteristic impedance value\n");
+ else
+ smcdata.z0=re;
+ }
+ else
+ fprintf(stderr, "Invalid characteristic impedance\n");
+ break;
+ case ETTF0:
+ smcdata.f0=psdec(entry_text);
+ break;
+ case ETTAR:
+ c='r';
+ if(smcdata.ne<NEL) {
+ smcdata.ne++; smcdata.ELtype[smcdata.ne]=c;
+ if(componentvaluestringdecode(entry_text, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval0[smcdata.ne]=val0;
+ smcdata.ELval1[smcdata.ne]=val1; smcdata.ELval2[smcdata.ne]=val2;
+ }
+ else
+ smcdata.ne--;
+ }
+ else
+ fprintf(stderr, "No more space left for component\n");
+ smcdata.neidx=smcdata.ne;
+ break;
+
+ case ETTAL:
+ c='l';
+ if(smcdata.ne<NEL) {
+ smcdata.ne++; smcdata.ELtype[smcdata.ne]=c;
+ if(componentvaluestringdecode(entry_text, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval0[smcdata.ne]=val0;
+ smcdata.ELval1[smcdata.ne]=val1; smcdata.ELval2[smcdata.ne]=val2;
+ }
+ else
+ smcdata.ne--;
+ }
+ else
+ fprintf(stderr, "No more space left for component\n");
+ smcdata.neidx=smcdata.ne;
+ break;
+
+ case ETTAC:
+ c='c';
+ if(smcdata.ne<NEL) {
+ smcdata.ne++; smcdata.ELtype[smcdata.ne]=c;
+ if(componentvaluestringdecode(entry_text, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval0[smcdata.ne]=val0;
+ smcdata.ELval1[smcdata.ne]=val1; smcdata.ELval2[smcdata.ne]=val2;
+ }
+ else
+ smcdata.ne--;
+ }
+ else
+ fprintf(stderr, "No more space left for component\n");
+ smcdata.neidx=smcdata.ne;
+ break;
+ case ETTIR:
+ /* Insert a component in the location specified by index */
+ if(smcdata.ne<NEL) {
+ /* make place for new network element */
+ for(i=smcdata.ne; i>=smcdata.neidx; i--) {
+ smcdata.ELtype[i+1]=smcdata.ELtype[i];
+ smcdata.ELval0[i+1]=smcdata.ELval0[i];
+ smcdata.ELval1[i+1]=smcdata.ELval1[i];
+ smcdata.ELval2[i+1]=smcdata.ELval2[i];
+ temp=smcdata.ELplace[i+1];
+ smcdata.ELplace[i+1]=smcdata.ELplace[i];
+ smcdata.ELplace[i]=temp;
+ smcdata.rerhoIP[i+1]=smcdata.rerhoIP[i];
+ smcdata.imrhoIP[i+1]=smcdata.imrhoIP[i];
+ }
+ smcdata.ne++;
+
+ /* and then add the network element in the place just freed */
+ c='r';
+ smcdata.ELtype[smcdata.neidx]=c;
+ if(componentvaluestringdecode(entry_text, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval0[smcdata.neidx]=val0;
+ smcdata.ELval1[smcdata.neidx]=val1;
+ smcdata.ELval2[smcdata.neidx]=val2;
+ }
+ else
+ removene();
+ }
+ else
+ fprintf(stderr, "No more space left for component\n");
+ recalc(); drawchart(); gtk_widget_draw(scarea, NULL);
+ break;
+
+ case ETTIL:
+ /* Insert a component in the location specified by index */
+ if(smcdata.ne<NEL) {
+ /* make place for new network element */
+ for(i=smcdata.ne; i>=smcdata.neidx; i--) {
+ smcdata.ELtype[i+1]=smcdata.ELtype[i];
+ smcdata.ELval0[i+1]=smcdata.ELval0[i];
+ smcdata.ELval1[i+1]=smcdata.ELval1[i];
+ smcdata.ELval2[i+1]=smcdata.ELval2[i];
+ temp=smcdata.ELplace[i+1];
+ smcdata.ELplace[i+1]=smcdata.ELplace[i];
+ smcdata.ELplace[i]=temp;
+ smcdata.rerhoIP[i+1]=smcdata.rerhoIP[i];
+ smcdata.imrhoIP[i+1]=smcdata.imrhoIP[i];
+ }
+ smcdata.ne++;
+
+ /* and then add the network element in the place just freed */
+ c='l';
+ smcdata.ELtype[smcdata.neidx]=c;
+ if(componentvaluestringdecode(entry_text, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval0[smcdata.neidx]=val0;
+ smcdata.ELval1[smcdata.neidx]=val1;
+ smcdata.ELval2[smcdata.neidx]=val2;
+ }
+ else
+ removene();
+ }
+ else
+ fprintf(stderr, "No more space left for component\n");
+ recalc(); drawchart(); gtk_widget_draw(scarea, NULL);
+ break;
+ case ETTIC:
+ /* Insert a component in the location specified by index */
+ if(smcdata.ne<NEL) {
+ /* make place for new network element */
+ for(i=smcdata.ne; i>=smcdata.neidx; i--) {
+ smcdata.ELtype[i+1]=smcdata.ELtype[i];
+ smcdata.ELval0[i+1]=smcdata.ELval0[i];
+ smcdata.ELval1[i+1]=smcdata.ELval1[i];
+ smcdata.ELval2[i+1]=smcdata.ELval2[i];
+ temp=smcdata.ELplace[i+1];
+ smcdata.ELplace[i+1]=smcdata.ELplace[i];
+ smcdata.ELplace[i]=temp;
+ smcdata.rerhoIP[i+1]=smcdata.rerhoIP[i];
+ smcdata.imrhoIP[i+1]=smcdata.imrhoIP[i];
+ }
+ smcdata.ne++;
+
+ /* and then add the network element in the place just freed */
+ c='c';
+ smcdata.ELtype[smcdata.neidx]=c;
+ if(componentvaluestringdecode(entry_text, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval0[smcdata.neidx]=val0;
+ smcdata.ELval1[smcdata.neidx]=val1;
+ smcdata.ELval2[smcdata.neidx]=val2;
+ }
+ else
+ removene();
+ }
+ else
+ fprintf(stderr, "No more space left for component\n");
+ recalc(); drawchart(); gtk_widget_draw(scarea, NULL);
+ break;
+
+ case ETTNULL:
+ default: printf("%s\n", entry_text);
+ }
+
+ recalc(); showtextstat(); showcircdesc();
+ entry_text_type=ETTNULL;
+ drawchart(); gtk_widget_draw(scarea, NULL);
+ }
+ gtk_widget_destroy(entryval);
+ return TRUE;
+}
+
+gint etbt_callback(GtkWidget *widget __attribute__((unused)),
+ GtkWidget *entry __attribute__((unused))) {
+ gchar *entry_text1, *entry_text2, *entry_text3;
+ char c, temp;
+ float val0, val1, val2;
+ int i;
+
+ entry_text1=(gchar*)gtk_entry_get_text(GTK_ENTRY(etb1));
+ entry_text2=(gchar*)gtk_entry_get_text(GTK_ENTRY(etb2));
+ // entry_text3=(gchar*)gtk_entry_get_text(GTK_ENTRY(etb3));
+ if((strlen(entry_text1)!=0) && (strlen(entry_text2)!=0)){
+
+ switch(entry_text_type){
+ case ETTAT:
+ c='t';
+ if(smcdata.ne<NEL) {
+ smcdata.ne++; smcdata.ELtype[smcdata.ne]=c;
+ if(componentvaluestringdecode(entry_text1, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval0[smcdata.ne]=val0;
+ }
+ else
+ smcdata.ne--;
+ if(componentvaluestringdecode(entry_text2, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval1[smcdata.ne]=val0;
+ }
+ else
+ smcdata.ne--;
+ /*
+ if(componentvaluestringdecode(entry_text3, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval2[smcdata.ne]=val0;
+ }
+ else
+ smcdata.ne--;
+ */
+ }
+ else
+ fprintf(stderr, "No more space left for component\n");
+ smcdata.neidx=smcdata.ne;
+ break;
+
+ case ETTIT:
+ /* Insert a component in the location specified by index */
+ if(smcdata.ne<NEL) {
+ /* make place for new network element */
+ for(i=smcdata.ne; i>=smcdata.neidx; i--) {
+ smcdata.ELtype[i+1]=smcdata.ELtype[i];
+ smcdata.ELval0[i+1]=smcdata.ELval0[i];
+ smcdata.ELval1[i+1]=smcdata.ELval1[i];
+ smcdata.ELval2[i+1]=smcdata.ELval2[i];
+ temp=smcdata.ELplace[i+1];
+ smcdata.ELplace[i+1]=smcdata.ELplace[i];
+ smcdata.ELplace[i]=temp;
+ smcdata.rerhoIP[i+1]=smcdata.rerhoIP[i];
+ smcdata.imrhoIP[i+1]=smcdata.imrhoIP[i];
+ }
+ smcdata.ne++;
+
+ /* and then add the network element in the place just freed */
+ c='t';
+ smcdata.ELtype[smcdata.neidx]=c;
+ if(componentvaluestringdecode(entry_text1, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval0[smcdata.neidx]=val0;
+ }
+ else
+ removene();
+ if(componentvaluestringdecode(entry_text2, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval1[smcdata.neidx]=val0;
+ }
+ else
+ removene();
+ /*
+ if(componentvaluestringdecode(entry_text3, &val0, &val1, &val2, &c)==0){
+ smcdata.ELval2[smcdata.neidx]=val0;
+ }
+ else
+ removene();
+ */
+
+ }
+ else
+ fprintf(stderr, "No more space left for component\n");
+ recalc(); drawchart(); gtk_widget_draw(scarea, NULL);
+ break;
+
+ case ETTNULL:
+ default: printf("%s\t%s\t%s\n", entry_text1, entry_text2, entry_text3);
+ }
+
+ recalc(); showtextstat(); showcircdesc();
+ entry_text_type=ETTNULL;
+ drawchart(); gtk_widget_draw(scarea, NULL);
+ }
+ gtk_widget_destroy(entryval);
+ return TRUE;
+}
+
+gint set_spZ(void) {
+ smcdata.SPtype=SPTYPE_Z;
+ return TRUE;
+}
+
+gint set_spY(void) {
+ smcdata.SPtype=SPTYPE_Y;
+ return TRUE;
+}
+
+gint set_spRHO(void) {
+ smcdata.SPtype=SPTYPE_RHO;
+ return TRUE;
+}
+
+gint set_series(void) {
+ smcdata.ELplace[smcdata.ne+1]='s';
+ return TRUE;
+}
+
+gint set_parallel(void) {
+ smcdata.ELplace[smcdata.ne+1]='p';
+ return TRUE;
+}
+
+gint set_open_series(void) {
+ smcdata.ELplace[smcdata.ne+1]='a';
+ return TRUE;
+}
+
+gint set_short_series(void) {
+ smcdata.ELplace[smcdata.ne+1]='l';
+ return TRUE;
+}
+
+gint set_open_parallel(void) {
+ smcdata.ELplace[smcdata.ne+1]='o';
+ return TRUE;
+}
+
+gint set_short_parallel(void) {
+ smcdata.ELplace[smcdata.ne+1]='c';
+ return TRUE;
+}
+
+gint set_transmissive(void) {
+ smcdata.ELplace[smcdata.ne+1]='t';
+ return TRUE;
+}
+
+
+void menu_create(GtkWidget *window, GtkWidget **menu_bar) {
+ GtkAccelGroup *accel_group;
+
+ gint nmenu_items=sizeof(menu_items)/sizeof(menu_items[0]);
+
+ accel_group=gtk_accel_group_new();
+ item_factory=gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>",
+ accel_group);
+ gtk_item_factory_create_items(item_factory, nmenu_items, menu_items, NULL);
+ gtk_window_add_accel_group(GTK_WINDOW (window), accel_group);
+
+ if(menu_bar)
+ *menu_bar=gtk_item_factory_get_widget(item_factory, "<main>");
+}
+
+void delete_component_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ removene(); recalc();
+ drawchart(); gtk_widget_draw(scarea, NULL);
+ showtextstat(); showcircdesc();
+}
+
+void select_previous(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ if(smcdata.neidx>1) {
+ smcdata.neidx--; showcircdesc(); }
+}
+
+void select_next(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ if(smcdata.neidx<smcdata.ne) {
+ smcdata.neidx++; showcircdesc(); }
+}
+
+void decrease_tunestep(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ if(tsidx>0) tsidx--; tunestep=tunesteptab[tsidx];
+ showtextstat();
+}
+
+void increase_tunestep(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ if(tsidx<5) tsidx++; tunestep=tunesteptab[tsidx];
+ showtextstat();
+}
+
+void decrease_freqstep(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ if(fsidx>0) fsidx--; freqstep=freqsteptab[fsidx];
+ showtextstat();
+}
+
+void increase_freqstep(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ if(fsidx<6) fsidx++; freqstep=freqsteptab[fsidx];
+ showtextstat();
+}
+
+void decrease_first_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ smcdata.ELval0[smcdata.neidx]/=tunestep;
+ recalc(); drawchart(); gtk_widget_draw(scarea, NULL);
+ showtextstat(); showcircdesc();
+}
+
+void increase_first_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ smcdata.ELval0[smcdata.neidx]*=tunestep;
+ recalc(); drawchart(); gtk_widget_draw(scarea, NULL);
+ showtextstat(); showcircdesc();
+}
+
+void decrease_second_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ smcdata.ELval1[smcdata.neidx]/=tunestep;
+ recalc(); drawchart(); gtk_widget_draw(scarea, NULL);
+ showtextstat(); showcircdesc();
+}
+
+void increase_second_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ smcdata.ELval1[smcdata.neidx]*=tunestep;
+ recalc(); drawchart(); gtk_widget_draw(scarea, NULL);
+ showtextstat(); showcircdesc();
+}
+
+
+void write_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ filew = gtk_file_selection_new ("Write SPICE file");
+ gtk_signal_connect (GTK_OBJECT (filew), "destroy",
+ (GtkSignalFunc) gtk_widget_destroy,
+ GTK_OBJECT(filew));
+ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
+ "clicked", (GtkSignalFunc) wfile_ok_sel, filew );
+ gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION
+ (filew)->cancel_button),
+ "clicked", (GtkSignalFunc) gtk_widget_destroy,
+ GTK_OBJECT (filew));
+ gtk_file_selection_set_filename (GTK_FILE_SELECTION(filew),
+ "untitled.cir");
+ gtk_widget_show(filew);
+}
+
+void wfile_ok_sel(GtkWidget *w __attribute__((unused)), GtkFileSelection *fs ){
+
+ writespice((char*)gtk_file_selection_get_filename(GTK_FILE_SELECTION (fs)));
+ gtk_widget_hide(filew);
+}
+
+void load_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ filew=gtk_file_selection_new("Load GSMC work");
+ gtk_signal_connect (GTK_OBJECT (filew), "destroy",
+ (GtkSignalFunc) gtk_widget_destroy,
+ GTK_OBJECT(filew));
+ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
+ "clicked", (GtkSignalFunc) lfile_ok_sel, filew );
+ gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION
+ (filew)->cancel_button),
+ "clicked", (GtkSignalFunc) gtk_widget_destroy,
+ GTK_OBJECT (filew));
+ gtk_file_selection_set_filename (GTK_FILE_SELECTION(filew),
+ "untitled.gdt");
+ gtk_widget_show(filew);
+}
+
+void lfile_ok_sel(GtkWidget *w __attribute__((unused)), GtkFileSelection *fs ){
+
+ loadgw((char*)gtk_file_selection_get_filename(GTK_FILE_SELECTION (fs)));
+ gtk_widget_hide(filew);
+}
+
+void save_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ filew=gtk_file_selection_new("Load GSMC work");
+ gtk_signal_connect (GTK_OBJECT (filew), "destroy",
+ (GtkSignalFunc) gtk_widget_destroy,
+ GTK_OBJECT(filew));
+ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
+ "clicked", (GtkSignalFunc) sfile_ok_sel, filew );
+ gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION
+ (filew)->cancel_button),
+ "clicked", (GtkSignalFunc) gtk_widget_destroy,
+ GTK_OBJECT (filew));
+ gtk_file_selection_set_filename (GTK_FILE_SELECTION(filew),
+ "untitled.gdt");
+ gtk_widget_show(filew);
+}
+
+void sfile_ok_sel(GtkWidget *w __attribute__((unused)), GtkFileSelection *fs ){
+
+ savegw((char*)gtk_file_selection_get_filename(GTK_FILE_SELECTION (fs)));
+ gtk_widget_hide(filew);
+}
+
+void print_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+ filew = gtk_file_selection_new ("Write PS/EPS file");
+ gtk_signal_connect (GTK_OBJECT (filew), "destroy",
+ (GtkSignalFunc) gtk_widget_destroy,
+ GTK_OBJECT(filew));
+ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (filew)->ok_button),
+ "clicked", (GtkSignalFunc) print_ok_sel, filew );
+ gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION
+ (filew)->cancel_button),
+ "clicked", (GtkSignalFunc) gtk_widget_destroy,
+ GTK_OBJECT (filew));
+ gtk_file_selection_set_filename (GTK_FILE_SELECTION(filew),
+ "out.ps");
+ gtk_widget_show(filew);
+}
+
+void print_ok_sel(GtkWidget *w __attribute__((unused)), GtkFileSelection *fs ){
+
+ writePS((char*)gtk_file_selection_get_filename(GTK_FILE_SELECTION (fs)));
+ gtk_widget_hide(filew);
+}
+
+
+void restart(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+
+ smcdata.SPtype=SPTYPE_Z; smcdata.reentrySP=50.; smcdata.imentrySP=0.;
+ smcdata.z0=50.; smcdata.f0=1e6; tsidx=3; tunestep=tunesteptab[tsidx];
+ smcdata.ne=0; smcdata.neidx=0;
+ recalc(); showtextstat(); drawchart(); showcircdesc();
+ gtk_widget_draw(topwindow, NULL);
+}
+
+gint cursor_motion_in_sc(GtkWidget *widget __attribute__((unused)),
+ GdkEventMotion *event){
+ int x, y;
+ GdkModifierType state;
+ char b[80], b2[80];
+ float r, j;
+
+ if (event->is_hint)
+ gdk_window_get_pointer (event->window, &x, &y, &state);
+ else
+ {
+ x = event->x;
+ y = event->y;
+ state = event->state;
+ }
+
+ smcdata.rerhoCU=((float)x/(float)scdim-0.5)*2.;
+ smcdata.imrhoCU=(0.5-(float)y/(float)scdim)*2.;
+
+ /* More efficient rather than calling showtextstat() */
+ rho2z(smcdata.rerhoCU, smcdata.imrhoCU, &r, &j);
+ r*=smcdata.z0; j*=smcdata.z0;
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelzCU], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelzCU]), b);
+
+ rho2y(smcdata.rerhoCU, smcdata.imrhoCU, &r, &j);
+ r/=smcdata.z0; j/=smcdata.z0;
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelyCU], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelyCU]), b);
+
+ r=smcdata.rerhoCU; j=smcdata.imrhoCU;
+ float2prefs(r, b, 0); sprintf(b2, "%cj", j>0. ? '+' : '-'); strcat(b, b2);
+ float2prefs(fabs(j), b2, 0); strcat(b, b2);
+ strcpy(b2, b); sprintf(b, statlabelname[labelrhoCU], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelrhoCU]), b);
+
+ r=sqrt((smcdata.rerhoCU*smcdata.rerhoCU)+
+ (smcdata.imrhoCU*smcdata.imrhoCU));
+ sprintf(b, "%5.2f", (1.+r)/(1.-r));
+ strcpy(b2, b); sprintf(b, statlabelname[labelSWRCU], b2);
+ gtk_label_set_text(GTK_LABEL(statarr[labelSWRCU]), b);
+
+
+ return TRUE;
+}
+
+void set_first_val(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ GtkWidget *lb, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Set new value");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etbn_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+
+ gtk_widget_grab_focus(etb);
+
+ entry_text_type=ETTN1;
+}
+
+void set_second_val(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))){
+ GtkWidget *lb, *etb;
+
+ /* New widget for value entry */
+ entryval=gtk_dialog_new();
+ gtk_window_set_transient_for(GTK_WINDOW(entryval), GTK_WINDOW(topwindow));
+
+ /* Entry vbox */
+ evb=gtk_vbox_new(FALSE, 0);
+
+ /* Label */
+ lb=gtk_label_new("Set new value");
+ gtk_box_pack_start(GTK_BOX(evb), lb, FALSE, FALSE, FALSE);
+ gtk_widget_show(lb);
+
+ /* entry box */
+ etb=gtk_entry_new_with_max_length(20);
+ gtk_entry_set_editable(GTK_ENTRY(etb), TRUE);
+ gtk_signal_connect(GTK_OBJECT(etb), "activate",
+ GTK_SIGNAL_FUNC(etbn_callback), GTK_OBJECT(etb));
+ gtk_box_pack_start(GTK_BOX(evb), etb, FALSE, FALSE, FALSE);
+ gtk_widget_show(etb);
+
+ /* realize in entryval separate widget */
+ gtk_container_add(GTK_CONTAINER(GTK_DIALOG(entryval)->vbox),
+ evb);
+ gtk_widget_show(entryval);
+ gtk_widget_show(evb);
+
+
+ gtk_widget_grab_focus(etb);
+
+ entry_text_type=ETTN2;
+}
+
+
+gint etbn_callback(GtkWidget *widget __attribute__((unused)),
+ GtkWidget *entry) {
+ float val1, val2;
+ char p;
+
+ entry_text=(gchar*)gtk_entry_get_text(GTK_ENTRY(entry));
+ if(strlen(entry_text)!=0){
+ switch(entry_text_type) {
+ case ETTN1:
+ componentvaluestringdecode(entry_text,
+ &smcdata.ELval0[smcdata.neidx], &val1,
+ &val2, &p);
+ break;
+ case ETTN2:
+ componentvaluestringdecode(entry_text,
+ &smcdata.ELval1[smcdata.neidx], &val1,
+ &val2, &p);
+ break;
+ default: printf("%s\n", entry_text);
+ }
+
+ recalc(); showtextstat(); showcircdesc();
+ entry_text_type=ETTNULL;
+ drawchart(); gtk_widget_draw(scarea, NULL);
+ }
+ gtk_widget_destroy(entryval);
+
+ return TRUE;
+}
+
+void do_autotune(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+
+ autotune();
+
+ showtextstat(); showcircdesc();
+}
+
+
+void lock_autotune_activate(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+
+ smcdata.ELlocked[smcdata.neidx]^=1;
+ showcircdesc();
+}
+
+void increase_freq(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+
+ smcdata.f0+=pow(10., floor(log10(smcdata.f0)+0.5))*freqstep;
+ recalc(); drawchart(); gtk_widget_draw(scarea, NULL); showtextstat();
+}
+
+void decrease_freq(GtkWidget *widget __attribute__((unused)),
+ gpointer user_data __attribute__((unused))) {
+
+ smcdata.f0-=pow(10., floor(log10(smcdata.f0)+0.5))*freqstep;
+ recalc(); drawchart(); gtk_widget_draw(scarea, NULL); showtextstat();
+}
diff --git a/widget.h b/widget.h
new file mode 100644
index 0000000..bcfbd4e
--- /dev/null
+++ b/widget.h
@@ -0,0 +1,97 @@
+/*
+ * GSMC - A GTK Smith Chart Calulator for RF impedance matching
+ *
+ * (c) by Lapo Pieri IK5NAX 2003-2004,
+ * and Johannes van der Horst
+ *
+ * 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.
+ *
+ * Send bugs reports, comments, critique, etc, to ik5nax at amsat.org or
+ * lapo_pieri at virgilio.it
+ */
+
+#define ETTNULL 0
+#define ETTSP 1
+#define ETTZ0 2
+#define ETTF0 3
+#define ETTAR 4
+#define ETTAL 5
+#define ETTAC 6
+#define ETTAT 7
+#define ETTIR 8
+#define ETTIL 9
+#define ETTIC 10
+#define ETTIT 11
+#define ETTN1 12
+#define ETTN2 13
+
+void main_quit(GtkWidget*, gpointer),
+ help_about(GtkWidget*, gpointer),
+ help_about_destroy(GtkWidget *, gpointer),
+ help_keystrokes(GtkWidget*, gpointer),
+ help_keystrokes_destroy(GtkWidget *, gpointer),
+ write_activate(GtkWidget*, gpointer),
+ load_activate(GtkWidget*, gpointer),
+ save_activate(GtkWidget*, gpointer),
+ print_activate(GtkWidget*, gpointer),
+ restart(GtkWidget*, gpointer),
+ sp_activate(GtkWidget*, gpointer), f0_activate(GtkWidget*, gpointer),
+ z0_activate(GtkWidget*, gpointer),
+ add_resistance_activate(GtkWidget*, gpointer),
+ add_inductance_activate(GtkWidget*, gpointer),
+ add_capacitance_activate(GtkWidget*, gpointer),
+ add_tline_activate(GtkWidget*, gpointer),
+ ins_resistance_activate(GtkWidget*, gpointer),
+ ins_inductance_activate(GtkWidget*, gpointer),
+ ins_capacitance_activate(GtkWidget*, gpointer),
+ ins_tline_activate(GtkWidget*, gpointer),
+ delete_component_activate(GtkWidget*, gpointer),
+ decrease_first_activate(GtkWidget*, gpointer),
+ increase_first_activate(GtkWidget*, gpointer),
+ decrease_second_activate(GtkWidget*, gpointer),
+ increase_second_activate(GtkWidget*, gpointer),
+ select_previous(GtkWidget*, gpointer),
+ select_next(GtkWidget*, gpointer),
+ decrease_tunestep(GtkWidget*, gpointer),
+ increase_tunestep(GtkWidget*, gpointer),
+ decrease_freqstep(GtkWidget*, gpointer),
+ increase_freqstep(GtkWidget*, gpointer),
+ on_imped_activate(GtkWidget*, gpointer),
+ on_admit_activate(GtkWidget*, gpointer),
+ on_cor_activate(GtkWidget*, gpointer),
+ on_qfac_activate(GtkWidget*, gpointer),
+ wfile_ok_sel(GtkWidget *, GtkFileSelection *),
+ lfile_ok_sel(GtkWidget *, GtkFileSelection *),
+ sfile_ok_sel(GtkWidget *, GtkFileSelection *),
+ print_ok_sel(GtkWidget *, GtkFileSelection *),
+ set_first_val(GtkWidget*, gpointer),
+ set_second_val(GtkWidget*, gpointer),
+ do_autotune(GtkWidget*, gpointer),
+ lock_autotune_activate(GtkWidget*, gpointer),
+ increase_freq(GtkWidget*, gpointer),
+ decrease_freq(GtkWidget*, gpointer);
+
+gint cursor_motion_in_sc(GtkWidget *, GdkEventMotion *);
+
+void menu_create(GtkWidget *, GtkWidget **);
+
+gint set_spZ(void), set_spY(void), set_spRHO(void);
+gint etb_callback(GtkWidget*, GtkWidget*),
+ etbt_callback(GtkWidget*, GtkWidget*),
+ etbn_callback(GtkWidget*, GtkWidget*);
+gint set_series(void), set_parallel(void), set_short_series(void),
+ set_open_series(void), set_short_parallel(void), set_open_parallel(void),
+ set_transmissive(void);
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/gsmc.git
More information about the pkg-hamradio-commits
mailing list