[hamradio-commits] [linsim] 01/01: Imported Upstream version 2.0.0

Greg Beam ki7mt-guest at moszumanska.debian.org
Thu Jan 15 23:30:14 UTC 2015


This is an automated email from the git hooks/post-receive script.

ki7mt-guest pushed a commit to branch master
in repository linsim.

commit 711700a5b54102b09001112dae2ec7539c553fa2
Author: Greg Beam <ki7mt at yahoo.com>
Date:   Thu Jan 15 16:27:01 2015 -0700

    Imported Upstream version 2.0.0
---
 AUTHORS                     |    5 +
 COPYING                     |  340 ++
 ChangeLog                   |   21 +
 INSTALL                     |  275 ++
 Makefile.am                 |   17 +
 Makefile.in                 |  750 ++++
 README                      |   21 +
 aclocal.m4                  | 1141 +++++
 build-aux/config.guess      | 1526 +++++++
 build-aux/config.sub        | 1658 ++++++++
 build-aux/depcomp           |  589 +++
 build-aux/install-sh        |  519 +++
 build-aux/missing           |  367 ++
 configure                   | 9742 +++++++++++++++++++++++++++++++++++++++++++
 configure.ac                |  182 +
 data/linsim.desktop         |    9 +
 data/linsim.simulations.csv |   19 +
 data/linsim.simulations.xls |  Bin 0 -> 9728 bytes
 data/linsim.xpm             |  517 +++
 data/mac/Info.plist.in      |   44 +
 data/mac/linsim.icns        |  Bin 0 -> 11793 bytes
 data/win32/fl_app.nsi       |  168 +
 data/win32/linsim.ico       |  Bin 0 -> 15086 bytes
 doc/asciidoc.conf           |    2 +
 doc/guide.conf              |    3 +
 doc/guide.html              | 1329 ++++++
 doc/guide.txt               |  210 +
 doc/table1.csv              |   18 +
 m4/build.m4                 |   70 +
 m4/debug.m4                 |  104 +
 m4/fltk.m4                  |   54 +
 m4/funcs.m4                 |   15 +
 m4/macosx.m4                |   42 +
 m4/np-compat.m4             |   36 +
 m4/opt.m4                   |   29 +
 m4/pkg-config.m4            |   44 +
 m4/static.m4                |    9 +
 m4/win32.m4                 |   59 +
 scripts/build.mxe           |   18 +
 scripts/mkappbundle.sh      |  119 +
 scripts/mknsisinst.sh       |   41 +
 src/Makefile.am             |  153 +
 src/Makefile.in             |  838 ++++
 src/config.h.in             |  425 ++
 src/csv.cxx                 |  450 ++
 src/delay.cxx               |  151 +
 src/filter_tables.cxx       |  289 ++
 src/filters.cxx             |  554 +++
 src/gauss_fir.cxx           |  115 +
 src/guide.cxx               | 1523 +++++++
 src/include/cmplx.h         |   11 +
 src/include/csv.h           |  116 +
 src/include/delay.h         |   53 +
 src/include/filter_tables.h |  151 +
 src/include/filters.h       |  181 +
 src/include/gauss_fir.h     |   47 +
 src/include/linsim_ui.h     |   82 +
 src/include/linsimrc.h      |    3 +
 src/include/main.h          |   63 +
 src/include/noise_gen.h     |   58 +
 src/include/path.h          |   70 +
 src/include/sim.h           |   99 +
 src/include/sim_vals.h      |   58 +
 src/include/sound.h         |  110 +
 src/linsim.rc               |   18 +
 src/linsim_icon.cxx         |  517 +++
 src/linsim_ui.cxx           |  553 +++
 src/linsim_ui.fl            |  408 ++
 src/main.cxx                |  872 ++++
 src/noise_gen.cxx           |  198 +
 src/path.cxx                |  277 ++
 src/sim.cxx                 |  141 +
 src/sound.cxx               |  320 ++
 73 files changed, 29016 insertions(+)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..59afdee
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,5 @@
+AUTHOR: Dave Freese
+CALLSIGN: W1HKJ
+EMAIL: iam_w1hkj (at) w1hkj [dot] com
+
+Author can be contacted on the linuxham yahoo group
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..bd5c558
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+               GNU GENERAL PUBLIC LICENSE
+                      Version 3
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+

+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+

+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+

+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+

+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+

+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..7e3aed5
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,21 @@
+
+
+=Version 2.0.0=
+
+2014-06-01  David Freese  <w1hkj at w1hkj.com>
+
+	f6dd1d6: DIST FILES
+	b0859b8: SampleRate
+
+
+=Version 1.0.1=
+
+	aef0a6e: Quick guide
+	0d88b7a: Output directory
+	3e58c74: AWGN range-series
+	4850b1d: Header info
+	e3d162f: WAV file format
+	893b095: PathSim
+	bb9da11: Simulation spreadsheet
+	ae73c1e: Warnings
+	6f9f643: Initialize repository
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..e5de687
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,275 @@
+Installation Instructions for linsim
+************************************
+
+To compile linsim you will need:
+
+  * A recent C++ compiler.  The GNU C++ compilers in the 4.x series are
+    known to work.
+
+  * Version 1.1.x of the Fast Light Tool Kit (FLTK), with its
+    development library and headers.  Versions 1.1.7 to 1.1.9 are known
+    to work.  FLTK's multi-threading support is recommended but not
+	required.
+
+Once you have installed the required packages, the following commands
+should be sufficient to compile fl505 and install it under /usr/local:
+
+  ./configure
+  make
+  make install    (you may need superuser privileges for installation)
+
+The `install' target installs the executable, an icon, and a .desktop
+file.  After installation, an fl505 launcher should appear somewhere in
+your applications menu.
+
+Create the desktop launcher.  fl505 is designed as a desktop application
+that accepts target files to be wrapped or unwrapped by dropping the
+file onto the desktop launcher.
+
+Windows installation notes
+**************************
+
+fl505 supports win32 systems as a cross compiled application using the
+MinGW win32 environment.
+
+To build an internationalized version of fl505, install these
+additional packages:
+
+  gettext gettext-devel libiconv libiconv2
+
+   ========== Generic installation instructions follow ==========
+
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use 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 `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..5d57a85
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,17 @@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = src
+
+if HAVE_FLUID
+flgen:
+	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+endif
+
+if DARWIN
+appbundle:
+	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+endif
+
+if HAVE_NSIS
+nsisinst:
+	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+endif
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..e68d1ec
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,750 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
+	ChangeLog INSTALL build-aux/config.guess build-aux/config.sub \
+	build-aux/depcomp build-aux/install-sh build-aux/missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/build.m4 \
+	$(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/fltk.m4 \
+	$(top_srcdir)/m4/funcs.m4 $(top_srcdir)/m4/macosx.m4 \
+	$(top_srcdir)/m4/np-compat.m4 $(top_srcdir)/m4/opt.m4 \
+	$(top_srcdir)/m4/pkg-config.m4 $(top_srcdir)/m4/static.m4 \
+	$(top_srcdir)/m4/win32.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AC_CONFIG_ARGS = @AC_CONFIG_ARGS@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BFD_CFLAGS = @BFD_CFLAGS@
+BFD_LIBS = @BFD_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_LIBS = @EXTRA_LIBS@
+FLTK_CFLAGS = @FLTK_CFLAGS@
+FLTK_CONFIG = @FLTK_CONFIG@
+FLTK_LIBS = @FLTK_LIBS@
+FLUID = @FLUID@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAC_UNIVERSAL_CFLAGS = @MAC_UNIVERSAL_CFLAGS@
+MAC_UNIVERSAL_LDFLAGS = @MAC_UNIVERSAL_LDFLAGS@
+MAKEINFO = @MAKEINFO@
+MAKENSIS = @MAKENSIS@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PTW32_CFLAGS = @PTW32_CFLAGS@
+PTW32_LIBS = @PTW32_LIBS@
+RDYNAMIC = @RDYNAMIC@
+SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@
+SAMPLERATE_LIBS = @SAMPLERATE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
+SNDFILE_LIBS = @SNDFILE_LIBS@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WINDRES = @WINDRES@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+linsim_BUILD_CPPFLAGS = @linsim_BUILD_CPPFLAGS@
+linsim_BUILD_CXXFLAGS = @linsim_BUILD_CXXFLAGS@
+linsim_BUILD_LDADD = @linsim_BUILD_LDADD@
+linsim_BUILD_LDFLAGS = @linsim_BUILD_LDFLAGS@
+linsim_VERSION = @linsim_VERSION@
+linsim_VERSION_MAJOR = @linsim_VERSION_MAJOR@
+linsim_VERSION_MINOR = @linsim_VERSION_MINOR@
+linsim_VERSION_PATCH = @linsim_VERSION_PATCH@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = src
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+	dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+	distcheck distclean distclean-generic distclean-tags \
+	distcleancheck distdir distuninstallcheck dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+	pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
+
+
+ at HAVE_FLUID_TRUE@flgen:
+ at HAVE_FLUID_TRUE@	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+
+ at DARWIN_TRUE@appbundle:
+ at DARWIN_TRUE@	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+
+ at HAVE_NSIS_TRUE@nsisinst:
+ at HAVE_NSIS_TRUE@	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+
+# 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/README b/README
new file mode 100644
index 0000000..b688d25
--- /dev/null
+++ b/README
@@ -0,0 +1,21 @@
+linsim is a computer program intended as a tool for Amateur Radio Digital Mode 
+evaluation under varying HF propogation conditions.  
+
+  Density variations versus altitude in the ionosphere
+  Magnetic-ionic effects that cause polarization-dependent paths
+  Non-uniformity of the ionospheric layers
+
+linsim can be built on multiple computer operating systems;
+
+FreeBSD(TM); Linux(TM), OS X(TM) and Windows(TM).
+The latest version can always be found at:
+
+  http://www.w1hkj.com/
+
+Join the linuxham, NBEMSham or win-fldigi Yahoo group for support, news 
+and updates on W1HKJ software:
+
+  http://groups.yahoo.com/group/linuxham/join
+  http://groups.yahoo.com/group/NBEMSham/join
+  http://groups.yahoo.com/group/win-fldigi/join
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..e975d92
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1141 @@
+# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+# 
+# Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
+#
+# 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.
+#
+# 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.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+        ])
+elif test $pkg_failed = untried; then
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+        ])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	$3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 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.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.3], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.3])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 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.
+
+# serial 1
+
+# 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],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# 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.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 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.
+
+# serial 12
+
+# 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", "GCJ", 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], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$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'.
+  rm -rf conftest.dir
+  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
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  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
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # 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.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # 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.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    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
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# 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.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  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 "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# 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_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 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.
+
+# serial 16
+
+# 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.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# 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_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[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
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  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.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  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.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+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
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# 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.
+
+# serial 6
+
+# 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
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 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.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 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.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# 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.
+
+# serial 5
+
+# 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
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# 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)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 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.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# 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
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 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.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 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.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/build.m4])
+m4_include([m4/debug.m4])
+m4_include([m4/fltk.m4])
+m4_include([m4/funcs.m4])
+m4_include([m4/macosx.m4])
+m4_include([m4/np-compat.m4])
+m4_include([m4/opt.m4])
+m4_include([m4/pkg-config.m4])
+m4_include([m4/static.m4])
+m4_include([m4/win32.m4])
diff --git a/build-aux/config.guess b/build-aux/config.guess
new file mode 100755
index 0000000..f32079a
--- /dev/null
+++ b/build-aux/config.guess
@@ -0,0 +1,1526 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
+
+timestamp='2008-01-23'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, 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 Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[456])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:[3456]*)
+    	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    EM64T | authenticamd)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	else
+	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^CPU/{
+		s: ::g
+		p
+	    }'`"
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit ;;
+    xtensa*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+	    /^LIBC/{
+		s: ::g
+		p
+	    }'`"
+	test x"${LIBC}" != x && {
+		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+		exit
+	}
+	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+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`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/config.sub b/build-aux/config.sub
new file mode 100755
index 0000000..6759825
--- /dev/null
+++ b/build-aux/config.sub
@@ -0,0 +1,1658 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+#   Free Software Foundation, Inc.
+
+timestamp='2008-01-16'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, 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.
+
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| mt \
+	| msp430 \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu | strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tile*)
+		basic_machine=tile-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+        -os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+        -tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+        score-*)
+		os=-elf
+		;;
+        spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+        c4x-* | tic4x-*)
+        	os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+        mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+    	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/depcomp b/build-aux/depcomp
new file mode 100755
index 0000000..e5f9736
--- /dev/null
+++ b/build-aux/depcomp
@@ -0,0 +1,589 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2007-03-29.01
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, 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>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+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
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+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.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  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.  In older versions, 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.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$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"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space 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 preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # 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 ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/build-aux/install-sh b/build-aux/install-sh
new file mode 100755
index 0000000..a5897de
--- /dev/null
+++ b/build-aux/install-sh
@@ -0,0 +1,519 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/build-aux/missing b/build-aux/missing
new file mode 100755
index 0000000..1c8ff70
--- /dev/null
+++ b/build-aux/missing
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, 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.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+	case $LASTARG in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f y.tab.h; then
+	echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG="\${$#}"
+	case $LASTARG in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f lex.yy.c; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+	/^@setfilename/{
+	  s/.* \([^ ]*\) *$/\1/
+	  p
+	  q
+	}' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case $firstarg in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case $firstarg in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..3e737bd
--- /dev/null
+++ b/configure
@@ -0,0 +1,9742 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for linsim 2.0.0.
+#
+# Report bugs to <w1hkj AT w1hkj DOT com>.
+#
+# Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+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
+IFS=$as_save_IFS
+
+     ;;
+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
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  # We cannot yet assume a decent shell, so we have to provide a
+	# neutralization value for shells without unset; and this also
+	# works around shells that cannot unset nonexistent variables.
+	# Preserve -v and -x to the replacement shell.
+	BASH_ENV=/dev/null
+	ENV=/dev/null
+	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+	export CONFIG_SHELL
+	case $- in # ((((
+	  *v*x* | *x*v* ) as_opts=-vx ;;
+	  *v* ) as_opts=-v ;;
+	  *x* ) as_opts=-x ;;
+	  * ) as_opts= ;;
+	esac
+	exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org and w1hkj AT w1hkj DOT
+$0: com about your system, including any error possibly
+$0: output before this message. Then install a modern
+$0: shell, or manually run the script under such a shell if
+$0: you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; 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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# 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
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_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 sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='linsim'
+PACKAGE_TARNAME='linsim'
+PACKAGE_VERSION='2.0.0'
+PACKAGE_STRING='linsim 2.0.0'
+PACKAGE_BUGREPORT='w1hkj AT w1hkj DOT com'
+PACKAGE_URL=''
+
+ac_unique_file="src/main.cxx"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+linsim_BUILD_LDADD
+linsim_BUILD_LDFLAGS
+linsim_BUILD_CXXFLAGS
+linsim_BUILD_CPPFLAGS
+COMPAT_STRCASESTR_FALSE
+COMPAT_STRCASESTR_TRUE
+EXTRA_LIBS
+COMPAT_REGEX_FALSE
+COMPAT_REGEX_TRUE
+HAVE_FLUID_FALSE
+HAVE_FLUID_TRUE
+FLUID
+FLTK_LIBS
+FLTK_CFLAGS
+FLTK_CONFIG
+SNDFILE_LIBS
+SNDFILE_CFLAGS
+SAMPLERATE_LIBS
+SAMPLERATE_CFLAGS
+X_LIBS
+X_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+PTW32_LIBS
+PTW32_CFLAGS
+MINGW32_FALSE
+MINGW32_TRUE
+WIN32_FALSE
+WIN32_TRUE
+HAVE_NSIS_FALSE
+HAVE_NSIS_TRUE
+HAVE_WINDRES_FALSE
+HAVE_WINDRES_TRUE
+MAKENSIS
+WINDRES
+DARWIN_FALSE
+DARWIN_TRUE
+MAC_UNIVERSAL_LDFLAGS
+MAC_UNIVERSAL_CFLAGS
+COMPAT_STACK_FALSE
+COMPAT_STACK_TRUE
+RDYNAMIC
+DEBUG_CFLAGS
+ENABLE_DEBUG_FALSE
+ENABLE_DEBUG_TRUE
+BFD_LIBS
+BFD_CFLAGS
+OPT_CFLAGS
+POW_LIB
+LIBOBJS
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+ac_ct_CC
+CFLAGS
+CC
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CXX
+CPPFLAGS
+LDFLAGS
+CXXFLAGS
+CXX
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+AC_CONFIG_ARGS
+linsim_VERSION
+linsim_VERSION_PATCH
+linsim_VERSION_MINOR
+linsim_VERSION_MAJOR
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+enable_static
+enable_optimizations
+enable_debug
+with_bfd
+enable_mac_universal
+with_ptw32
+with_sndfile
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CXX
+CXXFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CCC
+CC
+CFLAGS
+CPP
+BFD_CFLAGS
+BFD_LIBS
+PTW32_CFLAGS
+PTW32_LIBS
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+X_CFLAGS
+X_LIBS
+SAMPLERATE_CFLAGS
+SAMPLERATE_LIBS
+SNDFILE_CFLAGS
+SNDFILE_LIBS
+FLTK_CONFIG
+FLTK_CFLAGS
+FLTK_LIBS
+FLUID'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# 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.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+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
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -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)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$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 ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$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 ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    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 ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=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 ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_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'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+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
+    $as_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
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# 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 the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    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
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# 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 linsim 2.0.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 \`..']
+
+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]
+  --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]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/linsim]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_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
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of linsim 2.0.0:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --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 build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-static         enable static linking for some libraries
+  --enable-optimizations  use x86 optimizations (none|sse|sse2|sse3|native)
+                          [none]
+  --enable-debug          turn on debugging
+  --enable-mac-universal  build a universal binary on Mac OS X [no]
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-bfd[=DIR]        search for libbfd in DIR/include and DIR/lib
+                          [mingw32 only]
+  --with-ptw32[=DIR]      search for pthreads-w32 in DIR/include and DIR/lib
+                          [mingw32 only]
+  --with-sndfile          enable reading/writing of audio files via libsndfile
+                          [autodetect]
+
+Some influential environment variables:
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  CPP         C preprocessor
+  BFD_CFLAGS  C compiler flags for libbfd
+  BFD_LIBS    linker flags for libbfd
+  PTW32_CFLAGS
+              C compiler flags for pthreads-w32
+  PTW32_LIBS  linker flags for pthreads-w32
+  PKG_CONFIG  path to pkg-config utility
+  PKG_CONFIG_PATH
+              directories to add to pkg-config's search path
+  PKG_CONFIG_LIBDIR
+              path overriding pkg-config's built-in search path
+  X_CFLAGS    C compiler flags for X, overriding pkg-config
+  X_LIBS      linker flags for X, overriding pkg-config
+  SAMPLERATE_CFLAGS
+              C compiler flags for SAMPLERATE, overriding pkg-config
+  SAMPLERATE_LIBS
+              linker flags for SAMPLERATE, overriding pkg-config
+  SNDFILE_CFLAGS
+              C compiler flags for SNDFILE, overriding pkg-config
+  SNDFILE_LIBS
+              linker flags for SNDFILE, overriding pkg-config
+  FLTK_CONFIG Path to fltk-config utility
+  FLTK_CFLAGS C compiler flags for FLTK, overriding fltk-config
+  FLTK_LIBS   linker flags for FLTK, overriding fltk-config
+  FLUID       Fast Light User-Interface Designer
+
+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 <w1hkj AT w1hkj DOT com>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested 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
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+linsim configure 2.0.0
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+
+Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ------------------------------------- ##
+## Report this to w1hkj AT w1hkj DOT com ##
+## ------------------------------------- ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+	 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+	    return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_find_intX_t LINENO BITS VAR
+# -----------------------------------
+# Finds a signed integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_intX_t ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
+$as_echo_n "checking for int$2_t... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+     # Order is important - never check a type that is potentially smaller
+     # than half of the expected target width.
+     for ac_type in int$2_t 'int' 'long int' \
+	 'long long int' 'short int' 'signed char'; do
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+	     enum { N = $2 / 2 - 1 };
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+	        enum { N = $2 / 2 - 1 };
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
+		 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  case $ac_type in #(
+  int$2_t) :
+    eval "$3=yes" ;; #(
+  *) :
+    eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+  break
+fi
+     done
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_intX_t
+
+# ac_fn_c_find_uintX_t LINENO BITS VAR
+# ------------------------------------
+# Finds an unsigned integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_uintX_t ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+$as_echo_n "checking for uint$2_t... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+     # Order is important - never check a type that is potentially smaller
+     # than half of the expected target width.
+     for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
+	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  case $ac_type in #(
+  uint$2_t) :
+    eval "$3=yes" ;; #(
+  *) :
+    eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+  break
+fi
+     done
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_uintX_t
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); 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
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* 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_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_link
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by linsim $as_me 2.0.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+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`
+/usr/bin/hostinfo      = `(/usr/bin/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=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&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_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append 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
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset 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: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > 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
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  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.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_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 $ac_precious_vars; 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,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_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
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_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.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+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
+
+
+
+linsim_VERSION_MAJOR=2
+
+linsim_VERSION_MINOR=0
+
+linsim_VERSION_PATCH=.0
+
+linsim_VERSION=2.0.0
+
+
+
+$as_echo "#define linsim_VERSION_MAJOR 2" >>confdefs.h
+
+
+$as_echo "#define linsim_VERSION_MINOR 0" >>confdefs.h
+
+
+$as_echo "#define linsim_VERSION_PATCH \".0\"" >>confdefs.h
+
+
+$as_echo "#define linsim_VERSION \"2.0.0\"" >>confdefs.h
+
+
+AC_CONFIG_ARGS=$ac_configure_args
+
+ac_aux_dir=
+for ac_dir in build-aux "$srcdir"/build-aux; 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
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+# define build, build_cpu, build_vendor, build_os
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+# define host, host_cpu, host_vendor, host_os
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+# define target, target_cpu, target_vendor, target_os
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+am__api_version='1.11'
+
+# 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"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&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/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+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.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$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'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# 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".
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "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 $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='linsim'
+ VERSION='2.0.0'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+#change the next config item for the specific application src's
+
+ac_config_headers="$ac_config_headers src/config.h"
+
+
+
+# Checks for programs.
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM 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.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
+$as_echo_n "checking whether the C++ compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C++ compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
+$as_echo_n "checking for C++ compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C++ compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+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
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-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='\'
+  am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+depcc="$CXX"  am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&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'.
+  rm -rf conftest.dir
+  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
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # 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.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # 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.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    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
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+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
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+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
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+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
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&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'.
+  rm -rf conftest.dir
+  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
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  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
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # 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.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # 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.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    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
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i 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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.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))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+  MINIX=yes
+else
+  MINIX=
+fi
+
+
+  if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#	  define __EXTENSIONS__ 1
+	  $ac_includes_default
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_safe_to_define___extensions__=yes
+else
+  ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+# Checks for header files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.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))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if eval \${$as_ac_Header+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_ac_Header=yes"
+else
+  eval "$as_ac_Header=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Header
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_opendir+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_opendir+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+for ac_header in arpa/inet.h execinfo.h fcntl.h limits.h memory.h netdb.h netinet/in.h regex.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/utsname.h termios.h unistd.h values.h linux/ppdev.h dev/ppbus/ppi.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if ${ac_cv_header_stdbool_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#ifndef bool
+ "error: bool is not defined"
+#endif
+#ifndef false
+ "error: false is not defined"
+#endif
+#if false
+ "error: false is not 0"
+#endif
+#ifndef true
+ "error: true is not defined"
+#endif
+#if true != 1
+ "error: true is not 1"
+#endif
+#ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+#endif
+
+	struct s { _Bool s: 1; _Bool t; } s;
+
+	char a[true == 1 ? 1 : -1];
+	char b[false == 0 ? 1 : -1];
+	char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+	char d[(bool) 0.5 == true ? 1 : -1];
+	/* See body of main program for 'e'.  */
+	char f[(_Bool) 0.0 == false ? 1 : -1];
+	char g[true];
+	char h[sizeof (_Bool)];
+	char i[sizeof s.t];
+	enum { j = false, k = true, l = false * true, m = true * 256 };
+	/* The following fails for
+	   HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+	_Bool n[m];
+	char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+	char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+	/* Catch a bug in an HP-UX C compiler.  See
+	   http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+	   http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+	 */
+	_Bool q = true;
+	_Bool *pq = &q;
+
+int
+main ()
+{
+
+	bool e = &s;
+	*pq |= q;
+	*pq |= ! q;
+	/* Refer to every declared value, to avoid compiler optimizations.  */
+	return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+		+ !m + !n + !o + !p + !q + !pq);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdbool_h=yes
+else
+  ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+if test $ac_cv_header_stdbool_h = yes; then
+
+$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 cs;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* 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";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 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;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_const=yes
+else
+  ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
+case $ac_cv_c_int16_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int16_t $ac_cv_c_int16_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
+case $ac_cv_c_int32_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int32_t $ac_cv_c_int32_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
+case $ac_cv_c_int64_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int64_t $ac_cv_c_int64_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
+case $ac_cv_c_int8_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int8_t $ac_cv_c_int8_t
+_ACEOF
+;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if ${ac_cv_c_restrict+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_restrict=no
+   # The order here caters to the fact that C++ does not require restrict.
+   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+typedef int * int_ptr;
+	int foo (int_ptr $ac_kw ip) {
+	return ip[0];
+       }
+int
+main ()
+{
+int s[1];
+	int * $ac_kw t = s;
+	t[0] = 0;
+	return foo(t)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) $as_echo "#define restrict /**/" >>confdefs.h
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_time=yes
+else
+  ac_cv_header_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if ${ac_cv_struct_tm+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+				     int *p = &tm.tm_sec;
+				     return !p;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_struct_tm=time.h
+else
+  ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
+case $ac_cv_c_uint16_t in #(
+  no|yes) ;; #(
+  *)
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint16_t $ac_cv_c_uint16_t
+_ACEOF
+;;
+  esac
+
+ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
+case $ac_cv_c_uint32_t in #(
+  no|yes) ;; #(
+  *)
+
+$as_echo "#define _UINT32_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint32_t $ac_cv_c_uint32_t
+_ACEOF
+;;
+  esac
+
+ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
+case $ac_cv_c_uint64_t in #(
+  no|yes) ;; #(
+  *)
+
+$as_echo "#define _UINT64_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint64_t $ac_cv_c_uint64_t
+_ACEOF
+;;
+  esac
+
+ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
+case $ac_cv_c_uint8_t in #(
+  no|yes) ;; #(
+  *)
+
+$as_echo "#define _UINT8_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint8_t $ac_cv_c_uint8_t
+_ACEOF
+;;
+  esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+$as_echo_n "checking for working volatile... " >&6; }
+if ${ac_cv_c_volatile+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_volatile=yes
+else
+  ac_cv_c_volatile=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
+$as_echo "$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
+
+$as_echo "#define volatile /**/" >>confdefs.h
+
+fi
+
+
+# Checks for library functions.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
+$as_echo_n "checking whether closedir returns void... " >&6; }
+if ${ac_cv_func_closedir_void+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_closedir_void=yes
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header_dirent>
+#ifndef __cplusplus
+int closedir ();
+#endif
+
+int
+main ()
+{
+return closedir (opendir (".")) != 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_closedir_void=no
+else
+  ac_cv_func_closedir_void=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
+$as_echo "$ac_cv_func_closedir_void" >&6; }
+if test $ac_cv_func_closedir_void = yes; then
+
+$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
+$as_echo_n "checking for error_at_line... " >&6; }
+if ${ac_cv_lib_error_at_line+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <error.h>
+int
+main ()
+{
+error_at_line (0, 0, "", 0, "an error occurred");
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_error_at_line=yes
+else
+  ac_cv_lib_error_at_line=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
+$as_echo "$ac_cv_lib_error_at_line" >&6; }
+if test $ac_cv_lib_error_at_line = no; then
+  case " $LIBOBJS " in
+  *" error.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS error.$ac_objext"
+ ;;
+esac
+
+fi
+
+if test $ac_cv_c_compiler_gnu = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+$as_echo_n "checking whether $CC needs -traditional... " >&6; }
+if ${ac_cv_prog_gcc_traditional+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    ac_pattern="Autoconf.*'x'"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sgtty.h>
+Autoconf TIOCGETP
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+  ac_cv_prog_gcc_traditional=yes
+else
+  ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+  if test $ac_cv_prog_gcc_traditional = no; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <termio.h>
+Autoconf TCGETA
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+  ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+  if test $ac_cv_prog_gcc_traditional = yes; then
+    CC="$CC -traditional"
+  fi
+fi
+
+for ac_header in sys/select.h sys/socket.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
+$as_echo_n "checking types of arguments for select... " >&6; }
+if ${ac_cv_func_select_args+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
+ for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
+  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+int
+main ()
+{
+extern int select ($ac_arg1,
+					    $ac_arg234, $ac_arg234, $ac_arg234,
+					    $ac_arg5);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+ done
+done
+# Provide a safe default value.
+: "${ac_cv_func_select_args=int,int *,struct timeval *}"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
+$as_echo "$ac_cv_func_select_args" >&6; }
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG1 $1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG234 ($2)
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG5 ($3)
+_ACEOF
+
+rm -f conftest*
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if ${ac_cv_type_signal+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_type_signal=int
+else
+  ac_cv_type_signal=void
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+for ac_func in strftime
+do :
+  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRFTIME 1
+_ACEOF
+
+else
+  # strftime is in -lintl on SCO UNIX.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
+$as_echo_n "checking for strftime in -lintl... " >&6; }
+if ${ac_cv_lib_intl_strftime+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strftime ();
+int
+main ()
+{
+return strftime ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_strftime=yes
+else
+  ac_cv_lib_intl_strftime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
+$as_echo "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = xyes; then :
+  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
+$as_echo_n "checking for working strtod... " >&6; }
+if ${ac_cv_func_strtod+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_strtod=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+$ac_includes_default
+#ifndef strtod
+double strtod ();
+#endif
+int
+main()
+{
+  {
+    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
+    char *string = " +69";
+    char *term;
+    double value;
+    value = strtod (string, &term);
+    if (value != 69 || term != (string + 4))
+      return 1;
+  }
+
+  {
+    /* Under Solaris 2.4, strtod returns the wrong value for the
+       terminating character under some conditions.  */
+    char *string = "NaN";
+    char *term;
+    strtod (string, &term);
+    if (term != string && *(term - 1) == 0)
+      return 1;
+  }
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_strtod=yes
+else
+  ac_cv_func_strtod=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
+$as_echo "$ac_cv_func_strtod" >&6; }
+if test $ac_cv_func_strtod = no; then
+  case " $LIBOBJS " in
+  *" strtod.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
+ ;;
+esac
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = xyes; then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if ${ac_cv_lib_m_pow+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_pow=yes
+else
+  ac_cv_lib_m_pow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = xyes; then :
+  POW_LIB=-lm
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+fi
+
+for ac_func in getaddrinfo gethostbyname hstrerror gmtime_r localtime_r memmove memset mkdir select setenv snprintf socket socketpair strcasecmp strcasestr strchr strdup strerror strlcpy strncasecmp strrchr strstr strtol uname unsetenv vsnprintf
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if ${ac_cv_header_stdbool_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#ifndef bool
+ "error: bool is not defined"
+#endif
+#ifndef false
+ "error: false is not defined"
+#endif
+#if false
+ "error: false is not 0"
+#endif
+#ifndef true
+ "error: true is not defined"
+#endif
+#if true != 1
+ "error: true is not 1"
+#endif
+#ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+#endif
+
+	struct s { _Bool s: 1; _Bool t; } s;
+
+	char a[true == 1 ? 1 : -1];
+	char b[false == 0 ? 1 : -1];
+	char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+	char d[(bool) 0.5 == true ? 1 : -1];
+	/* See body of main program for 'e'.  */
+	char f[(_Bool) 0.0 == false ? 1 : -1];
+	char g[true];
+	char h[sizeof (_Bool)];
+	char i[sizeof s.t];
+	enum { j = false, k = true, l = false * true, m = true * 256 };
+	/* The following fails for
+	   HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+	_Bool n[m];
+	char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+	char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+	/* Catch a bug in an HP-UX C compiler.  See
+	   http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+	   http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+	 */
+	_Bool q = true;
+	_Bool *pq = &q;
+
+int
+main ()
+{
+
+	bool e = &s;
+	*pq |= q;
+	*pq |= ! q;
+	/* Refer to every declared value, to avoid compiler optimizations.  */
+	return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+		+ !m + !n + !o + !p + !q + !pq);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdbool_h=yes
+else
+  ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+if test $ac_cv_header_stdbool_h = yes; then
+
+$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+# Checks for library functions.
+for ac_func in strstr
+do :
+  ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
+if test "x$ac_cv_func_strstr" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRSTR 1
+_ACEOF
+
+fi
+done
+
+
+### static flag
+# Set ac_cv_static to yes/no
+# Substitute RTLIB in Makefile
+
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; case "${enableval}" in
+                    yes|no) ac_cv_static="${enableval}" ;;
+                    *)      as_fn_error $? "bad value ${enableval} for --enable-static" "$LINENO" 5 ;;
+                 esac
+else
+  ac_cv_static=no
+fi
+
+
+
+### optimizations
+# Set ac_cv_opt to arg
+# Substitute OPT_FLAGS in Makefile
+
+  # Check whether --enable-optimizations was given.
+if test "${enable_optimizations+set}" = set; then :
+  enableval=$enable_optimizations; case "${enableval}" in
+                  none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;;
+                  *)                         as_fn_error $? "bad value ${enableval} for --enable-optimizations" "$LINENO" 5 ;;
+                 esac
+else
+  ac_cv_opt=none
+fi
+
+  OPT_CFLAGS="-O2 -ffast-math -finline-functions -fomit-frame-pointer"
+  case "$ac_cv_opt" in
+      sse)
+          OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse"
+	  ;;
+      sse2)
+          OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse"
+	  ;;
+      sse3)
+          OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse"
+	  ;;
+      native)
+          OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse"
+	  ;;
+      none)
+          ;;
+  esac
+
+
+
+
+### debug flag
+# Set ac_cv_debug to yes/no
+# Override CXXFLAGS
+# Set ENABLE_DEBUG Makefile conditional
+# Substitute RDYNAMIC in Makefile
+
+
+
+  # Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+  enableval=$enable_debug; case "${enableval}" in
+                  yes|no) ac_cv_debug="${enableval}" ;;
+                  *)      as_fn_error $? "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;;
+                 esac
+else
+  ac_cv_debug=no
+fi
+
+
+
+
+
+# Check whether --with-bfd was given.
+if test "${with_bfd+set}" = set; then :
+  withval=$with_bfd; ac_cv_want_bfd="$withval"
+else
+  ac_cv_want_bfd=yes
+fi
+
+
+  if test "x$ac_cv_debug" = "xyes" && test "x$ac_cv_want_bfd" != "xno" && \
+     test "x$target_mingw32" = "xyes"; then
+      if test "x$ac_cv_want_bfd" != "xyes"; then # set -I and -L switches
+          bfd_default_cflags="-I${ac_cv_want_bfd}/include"
+          bfd_default_libs="-L${ac_cv_want_bfd}/lib"
+      fi
+      # don't override the user-specified vars
+      BFD_CFLAGS="${BFD_CFLAGS:-$bfd_default_cflags}"
+      BFD_LIBS="${BFD_LIBS:-$bfd_default_libs}"
+      ac_cv_want_bfd="yes"
+
+      CPPFLAGS_saved="$CPPFLAGS"
+      LDFLAGS_saved="$LDFLAGS"
+      CPPFLAGS="$CPPFLAGS $BFD_CFLAGS"
+      LDFLAGS="$LDFLAGS $BFD_LIBS"
+
+      ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default"
+if test "x$ac_cv_header_bfd_h" = xyes; then :
+  ac_cv_have_bfd="yes"
+else
+  ac_cv_have_bfd="no"
+fi
+
+
+      if test "x$ac_cv_have_bfd" = "xyes"; then
+          bfd_other_libs="-liberty -lpsapi -limagehlp"
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_set_format in -lbfd" >&5
+$as_echo_n "checking for bfd_set_format in -lbfd... " >&6; }
+if ${ac_cv_lib_bfd_bfd_set_format+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbfd $bfd_other_libs $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bfd_set_format ();
+int
+main ()
+{
+return bfd_set_format ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_bfd_bfd_set_format=yes
+else
+  ac_cv_lib_bfd_bfd_set_format=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_set_format" >&5
+$as_echo "$ac_cv_lib_bfd_bfd_set_format" >&6; }
+if test "x$ac_cv_lib_bfd_bfd_set_format" = xyes; then :
+  ac_cv_have_bfd="yes"
+else
+  ac_cv_have_bfd="no"
+fi
+
+      fi
+      CPPFLAGS="$CPPFLAGS_saved"
+      LDFLAGS="$LDFLAGS_saved"
+      if test "x$ac_cv_have_bfd" = "xyes"; then
+          BFD_LIBS="$BFD_LIBS -lbfd $bfd_other_libs"
+      fi
+  fi
+
+  if test "x$ac_cv_debug" = "xyes"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug info flag" >&5
+$as_echo_n "checking for debug info flag... " >&6; }
+      if test "x$GXX" = "xyes"; then
+          if test "x$target_mingw32" = "xyes"; then
+              gflag="-gstabs"
+          else
+              gflag="-ggdb3"
+          fi
+      else
+          gflag="-g"
+      fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gflag" >&5
+$as_echo "$gflag" >&6; }
+      DEBUG_CFLAGS="-O0 -fno-inline-functions -fno-omit-frame-pointer $gflag -Wall"
+
+
+  LDFLAGS_saved="$LDFLAGS"
+  LDFLAGS="$LDFLAGS -rdynamic"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -rdynamic" >&5
+$as_echo_n "checking whether $CC supports -rdynamic... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_rdynamic=yes
+else
+  ac_cv_rdynamic=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5
+$as_echo "$ac_cv_rdynamic" >&6; }
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -rdynamic" >&5
+$as_echo_n "checking whether $CXX supports -rdynamic... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_rdynamic=yes
+else
+  ac_cv_rdynamic=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5
+$as_echo "$ac_cv_rdynamic" >&6; }
+  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
+
+
+  LDFLAGS="$LDFLAGS_saved"
+
+      if test "x$ac_cv_rdynamic" = "xyes"; then
+          RDYNAMIC=-rdynamic
+      fi
+
+      CXXFLAGS=""
+      CFLAGS="$CXXFLAGS"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: debugging enabled; overriding CXXFLAGS" >&5
+$as_echo "$as_me: debugging enabled; overriding CXXFLAGS" >&6;}
+
+      if test "x$target_darwin" = "xyes"; then
+          ac_cv_compat_stack=yes
+
+$as_echo "#define HAVE_DBG_STACK 1" >>confdefs.h
+
+      elif test "x$target_mingw32" = "xyes" && test "x$ac_cv_have_bfd" = "xyes"; then
+          ac_cv_compat_stack=yes
+
+$as_echo "#define HAVE_DBG_STACK 1" >>confdefs.h
+
+      else
+          ac_cv_compat_stack=no
+
+$as_echo "#define HAVE_DBG_STACK 0" >>confdefs.h
+
+      fi
+  fi
+   if test "x$ac_cv_debug" = "xyes"; then
+  ENABLE_DEBUG_TRUE=
+  ENABLE_DEBUG_FALSE='#'
+else
+  ENABLE_DEBUG_TRUE='#'
+  ENABLE_DEBUG_FALSE=
+fi
+
+
+
+
+   if test "x$ac_cv_compat_stack" = "xyes"; then
+  COMPAT_STACK_TRUE=
+  COMPAT_STACK_FALSE='#'
+else
+  COMPAT_STACK_TRUE='#'
+  COMPAT_STACK_FALSE=
+fi
+
+
+
+###### OS support
+### OSX
+# Set ac_cv_mac_universal to yes/no
+# Set DARWIN Makefile conditional
+# Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile
+
+case "$target_os" in
+  darwin*)
+      target_darwin="yes"
+      ;;
+  *)
+      target_darwin="no"
+      ;;
+esac
+
+# Check whether --enable-mac-universal was given.
+if test "${enable_mac_universal+set}" = set; then :
+  enableval=$enable_mac_universal; case "${enableval}" in
+                 yes|no) ac_cv_mac_universal="${enableval}" ;;
+                 *)      as_fn_error $? "bad value \"${enableval}\" for --enable-mac-universal" "$LINENO" 5 ;;
+	       esac
+else
+  ac_cv_mac_universal=no
+fi
+
+
+if test "x$target_darwin" = "xyes" && test "x$ac_cv_mac_universal" = "xyes"; then
+    mac_minversion="-mmacosx-version-min=10.4"
+    case "$target_os" in
+      darwin8*)
+        mac_arches="-arch i386 -arch ppc"
+        mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+        ;;
+      darwin9*)
+        mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64"
+        mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
+        ;;
+      *)
+        mac_arches=""
+        mac_sysroot=""
+        ;;
+    esac
+    MAC_UNIVERSAL_CFLAGS="$mac_arches $mac_sysroot $mac_minversion"
+    MAC_UNIVERSAL_LDFLAGS="$mac_arches"
+fi
+
+
+
+ if test "x$target_darwin" = "xyes"; then
+  DARWIN_TRUE=
+  DARWIN_FALSE='#'
+else
+  DARWIN_TRUE='#'
+  DARWIN_FALSE=
+fi
+
+
+### win32
+# Set WIN32 Makefile conditional
+# Set HAVE_WINDRES Makefile conditional
+# Substitute WINDRES in Makefile
+
+case "$target_os" in
+     *mingw*)
+        target_win32="yes"
+        target_mingw32="yes"
+        ;;
+     *cygwin*|*win32*|*w32*)
+        target_win32="yes"
+        ;;
+     *)
+        target_win32="no"
+        ;;
+esac
+
+if test "x$target_win32" = "xyes"; then
+    # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_WINDRES+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$WINDRES"; then
+  ac_cv_prog_WINDRES="$WINDRES" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+WINDRES=$ac_cv_prog_WINDRES
+if test -n "$WINDRES"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
+$as_echo "$WINDRES" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    if  test "x$WINDRES" = "x" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The windres utility could not be found" >&5
+$as_echo "$as_me: WARNING: The windres utility could not be found" >&2;}
+    fi
+
+$as_echo "#define __WOE32__ 1" >>confdefs.h
+
+fi
+
+if test "x$target_mingw32" = "xyes"; then
+    # Extract the first word of "makensis", so it can be a program name with args.
+set dummy makensis; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_MAKENSIS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MAKENSIS"; then
+  ac_cv_prog_MAKENSIS="$MAKENSIS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_MAKENSIS="makensis"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+MAKENSIS=$ac_cv_prog_MAKENSIS
+if test -n "$MAKENSIS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKENSIS" >&5
+$as_echo "$MAKENSIS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+
+
+ if test "x$WINDRES" != "x"; then
+  HAVE_WINDRES_TRUE=
+  HAVE_WINDRES_FALSE='#'
+else
+  HAVE_WINDRES_TRUE='#'
+  HAVE_WINDRES_FALSE=
+fi
+
+
+ if test "x$MAKENSIS" != "x"; then
+  HAVE_NSIS_TRUE=
+  HAVE_NSIS_FALSE='#'
+else
+  HAVE_NSIS_TRUE='#'
+  HAVE_NSIS_FALSE=
+fi
+
+ if test "x$target_win32" = "xyes"; then
+  WIN32_TRUE=
+  WIN32_FALSE='#'
+else
+  WIN32_TRUE='#'
+  WIN32_FALSE=
+fi
+
+ if test "x$target_mingw32" = "xyes"; then
+  MINGW32_TRUE=
+  MINGW32_FALSE='#'
+else
+  MINGW32_TRUE='#'
+  MINGW32_FALSE=
+fi
+
+
+
+
+
+
+
+# Check whether --with-ptw32 was given.
+if test "${with_ptw32+set}" = set; then :
+  withval=$with_ptw32; ac_cv_want_ptw32="$withval"
+else
+  ac_cv_want_ptw32=no
+fi
+
+
+if test "x$ac_cv_want_ptw32" != "xno"; then
+    if test "x$ac_cv_want_ptw32" != "xyes"; then # set -I and -L switches
+        ptw32_default_cflags="-I${ac_cv_want_ptw32}/include"
+        ptw32_default_libs="-L${ac_cv_want_ptw32}/lib"
+    fi
+    ptw32_default_libs="$ptw32_default_libs -lpthreadGC2 -lws2_32"
+
+    # don't override the user-specified vars
+    PTW32_CFLAGS="${PTW32_CFLAGS:-$ptw32_default_cflags}"
+    PTW32_LIBS="${PTW32_LIBS:-$ptw32_default_libs}"
+    ac_cv_want_ptw32="yes"
+fi
+
+
+
+
+
+### X11
+# Set ac_cv_x to yes/no
+# Define USE_X in config.h
+# Substitute X_CFLAGS and X_LIBS in Makefile
+if test "x$target_darwin" = "xno" && test "x$target_win32" = "xno"; then
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=0.9.0
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	else
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		PKG_CONFIG=""
+	fi
+fi
+
+
+
+
+
+
+
+test "x$ac_cv_want_x" = "x" && ac_cv_want_x="check"
+case "x$ac_cv_want_x" in
+    "xno")
+            ac_cv_x=no
+            ;;
+    "xcheck")
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+if test -n "$X_CFLAGS"; then
+    pkg_cv_X_CFLAGS="$X_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_X_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$X_LIBS"; then
+    pkg_cv_X_LIBS="$X_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_X_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        X_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1`
+        else
+	        X_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$X_PKG_ERRORS" >&5
+
+	ac_cv_x=no
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	ac_cv_x=no
+else
+	X_CFLAGS=$pkg_cv_X_CFLAGS
+	X_LIBS=$pkg_cv_X_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	ac_cv_x=yes
+fi
+            ;;
+    "xyes")
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+if test -n "$X_CFLAGS"; then
+    pkg_cv_X_CFLAGS="$X_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_X_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$X_LIBS"; then
+    pkg_cv_X_LIBS="$X_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "x11") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_X_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        X_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1`
+        else
+	        X_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$X_PKG_ERRORS" >&5
+
+	as_fn_error $? "Package requirements (x11) were not met:
+
+$X_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables X_CFLAGS
+and X_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables X_CFLAGS
+and X_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	X_CFLAGS=$pkg_cv_X_CFLAGS
+	X_LIBS=$pkg_cv_X_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+	    # if we get here the test has succeeded
+            ac_cv_x=yes
+            ;;
+esac
+
+if test "x$ac_cv_x" = "xyes"; then
+
+$as_echo "#define USE_X 1" >>confdefs.h
+
+    pkg_x_version=`$PKG_CONFIG --modversion "x11" 2>/dev/null`
+else
+
+$as_echo "#define USE_X 0" >>confdefs.h
+
+    pkg_x_version=""
+fi
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define X_BUILD_VERSION "$pkg_x_version"
+_ACEOF
+
+
+:
+
+fi
+
+### libsamplerate
+# Required if $ac_cv_want_fldigi is "yes"
+# Set ac_cv_samplerate to yes/no    (not used)
+# Define USE_SAMPLERATE in config.h (as above)
+# Substitute SAMPLERATE_CFLAGS and SAMPLERATE_LIBS in Makefile
+
+
+
+
+
+ac_cv_want_samplerate=yes
+
+test "x$ac_cv_want_samplerate" = "x" && ac_cv_want_samplerate="check"
+case "x$ac_cv_want_samplerate" in
+    "xno")
+            ac_cv_samplerate=no
+            ;;
+    "xcheck")
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SAMPLERATE" >&5
+$as_echo_n "checking for SAMPLERATE... " >&6; }
+
+if test -n "$SAMPLERATE_CFLAGS"; then
+    pkg_cv_SAMPLERATE_CFLAGS="$SAMPLERATE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"samplerate >= 0.1.1\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "samplerate >= 0.1.1") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SAMPLERATE_CFLAGS=`$PKG_CONFIG --cflags "samplerate >= 0.1.1" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SAMPLERATE_LIBS"; then
+    pkg_cv_SAMPLERATE_LIBS="$SAMPLERATE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"samplerate >= 0.1.1\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "samplerate >= 0.1.1") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SAMPLERATE_LIBS=`$PKG_CONFIG --libs "samplerate >= 0.1.1" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        SAMPLERATE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "samplerate >= 0.1.1" 2>&1`
+        else
+	        SAMPLERATE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "samplerate >= 0.1.1" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SAMPLERATE_PKG_ERRORS" >&5
+
+	ac_cv_samplerate=no
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	ac_cv_samplerate=no
+else
+	SAMPLERATE_CFLAGS=$pkg_cv_SAMPLERATE_CFLAGS
+	SAMPLERATE_LIBS=$pkg_cv_SAMPLERATE_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	ac_cv_samplerate=yes
+fi
+            ;;
+    "xyes")
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SAMPLERATE" >&5
+$as_echo_n "checking for SAMPLERATE... " >&6; }
+
+if test -n "$SAMPLERATE_CFLAGS"; then
+    pkg_cv_SAMPLERATE_CFLAGS="$SAMPLERATE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"samplerate >= 0.1.1\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "samplerate >= 0.1.1") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SAMPLERATE_CFLAGS=`$PKG_CONFIG --cflags "samplerate >= 0.1.1" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SAMPLERATE_LIBS"; then
+    pkg_cv_SAMPLERATE_LIBS="$SAMPLERATE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"samplerate >= 0.1.1\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "samplerate >= 0.1.1") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SAMPLERATE_LIBS=`$PKG_CONFIG --libs "samplerate >= 0.1.1" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        SAMPLERATE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "samplerate >= 0.1.1" 2>&1`
+        else
+	        SAMPLERATE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "samplerate >= 0.1.1" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SAMPLERATE_PKG_ERRORS" >&5
+
+	as_fn_error $? "Package requirements (samplerate >= 0.1.1) were not met:
+
+$SAMPLERATE_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables SAMPLERATE_CFLAGS
+and SAMPLERATE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables SAMPLERATE_CFLAGS
+and SAMPLERATE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	SAMPLERATE_CFLAGS=$pkg_cv_SAMPLERATE_CFLAGS
+	SAMPLERATE_LIBS=$pkg_cv_SAMPLERATE_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+	    # if we get here the test has succeeded
+            ac_cv_samplerate=yes
+            ;;
+esac
+
+if test "x$ac_cv_samplerate" = "xyes"; then
+
+$as_echo "#define USE_SAMPLERATE 1" >>confdefs.h
+
+    pkg_samplerate_version=`$PKG_CONFIG --modversion "samplerate >= 0.1.1" 2>/dev/null`
+else
+
+$as_echo "#define USE_SAMPLERATE 0" >>confdefs.h
+
+    pkg_samplerate_version=""
+fi
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SAMPLERATE_BUILD_VERSION "$pkg_samplerate_version"
+_ACEOF
+
+
+:
+
+
+### libsndfile
+# Set ac_cv_sndfile to yes/no
+# Define USE_SNDFILE in config.h
+# Substitute SNDFILE_CFLAGS and SNDFILE_LIBS in Makefile
+
+
+
+
+
+# Check whether --with-sndfile was given.
+if test "${with_sndfile+set}" = set; then :
+  withval=$with_sndfile; case "${withval}" in
+                        yes|no) ac_cv_want_sndfile="${withval}" ;;
+                        *)      as_fn_error $? "bad value \"${withval}\" for --with-sndfile" "$LINENO" 5 ;;
+                      esac
+else
+  ac_cv_want_sndfile=check
+fi
+
+
+
+
+test "x$ac_cv_want_sndfile" = "x" && ac_cv_want_sndfile="check"
+case "x$ac_cv_want_sndfile" in
+    "xno")
+            ac_cv_sndfile=no
+            ;;
+    "xcheck")
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SNDFILE" >&5
+$as_echo_n "checking for SNDFILE... " >&6; }
+
+if test -n "$SNDFILE_CFLAGS"; then
+    pkg_cv_SNDFILE_CFLAGS="$SNDFILE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.10\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.10") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SNDFILE_CFLAGS=`$PKG_CONFIG --cflags "sndfile >= 1.0.10" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SNDFILE_LIBS"; then
+    pkg_cv_SNDFILE_LIBS="$SNDFILE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.10\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.10") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SNDFILE_LIBS=`$PKG_CONFIG --libs "sndfile >= 1.0.10" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        SNDFILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sndfile >= 1.0.10" 2>&1`
+        else
+	        SNDFILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sndfile >= 1.0.10" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SNDFILE_PKG_ERRORS" >&5
+
+	ac_cv_sndfile=no
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	ac_cv_sndfile=no
+else
+	SNDFILE_CFLAGS=$pkg_cv_SNDFILE_CFLAGS
+	SNDFILE_LIBS=$pkg_cv_SNDFILE_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	ac_cv_sndfile=yes
+fi
+            ;;
+    "xyes")
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SNDFILE" >&5
+$as_echo_n "checking for SNDFILE... " >&6; }
+
+if test -n "$SNDFILE_CFLAGS"; then
+    pkg_cv_SNDFILE_CFLAGS="$SNDFILE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.10\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.10") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SNDFILE_CFLAGS=`$PKG_CONFIG --cflags "sndfile >= 1.0.10" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$SNDFILE_LIBS"; then
+    pkg_cv_SNDFILE_LIBS="$SNDFILE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"sndfile >= 1.0.10\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "sndfile >= 1.0.10") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_SNDFILE_LIBS=`$PKG_CONFIG --libs "sndfile >= 1.0.10" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        SNDFILE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "sndfile >= 1.0.10" 2>&1`
+        else
+	        SNDFILE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "sndfile >= 1.0.10" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$SNDFILE_PKG_ERRORS" >&5
+
+	as_fn_error $? "Package requirements (sndfile >= 1.0.10) were not met:
+
+$SNDFILE_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables SNDFILE_CFLAGS
+and SNDFILE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables SNDFILE_CFLAGS
+and SNDFILE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	SNDFILE_CFLAGS=$pkg_cv_SNDFILE_CFLAGS
+	SNDFILE_LIBS=$pkg_cv_SNDFILE_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+	    # if we get here the test has succeeded
+            ac_cv_sndfile=yes
+            ;;
+esac
+
+if test "x$ac_cv_sndfile" = "xyes"; then
+
+$as_echo "#define USE_SNDFILE 1" >>confdefs.h
+
+    pkg_sndfile_version=`$PKG_CONFIG --modversion "sndfile >= 1.0.10" 2>/dev/null`
+else
+
+$as_echo "#define USE_SNDFILE 0" >>confdefs.h
+
+    pkg_sndfile_version=""
+fi
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SNDFILE_BUILD_VERSION "$pkg_sndfile_version"
+_ACEOF
+
+
+:
+
+
+### FLTK
+# Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile
+# Set FLUID variable
+# Set HAVE_FLUID Makefile conditional
+
+
+
+
+
+  if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then
+      if test "x$FLTK_CONFIG" = "x"; then
+          # Extract the first word of "fltk-config", so it can be a program name with args.
+set dummy fltk-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_FLTK_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $FLTK_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FLTK_CONFIG="$FLTK_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_FLTK_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_FLTK_CONFIG" && ac_cv_path_FLTK_CONFIG="no"
+  ;;
+esac
+fi
+FLTK_CONFIG=$ac_cv_path_FLTK_CONFIG
+if test -n "$FLTK_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLTK_CONFIG" >&5
+$as_echo "$FLTK_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+      else
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fltk-config" >&5
+$as_echo_n "checking for fltk-config... " >&6; }
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLTK_CONFIG" >&5
+$as_echo "$FLTK_CONFIG" >&6; }
+      fi
+      if test "$FLTK_CONFIG" = "no"; then
+          as_fn_error $? "
+  *** The fltk-config script could not be found. Please install the development
+  *** headers and libraries for FLTK 1.1.x, or set PATH to the directory that
+  *** contains fltk-config.
+          " "$LINENO" 5
+      fi
+      HAVE_FLTK_API_VERSION=no
+      FLTK_API_VERSION="`$FLTK_CONFIG --api-version`"
+      if test $? -ne 0; then
+          as_fn_error $? "$FLTK_CONFIG failed" "$LINENO" 5
+      fi
+      if test "x$FLTK_API_VERSION" = "x1.1" || test "x$FLTK_API_VERSION" = "x1.3"; then
+          HAVE_FLTK_API_VERSION=yes
+      fi
+      LINSIM_FLTK_API_MAJOR=${FLTK_API_VERSION%%.*}
+      LINSIM_FLTK_API_MINOR=${FLTK_API_VERSION#*.}; LINSIM_FLTK_API_MINOR=${LINSIM_FLTK_API_MINOR%%.*}
+      if test "${HAVE_FLTK_API_VERSION}" = "no"; then
+          as_fn_error $? "
+  *** The version of FLTK found on your system provides API version $FLTK_API_VERSION.
+  *** To build $PACKAGE you need a FLTK version that provides API 1.1 or 1.3.
+          " "$LINENO" 5
+      fi
+      FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags`
+      if test "x$ac_cv_static" != "xyes"; then
+          FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images`
+      else
+          FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images`
+      fi
+  else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: not checking for FLTK" >&5
+$as_echo "$as_me: not checking for FLTK" >&6;}
+  fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define FLTK_BUILD_VERSION "`$FLTK_CONFIG --version`"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define LINSIM_FLTK_API_MAJOR $LINSIM_FLTK_API_MAJOR
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define LINSIM_FLTK_API_MINOR $LINSIM_FLTK_API_MINOR
+_ACEOF
+
+
+
+  # Extract the first word of "fluid", so it can be a program name with args.
+set dummy fluid; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_FLUID+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$FLUID"; then
+  ac_cv_prog_FLUID="$FLUID" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_FLUID="fluid"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+FLUID=$ac_cv_prog_FLUID
+if test -n "$FLUID"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLUID" >&5
+$as_echo "$FLUID" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+   if test -n "$FLUID"; then
+  HAVE_FLUID_TRUE=
+  HAVE_FLUID_FALSE='#'
+else
+  HAVE_FLUID_TRUE='#'
+  HAVE_FLUID_FALSE=
+fi
+
+
+
+### XML-RPC library
+# Set ac_cv_xmlrpc to yes/no
+# Substitute XMLRPC_CFLAGS and XMLRPC_LIBS in Makefile
+# Define USE_XMLRPC in config.h
+# Set ENABLE_XMLRPC Makefile conditional
+#AC_linsim_XMLRPC
+
+### Non-POSIX compatibility (i.e. mingw32)
+# Sets various Makefile conditionals; see m4/np-compat.m4
+
+
+
+
+   if test "x$ac_cv_header_regex_h" != "xyes"; then
+  COMPAT_REGEX_TRUE=
+  COMPAT_REGEX_FALSE='#'
+else
+  COMPAT_REGEX_TRUE='#'
+  COMPAT_REGEX_FALSE=
+fi
+
+
+  if test "x$target_mingw32" = "xyes"; then
+      sem_libs="pthreadGC2"
+  else
+      sem_libs="pthread rt"
+  fi
+  other_libs=""
+
+  if test "x$ac_cv_want_ptw32" = "xyes"; then
+      CFLAGS_saved="$CFLAGS"
+      LDFLAGS_saved="$LDFLAGS"
+      EXTRA_LIBS_saved="$EXTRA_LIBS"
+      CFLAGS="$CFLAGS $PTW32_CFLAGS"
+      LDFLAGS="$LDFLAGS $PTW32_LIBS"
+      other_libs=-lws2_32
+  fi
+
+
+
+
+
+LIBS_search_libs_save="$LIBS"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if ${ac_cv_search_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_dlopen+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_dlopen+:} false; then :
+
+else
+  ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  ac_cv_have_func_dlopen=1
+else
+  ac_cv_have_func_dlopen=0
+fi
+
+if test "x$LIBS" != "x"; then
+    echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DLOPEN $ac_cv_have_func_dlopen
+_ACEOF
+
+LIBS="$LIBS_search_libs_save"
+
+
+
+
+
+
+LIBS_search_libs_save="$LIBS"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_clock_gettime+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+
+else
+  ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  ac_cv_have_func_clock_gettime=1
+else
+  ac_cv_have_func_clock_gettime=0
+fi
+
+if test "x$LIBS" != "x"; then
+    echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CLOCK_GETTIME $ac_cv_have_func_clock_gettime
+_ACEOF
+
+LIBS="$LIBS_search_libs_save"
+
+
+
+
+
+
+LIBS_search_libs_save="$LIBS"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_unlink" >&5
+$as_echo_n "checking for library containing sem_unlink... " >&6; }
+if ${ac_cv_search_sem_unlink+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sem_unlink ();
+int
+main ()
+{
+return sem_unlink ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' $sem_libs; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_sem_unlink=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_sem_unlink+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_sem_unlink+:} false; then :
+
+else
+  ac_cv_search_sem_unlink=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_unlink" >&5
+$as_echo "$ac_cv_search_sem_unlink" >&6; }
+ac_res=$ac_cv_search_sem_unlink
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  ac_cv_have_func_sem_unlink=1
+else
+  ac_cv_have_func_sem_unlink=0
+fi
+
+if test "x$LIBS" != "x"; then
+    echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SEM_UNLINK $ac_cv_have_func_sem_unlink
+_ACEOF
+
+LIBS="$LIBS_search_libs_save"
+
+
+
+
+
+
+LIBS_search_libs_save="$LIBS"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_timedwait" >&5
+$as_echo_n "checking for library containing sem_timedwait... " >&6; }
+if ${ac_cv_search_sem_timedwait+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sem_timedwait ();
+int
+main ()
+{
+return sem_timedwait ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' $sem_libs; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_sem_timedwait=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_sem_timedwait+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_sem_timedwait+:} false; then :
+
+else
+  ac_cv_search_sem_timedwait=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_timedwait" >&5
+$as_echo "$ac_cv_search_sem_timedwait" >&6; }
+ac_res=$ac_cv_search_sem_timedwait
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  ac_cv_have_func_sem_timedwait=1
+else
+  ac_cv_have_func_sem_timedwait=0
+fi
+
+if test "x$LIBS" != "x"; then
+    echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SEM_TIMEDWAIT $ac_cv_have_func_sem_timedwait
+_ACEOF
+
+LIBS="$LIBS_search_libs_save"
+
+
+
+  if test "x$ac_cv_want_ptw32" = "xyes"; then
+      CFLAGS="$CFLAGS_saved"
+      LDFLAGS="$LDFLAGS_saved"
+      EXTRA_LIBS="$EXTRA_LIBS_saved"
+  fi
+
+
+   if test "x$ac_cv_func_strcasestr" != "xyes"; then
+  COMPAT_STRCASESTR_TRUE=
+  COMPAT_STRCASESTR_FALSE='#'
+else
+  COMPAT_STRCASESTR_TRUE='#'
+  COMPAT_STRCASESTR_FALSE=
+fi
+
+
+
+### build info
+# Define various build variables in config.h
+
+# Define build flags and substitute in Makefile.in
+# CPPFLAGS
+  linsim_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include"
+  if test "x$target_win32" = "xyes"; then
+      linsim_BUILD_CPPFLAGS="$linsim_BUILD_CPPFLAGS -D_WINDOWS"
+  fi
+# CXXFLAGS
+  linsim_BUILD_CXXFLAGS="$FLTK_CFLAGS $linsim_BUILD_CPPFLAGS $SNDFILE_CFLAGS $SAMPLERATE_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS $PTW32_CFLAGS"
+  if test "x$target_mingw32" = "xyes"; then
+      linsim_BUILD_CXXFLAGS="-mthreads $linsim_BUILD_CXXFLAGS -D_WINDOWS"
+  fi
+# LDFLAGS
+  linsim_BUILD_LDFLAGS=
+# LDADD
+  linsim_BUILD_LDADD="$FLTK_LIBS $X_LIBS $SNDFILE_LIBS $SAMPLERATE_LIBS $EXTRA_LIBS $PTW32_LIBS"
+
+  if test "x$ac_cv_debug" = "xyes"; then
+      linsim_BUILD_CXXFLAGS="$linsim_BUILD_CXXFLAGS -UNDEBUG"
+      linsim_BUILD_LDFLAGS="$linsim_BUILD_LDFLAGS $RDYNAMIC"
+  else
+      linsim_BUILD_CXXFLAGS="$linsim_BUILD_CXXFLAGS -DNDEBUG"
+  fi
+  if test "x$target_mingw32" = "xyes"; then
+      linsim_BUILD_LDFLAGS="-mthreads $linsim_BUILD_LDFLAGS"
+  fi
+
+
+
+
+
+
+#define build variables for config.h
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_BUILD_PLATFORM "$build"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_HOST_PLATFORM "$host"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_TARGET_PLATFORM "$target"
+_ACEOF
+
+
+  test "x$LC_ALL" != "x" && LC_ALL_saved="$LC_ALL"
+  LC_ALL=C
+  export LC_ALL
+
+
+  ac_sh_dq="\"`echo $ac_configure_args | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_CONFIGURE_ARGS $ac_sh_dq
+_ACEOF
+
+
+
+  ac_sh_dq="\"`date | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_DATE $ac_sh_dq
+_ACEOF
+
+
+
+  ac_sh_dq="\"`whoami | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_USER $ac_sh_dq
+_ACEOF
+
+
+
+  ac_sh_dq="\"`hostname | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_HOST $ac_sh_dq
+_ACEOF
+
+
+
+  ac_sh_dq="\"`$CXX -v 2>&1 | tail -1 | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_COMPILER $ac_sh_dq
+_ACEOF
+
+
+
+  ac_sh_dq="\"`echo $linsim_BUILD_CPPFLAGS $linsim_BUILD_CXXFLAGS | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define linsim_BUILD_CXXFLAGS $ac_sh_dq
+_ACEOF
+
+
+  ac_sh_dq="\"`echo $linsim_BUILD_LDFLAGS $linsim_BUILD_LDADD | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define linsim_BUILD_LDFLAGS $ac_sh_dq
+_ACEOF
+
+
+  if test "x$LC_ALL_saved" != "x"; then
+      LC_ALL="$LC_ALL_saved"
+      export LC_ALL
+  fi
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile"
+
+
+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, we kill variables containing newlines.
+# 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.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  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}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COMPAT_STACK_TRUE}" && test -z "${COMPAT_STACK_FALSE}"; then
+  as_fn_error $? "conditional \"COMPAT_STACK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DARWIN_TRUE}" && test -z "${DARWIN_FALSE}"; then
+  as_fn_error $? "conditional \"DARWIN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_WINDRES_TRUE}" && test -z "${HAVE_WINDRES_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_WINDRES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_NSIS_TRUE}" && test -z "${HAVE_NSIS_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_NSIS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then
+  as_fn_error $? "conditional \"WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MINGW32_TRUE}" && test -z "${MINGW32_FALSE}"; then
+  as_fn_error $? "conditional \"MINGW32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_FLUID_TRUE}" && test -z "${HAVE_FLUID_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_FLUID\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COMPAT_REGEX_TRUE}" && test -z "${COMPAT_REGEX_FALSE}"; then
+  as_fn_error $? "conditional \"COMPAT_REGEX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COMPAT_STRCASESTR_TRUE}" && test -z "${COMPAT_STRCASESTR_FALSE}"; then
+  as_fn_error $? "conditional \"COMPAT_STRCASESTR\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $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}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
+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
+IFS=$as_save_IFS
+
+     ;;
+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
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; 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
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# 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
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval 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="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by linsim $as_me 2.0.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   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
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <w1hkj AT w1hkj DOT com>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+linsim config.status 2.0.0
+configured by $0, generated by GNU Autoconf 2.68,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+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=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  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 || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  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_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  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 against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries 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[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$ac_tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # 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.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  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 "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# 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 || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+### summary
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result:
+Configuration summary:
+
+  Version ..................... $VERSION
+
+  Target OS ................... $target_os
+
+  Static linking .............. $ac_cv_static
+  CPU optimizations ........... $ac_cv_opt
+  Debugging ................... $ac_cv_debug
+
+  sndfile ..................... $ac_cv_sndfile
+" >&5
+$as_echo "
+Configuration summary:
+
+  Version ..................... $VERSION
+
+  Target OS ................... $target_os
+
+  Static linking .............. $ac_cv_static
+  CPU optimizations ........... $ac_cv_opt
+  Debugging ................... $ac_cv_debug
+
+  sndfile ..................... $ac_cv_sndfile
+" >&6; }
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..2f4ed75
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,182 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+# Generic support for FLTK applications
+
+
+AC_COPYRIGHT([Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)])
+
+AC_PREREQ([2.63])
+
+dnl major and minor must be integers; patch may
+dnl contain other characters or be empty
+m4_define(linsim_MAJOR,  [2])
+m4_define(linsim_MINOR,  [0])
+m4_define(linsim_PATCH,  [.0])
+
+AC_INIT([linsim], linsim_MAJOR.linsim_MINOR[]linsim_PATCH, [w1hkj AT w1hkj DOT com])
+
+AC_SUBST([linsim_VERSION_MAJOR], [linsim_MAJOR])
+AC_SUBST([linsim_VERSION_MINOR], [linsim_MINOR])
+AC_SUBST([linsim_VERSION_PATCH], [linsim_PATCH])
+AC_SUBST([linsim_VERSION], [linsim_MAJOR.linsim_MINOR[]linsim_PATCH])
+
+AC_DEFINE([linsim_VERSION_MAJOR], [linsim_MAJOR], [major version number])
+AC_DEFINE([linsim_VERSION_MINOR], [linsim_MINOR], [minor version number])
+AC_DEFINE([linsim_VERSION_PATCH], ["linsim_PATCH"], [patch/alpha version string])
+AC_DEFINE([linsim_VERSION], ["linsim_MAJOR.linsim_MINOR[]linsim_PATCH"], [version string])
+
+AC_SUBST([AC_CONFIG_ARGS], [$ac_configure_args])
+AC_CONFIG_AUX_DIR([build-aux])
+
+# define build, build_cpu, build_vendor, build_os
+AC_CANONICAL_BUILD
+# define host, host_cpu, host_vendor, host_os
+AC_CANONICAL_HOST
+# define target, target_cpu, target_vendor, target_os
+AC_CANONICAL_TARGET
+
+AM_INIT_AUTOMAKE([-Wall foreign std-options 1.9.6])
+
+#change the next config item for the specific application src's
+AC_CONFIG_SRCDIR([src/main.cxx])
+AC_CONFIG_HEADERS([src/config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_USE_SYSTEM_EXTENSIONS
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_DIRENT
+AC_CHECK_HEADERS([arpa/inet.h execinfo.h fcntl.h limits.h memory.h netdb.h netinet/in.h regex.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/utsname.h termios.h unistd.h values.h linux/ppdev.h dev/ppbus/ppi.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_INT64_T
+AC_TYPE_INT8_T
+AC_C_RESTRICT
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_STRUCT_TM
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
+AC_TYPE_UINT8_T
+AC_C_VOLATILE
+
+# Checks for library functions.
+AC_FUNC_CLOSEDIR_VOID
+AC_FUNC_ERROR_AT_LINE
+AC_PROG_GCC_TRADITIONAL
+dnl AC_FUNC_MALLOC
+dnl AC_FUNC_REALLOC
+AC_FUNC_SELECT_ARGTYPES
+AC_TYPE_SIGNAL
+AC_FUNC_STRFTIME
+AC_FUNC_STRTOD
+AC_CHECK_FUNCS([getaddrinfo gethostbyname hstrerror gmtime_r localtime_r memmove memset mkdir select setenv snprintf socket socketpair strcasecmp strcasestr strchr strdup strerror strlcpy strncasecmp strrchr strstr strtol uname unsetenv vsnprintf])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_CHECK_FUNCS([strstr])
+
+### static flag
+# Set ac_cv_static to yes/no
+# Substitute RTLIB in Makefile
+AC_FL_STATIC
+
+### optimizations
+# Set ac_cv_opt to arg
+# Substitute OPT_FLAGS in Makefile
+AC_FL_OPT
+
+### debug flag
+# Set ac_cv_debug to yes/no
+# Override CXXFLAGS
+# Set ENABLE_DEBUG Makefile conditional
+# Substitute RDYNAMIC in Makefile
+AC_FL_DEBUG
+
+###### OS support
+### OSX
+# Set ac_cv_mac_universal to yes/no
+# Set DARWIN Makefile conditional
+# Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile
+AC_FL_MACOSX
+### win32
+# Set WIN32 Makefile conditional
+# Set HAVE_WINDRES Makefile conditional
+# Substitute WINDRES in Makefile
+AC_FL_WIN32
+
+### X11
+# Set ac_cv_x to yes/no
+# Define USE_X in config.h
+# Substitute X_CFLAGS and X_LIBS in Makefile
+if test "x$target_darwin" = "xno" && test "x$target_win32" = "xno"; then
+    AC_linsim_PKG_CHECK([x], [x11], [no], [yes])
+fi
+
+### libsamplerate
+# Required if $ac_cv_want_fldigi is "yes"
+# Set ac_cv_samplerate to yes/no    (not used)
+# Define USE_SAMPLERATE in config.h (as above)
+# Substitute SAMPLERATE_CFLAGS and SAMPLERATE_LIBS in Makefile
+AC_linsim_PKG_CHECK([samplerate], [samplerate >= 0.1.1], [no], [no])
+
+### libsndfile
+# Set ac_cv_sndfile to yes/no
+# Define USE_SNDFILE in config.h
+# Substitute SNDFILE_CFLAGS and SNDFILE_LIBS in Makefile
+AC_linsim_PKG_CHECK([sndfile], [sndfile >= 1.0.10], [yes], [yes],
+                    [enable reading/writing of audio files via libsndfile @<:@autodetect@:>@] )
+
+### FLTK
+# Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile
+# Set FLUID variable
+# Set HAVE_FLUID Makefile conditional
+AC_CHECK_FLTK
+
+### XML-RPC library
+# Set ac_cv_xmlrpc to yes/no
+# Substitute XMLRPC_CFLAGS and XMLRPC_LIBS in Makefile
+# Define USE_XMLRPC in config.h
+# Set ENABLE_XMLRPC Makefile conditional
+#AC_linsim_XMLRPC
+
+### Non-POSIX compatibility (i.e. mingw32)
+# Sets various Makefile conditionals; see m4/np-compat.m4
+AC_FL_NP_COMPAT
+
+### build info
+# Define various build variables in config.h
+AC_linsim_BUILD_INFO
+
+AC_CONFIG_FILES([Makefile src/Makefile])
+
+AC_OUTPUT
+
+### summary
+AC_MSG_RESULT([
+Configuration summary:
+
+  Version ..................... $VERSION
+  
+  Target OS ................... $target_os
+
+  Static linking .............. $ac_cv_static
+  CPU optimizations ........... $ac_cv_opt
+  Debugging ................... $ac_cv_debug
+
+  sndfile ..................... $ac_cv_sndfile
+])
diff --git a/data/linsim.desktop b/data/linsim.desktop
new file mode 100644
index 0000000..7694d00
--- /dev/null
+++ b/data/linsim.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=linsim
+GenericName=HF Path Simulator
+Comment=Amateur Radio Communications
+Exec=linsim
+Icon=linsim
+Terminal=false
+Type=Application
+Categories=Other;HamRadio;
diff --git a/data/linsim.simulations.csv b/data/linsim.simulations.csv
new file mode 100644
index 0000000..05bb1ff
--- /dev/null
+++ b/data/linsim.simulations.csv
@@ -0,0 +1,19 @@
+TITLE,AWGN,S/N,P1,SPREAD_1,OFFSET_1,P2,DELAY_2,SPREAD_2,OFFSET_2,P3,DELAY_3,SPREAD_3,OFFSET_3
+"AWGN S/N",1,10,0,0,0,0,0,0,0,0,0,0,0,
+"CCIR 520-2 (Doppler Fading)",0,0,1,0.2,10,1,0.5,0.2,5,0,0,0,0,
+"CCIR 520-2 (Flutter Fading)",0,0,1,10,0,1,0.5,10,0,0,0,0,0,
+"CCIR 520-2 (Good Conditions)",0,0,1,0.1,0,1,0.5,0.1,0,0,0,0,0,
+"CCIR-520-2 (Moderate Conditions)",0,0,1,0.5,0,1,1,0.5,0,0,0,0,0,
+"CCIR-520-2 (Poor Conditions)",0,0,1,0.5,0,1,2,0.5,0,0,0,0,0,
+"Direct Path",0,10,0,0,0,0,0,0,0,0,0,0,0,
+"Frequency Shifter",0,0,1,0,500,0,0,0,0,0,0,0,0,
+"High-Latitude Disturbed",0,0,1,30,0,1,7,30,0,0,0,0,0,
+"High-Latitude Moderate",0,0,1,10,0,1,3,10,0,0,0,0,0,
+"High-Latitude Quiet",0,0,1,0.5,0,1,1,0.5,0,0,0,0,0,
+"Low-Latitude Disturbed",0,0,1,10,0,1,6,10,0,0,0,0,0,
+"Low-Latitude Moderate",0,0,1,1.5,0,1,2,1.5,0,0,0,0,0,
+"Low-Latitude Quiet",0,0,1,0.5,0,1,0.5,0.5,0,0,0,0,0,
+"Mid-Latitude Disturbed",0,0,1,1,0,1,2,1,0,0,0,0,0,
+"Mid-Latitude Disturbed NVIS",0,0,1,1,0,1,7,1,0,0,0,0,0,
+"Mid-Latitude Moderate",0,0,1,0.5,0,1,1,0.5,0,0,0,0,0,
+"Mid-Latitude Quiet",0,0,1,0.5,0,1,0.5,0.5,0,0,0,0,0,
diff --git a/data/linsim.simulations.xls b/data/linsim.simulations.xls
new file mode 100644
index 0000000..99e6845
Binary files /dev/null and b/data/linsim.simulations.xls differ
diff --git a/data/linsim.xpm b/data/linsim.xpm
new file mode 100644
index 0000000..8884393
--- /dev/null
+++ b/data/linsim.xpm
@@ -0,0 +1,517 @@
+/* XPM */
+char * linsim_icon_xpm[] = {
+"48 48 466 2",
+"  	c None",
+". 	c #667F9B",
+"+ 	c #61696B",
+"@ 	c #5A5D5A",
+"# 	c #60686B",
+"$ 	c #677E9A",
+"% 	c #63727E",
+"& 	c #898B89",
+"* 	c #ECEDEB",
+"= 	c #F3F3F2",
+"- 	c #EAEBE8",
+"; 	c #C9CBC8",
+"> 	c #676B68",
+", 	c #63737F",
+"' 	c #68829E",
+") 	c #797C78",
+"! 	c #FFFFFF",
+"~ 	c #EDEEEC",
+"{ 	c #E8EAE6",
+"] 	c #E3E6E2",
+"^ 	c #676A66",
+"/ 	c #6883A2",
+"( 	c #5081BB",
+"_ 	c #729FD1",
+": 	c #616B6F",
+"< 	c #DFE0DE",
+"[ 	c #F8F8F7",
+"} 	c #E5E7E3",
+"| 	c #BCBEB9",
+"1 	c #616C70",
+"2 	c #72A0D0",
+"3 	c #5482BA",
+"4 	c #4A7AB3",
+"5 	c #729FCF",
+"6 	c #5B605D",
+"7 	c #E8EAE8",
+"8 	c #FBFCFB",
+"9 	c #F9FAF9",
+"0 	c #ECEEEB",
+"a 	c #E2E4E0",
+"b 	c #D6DAD5",
+"c 	c #5B615E",
+"d 	c #729FCE",
+"e 	c #4C7BB4",
+"f 	c #4A79B3",
+"g 	c #729ECF",
+"h 	c #739ED0",
+"i 	c #5C605F",
+"j 	c #E1E3DF",
+"k 	c #F0F1EF",
+"l 	c #F3F4F2",
+"m 	c #F2F3F1",
+"n 	c #E9EBE8",
+"o 	c #E1E2DE",
+"p 	c #D1D4CE",
+"q 	c #5C615F",
+"r 	c #739FCF",
+"s 	c #6998C9",
+"t 	c #497AB4",
+"u 	c #4D7CB5",
+"v 	c #5C8DC1",
+"w 	c #719FD2",
+"x 	c #749FCF",
+"y 	c #636E75",
+"z 	c #BBBEBA",
+"A 	c #E3E5E0",
+"B 	c #E1E4DF",
+"C 	c #E7E9E5",
+"D 	c #DFE2DC",
+"E 	c #ACAFAA",
+"F 	c #626F76",
+"G 	c #608FC5",
+"H 	c #4E7EB6",
+"I 	c #5484B9",
+"J 	c #5383B9",
+"K 	c #71A0CF",
+"L 	c #739ECE",
+"M 	c #6B8EB1",
+"N 	c #616562",
+"O 	c #D9DCD7",
+"P 	c #E0E3DE",
+"Q 	c #DDE0DB",
+"R 	c #DDE0DA",
+"S 	c #DEE1DB",
+"T 	c #D0D4CE",
+"U 	c #5E635F",
+"V 	c #6C8EB2",
+"W 	c #73A0CE",
+"X 	c #5484BB",
+"Y 	c #5584B9",
+"Z 	c #5E8CBE",
+"` 	c #4877B3",
+" .	c #729DCF",
+"..	c #719FCF",
+"+.	c #719ECF",
+"@.	c #687883",
+"#.	c #626462",
+"$.	c #AFB2AC",
+"%.	c #CCCFC9",
+"&.	c #CBCDC8",
+"*.	c #A9ADA7",
+"=.	c #606260",
+"-.	c #687A88",
+";.	c #4877B2",
+">.	c #5E8CC2",
+",.	c #4173B0",
+"'.	c #4876B2",
+").	c #5988BE",
+"!.	c #729FD0",
+"~.	c #7398C0",
+"{.	c #8091A1",
+"].	c #A7B8CA",
+"^.	c #6D797F",
+"/.	c #5F6667",
+"(.	c #6B7880",
+"_.	c #9AAFC6",
+":.	c #7C95AA",
+"<.	c #7299C3",
+"[.	c #5A89BD",
+"}.	c #4877B1",
+"|.	c #4472AF",
+"1.	c #3E6FAB",
+"2.	c #6592C7",
+"3.	c #4171AD",
+"4.	c #6C98CB",
+"5.	c #70A0CF",
+"6.	c #798999",
+"7.	c #C4D1DF",
+"8.	c #C4D6EA",
+"9.	c #768EA5",
+"0.	c #729CC9",
+"a.	c #719ECA",
+"b.	c #758FA9",
+"c.	c #B6CCE4",
+"d.	c #B7C9DD",
+"e.	c #778DA1",
+"f.	c #739FD0",
+"g.	c #6A99CB",
+"h.	c #4272AD",
+"i.	c #6893C7",
+"j.	c #4171AC",
+"k.	c #4576AF",
+"l.	c #71A0D0",
+"m.	c #5483BB",
+"n.	c #4675AF",
+"o.	c #6C8FB4",
+"p.	c #8E9597",
+"q.	c #E1EAF4",
+"r.	c #AAB8C5",
+"s.	c #7793AC",
+"t.	c #73A0CF",
+"u.	c #719FCE",
+"v.	c #7793AE",
+"w.	c #A2B3C5",
+"x.	c #D4E1F0",
+"y.	c #89949C",
+"z.	c #6B92B7",
+"A.	c #4675B1",
+"B.	c #5583BB",
+"C.	c #4677B1",
+"D.	c #4070AC",
+"E.	c #709ECE",
+"F.	c #5283BA",
+"G.	c #436DA0",
+"H.	c #ABBCD2",
+"I.	c #ECF1F5",
+"J.	c #7E898F",
+"K.	c #739BC4",
+"L.	c #729AC4",
+"M.	c #7C8994",
+"N.	c #DFE7EF",
+"O.	c #A1B5CF",
+"P.	c #416A9F",
+"Q.	c #5582BC",
+"R.	c #6F9FCE",
+"S.	c #5F8BC0",
+"T.	c #4172AE",
+"U.	c #3F70AD",
+"V.	c #719FD0",
+"W.	c #7496B6",
+"X.	c #8B949C",
+"Y.	c #7194C0",
+"Z.	c #5C80AD",
+"`.	c #577597",
+" +	c #5B87BA",
+".+	c #6996C9",
+"++	c #6897C8",
+"@+	c #5C8AC0",
+"#+	c #5678A0",
+"$+	c #587DAB",
+"%+	c #6D90BE",
+"&+	c #8A949B",
+"*+	c #7595B6",
+"=+	c #6997C9",
+"-+	c #4071AD",
+";+	c #4473AE",
+">+	c #739FCC",
+",+	c #729ECE",
+"'+	c #838B8E",
+")+	c #ECEDEC",
+"!+	c #F7F7F7",
+"~+	c #A7B5C5",
+"{+	c #7189A6",
+"]+	c #51719B",
+"^+	c #416BA0",
+"/+	c #416CA3",
+"(+	c #4874A8",
+"_+	c #567EAD",
+":+	c #71808E",
+"<+	c #F3F3F4",
+"[+	c #EBEBEA",
+"}+	c #828A8D",
+"|+	c #72A0CF",
+"1+	c #6F9BCB",
+"2+	c #4473AF",
+"3+	c #4977B1",
+"4+	c #7994B0",
+"5+	c #A3A6A3",
+"6+	c #FDFDFD",
+"7+	c #CCCDCC",
+"8+	c #AEB0AE",
+"9+	c #CED0CD",
+"0+	c #E9EAE8",
+"a+	c #DFE1DE",
+"b+	c #C3C3C1",
+"c+	c #A0A4A2",
+"d+	c #868A86",
+"e+	c #81837F",
+"f+	c #C5C6C3",
+"g+	c #A3A4A2",
+"h+	c #7693B3",
+"i+	c #6895C8",
+"j+	c #4373AF",
+"k+	c #4A7AB4",
+"l+	c #3F6FAD",
+"m+	c #868D8F",
+"n+	c #EFEFEE",
+"o+	c #F5F5F5",
+"p+	c #8D918D",
+"q+	c #7E919F",
+"r+	c #879297",
+"s+	c #888B88",
+"t+	c #939694",
+"u+	c #B3B5B3",
+"v+	c #CFD0CE",
+"w+	c #E7E8E5",
+"x+	c #D7D8D6",
+"y+	c #EEEEED",
+"z+	c #838C8E",
+"A+	c #3E6FAC",
+"B+	c #5080B9",
+"C+	c #728CA1",
+"D+	c #A9ABAA",
+"E+	c #FDFDFC",
+"F+	c #CACBC8",
+"G+	c #8A9294",
+"H+	c #71A0CE",
+"I+	c #7799BA",
+"J+	c #8094A7",
+"K+	c #8A9092",
+"L+	c #898B87",
+"M+	c #A0A29D",
+"N+	c #DCDDDB",
+"O+	c #E8E9E6",
+"P+	c #FCFCFC",
+"Q+	c #A9ABA9",
+"R+	c #7189A2",
+"S+	c #8C918F",
+"T+	c #F1F1F0",
+"U+	c #F1F2F1",
+"V+	c #919593",
+"W+	c #5577A0",
+"X+	c #5786BD",
+"Y+	c #5E8DC1",
+"Z+	c #6890BF",
+"`+	c #7E8FA0",
+" @	c #8B8E8C",
+".@	c #C8C9C8",
+"+@	c #F9F9F8",
+"@@	c #D4D5D2",
+"#@	c #EFF0EF",
+"$@	c #8C918D",
+"%@	c #B0B3AF",
+"&@	c #FCFCFB",
+"*@	c #CBCDC9",
+"=@	c #8C908F",
+"-@	c #5383BB",
+";@	c #527CB0",
+">@	c #748696",
+",@	c #8B8E8B",
+"'@	c #CACCCB",
+")@	c #F9F9F9",
+"!@	c #F7F8F7",
+"~@	c #DBDBD8",
+"{@	c #9EA19E",
+"]@	c #898B86",
+"^@	c #C6C8C5",
+"/@	c #FBFBFA",
+"(@	c #AFB2AF",
+"_@	c #80919F",
+":@	c #8C908D",
+"<@	c #F2F3F2",
+"[@	c #979995",
+"}@	c #7E93A5",
+"|@	c #889197",
+"1@	c #8E908C",
+"2@	c #CFD0CD",
+"3@	c #FAFAFA",
+"4@	c #F6F6F6",
+"5@	c #D6D7D4",
+"6@	c #9B9E9B",
+"7@	c #81929F",
+"8@	c #8092A3",
+"9@	c #969894",
+"0@	c #8D908C",
+"a@	c #3668A5",
+"b@	c #667C93",
+"c@	c #B5B7B5",
+"d@	c #8B8D89",
+"e@	c #899194",
+"f@	c #8F928D",
+"g@	c #D3D5D1",
+"h@	c #F4F5F4",
+"i@	c #D2D3D0",
+"j@	c #989B98",
+"k@	c #8B8F8C",
+"l@	c #8093A1",
+"m@	c #8D8F8D",
+"n@	c #C4C6C2",
+"o@	c #B4B6B3",
+"p@	c #647B91",
+"q@	c #8C8E89",
+"r@	c #F3F4F3",
+"s@	c #9B9D9A",
+"t@	c #90928E",
+"u@	c #D5D7D5",
+"v@	c #FBFBFB",
+"w@	c #CDCFCB",
+"x@	c #969794",
+"y@	c #7E92A3",
+"z@	c #70849B",
+"A@	c #969A96",
+"B@	c #E4E5E3",
+"C@	c #F2F2F1",
+"D@	c #8C8D89",
+"E@	c #BBBCB9",
+"F@	c #F8F9F8",
+"G@	c #D2D4D0",
+"H@	c #D8D9D7",
+"I@	c #F1F2F0",
+"J@	c #C9CAC7",
+"K@	c #919592",
+"L@	c #888C8C",
+"M@	c #6E859F",
+"N@	c #3A6AA7",
+"O@	c #3568A6",
+"P@	c #8B8D8A",
+"Q@	c #C3C5C0",
+"R@	c #F7F7F6",
+"S@	c #B9BAB7",
+"T@	c #8C8E8A",
+"U@	c #F5F5F4",
+"V@	c #E5E5E3",
+"W@	c #EFF0EE",
+"X@	c #91938F",
+"Y@	c #8B8F8B",
+"Z@	c #9B9D98",
+"`@	c #DEE0DC",
+" #	c #C0C0BE",
+".#	c #F6F6F5",
+"+#	c #D7D8D5",
+"@#	c #939590",
+"##	c #888A85",
+"$#	c #8A8B87",
+"%#	c #8B8D88",
+"&#	c #C1C3BE",
+"*#	c #F4F4F3",
+"=#	c #BDBEBB",
+"-#	c #8C8F8A",
+";#	c #DFE0DD",
+">#	c #F0F1F0",
+",#	c #E1E2E0",
+"'#	c #CDCECB",
+")#	c #B4B6B2",
+"!#	c #8A8C87",
+"~#	c #8C8D88",
+"{#	c #888B86",
+"]#	c #9B9D99",
+"^#	c #D8DAD6",
+"/#	c #8C8F89",
+"(#	c #C2C4C0",
+"_#	c #C9CBC7",
+":#	c #BEC0BB",
+"<#	c #CACCC8",
+"[#	c #D4D6D2",
+"}#	c #DCDEDA",
+"|#	c #E4E5E2",
+"1#	c #ECECEA",
+"2#	c #E0E1DF",
+"3#	c #CBCCCA",
+"4#	c #B2B4B0",
+"5#	c #979993",
+"6#	c #8B8D87",
+"7#	c #878884",
+"8#	c #BEC0BA",
+"9#	c #C0C2BF",
+"0#	c #8D8F8B",
+"a#	c #DADBD7",
+"b#	c #898C87",
+"c#	c #959792",
+"d#	c #A2A5A0",
+"e#	c #B0B2AD",
+"f#	c #BABDB7",
+"g#	c #C6C8C3",
+"h#	c #CFD2CC",
+"i#	c #D8D9D6",
+"j#	c #E0E2DE",
+"k#	c #EEEFEE",
+"l#	c #DEDFDD",
+"m#	c #B2B3AF",
+"n#	c #9EA09B",
+"o#	c #D1D4CF",
+"p#	c #F5F6F5",
+"q#	c #8D8F8A",
+"r#	c #888A84",
+"s#	c #C7C8C5",
+"t#	c #757771",
+"u#	c #82847F",
+"v#	c #888A86",
+"w#	c #898A86",
+"x#	c #949691",
+"y#	c #A1A39E",
+"z#	c #ACAFA9",
+"A#	c #B7B9B3",
+"B#	c #C0C3BD",
+"C#	c #CACCC7",
+"D#	c #D4D6D1",
+"E#	c #DDDFDB",
+"F#	c #E7E8E6",
+"G#	c #FAFBFA",
+"H#	c #C9CBC6",
+"I#	c #C4C5C2",
+"J#	c #8E908B",
+"K#	c #7A7B78",
+"L#	c #7A7C78",
+"M#	c #858882",
+"N#	c #8B8C87",
+"O#	c #A0A29C",
+"P#	c #AAACA6",
+"Q#	c #B3B6AF",
+"R#	c #BCBEB8",
+"S#	c #C3C6C0",
+"T#	c #BFC1BB",
+"U#	c #898A85",
+"V#	c #C0C2BD",
+"W#	c #757773",
+"X#	c #848580",
+"Y#	c #B6B8B2",
+"Z#	c #DADBD8",
+"`#	c #CED0CB",
+" $	c #A0A39D",
+".$	c #7B7C78",
+"+$	c #7D7E7A",
+"@$	c #9C9E99",
+"#$	c #C6C8C2",
+"$$	c #858783",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                          . + @ @ # $                                           ",
+"                                        % & * = - ; > ,                                         ",
+"                                      ' ) ! ! ! ~ { ] ^ /                                       ",
+"                            (       _ : < ! ! ! [ { } | 1 2 _     3                             ",
+"                            4     5 5 6 7 8 ! ! 9 0 a b c d 5 5   e                             ",
+"                            f   5 g h i j a k l m n o p q r h g s t                             ",
+"                            u v w 2 x y z A B C C B D E F r x 2 G H                             ",
+"                            I J K 5 L M N O P Q R S T U V W L 5 X Y                             ",
+"                            Z `  ...+.2 @.#.$.%.&.*.=.-. .2 +...;.>.                            ",
+"                    ,.        '.).5 !.~.{.].^././.(._.:.<.r !.[.}.g       |.                    ",
+"                    1.        2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.h       j.                    ",
+"                      k.    5 l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B._ l.5   C.                      ",
+"                      D.      h E.F.G.H.I.J.K.+.K L.M.N.O.P.Q.R.5 h   S.T.                      ",
+"                        U.    r V.W.X.Y.Z.`. +.+++ at +#+$+%+&+*+2 V.r =+-+                        ",
+"                          ;+  >+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+,+1+2+                          ",
+"                          3+h.++4+5+6+7+8+9+0+a+b+c+d+e+f+6+g+h+i+j+k+                          ",
+"                              l+m+n+o+p+q+r+s+t+u+v+w+x+; = y+z+A+B+                            ",
+"                              C+D+E+F+G+|+H+u.I+J+K+L+M+N+O+P+Q+R+                              ",
+"                              S+T+U+V+W+k+X+Y+Z+`+ @. at +@!+@@y+#@$@                              ",
+"                              %@&@*@=@  -@;@>@,@'@)@!@~@{@]@^@/@(@_@                            ",
+"                            :@<@y+[@}@  |@1 at 2@3 at 4@5 at 6@ @7 at 8@9 at 0+T+0@  a@                        ",
+"                          b at c@3 at F+d@e at f@g@/@h at i@j at k@l@      m at n@+ at o@p@                          ",
+"                          q at r@0+s at t@u at v@r at w@x@:@y@          z at A@B at C@D@                          ",
+"                          E at F@G at H@v at I@J at K@L at M@          N at O@  P at Q@R at S@                          ",
+"                        T at U@V@~ W at n@X at Y@                        Z@`@r at P@                        ",
+"                         #.#+#n@@###$#                          %#&#*#=#                        ",
+"                      -#.#;#`@P+P+>#,#'#)#[@!#~#{#                ]#^#h@/#                      ",
+"                      (#r at _#:#<#[#}#|#1#r@&@8 #@2#3#4#5#]@6#7#    ]@8#T+9#                      ",
+"                    0#R at a#M+b#]@%#c#d#e#f#g#h#i#j#0+m v at v@k#l#F+m#5#n#o#p#q#                    ",
+"                  r#s#>#Q at 6#        t#u#v#w#%#x#y#z#A#B#C#D#E#F#T+v at G#H#~ I#r#                  ",
+"                  J#[ [#M+K#                    L#M#N#]@!#x#O#P#Q#R#S#T#&.4 at J#                  ",
+"                U#F+~ V#$#                                  W#X#]@]@!#@#Y#0+^@U#                ",
+"                %#Z#`# $.$                                            +$@$#$D#!#                ",
+"              $$########                                                ########$$              ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                "};
diff --git a/data/mac/Info.plist.in b/data/mac/Info.plist.in
new file mode 100644
index 0000000..6b16ce5
--- /dev/null
+++ b/data/mac/Info.plist.in
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+
+	<key>CFBundleIdentifier</key>
+	<string>%%IDENTIFIER%%</string>
+
+	<key>CFBundleName</key>
+	<string>%%NAME%%</string>
+
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+
+	<key>CFBundleSignature</key>
+	<string>%%SIGNATURE%%</string>
+
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+
+	<key>CFBundleExecutable</key>
+	<string>%%BINARY%%</string>
+
+	<key>CFBundleVersion</key>
+	<string>%%VERSION%%</string>
+
+	<key>CFBundleShortVersionString</key>
+    	<string>%%VERSION%%</string>
+
+	<key>CFBundleLongVersionString</key>
+	<string>%%VERSION%%</string>
+
+	<key>CFBundleIconFile</key>
+	<string>%%ICON%%</string>
+
+	<key>NSAppleScriptEnabled</key>
+	<string>No</string>
+
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright (c) 2009 Dave Freese W1HKJ</string>
+</dict>
+</plist>
diff --git a/data/mac/linsim.icns b/data/mac/linsim.icns
new file mode 100644
index 0000000..133454f
Binary files /dev/null and b/data/mac/linsim.icns differ
diff --git a/data/win32/fl_app.nsi b/data/win32/fl_app.nsi
new file mode 100644
index 0000000..fb54340
--- /dev/null
+++ b/data/win32/fl_app.nsi
@@ -0,0 +1,168 @@
+# -*- conf -*-
+
+# NSIS installer script based on example2.nsi from the nsis-2.44 distribution.
+# Copyright (c) 2009 Stelios Bounanos, M0GLD.
+# Copyright (c) 2009 Dave Freese, W1HKJ
+
+# substitute your application name for instances of linsim
+
+# Variables
+!define linsim_DESCRIPTION "${linsim_NAME} ${linsim_VERSION}"
+!define linsim_STRING "${linsim_NAME}-${linsim_VERSION}"
+
+!define PRODUCT_BINARY "${linsim_BINARY}"
+!define PRODUCT_NAME "${linsim_NAME}"
+!define PRODUCT_VERSION "${linsim_VERSION}"
+!define PRODUCT_STRING "${linsim_STRING}"
+!define PRODUCT_DESCRIPTION "${linsim_DESCRIPTION}"
+
+# Compression options
+SetCompressor /SOLID lzma
+
+# This function is called before displaying the first installer page.
+# It aborts the installation if the Windows version is too old.
+!include WinVer.nsh
+Function .onInit
+    ${IfNot} ${AtLeastWin2000}
+        MessageBox MB_ICONSTOP "Sorry, your Windows version is too old.$\n${PRODUCT_NAME} requires Windows 2000 or later."
+	Abort
+    ${EndIf}
+FunctionEnd
+
+# The name of the installer
+Name "${PRODUCT_DESCRIPTION}"
+
+# The file to write
+OutFile ${INSTALLER_FILE}
+
+# The default installation directory
+InstallDir $PROGRAMFILES\${PRODUCT_STRING}
+
+# Registry key to check for directory (so if you install again, it will
+# overwrite the old one automatically)
+!define INSTALL_DIR_REG_KEY SOFTWARE\${PRODUCT_STRING}
+InstallDirRegKey HKLM "${INSTALL_DIR_REG_KEY}" "Install_Dir"
+
+# Request application privileges for Windows Vista
+RequestExecutionLevel admin
+
+# License
+LicenseText "${PRODUCT_NAME} is distributed under the GNU GPL as detailed \
+below. You must abide by the terms of this license if you modify or \
+redistribute the program." "Continue"
+LicenseData "${LICENSE_FILE}"
+SubCaption 0 ": License Information"
+
+# Other options
+BrandingText " "
+InstProgressFlags smooth
+VIAddVersionKey ProductName "${PRODUCT_NAME}"
+VIAddVersionKey ProductVersion "${PRODUCT_VERSION}"
+VIAddVersionKey FileVersion "${PRODUCT_VERSION}"
+VIAddVersionKey FileDescription "${linsim_DESCRIPTION} installer"
+VIAddVersionKey LegalCopyright "${PRODUCT_NAME} developers"
+VIAddVersionKey OriginalFilename "${INSTALLER_FILE}"
+VIProductVersion "3.0.0.0"
+WindowIcon off
+XPStyle on
+
+# Installer pages
+Page license
+Page components
+Page directory
+Page instfiles
+UninstPage uninstConfirm
+UninstPage instfiles
+
+# Registry uninstall path
+!define REG_UNINSTALL_PATH Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_STRING}
+
+# This is a hidden section and is always selected.  It writes the uninstall
+# registry keys and uninstaller binary.
+Section -install
+    # Set output path to the installation directory.
+    SetOutPath $INSTDIR
+    # Write the installation paths into the registry
+    WriteRegStr HKLM "${INSTALL_DIR_REG_KEY}" "Install_Dir" "$INSTDIR"
+    # Write the uninstall keys for Windows
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayName" "${PRODUCT_DESCRIPTION}"
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayVersion" "${PRODUCT_VERSION}"
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayIcon" '"$INSTDIR\${PRODUCT_BINARY}"'
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "HelpLink" "${SUPPORT_URL}"
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "Publisher" "linsim developers"
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "URLUpdateInfo" "${UPDATES_URL}"
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\uninstall.exe"'
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S'
+    WriteRegDWORD HKLM "${REG_UNINSTALL_PATH}" "NoModify" 1
+    WriteRegDWORD HKLM "${REG_UNINSTALL_PATH}" "NoRepair" 1
+    WriteUninstaller "uninstall.exe"
+SectionEnd
+
+#Var WANT_linsim
+
+Section "linsim"
+	SectionIn RO
+	SetOutPath $INSTDIR
+	File "${linsim_BINARY}"
+SectionEnd
+
+# Start Menu path
+!define SM_PATH_BASE $SMPROGRAMS\${PRODUCT_NAME}
+!define SM_PATH ${SM_PATH_BASE}\${PRODUCT_STRING}
+
+# The following sections are optional
+Section "Start Menu Shortcuts"
+    CreateDirectory "${SM_PATH}"
+	CreateShortCut "${SM_PATH}\${linsim_NAME}.lnk" "$INSTDIR\${linsim_BINARY}" "" "$INSTDIR\${linsim_BINARY}" 0
+#	CreateShortCut "${SM_PATH}\${linsim_NAME} Beginners' Guide.lnk" "${GUIDE_URL}"
+#	CreateShortCut "${SM_PATH}\${linsim_NAME} Documentation.lnk" "${linsim_DOCS_URL}"
+    CreateShortCut "${SM_PATH}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
+SectionEnd
+
+Section "Desktop Shortcuts"
+	CreateShortCut "$DESKTOP\${linsim_DESCRIPTION}.lnk" "$INSTDIR\${linsim_BINARY}" "" \
+		"$INSTDIR\${linsim_BINARY}" 0
+SectionEnd
+
+# This is unselected by default
+Section /o "Quick Launch Shortcuts"
+	CreateShortCut "$QUICKLAUNCH\${linsim_DESCRIPTION}}.lnk" "$INSTDIR\${linsim_BINARY}" "" \
+		"$INSTDIR\${linsim_BINARY}" 0
+SectionEnd
+
+# Uninstaller
+Section "Uninstall"
+    # Remove registry keys
+    DeleteRegKey HKLM "${REG_UNINSTALL_PATH}"
+    DeleteRegKey HKLM "${INSTALL_DIR_REG_KEY}"
+
+# Remove files and uninstaller
+	Delete /REBOOTOK $INSTDIR\${linsim_BINARY}
+    Delete /REBOOTOK $INSTDIR\uninstall.exe
+
+# Remove shortcuts, if any
+    Delete "${SM_PATH}\*.*"
+	Delete "$DESKTOP\${linsim_DESCRIPTION}.lnk"
+	Delete "$QUICKLAUNCH\${linsim_DESCRIPTION}.lnk"
+
+# Remove directories used
+    RMDir "${SM_PATH}"
+    RMDir "${SM_PATH_BASE}"
+    RMDir "$INSTDIR"
+SectionEnd
+
+# Offer to reboot the machine if the reboot flag is nonzero. This flag is set by
+# commands that specify the /REBOOTOK switch if the BINARY_* files were in use
+# during uninstallation. Stupid Windows.
+Function un.onGUIEnd
+    IfRebootFlag 0 noreboot
+    MessageBox MB_YESNO|MB_ICONQUESTION \
+               "A reboot is required to finish removing ${PRODUCT_NAME}. Do you wish to reboot now?" IDNO noreboot
+    Reboot
+    noreboot:
+FunctionEnd
+
+# Tell the user if we could not reboot for some reason.
+Function un.onRebootFailed
+    MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK
+FunctionEnd
diff --git a/data/win32/linsim.ico b/data/win32/linsim.ico
new file mode 100644
index 0000000..cf71e04
Binary files /dev/null and b/data/win32/linsim.ico differ
diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf
new file mode 100644
index 0000000..b5d4a7a
--- /dev/null
+++ b/doc/asciidoc.conf
@@ -0,0 +1,2 @@
+[miscellaneous]
+newline=\n
diff --git a/doc/guide.conf b/doc/guide.conf
new file mode 100644
index 0000000..d27d4c0
--- /dev/null
+++ b/doc/guide.conf
@@ -0,0 +1,3 @@
+[attributes]
+toclevels=1
+numbered=
diff --git a/doc/guide.html b/doc/guide.html
new file mode 100644
index 0000000..3aee556
--- /dev/null
+++ b/doc/guide.html
@@ -0,0 +1,1329 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 8.6.6" />
+<title>Guide to linsim</title>
+<style type="text/css">
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+  font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+  font-family: Arial,Helvetica,sans-serif;
+}
+
+body {
+  margin: 1em 5% 1em 5%;
+}
+
+a {
+  color: blue;
+  text-decoration: underline;
+}
+a:visited {
+  color: fuchsia;
+}
+
+em {
+  font-style: italic;
+  color: navy;
+}
+
+strong {
+  font-weight: bold;
+  color: #083194;
+}
+
+h1, h2, h3, h4, h5, h6 {
+  color: #527bbd;
+  margin-top: 1.2em;
+  margin-bottom: 0.5em;
+  line-height: 1.3;
+}
+
+h1, h2, h3 {
+  border-bottom: 2px solid silver;
+}
+h2 {
+  padding-top: 0.5em;
+}
+h3 {
+  float: left;
+}
+h3 + * {
+  clear: left;
+}
+h5 {
+  font-size: 1.0em;
+}
+
+div.sectionbody {
+  margin-left: 0;
+}
+
+hr {
+  border: 1px solid silver;
+}
+
+p {
+  margin-top: 0.5em;
+  margin-bottom: 0.5em;
+}
+
+ul, ol, li > p {
+  margin-top: 0;
+}
+ul > li     { color: #aaa; }
+ul > li > * { color: black; }
+
+pre {
+  padding: 0;
+  margin: 0;
+}
+
+#author {
+  color: #527bbd;
+  font-weight: bold;
+  font-size: 1.1em;
+}
+#email {
+}
+#revnumber, #revdate, #revremark {
+}
+
+#footer {
+  font-size: small;
+  border-top: 2px solid silver;
+  padding-top: 0.5em;
+  margin-top: 4.0em;
+}
+#footer-text {
+  float: left;
+  padding-bottom: 0.5em;
+}
+#footer-badges {
+  float: right;
+  padding-bottom: 0.5em;
+}
+
+#preamble {
+  margin-top: 1.5em;
+  margin-bottom: 1.5em;
+}
+div.imageblock, div.exampleblock, div.verseblock,
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
+div.admonitionblock {
+  margin-top: 1.0em;
+  margin-bottom: 1.5em;
+}
+div.admonitionblock {
+  margin-top: 2.0em;
+  margin-bottom: 2.0em;
+  margin-right: 10%;
+  color: #606060;
+}
+
+div.content { /* Block element content. */
+  padding: 0;
+}
+
+/* Block element titles. */
+div.title, caption.title {
+  color: #527bbd;
+  font-weight: bold;
+  text-align: left;
+  margin-top: 1.0em;
+  margin-bottom: 0.5em;
+}
+div.title + * {
+  margin-top: 0;
+}
+
+td div.title:first-child {
+  margin-top: 0.0em;
+}
+div.content div.title:first-child {
+  margin-top: 0.0em;
+}
+div.content + div.title {
+  margin-top: 0.0em;
+}
+
+div.sidebarblock > div.content {
+  background: #ffffee;
+  border: 1px solid #dddddd;
+  border-left: 4px solid #f0f0f0;
+  padding: 0.5em;
+}
+
+div.listingblock > div.content {
+  border: 1px solid #dddddd;
+  border-left: 5px solid #f0f0f0;
+  background: #f8f8f8;
+  padding: 0.5em;
+}
+
+div.quoteblock, div.verseblock {
+  padding-left: 1.0em;
+  margin-left: 1.0em;
+  margin-right: 10%;
+  border-left: 5px solid #f0f0f0;
+  color: #888;
+}
+
+div.quoteblock > div.attribution {
+  padding-top: 0.5em;
+  text-align: right;
+}
+
+div.verseblock > pre.content {
+  font-family: inherit;
+  font-size: inherit;
+}
+div.verseblock > div.attribution {
+  padding-top: 0.75em;
+  text-align: left;
+}
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
+div.verseblock + div.attribution {
+  text-align: left;
+}
+
+div.admonitionblock .icon {
+  vertical-align: top;
+  font-size: 1.1em;
+  font-weight: bold;
+  text-decoration: underline;
+  color: #527bbd;
+  padding-right: 0.5em;
+}
+div.admonitionblock td.content {
+  padding-left: 0.5em;
+  border-left: 3px solid #dddddd;
+}
+
+div.exampleblock > div.content {
+  border-left: 3px solid #dddddd;
+  padding-left: 0.5em;
+}
+
+div.imageblock div.content { padding-left: 0; }
+span.image img { border-style: none; }
+a.image:visited { color: white; }
+
+dl {
+  margin-top: 0.8em;
+  margin-bottom: 0.8em;
+}
+dt {
+  margin-top: 0.5em;
+  margin-bottom: 0;
+  font-style: normal;
+  color: navy;
+}
+dd > *:first-child {
+  margin-top: 0.1em;
+}
+
+ul, ol {
+    list-style-position: outside;
+}
+ol.arabic {
+  list-style-type: decimal;
+}
+ol.loweralpha {
+  list-style-type: lower-alpha;
+}
+ol.upperalpha {
+  list-style-type: upper-alpha;
+}
+ol.lowerroman {
+  list-style-type: lower-roman;
+}
+ol.upperroman {
+  list-style-type: upper-roman;
+}
+
+div.compact ul, div.compact ol,
+div.compact p, div.compact p,
+div.compact div, div.compact div {
+  margin-top: 0.1em;
+  margin-bottom: 0.1em;
+}
+
+tfoot {
+  font-weight: bold;
+}
+td > div.verse {
+  white-space: pre;
+}
+
+div.hdlist {
+  margin-top: 0.8em;
+  margin-bottom: 0.8em;
+}
+div.hdlist tr {
+  padding-bottom: 15px;
+}
+dt.hdlist1.strong, td.hdlist1.strong {
+  font-weight: bold;
+}
+td.hdlist1 {
+  vertical-align: top;
+  font-style: normal;
+  padding-right: 0.8em;
+  color: navy;
+}
+td.hdlist2 {
+  vertical-align: top;
+}
+div.hdlist.compact tr {
+  margin: 0;
+  padding-bottom: 0;
+}
+
+.comment {
+  background: yellow;
+}
+
+.footnote, .footnoteref {
+  font-size: 0.8em;
+}
+
+span.footnote, span.footnoteref {
+  vertical-align: super;
+}
+
+#footnotes {
+  margin: 20px 0 20px 0;
+  padding: 7px 0 0 0;
+}
+
+#footnotes div.footnote {
+  margin: 0 0 5px 0;
+}
+
+#footnotes hr {
+  border: none;
+  border-top: 1px solid silver;
+  height: 1px;
+  text-align: left;
+  margin-left: 0;
+  width: 20%;
+  min-width: 100px;
+}
+
+div.colist td {
+  padding-right: 0.5em;
+  padding-bottom: 0.3em;
+  vertical-align: top;
+}
+div.colist td img {
+  margin-top: 0.3em;
+}
+
+ at media print {
+  #footer-badges { display: none; }
+}
+
+#toc {
+  margin-bottom: 2.5em;
+}
+
+#toctitle {
+  color: #527bbd;
+  font-size: 1.1em;
+  font-weight: bold;
+  margin-top: 1.0em;
+  margin-bottom: 0.1em;
+}
+
+div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+  margin-top: 0;
+  margin-bottom: 0;
+}
+div.toclevel2 {
+  margin-left: 2em;
+  font-size: 0.9em;
+}
+div.toclevel3 {
+  margin-left: 4em;
+  font-size: 0.9em;
+}
+div.toclevel4 {
+  margin-left: 6em;
+  font-size: 0.9em;
+}
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+span.underline { text-decoration: underline; }
+span.overline { text-decoration: overline; }
+span.line-through { text-decoration: line-through; }
+
+
+/*
+ * xhtml11 specific
+ *
+ * */
+
+tt {
+  font-family: monospace;
+  font-size: inherit;
+  color: navy;
+}
+
+div.tableblock {
+  margin-top: 1.0em;
+  margin-bottom: 1.5em;
+}
+div.tableblock > table {
+  border: 3px solid #527bbd;
+}
+thead, p.table.header {
+  font-weight: bold;
+  color: #527bbd;
+}
+p.table {
+  margin-top: 0;
+}
+/* Because the table frame attribute is overriden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
+  border-style: none;
+}
+div.tableblock > table[frame="hsides"] {
+  border-left-style: none;
+  border-right-style: none;
+}
+div.tableblock > table[frame="vsides"] {
+  border-top-style: none;
+  border-bottom-style: none;
+}
+
+
+/*
+ * html5 specific
+ *
+ * */
+
+.monospaced {
+  font-family: monospace;
+  font-size: inherit;
+  color: navy;
+}
+
+table.tableblock {
+  margin-top: 1.0em;
+  margin-bottom: 1.5em;
+}
+thead, p.tableblock.header {
+  font-weight: bold;
+  color: #527bbd;
+}
+p.tableblock {
+  margin-top: 0;
+}
+table.tableblock {
+  border-width: 3px;
+  border-spacing: 0px;
+  border-style: solid;
+  border-color: #527bbd;
+  border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+  border-width: 1px;
+  padding: 4px;
+  border-style: solid;
+  border-color: #527bbd;
+}
+
+table.tableblock.frame-topbot {
+  border-left-style: hidden;
+  border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+  border-top-style: hidden;
+  border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+  border-style: hidden;
+}
+
+th.tableblock.halign-left, td.tableblock.halign-left {
+  text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+  text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
+  text-align: right;
+}
+
+th.tableblock.valign-top, td.tableblock.valign-top {
+  vertical-align: top;
+}
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+  vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+  vertical-align: bottom;
+}
+
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+  padding-top: 0.5em;
+  padding-bottom: 0.5em;
+  border-top: 2px solid silver;
+  border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+  border-style: none;
+}
+body.manpage div.sectionbody {
+  margin-left: 3em;
+}
+
+ at media print {
+  body.manpage div#toc { display: none; }
+}
+</style>
+
+</head>
+<body class="article">
+<div id="header">
+<h1>Guide to linsim</h1>
+</div>
+<div id="content">
+<div id="preamble">
+<div class="sectionbody">
+<div class="sidebarblock">
+<div class="content">
+<div class="paragraph"><p>Of necessity, this Guide contains only as much as you need to know to get started.</p></div>
+</div></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="ref-general">1. What is Linsim?</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>linsim is a computer program intended as a tool for Amateur Radio Digital Mode
+evaluation under varying HF propogation conditions.</p></div>
+<div class="paragraph"><p>linsim is available for multiple computer operating systems;
+FreeBSD™; Linux™, OS X™ and Windows™.</p></div>
+<div class="sect2">
+<h3 id="_what_is_a_simulation_model">1.1. What is a Simulation Model?</h3>
+<div class="paragraph"><div class="title">Watterson Ionospheric Channel Model</div><p>Radio propagation via the earth’s ionosphere contain reflections from 3 general effects:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Density variations versus altitude in the ionosphere
+</p>
+</li>
+<li>
+<p>
+Magnetic-ionic effects that cause polarization-dependent paths
+</p>
+</li>
+<li>
+<p>
+Non-uniformity of the ionospheric layers
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>The Watterson HF channel model has been used for some time for simulating the propagation of radio waves reflecting off of the ionosphere by simulating both amplitude and phase distortion in multiple propagation paths each with a specified fixed delay.</p></div>
+<div class="paragraph"><p>For a much more detailed description, one is referred to an article in the May/June 2000 issue of QEX by Johan Forrer describing the details of such a model. Another reference can be found in "Wireless Digital Communications:
+Design and Theory" by Tom McDermott.</p></div>
+<div class="paragraph"><p>The mathematics associated with the various signal processing paths are identical to PathSim.  The reader is refered to Moe Wheatley’s excellent PathSim technical document for details, <a href="http://www.moetronix.com/ae4jy/files/pathsimtech100.pdf">http://www.moetronix.com/ae4jy/files/pathsimtech100.pdf</a>.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_general_description">1.2. General description</h3>
+<div class="paragraph"><p>Linsim is designed to read and then add path simulation to any monophonic wav file recorded at any sampling rate.  It works particularly well with files that were created using fldigi’s audio capture and audio generate functions.  The entire wav file will be saved to computer memory and then duplicated during the signal processing.  The user should try to keep the length of the wav file at 20 Mg or less, but the author has tested some 200 Mg files on both  [...]
+<div class="paragraph"><p>Simulations include path delay, doppler, frequency shift and band limited Gaussian white noise.  All simulations are constrained to a 3000 Hz bandwidth.  The input signal is filtered by a FIR bandpass filter (400 - 3400 Hz).</p></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">
+<div class="paragraph"><p>Your input signal should not extend beyond these limits.</p></div>
+</td>
+</tr></table>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="ref-folders-files">2. Simulation Specification Files</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_folder_location">2.1. Folder location</h3>
+<div class="paragraph"><p>The first time it is executed linsim will create a folder in which to store it’s simulation specification files.  The folder location depends on the user’s operating system:</p></div>
+<div class="paragraph"><p>XP : C:\Documents and Settings\<user>\linsim.files</p></div>
+<div class="paragraph"><p>Vista / Win7 / Win8 : C:\Users\<user>\linsim.files</p></div>
+<div class="paragraph"><p>Linux : /home/<user>/.linsim</p></div>
+<div class="paragraph"><p>OS X : /users/<user>/.linsim</p></div>
+<div class="paragraph"><p>Linux and OS X users might want to create a link to that folder</p></div>
+<div class="paragraph"><p>$ cd
+$ ln -s linsim.files .linsim</p></div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_simulation_files">3. Simulation Files</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Linsim can manage, open and save any number of simulation sets.  Each set of simulations are saved in the same comma-separated-value (csv) file.  The files are compatible with any spreadsheet program such as Excel, Open Office, or Gnumeric.</p></div>
+<div class="sect2">
+<h3 id="_simulation_file_format">3.1. Simulation File Format</h3>
+<div class="paragraph"><p>Simulation files are spreadsheet files saved in a comma-separated-value format.
+A default set of simulations are created for you when the program is executed
+for the first time.  The default file contents are</p></div>
+<div class="tableblock">
+<table rules="all"
+width="100%"
+frame="border"
+cellspacing="0" cellpadding="4">
+<col width="3%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<col width="6%" />
+<thead>
+<tr>
+<th align="center" valign="top">TITLE</th>
+<th align="left" valign="top">AWGN</th>
+<th align="left" valign="top">S/N</th>
+<th align="left" valign="top">P1</th>
+<th align="left" valign="top">SPREAD_1</th>
+<th align="left" valign="top">OFFSET_1</th>
+<th align="left" valign="top">P2</th>
+<th align="left" valign="top">DELAY_2</th>
+<th align="left" valign="top">SPREAD_2</th>
+<th align="left" valign="top">OFFSET_2</th>
+<th align="left" valign="top">P3</th>
+<th align="left" valign="top">DELAY_3</th>
+<th align="left" valign="top">SPREAD_3</th>
+<th align="left" valign="top">OFFSET_3</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td align="center" valign="top"><p class="table">AWGN S/N</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">10</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">CCIR 520-2 (Doppler Fading)</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.2</p></td>
+<td align="left" valign="top"><p class="table">10</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0.2</p></td>
+<td align="left" valign="top"><p class="table">5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">CCIR 520-2 (Flutter Fading)</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">10</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">10</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">CCIR 520-2 (Good Conditions)</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.1</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0.1</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">CCIR-520-2 (Moderate Conditions)</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">CCIR-520-2 (Poor Conditions)</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">2</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">Direct Path</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">10</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">Frequency Shifter</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">500</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">High-Latitude Disturbed</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">30</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">7</p></td>
+<td align="left" valign="top"><p class="table">30</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">High-Latitude Moderate</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">10</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">3</p></td>
+<td align="left" valign="top"><p class="table">10</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">High-Latitude Quiet</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">Low-Latitude Disturbed</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">10</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">6</p></td>
+<td align="left" valign="top"><p class="table">10</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">Low-Latitude Moderate</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">1.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">2</p></td>
+<td align="left" valign="top"><p class="table">1.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">Low-Latitude Quiet</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">Mid-Latitude Disturbed</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">2</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">Mid-Latitude Disturbed NVIS</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">7</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">Mid-Latitude Moderate</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+<tr>
+<td align="center" valign="top"><p class="table">Mid-Latitude Quiet</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">1</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0.5</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+<td align="left" valign="top"><p class="table">0</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="ref-operating">4. Menu functions</h2>
+<div class="sectionbody">
+<div class="ulist"><div class="title">File</div><ul>
+<li>
+<p>
+Open    - open an existing simulation set csv file
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+the name of the simulation file in use will be displayed in the control labeled "Models:"
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+Save    - save the current simulation set csv file
+</p>
+</li>
+<li>
+<p>
+Save As - save the current simulation set, specifying a new file path-name
+</p>
+</li>
+<li>
+<p>
+Exit    - exit the program, saving current simulation set
+</p>
+</li>
+</ul></div>
+<div class="ulist"><div class="title">Simulation</div><ul>
+<li>
+<p>
+Add         - add the current simulation specifications to the current set
+</p>
+</li>
+<li>
+<p>
+Batch       - open the batch processing dialog
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+select sequence of simulations to be run as a set
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+AWGN series - open the AWGN series processing dialog
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+select lower, upper, step for a series of simulation runs
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+Choose output folder
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+open folder (directory) selection folder
+</p>
+</li>
+<li>
+<p>
+select target folder (must be existing)
+</p>
+</li>
+<li>
+<p>
+or output same as input folder (default)
+</p>
+</li>
+</ul></div>
+</li>
+</ul></div>
+<div class="ulist"><div class="title">Samplerate - select from one of several menu choices</div><ul>
+<li>
+<p>
+Same as input (default)
+</p>
+</li>
+<li>
+<p>
+8000
+</p>
+</li>
+<li>
+<p>
+11025
+</p>
+</li>
+<li>
+<p>
+16000
+</p>
+</li>
+<li>
+<p>
+22050
+</p>
+</li>
+<li>
+<p>
+24000
+</p>
+</li>
+<li>
+<p>
+44100
+</p>
+</li>
+<li>
+<p>
+48000
+</p>
+</li>
+</ul></div>
+<div class="ulist"><div class="title">Help</div><ul>
+<li>
+<p>
+About - Version, authors, etc.
+</p>
+</li>
+<li>
+<p>
+Guide - open this html document in default html browser
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_main_dialog_controls">5. Main Dialog Controls</h2>
+<div class="sectionbody">
+<div class="ulist"><ul>
+<li>
+<p>
+Input button - select the input file.
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+selection will be shown in the output control to the right of the button.
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+Output button - select the output file.
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+selection will be shown in the output control to the right of the button.
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+Simul' button - open the simulation select dialog
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+The select dialog contains 5 controls
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+simulation browser - select the desired simulation with left mouse button
+</p>
+</li>
+<li>
+<p>
+Select button - load the constraints for the highlighted simulation to the main dialog
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+Once selected the next two controls become accessible
+</p>
+</li>
+<li>
+<p>
+Make any desired changes to the constraint values on the main dialog
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+Update button - update the highlighted simulation with the main dialog constraints
+</p>
+</li>
+<li>
+<p>
+Delete button - delete the current simulation from the list
+</p>
+</li>
+<li>
+<p>
+Cancel button - close the select dialog
+</p>
+</li>
+</ul></div>
+</li>
+</ul></div>
+</li>
+</ul></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content">
+<div class="title">Adding a new simulation</div>
+<div class="paragraph"><p>You may also modify the constraints, change the simulation name accordingly, and then use the Simulation, Add menu item to add the new simulation to the displayed list.</p></div>
+</td>
+</tr></table>
+</div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_path_specifications">6. Path specifications</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>There are 3 possible path specifications that can be applied concurrently to the input audio stream.  Path 1 is the ground wave or direct signal path and is always present in the output signal.  Path 2 and 3 are delayed signal paths, usually sky wave path simulation.  Paths 2 and 3 can be either selected or not by the check box associated with each path.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Path 1 - undelayed, straight line, or ground wave path; always present
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+Spread - 2 sigma Doppler spread in Hz
+</p>
+</li>
+<li>
+<p>
+Offset - Doppler shift in Hz
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+Path 2 - reflected signal path, usually skywave
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+Delay - path delay from ground wave path, in milliseconds
+</p>
+</li>
+<li>
+<p>
+Spread - 2 sigma Doppler spread in Hz
+</p>
+</li>
+<li>
+<p>
+Offset - Doppler shift in Hz
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+Path 3 - reflected signal path, usually skywave
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+Delay - path delay from ground wave path, in milliseconds
+</p>
+</li>
+<li>
+<p>
+Spread - 2 sigma Doppler spread in Hz
+</p>
+</li>
+<li>
+<p>
+Offset - Doppler shift in Hz
+</p>
+</li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="_awgn_specifications">7. AWGN specifications</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Gaussian noise can be added to the signal.  The S/N value is in dB with respect to the input audio stream; ie: 6 dB results in an output audio stream with a +6 dB signal to noise ratio.</p></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="ref-batch">8. Batch Processing</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>The batch processing dialog is similar to the select dialog in that it contains a list browser and 4 buttons.  The list browser is different in that each line can be selected by toggling it’s associated check box.</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+Clear button   - clear all list check boxes
+</p>
+</li>
+<li>
+<p>
+All button     - set all list check boxes
+</p>
+</li>
+<li>
+<p>
+Process button - process each of the checked list items
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+as each item is processed a simulation will be performed and the output audio stream written to a file whose name is a composite of the input audio stream file-name and the current simulation name.  The main dialog constraints will display the simulation values as each one is processed.  White space and directory/folder designation characters will be change to an underscore for the final file-name.  The file will be either stored in the same folder as the input wav file or in the designa [...]
+</p>
+</li>
+</ul></div>
+</li>
+<li>
+<p>
+Cancel         - close the batch process dialog
+</p>
+</li>
+</ul></div>
+</div>
+</div>
+<div class="sect1">
+<h2 id="ref-series">9. AWGN Series Processing</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>It’s quite common to want a series of test files at varying signal to noise ratios.  The menu item "Simulation | AWGN series" gives access to a simple dialog that allows the user to specify the lower, upper and step size for a sequence of AWGN tests.  Set these values and then press the "Process" button to generate a unique output wav file for each of requested series.  The output file-name will be a composite of the input file name and the AWGN value of i [...]
+</div>
+</div>
+<div class="sect1">
+<h2 id="ref-credits">10. Credits</h2>
+<div class="sectionbody">
+<div class="paragraph"><p>Copyright © 2014 David Freese, <tt>W1HKJ</tt>.</p></div>
+<div class="paragraph"><p>Based on AE4JY, Moe Wheatley’s PathSim.</p></div>
+<div class="paragraph"><p>License GPLv3+: <a href="http://www.gnu.org/licenses/gpl.html">GNU GPL version 3 or later</a>.</p></div>
+</div>
+</div>
+</div>
+<div id="footnotes"><hr /></div>
+<div id="footer">
+<div id="footer-text">
+Last updated 2014-06-22 09:18:56 CDT
+</div>
+</div>
+</body>
+</html>
diff --git a/doc/guide.txt b/doc/guide.txt
new file mode 100644
index 0000000..dd9f906
--- /dev/null
+++ b/doc/guide.txt
@@ -0,0 +1,210 @@
+Guide to linsim
+===============
+
+// Uncomment the section below to enable the hand written TOC and avoid some
+// javascript security warnings with brain-dead browsers.  Remember to update
+// when changing the sections.
+////////////////////////////////////////////////////////////////////////////////
+.Table of Contents
+<<ref-general, 1. General>>
+
+<<ref-models, 2. Simulation Models>>
+
+<<ref-folders-files, 3. Folders & Files>>
+
+<<ref-operating, 4. Operating program>>
+
+<<ref-batch, 5. Batch Processing>>
+
+<<ref-series, 6. AWGN Series Processing>>
+
+<<ref-credits, Credits>>
+////////////////////////////////////////////////////////////////////////////////
+
+
+:revision: 1.0.1
+// Aliases
+//:docsurl: http://www.w1hkj.com/downloads/
+//:docs: {docsurl}linsim.pdf
+//:home: http://www.w1hkj.com/Fldigi.html
+:secret_rabbit: http://www.mega-nerd.com/SRC/
+:pathsim: http://www.moetronix.com/ae4jy/files/pathsimtech100.pdf
+
+********************************************************************************
+Of necessity, this Guide contains only as much as you need to know to get started.
+********************************************************************************
+
+
+[[ref-general]]
+== What is Linsim? ==
+
+linsim is a computer program intended as a tool for Amateur Radio Digital Mode 
+evaluation under varying HF propogation conditions.  
+
+linsim is available for multiple computer operating systems;
+FreeBSD(TM); Linux(TM), OS X(TM) and Windows(TM).
+
+=== What is a Simulation Model? ===
+
+.Watterson Ionospheric Channel Model
+
+Radio propagation via the earth's ionosphere contain reflections from 3 general effects:
+
+* Density variations versus altitude in the ionosphere
+
+* Magnetic-ionic effects that cause polarization-dependent paths
+
+* Non-uniformity of the ionospheric layers
+
+The Watterson HF channel model has been used for some time for simulating the propagation of radio waves reflecting off of the ionosphere by simulating both amplitude and phase distortion in multiple propagation paths each with a specified fixed delay.
+
+For a much more detailed description, one is referred to an article in the May/June 2000 issue of QEX by Johan Forrer describing the details of such a model. Another reference can be found in "Wireless Digital Communications:
+Design and Theory" by Tom McDermott.
+
+The mathematics associated with the various signal processing paths are identical to PathSim.  The reader is refered to Moe Wheatley's excellent PathSim technical document for details, {pathsim}.
+
+
+=== General description ===
+Linsim is designed to read and then add path simulation to any monophonic wav file recorded at any sampling rate.  It works particularly well with files that were created using fldigi's audio capture and audio generate functions.  The entire wav file will be saved to computer memory and then duplicated during the signal processing.  The user should try to keep the length of the wav file at 20 Mg or less, but the author has tested some 200 Mg files on both Linux and Windows-8 without caus [...]
+
+Simulations include path delay, doppler, frequency shift and band limited Gaussian white noise.  All simulations are constrained to a 3000 Hz bandwidth.  The input signal is filtered by a FIR bandpass filter (400 - 3400 Hz).  
+
+[NOTE]
+================================================================================
+Your input signal should not extend beyond these limits.
+================================================================================
+
+[[ref-folders-files]]
+== Simulation Specification Files ==
+=== Folder location ===
+The first time it is executed linsim will create a folder in which to store it's simulation specification files.  The folder location depends on the user's operating system:
+
+XP : C:\Documents and Settings\<user>\linsim.files
+
+Vista / Win7 / Win8 : C:\Users\<user>\linsim.files
+
+Linux : /home/<user>/.linsim
+
+OS X : /users/<user>/.linsim
+
+Linux and OS X users might want to create a link to that folder
+
+$ cd
+$ ln -s linsim.files .linsim
+
+== Simulation Files ==
+Linsim can manage, open and save any number of simulation sets.  Each set of simulations are saved in the same comma-separated-value (csv) file.  The files are compatible with any spreadsheet program such as Excel, Open Office, or Gnumeric.
+
+=== Simulation File Format ===
+Simulation files are spreadsheet files saved in a comma-separated-value format.
+A default set of simulations are created for you when the program is executed
+for the first time.  The default file contents are
+
+[format="csv",cols="^1,14*2",options="header"]
+|============================================================================================
+TITLE,AWGN,S/N,P1,SPREAD_1,OFFSET_1,P2,DELAY_2,SPREAD_2,OFFSET_2,P3,DELAY_3,SPREAD_3,OFFSET_3
+include::table1.csv[]
+|============================================================================================
+
+
+[[ref-operating]]
+== Menu functions ==
+
+.File
+* Open    - open an existing simulation set csv file
+** the name of the simulation file in use will be displayed in the control labeled "Models:"
+* Save    - save the current simulation set csv file
+* Save As - save the current simulation set, specifying a new file path-name
+* Exit    - exit the program, saving current simulation set
+
+.Simulation
+* Add         - add the current simulation specifications to the current set
+* Batch       - open the batch processing dialog
+** select sequence of simulations to be run as a set
+* AWGN series - open the AWGN series processing dialog
+** select lower, upper, step for a series of simulation runs
+* Choose output folder
+** open folder (directory) selection folder
+** select target folder (must be existing)
+** or output same as input folder (default)
+
+.Samplerate - select from one of several menu choices
+* Same as input (default)
+* 8000
+* 11025
+* 16000
+* 22050
+* 24000
+* 44100
+* 48000
+
+.Help
+* About - Version, authors, etc.
+* Guide - open this html document in default html browser
+
+
+== Main Dialog Controls ==
+
+* Input button - select the input file.
+** selection will be shown in the output control to the right of the button.
+
+* Output button - select the output file.
+** selection will be shown in the output control to the right of the button.
+
+* Simul' button - open the simulation select dialog
+** The select dialog contains 5 controls
+*** simulation browser - select the desired simulation with left mouse button
+*** Select button - load the constraints for the highlighted simulation to the main dialog
+**** Once selected the next two controls become accessible
+**** Make any desired changes to the constraint values on the main dialog
+*** Update button - update the highlighted simulation with the main dialog constraints
+*** Delete button - delete the current simulation from the list
+*** Cancel button - close the select dialog
+
+
+[NOTE]
+.Adding a new simulation
+================================================================================
+You may also modify the constraints, change the simulation name accordingly, and then use the Simulation, Add menu item to add the new simulation to the displayed list.
+================================================================================
+
+== Path specifications ==
+There are 3 possible path specifications that can be applied concurrently to the input audio stream.  Path 1 is the ground wave or direct signal path and is always present in the output signal.  Path 2 and 3 are delayed signal paths, usually sky wave path simulation.  Paths 2 and 3 can be either selected or not by the check box associated with each path.
+
+* Path 1 - undelayed, straight line, or ground wave path; always present
+** Spread - 2 sigma Doppler spread in Hz
+** Offset - Doppler shift in Hz
+* Path 2 - reflected signal path, usually skywave
+** Delay - path delay from ground wave path, in milliseconds
+** Spread - 2 sigma Doppler spread in Hz
+** Offset - Doppler shift in Hz
+* Path 3 - reflected signal path, usually skywave
+** Delay - path delay from ground wave path, in milliseconds
+** Spread - 2 sigma Doppler spread in Hz
+** Offset - Doppler shift in Hz
+
+== AWGN specifications ==
+Gaussian noise can be added to the signal.  The S/N value is in dB with respect to the input audio stream; ie: 6 dB results in an output audio stream with a +6 dB signal to noise ratio.
+
+[[ref-batch]]
+== Batch Processing ==
+The batch processing dialog is similar to the select dialog in that it contains a list browser and 4 buttons.  The list browser is different in that each line can be selected by toggling it's associated check box.
+
+** Clear button   - clear all list check boxes
+** All button     - set all list check boxes
+** Process button - process each of the checked list items
+*** as each item is processed a simulation will be performed and the output audio stream written to a file whose name is a composite of the input audio stream file-name and the current simulation name.  The main dialog constraints will display the simulation values as each one is processed.  White space and directory/folder designation characters will be change to an underscore for the final file-name.  The file will be either stored in the same folder as the input wav file or in the des [...]
+** Cancel         - close the batch process dialog
+
+[[ref-series]]
+== AWGN Series Processing ==
+It's quite common to want a series of test files at varying signal to noise ratios.  The menu item "Simulation | AWGN series" gives access to a simple dialog that allows the user to specify the lower, upper and step size for a sequence of AWGN tests.  Set these values and then press the "Process" button to generate a unique output wav file for each of requested series.  The output file-name will be a composite of the input file name and the AWGN value of interest.  Output folder designat [...]
+
+[[ref-credits]]
+== Credits ==
+
+Copyright (C) 2014 David Freese, +W1HKJ+.
+
+Based on AE4JY, Moe Wheatley's PathSim.
+
+License GPLv3+: http://www.gnu.org/licenses/gpl.html[GNU GPL version 3 or later].
diff --git a/doc/table1.csv b/doc/table1.csv
new file mode 100644
index 0000000..2856568
--- /dev/null
+++ b/doc/table1.csv
@@ -0,0 +1,18 @@
+"AWGN S/N",1,10,0,0,0,0,0,0,0,0,0,0,0
+"CCIR 520-2 (Doppler Fading)",0,0,1,0.2,10,1,0.5,0.2,5,0,0,0,0
+"CCIR 520-2 (Flutter Fading)",0,0,1,10,0,1,0.5,10,0,0,0,0,0
+"CCIR 520-2 (Good Conditions)",0,0,1,0.1,0,1,0.5,0.1,0,0,0,0,0
+"CCIR-520-2 (Moderate Conditions)",0,0,1,0.5,0,1,1,0.5,0,0,0,0,0
+"CCIR-520-2 (Poor Conditions)",0,0,1,0.5,0,1,2,0.5,0,0,0,0,0
+"Direct Path",0,10,0,0,0,0,0,0,0,0,0,0,0
+"Frequency Shifter",0,0,1,0,500,0,0,0,0,0,0,0,0
+"High-Latitude Disturbed",0,0,1,30,0,1,7,30,0,0,0,0,0
+"High-Latitude Moderate",0,0,1,10,0,1,3,10,0,0,0,0,0
+"High-Latitude Quiet",0,0,1,0.5,0,1,1,0.5,0,0,0,0,0
+"Low-Latitude Disturbed",0,0,1,10,0,1,6,10,0,0,0,0,0
+"Low-Latitude Moderate",0,0,1,1.5,0,1,2,1.5,0,0,0,0,0
+"Low-Latitude Quiet",0,0,1,0.5,0,1,0.5,0.5,0,0,0,0,0
+"Mid-Latitude Disturbed",0,0,1,1,0,1,2,1,0,0,0,0,0
+"Mid-Latitude Disturbed NVIS",0,0,1,1,0,1,7,1,0,0,0,0,0
+"Mid-Latitude Moderate",0,0,1,0.5,0,1,1,0.5,0,0,0,0,0
+"Mid-Latitude Quiet",0,0,1,0.5,0,1,0.5,0.5,0,0,0,0,0
diff --git a/m4/build.m4 b/m4/build.m4
new file mode 100644
index 0000000..2c2721e
--- /dev/null
+++ b/m4/build.m4
@@ -0,0 +1,70 @@
+AC_DEFUN([AC_linsim_SH_DQ], [
+  ac_sh_dq="\"`$1 | sed 's/"/\\\\"/g'`\""
+])
+
+AC_DEFUN([AC_linsim_BUILD_INFO], [
+# Define build flags and substitute in Makefile.in
+# CPPFLAGS
+  linsim_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include"
+  if test "x$target_win32" = "xyes"; then
+      linsim_BUILD_CPPFLAGS="$linsim_BUILD_CPPFLAGS -D_WINDOWS"
+  fi
+# CXXFLAGS
+  linsim_BUILD_CXXFLAGS="$FLTK_CFLAGS $linsim_BUILD_CPPFLAGS $SNDFILE_CFLAGS $SAMPLERATE_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS $PTW32_CFLAGS"
+  if test "x$target_mingw32" = "xyes"; then
+      linsim_BUILD_CXXFLAGS="-mthreads $linsim_BUILD_CXXFLAGS -D_WINDOWS"
+  fi
+# LDFLAGS
+  linsim_BUILD_LDFLAGS=
+# LDADD
+  linsim_BUILD_LDADD="$FLTK_LIBS $X_LIBS $SNDFILE_LIBS $SAMPLERATE_LIBS $EXTRA_LIBS $PTW32_LIBS"
+
+  if test "x$ac_cv_debug" = "xyes"; then
+      linsim_BUILD_CXXFLAGS="$linsim_BUILD_CXXFLAGS -UNDEBUG"
+      linsim_BUILD_LDFLAGS="$linsim_BUILD_LDFLAGS $RDYNAMIC"
+  else
+      linsim_BUILD_CXXFLAGS="$linsim_BUILD_CXXFLAGS -DNDEBUG"
+  fi
+  if test "x$target_mingw32" = "xyes"; then
+      linsim_BUILD_LDFLAGS="-mthreads $linsim_BUILD_LDFLAGS"
+  fi
+
+  AC_SUBST([linsim_BUILD_CPPFLAGS])
+  AC_SUBST([linsim_BUILD_CXXFLAGS])
+  AC_SUBST([linsim_BUILD_LDFLAGS])
+  AC_SUBST([linsim_BUILD_LDADD])
+
+#define build variables for config.h
+  AC_DEFINE_UNQUOTED([BUILD_BUILD_PLATFORM], ["$build"], [Build platform])
+  AC_DEFINE_UNQUOTED([BUILD_HOST_PLATFORM], ["$host"], [Host platform])
+  AC_DEFINE_UNQUOTED([BUILD_TARGET_PLATFORM], ["$target"], [Target platform])
+
+  test "x$LC_ALL" != "x" && LC_ALL_saved="$LC_ALL"
+  LC_ALL=C
+  export LC_ALL
+
+  AC_linsim_SH_DQ([echo $ac_configure_args])
+  AC_DEFINE_UNQUOTED([BUILD_CONFIGURE_ARGS], [$ac_sh_dq], [Configure arguments])
+
+  AC_linsim_SH_DQ([date])
+  AC_DEFINE_UNQUOTED([BUILD_DATE], [$ac_sh_dq], [Build date])
+
+  AC_linsim_SH_DQ([whoami])
+  AC_DEFINE_UNQUOTED([BUILD_USER], [$ac_sh_dq], [Build user])
+
+  AC_linsim_SH_DQ([hostname])
+  AC_DEFINE_UNQUOTED([BUILD_HOST], [$ac_sh_dq], [Build host])
+
+  AC_linsim_SH_DQ([$CXX -v 2>&1 | tail -1])
+  AC_DEFINE_UNQUOTED([BUILD_COMPILER], [$ac_sh_dq], [Compiler])
+
+  AC_linsim_SH_DQ([echo $linsim_BUILD_CPPFLAGS $linsim_BUILD_CXXFLAGS])
+  AC_DEFINE_UNQUOTED([linsim_BUILD_CXXFLAGS], [$ac_sh_dq], [linsim compiler flags])
+  AC_linsim_SH_DQ([echo $linsim_BUILD_LDFLAGS $linsim_BUILD_LDADD])
+  AC_DEFINE_UNQUOTED([linsim_BUILD_LDFLAGS], [$ac_sh_dq], [linsim linker flags])
+
+  if test "x$LC_ALL_saved" != "x"; then
+      LC_ALL="$LC_ALL_saved"
+      export LC_ALL
+  fi
+])
diff --git a/m4/debug.m4 b/m4/debug.m4
new file mode 100644
index 0000000..fe6c1ad
--- /dev/null
+++ b/m4/debug.m4
@@ -0,0 +1,104 @@
+AC_DEFUN([AC_FL_RDYNAMIC], [
+  LDFLAGS_saved="$LDFLAGS"
+  LDFLAGS="$LDFLAGS -rdynamic"
+
+  AC_MSG_CHECKING([whether $CC supports -rdynamic])
+  AC_TRY_LINK([], [], [ac_cv_rdynamic=yes], [ac_cv_rdynamic=no])
+  AC_MSG_RESULT([$ac_cv_rdynamic])
+
+  AC_LANG_PUSH(C++)
+    AC_MSG_CHECKING([whether $CXX supports -rdynamic])
+    AC_TRY_LINK([], [], [ac_cv_rdynamic=yes], [ac_cv_rdynamic=no])
+    AC_MSG_RESULT([$ac_cv_rdynamic])
+  AC_LANG_POP(C++)
+
+  LDFLAGS="$LDFLAGS_saved"
+])
+
+
+AC_DEFUN([AC_FL_DEBUG], [
+  AC_REQUIRE([AC_FL_OPT])
+  AC_ARG_ENABLE([debug],
+                AC_HELP_STRING([--enable-debug], [turn on debugging]),
+                [case "${enableval}" in
+                  yes|no) ac_cv_debug="${enableval}" ;;
+                  *)      AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
+                 esac],
+                 [ac_cv_debug=no])
+
+  AC_ARG_VAR([BFD_CFLAGS], [C compiler flags for libbfd])
+  AC_ARG_VAR([BFD_LIBS], [linker flags for libbfd])
+  AC_ARG_WITH([bfd],
+              AC_HELP_STRING([--with-bfd@<:@=DIR@:>@],
+                             [search for libbfd in DIR/include and DIR/lib @<:@mingw32 only@:>@]),
+              [ac_cv_want_bfd="$withval"],
+              [ac_cv_want_bfd=yes])
+
+  if test "x$ac_cv_debug" = "xyes" && test "x$ac_cv_want_bfd" != "xno" && \
+     test "x$target_mingw32" = "xyes"; then
+      if test "x$ac_cv_want_bfd" != "xyes"; then # set -I and -L switches
+          bfd_default_cflags="-I${ac_cv_want_bfd}/include"
+          bfd_default_libs="-L${ac_cv_want_bfd}/lib"
+      fi
+      # don't override the user-specified vars
+      BFD_CFLAGS="${BFD_CFLAGS:-$bfd_default_cflags}"
+      BFD_LIBS="${BFD_LIBS:-$bfd_default_libs}"
+      ac_cv_want_bfd="yes"
+
+      CPPFLAGS_saved="$CPPFLAGS"
+      LDFLAGS_saved="$LDFLAGS"
+      CPPFLAGS="$CPPFLAGS $BFD_CFLAGS"
+      LDFLAGS="$LDFLAGS $BFD_LIBS"
+
+      AC_CHECK_HEADER([bfd.h], [ac_cv_have_bfd="yes"], [ac_cv_have_bfd="no"])
+      if test "x$ac_cv_have_bfd" = "xyes"; then
+          bfd_other_libs="-liberty -lpsapi -limagehlp"
+          AC_CHECK_LIB([bfd], [bfd_set_format], [ac_cv_have_bfd="yes"], [ac_cv_have_bfd="no"], [$bfd_other_libs])
+      fi
+      CPPFLAGS="$CPPFLAGS_saved"
+      LDFLAGS="$LDFLAGS_saved"
+      if test "x$ac_cv_have_bfd" = "xyes"; then
+          BFD_LIBS="$BFD_LIBS -lbfd $bfd_other_libs"
+      fi
+  fi
+
+  if test "x$ac_cv_debug" = "xyes"; then
+      AC_MSG_CHECKING([for debug info flag])
+      if test "x$GXX" = "xyes"; then
+          if test "x$target_mingw32" = "xyes"; then
+              gflag="-gstabs"
+          else
+              gflag="-ggdb3"
+          fi
+      else
+          gflag="-g"
+      fi
+      AC_MSG_RESULT([$gflag])
+      DEBUG_CFLAGS="-O0 -fno-inline-functions -fno-omit-frame-pointer $gflag -Wall"
+
+      AC_FL_RDYNAMIC
+      if test "x$ac_cv_rdynamic" = "xyes"; then
+          RDYNAMIC=-rdynamic
+      fi
+
+      CXXFLAGS=""
+      CFLAGS="$CXXFLAGS"
+      AC_MSG_NOTICE([debugging enabled; overriding CXXFLAGS])
+
+      if test "x$target_darwin" = "xyes"; then
+          ac_cv_compat_stack=yes
+	  AC_DEFINE([HAVE_DBG_STACK], 1, [Define to 1 if we have dbg::stack])
+      elif test "x$target_mingw32" = "xyes" && test "x$ac_cv_have_bfd" = "xyes"; then
+          ac_cv_compat_stack=yes
+	  AC_DEFINE([HAVE_DBG_STACK], 1, [Define to 1 if we have dbg::stack])
+      else
+          ac_cv_compat_stack=no
+	  AC_DEFINE([HAVE_DBG_STACK], 0, [Define to 0 if not using dbg::stack])
+      fi
+  fi
+  AM_CONDITIONAL([ENABLE_DEBUG], [test "x$ac_cv_debug" = "xyes"])
+  AC_SUBST([DEBUG_CFLAGS])
+  AC_SUBST([RDYNAMIC])
+
+  AM_CONDITIONAL([COMPAT_STACK], [test "x$ac_cv_compat_stack" = "xyes"])
+])
diff --git a/m4/fltk.m4 b/m4/fltk.m4
new file mode 100644
index 0000000..07371f1
--- /dev/null
+++ b/m4/fltk.m4
@@ -0,0 +1,54 @@
+AC_DEFUN([AC_CHECK_FLTK], [
+  AC_ARG_VAR([FLTK_CONFIG], [Path to fltk-config utility])
+  AC_ARG_VAR([FLTK_CFLAGS], [C compiler flags for FLTK, overriding fltk-config])
+  AC_ARG_VAR([FLTK_LIBS], [linker flags for FLTK, overriding fltk-config])
+
+  if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then
+      if test "x$FLTK_CONFIG" = "x"; then
+          AC_PATH_PROG([FLTK_CONFIG], [fltk-config], [no])
+      else
+          AC_MSG_CHECKING([for fltk-config])
+          AC_MSG_RESULT([$FLTK_CONFIG])
+      fi
+      if test "$FLTK_CONFIG" = "no"; then
+          AC_MSG_ERROR([
+  *** The fltk-config script could not be found. Please install the development
+  *** headers and libraries for FLTK 1.1.x, or set PATH to the directory that
+  *** contains fltk-config.
+          ])
+      fi
+      HAVE_FLTK_API_VERSION=no
+      FLTK_API_VERSION="`$FLTK_CONFIG --api-version`"
+      if test $? -ne 0; then
+          AC_MSG_ERROR([$FLTK_CONFIG failed])
+      fi
+      if test "x$FLTK_API_VERSION" = "x1.1" || test "x$FLTK_API_VERSION" = "x1.3"; then
+          HAVE_FLTK_API_VERSION=yes
+      fi
+      LINSIM_FLTK_API_MAJOR=${FLTK_API_VERSION%%.*}
+      LINSIM_FLTK_API_MINOR=${FLTK_API_VERSION#*.}; LINSIM_FLTK_API_MINOR=${LINSIM_FLTK_API_MINOR%%.*}
+      if test "${HAVE_FLTK_API_VERSION}" = "no"; then
+          AC_MSG_ERROR([
+  *** The version of FLTK found on your system provides API version $FLTK_API_VERSION.
+  *** To build $PACKAGE you need a FLTK version that provides API 1.1 or 1.3.
+          ])
+      fi
+      FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags`
+      if test "x$ac_cv_static" != "xyes"; then
+          FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images`
+      else
+          FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images`
+      fi
+  else
+      AC_MSG_NOTICE([not checking for FLTK])
+  fi
+  AC_SUBST([FLTK_CFLAGS])
+  AC_SUBST([FLTK_LIBS])
+  AC_DEFINE_UNQUOTED([FLTK_BUILD_VERSION], ["`$FLTK_CONFIG --version`"], [FLTK version])
+  AC_DEFINE_UNQUOTED([LINSIM_FLTK_API_MAJOR], [$LINSIM_FLTK_API_MAJOR], [FLTK API major version])
+  AC_DEFINE_UNQUOTED([LINSIM_FLTK_API_MINOR], [$LINSIM_FLTK_API_MINOR], [FLTK API minor version])
+
+  AC_ARG_VAR([FLUID], [Fast Light User-Interface Designer])
+  AC_CHECK_PROG([FLUID], [fluid], [fluid])
+  AM_CONDITIONAL([HAVE_FLUID], [test -n "$FLUID"])
+])
diff --git a/m4/funcs.m4 b/m4/funcs.m4
new file mode 100644
index 0000000..2c366e3
--- /dev/null
+++ b/m4/funcs.m4
@@ -0,0 +1,15 @@
+# args: function, search-libs, other-libraries
+AC_DEFUN([AC_FL_SEARCH_LIBS], [
+
+m4_define([FUNC_NAME_UC], m4_translit([$1], [a-z], [A-Z]))
+
+LIBS_search_libs_save="$LIBS"
+LIBS=""
+AC_SEARCH_LIBS($1, $2, [ac_cv_have_func_[]$1=1], [ac_cv_have_func_[]$1=0], $3)
+if test "x$LIBS" != "x"; then
+    echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
+fi
+AC_DEFINE_UNQUOTED([HAVE_]FUNC_NAME_UC, $ac_cv_have_func_[]$1, [Define to 1 if we have $1])
+LIBS="$LIBS_search_libs_save"
+
+])
diff --git a/m4/macosx.m4 b/m4/macosx.m4
new file mode 100644
index 0000000..78bb8b2
--- /dev/null
+++ b/m4/macosx.m4
@@ -0,0 +1,42 @@
+AC_DEFUN([AC_FL_MACOSX], [
+case "$target_os" in
+  darwin*)
+      target_darwin="yes"
+      ;;
+  *)
+      target_darwin="no"
+      ;;
+esac
+
+AC_ARG_ENABLE([mac-universal], AC_HELP_STRING([--enable-mac-universal],
+                                              [build a universal binary on Mac OS X @<:@no@:>@]),
+              [case "${enableval}" in
+                 yes|no) ac_cv_mac_universal="${enableval}" ;;
+                 *)      AC_MSG_ERROR([bad value "${enableval}" for --enable-mac-universal]) ;;
+	       esac],
+              [ac_cv_mac_universal=no])
+
+if test "x$target_darwin" = "xyes" && test "x$ac_cv_mac_universal" = "xyes"; then
+    mac_minversion="-mmacosx-version-min=10.4"
+    case "$target_os" in
+      darwin8*)
+        mac_arches="-arch i386 -arch ppc"
+        mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+        ;;
+      darwin9*)
+        mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64"
+        mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
+        ;;
+      *)
+        mac_arches=""
+        mac_sysroot=""
+        ;;
+    esac
+    MAC_UNIVERSAL_CFLAGS="$mac_arches $mac_sysroot $mac_minversion"
+    MAC_UNIVERSAL_LDFLAGS="$mac_arches"
+fi
+AC_SUBST([MAC_UNIVERSAL_CFLAGS])
+AC_SUBST([MAC_UNIVERSAL_LDFLAGS])
+
+AM_CONDITIONAL([DARWIN], [test "x$target_darwin" = "xyes"])
+])
diff --git a/m4/np-compat.m4 b/m4/np-compat.m4
new file mode 100644
index 0000000..9e1d4e7
--- /dev/null
+++ b/m4/np-compat.m4
@@ -0,0 +1,36 @@
+AC_DEFUN([AC_FL_NP_COMPAT], [
+  AC_REQUIRE([AC_FL_MACOSX])
+  AC_REQUIRE([AC_FL_WIN32])
+
+  AM_CONDITIONAL([COMPAT_REGEX], [test "x$ac_cv_header_regex_h" != "xyes"])
+
+  if test "x$target_mingw32" = "xyes"; then
+      sem_libs="pthreadGC2"
+  else
+      sem_libs="pthread rt"
+  fi
+  other_libs=""
+
+  if test "x$ac_cv_want_ptw32" = "xyes"; then
+      CFLAGS_saved="$CFLAGS"
+      LDFLAGS_saved="$LDFLAGS"
+      EXTRA_LIBS_saved="$EXTRA_LIBS"
+      CFLAGS="$CFLAGS $PTW32_CFLAGS"
+      LDFLAGS="$LDFLAGS $PTW32_LIBS"
+      other_libs=-lws2_32
+  fi
+
+  AC_FL_SEARCH_LIBS([dlopen], [dl], [$other_libs])
+  AC_FL_SEARCH_LIBS([clock_gettime], [rt], [$other_libs])
+  AC_FL_SEARCH_LIBS([sem_unlink], [$sem_libs], [$other_libs])
+  AC_FL_SEARCH_LIBS([sem_timedwait], [$sem_libs], [$other_libs])
+
+  if test "x$ac_cv_want_ptw32" = "xyes"; then
+      CFLAGS="$CFLAGS_saved"
+      LDFLAGS="$LDFLAGS_saved"
+      EXTRA_LIBS="$EXTRA_LIBS_saved"
+  fi
+  AC_SUBST([EXTRA_LIBS])
+
+  AM_CONDITIONAL([COMPAT_STRCASESTR], [test "x$ac_cv_func_strcasestr" != "xyes"])
+])
diff --git a/m4/opt.m4 b/m4/opt.m4
new file mode 100644
index 0000000..460d23b
--- /dev/null
+++ b/m4/opt.m4
@@ -0,0 +1,29 @@
+AC_DEFUN([AC_FL_OPT], [
+  AC_ARG_ENABLE([optimizations],
+		AC_HELP_STRING([--enable-optimizations],
+		               [use x86 optimizations (none|sse|sse2|sse3|native) @<:@none@:>@]),
+                [case "${enableval}" in
+                  none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;;
+                  *)                         AC_MSG_ERROR([bad value ${enableval} for --enable-optimizations]) ;;
+                 esac],
+                 [ac_cv_opt=none])
+  OPT_CFLAGS="-O2 -ffast-math -finline-functions -fomit-frame-pointer"
+  case "$ac_cv_opt" in
+      sse)
+          OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse"
+	  ;;
+      sse2)
+          OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse"
+	  ;;
+      sse3)
+          OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse"
+	  ;;
+      native)
+          OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse"
+	  ;;
+      none)
+          ;;
+  esac
+
+  AC_SUBST([OPT_CFLAGS])
+])
diff --git a/m4/pkg-config.m4 b/m4/pkg-config.m4
new file mode 100644
index 0000000..27c3fc4
--- /dev/null
+++ b/m4/pkg-config.m4
@@ -0,0 +1,44 @@
+# name, version, show-in-help?, optional?, help-text, [am-cond]
+AC_DEFUN([AC_linsim_PKG_CHECK], [
+
+m4_define([PKG_NAME_UC], m4_translit([$1], [a-z], [A-Z]))
+
+m4_if([$3], [yes],
+    [ AC_ARG_WITH($1, AC_HELP_STRING([--with-[]$1], [$5]),
+                     [case "${withval}" in
+                        yes|no) ac_cv_want_[]$1="${withval}" ;;
+                        *)      AC_MSG_ERROR([bad value "${withval}" for --with-[]$1]) ;;
+                      esac],
+                 [ac_cv_want_[]$1=check])
+    ])
+m4_if([$4], [no], [ac_cv_want_[]$1=yes])
+
+test "x$ac_cv_want_[]$1" = "x" && ac_cv_want_[]$1="check"
+case "x$ac_cv_want_[]$1" in
+    "xno")
+            ac_cv_[]$1=no
+            ;;
+    "xcheck")
+            PKG_CHECK_MODULES(PKG_NAME_UC, [$2], [ac_cv_[]$1=yes], [ac_cv_[]$1=no])
+            ;;
+    "xyes")
+            PKG_CHECK_MODULES(PKG_NAME_UC, [$2])
+	    # if we get here the test has succeeded
+            ac_cv_[]$1=yes
+            ;;
+esac
+
+if test "x$ac_cv_[]$1" = "xyes"; then
+    AC_DEFINE([USE_]PKG_NAME_UC, 1, [Define to 1 if we are using $1])
+    pkg_[]$1_version=`$PKG_CONFIG --modversion "$2" 2>/dev/null`
+else
+    AC_DEFINE([USE_]PKG_NAME_UC, 0, [Define to 1 if we are using $1])
+    pkg_[]$1_version=""
+fi
+
+AC_SUBST(PKG_NAME_UC[_CFLAGS])
+AC_SUBST(PKG_NAME_UC[_LIBS])
+AC_DEFINE_UNQUOTED(PKG_NAME_UC[_BUILD_VERSION], ["$pkg_[]$1_version"], [$1 version])
+
+m4_ifval([$6], [ AM_CONDITIONAL([$6], [test "x$ac_cv_[]$1" = "xyes"]) ], [:])
+])
diff --git a/m4/static.m4 b/m4/static.m4
new file mode 100644
index 0000000..8c5bdd2
--- /dev/null
+++ b/m4/static.m4
@@ -0,0 +1,9 @@
+AC_DEFUN([AC_FL_STATIC], [
+  AC_ARG_ENABLE([static],
+                AC_HELP_STRING([--enable-static], [enable static linking for some libraries]),
+                [case "${enableval}" in
+                    yes|no) ac_cv_static="${enableval}" ;;
+                    *)      AC_MSG_ERROR([bad value ${enableval} for --enable-static]) ;;
+                 esac],
+                 [ac_cv_static=no])
+])
diff --git a/m4/win32.m4 b/m4/win32.m4
new file mode 100644
index 0000000..eb62768
--- /dev/null
+++ b/m4/win32.m4
@@ -0,0 +1,59 @@
+AC_DEFUN([AC_FL_WIN32], [
+case "$target_os" in
+     *mingw*)
+        target_win32="yes"
+        target_mingw32="yes"
+        ;;
+     *cygwin*|*win32*|*w32*)
+        target_win32="yes"
+        ;;
+     *)
+        target_win32="no"
+        ;;
+esac
+
+if test "x$target_win32" = "xyes"; then
+    AC_CHECK_PROG([WINDRES], [${ac_tool_prefix}windres], [${ac_tool_prefix}windres])
+    if [ test "x$WINDRES" = "x" ]; then
+        AC_MSG_WARN([The windres utility could not be found])
+    fi
+    AC_DEFINE([__WOE32__], 1, [Define to 1 if we are building on mingw])
+fi
+
+if test "x$target_mingw32" = "xyes"; then
+    AC_CHECK_PROG([MAKENSIS], [makensis], [makensis])
+fi
+
+AC_SUBST([WINDRES])
+AM_CONDITIONAL([HAVE_WINDRES], [test "x$WINDRES" != "x"])
+AC_SUBST([MAKENSIS])
+AM_CONDITIONAL([HAVE_NSIS], [test "x$MAKENSIS" != "x"])
+AM_CONDITIONAL([WIN32], [test "x$target_win32" = "xyes"])
+AM_CONDITIONAL([MINGW32], [test "x$target_mingw32" = "xyes"])
+
+
+AC_ARG_VAR([PTW32_CFLAGS], [C compiler flags for pthreads-w32])
+AC_ARG_VAR([PTW32_LIBS], [linker flags for pthreads-w32])
+
+AC_ARG_WITH([ptw32],
+            AC_HELP_STRING([--with-ptw32@<:@=DIR@:>@],
+                           [search for pthreads-w32 in DIR/include and DIR/lib @<:@mingw32 only@:>@]),
+            [ac_cv_want_ptw32="$withval"],
+            [ac_cv_want_ptw32=no])
+
+if test "x$ac_cv_want_ptw32" != "xno"; then
+    if test "x$ac_cv_want_ptw32" != "xyes"; then # set -I and -L switches
+        ptw32_default_cflags="-I${ac_cv_want_ptw32}/include"
+        ptw32_default_libs="-L${ac_cv_want_ptw32}/lib"
+    fi
+    ptw32_default_libs="$ptw32_default_libs -lpthreadGC2 -lws2_32"
+
+    # don't override the user-specified vars
+    PTW32_CFLAGS="${PTW32_CFLAGS:-$ptw32_default_cflags}"
+    PTW32_LIBS="${PTW32_LIBS:-$ptw32_default_libs}"
+    ac_cv_want_ptw32="yes"
+fi
+
+AC_SUBST([PTW32_CFLAGS])
+AC_SUBST([PTW32_LIBS])
+])
diff --git a/scripts/build.mxe b/scripts/build.mxe
new file mode 100755
index 0000000..707dbf5
--- /dev/null
+++ b/scripts/build.mxe
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+### Script to build a win32 installation
+
+./configure \
+  $PKGCFG \
+  $CROSSCFG \
+  --with-ptw32=/opt/mxe/usr/i686-pc-mingw32 \
+  PTW32_LIBS="-lpthread -lpcreposix -lpcre" \
+  FLTK_CONFIG=$PREFIX/bin/i686-pc-mingw32-fltk-config
+
+make
+
+$PREFIX/bin/i686-pc-mingw32-strip src/linsim.exe
+make nsisinst
+mv src/*setup*exe .
+
+
diff --git a/scripts/mkappbundle.sh b/scripts/mkappbundle.sh
new file mode 100755
index 0000000..0b192ba
--- /dev/null
+++ b/scripts/mkappbundle.sh
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+### Script to create the .app structure for osx
+### 20090730  Stelios Bounanos M0GLD
+
+if [ $# -ne 2 ]; then
+    echo "Syntax: $0 data-dir build-dir" >&2
+    exit 1
+fi
+
+if [ -z "$PACKAGE_TARNAME" ]; then
+    echo "E: \$PACKAGE_TARNAME undefined"
+    exit 1
+fi
+
+PWD=`pwd`
+data="${PWD}/$1"
+build="${PWD}/$2"
+bundle_dir="$APPBUNDLE_NOLIBS"
+static_bundle_dir="$APPBUNDLE"
+# more sanity checks
+for d in "$data" "$build"; do
+    test -d "$d" && continue
+    echo "E: ${d}: not a directory" >&2
+    exit 1
+done
+if ! test -w "$build"; then
+    echo "E: ${build} is not writeable" >&2
+    exit 1
+fi
+
+plist="${data}/mac/Info.plist.in"
+linsim_icon="${data}/mac/linsim.icns"
+for f in "$plist" "$linsim_icon"; do
+    test -r "$f" && continue
+    echo "E: ${f}: not readable" >&2
+    exit 1
+done
+
+# aaaaaaaaaargh => Aaaaaaaaaargh
+upcase1()
+{
+    sed 'h; s/\(^.\).*/\1/; y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/; G; s/\n.//'
+}
+
+function copy_libs()
+{
+    list="$1"
+    while test "x$list" != "x"; do
+	change="$list"
+	list=""
+
+	for obj in $change; do
+	    for lib in `otool -L $obj | \
+	        sed -n 's!^.*[[:space:]]\([^[:space:]]*\.dylib\).*$!\1!p' | \
+                grep -Ev '^/(usr/lib|System)'`; do
+		libfn="`basename $lib`"
+		if ! test -f "Frameworks/$libfn"; then
+		    cp "$lib" "Frameworks/$libfn"
+		    install_name_tool -id "@executable_path/../Frameworks/$libfn" "Frameworks/$libfn"
+		    list="$list Frameworks/$libfn"
+		fi
+		install_name_tool -change "$lib" "@executable_path/../Frameworks/$libfn" "$obj"
+	    done
+	done
+    done
+}
+
+function bundle()
+{
+    appname="${binary}-${appversion}.app"
+    cd "$build"
+
+    # bundle the binary
+    echo "creating ${build}/$bundle_dir/$appname"
+    $mkinstalldirs "$bundle_dir/$appname/Contents/MacOS" "$bundle_dir/$appname/Contents/Resources"
+    cd "$bundle_dir"
+    $INSTALL_PROGRAM "${build}/$binary" "$appname/Contents/MacOS"
+    test "x$NOSTRIP" = "x" && ${STRIP:-strip} -S "$appname/Contents/MacOS/$binary"
+
+    $INSTALL_DATA "$icon" "$appname/Contents/Resources"
+    echo "APPL${signature}" > "$appname/Contents/PkgInfo"
+    sed -e "s!%%IDENTIFIER%%!${identifier}!g; s!%%NAME%%!${name}!g;\
+        s!%%SIGNATURE%%!${signature}!g; s!%%BINARY%%!${binary}!g;\
+        s!%%VERSION%%!${version}!g; s!%%ICON%%!${icon##*/}!g;" < "$plist" > "$appname/Contents/Info.plist"
+    if grep '%%[A-Z]*%%' "$appname/Contents/Info.plist"; then
+	echo "E: unsubstituted variables in $appname/Contents/Info.plist" >&2
+	exit 1
+    fi
+
+
+    # bundle the binary and its non-standard dependencies
+    echo "creating ${build}/$static_bundle_dir/$appname"
+    cd ..
+    $mkinstalldirs "$static_bundle_dir"
+    cp -pR "$bundle_dir/$appname" "$static_bundle_dir"
+    $mkinstalldirs "$static_bundle_dir/$appname/Contents/Frameworks"
+    cd "$static_bundle_dir/$appname/Contents"
+    copy_libs "MacOS/$binary"
+}
+
+set -e
+
+identifier="com.w1hkj.$PACKAGE_TARNAME"
+name=$(echo "$PACKAGE_TARNAME" | upcase1)
+# we'll use the first four consonants as the signature
+signature="$(echo $PACKAGE_TARNAME | sed 's/[aeiouAEIOU]//g; s/\(^....\).*/\1/')"
+binary="$PACKAGE_TARNAME"
+icon="$linsim_icon"
+version="${linsim_VERSION_MAJOR}.${linsim_VERSION_MINOR}"
+appversion="$linsim_VERSION"
+
+bundle
+
+cd "$build"
+echo $ECHO_N "creating disk image"
+hdiutil create -ov -srcfolder "$bundle_dir" -format UDZO -tgtimagekey zlib-level=9 "${APPBUNDLE}-nolibs.dmg"
+echo $ECHO_N "creating disk image"
+hdiutil create -ov -srcfolder "$static_bundle_dir" -format UDZO -tgtimagekey zlib-level=9 "${APPBUNDLE}.dmg"
diff --git a/scripts/mknsisinst.sh b/scripts/mknsisinst.sh
new file mode 100755
index 0000000..c9b9f1f
--- /dev/null
+++ b/scripts/mknsisinst.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+### Script to create a win32 installer file
+### 20090510  Stelios Bounanos M0GLD, Dave Freese W1HKJ
+
+### change for the target application
+linsim_name=linsim
+linsim_bin=linsim.exe
+
+if [ $# -ne 2 ]; then
+    echo "Syntax: $0 data-dir build-dir" >&2
+    exit 1
+fi
+
+if [ -z "$PACKAGE_TARNAME" ]; then
+    echo "E: \$PACKAGE_TARNAME undefined"
+    exit 1
+fi
+
+PWD=`pwd`
+data="${PWD}/$1"
+build="${PWD}/$2"
+
+# more sanity checks
+for d in "$data" "$build"; do
+    test -d "$d" && continue
+    echo "E: ${d}: not a directory" >&2
+    exit 1
+done
+if ! test -w "$build"; then
+    echo "E: ${build} is not writeable" >&2
+    exit 1
+fi
+
+set -e
+
+test "x$NOSTRIP" = "x" && $STRIP -S "$linsim_bin"
+def="$def -Dlinsim_NAME=$linsim_name -Dlinsim_BINARY=$linsim_bin -Dlinsim_VERSION=$PACKAGE_VERSION"
+
+$MAKENSIS -V2 -NOCD -D"INSTALLER_FILE=$INSTALLER_FILE" -D"LICENSE_FILE=$data/../COPYING" \
+    -D"SUPPORT_URL=$PACKAGE_HOME" -D"UPDATES_URL=$PACKAGE_DL" $def "$data/win32/fl_app.nsi"
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..3f0cfcf
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,153 @@
+# Copyright (c) 2013 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)
+
+bin_PROGRAMS = linsim
+
+linsim_cxxFLAGS = @linsim_BUILD_cxxFLAGS@
+linsim_CXXFLAGS = @linsim_BUILD_CXXFLAGS@
+linsim_CFLAGS = $(linsim_CXXFLAGS)
+linsim_LDFLAGS = @linsim_BUILD_LDFLAGS@
+linsim_LDADD = @linsim_BUILD_LDADD@
+
+MINGW32_SRC = \
+	linsim.rc \
+	include/linsimrc.h
+
+# We distribute these but do not always compile them
+EXTRA_linsim_SOURCES = $(linsim_WIN32_RES_SRC) $(MINGW32_SRC)
+
+linsim_SOURCES =
+
+if MINGW32
+if HAVE_WINDRES
+  linsim_SOURCES += $(MINGW32_SRC)
+endif
+endif
+
+########################################################################
+
+
+linsim_VERSION_MAJOR = @linsim_VERSION_MAJOR@
+linsim_VERSION_MINOR = @linsim_VERSION_MINOR@
+linsim_VERSION_PATCH = @linsim_VERSION_PATCH@
+linsim_VERSION = @linsim_VERSION@
+
+.EXPORT_ALL_VARIABLES: nsisinst appbundle
+
+# Sources that are generated,
+BUILT_SOURCES =
+# not distributed,
+nodist_linsim_SOURCES = $(BUILT_SOURCES)
+# and deleted by the clean targets
+CLEANFILES = $(BUILT_SOURCES)
+CLEAN_LOCAL =
+
+if MINGW32
+if HAVE_WINDRES
+.rc.o:
+	$(WINDRES) -I$(srcdir)/include -I$(srcdir)/../data/win32 $< -O coff $@
+endif
+endif
+
+install-data-local:
+	if test -f $(srcdir)/../data/linsim.xpm; then \
+	    $(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \
+	    $(INSTALL_DATA) $(srcdir)/../data/linsim.xpm $(DESTDIR)/$(datadir)/pixmaps; \
+	fi
+	if test -f $(srcdir)/../data/linsim.desktop; then \
+	    $(mkinstalldirs) $(DESTDIR)/$(datadir)/applications; \
+	    $(INSTALL_DATA) $(srcdir)/../data/linsim.desktop $(DESTDIR)/$(datadir)/applications; \
+	fi
+
+uninstall-local:
+	rm -f $(DESTDIR)/$(datadir)/pixmaps/linsim.xpm
+	rm -f $(DESTDIR)/$(datadir)/applications/linsim.desktop
+
+FL_SRC = linsim_ui.fl
+
+if HAVE_FLUID
+flgen: $(FL_SRC)
+	(cd $(srcdir)/include; \
+	for f in $(FL_SRC); do \
+	    c=$${f%.fl}.cxx; \
+		h=$${f%.fl}.h; \
+		h=$${h##*/}; \
+	    $(FLUID) -c -o ../$$c -h $$h ../$$f; \
+	done)
+endif
+
+
+INSTALLER_FILE = linsim-$(linsim_VERSION)_setup.exe
+APPBUNDLE=linsim-$(linsim_VERSION)
+APPBUNDLE_NOLIBS=$(APPBUNDLE)-nolibs
+
+if HAVE_NSIS
+nsisinst: $(bin_PROGRAMS)
+	sh $(srcdir)/../scripts/mknsisinst.sh "$(srcdir)/../data" .
+    CLEANFILES += $(INSTALLER_FILE)
+endif
+
+if DARWIN
+appbundle: $(bin_PROGRAMS)
+	sh $(srcdir)/../scripts/mkappbundle.sh "$(srcdir)/../data" .
+    CLEAN_LOCAL += $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg
+endif
+
+clean-local:
+	-rm -rf $(CLEAN_LOCAL)
+
+# Sources that we build. It is OK to have headers here.
+linsim_SOURCES += \
+	main.cxx \
+	delay.cxx \
+	filter_tables.cxx \
+	filters.cxx \
+	linsim_ui.cxx \
+	noise_gen.cxx \
+	path.cxx \
+	sim.cxx \
+	sound.cxx \
+	gauss_fir.cxx \
+	csv.cxx \
+	include/cmplx.h \
+	include/csv.h \
+	include/delay.h \
+	include/filter_tables.h \
+	include/filters.h \
+	include/gauss_fir.h \
+	include/linsim_ui.h \
+	include/main.h \
+	include/noise_gen.h \
+	include/path.h \
+	include/sim.h \
+	include/sim_vals.h \
+	include/sound.h
+
+# Additional source files that are distributed
+EXTRA_DIST = \
+	linsim_ui.fl \
+	linsim_icon.cxx \
+	guide.cxx \
+	linsim.rc \
+	include/linsimrc.h
+
+# Additional non-source files that are distributed
+# Additional source files that support non-Linux cross compilation
+EXTRA_DIST += \
+	$(srcdir)/../data/linsim.desktop \
+	$(srcdir)/../data/linsim.xpm \
+	$(srcdir)/../data/win32/fl_app.nsi \
+	$(srcdir)/../data/win32/linsim.ico \
+	$(srcdir)/../data/linsim.simulations.xls \
+	$(srcdir)/../data/linsim.simulations.csv \
+	$(srcdir)/../scripts/mknsisinst.sh \
+	$(srcdir)/../scripts/build.mxe \
+	$(srcdir)/../data/mac/Info.plist.in \
+	$(srcdir)/../data/mac/linsim.icns \
+	$(srcdir)/../scripts/mkappbundle.sh \
+	$(srcdir)/../doc/asciidoc.conf \
+	$(srcdir)/../doc/guide.conf \
+	$(srcdir)/../doc/guide.html \
+	$(srcdir)/../doc/guide.txt \
+	$(srcdir)/../doc/table1.csv \
+	$(linsim_WIN32_SRC) \
+	$(linsim_FL_SRC)
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..0ebe2b6
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,838 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+# Copyright (c) 2013 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = linsim$(EXEEXT)
+ at HAVE_WINDRES_TRUE@@MINGW32_TRUE at am__append_1 = $(MINGW32_SRC)
+ at HAVE_NSIS_TRUE@am__append_2 = $(INSTALLER_FILE)
+ at DARWIN_TRUE@am__append_3 = $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/config.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/build.m4 \
+	$(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/fltk.m4 \
+	$(top_srcdir)/m4/funcs.m4 $(top_srcdir)/m4/macosx.m4 \
+	$(top_srcdir)/m4/np-compat.m4 $(top_srcdir)/m4/opt.m4 \
+	$(top_srcdir)/m4/pkg-config.m4 $(top_srcdir)/m4/static.m4 \
+	$(top_srcdir)/m4/win32.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__linsim_SOURCES_DIST = linsim.rc include/linsimrc.h main.cxx \
+	delay.cxx filter_tables.cxx filters.cxx linsim_ui.cxx \
+	noise_gen.cxx path.cxx sim.cxx sound.cxx gauss_fir.cxx csv.cxx \
+	include/cmplx.h include/csv.h include/delay.h \
+	include/filter_tables.h include/filters.h include/gauss_fir.h \
+	include/linsim_ui.h include/main.h include/noise_gen.h \
+	include/path.h include/sim.h include/sim_vals.h \
+	include/sound.h
+am__objects_1 = linsim.$(OBJEXT)
+ at HAVE_WINDRES_TRUE@@MINGW32_TRUE at am__objects_2 = $(am__objects_1)
+am_linsim_OBJECTS = $(am__objects_2) linsim-main.$(OBJEXT) \
+	linsim-delay.$(OBJEXT) linsim-filter_tables.$(OBJEXT) \
+	linsim-filters.$(OBJEXT) linsim-linsim_ui.$(OBJEXT) \
+	linsim-noise_gen.$(OBJEXT) linsim-path.$(OBJEXT) \
+	linsim-sim.$(OBJEXT) linsim-sound.$(OBJEXT) \
+	linsim-gauss_fir.$(OBJEXT) linsim-csv.$(OBJEXT)
+am__objects_3 =
+nodist_linsim_OBJECTS = $(am__objects_3)
+linsim_OBJECTS = $(am_linsim_OBJECTS) $(nodist_linsim_OBJECTS)
+linsim_DEPENDENCIES =
+linsim_LINK = $(CXXLD) $(linsim_CXXFLAGS) $(CXXFLAGS) \
+	$(linsim_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(linsim_SOURCES) $(EXTRA_linsim_SOURCES) \
+	$(nodist_linsim_SOURCES)
+DIST_SOURCES = $(am__linsim_SOURCES_DIST) $(EXTRA_linsim_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AC_CONFIG_ARGS = @AC_CONFIG_ARGS@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BFD_CFLAGS = @BFD_CFLAGS@
+BFD_LIBS = @BFD_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_LIBS = @EXTRA_LIBS@
+FLTK_CFLAGS = @FLTK_CFLAGS@
+FLTK_CONFIG = @FLTK_CONFIG@
+FLTK_LIBS = @FLTK_LIBS@
+FLUID = @FLUID@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAC_UNIVERSAL_CFLAGS = @MAC_UNIVERSAL_CFLAGS@
+MAC_UNIVERSAL_LDFLAGS = @MAC_UNIVERSAL_LDFLAGS@
+MAKEINFO = @MAKEINFO@
+MAKENSIS = @MAKENSIS@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POW_LIB = @POW_LIB@
+PTW32_CFLAGS = @PTW32_CFLAGS@
+PTW32_LIBS = @PTW32_LIBS@
+RDYNAMIC = @RDYNAMIC@
+SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@
+SAMPLERATE_LIBS = @SAMPLERATE_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
+SNDFILE_LIBS = @SNDFILE_LIBS@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WINDRES = @WINDRES@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+linsim_BUILD_CPPFLAGS = @linsim_BUILD_CPPFLAGS@
+linsim_BUILD_CXXFLAGS = @linsim_BUILD_CXXFLAGS@
+linsim_BUILD_LDADD = @linsim_BUILD_LDADD@
+linsim_BUILD_LDFLAGS = @linsim_BUILD_LDFLAGS@
+linsim_VERSION = @linsim_VERSION@
+
+########################################################################
+linsim_VERSION_MAJOR = @linsim_VERSION_MAJOR@
+linsim_VERSION_MINOR = @linsim_VERSION_MINOR@
+linsim_VERSION_PATCH = @linsim_VERSION_PATCH@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+linsim_cxxFLAGS = @linsim_BUILD_cxxFLAGS@
+linsim_CXXFLAGS = @linsim_BUILD_CXXFLAGS@
+linsim_CFLAGS = $(linsim_CXXFLAGS)
+linsim_LDFLAGS = @linsim_BUILD_LDFLAGS@
+linsim_LDADD = @linsim_BUILD_LDADD@
+MINGW32_SRC = \
+	linsim.rc \
+	include/linsimrc.h
+
+
+# We distribute these but do not always compile them
+EXTRA_linsim_SOURCES = $(linsim_WIN32_RES_SRC) $(MINGW32_SRC)
+
+# Sources that we build. It is OK to have headers here.
+linsim_SOURCES = $(am__append_1) main.cxx delay.cxx filter_tables.cxx \
+	filters.cxx linsim_ui.cxx noise_gen.cxx path.cxx sim.cxx \
+	sound.cxx gauss_fir.cxx csv.cxx include/cmplx.h include/csv.h \
+	include/delay.h include/filter_tables.h include/filters.h \
+	include/gauss_fir.h include/linsim_ui.h include/main.h \
+	include/noise_gen.h include/path.h include/sim.h \
+	include/sim_vals.h include/sound.h
+
+# Sources that are generated,
+BUILT_SOURCES = 
+# not distributed,
+nodist_linsim_SOURCES = $(BUILT_SOURCES)
+# and deleted by the clean targets
+CLEANFILES = $(BUILT_SOURCES) $(am__append_2)
+CLEAN_LOCAL = $(am__append_3)
+FL_SRC = linsim_ui.fl
+INSTALLER_FILE = linsim-$(linsim_VERSION)_setup.exe
+APPBUNDLE = linsim-$(linsim_VERSION)
+APPBUNDLE_NOLIBS = $(APPBUNDLE)-nolibs
+
+# Additional source files that are distributed
+
+# Additional non-source files that are distributed
+# Additional source files that support non-Linux cross compilation
+EXTRA_DIST = linsim_ui.fl linsim_icon.cxx guide.cxx linsim.rc \
+	include/linsimrc.h $(srcdir)/../data/linsim.desktop \
+	$(srcdir)/../data/linsim.xpm \
+	$(srcdir)/../data/win32/fl_app.nsi \
+	$(srcdir)/../data/win32/linsim.ico \
+	$(srcdir)/../data/linsim.simulations.xls \
+	$(srcdir)/../data/linsim.simulations.csv \
+	$(srcdir)/../scripts/mknsisinst.sh \
+	$(srcdir)/../scripts/build.mxe \
+	$(srcdir)/../data/mac/Info.plist.in \
+	$(srcdir)/../data/mac/linsim.icns \
+	$(srcdir)/../scripts/mkappbundle.sh \
+	$(srcdir)/../doc/asciidoc.conf $(srcdir)/../doc/guide.conf \
+	$(srcdir)/../doc/guide.html $(srcdir)/../doc/guide.txt \
+	$(srcdir)/../doc/table1.csv $(linsim_WIN32_SRC) \
+	$(linsim_FL_SRC)
+all: $(BUILT_SOURCES) config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .cxx .o .obj .rc
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status src/config.h
+$(srcdir)/config.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+installcheck-binPROGRAMS: $(bin_PROGRAMS)
+	bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
+	  case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+	   *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+	  esac; \
+	  f=`echo "$$p" | \
+	     sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  for opt in --help --version; do \
+	    if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+	         2>c$${pid}_.err </dev/null \
+		 && test -n "`cat c$${pid}_.out`" \
+		 && test -z "`cat c$${pid}_.err`"; then :; \
+	    else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+	  done; \
+	done; rm -f c$${pid}_.???; exit $$bad
+linsim$(EXEEXT): $(linsim_OBJECTS) $(linsim_DEPENDENCIES) $(EXTRA_linsim_DEPENDENCIES) 
+	@rm -f linsim$(EXEEXT)
+	$(linsim_LINK) $(linsim_OBJECTS) $(linsim_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-csv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-delay.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-filter_tables.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-filters.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-gauss_fir.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-linsim_ui.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-noise_gen.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-path.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-sim.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linsim-sound.Po at am__quote@
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+linsim-main.o: main.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-main.o -MD -MP -MF $(DEPDIR)/linsim-main.Tpo -c -o linsim-main.o `test -f 'main.cxx' || echo '$(srcdir)/'`main.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-main.Tpo $(DEPDIR)/linsim-main.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cxx' object='linsim-main.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-main.o `test -f 'main.cxx' || echo '$(srcdir)/'`main.cxx
+
+linsim-main.obj: main.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-main.obj -MD -MP -MF $(DEPDIR)/linsim-main.Tpo -c -o linsim-main.obj `if test -f 'main.cxx'; then $(CYGPATH_W) 'main.cxx'; else $(CYGPATH_W) '$(srcdir)/main.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-main.Tpo $(DEPDIR)/linsim-main.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='main.cxx' object='linsim-main.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-main.obj `if test -f 'main.cxx'; then $(CYGPATH_W) 'main.cxx'; else $(CYGPATH_W) '$(srcdir)/main.cxx'; fi`
+
+linsim-delay.o: delay.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-delay.o -MD -MP -MF $(DEPDIR)/linsim-delay.Tpo -c -o linsim-delay.o `test -f 'delay.cxx' || echo '$(srcdir)/'`delay.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-delay.Tpo $(DEPDIR)/linsim-delay.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='delay.cxx' object='linsim-delay.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-delay.o `test -f 'delay.cxx' || echo '$(srcdir)/'`delay.cxx
+
+linsim-delay.obj: delay.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-delay.obj -MD -MP -MF $(DEPDIR)/linsim-delay.Tpo -c -o linsim-delay.obj `if test -f 'delay.cxx'; then $(CYGPATH_W) 'delay.cxx'; else $(CYGPATH_W) '$(srcdir)/delay.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-delay.Tpo $(DEPDIR)/linsim-delay.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='delay.cxx' object='linsim-delay.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-delay.obj `if test -f 'delay.cxx'; then $(CYGPATH_W) 'delay.cxx'; else $(CYGPATH_W) '$(srcdir)/delay.cxx'; fi`
+
+linsim-filter_tables.o: filter_tables.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-filter_tables.o -MD -MP -MF $(DEPDIR)/linsim-filter_tables.Tpo -c -o linsim-filter_tables.o `test -f 'filter_tables.cxx' || echo '$(srcdir)/'`filter_tables.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-filter_tables.Tpo $(DEPDIR)/linsim-filter_tables.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='filter_tables.cxx' object='linsim-filter_tables.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-filter_tables.o `test -f 'filter_tables.cxx' || echo '$(srcdir)/'`filter_tables.cxx
+
+linsim-filter_tables.obj: filter_tables.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-filter_tables.obj -MD -MP -MF $(DEPDIR)/linsim-filter_tables.Tpo -c -o linsim-filter_tables.obj `if test -f 'filter_tables.cxx'; then $(CYGPATH_W) 'filter_tables.cxx'; else $(CYGPATH_W) '$(srcdir)/filter_tables.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-filter_tables.Tpo $(DEPDIR)/linsim-filter_tables.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='filter_tables.cxx' object='linsim-filter_tables.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-filter_tables.obj `if test -f 'filter_tables.cxx'; then $(CYGPATH_W) 'filter_tables.cxx'; else $(CYGPATH_W) '$(srcdir)/filter_tables.cxx'; fi`
+
+linsim-filters.o: filters.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-filters.o -MD -MP -MF $(DEPDIR)/linsim-filters.Tpo -c -o linsim-filters.o `test -f 'filters.cxx' || echo '$(srcdir)/'`filters.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-filters.Tpo $(DEPDIR)/linsim-filters.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='filters.cxx' object='linsim-filters.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-filters.o `test -f 'filters.cxx' || echo '$(srcdir)/'`filters.cxx
+
+linsim-filters.obj: filters.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-filters.obj -MD -MP -MF $(DEPDIR)/linsim-filters.Tpo -c -o linsim-filters.obj `if test -f 'filters.cxx'; then $(CYGPATH_W) 'filters.cxx'; else $(CYGPATH_W) '$(srcdir)/filters.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-filters.Tpo $(DEPDIR)/linsim-filters.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='filters.cxx' object='linsim-filters.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-filters.obj `if test -f 'filters.cxx'; then $(CYGPATH_W) 'filters.cxx'; else $(CYGPATH_W) '$(srcdir)/filters.cxx'; fi`
+
+linsim-linsim_ui.o: linsim_ui.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-linsim_ui.o -MD -MP -MF $(DEPDIR)/linsim-linsim_ui.Tpo -c -o linsim-linsim_ui.o `test -f 'linsim_ui.cxx' || echo '$(srcdir)/'`linsim_ui.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-linsim_ui.Tpo $(DEPDIR)/linsim-linsim_ui.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='linsim_ui.cxx' object='linsim-linsim_ui.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-linsim_ui.o `test -f 'linsim_ui.cxx' || echo '$(srcdir)/'`linsim_ui.cxx
+
+linsim-linsim_ui.obj: linsim_ui.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-linsim_ui.obj -MD -MP -MF $(DEPDIR)/linsim-linsim_ui.Tpo -c -o linsim-linsim_ui.obj `if test -f 'linsim_ui.cxx'; then $(CYGPATH_W) 'linsim_ui.cxx'; else $(CYGPATH_W) '$(srcdir)/linsim_ui.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-linsim_ui.Tpo $(DEPDIR)/linsim-linsim_ui.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='linsim_ui.cxx' object='linsim-linsim_ui.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-linsim_ui.obj `if test -f 'linsim_ui.cxx'; then $(CYGPATH_W) 'linsim_ui.cxx'; else $(CYGPATH_W) '$(srcdir)/linsim_ui.cxx'; fi`
+
+linsim-noise_gen.o: noise_gen.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-noise_gen.o -MD -MP -MF $(DEPDIR)/linsim-noise_gen.Tpo -c -o linsim-noise_gen.o `test -f 'noise_gen.cxx' || echo '$(srcdir)/'`noise_gen.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-noise_gen.Tpo $(DEPDIR)/linsim-noise_gen.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='noise_gen.cxx' object='linsim-noise_gen.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-noise_gen.o `test -f 'noise_gen.cxx' || echo '$(srcdir)/'`noise_gen.cxx
+
+linsim-noise_gen.obj: noise_gen.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-noise_gen.obj -MD -MP -MF $(DEPDIR)/linsim-noise_gen.Tpo -c -o linsim-noise_gen.obj `if test -f 'noise_gen.cxx'; then $(CYGPATH_W) 'noise_gen.cxx'; else $(CYGPATH_W) '$(srcdir)/noise_gen.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-noise_gen.Tpo $(DEPDIR)/linsim-noise_gen.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='noise_gen.cxx' object='linsim-noise_gen.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-noise_gen.obj `if test -f 'noise_gen.cxx'; then $(CYGPATH_W) 'noise_gen.cxx'; else $(CYGPATH_W) '$(srcdir)/noise_gen.cxx'; fi`
+
+linsim-path.o: path.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-path.o -MD -MP -MF $(DEPDIR)/linsim-path.Tpo -c -o linsim-path.o `test -f 'path.cxx' || echo '$(srcdir)/'`path.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-path.Tpo $(DEPDIR)/linsim-path.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='path.cxx' object='linsim-path.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-path.o `test -f 'path.cxx' || echo '$(srcdir)/'`path.cxx
+
+linsim-path.obj: path.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-path.obj -MD -MP -MF $(DEPDIR)/linsim-path.Tpo -c -o linsim-path.obj `if test -f 'path.cxx'; then $(CYGPATH_W) 'path.cxx'; else $(CYGPATH_W) '$(srcdir)/path.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-path.Tpo $(DEPDIR)/linsim-path.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='path.cxx' object='linsim-path.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-path.obj `if test -f 'path.cxx'; then $(CYGPATH_W) 'path.cxx'; else $(CYGPATH_W) '$(srcdir)/path.cxx'; fi`
+
+linsim-sim.o: sim.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-sim.o -MD -MP -MF $(DEPDIR)/linsim-sim.Tpo -c -o linsim-sim.o `test -f 'sim.cxx' || echo '$(srcdir)/'`sim.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-sim.Tpo $(DEPDIR)/linsim-sim.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sim.cxx' object='linsim-sim.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-sim.o `test -f 'sim.cxx' || echo '$(srcdir)/'`sim.cxx
+
+linsim-sim.obj: sim.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-sim.obj -MD -MP -MF $(DEPDIR)/linsim-sim.Tpo -c -o linsim-sim.obj `if test -f 'sim.cxx'; then $(CYGPATH_W) 'sim.cxx'; else $(CYGPATH_W) '$(srcdir)/sim.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-sim.Tpo $(DEPDIR)/linsim-sim.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sim.cxx' object='linsim-sim.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-sim.obj `if test -f 'sim.cxx'; then $(CYGPATH_W) 'sim.cxx'; else $(CYGPATH_W) '$(srcdir)/sim.cxx'; fi`
+
+linsim-sound.o: sound.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-sound.o -MD -MP -MF $(DEPDIR)/linsim-sound.Tpo -c -o linsim-sound.o `test -f 'sound.cxx' || echo '$(srcdir)/'`sound.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-sound.Tpo $(DEPDIR)/linsim-sound.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sound.cxx' object='linsim-sound.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-sound.o `test -f 'sound.cxx' || echo '$(srcdir)/'`sound.cxx
+
+linsim-sound.obj: sound.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-sound.obj -MD -MP -MF $(DEPDIR)/linsim-sound.Tpo -c -o linsim-sound.obj `if test -f 'sound.cxx'; then $(CYGPATH_W) 'sound.cxx'; else $(CYGPATH_W) '$(srcdir)/sound.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-sound.Tpo $(DEPDIR)/linsim-sound.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='sound.cxx' object='linsim-sound.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-sound.obj `if test -f 'sound.cxx'; then $(CYGPATH_W) 'sound.cxx'; else $(CYGPATH_W) '$(srcdir)/sound.cxx'; fi`
+
+linsim-gauss_fir.o: gauss_fir.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-gauss_fir.o -MD -MP -MF $(DEPDIR)/linsim-gauss_fir.Tpo -c -o linsim-gauss_fir.o `test -f 'gauss_fir.cxx' || echo '$(srcdir)/'`gauss_fir.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-gauss_fir.Tpo $(DEPDIR)/linsim-gauss_fir.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='gauss_fir.cxx' object='linsim-gauss_fir.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-gauss_fir.o `test -f 'gauss_fir.cxx' || echo '$(srcdir)/'`gauss_fir.cxx
+
+linsim-gauss_fir.obj: gauss_fir.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-gauss_fir.obj -MD -MP -MF $(DEPDIR)/linsim-gauss_fir.Tpo -c -o linsim-gauss_fir.obj `if test -f 'gauss_fir.cxx'; then $(CYGPATH_W) 'gauss_fir.cxx'; else $(CYGPATH_W) '$(srcdir)/gauss_fir.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-gauss_fir.Tpo $(DEPDIR)/linsim-gauss_fir.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='gauss_fir.cxx' object='linsim-gauss_fir.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-gauss_fir.obj `if test -f 'gauss_fir.cxx'; then $(CYGPATH_W) 'gauss_fir.cxx'; else $(CYGPATH_W) '$(srcdir)/gauss_fir.cxx'; fi`
+
+linsim-csv.o: csv.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-csv.o -MD -MP -MF $(DEPDIR)/linsim-csv.Tpo -c -o linsim-csv.o `test -f 'csv.cxx' || echo '$(srcdir)/'`csv.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-csv.Tpo $(DEPDIR)/linsim-csv.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='csv.cxx' object='linsim-csv.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-csv.o `test -f 'csv.cxx' || echo '$(srcdir)/'`csv.cxx
+
+linsim-csv.obj: csv.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -MT linsim-csv.obj -MD -MP -MF $(DEPDIR)/linsim-csv.Tpo -c -o linsim-csv.obj `if test -f 'csv.cxx'; then $(CYGPATH_W) 'csv.cxx'; else $(CYGPATH_W) '$(srcdir)/csv.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/linsim-csv.Tpo $(DEPDIR)/linsim-csv.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='csv.cxx' object='linsim-csv.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(linsim_CXXFLAGS) $(CXXFLAGS) -c -o linsim-csv.obj `if test -f 'csv.cxx'; then $(CYGPATH_W) 'csv.cxx'; else $(CYGPATH_W) '$(srcdir)/csv.cxx'; fi`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) config.h
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-hdr distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am: installcheck-binPROGRAMS
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-local
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-local ctags distclean distclean-compile \
+	distclean-generic distclean-hdr distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am \
+	install-data-local install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installcheck-binPROGRAMS installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-binPROGRAMS \
+	uninstall-local
+
+
+.EXPORT_ALL_VARIABLES: nsisinst appbundle
+
+ at HAVE_WINDRES_TRUE@@MINGW32_TRUE at .rc.o:
+ at HAVE_WINDRES_TRUE@@MINGW32_TRUE@	$(WINDRES) -I$(srcdir)/include -I$(srcdir)/../data/win32 $< -O coff $@
+
+install-data-local:
+	if test -f $(srcdir)/../data/linsim.xpm; then \
+	    $(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \
+	    $(INSTALL_DATA) $(srcdir)/../data/linsim.xpm $(DESTDIR)/$(datadir)/pixmaps; \
+	fi
+	if test -f $(srcdir)/../data/linsim.desktop; then \
+	    $(mkinstalldirs) $(DESTDIR)/$(datadir)/applications; \
+	    $(INSTALL_DATA) $(srcdir)/../data/linsim.desktop $(DESTDIR)/$(datadir)/applications; \
+	fi
+
+uninstall-local:
+	rm -f $(DESTDIR)/$(datadir)/pixmaps/linsim.xpm
+	rm -f $(DESTDIR)/$(datadir)/applications/linsim.desktop
+
+ at HAVE_FLUID_TRUE@flgen: $(FL_SRC)
+ at HAVE_FLUID_TRUE@	(cd $(srcdir)/include; \
+ at HAVE_FLUID_TRUE@	for f in $(FL_SRC); do \
+ at HAVE_FLUID_TRUE@	    c=$${f%.fl}.cxx; \
+ at HAVE_FLUID_TRUE@		h=$${f%.fl}.h; \
+ at HAVE_FLUID_TRUE@		h=$${h##*/}; \
+ at HAVE_FLUID_TRUE@	    $(FLUID) -c -o ../$$c -h $$h ../$$f; \
+ at HAVE_FLUID_TRUE@	done)
+
+ at HAVE_NSIS_TRUE@nsisinst: $(bin_PROGRAMS)
+ at HAVE_NSIS_TRUE@	sh $(srcdir)/../scripts/mknsisinst.sh "$(srcdir)/../data" .
+
+ at DARWIN_TRUE@appbundle: $(bin_PROGRAMS)
+ at DARWIN_TRUE@	sh $(srcdir)/../scripts/mkappbundle.sh "$(srcdir)/../data" .
+
+clean-local:
+	-rm -rf $(CLEAN_LOCAL)
+
+# 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/src/config.h.in b/src/config.h.in
new file mode 100644
index 0000000..3bd9481
--- /dev/null
+++ b/src/config.h.in
@@ -0,0 +1,425 @@
+/* src/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Build platform */
+#undef BUILD_BUILD_PLATFORM
+
+/* Compiler */
+#undef BUILD_COMPILER
+
+/* Configure arguments */
+#undef BUILD_CONFIGURE_ARGS
+
+/* Build date */
+#undef BUILD_DATE
+
+/* Build host */
+#undef BUILD_HOST
+
+/* Host platform */
+#undef BUILD_HOST_PLATFORM
+
+/* Target platform */
+#undef BUILD_TARGET_PLATFORM
+
+/* Build user */
+#undef BUILD_USER
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* FLTK version */
+#undef FLTK_BUILD_VERSION
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define to 1 if we have clock_gettime */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 0 if not using dbg::stack */
+#undef HAVE_DBG_STACK
+
+/* Define to 1 if you have the <dev/ppbus/ppi.h> header file. */
+#undef HAVE_DEV_PPBUS_PPI_H
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if we have dlopen */
+#undef HAVE_DLOPEN
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#undef HAVE_EXECINFO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `gethostbyname' function. */
+#undef HAVE_GETHOSTBYNAME
+
+/* Define to 1 if you have the `gmtime_r' function. */
+#undef HAVE_GMTIME_R
+
+/* Define to 1 if you have the `hstrerror' function. */
+#undef HAVE_HSTRERROR
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the <linux/ppdev.h> header file. */
+#undef HAVE_LINUX_PPDEV_H
+
+/* Define to 1 if you have the `localtime_r' function. */
+#undef HAVE_LOCALTIME_R
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `mkdir' function. */
+#undef HAVE_MKDIR
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if we have sem_timedwait */
+#undef HAVE_SEM_TIMEDWAIT
+
+/* Define to 1 if we have sem_unlink */
+#undef HAVE_SEM_UNLINK
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the `socket' function. */
+#undef HAVE_SOCKET
+
+/* Define to 1 if you have the `socketpair' function. */
+#undef HAVE_SOCKETPAIR
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strcasestr' function. */
+#undef HAVE_STRCASESTR
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strlcpy' function. */
+#undef HAVE_STRLCPY
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/utsname.h> header file. */
+#undef HAVE_SYS_UTSNAME_H
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
+/* Define to 1 if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* FLTK API major version */
+#undef LINSIM_FLTK_API_MAJOR
+
+/* FLTK API minor version */
+#undef LINSIM_FLTK_API_MINOR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* samplerate version */
+#undef SAMPLERATE_BUILD_VERSION
+
+/* Define to the type of arg 1 for `select'. */
+#undef SELECT_TYPE_ARG1
+
+/* Define to the type of args 2, 3 and 4 for `select'. */
+#undef SELECT_TYPE_ARG234
+
+/* Define to the type of arg 5 for `select'. */
+#undef SELECT_TYPE_ARG5
+
+/* sndfile version */
+#undef SNDFILE_BUILD_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Define to 1 if we are using samplerate */
+#undef USE_SAMPLERATE
+
+/* Define to 1 if we are using sndfile */
+#undef USE_SNDFILE
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define to 1 if we are using x */
+#undef USE_X
+
+/* Version number of package */
+#undef VERSION
+
+/* x version */
+#undef X_BUILD_VERSION
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT64_T
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT8_T
+
+/* Define to 1 if we are building on mingw */
+#undef __WOE32__
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to the type of a signed integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int16_t
+
+/* Define to the type of a signed integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int32_t
+
+/* Define to the type of a signed integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int64_t
+
+/* Define to the type of a signed integer type of width exactly 8 bits if such
+   a type exists and the standard includes do not define it. */
+#undef int8_t
+
+/* linsim compiler flags */
+#undef linsim_BUILD_CXXFLAGS
+
+/* linsim linker flags */
+#undef linsim_BUILD_LDFLAGS
+
+/* version string */
+#undef linsim_VERSION
+
+/* major version number */
+#undef linsim_VERSION_MAJOR
+
+/* minor version number */
+#undef linsim_VERSION_MINOR
+
+/* patch/alpha version string */
+#undef linsim_VERSION_PATCH
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint16_t
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint32_t
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint64_t
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint8_t
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+#undef volatile
diff --git a/src/csv.cxx b/src/csv.cxx
new file mode 100644
index 0000000..f09fb4a
--- /dev/null
+++ b/src/csv.cxx
@@ -0,0 +1,450 @@
+// =====================================================================
+//
+// csvdb.cxx
+//
+// comma separated value database file support for linsim
+//
+// Copyright 2013, Dave Freese, W1HKJ
+//
+// =====================================================================
+
+#include "csv.h"
+
+csvRecord defaults[] = {
+csvRecord("AWGN S/N",
+"1", "10",  
+"0",        "0",  "0",  
+"0",  "0",  "0",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("CCIR 520-2 (Doppler Fading)",
+"0",  "0",  
+"1",      "0.2", "10",  
+"1","0.5","0.2", "5",  "0",  "0",  "0",  "0"),
+csvRecord("CCIR 520-2 (Flutter Fading)",
+"0",  "0",  
+"1",       "10", "0",  
+"1","0.5", "10", "0",  "0",  "0",  "0",  "0"),
+csvRecord("CCIR 520-2 (Good Conditions)",
+"0",  "0",  
+"1",      "0.1", "0",  
+"1","0.5","0.1", "0",  "0",  "0",  "0",  "0"),
+csvRecord("CCIR-520-2 (Moderate Conditions)",
+"0",  "0",  
+"1",      "0.5",  "0",  
+"1",  "1","0.5",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("CCIR-520-2 (Poor Conditions)",
+"0",  "0",  
+"1",      "0.5",  "0",  
+"1",  "2","0.5",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("Direct Path",
+"0", "10",  
+"0",        "0",  "0",  
+"0",  "0",  "0",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("Frequency Shifter",
+"0",  "0",  
+"1",        "0","500",  
+"0",  "0",  "0",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("High-Latitude Disturbed",
+"0",  "0",  
+"1",       "30",  "0",  
+"1",  "7", "30",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("High-Latitude Moderate",
+"0",  "0",  
+"1",       "10",  "0",  
+"1",  "3", "10",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("High-Latitude Quiet",
+"0",  "0",  
+"1",      "0.5",  "0",  
+"1",  "1","0.5",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("Mid-Latitude Disturbed",
+"0",  "0",  
+"1",        "1",  "0",  
+"1",  "2",  "1",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("Mid-Latitude Disturbed NVIS",
+"0",  "0",  
+"1",        "1",  "0",  
+"1",  "7",  "1",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("Mid-Latitude Moderate",
+"0",  "0",  
+"1",      "0.5",  "0",  
+"1",  "1","0.5",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("Mid-Latitude Quiet",
+"0",  "0", 
+ "1",      "0.5",  "0",  
+ "1","0.5","0.5",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("Low-Latitude Disturbed",
+"0",  "0",  
+"1",       "10",  "0",  
+"1",  "6", "10",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("Low-Latitude Moderate",
+"0",  "0",  
+"1",      "1.5",  "0",  
+"1",  "2","1.5",  "0",  "0",  "0",  "0",  "0"),
+csvRecord("Low-Latitude Quiet",
+"0",  "0",  
+"1",      "0.5",  "0",  
+"1","0.5","0.5",  "0",  "0",  "0",  "0",  "0") };
+
+extern string HomeDir;
+
+void csvdb::load_defaults()
+{
+	csvRecord rec;
+
+	dbrecs.clear();
+
+	for (size_t n = 0; n < sizeof(defaults) / sizeof(csvRecord); n++)
+		dbrecs.push_back(defaults[n]);
+	string csv_fname = HomeDir;
+	csv_fname.append("linsim.simulations.csv");
+	filename(csv_fname);
+
+}
+
+enum FIELDS {
+TITLE, AWGN, SN,
+P1, SPREAD_1, OFFSET_1,
+P2, DELAY_2, SPREAD_2, OFFSET_2,
+P3, DELAY_3, SPREAD_3, OFFSET_3
+};
+
+static int field_position[OFFSET_3];
+
+//szFields on 10 char spacing
+static string szFields = "\
+TITLE     AWGN      S/N       \
+P1        SPREAD_1  OFFSET_1  \
+P2        DELAY_2   SPREAD_2  OFFSET_2  \
+P3        DELAY_3   SPREAD_3  OFFSET_3  ";
+
+const char *csvdb::csvFields = "\
+TITLE,AWGN,S/N,P1,SPREAD_1,OFFSET_1,P2,DELAY_2,SPREAD_2,OFFSET_2,P3,DELAY_3,SPREAD_3,OFFSET_3";
+
+bool csvdb::mapheader(string header)
+{
+	bool ok = false;
+	size_t p;
+	string hfield;
+	for (int i = 0; i < OFFSET_3; field_position[i++] = -1);
+	for (int i = 0; i < OFFSET_3; i++) {
+		if (header.empty()) break;
+		field( header, hfield);
+		p = szFields.find(hfield);
+		if (p != string::npos) {
+			field_position[i] = p/10;
+			ok = true;
+		}
+	}
+	return ok;
+}
+
+//----------------------------------------------------------------------
+// split separates a comma delimited string into the record components
+// string may be simple comma separated, quoted-comma delimited or a
+// mix of the two.  The csv file may be opened by a 3rd party program
+// such as gnumeric or Excel and then resaved as a csv file.
+// field may appear as:
+// field,    first field unquoted
+// ,field    last field unquoted
+// ,"field a b c",
+// ,"field ""a"" b c",
+// ,"field a, b, c",
+// "field",  first field quoted
+// ,"field"   last field quoted
+//
+// field extracts the leading field in the referenced string
+// the leading field is removed from the string
+//----------------------------------------------------------------------
+void csvdb::field(string &s, string &fld)
+{
+	// empty reference string ==> empty field
+	if (s.empty()) {
+		fld.clear();
+		return;
+	}
+	size_t p;
+	// remove leading comma
+	if (s[0] == ',') {
+		s.erase(0, 1);
+	}
+	if (s[0] == '"') {
+	// field is quoted
+		s.erase(0, 1);
+		p = s.find("\","); // find end of field
+		if (p == string::npos) {
+			p = s.find("\""); // possibly last record
+			if ( p != string::npos) {
+				fld = s.substr(0, p);
+				s.clear();
+				return;
+			} else {
+				s.clear(); // error in reference line
+				fld.clear();
+				return;
+			}
+		}
+		if (p == 0) {
+			fld.clear();
+			s.erase(0, 1);
+		} else {
+			fld = s.substr(0, p);
+			s.erase(0, p+1);
+		}
+	} else {
+	// field is only comma delimited
+		if (s[0] == ',') {
+			fld.clear();
+		} else {
+			p = s.find(",");
+			if (p == string::npos) {
+				fld = s;
+				s.clear();
+			} else {
+				fld = s.substr(0, p);
+				s.erase(0, p);
+			}
+		}
+	}
+	// change double quotes to single
+	while ((p = fld.find("\"\"")) != string::npos)
+		fld.erase(p, 1);
+}
+
+bool csvdb::split(string s, csvRecord &rec)
+{
+	clearrec(rec);
+
+	if (s[0] == ',')
+		s.insert(0,","); // first field is empty !
+
+	for (int i = 0; i < OFFSET_3; i++) {
+		switch (field_position[i]) {
+			case -1 : break;
+			case TITLE :		field(s, rec.title); break;
+			case AWGN :			field(s, rec.awgn); break;
+			case SN :			field(s, rec.sn); break;
+			case P1 :			field(s, rec.p0); break;
+			case SPREAD_1 :		field(s, rec.spread_0); break;
+			case OFFSET_1 :		field(s, rec.offset_0); break;
+			case P2 :			field(s, rec.p1); break;
+			case DELAY_2 :		field(s, rec.delay_1); break;
+			case SPREAD_2 :		field(s, rec.spread_1); break;
+			case OFFSET_2 :		field(s, rec.offset_1); break;
+			case P3 :			field(s, rec.p2); break;
+			case DELAY_3 :		field(s, rec.delay_2); break;
+			case SPREAD_3 :		field(s, rec.spread_2); break;
+			case OFFSET_3 :		field(s, rec.offset_2); break;
+		}
+	}
+	if (rec.awgn.empty() && rec.p0.empty() && rec.p1.empty() && rec.p2.empty())
+		return false;
+	if (rec.title.empty())
+		rec.title.assign("unnamed");
+	return true;
+}
+
+int csvdb::load()
+{
+#define LINESIZE 1024
+	char buff[LINESIZE + 1];
+	fstream dbfile(dbfilename.c_str(), ios::in | ios::binary);
+	if (!dbfile) {
+		load_defaults();
+		return 0;
+	}
+
+	csvRecord rec;
+
+	dbrecs.clear();
+
+// read & map header line
+	memset(buff, 0, LINESIZE + 1);
+	dbfile.getline(buff, LINESIZE);
+	if (!mapheader(buff)) return -1;
+
+// header passes test, read rest of file
+	string sbuff;
+	while (dbfile) {
+		memset(buff, 0, LINESIZE + 1);
+		dbfile.getline(buff, LINESIZE);
+		if (dbfile && strlen(buff)) {
+			sbuff = buff;
+			if (split(buff, rec)) dbrecs.push_back(rec);
+		}
+	}
+	dbfile.close();
+	return 0;
+}
+
+string csvdb::trim(string s)
+{
+	string trimmed;
+	trimmed.assign(s);
+	while (trimmed.length() && trimmed[0] == ' ') trimmed.erase(0);
+	while (trimmed.length() && trimmed[trimmed.length()-1] == ' ')
+		trimmed.erase(trimmed.length() - 1);
+	return trimmed;
+}
+
+string csvdb::delimit(string s)
+{
+	static string delimited;
+	bool quoted = false;
+	delimited.assign(trim(s));
+	size_t p = delimited.find("\"");
+	while (p != string::npos) {
+		delimited.insert(p, "\"");
+		quoted = true;
+		p = delimited.find("\"", p+2);
+	}
+	if (delimited.find(" ") != string::npos ||
+		delimited.find(",") != string::npos ||
+		delimited.find(";") != string::npos ||
+		delimited.find("'") != string::npos) quoted = true;
+	if (quoted) {
+		delimited.insert(0, "\"");
+		delimited.append("\"");
+	}
+	return delimited;
+}
+
+static int compfunc(const void *r1, const void *r2) {
+	csvRecord * p0 = (csvRecord *)r1;
+	csvRecord * p1 = (csvRecord *)r2;
+	return (p0->title).compare(p1->title);
+}
+
+//----------------------------------------------------------------------
+// join combines the separate elements of a record into a comma
+// separated string.  Quotes are used to delimit a field if that field
+// contains an embedded comma or a ".  Quotes within a field are saved
+// as a double quote.  All fields which contain white space including the
+// quote, space, comma etc are quoted.  Trailing and leading spaces are
+// removed to conserve file size
+//----------------------------------------------------------------------
+void csvdb::join(csvRecord &rec, string &str)
+{
+	str.assign(delimit(rec.title)).append(",");
+	str.append(delimit(rec.awgn)).append(",");
+	str.append(delimit(rec.sn)).append(",");
+	str.append(delimit(rec.p0)).append(",");
+	str.append(delimit(rec.spread_0)).append(",");
+	str.append(delimit(rec.offset_0)).append(",");
+	str.append(delimit(rec.p1)).append(",");
+	str.append(delimit(rec.delay_1)).append(",");
+	str.append(delimit(rec.spread_1)).append(",");
+	str.append(delimit(rec.offset_1)).append(",");
+	str.append(delimit(rec.p2)).append(",");
+	str.append(delimit(rec.delay_2)).append(",");
+	str.append(delimit(rec.spread_2)).append(",");
+	str.append(delimit(rec.offset_2)).append(",");
+}
+
+void csvdb::sort()
+{
+	qsort ( &(dbrecs[0]), dbrecs.size(), sizeof(csvRecord), compfunc);
+}
+
+int csvdb::save()
+{
+	fstream dbfile(dbfilename.c_str(), ios::out | ios::binary);
+	if (!dbfile) return -1;
+
+	sort();
+
+// csv file header line
+	dbfile << csvFields << "\n";
+// records
+	string line;
+	for (size_t n = 0; n < dbrecs.size(); n++) {
+		join(dbrecs[n], line);
+		dbfile << line << "\n";
+		line.clear();
+	}
+
+	dbfile.close();
+
+	return 0;
+}
+
+void csvdb::clearrec(csvRecord &rec)
+{
+	rec.title.clear();
+	rec.awgn.clear();
+	rec.sn.clear();
+	rec.p0.clear();
+	rec.spread_0.clear();
+	rec.offset_0.clear();
+	rec.p1.clear();
+	rec.delay_1.clear();
+	rec.spread_1.clear();
+	rec.offset_1.clear();
+	rec.p2.clear();
+	rec.delay_2.clear();
+	rec.spread_2.clear();
+	rec.offset_2.clear();
+}
+
+int csvdb::get(size_t n, csvRecord &rec)
+{
+	rec.title.clear();
+	rec.awgn.clear();
+	rec.sn.clear();
+	rec.p0.clear();
+	rec.spread_0.clear();
+	rec.offset_0.clear();
+	rec.p1.clear();
+	rec.delay_1.clear();
+	rec.spread_1.clear();
+	rec.offset_1.clear();
+	rec.p2.clear();
+	rec.delay_2.clear();
+	rec.spread_2.clear();
+	rec.offset_2.clear();
+
+	if (n < 0 || n >= dbrecs.size()) return -1;
+
+	if (!dbrecs.size()) return -2;
+
+	rec = dbrecs[n];
+
+	cur_recnbr = n;
+
+	return 0;
+}
+
+
+int csvdb::put(size_t recnbr, csvRecord &rec)
+{
+	dbrecs[recnbr] = rec;
+	return 0;
+}
+
+
+int csvdb::add(csvRecord &rec)
+{
+	dbrecs.push_back(rec);
+	return 0;
+}
+
+
+int csvdb::erase(size_t n)
+{
+	csvRecord rec;
+	get(n, rec);
+	vector<csvRecord>::iterator p = dbrecs.begin();
+	while (p != dbrecs.end()) {
+		if (p->title == rec.title) {
+			dbrecs.erase(p);
+			return 0;
+		}
+		p++;
+	}
+	return 1;
+}
+
+void csvdb::printrec(int n)
+{
+	string srec;
+	join(dbrecs[n], srec);
+	printf("%s\n", srec.c_str());
+}
diff --git a/src/delay.cxx b/src/delay.cxx
new file mode 100644
index 0000000..afe5892
--- /dev/null
+++ b/src/delay.cxx
@@ -0,0 +1,151 @@
+// ---------------------------------------------------------------------
+// Delay.cpp: implementation of the CDelay class.
+//   ( also performs Hilbert Real to complex I/Q 3KHz filtering )
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+//
+// ---------------------------------------------------------------------
+
+// pathsim code
+
+#include <stdio.h>
+
+#include "delay.h"
+#include "filter_tables.h"
+
+#define BLOCKSIZE 2048
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CDelay::CDelay()
+{
+	samplerate = 8000;
+	m_Inptr = 0;
+	m_T1ptr = 0;
+	m_T2ptr = 0;
+	max_delay = (int)(50 * samplerate / 1000.0);
+	buf_size = BLOCKSIZE + max_delay;
+	m_pDelayLine = new cmplx[buf_size];
+	m_pQue = new cmplx[HILBPFIR_LENGTH];
+}
+
+CDelay::~CDelay()
+{
+	if(m_pDelayLine)
+		delete m_pDelayLine;
+	if(m_pQue)
+		delete m_pQue;
+}
+
+void CDelay::SampleRate(double sr)
+{
+	samplerate = sr;
+	if (m_pDelayLine) delete m_pDelayLine;
+	if (m_pQue) delete m_pQue;
+	m_Inptr = 0;
+	m_T1ptr = 0;
+	m_T2ptr = 0;
+	max_delay = 50 * samplerate / 1000;
+	buf_size = BLOCKSIZE + max_delay;
+	m_pDelayLine = new cmplx[buf_size];
+	m_pQue = new cmplx[HILBPFIR_LENGTH];
+}
+
+//////////////////////////////////////////////////////////////////////
+//  Set delay times
+//////////////////////////////////////////////////////////////////////
+void CDelay::SetDelays( double t1, double t2)	//delays in msecs
+{
+	int i;
+	for (i = 0; i < HILBPFIR_LENGTH; i++) {
+		m_pQue[i] = cmplx(0,0);
+	}
+	for (i = 0; i < buf_size; i++) {
+		m_pDelayLine[i] = cmplx(0,0);
+	}
+	m_Inptr = buf_size - 1;
+	m_FirState = HILBPFIR_LENGTH-1;
+
+	int delay1 = (int)(t1 * samplerate / 1000.0);
+	int delay2 = (int)(t2 * samplerate / 1000.0);
+
+	if (delay1 > max_delay) delay1 = max_delay;
+	m_T1ptr = buf_size - delay1 - 1;
+	if (m_T1ptr < 1) m_T1ptr = 1;
+
+	if (delay2 > max_delay) delay2 = max_delay;
+	m_T2ptr = buf_size - delay2 - 1;
+	if (m_T1ptr < 1) m_T1ptr = 1;
+}
+
+//////////////////////////////////////////////////////////////////////
+//  Uses pointers to create variable delays
+//////////////////////////////////////////////////////////////////////
+void CDelay::CreateDelays( cmplx* inbuf, bool bt1, cmplx* t1buf, bool bt2, cmplx* t2buf )
+{
+	int i;
+	if (!bt1 && !bt2) return;
+	for (i = 0; i < BLOCKSIZE; i++) {
+		m_pDelayLine[m_Inptr++] = inbuf[i]; // copy new data from inbuf into delay buffer
+		if( m_Inptr >= buf_size ) m_Inptr = 0;
+		if (bt1) {
+			t1buf[i] = m_pDelayLine[m_T1ptr++];
+			if( m_T1ptr >= buf_size ) m_T1ptr = 0;
+		}
+		if (bt2) {
+			t2buf[i] = m_pDelayLine[m_T2ptr++];
+			if (m_T2ptr >= buf_size ) m_T2ptr = 0;
+		}
+	}
+}
+
+
+//////////////////////////////////////////////////////////////////////
+// Hilbert 3KHz BP filters.  Real input and complex I/Q output
+//   This FIR bandwidth limits the real input as well as creates a
+//   complex I/Q output signal for the rest of the processing chain.
+//////////////////////////////////////////////////////////////////////
+
+void CDelay::CalcBPFilter(double* pIn, cmplx* pOut)
+{
+	cmplx acc;
+	const double* IKptr;
+	const double* QKptr;
+	cmplx* Firptr;
+	int i, j;
+
+	for (i = 0; i < BLOCKSIZE; i++) {
+		m_pQue[m_FirState].x = pIn[i];	//place real values in circular Queue
+		m_pQue[m_FirState].y = pIn[i];
+		Firptr = m_pQue;
+		IKptr = IHilbertBPFirCoef+HILBPFIR_LENGTH-m_FirState;
+		QKptr = QHilbertBPFirCoef+HILBPFIR_LENGTH-m_FirState;
+		acc.x = 0.0;
+		acc.y = 0.0;
+		for(j=0; j<	HILBPFIR_LENGTH;j++) {
+			acc.x += ( (Firptr->x)*(*IKptr++) );
+			acc.y += ( (Firptr++->y)*(*QKptr++) );
+		}
+		pOut[i].x = acc.x;
+		pOut[i].y = acc.y;
+		if( --m_FirState < 0) m_FirState = HILBPFIR_LENGTH-1;
+	}
+}
+
diff --git a/src/filter_tables.cxx b/src/filter_tables.cxx
new file mode 100644
index 0000000..a4833fe
--- /dev/null
+++ b/src/filter_tables.cxx
@@ -0,0 +1,289 @@
+// ---------------------------------------------------------------------
+// Copyright  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#include "filter_tables.h"
+#include "filters.h"
+
+double IHilbertBPFirCoef[HILBPFIR_LENGTH*2];
+double QHilbertBPFirCoef[HILBPFIR_LENGTH*2];
+
+// create band pass I/Q impulse responses based on sampling rate
+void init_BPFir(double sr)
+{
+	double flow = 200;
+	double fhigh = 3600;
+	C_FIR_filter filter;
+
+	filter.init_hilbert(HILBPFIR_LENGTH, 1, flow/sr, fhigh/sr);
+//	filter.init_hilbert(HILBPFIR_LENGTH, 1, 0, 1700.0/sr);
+	double *ifilter = filter.Ivals();
+	double *qfilter = filter.Qvals();
+
+	for (int i = 0; i < HILBPFIR_LENGTH; i++) {
+		IHilbertBPFirCoef[i] = ifilter[i];
+		IHilbertBPFirCoef[HILBPFIR_LENGTH * 2 - i - 1] = IHilbertBPFirCoef[i];
+		QHilbertBPFirCoef[i] = qfilter[i];
+		QHilbertBPFirCoef[HILBPFIR_LENGTH * 2 - i - 1] = -QHilbertBPFirCoef[i];
+	}
+}
+
+/* these are the original PathSim precomputed impulse responses
+const double IHilbertBPFir8000[HILBPFIR_LENGTH*2] = {
+	0.0015461946,
+	0.00096844503,
+	0.003185104,
+	-0.00045313707,
+	0.0040178359,
+	-0.0010694961,
+	0.0046038332,
+	-0.0012170725,
+	0.0022920463,
+	-3.5363822e-017,
+	-0.0033438091,
+	0.0022776352,
+	-0.012046394,
+	0.0039531812,
+	-0.021553635,
+	0.00201261,
+	-0.028298385,
+	-0.0070138471,
+	-0.02851387,
+	-0.025490301,
+	-0.019959804,
+	-0.053128174,
+	-0.0032769397,
+	-0.086207816,
+	0.017691961,
+	-0.11813811,
+	0.036951781,
+	-0.14135815,
+	0.048464111,
+	0.85015276,
+	0.048464111,
+	-0.14135815,
+	0.036951781,
+	-0.11813811,
+	0.017691961,
+	-0.086207816,
+	-0.0032769397,
+	-0.053128174,
+	-0.019959804,
+	-0.025490301,
+	-0.02851387,
+	-0.0070138471,
+	-0.028298385,
+	0.00201261,
+	-0.021553635,
+	0.0039531812,
+	-0.012046394,
+	0.0022776352,
+	-0.0033438091,
+	-3.5363822e-017,
+	0.0022920463,
+	-0.0012170725,
+	0.0046038332,
+	-0.0010694961,
+	0.0040178359,
+	-0.00045313707,
+	0.003185104,
+	0.00096844503,
+	0.0015461946,
+//Duplicate coefficients again for flat wrap around FIR
+	0.0015461946,
+	0.00096844503,
+	0.003185104,
+	-0.00045313707,
+	0.0040178359,
+	-0.0010694961,
+	0.0046038332,
+	-0.0012170725,
+	0.0022920463,
+	-3.5363822e-017,
+	-0.0033438091,
+	0.0022776352,
+	-0.012046394,
+	0.0039531812,
+	-0.021553635,
+	0.00201261,
+	-0.028298385,
+	-0.0070138471,
+	-0.02851387,
+	-0.025490301,
+	-0.019959804,
+	-0.053128174,
+	-0.0032769397,
+	-0.086207816,
+	0.017691961,
+	-0.11813811,
+	0.036951781,
+	-0.14135815,
+	0.048464111,
+	0.85015276,
+	0.048464111,
+	-0.14135815,
+	0.036951781,
+	-0.11813811,
+	0.017691961,
+	-0.086207816,
+	-0.0032769397,
+	-0.053128174,
+	-0.019959804,
+	-0.025490301,
+	-0.02851387,
+	-0.0070138471,
+	-0.028298385,
+	0.00201261,
+	-0.021553635,
+	0.0039531812,
+	-0.012046394,
+	0.0022776352,
+	-0.0033438091,
+	-3.5363822e-017,
+	0.0022920463,
+	-0.0012170725,
+	0.0046038332,
+	-0.0010694961,
+	0.0040178359,
+	-0.00045313707,
+	0.003185104,
+	0.00096844503,
+	0.0015461946
+};
+
+const double QHilbertBPFir8000[HILBPFIR_LENGTH*2] = {
+	0.0013205749,
+	-0.0013329502,
+	0.0019518342,
+	0.00088933157,
+	0.0016642421,
+	0.0032915705,
+	0.0011052826,
+	0.0076842931,
+	0.00018038796,
+	0.012029604,
+	0.00026316348,
+	0.014380423,
+	0.0028920833,
+	0.012166641,
+	0.0089278078,
+	0.0039499695,
+	0.017341273,
+	-0.0096537323,
+	0.024353146,
+	-0.025490301,
+	0.023369928,
+	-0.038599878,
+	0.0053474796,
+	-0.043925076,
+	-0.042712172,
+	-0.038385399,
+	-0.15391524,
+	-0.022388932,
+	-0.61579492,
+	         0,
+	0.61579492,
+	0.022388932,
+	0.15391524,
+	0.038385399,
+	0.042712172,
+	0.043925076,
+	-0.0053474796,
+	0.038599878,
+	-0.023369928,
+	0.025490301,
+	-0.024353146,
+	0.0096537323,
+	-0.017341273,
+	-0.0039499695,
+	-0.0089278078,
+	-0.012166641,
+	-0.0028920833,
+	-0.014380423,
+	-0.00026316348,
+	-0.012029604,
+	-0.00018038796,
+	-0.0076842931,
+	-0.0011052826,
+	-0.0032915705,
+	-0.0016642421,
+	-0.00088933157,
+	-0.0019518342,
+	0.0013329502,
+	-0.0013205749,
+//Duplicate coefficients again for flat wrap around FIR
+	0.0013205749,
+	-0.0013329502,
+	0.0019518342,
+	0.00088933157,
+	0.0016642421,
+	0.0032915705,
+	0.0011052826,
+	0.0076842931,
+	0.00018038796,
+	0.012029604,
+	0.00026316348,
+	0.014380423,
+	0.0028920833,
+	0.012166641,
+	0.0089278078,
+	0.0039499695,
+	0.017341273,
+	-0.0096537323,
+	0.024353146,
+	-0.025490301,
+	0.023369928,
+	-0.038599878,
+	0.0053474796,
+	-0.043925076,
+	-0.042712172,
+	-0.038385399,
+	-0.15391524,
+	-0.022388932,
+	-0.61579492,
+	         0,
+	0.61579492,
+	0.022388932,
+	0.15391524,
+	0.038385399,
+	0.042712172,
+	0.043925076,
+	-0.0053474796,
+	0.038599878,
+	-0.023369928,
+	0.025490301,
+	-0.024353146,
+	0.0096537323,
+	-0.017341273,
+	-0.0039499695,
+	-0.0089278078,
+	-0.012166641,
+	-0.0028920833,
+	-0.014380423,
+	-0.00026316348,
+	-0.012029604,
+	-0.00018038796,
+	-0.0076842931,
+	-0.0011052826,
+	-0.0032915705,
+	-0.0016642421,
+	-0.00088933157,
+	-0.0019518342,
+	0.0013329502,
+	-0.0013205749
+};
+*/
diff --git a/src/filters.cxx b/src/filters.cxx
new file mode 100644
index 0000000..e4cafdb
--- /dev/null
+++ b/src/filters.cxx
@@ -0,0 +1,554 @@
+// ---------------------------------------------------------------------
+// Copyright  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "filters.h"
+
+#include <iostream>
+
+
+//=====================================================================
+// C_FIR_filter
+//
+//   a class of Finite Impulse Response (FIR) filters with
+//   decimate in time capability
+//
+//=====================================================================
+
+C_FIR_filter::C_FIR_filter () {
+	pointer = counter = length = 0;
+	decimateratio = 0;
+	ifilter = qfilter = (double *)0;
+	ffreq = 0.0;
+}
+
+C_FIR_filter::~C_FIR_filter() {
+	if (ifilter) delete [] ifilter;
+	if (qfilter) delete [] qfilter;
+}
+
+void C_FIR_filter::init(int len, int dec, double *itaps, double *qtaps) {
+	length = len;
+	decimateratio = dec;
+	if (ifilter) {
+		delete [] ifilter;
+		ifilter = (double *)0;
+	}
+	if (qfilter) {
+		delete [] qfilter;
+		qfilter = (double *)0;
+	}
+
+	for (int i = 0; i < FIRBufferLen; i++)
+		ibuffer[i] = qbuffer[i] = 0.0;
+
+	if (itaps) {
+            ifilter = new double[len];
+		for (int i = 0; i < len; i++) ifilter[i] = itaps[i];
+	}
+	if (qtaps) {
+		qfilter = new double[len];
+		for (int i = 0; i < len; i++) qfilter[i] = qtaps[i];
+	}
+
+	pointer = len;
+	counter = 0;
+}
+
+
+//=====================================================================
+// Create a band pass FIR filter with 6 dB corner frequencies
+// of 'f1' and 'f2'. (0 <= f1 < f2 <= 0.5)
+//=====================================================================
+
+double * C_FIR_filter::bp_FIR(int len, int hilbert, double f1, double f2)
+{
+	double *fir;
+	double t, h, x;
+
+	fir = new double[len];
+
+	for (int i = 0; i < len; i++) {
+		t = i - (len - 1.0) / 2.0;
+		h = i * (1.0 / (len - 1.0));
+
+		if (!hilbert) {
+			x = (2 * f2 * sinc(2 * f2 * t) -
+			     2 * f1 * sinc(2 * f1 * t)) * hanning(h);// blackman(h);//hamming(h);
+		} else {
+			x = (2 * f2 * cosc(2 * f2 * t) -
+			     2 * f1 * cosc(2 * f1 * t)) * hanning(h);//blackman(h);//hamming(h);
+// The actual filter code assumes the impulse response
+// is in time reversed order. This will be anti-
+// symmetric so the minus sign handles that for us.
+			x = -x;
+		}
+
+		fir[i] = x;
+	}
+
+	return fir;
+}
+
+//=====================================================================
+// Filter will be a lowpass with
+// length = len
+// decimation = dec
+// 0.5 frequency point = freq
+//=====================================================================
+
+void C_FIR_filter::init_lowpass (int len, int dec, double freq) {
+	double *fi = bp_FIR(len, 0, 0.0, freq);
+	ffreq = freq;
+	init (len, dec, fi, fi);
+	delete [] fi;
+}
+
+//=====================================================================
+// Filter will be a bandpass with
+// length = len
+// decimation = dec
+// 0.5 frequency points of f1 (low) and f2 (high)
+//=====================================================================
+
+void C_FIR_filter::init_bandpass (int len, int dec, double f1, double f2) {
+	double *fi = bp_FIR (len, 0, f1, f2);
+	init (len, dec, fi, fi);
+	delete [] fi;
+}
+
+//=====================================================================
+// Filter will be the Hilbert form
+//=====================================================================
+
+void C_FIR_filter::init_hilbert (int len, int dec, double lower, double upper) {
+	double *fi = bp_FIR(len, 0, lower, upper);
+	double *fq = bp_FIR(len, 1, lower, upper);
+	init (len, dec, fi, fq);
+	delete [] fi;
+	delete [] fq;
+}
+
+
+//=====================================================================
+// Run
+// passes a cmplx value (in) and receives the cmplx value (out)
+// function returns 0 if the filter is not yet stable
+// returns 1 when stable and decimated cmplx output value is valid
+//=====================================================================
+
+int C_FIR_filter::run (const cmplx &in, cmplx &out) {
+	ibuffer[pointer] = in.real();
+	qbuffer[pointer] = in.imag();
+	counter++;
+	if (counter == decimateratio)
+		out = cmplx (	mac(&ibuffer[pointer - length], ifilter, length),
+						mac(&qbuffer[pointer - length], qfilter, length) );
+	pointer++;
+	if (pointer == FIRBufferLen) {
+		/// memmove is necessary if length >= FIRBufferLen/2 , theoretically possible.
+		memmove (ibuffer, ibuffer + FIRBufferLen - length, length * sizeof (double) );
+		memmove (qbuffer, qbuffer + FIRBufferLen - length, length * sizeof (double) );
+		pointer = length;
+	}
+	if (counter == decimateratio) {
+		counter = 0;
+		return 1;
+	}
+	return 0;
+}
+
+//=====================================================================
+// Run the filter for the Real part of the cmplx variable
+//=====================================================================
+
+int C_FIR_filter::Irun (const double &in, double &out) {
+	double *iptr = ibuffer + pointer;
+
+	pointer++;
+	counter++;
+
+	*iptr = in;
+
+	if (counter == decimateratio) {
+		out = mac(iptr - length, ifilter, length);
+	}
+
+	if (pointer == FIRBufferLen) {
+		iptr = ibuffer + FIRBufferLen - length;
+		memcpy(ibuffer, iptr, length * sizeof(double));
+		pointer = length;
+	}
+
+	if (counter == decimateratio) {
+		counter = 0;
+		return 1;
+	}
+
+	return 0;
+}
+
+//=====================================================================
+// Run the filter for the Imaginary part of the cmplx variable
+//=====================================================================
+
+int C_FIR_filter::Qrun (const double &in, double &out) {
+	double *qptr = ibuffer + pointer;
+
+	pointer++;
+	counter++;
+
+	*qptr = in;
+
+	if (counter == decimateratio) {
+		out = mac(qptr - length, qfilter, length);
+	}
+
+	if (pointer == FIRBufferLen) {
+		qptr = qbuffer + FIRBufferLen - length;
+		memcpy(qbuffer, qptr, length * sizeof(double));
+		pointer = length;
+	}
+
+	if (counter == decimateratio) {
+		counter = 0;
+		return 1;
+	}
+
+	return 0;
+}
+
+
+//=====================================================================
+// Moving average filter
+//
+// Simple in concept, sublime in implementation ... the fastest filter
+// in the west.  Also optimal for the processing of time domain signals
+// characterized by a transition edge.  The is the perfect signal filter
+// for CW, RTTY and other signals of that type.  For a given filter size
+// it provides the greatest s/n improvement while retaining the sharpest
+// leading edge on the filtered signal.
+//=====================================================================
+
+Cmovavg::Cmovavg (int filtlen)
+{
+	len = filtlen;
+	in = new double[len];
+	empty = true;
+}
+
+Cmovavg::~Cmovavg()
+{
+	if (in) delete [] in;
+}
+
+double Cmovavg::run(double a)
+{
+	if (!in) {
+		return a;
+	}
+	if (empty) {
+		empty = false;
+		for (int i = 0; i < len; i++) {
+			in[i] = a;
+		}
+		out = a * len;
+		pint = 0;
+		return a;
+	}
+	out = out - in[pint] + a;
+	in[pint] = a;
+	if (++pint >= len) pint = 0;
+	return out / len;
+}
+
+void Cmovavg::setLength(int filtlen)
+{
+	if (filtlen > len) {
+		if (in) delete [] in;
+		in = new double[filtlen];
+	}
+	len = filtlen;
+	empty = true;
+}
+
+void Cmovavg::reset()
+{
+	empty = true;
+}
+
+//=====================================================================
+// Sliding FFT filter
+// Sliding Fast Fourier Transform
+//
+// The sliding FFT ingeniously exploits the properties of a time-delayed
+// input and the property of linearity for its derivation.
+//
+// First of all, the N-point transform of a sequence x(n) is equal to the
+// summation of the transforms of N separate transforms where each transform
+// has just one of the original samples at it's original sample time.
+//
+//i.e.
+//	  transform of [x0, x1, x2, x3, x4, x5,...xN-1]
+// is equal to
+//	  transform of [x0, 0, 0, 0, 0, 0,...0]
+//	+ transform of [0, x1, 0, 0, 0, 0,...0]
+//	+ transform of [0, 0, x2, 0, 0, 0,...0]
+//	+ transform of [0, 0, 0, x3, 0, 0,...0]
+//	.
+//	.
+//	.
+//	+ transform of [0, 0, 0, 0, 0, 0,...xN-1]
+//
+// Secondly, the transform of a time-delayed sequence is a phase-rotated
+// version of the transform of the original sequence. i.e.
+//
+// If 		x(n) transforms to X(k),
+// Then		x(n-m) transforms to X(k)(Wn)^(-mk)
+//
+// where N is the FFT size, m is the delay in sample periods, and WN is the
+// familiar phase-rotating coefficient or twiddle factor e^(-j2p/N)
+//
+// Therefore, if the N-point transform X(k) of an individual sample is considered,
+// and then the sample is moved back in time by one sample period, all frequency
+// bins of X(k) are phase-rotated by 2pk/N radians.
+//
+// The important thing here is that the transform is not performed again because
+// the previous frequency results can be used by simply application of the correct
+// coefficients.
+//
+// This is the technique that is applied when the rectangular sampling window
+// slides along by one sample.  The contributions of all samples that are
+// included in both the original and the new windows are simply phase rotated.
+// The end effects are that the transform of the new sample must be added, and
+// the transform of the oldest sample that disappeared off the end must be
+// subtracted. These end-effects are easy to perform if we treat the new sample
+// as occurring at time t = 0, because the transform of a single sample at t = 0,
+// say (a + bj), simply has all frequency bins equal to (a + bj). Similarly, the
+// oldest sample that has just disappeared off the end of the window is exactly N
+// samples old. I.e. it occurred at t = -N. The transform of this sample,
+// say (c + dj), is also straightforward since every frequency bin has now been
+// phase-rotated an integer number of times from when the sample was at t = 0.
+// (The kth frequency bin has been rotated by 2pk radians). The transform of the
+// sample at t = -N is therefore the same as if it was still at t = 0. I.e. it
+// has all frequency bins equal to (c + dj).
+//
+// All that is needed therefore is to
+//	phase rotate each frequency bin in F(k) by WN^(k) and then
+//	add [(a + bj) + (c + dj)] to each frequency bin.
+//
+// One cmplx multiplication and two cmplx additions per frequency bin are
+// therefore required, per sample period, regardless of the size of the transform.
+//
+// For example, a traditional 1024-point FFT needs 5120 cmplx multiplies
+// and 10240 cmplx additions to calculate all 1024 frequency bins. A 1024-point
+// Sliding FFT however needs 1024 cmplx multiplies and 2048 cmplx additions
+// for all 1024 frequency bins, and as each frequency bin is calculated separately,
+// it is only necessary to calculate the ones that are of interest.
+//
+// One drawback of the Sliding FFT is that in using feedback from previous
+// frequency bins, there is potential for instability if the coefficients are not
+// infinitely precise. Without infinite precision, stability can be guaranteed by
+// making each phase-rotation coefficient have a  magnitude of slightly less than
+// unity. E.g. 0.9999.
+//
+// This then has to taken into account when the Nth sample is subtracted, because
+// the factor 0.9999 has been applied N times to the transform of this sample.
+// The sample cannot therefore be directly subtracted, it must first be multiplied
+// by the factor of 0.9999^N. This unfortunately means there is another multipli-
+// cation to perform per frequency bin. Another drawback is that a circular buffer
+// is needed in which to keep N samples, so that the oldest sample, (from t= -N),
+// can be subtracted each time.
+//
+// This filter is ideal for extracting a finite number of frequency bins
+// with a very long kernel length.  The filter only needs to calculate the
+// values for the bins of interest and not the entire spectrum.  It does
+// require the store of the history associated with those bins over the
+// kernel length.
+//
+// Use in the MFSK / DOMINO modem for extraction of the frequency spectra
+//
+//=====================================================================
+
+struct sfft::vrot_bins_pair {
+	cmplx vrot;
+	cmplx bins;
+} ;
+
+sfft::sfft(int len, int _first, int _last)
+{
+	vrot_bins = new vrot_bins_pair[len];
+	delay  = new cmplx[len];
+	fftlen = len;
+	first = _first;
+	last = _last;
+	ptr = 0;
+	double phi = 0.0, tau = 2.0 * M_PI/ len;
+	k2 = 1.0;
+	for (int i = 0; i < len; i++) {
+		vrot_bins[i].vrot = cmplx( K1 * cos (phi), K1 * sin (phi) );
+		phi += tau;
+		delay[i] = vrot_bins[i].bins = 0.0;
+		k2 *= K1;
+	}
+}
+
+sfft::~sfft()
+{
+	delete [] vrot_bins;
+	delete [] delay;
+}
+
+// Sliding FFT, cmplx input, cmplx output
+// FFT is computed for each value from first to last
+// Values are not stable until more than "len" samples have been processed.
+// Copies the frequencies to a pointer with a given stride.
+void sfft::run(const cmplx& input, cmplx * __restrict__ result, int stride )
+{
+	cmplx & de = delay[ptr];
+	const cmplx z( input.real() - k2 * de.real(), input.imag() - k2 * de.imag());
+	de = input;
+
+	++ptr ;
+	if( ptr >= fftlen ) ptr = 0 ;
+
+	// It is more efficient to have vrot and bins very close to each other.
+	for(	vrot_bins_pair
+			* __restrict__ itr = vrot_bins + first,
+			* __restrict__ end = vrot_bins + last ;
+		itr != end ;
+		++itr, result += stride ) {
+		*result = itr->bins = itr->bins * itr->vrot + z * itr->vrot;
+	}
+}
+
+// ============================================================================
+// Goertzel filter
+// Optimized implementation of a DFT for a single frequency of interest
+// SR = sample rate
+// N = Block size (does not need to be a factor of 2!)
+//     bin size = SR / N
+// K = frequency bin of interest = (N * freq / SR)
+//     N should be selected to make K an integer if possible
+//
+// Q0 = current sample
+// Q1 = previous sample (1 delay)
+// Q2 = previous sample (2 delay)
+// w  = (2 * pi * K / N)
+// k1 = cos(w)
+// k2 = sin(w)
+// k3 = 2.0 * k1
+
+// Q0, Q1, Q2 are initialized to zero
+// Iterate N times:
+// Q0 = k3*Q1 - Q2 + sample
+// Q2 = Q1
+// Q1 = Q0
+//
+// After N interations:
+// real = (Q1 - Q2 * k1)
+// imag = Q2 * k2
+// or
+// mag = Q1*Q1 + Q2*Q2 - Q1*Q2*k1
+// ============================================================================
+
+goertzel::goertzel(int n, double freq, double sr)
+{
+	double w;
+	w = 2 * M_PI * freq / sr;
+	k1 = cos(w);
+	k2 = sin(w);
+	k3 = 2.0 * k1;
+	Q0 = Q1 = Q2 = 0.0;
+	count = N = n;
+}
+
+goertzel::~goertzel()
+{
+}
+
+void goertzel::reset()
+{
+	Q0 = Q1 = Q2 = 0.0;
+	count = N;
+	isvalid = false;
+}
+
+void goertzel::reset(int n, double freq, double sr)
+{
+	double w;
+	w = 2 * M_PI * freq / sr;
+	k1 = cos(w);
+	k2 = sin(w);
+	k3 = 2.0 * k1;
+	Q0 = Q1 = Q2 = 0.0;
+	count = N = n;
+	isvalid = false;
+}
+
+bool goertzel::run(double sample)
+{
+    Q0 = sample + k3*Q1 - Q2;
+    Q2 = Q1;
+    Q1 = Q0;
+    if (--count == 0) {
+	count = N;
+	return true;
+    }
+    return false;
+}
+
+double goertzel::real()
+{
+    return ((0.5*k3*Q1 - Q2)/N);
+}
+
+double goertzel::imag()
+{
+    return ((k2*Q1)/N);
+}
+
+double goertzel::mag()
+{
+    return (Q2*Q2 + Q1*Q1 - k3*Q2*Q1);
+}
+
+/*
+#include <stdio.h>
+#include <stdlib.h>
+
+int main (int argc, char *argv[])
+{
+	int len = 50;
+	double flow = 100;
+	double fhigh = 3700;
+	double sr = 8000;
+	C_FIR_filter filter;
+
+	filter.init_hilbert(len, 1, flow/sr, fhigh/sr);
+	double *ifilter = filter.Ivals();
+	double *qfilter = filter.Qvals();
+
+	for (int i = 0; i < len; i++)
+		printf("%d, %f, %f\n", i, ifilter[i], qfilter[i]);
+}
+
+*/
diff --git a/src/gauss_fir.cxx b/src/gauss_fir.cxx
new file mode 100644
index 0000000..5ee0582
--- /dev/null
+++ b/src/gauss_fir.cxx
@@ -0,0 +1,115 @@
+// ---------------------------------------------------------------------
+// GaussFIR.cpp: implementation of the CGaussFIR class.
+//
+//    A Gaussian shaped cmplx FIR LP filter class.
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#include <stdlib.h>
+#include <math.h>
+#include "gauss_fir.h"
+
+// pathsim original
+
+#define PI2 6.283185307
+#define SQRT2PI 2.506628275
+#define SQRT2 1.414213562
+#define K_GAUSSIAN 1.4	//constant determines accuracy of Gaussian LPFIR.
+						// larger number makes FIR longer but more accurate
+						// This value is good to about -50 dB
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CGaussFIR::CGaussFIR()
+{
+	m_pCoef = NULL;
+	m_pQue = NULL;
+}
+
+CGaussFIR::~CGaussFIR()
+{
+	if(m_pCoef)
+		delete m_pCoef;
+	if(m_pQue)
+		delete m_pQue;
+}
+
+////////////////////////////////////////////////////////////////////////////
+//  This function calculates the length and FIR coefficients for a Gaussian
+//		shaped LP filter and also initializes the memory for it.
+////////////////////////////////////////////////////////////////////////////
+void CGaussFIR::Init(double Fs, double F2sig)
+{
+int indx;
+double sigma = (Fs*SQRT2)/(PI2*F2sig);		// calculate sigma for coefficients
+	m_FIRlen = (int)(K_GAUSSIAN*Fs/F2sig);		//calculate FIR length
+	if( !(m_FIRlen & 1) ) //make FIR length ODD
+		m_FIRlen++;
+//allocate buffer and Coefficient memory based on calculated FIR length
+	if( (m_pCoef = new double[sizeof(double)*((m_FIRlen*2)+10)] ) == NULL)
+		return;
+	if( (m_pQue = new cmplx[sizeof(cmplx)*(m_FIRlen+10)] ) == NULL)
+		return;
+// generate the scaled Gaussian shaped impulse response	to create a 0 dB
+//   passband LP filter with a 2 Sigma frequency bandwidth.
+	indx = -(m_FIRlen-1)/2;
+	for(int i=0; i<m_FIRlen;i++)
+	{
+		m_pCoef[i] = ( 1.0/(SQRT2PI*sigma) )*dnorm( indx++,0.0, sigma)
+									/ dnorm( 0.0,0.0, sigma);
+		m_pQue[i].x = 0.0;
+		m_pQue[i].y = 0.0;
+		m_pCoef[i+m_FIRlen] = m_pCoef[i];	//make duplicate for flat FIR
+	}
+	m_FirState = m_FIRlen-1;		//used for flat FIR implementation
+}
+
+//////////////////////////////////////////////////////////////////////
+//  Calculate complex Gaussian FIR filter iteration for one sample
+//////////////////////////////////////////////////////////////////////
+cmplx CGaussFIR::CalcFilter(cmplx in)
+{
+cmplx acc;
+cmplx* Firptr;
+double* Kptr;
+	m_pQue[m_FirState].x = in.x;
+	m_pQue[m_FirState].y = in.y;
+	Firptr = m_pQue;
+	acc.x = 0.0;
+	acc.y = 0.0;
+	Kptr = m_pCoef+m_FIRlen-m_FirState;
+	for(int i=0; i<m_FIRlen; i++)
+	{
+		acc.x += ( (Firptr->x)*(*Kptr) );
+		acc.y += ( (Firptr++->y)*(*Kptr++) );
+	}
+	if( --m_FirState < 0)
+		m_FirState += m_FIRlen;
+	return acc;
+}
+
+//////////////////////////////////////////////////////////////////////
+//  implements a Gaussian (Normal) distribution function.
+//////////////////////////////////////////////////////////////////////
+double CGaussFIR::dnorm(double x, double mu, double sigma)
+{
+	return( 1.0/(SQRT2PI*sigma) )*exp( (-1.0/(2.0*sigma*sigma))*(x-mu)*(x-mu) );
+}
diff --git a/src/guide.cxx b/src/guide.cxx
new file mode 100644
index 0000000..270a9d5
--- /dev/null
+++ b/src/guide.cxx
@@ -0,0 +1,1523 @@
+const char* szGuide = 
+"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n\
+    \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n\
+<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n\
+<head>\n\
+<meta http-equiv=\"Content-Type\" content=\"application/xhtml+xml; charset=UTF-8\" />\n\
+<meta name=\"generator\" content=\"AsciiDoc 8.6.6\" />\n\
+<title>Guide to linsim</title>\n\
+<style type=\"text/css\">\n\
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */\n\
+\n\
+/* Default font. */\n\
+body {\n\
+  font-family: Georgia,serif;\n\
+}\n\
+\n\
+/* Title font. */\n\
+h1, h2, h3, h4, h5, h6,\n\
+div.title, caption.title,\n\
+thead, p.table.header,\n\
+#toctitle,\n\
+#author, #revnumber, #revdate, #revremark,\n\
+#footer {\n\
+  font-family: Arial,Helvetica,sans-serif;\n\
+}\n\
+\n\
+body {\n\
+  margin: 1em 5% 1em 5%;\n\
+}\n\
+\n\
+a {\n\
+  color: blue;\n\
+  text-decoration: underline;\n\
+}\n\
+a:visited {\n\
+  color: fuchsia;\n\
+}\n\
+\n\
+em {\n\
+  font-style: italic;\n\
+  color: navy;\n\
+}\n\
+\n\
+strong {\n\
+  font-weight: bold;\n\
+  color: #083194;\n\
+}\n\
+\n\
+h1, h2, h3, h4, h5, h6 {\n\
+  color: #527bbd;\n\
+  margin-top: 1.2em;\n\
+  margin-bottom: 0.5em;\n\
+  line-height: 1.3;\n\
+}\n\
+\n\
+h1, h2, h3 {\n\
+  border-bottom: 2px solid silver;\n\
+}\n\
+h2 {\n\
+  padding-top: 0.5em;\n\
+}\n\
+h3 {\n\
+  float: left;\n\
+}\n\
+h3 + * {\n\
+  clear: left;\n\
+}\n\
+h5 {\n\
+  font-size: 1.0em;\n\
+}\n\
+\n\
+div.sectionbody {\n\
+  margin-left: 0;\n\
+}\n\
+\n\
+hr {\n\
+  border: 1px solid silver;\n\
+}\n\
+\n\
+p {\n\
+  margin-top: 0.5em;\n\
+  margin-bottom: 0.5em;\n\
+}\n\
+\n\
+ul, ol, li > p {\n\
+  margin-top: 0;\n\
+}\n\
+ul > li     { color: #aaa; }\n\
+ul > li > * { color: black; }\n\
+\n\
+pre {\n\
+  padding: 0;\n\
+  margin: 0;\n\
+}\n\
+\n\
+#author {\n\
+  color: #527bbd;\n\
+  font-weight: bold;\n\
+  font-size: 1.1em;\n\
+}\n\
+#email {\n\
+}\n\
+#revnumber, #revdate, #revremark {\n\
+}\n\
+\n\
+#footer {\n\
+  font-size: small;\n\
+  border-top: 2px solid silver;\n\
+  padding-top: 0.5em;\n\
+  margin-top: 4.0em;\n\
+}\n\
+#footer-text {\n\
+  float: left;\n\
+  padding-bottom: 0.5em;\n\
+}\n\
+#footer-badges {\n\
+  float: right;\n\
+  padding-bottom: 0.5em;\n\
+}\n\
+\n\
+#preamble {\n\
+  margin-top: 1.5em;\n\
+  margin-bottom: 1.5em;\n\
+}\n\
+div.imageblock, div.exampleblock, div.verseblock,\n\
+div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,\n\
+div.admonitionblock {\n\
+  margin-top: 1.0em;\n\
+  margin-bottom: 1.5em;\n\
+}\n\
+div.admonitionblock {\n\
+  margin-top: 2.0em;\n\
+  margin-bottom: 2.0em;\n\
+  margin-right: 10%;\n\
+  color: #606060;\n\
+}\n\
+\n\
+div.content { /* Block element content. */\n\
+  padding: 0;\n\
+}\n\
+\n\
+/* Block element titles. */\n\
+div.title, caption.title {\n\
+  color: #527bbd;\n\
+  font-weight: bold;\n\
+  text-align: left;\n\
+  margin-top: 1.0em;\n\
+  margin-bottom: 0.5em;\n\
+}\n\
+div.title + * {\n\
+  margin-top: 0;\n\
+}\n\
+\n\
+td div.title:first-child {\n\
+  margin-top: 0.0em;\n\
+}\n\
+div.content div.title:first-child {\n\
+  margin-top: 0.0em;\n\
+}\n\
+div.content + div.title {\n\
+  margin-top: 0.0em;\n\
+}\n\
+\n\
+div.sidebarblock > div.content {\n\
+  background: #ffffee;\n\
+  border: 1px solid #dddddd;\n\
+  border-left: 4px solid #f0f0f0;\n\
+  padding: 0.5em;\n\
+}\n\
+\n\
+div.listingblock > div.content {\n\
+  border: 1px solid #dddddd;\n\
+  border-left: 5px solid #f0f0f0;\n\
+  background: #f8f8f8;\n\
+  padding: 0.5em;\n\
+}\n\
+\n\
+div.quoteblock, div.verseblock {\n\
+  padding-left: 1.0em;\n\
+  margin-left: 1.0em;\n\
+  margin-right: 10%;\n\
+  border-left: 5px solid #f0f0f0;\n\
+  color: #888;\n\
+}\n\
+\n\
+div.quoteblock > div.attribution {\n\
+  padding-top: 0.5em;\n\
+  text-align: right;\n\
+}\n\
+\n\
+div.verseblock > pre.content {\n\
+  font-family: inherit;\n\
+  font-size: inherit;\n\
+}\n\
+div.verseblock > div.attribution {\n\
+  padding-top: 0.75em;\n\
+  text-align: left;\n\
+}\n\
+/* DEPRECATED: Pre version 8.2.7 verse style literal block. */\n\
+div.verseblock + div.attribution {\n\
+  text-align: left;\n\
+}\n\
+\n\
+div.admonitionblock .icon {\n\
+  vertical-align: top;\n\
+  font-size: 1.1em;\n\
+  font-weight: bold;\n\
+  text-decoration: underline;\n\
+  color: #527bbd;\n\
+  padding-right: 0.5em;\n\
+}\n\
+div.admonitionblock td.content {\n\
+  padding-left: 0.5em;\n\
+  border-left: 3px solid #dddddd;\n\
+}\n\
+\n\
+div.exampleblock > div.content {\n\
+  border-left: 3px solid #dddddd;\n\
+  padding-left: 0.5em;\n\
+}\n\
+\n\
+div.imageblock div.content { padding-left: 0; }\n\
+span.image img { border-style: none; }\n\
+a.image:visited { color: white; }\n\
+\n\
+dl {\n\
+  margin-top: 0.8em;\n\
+  margin-bottom: 0.8em;\n\
+}\n\
+dt {\n\
+  margin-top: 0.5em;\n\
+  margin-bottom: 0;\n\
+  font-style: normal;\n\
+  color: navy;\n\
+}\n\
+dd > *:first-child {\n\
+  margin-top: 0.1em;\n\
+}\n\
+\n\
+ul, ol {\n\
+    list-style-position: outside;\n\
+}\n\
+ol.arabic {\n\
+  list-style-type: decimal;\n\
+}\n\
+ol.loweralpha {\n\
+  list-style-type: lower-alpha;\n\
+}\n\
+ol.upperalpha {\n\
+  list-style-type: upper-alpha;\n\
+}\n\
+ol.lowerroman {\n\
+  list-style-type: lower-roman;\n\
+}\n\
+ol.upperroman {\n\
+  list-style-type: upper-roman;\n\
+}\n\
+\n\
+div.compact ul, div.compact ol,\n\
+div.compact p, div.compact p,\n\
+div.compact div, div.compact div {\n\
+  margin-top: 0.1em;\n\
+  margin-bottom: 0.1em;\n\
+}\n\
+\n\
+tfoot {\n\
+  font-weight: bold;\n\
+}\n\
+td > div.verse {\n\
+  white-space: pre;\n\
+}\n\
+\n\
+div.hdlist {\n\
+  margin-top: 0.8em;\n\
+  margin-bottom: 0.8em;\n\
+}\n\
+div.hdlist tr {\n\
+  padding-bottom: 15px;\n\
+}\n\
+dt.hdlist1.strong, td.hdlist1.strong {\n\
+  font-weight: bold;\n\
+}\n\
+td.hdlist1 {\n\
+  vertical-align: top;\n\
+  font-style: normal;\n\
+  padding-right: 0.8em;\n\
+  color: navy;\n\
+}\n\
+td.hdlist2 {\n\
+  vertical-align: top;\n\
+}\n\
+div.hdlist.compact tr {\n\
+  margin: 0;\n\
+  padding-bottom: 0;\n\
+}\n\
+\n\
+.comment {\n\
+  background: yellow;\n\
+}\n\
+\n\
+.footnote, .footnoteref {\n\
+  font-size: 0.8em;\n\
+}\n\
+\n\
+span.footnote, span.footnoteref {\n\
+  vertical-align: super;\n\
+}\n\
+\n\
+#footnotes {\n\
+  margin: 20px 0 20px 0;\n\
+  padding: 7px 0 0 0;\n\
+}\n\
+\n\
+#footnotes div.footnote {\n\
+  margin: 0 0 5px 0;\n\
+}\n\
+\n\
+#footnotes hr {\n\
+  border: none;\n\
+  border-top: 1px solid silver;\n\
+  height: 1px;\n\
+  text-align: left;\n\
+  margin-left: 0;\n\
+  width: 20%;\n\
+  min-width: 100px;\n\
+}\n\
+\n\
+div.colist td {\n\
+  padding-right: 0.5em;\n\
+  padding-bottom: 0.3em;\n\
+  vertical-align: top;\n\
+}\n\
+div.colist td img {\n\
+  margin-top: 0.3em;\n\
+}\n\
+\n\
+ at media print {\n\
+  #footer-badges { display: none; }\n\
+}\n\
+\n\
+#toc {\n\
+  margin-bottom: 2.5em;\n\
+}\n\
+\n\
+#toctitle {\n\
+  color: #527bbd;\n\
+  font-size: 1.1em;\n\
+  font-weight: bold;\n\
+  margin-top: 1.0em;\n\
+  margin-bottom: 0.1em;\n\
+}\n\
+\n\
+div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {\n\
+  margin-top: 0;\n\
+  margin-bottom: 0;\n\
+}\n\
+div.toclevel2 {\n\
+  margin-left: 2em;\n\
+  font-size: 0.9em;\n\
+}\n\
+div.toclevel3 {\n\
+  margin-left: 4em;\n\
+  font-size: 0.9em;\n\
+}\n\
+div.toclevel4 {\n\
+  margin-left: 6em;\n\
+  font-size: 0.9em;\n\
+}\n\
+\n\
+span.aqua { color: aqua; }\n\
+span.black { color: black; }\n\
+span.blue { color: blue; }\n\
+span.fuchsia { color: fuchsia; }\n\
+span.gray { color: gray; }\n\
+span.green { color: green; }\n\
+span.lime { color: lime; }\n\
+span.maroon { color: maroon; }\n\
+span.navy { color: navy; }\n\
+span.olive { color: olive; }\n\
+span.purple { color: purple; }\n\
+span.red { color: red; }\n\
+span.silver { color: silver; }\n\
+span.teal { color: teal; }\n\
+span.white { color: white; }\n\
+span.yellow { color: yellow; }\n\
+\n\
+span.aqua-background { background: aqua; }\n\
+span.black-background { background: black; }\n\
+span.blue-background { background: blue; }\n\
+span.fuchsia-background { background: fuchsia; }\n\
+span.gray-background { background: gray; }\n\
+span.green-background { background: green; }\n\
+span.lime-background { background: lime; }\n\
+span.maroon-background { background: maroon; }\n\
+span.navy-background { background: navy; }\n\
+span.olive-background { background: olive; }\n\
+span.purple-background { background: purple; }\n\
+span.red-background { background: red; }\n\
+span.silver-background { background: silver; }\n\
+span.teal-background { background: teal; }\n\
+span.white-background { background: white; }\n\
+span.yellow-background { background: yellow; }\n\
+\n\
+span.big { font-size: 2em; }\n\
+span.small { font-size: 0.6em; }\n\
+\n\
+span.underline { text-decoration: underline; }\n\
+span.overline { text-decoration: overline; }\n\
+span.line-through { text-decoration: line-through; }\n\
+\n\
+\n\
+/*\n\
+ * xhtml11 specific\n\
+ *\n\
+ * */\n\
+\n\
+tt {\n\
+  font-family: monospace;\n\
+  font-size: inherit;\n\
+  color: navy;\n\
+}\n\
+\n\
+div.tableblock {\n\
+  margin-top: 1.0em;\n\
+  margin-bottom: 1.5em;\n\
+}\n\
+div.tableblock > table {\n\
+  border: 3px solid #527bbd;\n\
+}\n\
+thead, p.table.header {\n\
+  font-weight: bold;\n\
+  color: #527bbd;\n\
+}\n\
+p.table {\n\
+  margin-top: 0;\n\
+}\n\
+/* Because the table frame attribute is overriden by CSS in most browsers. */\n\
+div.tableblock > table[frame=\"void\"] {\n\
+  border-style: none;\n\
+}\n\
+div.tableblock > table[frame=\"hsides\"] {\n\
+  border-left-style: none;\n\
+  border-right-style: none;\n\
+}\n\
+div.tableblock > table[frame=\"vsides\"] {\n\
+  border-top-style: none;\n\
+  border-bottom-style: none;\n\
+}\n\
+\n\
+\n\
+/*\n\
+ * html5 specific\n\
+ *\n\
+ * */\n\
+\n\
+.monospaced {\n\
+  font-family: monospace;\n\
+  font-size: inherit;\n\
+  color: navy;\n\
+}\n\
+\n\
+table.tableblock {\n\
+  margin-top: 1.0em;\n\
+  margin-bottom: 1.5em;\n\
+}\n\
+thead, p.tableblock.header {\n\
+  font-weight: bold;\n\
+  color: #527bbd;\n\
+}\n\
+p.tableblock {\n\
+  margin-top: 0;\n\
+}\n\
+table.tableblock {\n\
+  border-width: 3px;\n\
+  border-spacing: 0px;\n\
+  border-style: solid;\n\
+  border-color: #527bbd;\n\
+  border-collapse: collapse;\n\
+}\n\
+th.tableblock, td.tableblock {\n\
+  border-width: 1px;\n\
+  padding: 4px;\n\
+  border-style: solid;\n\
+  border-color: #527bbd;\n\
+}\n\
+\n\
+table.tableblock.frame-topbot {\n\
+  border-left-style: hidden;\n\
+  border-right-style: hidden;\n\
+}\n\
+table.tableblock.frame-sides {\n\
+  border-top-style: hidden;\n\
+  border-bottom-style: hidden;\n\
+}\n\
+table.tableblock.frame-none {\n\
+  border-style: hidden;\n\
+}\n\
+\n\
+th.tableblock.halign-left, td.tableblock.halign-left {\n\
+  text-align: left;\n\
+}\n\
+th.tableblock.halign-center, td.tableblock.halign-center {\n\
+  text-align: center;\n\
+}\n\
+th.tableblock.halign-right, td.tableblock.halign-right {\n\
+  text-align: right;\n\
+}\n\
+\n\
+th.tableblock.valign-top, td.tableblock.valign-top {\n\
+  vertical-align: top;\n\
+}\n\
+th.tableblock.valign-middle, td.tableblock.valign-middle {\n\
+  vertical-align: middle;\n\
+}\n\
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {\n\
+  vertical-align: bottom;\n\
+}\n\
+\n\
+\n\
+/*\n\
+ * manpage specific\n\
+ *\n\
+ * */\n\
+\n\
+body.manpage h1 {\n\
+  padding-top: 0.5em;\n\
+  padding-bottom: 0.5em;\n\
+  border-top: 2px solid silver;\n\
+  border-bottom: 2px solid silver;\n\
+}\n\
+body.manpage h2 {\n\
+  border-style: none;\n\
+}\n\
+body.manpage div.sectionbody {\n\
+  margin-left: 3em;\n\
+}\n\
+\n\
+ at media print {\n\
+  body.manpage div#toc { display: none; }\n\
+}\n\
+</style>\n\
+<script type=\"text/javascript\">\n\
+/*<![CDATA[*/\n\
+var asciidoc = {  // Namespace.\n\
+\n\
+/////////////////////////////////////////////////////////////////////\n\
+// Table Of Contents generator\n\
+/////////////////////////////////////////////////////////////////////\n\
+\n\
+/* Author: Mihai Bazon, September 2002\n\
+ * http://students.infoiasi.ro/~mishoo\n\
+ *\n\
+ * Table Of Content generator\n\
+ * Version: 0.4\n\
+ *\n\
+ * Feel free to use this script under the terms of the GNU General Public\n\
+ * License, as long as you do not remove or alter this notice.\n\
+ */\n\
+\n\
+ /* modified by Troy D. Hanson, September 2006. License: GPL */\n\
+ /* modified by Stuart Rackham, 2006, 2009. License: GPL */\n\
+\n\
+// toclevels = 1..4.\n\
+toc: function (toclevels) {\n\
+\n\
+  function getText(el) {\n\
+    var text = \"\";\n\
+    for (var i = el.firstChild; i != null; i = i.nextSibling) {\n\
+      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.\n\
+        text += i.data;\n\
+      else if (i.firstChild != null)\n\
+        text += getText(i);\n\
+    }\n\
+    return text;\n\
+  }\n\
+\n\
+  function TocEntry(el, text, toclevel) {\n\
+    this.element = el;\n\
+    this.text = text;\n\
+    this.toclevel = toclevel;\n\
+  }\n\
+\n\
+  function tocEntries(el, toclevels) {\n\
+    var result = new Array;\n\
+    var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');\n\
+    // Function that scans the DOM tree for header elements (the DOM2\n\
+    // nodeIterator API would be a better technique but not supported by all\n\
+    // browsers).\n\
+    var iterate = function (el) {\n\
+      for (var i = el.firstChild; i != null; i = i.nextSibling) {\n\
+        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {\n\
+          var mo = re.exec(i.tagName);\n\
+          if (mo && (i.getAttribute(\"class\") || i.getAttribute(\"className\")) != \"float\") {\n\
+            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);\n\
+          }\n\
+          iterate(i);\n\
+        }\n\
+      }\n\
+    }\n\
+    iterate(el);\n\
+    return result;\n\
+  }\n\
+\n\
+  var toc = document.getElementById(\"toc\");\n\
+  if (!toc) {\n\
+    return;\n\
+  }\n\
+\n\
+  // Delete existing TOC entries in case we're reloading the TOC.\n\
+  var tocEntriesToRemove = [];\n\
+  var i;\n\
+  for (i = 0; i < toc.childNodes.length; i++) {\n\
+    var entry = toc.childNodes[i];\n\
+    if (entry.nodeName == 'div'\n\
+     && entry.getAttribute(\"class\")\n\
+     && entry.getAttribute(\"class\").match(/^toclevel/))\n\
+      tocEntriesToRemove.push(entry);\n\
+  }\n\
+  for (i = 0; i < tocEntriesToRemove.length; i++) {\n\
+    toc.removeChild(tocEntriesToRemove[i]);\n\
+  }\n\
+\n\
+  // Rebuild TOC entries.\n\
+  var entries = tocEntries(document.getElementById(\"content\"), toclevels);\n\
+  for (var i = 0; i < entries.length; ++i) {\n\
+    var entry = entries[i];\n\
+    if (entry.element.id == \"\")\n\
+      entry.element.id = \"_toc_\" + i;\n\
+    var a = document.createElement(\"a\");\n\
+    a.href = \"#\" + entry.element.id;\n\
+    a.appendChild(document.createTextNode(entry.text));\n\
+    var div = document.createElement(\"div\");\n\
+    div.appendChild(a);\n\
+    div.className = \"toclevel\" + entry.toclevel;\n\
+    toc.appendChild(div);\n\
+  }\n\
+  if (entries.length == 0)\n\
+    toc.parentNode.removeChild(toc);\n\
+},\n\
+\n\
+\n\
+/////////////////////////////////////////////////////////////////////\n\
+// Footnotes generator\n\
+/////////////////////////////////////////////////////////////////////\n\
+\n\
+/* Based on footnote generation code from:\n\
+ * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html\n\
+ */\n\
+\n\
+footnotes: function () {\n\
+  // Delete existing footnote entries in case we're reloading the footnodes.\n\
+  var i;\n\
+  var noteholder = document.getElementById(\"footnotes\");\n\
+  if (!noteholder) {\n\
+    return;\n\
+  }\n\
+  var entriesToRemove = [];\n\
+  for (i = 0; i < noteholder.childNodes.length; i++) {\n\
+    var entry = noteholder.childNodes[i];\n\
+    if (entry.nodeName == 'div' && entry.getAttribute(\"class\") == \"footnote\")\n\
+      entriesToRemove.push(entry);\n\
+  }\n\
+  for (i = 0; i < entriesToRemove.length; i++) {\n\
+    noteholder.removeChild(entriesToRemove[i]);\n\
+  }\n\
+\n\
+  // Rebuild footnote entries.\n\
+  var cont = document.getElementById(\"content\");\n\
+  var spans = cont.getElementsByTagName(\"span\");\n\
+  var refs = {};\n\
+  var n = 0;\n\
+  for (i=0; i<spans.length; i++) {\n\
+    if (spans[i].className == \"footnote\") {\n\
+      n++;\n\
+      var note = spans[i].getAttribute(\"data-note\");\n\
+      if (!note) {\n\
+        // Use [\\s\\S] in place of . so multi-line matches work.\n\
+        // Because JavaScript has no s (dotall) regex flag.\n\
+        note = spans[i].innerHTML.match(/\\s*\[([\\s\\S]*)]\\s*/)[1];\n\
+        spans[i].innerHTML =\n\
+          \"[<a id='_footnoteref_\" + n + \"' href='#_footnote_\" + n +\n\
+          \"' title='View footnote' class='footnote'>\" + n + \"</a>]\";\n\
+        spans[i].setAttribute(\"data-note\", note);\n\
+      }\n\
+      noteholder.innerHTML +=\n\
+        \"<div class='footnote' id='_footnote_\" + n + \"'>\" +\n\
+        \"<a href='#_footnoteref_\" + n + \"' title='Return to text'>\" +\n\
+        n + \"</a>. \" + note + \"</div>\";\n\
+      var id =spans[i].getAttribute(\"id\");\n\
+      if (id != null) refs[\"#\"+id] = n;\n\
+    }\n\
+  }\n\
+  if (n == 0)\n\
+    noteholder.parentNode.removeChild(noteholder);\n\
+  else {\n\
+    // Process footnoterefs.\n\
+    for (i=0; i<spans.length; i++) {\n\
+      if (spans[i].className == \"footnoteref\") {\n\
+        var href = spans[i].getElementsByTagName(\"a\")[0].getAttribute(\"href\");\n\
+        href = href.match(/#.*/)[0];  // Because IE return full URL.\n\
+        n = refs[href];\n\
+        spans[i].innerHTML =\n\
+          \"[<a href='#_footnote_\" + n +\n\
+          \"' title='View footnote' class='footnote'>\" + n + \"</a>]\";\n\
+      }\n\
+    }\n\
+  }\n\
+},\n\
+\n\
+install: function(toclevels) {\n\
+  var timerId;\n\
+\n\
+  function reinstall() {\n\
+    asciidoc.footnotes();\n\
+    if (toclevels) {\n\
+      asciidoc.toc(toclevels);\n\
+    }\n\
+  }\n\
+\n\
+  function reinstallAndRemoveTimer() {\n\
+    clearInterval(timerId);\n\
+    reinstall();\n\
+  }\n\
+\n\
+  timerId = setInterval(reinstall, 500);\n\
+  if (document.addEventListener)\n\
+    document.addEventListener(\"DOMContentLoaded\", reinstallAndRemoveTimer, false);\n\
+  else\n\
+    window.onload = reinstallAndRemoveTimer;\n\
+}\n\
+\n\
+}\n\
+asciidoc.install();\n\
+/*]]>*/\n\
+</script>\n\
+</head>\n\
+<body class=\"article\">\n\
+<div id=\"header\">\n\
+<h1>Guide to linsim</h1>\n\
+</div>\n\
+<div id=\"content\">\n\
+<div id=\"preamble\">\n\
+<div class=\"sectionbody\">\n\
+<div class=\"sidebarblock\">\n\
+<div class=\"content\">\n\
+<div class=\"paragraph\"><p>Of necessity, this Guide contains only as much as you need to know to get started.</p></div>\n\
+</div></div>\n\
+</div>\n\
+</div>\n\
+<div class=\"sect1\">\n\
+<h2 id=\"ref-general\">1. What is Linsim?</h2>\n\
+<div class=\"sectionbody\">\n\
+<div class=\"paragraph\"><p>linsim is a computer program intended as a tool for Amateur Radio Digital Mode\n\
+evaluation under varying HF propogation conditions.</p></div>\n\
+<div class=\"paragraph\"><p>linsim is available for multiple computer operating systems;\n\
+FreeBSD™; Linux™, OS X™ and Windows™.</p></div>\n\
+<div class=\"sect2\">\n\
+<h3 id=\"_what_is_a_simulation_model\">1.1. What is a Simulation Model?</h3>\n\
+<div class=\"paragraph\"><div class=\"title\">Watterson Ionospheric Channel Model</div><p>Radio propagation via the earth’s ionosphere contain reflections from 3 general effects:</p></div>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+Density variations versus altitude in the ionosphere\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Magnetic-ionic effects that cause polarization-dependent paths\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Non-uniformity of the ionospheric layers\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+<div class=\"paragraph\"><p>The Watterson HF channel model has been used for some time for simulating the propagation of radio waves reflecting off of the ionosphere by simulating both amplitude and phase distortion in multiple propagation paths each with a specified fixed delay.</p></div>\n\
+<div class=\"paragraph\"><p>For a much more detailed description, one is referred to an article in the May/June 2000 issue of QEX by Johan Forrer describing the details of such a model. Another reference can be found in \"Wireless Digital Communications:\n\
+Design and Theory\" by Tom McDermott.</p></div>\n\
+<div class=\"paragraph\"><p>The mathematics associated with the various signal processing paths are identical to PathSim.  The reader is refered to Moe Wheatley’s excellent PathSim technical document for details, <a href=\"http://www.moetronix.com/ae4jy/files/pathsimtech100.pdf\">http://www.moetronix.com/ae4jy/files/pathsimtech100.pdf</a>.</p></div>\n\
+</div>\n\
+<div class=\"sect2\">\n\
+<h3 id=\"_general_description\">1.2. General description</h3>\n\
+<div class=\"paragraph\"><p>Linsim is designed to read and then add path simulation to any monophonic wav file recorded at any sampling rate.  It works particularly well with files that were created using fldigi’s audio capture and audio generate functions.  The entire wav file will be saved to computer memory and then duplicated during the signal processing.  The user should try to keep the length of the wav file at 20 Mg or less, but the author has tested some 200 Mg files on bot [...]
+<div class=\"paragraph\"><p>Simulations include path delay, doppler, frequency shift and band limited Gaussian white noise.  All simulations are constrained to a 3000 Hz bandwidth.  The input signal is filtered by a FIR bandpass filter (400 - 3400 Hz).</p></div>\n\
+<div class=\"admonitionblock\">\n\
+<table><tr>\n\
+<td class=\"icon\">\n\
+<div class=\"title\">Note</div>\n\
+</td>\n\
+<td class=\"content\">\n\
+<div class=\"paragraph\"><p>Your input signal should not extend beyond these limits.</p></div>\n\
+</td>\n\
+</tr></table>\n\
+</div>\n\
+</div>\n\
+</div>\n\
+</div>\n\
+<div class=\"sect1\">\n\
+<h2 id=\"ref-folders-files\">2. Simulation Specification Files</h2>\n\
+<div class=\"sectionbody\">\n\
+<div class=\"sect2\">\n\
+<h3 id=\"_folder_location\">2.1. Folder location</h3>\n\
+<div class=\"paragraph\"><p>The first time it is executed linsim will create a folder in which to store it’s simulation specification files.  The folder location depends on the user’s operating system:</p></div>\n\
+<div class=\"paragraph\"><p>XP : C:\\Documents and Settings\\<user>\\linsim.files</p></div>\n\
+<div class=\"paragraph\"><p>Vista / Win7 / Win8 : C:\\Users\\<user>\\linsim.files</p></div>\n\
+<div class=\"paragraph\"><p>Linux : /home/<user>/.linsim</p></div>\n\
+<div class=\"paragraph\"><p>OS X : /users/<user>/.linsim</p></div>\n\
+<div class=\"paragraph\"><p>Linux and OS X users might want to create a link to that folder</p></div>\n\
+<div class=\"paragraph\"><p>$ cd\n\
+$ ln -s linsim.files .linsim</p></div>\n\
+</div>\n\
+</div>\n\
+</div>\n\
+<div class=\"sect1\">\n\
+<h2 id=\"_simulation_files\">3. Simulation Files</h2>\n\
+<div class=\"sectionbody\">\n\
+<div class=\"paragraph\"><p>Linsim can manage, open and save any number of simulation sets.  Each set of simulations are saved in the same comma-separated-value (csv) file.  The files are compatible with any spreadsheet program such as Excel, Open Office, or Gnumeric.</p></div>\n\
+<div class=\"sect2\">\n\
+<h3 id=\"_simulation_file_format\">3.1. Simulation File Format</h3>\n\
+<div class=\"paragraph\"><p>Simulation files are spreadsheet files saved in a comma-separated-value format.\n\
+A default set of simulations are created for you when the program is executed\n\
+for the first time.  The default file contents are</p></div>\n\
+<div class=\"tableblock\">\n\
+<table rules=\"all\"\n\
+width=\"100%\"\n\
+frame=\"border\"\n\
+cellspacing=\"0\" cellpadding=\"4\">\n\
+<col width=\"3%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<col width=\"6%\" />\n\
+<thead>\n\
+<tr>\n\
+<th align=\"center\" valign=\"top\">TITLE</th>\n\
+<th align=\"left\" valign=\"top\">AWGN</th>\n\
+<th align=\"left\" valign=\"top\">S/N</th>\n\
+<th align=\"left\" valign=\"top\">P1</th>\n\
+<th align=\"left\" valign=\"top\">SPREAD_1</th>\n\
+<th align=\"left\" valign=\"top\">OFFSET_1</th>\n\
+<th align=\"left\" valign=\"top\">P2</th>\n\
+<th align=\"left\" valign=\"top\">DELAY_2</th>\n\
+<th align=\"left\" valign=\"top\">SPREAD_2</th>\n\
+<th align=\"left\" valign=\"top\">OFFSET_2</th>\n\
+<th align=\"left\" valign=\"top\">P3</th>\n\
+<th align=\"left\" valign=\"top\">DELAY_3</th>\n\
+<th align=\"left\" valign=\"top\">SPREAD_3</th>\n\
+<th align=\"left\" valign=\"top\">OFFSET_3</th>\n\
+</tr>\n\
+</thead>\n\
+<tbody>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">AWGN S/N</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">10</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">CCIR 520-2 (Doppler Fading)</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.2</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">10</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.2</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">CCIR 520-2 (Flutter Fading)</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">10</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">10</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">CCIR 520-2 (Good Conditions)</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">CCIR-520-2 (Moderate Conditions)</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">CCIR-520-2 (Poor Conditions)</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">2</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">Direct Path</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">10</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">Frequency Shifter</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">500</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">High-Latitude Disturbed</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">30</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">7</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">30</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">High-Latitude Moderate</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">10</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">3</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">10</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">High-Latitude Quiet</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">Low-Latitude Disturbed</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">10</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">6</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">10</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">Low-Latitude Moderate</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">2</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">Low-Latitude Quiet</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">Mid-Latitude Disturbed</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">2</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">Mid-Latitude Disturbed NVIS</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">7</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">Mid-Latitude Moderate</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+<tr>\n\
+<td align=\"center\" valign=\"top\"><p class=\"table\">Mid-Latitude Quiet</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">1</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0.5</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+<td align=\"left\" valign=\"top\"><p class=\"table\">0</p></td>\n\
+</tr>\n\
+</tbody>\n\
+</table>\n\
+</div>\n\
+</div>\n\
+</div>\n\
+</div>\n\
+<div class=\"sect1\">\n\
+<h2 id=\"ref-operating\">4. Menu functions</h2>\n\
+<div class=\"sectionbody\">\n\
+<div class=\"ulist\"><div class=\"title\">File</div><ul>\n\
+<li>\n\
+<p>\n\
+Open    - open an existing simulation set csv file\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+the name of the simulation file in use will be displayed in the control labeled \"Models:\"\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Save    - save the current simulation set csv file\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Save As - save the current simulation set, specifying a new file path-name\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Exit    - exit the program, saving current simulation set\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+<div class=\"ulist\"><div class=\"title\">Simulation</div><ul>\n\
+<li>\n\
+<p>\n\
+Add         - add the current simulation specifications to the current set\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Batch       - open the batch processing dialog\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+select sequence of simulations to be run as a set\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+AWGN series - open the AWGN series processing dialog\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+select lower, upper, step for a series of simulation runs\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Choose output folder\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+open folder (directory) selection folder\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+select target folder (must be existing)\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+or output same as input folder (default)\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+</ul></div>\n\
+<div class=\"ulist\"><div class=\"title\">Samplerate - select from one of several menu choices</div><ul>\n\
+<li>\n\
+<p>\n\
+Same as input (default)\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+8000\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+11025\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+16000\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+22050\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+24000\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+44100\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+48000\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+<div class=\"ulist\"><div class=\"title\">Help</div><ul>\n\
+<li>\n\
+<p>\n\
+About - Version, authors, etc.\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Guide - open this html document in default html browser\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</div>\n\
+</div>\n\
+<div class=\"sect1\">\n\
+<h2 id=\"_main_dialog_controls\">5. Main Dialog Controls</h2>\n\
+<div class=\"sectionbody\">\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+Input button - select the input file.\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+selection will be shown in the output control to the right of the button.\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Output button - select the output file.\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+selection will be shown in the output control to the right of the button.\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Simul' button - open the simulation select dialog\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+The select dialog contains 5 controls\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+simulation browser - select the desired simulation with left mouse button\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Select button - load the constraints for the highlighted simulation to the main dialog\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+Once selected the next two controls become accessible\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Make any desired changes to the constraint values on the main dialog\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Update button - update the highlighted simulation with the main dialog constraints\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Delete button - delete the current simulation from the list\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Cancel button - close the select dialog\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+</ul></div>\n\
+<div class=\"admonitionblock\">\n\
+<table><tr>\n\
+<td class=\"icon\">\n\
+<div class=\"title\">Note</div>\n\
+</td>\n\
+<td class=\"content\">\n\
+<div class=\"title\">Adding a new simulation</div>\n\
+<div class=\"paragraph\"><p>You may also modify the constraints, change the simulation name accordingly, and then use the Simulation, Add menu item to add the new simulation to the displayed list.</p></div>\n\
+</td>\n\
+</tr></table>\n\
+</div>\n\
+</div>\n\
+</div>\n\
+<div class=\"sect1\">\n\
+<h2 id=\"_path_specifications\">6. Path specifications</h2>\n\
+<div class=\"sectionbody\">\n\
+<div class=\"paragraph\"><p>There are 3 possible path specifications that can be applied concurrently to the input audio stream.  Path 1 is the ground wave or direct signal path and is always present in the output signal.  Path 2 and 3 are delayed signal paths, usually sky wave path simulation.  Paths 2 and 3 can be either selected or not by the check box associated with each path.</p></div>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+Path 1 - undelayed, straight line, or ground wave path; always present\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+Spread - 2 sigma Doppler spread in Hz\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Offset - Doppler shift in Hz\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Path 2 - reflected signal path, usually skywave\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+Delay - path delay from ground wave path, in milliseconds\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Spread - 2 sigma Doppler spread in Hz\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Offset - Doppler shift in Hz\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Path 3 - reflected signal path, usually skywave\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+Delay - path delay from ground wave path, in milliseconds\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Spread - 2 sigma Doppler spread in Hz\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Offset - Doppler shift in Hz\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+</ul></div>\n\
+</div>\n\
+</div>\n\
+<div class=\"sect1\">\n\
+<h2 id=\"_awgn_specifications\">7. AWGN specifications</h2>\n\
+<div class=\"sectionbody\">\n\
+<div class=\"paragraph\"><p>Gaussian noise can be added to the signal.  The S/N value is in dB with respect to the input audio stream; ie: 6 dB results in an output audio stream with a +6 dB signal to noise ratio.</p></div>\n\
+</div>\n\
+</div>\n\
+<div class=\"sect1\">\n\
+<h2 id=\"ref-batch\">8. Batch Processing</h2>\n\
+<div class=\"sectionbody\">\n\
+<div class=\"paragraph\"><p>The batch processing dialog is similar to the select dialog in that it contains a list browser and 4 buttons.  The list browser is different in that each line can be selected by toggling it’s associated check box.</p></div>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+Clear button   - clear all list check boxes\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+All button     - set all list check boxes\n\
+</p>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Process button - process each of the checked list items\n\
+</p>\n\
+<div class=\"ulist\"><ul>\n\
+<li>\n\
+<p>\n\
+as each item is processed a simulation will be performed and the output audio stream written to a file whose name is a composite of the input audio stream file-name and the current simulation name.  The main dialog constraints will display the simulation values as each one is processed.  White space and directory/folder designation characters will be change to an underscore for the final file-name.  The file will be either stored in the same folder as the input wav file or in the designa [...]
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</li>\n\
+<li>\n\
+<p>\n\
+Cancel         - close the batch process dialog\n\
+</p>\n\
+</li>\n\
+</ul></div>\n\
+</div>\n\
+</div>\n\
+<div class=\"sect1\">\n\
+<h2 id=\"ref-series\">9. AWGN Series Processing</h2>\n\
+<div class=\"sectionbody\">\n\
+<div class=\"paragraph\"><p>It’s quite common to want a series of test files at varying signal to noise ratios.  The menu item \"Simulation | AWGN series\" gives access to a simple dialog that allows the user to specify the lower, upper and step size for a sequence of AWGN tests.  Set these values and then press the \"Process\" button to generate a unique output wav file for each of requested series.  The output file-name will be a composite of the input file name and the AWGN valu [...]
+</div>\n\
+</div>\n\
+<div class=\"sect1\">\n\
+<h2 id=\"ref-credits\">10. Credits</h2>\n\
+<div class=\"sectionbody\">\n\
+<div class=\"paragraph\"><p>Copyright © 2014 David Freese, <tt>W1HKJ</tt>.</p></div>\n\
+<div class=\"paragraph\"><p>Based on AE4JY, Moe Wheatley’s PathSim.</p></div>\n\
+<div class=\"paragraph\"><p>License GPLv3+: <a href=\"http://www.gnu.org/licenses/gpl.html\">GNU GPL version 3 or later</a>.</p></div>\n\
+</div>\n\
+</div>\n\
+</div>\n\
+<div id=\"footnotes\"><hr /></div>\n\
+<div id=\"footer\">\n\
+<div id=\"footer-text\">\n\
+Last updated 2014-01-08 14:47:46 CST\n\
+</div>\n\
+</div>\n\
+</body>\n\
+</html>";
diff --git a/src/include/cmplx.h b/src/include/cmplx.h
new file mode 100644
index 0000000..4c33a61
--- /dev/null
+++ b/src/include/cmplx.h
@@ -0,0 +1,11 @@
+#ifndef __COMPLEX_H
+#define __COMPLEX_H
+
+struct cmplx { 
+	double x; 
+	double y;
+	cmplx() {x = 0; y = 0; }
+	cmplx(double a, double b) { x = a; y = b;}
+};
+
+#endif
diff --git a/src/include/csv.h b/src/include/csv.h
new file mode 100644
index 0000000..efaf92b
--- /dev/null
+++ b/src/include/csv.h
@@ -0,0 +1,116 @@
+// =====================================================================
+//
+// csvdb.h
+//
+// comma separated value database file support for linsim
+//
+// Copyright 2013, Dave Freese, W1HKJ
+//
+// =====================================================================
+
+#ifndef CSVDB_H
+#define CSVDB_H
+
+#include <stdlib.h>
+
+#include <string.h>
+#include <string>
+#include <vector>
+#include <list>
+#include <iostream>
+#include <fstream>
+
+using namespace std;
+
+struct csvRecord {
+	string title;
+	string awgn;
+	string sn;
+	string p0;
+	string spread_0;
+	string offset_0;
+	string p1;
+	string delay_1;
+	string spread_1;
+	string offset_1;
+	string p2;
+	string delay_2;
+	string spread_2;
+	string offset_2;
+	csvRecord() {
+		title.clear();
+		awgn.clear();
+		sn.clear();
+		p0.clear();
+		spread_0.clear();
+		offset_0.clear();
+		p1.clear();
+		delay_1.clear();
+		spread_1.clear();
+		offset_1.clear();
+		p2.clear();
+		delay_2.clear();
+		spread_2.clear();
+		offset_2.clear();
+	}
+	csvRecord(string atitle, string wgn, string asn, string ap0, string asp0, string aof0,
+			string ap1, string adel1, string asp1, string aof1,
+			string ap2, string adel2, string asp2, string aof2){
+		title = atitle;
+		awgn = wgn;
+		sn = asn;
+		p0 = ap0;
+		spread_0 = asp0;
+		offset_0 = aof0;
+		p1 = ap1;
+		delay_1 = adel1;
+		spread_1 = asp1;
+		offset_1 = aof1;
+		p2 = ap2;
+		delay_2 = adel2;
+		spread_2 = asp2;
+		offset_2 = aof2;
+	}
+};
+
+class csvdb {
+private:
+	static const char *csvFields;
+	string dbfilename;
+	csvRecord record;
+	int cur_recnbr;
+public:
+	vector<csvRecord> dbrecs;
+
+	csvdb() {
+		dbfilename.clear();
+		cur_recnbr = 0;
+	}
+	csvdb(string fname) {
+		dbfilename.assign(fname);
+		cur_recnbr = 0;
+	}
+	~csvdb() {}
+	void filename(string fname) { dbfilename.assign(fname); }
+	string filename() { return dbfilename; }
+	int save();
+	int load();
+	void load_defaults();
+	int numrecs() { return (int)dbrecs.size(); }
+	int get(size_t n, csvRecord &rec);
+	int put(size_t n, csvRecord &rec);
+	int add(csvRecord &rec);
+	void sort();
+	int recnbr() { return cur_recnbr; }
+	int erase(size_t n);
+	string delimit(string s);
+	string trim(string s);
+	void field(string &s, string &fld);
+	bool split(string s, csvRecord &rec);
+	void join(csvRecord &rec, string &s);
+	void clearrec(csvRecord &rec);
+	bool mapheader(string s);
+	void printrec(int);
+};
+
+#endif
diff --git a/src/include/delay.h b/src/include/delay.h
new file mode 100644
index 0000000..390da90
--- /dev/null
+++ b/src/include/delay.h
@@ -0,0 +1,53 @@
+// ---------------------------------------------------------------------
+// Delay.h: interface for the CDelay class.
+//
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+// 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 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.
+// ---------------------------------------------------------------------
+
+#ifndef DELAY_H
+#define DELAY_H
+
+#include <math.h>
+#include "cmplx.h"
+
+class CDelay  
+{
+public:
+	void SampleRate(double sr);
+	void CreateDelays( cmplx* inbuf, bool bt1, cmplx* t1buf, bool bt2, cmplx* t2buf );
+	void SetDelays( double t1, double t2);
+	void CalcBPFilter(double* pIn, cmplx* pOut);
+	CDelay();
+	virtual ~CDelay();
+
+private:
+	int m_FirState;
+	cmplx* m_pDelayLine;
+	cmplx* m_pQue;
+	int m_T1ptr;
+	int m_T2ptr;
+	int m_Inptr;
+	double samplerate;
+	int max_delay;
+	int buf_size;
+};
+
+#endif
diff --git a/src/include/filter_tables.h b/src/include/filter_tables.h
new file mode 100644
index 0000000..e3f122c
--- /dev/null
+++ b/src/include/filter_tables.h
@@ -0,0 +1,151 @@
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#ifndef FilterTablesXYZ
+#define FilterTablesXYZ
+
+#include <math.h>
+
+#define PI2 (M_PI * 2.0)
+#define HILBPFIR_LENGTH 59
+
+extern double IHilbertBPFirCoef[];
+extern double QHilbertBPFirCoef[];
+extern void init_BPFir(double sr);
+
+///////////////////////////////////////////////////
+//  Filter type:   FIR filter (5X Interpolation LP)
+//  Design method: Parks-McClellan method
+//  Number of taps  =  50 
+//  Number of bands =  2 
+//  Band     Lower       Upper       GN Value    Weight
+//            edge        edge
+//
+//   1			0.0			.03125		5.		  1.
+//   2			.1			.5			.00001    10.
+////////////////////////////////////////////////////
+#define INTP_FIR_SIZE 50
+#define INTP_VALUE 5
+#define INTP_QUE_SIZE (INTP_FIR_SIZE/INTP_VALUE)
+
+const double X5IntrpFIRCoef[INTP_FIR_SIZE*2] = {
+   0.0017373164,
+   0.0036097115,
+   0.0065540159,
+    0.010062068,
+    0.013405582,
+    0.015465195,
+    0.014866029,
+    0.010251076,
+  0.00066805735,
+   -0.014014494,
+   -0.032719002,
+   -0.052952292,
+   -0.070832208,
+   -0.081436194,
+   -0.079445844,
+   -0.060037751,
+   -0.019846439,
+    0.042136111,
+     0.12396486,
+     0.22055661,
+     0.32405698,
+     0.42468841,
+     0.51203738,
+     0.57649606,
+     0.61072876,
+     0.61072876,
+     0.57649606,
+     0.51203738,
+     0.42468841,
+     0.32405698,
+     0.22055661,
+     0.12396486,
+    0.042136111,
+   -0.019846439,
+   -0.060037751,
+   -0.079445844,
+   -0.081436194,
+   -0.070832208,
+   -0.052952292,
+   -0.032719002,
+   -0.014014494,
+  0.00066805735,
+    0.010251076,
+    0.014866029,
+    0.015465195,
+    0.013405582,
+    0.010062068,
+   0.0065540159,
+   0.0036097115,
+   0.0017373164,
+//
+   0.0017373164,
+   0.0036097115,
+   0.0065540159,
+    0.010062068,
+    0.013405582,
+    0.015465195,
+    0.014866029,
+    0.010251076,
+  0.00066805735,
+   -0.014014494,
+   -0.032719002,
+   -0.052952292,
+   -0.070832208,
+   -0.081436194,
+   -0.079445844,
+   -0.060037751,
+   -0.019846439,
+    0.042136111,
+     0.12396486,
+     0.22055661,
+     0.32405698,
+     0.42468841,
+     0.51203738,
+     0.57649606,
+     0.61072876,
+     0.61072876,
+     0.57649606,
+     0.51203738,
+     0.42468841,
+     0.32405698,
+     0.22055661,
+     0.12396486,
+    0.042136111,
+   -0.019846439,
+   -0.060037751,
+   -0.079445844,
+   -0.081436194,
+   -0.070832208,
+   -0.052952292,
+   -0.032719002,
+   -0.014014494,
+  0.00066805735,
+    0.010251076,
+    0.014866029,
+    0.015465195,
+    0.013405582,
+    0.010062068,
+   0.0065540159,
+   0.0036097115,
+   0.0017373164
+ };
+
+#endif
diff --git a/src/include/filters.h b/src/include/filters.h
new file mode 100644
index 0000000..8b3dd24
--- /dev/null
+++ b/src/include/filters.h
@@ -0,0 +1,181 @@
+// ---------------------------------------------------------------------
+// Copyright  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#ifndef _FILTER_H
+#define _FILTER_H
+
+//#include "complex.h"
+#include <cmath>
+#include <complex>
+
+typedef std::complex<double> cmplx;
+
+//=====================================================================
+// FIR filters
+//=====================================================================
+
+class C_FIR_filter {
+#define FIRBufferLen 4096
+private:
+	int length;
+	int decimateratio;
+
+	double *ifilter;
+	double *qfilter;
+
+	double ffreq;
+
+	double ibuffer[FIRBufferLen];
+	double qbuffer[FIRBufferLen];
+
+	int pointer;
+	int counter;
+
+	cmplx fu;
+
+	inline double sinc(double x) {
+		if (fabs(x) < 1e-10)
+			return 1.0;
+		else
+			return sin(M_PI * x) / (M_PI * x);
+	}
+	inline double cosc(double x) {
+		if (fabs(x) < 1e-10)
+			return 0.0;
+		else
+			return (1.0 - cos(M_PI * x)) / (M_PI * x);
+	}
+	inline double hamming(double x) {
+		return 0.54 - 0.46 * cos(2 * M_PI * x);
+	}
+	inline double blackman(double x) {
+		return (0.42 - 
+				 0.50 * cos(2.0 * M_PI * x) + 
+				 0.08 * cos(4.0 * M_PI * x));
+	}
+	inline double hanning(double x) {
+		return 0.5 - 0.5 * cos(2 * M_PI * x);
+	}
+	inline double mac(const double *a, const double *b, unsigned int size) {
+		double sum = 0.0;
+		double sum2 = 0.0;
+		double sum3 = 0.0;
+		double sum4 = 0.0;
+		// Reduces read-after-write dependencies : Each subsum does not wait for the others.
+		// The CPU can therefore schedule each line independently.
+		for (; size > 3; size -= 4, a += 4, b+=4)
+		{
+			sum  += a[0] * b[0];
+			sum2 += a[1] * b[1];
+			sum3 += a[2] * b[2];
+			sum4 += a[3] * b[3];
+		}
+		for (; size; --size)
+			sum += (*a++) * (*b++);
+		return sum + sum2 + sum3 + sum4 ;
+	}
+
+protected:
+
+public:
+	C_FIR_filter ();
+	~C_FIR_filter ();
+	void init (int len, int dec, double *ifil, double *qfil);
+	void init_lowpass (int len, int dec, double freq );
+	void init_bandpass (int len, int dec, double freq1, double freq2);
+	void init_hilbert (int len, int dec, double lower = 0.05, double upper = 0.45);
+	double *bp_FIR(int len, int hilbert, double f1, double f2);
+	void dump();
+	int run (const cmplx &in, cmplx &out);
+	int Irun (const double &in, double &out);
+	int Qrun (const double &in, double &out);
+
+	double *Ivals() { return ifilter; }
+	double *Qvals() { return qfilter; }
+};
+
+//=====================================================================
+// Moving average filter
+//=====================================================================
+
+class Cmovavg {
+#define MAXMOVAVG 2048
+private:
+	double	*in;
+	double	out;
+	int		len, pint;
+	bool	empty;
+public:
+	Cmovavg(int filtlen);
+	~Cmovavg();
+	double run(double a);
+	void setLength(int filtlen);
+	void reset();
+};
+
+
+//=====================================================================
+// Sliding FFT
+//=====================================================================
+
+class sfft {
+#define K1 0.99999999999L
+private:
+	int fftlen;
+	int first;
+	int last;
+	int ptr;
+	struct vrot_bins_pair ;
+	vrot_bins_pair * __restrict__ vrot_bins ;
+	cmplx * __restrict__ delay;
+	double k2;
+public:
+	sfft(int len, int first, int last);
+	~sfft();
+	void run(const cmplx& input, cmplx * __restrict__ result, int stride );
+};
+
+
+
+//=============================================================================
+// Goertzel DFT
+//=============================================================================
+
+class goertzel {
+private:
+	int N;
+	int count;
+	double Q0;
+	double Q1;
+	double Q2;
+	double k1;
+	double k2;
+	double k3;
+	bool isvalid;
+public:
+	goertzel(int n, double freq, double sr);
+	~goertzel();
+	void reset();
+	void reset(int n, double freq, double sr);
+	bool run(double v);
+	double real();
+	double imag();
+	double mag();
+};
+
+#endif				/* _FILTER_H */
diff --git a/src/include/gauss_fir.h b/src/include/gauss_fir.h
new file mode 100644
index 0000000..e497ae2
--- /dev/null
+++ b/src/include/gauss_fir.h
@@ -0,0 +1,47 @@
+// ---------------------------------------------------------------------
+// GaussFIR.h: interface for the CGaussFIR class.
+//
+//    A Gaussian shaped cmplx FIR LP filter class.
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#ifndef GUASS_H
+#define GAUSS_H
+
+#include <math.h>
+#include "cmplx.h"
+
+class CGaussFIR  
+{
+public:
+	void Init( double Fs, double F2sig );
+	CGaussFIR();
+	virtual ~CGaussFIR();
+	cmplx CalcFilter(cmplx in);
+
+private:
+	double* m_pCoef;
+	int m_FIRlen;
+	int m_FirState;
+	cmplx* m_pQue;
+
+	double dnorm(double x, double mu, double sigma);
+};
+
+#endif
diff --git a/src/include/linsim_ui.h b/src/include/linsim_ui.h
new file mode 100644
index 0000000..8efe4e9
--- /dev/null
+++ b/src/include/linsim_ui.h
@@ -0,0 +1,82 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.0302
+
+#ifndef linsim_ui_h
+#define linsim_ui_h
+#include <FL/Fl.H>
+#include <FL/Fl_Double_Window.H>
+extern Fl_Double_Window *linsim_window;
+#include <FL/Fl_Menu_Bar.H>
+#include <FL/Fl_Button.H>
+extern Fl_Button *btn_select_input;
+#include <FL/Fl_Output.H>
+extern Fl_Output *txt_input_file;
+extern Fl_Button *btn_select_output;
+extern Fl_Output *txt_output_file;
+extern Fl_Button *btn_select_simulation;
+#include <FL/Fl_Input.H>
+extern Fl_Input *txt_simulation;
+extern Fl_Output *txt_simulations_filename;
+#include <FL/Fl_Group.H>
+#include <FL/Fl_Check_Button.H>
+extern Fl_Check_Button *p0_on;
+#include <FL/Fl_Float_Input.H>
+extern Fl_Float_Input *inp_spread0;
+extern Fl_Float_Input *inp_offset0;
+extern Fl_Check_Button *p1_on;
+extern Fl_Float_Input *inp_delay1;
+extern Fl_Float_Input *inp_spread1;
+extern Fl_Float_Input *inp_offset1;
+extern Fl_Check_Button *p2_on;
+extern Fl_Float_Input *inp_delay2;
+extern Fl_Float_Input *inp_spread2;
+extern Fl_Float_Input *inp_offset2;
+extern Fl_Check_Button *inp_AWGN_on;
+extern Fl_Float_Input *inp_AWGN_rms;
+#include <FL/Fl_Progress.H>
+extern Fl_Progress *progress;
+extern Fl_Button *btn_test;
+extern Fl_Group *lbl_batch;
+Fl_Double_Window* make_linsim_window();
+extern Fl_Menu_Item menu_[];
+#define mnu_open_simulation_set (menu_+1)
+#define mnu_save_simulation_set (menu_+2)
+#define mnu_save_simulation_set_as (menu_+3)
+#define mnuAddSimulation (menu_+7)
+#define mnuBatchProcess (menu_+8)
+#define mnuAWGNseries (menu_+9)
+#define mnu_choose_folder (menu_+10)
+#define mnu_sr_as_input (menu_+13)
+#define mnu_sr_8000 (menu_+14)
+#define mnu_sr_11025 (menu_+15)
+#define mnu_sr_16000 (menu_+16)
+#define mnu_sr_22050 (menu_+17)
+#define mnu_sr_24000 (menu_+18)
+#define mnu_sr_44100 (menu_+19)
+#define mnu_sr_48000 (menu_+20)
+extern Fl_Menu_Item menu_1[];
+#include <FL/Fl_Check_Browser.H>
+extern Fl_Check_Browser *tbl_batch_simulations;
+extern Fl_Button *btn_cancel_batch;
+extern Fl_Button *btn_clear_batch_selections;
+extern Fl_Button *btn_all_batch;
+#include <FL/Fl_Return_Button.H>
+extern Fl_Return_Button *btn_batch_process;
+Fl_Double_Window* make_batch_selector_dialog();
+extern Fl_Return_Button *btn_select;
+#include <FL/Fl_Browser.H>
+extern Fl_Browser *tbl_simulations;
+extern Fl_Button *btn_delete_selection;
+extern Fl_Button *btn_update_selection;
+Fl_Double_Window* make_selector_dialog();
+#include <FL/Fl_Spinner.H>
+extern Fl_Spinner *cntr_Low_dB;
+extern Fl_Spinner *cntr_High_dB;
+extern Fl_Spinner *cntr_Step_dB;
+extern Fl_Return_Button *btn_AWGNseries_process;
+extern Fl_Button *btn_cancel_AWGNseries;
+Fl_Double_Window* make_AWGNseries_dialog();
+#include <FL/Fl_File_Input.H>
+extern Fl_File_Input *finp_output_wav_folder;
+extern Fl_Check_Button *btn_same_as_input_file;
+Fl_Double_Window* make_folder_dialog();
+#endif
diff --git a/src/include/linsimrc.h b/src/include/linsimrc.h
new file mode 100644
index 0000000..bf7f645
--- /dev/null
+++ b/src/include/linsimrc.h
@@ -0,0 +1,3 @@
+// MS include file for application icon
+
+#define IDI_ICON  101
diff --git a/src/include/main.h b/src/include/main.h
new file mode 100644
index 0000000..7193a0d
--- /dev/null
+++ b/src/include/main.h
@@ -0,0 +1,63 @@
+//======================================================================
+//  linsim; main.h
+//    Author: Dave Freese, W1HKJ <w1hkj at w1hkj.com>
+//
+//  based on the program RTTY Compare by
+//    Alex Shovkoplyas, VE3NEA ve3nea at dxatlas.com
+//  Original written in Pascal and distributed only for Windows OS
+//
+//  This program is distributed under the GPL license
+//======================================================================
+
+#include <string>
+
+#include "linsim_ui.h"
+#include "sim_vals.h"
+#include "sim.h"
+#include "csv.h"
+
+extern std::string BaseDir;
+extern std::string HomeDir;
+extern std::string fname_in;
+extern std::string fname_out;
+
+extern csvdb simulations;
+extern SIM sim_test;
+extern _vals sim_vals;
+
+extern void clean_exit();
+extern int parse_args(int argc, char **argv, int& idx);
+
+extern void select_simulation();
+extern void add_simulation();
+extern void run_simulation();
+
+extern void tbl_simulations_selected();
+extern void cancel_selection();
+extern void delete_selection(int);
+extern void update_selection(int);
+extern void select_entry(int);
+
+extern void load_simulation_set();
+extern void save_simulation_set();
+extern void save_simulation_set_as();
+extern void populate_batch_selector();
+extern void cancel_batch_process();
+extern void batch_process_items();
+extern void open_batch_process_dialog();
+extern void clear_all_simulation();
+extern void select_all_simulations();
+
+extern void AWGNseries_dialog();
+extern void AWGNseries_process();
+extern void cancel_AWGNseries();
+
+extern void choose_batch_folder();
+extern void output_folder_select();
+extern void close_output_dialog();
+
+extern void about();
+extern void guideURL();
+
+
+
diff --git a/src/include/noise_gen.h b/src/include/noise_gen.h
new file mode 100644
index 0000000..3ecfed5
--- /dev/null
+++ b/src/include/noise_gen.h
@@ -0,0 +1,58 @@
+// ---------------------------------------------------------------------
+// NoiseGen.h: interface for the CNoiseGen class.
+//
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#ifndef NOISEGEN_H
+#define NOISEGEN_H
+
+#include "filter_tables.h"
+
+// pathsim original
+
+class CNoiseGen  
+{
+public:
+	void InitNoiseGen();
+	void AddBWLimitedNoise(int bufsize,double* pIn, double siggain, double RMSlevel);
+	CNoiseGen();
+	virtual ~CNoiseGen();
+
+private:
+	double m_pQue[HILBPFIR_LENGTH];
+	int m_FirState;
+};
+
+/* linsim implementation
+class CNoiseGen  
+{
+public:
+	void InitNoiseGen();
+	void AddBWLimitedNoise(int bufsize,double* pIn, double siggain, double RMSlevel);
+	CNoiseGen();
+	virtual ~CNoiseGen();
+
+private:
+	double m_pQue[HILBPFIR_LENGTH];
+	int m_FirState;
+};
+*/
+
+#endif
diff --git a/src/include/path.h b/src/include/path.h
new file mode 100644
index 0000000..afe8f73
--- /dev/null
+++ b/src/include/path.h
@@ -0,0 +1,70 @@
+// ---------------------------------------------------------------------
+// Path.h: interface for the CPath class.
+//
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#ifndef PATH_H
+#define PATH_H
+
+#include <math.h>
+#include "filter_tables.h"
+#include "gauss_fir.h"
+#include "cmplx.h"
+
+// pathsim original
+
+class CPath  
+{
+public:
+	void CalcPath( cmplx* pIn, cmplx* pOut);
+	void InitPath( double Spread, double Offset, int blocksize, int numpaths, bool active);
+	void SampleRate( double sr );
+	CPath();
+	virtual ~CPath();
+	bool active() { return m_PathActive;}
+	void blocksize( int b ) {m_BlockSize = b;}
+
+private:
+	int m_IIRLength;
+	cmplx MakeGaussianDelaySample();
+	int m_NoiseSampRate;
+	bool m_PathActive;
+	int m_inc;
+	int m_BlockSize;
+	int m_Indx;
+	double m_Offset;
+	double m_Spread;
+	double m_LPGain;
+	double m_Timeinc;
+	cmplx m_pQue0[INTP_QUE_SIZE];
+	cmplx m_pQue1[INTP_QUE_SIZE];
+	cmplx m_pQue2[INTP_QUE_SIZE];
+	cmplx m_pQue3[INTP_QUE_SIZE];
+	int m_FirState0;
+	int m_FirState1;
+	int m_FirState2;
+	int m_FirState3;
+	CGaussFIR* m_pLPFIR;
+	double samplerate;
+	double offset_freq;
+
+};
+
+#endif
diff --git a/src/include/sim.h b/src/include/sim.h
new file mode 100644
index 0000000..328bda3
--- /dev/null
+++ b/src/include/sim.h
@@ -0,0 +1,99 @@
+// ---------------------------------------------------------------------
+// SIM.h: interface for the SIM class.
+//
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//This program is free software; you can redistribute it and/or
+//modify it under the terms o7f the GNU General Public License
+//as published by the Free Software Foundation; either version 2
+//of the License, or 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.
+// ---------------------------------------------------------------------
+
+#ifndef SIH
+#define SIH
+
+#include "noise_gen.h"
+#include "delay.h"
+#include "path.h"
+#include "cmplx.h"
+#include "sound.h"
+
+#define MAX_BUF_SIZE 2048	// maximum # of data values to process at a time
+#define RMS_MAXAMPLITUDE (4000.0 / 32768.0)
+//#define RMS_MAXAMPLITUDE 4000.0	//RMS amplitude out of 32768
+								// pick so that worst case Gaussian noise
+								// plus signals will not overflow soundcard
+#define RMSAVE 20
+
+struct PATH_INFO {
+	bool active;
+	double spread;
+	double offset;
+	int blocksize;
+};
+
+struct DELAY_INFO {
+	bool direct;
+	double delay1;
+	double delay2;
+};
+
+
+class SIM {
+public:
+	SIM();
+	~SIM();
+	void Process( double *samples, int BUF_SIZE);
+	void measure_rms( double *samples, int BUF_SIZE);
+
+	void SetsnrValue(double snrdb) {
+		snr = pow(10.0, snrdb/20.0);
+	}
+	void ReadGains( double& noise_gain, double& signal_gain) {
+		signal_gain = signal_gain;
+		noise_gain = noise_rms / RMS_MAXAMPLITUDE;
+	}
+
+	void AWGN( bool val) { b_awgn = val; }
+	bool AWGN() { return b_awgn; }
+
+	double snr;
+	double signal_rms;
+	double noise_rms;
+	double signal_gain;
+	size_t  num_buffs;
+	double signal_peak;
+
+	void init(double sr, PATH_INFO &p0, PATH_INFO &p1, PATH_INFO &p2, DELAY_INFO &d);
+
+	SoundFile sound_in;
+	SoundFile sound_out;
+
+private:
+	bool b_awgn;
+	int    numpaths;
+	double samplerate;
+	double ssum;
+	double sim_buffer[MAX_BUF_SIZE];
+	cmplx delay0_buffer[MAX_BUF_SIZE];
+	cmplx delay1_buffer[MAX_BUF_SIZE];
+	cmplx delay2_buffer[MAX_BUF_SIZE];
+	CDelay* delay;
+	CPath* path0;
+	CPath* path1;
+	CPath* path2;
+	CNoiseGen* noise_gen;
+};
+
+#endif
diff --git a/src/include/sim_vals.h b/src/include/sim_vals.h
new file mode 100644
index 0000000..cd94251
--- /dev/null
+++ b/src/include/sim_vals.h
@@ -0,0 +1,58 @@
+// ---------------------------------------------------------------------
+// Copyright 2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#ifndef PATHSIMDOC_H
+#define PATHSIMDOC_H
+
+enum {OFF, ON};
+
+#include "sim.h"
+
+struct _vals
+{
+	_vals() {
+		AWGN_on = false;
+		snrdb = 0;
+		p0.active = false;
+		p0.offset = 0.0;
+		p0.spread = 1.0;
+		p1.active = false;
+		p1.offset = 0.0;
+		p1.spread = 1.0;
+		p2.active = false;
+		p2.offset = 0.0;
+		p2.spread = 1.0;
+		d.delay1 = 0.0;
+		d.delay2 = 0.0;
+		state = OFF;
+	}
+
+	bool	AWGN_on;
+	double	snrdb;
+
+	PATH_INFO p0;
+	PATH_INFO p1;
+	PATH_INFO p2;
+	DELAY_INFO d;
+
+	int		state;
+};
+
+extern _vals sim_vals;
+
+#endif
diff --git a/src/include/sound.h b/src/include/sound.h
new file mode 100644
index 0000000..7f34098
--- /dev/null
+++ b/src/include/sound.h
@@ -0,0 +1,110 @@
+// ----------------------------------------------------------------------------
+//
+//      sound.h
+//
+// Copyright (C) 2006-2013
+//              Dave Freese, W1HKJ
+//
+// Copyright (C) 2007-2013
+//              Stelios Bounanos, M0GLD
+//
+// This file is part of linSIM.
+//
+// linSIM 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 3 of the License, or
+// (at your option) any later version.
+//
+// linSIM 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 linSIM.  If not, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#ifndef _SOUND_H
+#define _SOUND_H
+
+#include <string>
+#include <cstring>
+#include <climits>
+
+#include <sndfile.h>
+#include <samplerate.h>
+
+class SndException : public std::exception
+{
+public:
+	SndException(int err_ = 0)
+		: err(err_), msg(std::string("Sound error: ") + err_to_str(err_))
+	{ }
+	SndException(const char* msg_)
+		: err(1), msg(msg_)
+	{ }
+	SndException(int err_, const std::string& msg_) : err(err_), msg(msg_) { }
+	virtual ~SndException() throw() { }
+
+	const char*	what(void) const throw() { return msg.c_str(); }
+	int		error(void) const { return err; }
+
+protected:
+	const char* err_to_str(int e) { return strerror(e); }
+
+	int		err;
+	std::string	msg;
+};
+
+#define SNDFILE_CHANNELS 1
+
+class SoundFile {
+public:
+enum {READ, WRITE};
+
+protected:
+	SNDFILE* snd_file;
+	int		format;
+	int		sample_frequency;
+	int		mode;
+
+	SF_INFO read_info;
+	SF_INFO write_info;
+
+	SRC_STATE	*writ_src_state;
+	SRC_STATE	*read_src_state;
+
+	SRC_DATA	*writ_src_data;
+	SRC_DATA	*read_src_data;
+
+	float		*src_out_buffer;
+	float		*src_inp_buffer;
+	float		*inp_pointer;
+
+	std::string fname;
+
+	void	 tag_file(SNDFILE *sndfile, const char *title);
+
+public:
+	SoundFile(std::string _fname = "", int _mode = READ, int freq = 8000);
+	~SoundFile();
+	int     open(std::string _fname, int _mode);
+	void    close();
+
+	size_t  write(float *buf, size_t count);
+	size_t  read(float *buf, size_t count);
+
+	size_t  write(double *buf, size_t count);
+	size_t  read(double *buf, size_t count);
+
+	void rewind();
+
+//	size_t  Write_stereo(double *, double *, size_t);
+
+};
+
+extern std::string file_name(std::string def_fname);
+extern int inpfile_samplerate;
+extern int outfile_samplerate;
+
+#endif // SOUND_H
diff --git a/src/linsim.rc b/src/linsim.rc
new file mode 100644
index 0000000..974eb8e
--- /dev/null
+++ b/src/linsim.rc
@@ -0,0 +1,18 @@
+//======================================================================
+//  linsim; windows rc file
+//    Author: Dave Freese, W1HKJ <w1hkj at w1hkj.com>
+//
+//  based on the program RTTY Compare by
+//    Alex Shovkoplyas, VE3NEA ve3nea at dxatlas.com
+//  Original written in Pascal and distributed only for Windows OS
+//
+//  This program is distributed under the GPL license
+//======================================================================
+
+#include <windows.h> // include for version info constants
+
+#include "linsimrc.h"
+
+IDI_ICON ICON DISCARDABLE "linsim.ico"
+
+
diff --git a/src/linsim_icon.cxx b/src/linsim_icon.cxx
new file mode 100644
index 0000000..7ed6cc4
--- /dev/null
+++ b/src/linsim_icon.cxx
@@ -0,0 +1,517 @@
+/* XPM */
+static const char * linsim_icon[] = {
+"48 48 466 2",
+"  	c None",
+". 	c #667F9B",
+"+ 	c #61696B",
+"@ 	c #5A5D5A",
+"# 	c #60686B",
+"$ 	c #677E9A",
+"% 	c #63727E",
+"& 	c #898B89",
+"* 	c #ECEDEB",
+"= 	c #F3F3F2",
+"- 	c #EAEBE8",
+"; 	c #C9CBC8",
+"> 	c #676B68",
+", 	c #63737F",
+"' 	c #68829E",
+") 	c #797C78",
+"! 	c #FFFFFF",
+"~ 	c #EDEEEC",
+"{ 	c #E8EAE6",
+"] 	c #E3E6E2",
+"^ 	c #676A66",
+"/ 	c #6883A2",
+"( 	c #5081BB",
+"_ 	c #729FD1",
+": 	c #616B6F",
+"< 	c #DFE0DE",
+"[ 	c #F8F8F7",
+"} 	c #E5E7E3",
+"| 	c #BCBEB9",
+"1 	c #616C70",
+"2 	c #72A0D0",
+"3 	c #5482BA",
+"4 	c #4A7AB3",
+"5 	c #729FCF",
+"6 	c #5B605D",
+"7 	c #E8EAE8",
+"8 	c #FBFCFB",
+"9 	c #F9FAF9",
+"0 	c #ECEEEB",
+"a 	c #E2E4E0",
+"b 	c #D6DAD5",
+"c 	c #5B615E",
+"d 	c #729FCE",
+"e 	c #4C7BB4",
+"f 	c #4A79B3",
+"g 	c #729ECF",
+"h 	c #739ED0",
+"i 	c #5C605F",
+"j 	c #E1E3DF",
+"k 	c #F0F1EF",
+"l 	c #F3F4F2",
+"m 	c #F2F3F1",
+"n 	c #E9EBE8",
+"o 	c #E1E2DE",
+"p 	c #D1D4CE",
+"q 	c #5C615F",
+"r 	c #739FCF",
+"s 	c #6998C9",
+"t 	c #497AB4",
+"u 	c #4D7CB5",
+"v 	c #5C8DC1",
+"w 	c #719FD2",
+"x 	c #749FCF",
+"y 	c #636E75",
+"z 	c #BBBEBA",
+"A 	c #E3E5E0",
+"B 	c #E1E4DF",
+"C 	c #E7E9E5",
+"D 	c #DFE2DC",
+"E 	c #ACAFAA",
+"F 	c #626F76",
+"G 	c #608FC5",
+"H 	c #4E7EB6",
+"I 	c #5484B9",
+"J 	c #5383B9",
+"K 	c #71A0CF",
+"L 	c #739ECE",
+"M 	c #6B8EB1",
+"N 	c #616562",
+"O 	c #D9DCD7",
+"P 	c #E0E3DE",
+"Q 	c #DDE0DB",
+"R 	c #DDE0DA",
+"S 	c #DEE1DB",
+"T 	c #D0D4CE",
+"U 	c #5E635F",
+"V 	c #6C8EB2",
+"W 	c #73A0CE",
+"X 	c #5484BB",
+"Y 	c #5584B9",
+"Z 	c #5E8CBE",
+"` 	c #4877B3",
+" .	c #729DCF",
+"..	c #719FCF",
+"+.	c #719ECF",
+"@.	c #687883",
+"#.	c #626462",
+"$.	c #AFB2AC",
+"%.	c #CCCFC9",
+"&.	c #CBCDC8",
+"*.	c #A9ADA7",
+"=.	c #606260",
+"-.	c #687A88",
+";.	c #4877B2",
+">.	c #5E8CC2",
+",.	c #4173B0",
+"'.	c #4876B2",
+").	c #5988BE",
+"!.	c #729FD0",
+"~.	c #7398C0",
+"{.	c #8091A1",
+"].	c #A7B8CA",
+"^.	c #6D797F",
+"/.	c #5F6667",
+"(.	c #6B7880",
+"_.	c #9AAFC6",
+":.	c #7C95AA",
+"<.	c #7299C3",
+"[.	c #5A89BD",
+"}.	c #4877B1",
+"|.	c #4472AF",
+"1.	c #3E6FAB",
+"2.	c #6592C7",
+"3.	c #4171AD",
+"4.	c #6C98CB",
+"5.	c #70A0CF",
+"6.	c #798999",
+"7.	c #C4D1DF",
+"8.	c #C4D6EA",
+"9.	c #768EA5",
+"0.	c #729CC9",
+"a.	c #719ECA",
+"b.	c #758FA9",
+"c.	c #B6CCE4",
+"d.	c #B7C9DD",
+"e.	c #778DA1",
+"f.	c #739FD0",
+"g.	c #6A99CB",
+"h.	c #4272AD",
+"i.	c #6893C7",
+"j.	c #4171AC",
+"k.	c #4576AF",
+"l.	c #71A0D0",
+"m.	c #5483BB",
+"n.	c #4675AF",
+"o.	c #6C8FB4",
+"p.	c #8E9597",
+"q.	c #E1EAF4",
+"r.	c #AAB8C5",
+"s.	c #7793AC",
+"t.	c #73A0CF",
+"u.	c #719FCE",
+"v.	c #7793AE",
+"w.	c #A2B3C5",
+"x.	c #D4E1F0",
+"y.	c #89949C",
+"z.	c #6B92B7",
+"A.	c #4675B1",
+"B.	c #5583BB",
+"C.	c #4677B1",
+"D.	c #4070AC",
+"E.	c #709ECE",
+"F.	c #5283BA",
+"G.	c #436DA0",
+"H.	c #ABBCD2",
+"I.	c #ECF1F5",
+"J.	c #7E898F",
+"K.	c #739BC4",
+"L.	c #729AC4",
+"M.	c #7C8994",
+"N.	c #DFE7EF",
+"O.	c #A1B5CF",
+"P.	c #416A9F",
+"Q.	c #5582BC",
+"R.	c #6F9FCE",
+"S.	c #5F8BC0",
+"T.	c #4172AE",
+"U.	c #3F70AD",
+"V.	c #719FD0",
+"W.	c #7496B6",
+"X.	c #8B949C",
+"Y.	c #7194C0",
+"Z.	c #5C80AD",
+"`.	c #577597",
+" +	c #5B87BA",
+".+	c #6996C9",
+"++	c #6897C8",
+"@+	c #5C8AC0",
+"#+	c #5678A0",
+"$+	c #587DAB",
+"%+	c #6D90BE",
+"&+	c #8A949B",
+"*+	c #7595B6",
+"=+	c #6997C9",
+"-+	c #4071AD",
+";+	c #4473AE",
+">+	c #739FCC",
+",+	c #729ECE",
+"'+	c #838B8E",
+")+	c #ECEDEC",
+"!+	c #F7F7F7",
+"~+	c #A7B5C5",
+"{+	c #7189A6",
+"]+	c #51719B",
+"^+	c #416BA0",
+"/+	c #416CA3",
+"(+	c #4874A8",
+"_+	c #567EAD",
+":+	c #71808E",
+"<+	c #F3F3F4",
+"[+	c #EBEBEA",
+"}+	c #828A8D",
+"|+	c #72A0CF",
+"1+	c #6F9BCB",
+"2+	c #4473AF",
+"3+	c #4977B1",
+"4+	c #7994B0",
+"5+	c #A3A6A3",
+"6+	c #FDFDFD",
+"7+	c #CCCDCC",
+"8+	c #AEB0AE",
+"9+	c #CED0CD",
+"0+	c #E9EAE8",
+"a+	c #DFE1DE",
+"b+	c #C3C3C1",
+"c+	c #A0A4A2",
+"d+	c #868A86",
+"e+	c #81837F",
+"f+	c #C5C6C3",
+"g+	c #A3A4A2",
+"h+	c #7693B3",
+"i+	c #6895C8",
+"j+	c #4373AF",
+"k+	c #4A7AB4",
+"l+	c #3F6FAD",
+"m+	c #868D8F",
+"n+	c #EFEFEE",
+"o+	c #F5F5F5",
+"p+	c #8D918D",
+"q+	c #7E919F",
+"r+	c #879297",
+"s+	c #888B88",
+"t+	c #939694",
+"u+	c #B3B5B3",
+"v+	c #CFD0CE",
+"w+	c #E7E8E5",
+"x+	c #D7D8D6",
+"y+	c #EEEEED",
+"z+	c #838C8E",
+"A+	c #3E6FAC",
+"B+	c #5080B9",
+"C+	c #728CA1",
+"D+	c #A9ABAA",
+"E+	c #FDFDFC",
+"F+	c #CACBC8",
+"G+	c #8A9294",
+"H+	c #71A0CE",
+"I+	c #7799BA",
+"J+	c #8094A7",
+"K+	c #8A9092",
+"L+	c #898B87",
+"M+	c #A0A29D",
+"N+	c #DCDDDB",
+"O+	c #E8E9E6",
+"P+	c #FCFCFC",
+"Q+	c #A9ABA9",
+"R+	c #7189A2",
+"S+	c #8C918F",
+"T+	c #F1F1F0",
+"U+	c #F1F2F1",
+"V+	c #919593",
+"W+	c #5577A0",
+"X+	c #5786BD",
+"Y+	c #5E8DC1",
+"Z+	c #6890BF",
+"`+	c #7E8FA0",
+" @	c #8B8E8C",
+".@	c #C8C9C8",
+"+@	c #F9F9F8",
+"@@	c #D4D5D2",
+"#@	c #EFF0EF",
+"$@	c #8C918D",
+"%@	c #B0B3AF",
+"&@	c #FCFCFB",
+"*@	c #CBCDC9",
+"=@	c #8C908F",
+"-@	c #5383BB",
+";@	c #527CB0",
+">@	c #748696",
+",@	c #8B8E8B",
+"'@	c #CACCCB",
+")@	c #F9F9F9",
+"!@	c #F7F8F7",
+"~@	c #DBDBD8",
+"{@	c #9EA19E",
+"]@	c #898B86",
+"^@	c #C6C8C5",
+"/@	c #FBFBFA",
+"(@	c #AFB2AF",
+"_@	c #80919F",
+":@	c #8C908D",
+"<@	c #F2F3F2",
+"[@	c #979995",
+"}@	c #7E93A5",
+"|@	c #889197",
+"1@	c #8E908C",
+"2@	c #CFD0CD",
+"3@	c #FAFAFA",
+"4@	c #F6F6F6",
+"5@	c #D6D7D4",
+"6@	c #9B9E9B",
+"7@	c #81929F",
+"8@	c #8092A3",
+"9@	c #969894",
+"0@	c #8D908C",
+"a@	c #3668A5",
+"b@	c #667C93",
+"c@	c #B5B7B5",
+"d@	c #8B8D89",
+"e@	c #899194",
+"f@	c #8F928D",
+"g@	c #D3D5D1",
+"h@	c #F4F5F4",
+"i@	c #D2D3D0",
+"j@	c #989B98",
+"k@	c #8B8F8C",
+"l@	c #8093A1",
+"m@	c #8D8F8D",
+"n@	c #C4C6C2",
+"o@	c #B4B6B3",
+"p@	c #647B91",
+"q@	c #8C8E89",
+"r@	c #F3F4F3",
+"s@	c #9B9D9A",
+"t@	c #90928E",
+"u@	c #D5D7D5",
+"v@	c #FBFBFB",
+"w@	c #CDCFCB",
+"x@	c #969794",
+"y@	c #7E92A3",
+"z@	c #70849B",
+"A@	c #969A96",
+"B@	c #E4E5E3",
+"C@	c #F2F2F1",
+"D@	c #8C8D89",
+"E@	c #BBBCB9",
+"F@	c #F8F9F8",
+"G@	c #D2D4D0",
+"H@	c #D8D9D7",
+"I@	c #F1F2F0",
+"J@	c #C9CAC7",
+"K@	c #919592",
+"L@	c #888C8C",
+"M@	c #6E859F",
+"N@	c #3A6AA7",
+"O@	c #3568A6",
+"P@	c #8B8D8A",
+"Q@	c #C3C5C0",
+"R@	c #F7F7F6",
+"S@	c #B9BAB7",
+"T@	c #8C8E8A",
+"U@	c #F5F5F4",
+"V@	c #E5E5E3",
+"W@	c #EFF0EE",
+"X@	c #91938F",
+"Y@	c #8B8F8B",
+"Z@	c #9B9D98",
+"`@	c #DEE0DC",
+" #	c #C0C0BE",
+".#	c #F6F6F5",
+"+#	c #D7D8D5",
+"@#	c #939590",
+"##	c #888A85",
+"$#	c #8A8B87",
+"%#	c #8B8D88",
+"&#	c #C1C3BE",
+"*#	c #F4F4F3",
+"=#	c #BDBEBB",
+"-#	c #8C8F8A",
+";#	c #DFE0DD",
+">#	c #F0F1F0",
+",#	c #E1E2E0",
+"'#	c #CDCECB",
+")#	c #B4B6B2",
+"!#	c #8A8C87",
+"~#	c #8C8D88",
+"{#	c #888B86",
+"]#	c #9B9D99",
+"^#	c #D8DAD6",
+"/#	c #8C8F89",
+"(#	c #C2C4C0",
+"_#	c #C9CBC7",
+":#	c #BEC0BB",
+"<#	c #CACCC8",
+"[#	c #D4D6D2",
+"}#	c #DCDEDA",
+"|#	c #E4E5E2",
+"1#	c #ECECEA",
+"2#	c #E0E1DF",
+"3#	c #CBCCCA",
+"4#	c #B2B4B0",
+"5#	c #979993",
+"6#	c #8B8D87",
+"7#	c #878884",
+"8#	c #BEC0BA",
+"9#	c #C0C2BF",
+"0#	c #8D8F8B",
+"a#	c #DADBD7",
+"b#	c #898C87",
+"c#	c #959792",
+"d#	c #A2A5A0",
+"e#	c #B0B2AD",
+"f#	c #BABDB7",
+"g#	c #C6C8C3",
+"h#	c #CFD2CC",
+"i#	c #D8D9D6",
+"j#	c #E0E2DE",
+"k#	c #EEEFEE",
+"l#	c #DEDFDD",
+"m#	c #B2B3AF",
+"n#	c #9EA09B",
+"o#	c #D1D4CF",
+"p#	c #F5F6F5",
+"q#	c #8D8F8A",
+"r#	c #888A84",
+"s#	c #C7C8C5",
+"t#	c #757771",
+"u#	c #82847F",
+"v#	c #888A86",
+"w#	c #898A86",
+"x#	c #949691",
+"y#	c #A1A39E",
+"z#	c #ACAFA9",
+"A#	c #B7B9B3",
+"B#	c #C0C3BD",
+"C#	c #CACCC7",
+"D#	c #D4D6D1",
+"E#	c #DDDFDB",
+"F#	c #E7E8E6",
+"G#	c #FAFBFA",
+"H#	c #C9CBC6",
+"I#	c #C4C5C2",
+"J#	c #8E908B",
+"K#	c #7A7B78",
+"L#	c #7A7C78",
+"M#	c #858882",
+"N#	c #8B8C87",
+"O#	c #A0A29C",
+"P#	c #AAACA6",
+"Q#	c #B3B6AF",
+"R#	c #BCBEB8",
+"S#	c #C3C6C0",
+"T#	c #BFC1BB",
+"U#	c #898A85",
+"V#	c #C0C2BD",
+"W#	c #757773",
+"X#	c #848580",
+"Y#	c #B6B8B2",
+"Z#	c #DADBD8",
+"`#	c #CED0CB",
+" $	c #A0A39D",
+".$	c #7B7C78",
+"+$	c #7D7E7A",
+"@$	c #9C9E99",
+"#$	c #C6C8C2",
+"$$	c #858783",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                          . + @ @ # $                                           ",
+"                                        % & * = - ; > ,                                         ",
+"                                      ' ) ! ! ! ~ { ] ^ /                                       ",
+"                            (       _ : < ! ! ! [ { } | 1 2 _     3                             ",
+"                            4     5 5 6 7 8 ! ! 9 0 a b c d 5 5   e                             ",
+"                            f   5 g h i j a k l m n o p q r h g s t                             ",
+"                            u v w 2 x y z A B C C B D E F r x 2 G H                             ",
+"                            I J K 5 L M N O P Q R S T U V W L 5 X Y                             ",
+"                            Z `  ...+.2 @.#.$.%.&.*.=.-. .2 +...;.>.                            ",
+"                    ,.        '.).5 !.~.{.].^././.(._.:.<.r !.[.}.g       |.                    ",
+"                    1.        2.3.4.5.6.7.8.9.0.a.b.c.d.e.f.g.h.i.h       j.                    ",
+"                      k.    5 l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B._ l.5   C.                      ",
+"                      D.      h E.F.G.H.I.J.K.+.K L.M.N.O.P.Q.R.5 h   S.T.                      ",
+"                        U.    r V.W.X.Y.Z.`. +.+++ at +#+$+%+&+*+2 V.r =+-+                        ",
+"                          ;+  >+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+,+1+2+                          ",
+"                          3+h.++4+5+6+7+8+9+0+a+b+c+d+e+f+6+g+h+i+j+k+                          ",
+"                              l+m+n+o+p+q+r+s+t+u+v+w+x+; = y+z+A+B+                            ",
+"                              C+D+E+F+G+|+H+u.I+J+K+L+M+N+O+P+Q+R+                              ",
+"                              S+T+U+V+W+k+X+Y+Z+`+ @. at +@!+@@y+#@$@                              ",
+"                              %@&@*@=@  -@;@>@,@'@)@!@~@{@]@^@/@(@_@                            ",
+"                            :@<@y+[@}@  |@1 at 2@3 at 4@5 at 6@ @7 at 8@9 at 0+T+0@  a@                        ",
+"                          b at c@3 at F+d@e at f@g@/@h at i@j at k@l@      m at n@+ at o@p@                          ",
+"                          q at r@0+s at t@u at v@r at w@x@:@y@          z at A@B at C@D@                          ",
+"                          E at F@G at H@v at I@J at K@L at M@          N at O@  P at Q@R at S@                          ",
+"                        T at U@V@~ W at n@X at Y@                        Z@`@r at P@                        ",
+"                         #.#+#n@@###$#                          %#&#*#=#                        ",
+"                      -#.#;#`@P+P+>#,#'#)#[@!#~#{#                ]#^#h@/#                      ",
+"                      (#r at _#:#<#[#}#|#1#r@&@8 #@2#3#4#5#]@6#7#    ]@8#T+9#                      ",
+"                    0#R at a#M+b#]@%#c#d#e#f#g#h#i#j#0+m v at v@k#l#F+m#5#n#o#p#q#                    ",
+"                  r#s#>#Q at 6#        t#u#v#w#%#x#y#z#A#B#C#D#E#F#T+v at G#H#~ I#r#                  ",
+"                  J#[ [#M+K#                    L#M#N#]@!#x#O#P#Q#R#S#T#&.4 at J#                  ",
+"                U#F+~ V#$#                                  W#X#]@]@!#@#Y#0+^@U#                ",
+"                %#Z#`# $.$                                            +$@$#$D#!#                ",
+"              $$########                                                ########$$              ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                "};
diff --git a/src/linsim_ui.cxx b/src/linsim_ui.cxx
new file mode 100644
index 0000000..7629ae5
--- /dev/null
+++ b/src/linsim_ui.cxx
@@ -0,0 +1,553 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.0302
+
+#include "linsim_ui.h"
+#include <string>
+#include "main.h"
+#include "csv.h"
+#include "sound.h"
+#include "sim_vals.h"
+#include "sim.h"
+
+Fl_Double_Window *linsim_window=(Fl_Double_Window *)0;
+
+static void cb_mnu_open_simulation_set(Fl_Menu_*, void*) {
+  load_simulation_set();
+}
+
+static void cb_mnu_save_simulation_set(Fl_Menu_*, void*) {
+  save_simulation_set();
+}
+
+static void cb_mnu_save_simulation_set_as(Fl_Menu_*, void*) {
+  save_simulation_set_as();
+}
+
+static void cb_E(Fl_Menu_*, void*) {
+  clean_exit();
+}
+
+static void cb_mnuAddSimulation(Fl_Menu_*, void*) {
+  add_simulation();
+}
+
+static void cb_mnuBatchProcess(Fl_Menu_*, void*) {
+  open_batch_process_dialog();
+}
+
+static void cb_mnuAWGNseries(Fl_Menu_*, void*) {
+  AWGNseries_dialog();
+}
+
+static void cb_mnu_choose_folder(Fl_Menu_*, void*) {
+  choose_batch_folder();
+}
+
+Fl_Menu_Item menu_[] = {
+ {"&File", 0,  0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
+ {"&Open", 0,  (Fl_Callback*)cb_mnu_open_simulation_set, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"&Save", 0,  (Fl_Callback*)cb_mnu_save_simulation_set, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Save &As", 0,  (Fl_Callback*)cb_mnu_save_simulation_set_as, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
+ {"E&xit", 0,  (Fl_Callback*)cb_E, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {0,0,0,0,0,0,0,0,0},
+ {"&Simulation", 0,  0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
+ {"&Add", 0,  (Fl_Callback*)cb_mnuAddSimulation, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Batch", 0,  (Fl_Callback*)cb_mnuBatchProcess, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"AWGN series", 0,  (Fl_Callback*)cb_mnuAWGNseries, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Choose ouput folder", 0,  (Fl_Callback*)cb_mnu_choose_folder, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {0,0,0,0,0,0,0,0,0},
+ {"&Samplerate", 0,  0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Same as input", 0,  0, 0, 12, FL_NORMAL_LABEL, 0, 14, 0},
+ {"8000", 0,  0, 0, 8, FL_NORMAL_LABEL, 0, 14, 0},
+ {"11025", 0,  0, 0, 8, FL_NORMAL_LABEL, 0, 14, 0},
+ {"16000", 0,  0, 0, 8, FL_NORMAL_LABEL, 0, 14, 0},
+ {"22050", 0,  0, 0, 8, FL_NORMAL_LABEL, 0, 14, 0},
+ {"24000", 0,  0, 0, 8, FL_NORMAL_LABEL, 0, 14, 0},
+ {"44100", 0,  0, 0, 8, FL_NORMAL_LABEL, 0, 14, 0},
+ {"48000", 0,  0, 0, 8, FL_NORMAL_LABEL, 0, 14, 0},
+ {0,0,0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0,0,0}
+};
+
+static void cb_Quick(Fl_Menu_*, void*) {
+  guideURL();
+}
+
+static void cb_About(Fl_Menu_*, void*) {
+  about();
+}
+
+Fl_Menu_Item menu_1[] = {
+ {"&Help", 0,  0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
+ {"&Quick Guide", 0,  (Fl_Callback*)cb_Quick, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"&About", 0,  (Fl_Callback*)cb_About, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {0,0,0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0,0,0}
+};
+
+Fl_Button *btn_select_input=(Fl_Button *)0;
+
+static void cb_btn_select_input(Fl_Button*, void*) {
+  fname_in = file_name("input.wav");
+txt_input_file->value(fname_in.c_str());
+}
+
+Fl_Output *txt_input_file=(Fl_Output *)0;
+
+Fl_Button *btn_select_output=(Fl_Button *)0;
+
+static void cb_btn_select_output(Fl_Button*, void*) {
+  fname_out = file_name("output.wav");
+txt_output_file->value(fname_out.c_str());
+}
+
+Fl_Output *txt_output_file=(Fl_Output *)0;
+
+Fl_Button *btn_select_simulation=(Fl_Button *)0;
+
+static void cb_btn_select_simulation(Fl_Button*, void*) {
+  select_simulation();
+}
+
+Fl_Input *txt_simulation=(Fl_Input *)0;
+
+Fl_Output *txt_simulations_filename=(Fl_Output *)0;
+
+Fl_Check_Button *p0_on=(Fl_Check_Button *)0;
+
+static void cb_p0_on(Fl_Check_Button* o, void*) {
+  sim_vals.p0.active = o->value();
+}
+
+Fl_Float_Input *inp_spread0=(Fl_Float_Input *)0;
+
+static void cb_inp_spread0(Fl_Float_Input* o, void*) {
+  sim_vals.p0.spread = atof(o->value());
+}
+
+Fl_Float_Input *inp_offset0=(Fl_Float_Input *)0;
+
+static void cb_inp_offset0(Fl_Float_Input* o, void*) {
+  sim_vals.p0.offset = atof(o->value());
+}
+
+Fl_Check_Button *p1_on=(Fl_Check_Button *)0;
+
+static void cb_p1_on(Fl_Check_Button* o, void*) {
+  sim_vals.p1.active = o->value();
+}
+
+Fl_Float_Input *inp_delay1=(Fl_Float_Input *)0;
+
+static void cb_inp_delay1(Fl_Float_Input* o, void*) {
+  sim_vals.d.delay1 = atof(o->value());
+}
+
+Fl_Float_Input *inp_spread1=(Fl_Float_Input *)0;
+
+static void cb_inp_spread1(Fl_Float_Input* o, void*) {
+  sim_vals.p1.spread = atof(o->value());
+}
+
+Fl_Float_Input *inp_offset1=(Fl_Float_Input *)0;
+
+static void cb_inp_offset1(Fl_Float_Input* o, void*) {
+  sim_vals.p1.offset = atof(o->value());
+}
+
+Fl_Check_Button *p2_on=(Fl_Check_Button *)0;
+
+static void cb_p2_on(Fl_Check_Button* o, void*) {
+  sim_vals.p2.active = o->value();
+}
+
+Fl_Float_Input *inp_delay2=(Fl_Float_Input *)0;
+
+static void cb_inp_delay2(Fl_Float_Input* o, void*) {
+  sim_vals.d.delay2 = atof(o->value());
+}
+
+Fl_Float_Input *inp_spread2=(Fl_Float_Input *)0;
+
+static void cb_inp_spread2(Fl_Float_Input* o, void*) {
+  sim_vals.p2.spread = atof(o->value());
+}
+
+Fl_Float_Input *inp_offset2=(Fl_Float_Input *)0;
+
+static void cb_inp_offset2(Fl_Float_Input* o, void*) {
+  sim_vals.p1.offset = atof(o->value());
+}
+
+Fl_Check_Button *inp_AWGN_on=(Fl_Check_Button *)0;
+
+static void cb_inp_AWGN_on(Fl_Check_Button* o, void*) {
+  sim_vals.AWGN_on = o->value();
+}
+
+Fl_Float_Input *inp_AWGN_rms=(Fl_Float_Input *)0;
+
+static void cb_inp_AWGN_rms(Fl_Float_Input* o, void*) {
+  sim_vals.snrdb = atof(o->value());
+}
+
+Fl_Progress *progress=(Fl_Progress *)0;
+
+Fl_Button *btn_test=(Fl_Button *)0;
+
+static void cb_btn_test(Fl_Button*, void*) {
+  run_simulation();
+}
+
+Fl_Group *lbl_batch=(Fl_Group *)0;
+
+Fl_Double_Window* make_linsim_window() {
+  fname_in.clear();
+  fname_out.clear();
+  { linsim_window = new Fl_Double_Window(340, 365, "linsim v1.0.0");
+    { Fl_Menu_Bar* o = new Fl_Menu_Bar(0, 0, 290, 22);
+      o->menu(menu_);
+    } // Fl_Menu_Bar* o
+    { Fl_Menu_Bar* o = new Fl_Menu_Bar(291, 0, 50, 22);
+      o->menu(menu_1);
+    } // Fl_Menu_Bar* o
+    { btn_select_input = new Fl_Button(3, 26, 60, 24, "Input");
+      btn_select_input->callback((Fl_Callback*)cb_btn_select_input);
+    } // Fl_Button* btn_select_input
+    { txt_input_file = new Fl_Output(65, 26, 270, 24);
+    } // Fl_Output* txt_input_file
+    { btn_select_output = new Fl_Button(4, 55, 60, 24, "Output");
+      btn_select_output->callback((Fl_Callback*)cb_btn_select_output);
+    } // Fl_Button* btn_select_output
+    { txt_output_file = new Fl_Output(65, 55, 270, 24);
+    } // Fl_Output* txt_output_file
+    { btn_select_simulation = new Fl_Button(4, 84, 60, 24, "Simul\'");
+      btn_select_simulation->tooltip("Select simulation");
+      btn_select_simulation->callback((Fl_Callback*)cb_btn_select_simulation);
+    } // Fl_Button* btn_select_simulation
+    { txt_simulation = new Fl_Input(65, 84, 270, 24);
+    } // Fl_Input* txt_simulation
+    { txt_simulations_filename = new Fl_Output(65, 113, 270, 24, "Models:");
+      txt_simulations_filename->tooltip("Set of simulation models in use");
+    } // Fl_Output* txt_simulations_filename
+    { Fl_Group* o = new Fl_Group(8, 142, 328, 51);
+      o->box(FL_ENGRAVED_FRAME);
+      { Fl_Check_Button* o = p0_on = new Fl_Check_Button(22, 158, 70, 19, "Path 1");
+        p0_on->down_box(FL_DOWN_BOX);
+        p0_on->callback((Fl_Callback*)cb_p0_on);
+        o->value(sim_vals.p0.active);
+      } // Fl_Check_Button* p0_on
+      { Fl_Float_Input* o = inp_spread0 = new Fl_Float_Input(180, 164, 70, 24, "Spread");
+        inp_spread0->tooltip("spread in Hz (1 sigma)");
+        inp_spread0->type(1);
+        inp_spread0->callback((Fl_Callback*)cb_inp_spread0);
+        inp_spread0->align(Fl_Align(FL_ALIGN_TOP));
+        char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p0.spread);o->value(val);
+      } // Fl_Float_Input* inp_spread0
+      { Fl_Float_Input* o = inp_offset0 = new Fl_Float_Input(255, 164, 70, 24, "Offset");
+        inp_offset0->tooltip("frequency offset in Hz");
+        inp_offset0->type(1);
+        inp_offset0->callback((Fl_Callback*)cb_inp_offset0);
+        inp_offset0->align(Fl_Align(FL_ALIGN_TOP));
+        char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p0.offset);o->value(val);
+      } // Fl_Float_Input* inp_offset0
+      o->end();
+    } // Fl_Group* o
+    { Fl_Group* o = new Fl_Group(9, 198, 328, 51);
+      o->box(FL_ENGRAVED_FRAME);
+      { Fl_Check_Button* o = p1_on = new Fl_Check_Button(23, 214, 70, 19, "Path 2");
+        p1_on->down_box(FL_DOWN_BOX);
+        p1_on->callback((Fl_Callback*)cb_p1_on);
+        o->value(sim_vals.p1.active);
+      } // Fl_Check_Button* p1_on
+      { Fl_Float_Input* o = inp_delay1 = new Fl_Float_Input(101, 217, 70, 25, "Delay");
+        inp_delay1->tooltip("delay in milliseconds");
+        inp_delay1->type(1);
+        inp_delay1->callback((Fl_Callback*)cb_inp_delay1);
+        inp_delay1->align(Fl_Align(FL_ALIGN_TOP));
+        char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.d.delay1);o->value(val);
+      } // Fl_Float_Input* inp_delay1
+      { Fl_Float_Input* o = inp_spread1 = new Fl_Float_Input(180, 217, 70, 24, "Spread");
+        inp_spread1->tooltip("spread in Hz (1 sigma)");
+        inp_spread1->type(1);
+        inp_spread1->callback((Fl_Callback*)cb_inp_spread1);
+        inp_spread1->align(Fl_Align(FL_ALIGN_TOP));
+        char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p1.spread);o->value(val);
+      } // Fl_Float_Input* inp_spread1
+      { Fl_Float_Input* o = inp_offset1 = new Fl_Float_Input(255, 217, 70, 24, "Offset");
+        inp_offset1->tooltip("frequency offset in Hz");
+        inp_offset1->type(1);
+        inp_offset1->callback((Fl_Callback*)cb_inp_offset1);
+        inp_offset1->align(Fl_Align(FL_ALIGN_TOP));
+        char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p1.offset);o->value(val);
+      } // Fl_Float_Input* inp_offset1
+      o->end();
+    } // Fl_Group* o
+    { Fl_Group* o = new Fl_Group(9, 254, 328, 51);
+      o->box(FL_ENGRAVED_FRAME);
+      { Fl_Check_Button* o = p2_on = new Fl_Check_Button(23, 270, 70, 19, "Path 3");
+        p2_on->down_box(FL_DOWN_BOX);
+        p2_on->callback((Fl_Callback*)cb_p2_on);
+        o->value(sim_vals.p2.active);
+      } // Fl_Check_Button* p2_on
+      { Fl_Float_Input* o = inp_delay2 = new Fl_Float_Input(101, 274, 70, 25, "Delay");
+        inp_delay2->tooltip("delay in milliseconds");
+        inp_delay2->type(1);
+        inp_delay2->callback((Fl_Callback*)cb_inp_delay2);
+        inp_delay2->align(Fl_Align(FL_ALIGN_TOP));
+        char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.d.delay2);o->value(val);
+      } // Fl_Float_Input* inp_delay2
+      { Fl_Float_Input* o = inp_spread2 = new Fl_Float_Input(180, 274, 70, 24, "Spread");
+        inp_spread2->tooltip("spread in Hz (1 sigma)");
+        inp_spread2->type(1);
+        inp_spread2->callback((Fl_Callback*)cb_inp_spread2);
+        inp_spread2->align(Fl_Align(FL_ALIGN_TOP));
+        char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p2.spread);o->value(val);
+      } // Fl_Float_Input* inp_spread2
+      { Fl_Float_Input* o = inp_offset2 = new Fl_Float_Input(255, 274, 70, 24, "Offset");
+        inp_offset2->tooltip("frequency offset in Hz");
+        inp_offset2->type(1);
+        inp_offset2->callback((Fl_Callback*)cb_inp_offset2);
+        inp_offset2->align(Fl_Align(FL_ALIGN_TOP));
+        char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p2.offset);o->value(val);
+      } // Fl_Float_Input* inp_offset2
+      o->end();
+    } // Fl_Group* o
+    { Fl_Group* o = new Fl_Group(9, 309, 166, 51);
+      o->box(FL_ENGRAVED_FRAME);
+      { Fl_Check_Button* o = inp_AWGN_on = new Fl_Check_Button(23, 325, 70, 19, "AWGN");
+        inp_AWGN_on->tooltip("Gaussian noise on/off");
+        inp_AWGN_on->down_box(FL_DOWN_BOX);
+        inp_AWGN_on->callback((Fl_Callback*)cb_inp_AWGN_on);
+        o->value(sim_vals.AWGN_on);
+      } // Fl_Check_Button* inp_AWGN_on
+      { Fl_Float_Input* o = inp_AWGN_rms = new Fl_Float_Input(100, 329, 70, 25, "S/N");
+        inp_AWGN_rms->tooltip("s/n in dB");
+        inp_AWGN_rms->type(1);
+        inp_AWGN_rms->callback((Fl_Callback*)cb_inp_AWGN_rms);
+        inp_AWGN_rms->align(Fl_Align(FL_ALIGN_TOP));
+        char val[20];
+        snprintf(val, sizeof(val), "%4.1f", sim_vals.snrdb);
+        o->value(val);
+      } // Fl_Float_Input* inp_AWGN_rms
+      o->end();
+    } // Fl_Group* o
+    { Fl_Progress* o = progress = new Fl_Progress(179, 311, 153, 21);
+      o->value(0);
+      o->minimum(0); o->maximum(1);
+      o->selection_color(FL_DARK_BLUE);
+    } // Fl_Progress* progress
+    { btn_test = new Fl_Button(261, 336, 70, 24, "Run Test");
+      btn_test->callback((Fl_Callback*)cb_btn_test);
+    } // Fl_Button* btn_test
+    { lbl_batch = new Fl_Group(180, 335, 80, 25, "BATCH");
+      lbl_batch->labelfont(1);
+      lbl_batch->labelcolor((Fl_Color)1);
+      lbl_batch->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
+      lbl_batch->hide();
+      lbl_batch->end();
+    } // Fl_Group* lbl_batch
+    linsim_window->end();
+  } // Fl_Double_Window* linsim_window
+  return linsim_window;
+}
+
+Fl_Check_Browser *tbl_batch_simulations=(Fl_Check_Browser *)0;
+
+Fl_Button *btn_cancel_batch=(Fl_Button *)0;
+
+static void cb_btn_cancel_batch(Fl_Button*, void*) {
+  cancel_batch_process();
+}
+
+Fl_Button *btn_clear_batch_selections=(Fl_Button *)0;
+
+static void cb_btn_clear_batch_selections(Fl_Button*, void*) {
+  clear_all_simulation();
+}
+
+Fl_Button *btn_all_batch=(Fl_Button *)0;
+
+static void cb_btn_all_batch(Fl_Button*, void*) {
+  select_all_simulations();
+}
+
+Fl_Return_Button *btn_batch_process=(Fl_Return_Button *)0;
+
+static void cb_btn_batch_process(Fl_Return_Button*, void*) {
+  batch_process_items();
+}
+
+Fl_Double_Window* make_batch_selector_dialog() {
+  Fl_Double_Window* w;
+  { Fl_Double_Window* o = new Fl_Double_Window(340, 280, "Batch Processing");
+    w = o;
+    { tbl_batch_simulations = new Fl_Check_Browser(0, 0, 340, 245);
+      tbl_batch_simulations->tooltip("check simulations to batch process");
+      Fl_Group::current()->resizable(tbl_batch_simulations);
+    } // Fl_Check_Browser* tbl_batch_simulations
+    { btn_cancel_batch = new Fl_Button(5, 252, 70, 22, "Cancel");
+      btn_cancel_batch->tooltip("Cancel - no change in model");
+      btn_cancel_batch->callback((Fl_Callback*)cb_btn_cancel_batch);
+    } // Fl_Button* btn_cancel_batch
+    { btn_clear_batch_selections = new Fl_Button(86, 252, 70, 22, "Clear");
+      btn_clear_batch_selections->tooltip("De-select all models");
+      btn_clear_batch_selections->callback((Fl_Callback*)cb_btn_clear_batch_selections);
+    } // Fl_Button* btn_clear_batch_selections
+    { btn_all_batch = new Fl_Button(168, 252, 70, 22, "All");
+      btn_all_batch->tooltip("Select all models");
+      btn_all_batch->callback((Fl_Callback*)cb_btn_all_batch);
+    } // Fl_Button* btn_all_batch
+    { btn_batch_process = new Fl_Return_Button(250, 252, 84, 22, "Process");
+      btn_batch_process->tooltip("Use checked simulation models");
+      btn_batch_process->callback((Fl_Callback*)cb_btn_batch_process);
+    } // Fl_Return_Button* btn_batch_process
+    o->end();
+  } // Fl_Double_Window* o
+  return w;
+}
+
+static void cb_Cancel(Fl_Button*, void*) {
+  cancel_selection();
+}
+
+Fl_Return_Button *btn_select=(Fl_Return_Button *)0;
+
+static void cb_btn_select(Fl_Return_Button*, void*) {
+  select_entry(tbl_simulations->value());
+}
+
+Fl_Browser *tbl_simulations=(Fl_Browser *)0;
+
+static void cb_tbl_simulations(Fl_Browser*, void*) {
+  tbl_simulations_selected();
+}
+
+Fl_Button *btn_delete_selection=(Fl_Button *)0;
+
+static void cb_btn_delete_selection(Fl_Button*, void*) {
+  delete_selection(tbl_simulations->value());
+}
+
+Fl_Button *btn_update_selection=(Fl_Button *)0;
+
+static void cb_btn_update_selection(Fl_Button*, void*) {
+  update_selection(tbl_simulations->value());
+}
+
+Fl_Double_Window* make_selector_dialog() {
+  Fl_Double_Window* w;
+  { Fl_Double_Window* o = new Fl_Double_Window(340, 270, "Select Simulation Model");
+    w = o;
+    { Fl_Button* o = new Fl_Button(165, 245, 70, 20, "Cancel");
+      o->tooltip("Cancel - no change in model");
+      o->callback((Fl_Callback*)cb_Cancel);
+    } // Fl_Button* o
+    { btn_select = new Fl_Return_Button(245, 245, 84, 20, "Select");
+      btn_select->tooltip("Use hi-lighted model");
+      btn_select->callback((Fl_Callback*)cb_btn_select);
+    } // Fl_Return_Button* btn_select
+    { tbl_simulations = new Fl_Browser(0, 0, 340, 240);
+      tbl_simulations->tooltip("Select & highlight model");
+      tbl_simulations->type(2);
+      tbl_simulations->callback((Fl_Callback*)cb_tbl_simulations);
+      Fl_Group::current()->resizable(tbl_simulations);
+    } // Fl_Browser* tbl_simulations
+    { btn_delete_selection = new Fl_Button(5, 245, 70, 20, "Delete");
+      btn_delete_selection->tooltip("Delete hi-lighted simulation");
+      btn_delete_selection->callback((Fl_Callback*)cb_btn_delete_selection);
+      btn_delete_selection->deactivate();
+    } // Fl_Button* btn_delete_selection
+    { btn_update_selection = new Fl_Button(85, 245, 70, 20, "Update");
+      btn_update_selection->tooltip("Update hi-lighted simulation");
+      btn_update_selection->callback((Fl_Callback*)cb_btn_update_selection);
+      btn_update_selection->deactivate();
+    } // Fl_Button* btn_update_selection
+    o->end();
+  } // Fl_Double_Window* o
+  return w;
+}
+
+Fl_Spinner *cntr_Low_dB=(Fl_Spinner *)0;
+
+Fl_Spinner *cntr_High_dB=(Fl_Spinner *)0;
+
+Fl_Spinner *cntr_Step_dB=(Fl_Spinner *)0;
+
+Fl_Return_Button *btn_AWGNseries_process=(Fl_Return_Button *)0;
+
+static void cb_btn_AWGNseries_process(Fl_Return_Button*, void*) {
+  AWGNseries_process();
+}
+
+Fl_Button *btn_cancel_AWGNseries=(Fl_Button *)0;
+
+static void cb_btn_cancel_AWGNseries(Fl_Button*, void*) {
+  cancel_AWGNseries();
+}
+
+Fl_Double_Window* make_AWGNseries_dialog() {
+  Fl_Double_Window* w;
+  { Fl_Double_Window* o = new Fl_Double_Window(270, 120, "AGWN series");
+    w = o;
+    { cntr_Low_dB = new Fl_Spinner(84, 51, 60, 25, "Lower s/n");
+      cntr_Low_dB->tooltip("Lower limit in dB");
+      cntr_Low_dB->minimum(-40);
+      cntr_Low_dB->maximum(40);
+      cntr_Low_dB->value(0);
+    } // Fl_Spinner* cntr_Low_dB
+    { cntr_High_dB = new Fl_Spinner(85, 20, 60, 25, "Upper s/n");
+      cntr_High_dB->tooltip("Upper limit in dB");
+      cntr_High_dB->minimum(-20);
+      cntr_High_dB->maximum(40);
+      cntr_High_dB->value(20);
+    } // Fl_Spinner* cntr_High_dB
+    { cntr_Step_dB = new Fl_Spinner(84, 81, 60, 25, "Step size");
+      cntr_Step_dB->tooltip("Step size in dB");
+      cntr_Step_dB->maximum(20);
+    } // Fl_Spinner* cntr_Step_dB
+    { btn_AWGNseries_process = new Fl_Return_Button(170, 58, 84, 22, "Process");
+      btn_AWGNseries_process->tooltip("Use checked simulation models");
+      btn_AWGNseries_process->callback((Fl_Callback*)cb_btn_AWGNseries_process);
+    } // Fl_Return_Button* btn_AWGNseries_process
+    { btn_cancel_AWGNseries = new Fl_Button(177, 18, 70, 22, "Cancel");
+      btn_cancel_AWGNseries->tooltip("Cancel - no change in model");
+      btn_cancel_AWGNseries->callback((Fl_Callback*)cb_btn_cancel_AWGNseries);
+    } // Fl_Button* btn_cancel_AWGNseries
+    o->end();
+  } // Fl_Double_Window* o
+  return w;
+}
+
+Fl_File_Input *finp_output_wav_folder=(Fl_File_Input *)0;
+
+static void cb_Select(Fl_Button*, void*) {
+  output_folder_select();
+}
+
+Fl_Check_Button *btn_same_as_input_file=(Fl_Check_Button *)0;
+
+static void cb_Close(Fl_Button*, void*) {
+  close_output_dialog();
+}
+
+Fl_Double_Window* make_folder_dialog() {
+  Fl_Double_Window* w;
+  { Fl_Double_Window* o = new Fl_Double_Window(350, 105, "Output file location");
+    w = o;
+    { finp_output_wav_folder = new Fl_File_Input(4, 22, 342, 35, "Store output wav files in:");
+      finp_output_wav_folder->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+    } // Fl_File_Input* finp_output_wav_folder
+    { Fl_Button* o = new Fl_Button(94, 62, 70, 36, "Select \nFolder");
+      o->callback((Fl_Callback*)cb_Select);
+    } // Fl_Button* o
+    { btn_same_as_input_file = new Fl_Check_Button(180, 68, 164, 24, "Same as input file");
+      btn_same_as_input_file->down_box(FL_DOWN_BOX);
+      btn_same_as_input_file->value(1);
+    } // Fl_Check_Button* btn_same_as_input_file
+    { Fl_Button* o = new Fl_Button(10, 67, 70, 26, "Close");
+      o->callback((Fl_Callback*)cb_Close);
+    } // Fl_Button* o
+    o->end();
+  } // Fl_Double_Window* o
+  return w;
+}
diff --git a/src/linsim_ui.fl b/src/linsim_ui.fl
new file mode 100644
index 0000000..8db5673
--- /dev/null
+++ b/src/linsim_ui.fl
@@ -0,0 +1,408 @@
+# data file for the Fltk User Interface Designer (fluid)
+version 1.0302 
+header_name {.h} 
+code_name {.cxx}
+decl {\#include <string>} {private local
+} 
+
+decl {\#include "main.h"} {private local
+} 
+
+decl {\#include "csv.h"} {private local
+} 
+
+decl {\#include "sound.h"} {private local
+} 
+
+decl {\#include "sim_vals.h"} {private local
+} 
+
+decl {\#include "sim.h"} {private local
+} 
+
+Function {make_linsim_window()} {open
+} {
+  code {fname_in.clear();
+fname_out.clear();} {}
+  Fl_Window linsim_window {
+    label {linsim v1.0.0} open
+    xywh {783 32 340 365} type Double visible
+  } {
+    Fl_Menu_Bar {} {open
+      xywh {0 0 290 22}
+    } {
+      Submenu {} {
+        label {&File} open
+        xywh {0 0 70 21}
+      } {
+        MenuItem mnu_open_simulation_set {
+          label {&Open}
+          callback {load_simulation_set();}
+          tooltip {Load set of simulation models} xywh {0 0 36 21}
+        }
+        MenuItem mnu_save_simulation_set {
+          label {&Save}
+          callback {save_simulation_set();}
+          tooltip {Save simulation set} xywh {0 0 36 21}
+        }
+        MenuItem mnu_save_simulation_set_as {
+          label {Save &As}
+          callback {save_simulation_set_as();}
+          tooltip {Save as a new set} xywh {0 0 36 21} divider
+        }
+        MenuItem {} {
+          label {E&xit}
+          callback {clean_exit();}
+          xywh {0 0 36 21}
+        }
+      }
+      Submenu {} {
+        label {&Simulation} open
+        xywh {0 0 70 21}
+      } {
+        MenuItem mnuAddSimulation {
+          label {&Add}
+          callback {add_simulation();}
+          tooltip {Add current simulation to list} xywh {0 0 36 21} divider
+        }
+        MenuItem mnuBatchProcess {
+          label Batch
+          callback {open_batch_process_dialog();}
+          xywh {0 0 36 21}
+        }
+        MenuItem mnuAWGNseries {
+          label {AWGN series}
+          callback {AWGNseries_dialog();}
+          xywh {0 0 36 21} divider
+        }
+        MenuItem mnu_choose_folder {
+          label {Choose ouput folder}
+          callback {choose_batch_folder();}
+          xywh {0 0 36 21}
+        }
+      }
+      Submenu {} {
+        label {&Samplerate} open
+        tooltip {Set output sampling rate} xywh {0 0 70 21}
+      } {
+        MenuItem mnu_sr_as_input {
+          label {Same as input}
+          xywh {0 0 36 21} type Radio value 1
+        }
+        MenuItem mnu_sr_8000 {
+          label 8000
+          xywh {0 0 36 21} type Radio
+        }
+        MenuItem mnu_sr_11025 {
+          label 11025
+          xywh {50 50 36 21} type Radio
+        }
+        MenuItem mnu_sr_16000 {
+          label 16000
+          xywh {10 10 36 21} type Radio
+        }
+        MenuItem mnu_sr_22050 {
+          label 22050
+          xywh {20 20 36 21} type Radio
+        }
+        MenuItem mnu_sr_24000 {
+          label 24000
+          xywh {30 30 36 21} type Radio
+        }
+        MenuItem mnu_sr_44100 {
+          label 44100
+          xywh {40 40 36 21} type Radio
+        }
+        MenuItem mnu_sr_48000 {
+          label 48000
+          xywh {50 50 36 21} type Radio
+        }
+      }
+    }
+    Fl_Menu_Bar {} {open
+      xywh {291 0 50 22}
+    } {
+      Submenu {} {
+        label {&Help} open
+        xywh {0 0 70 21}
+      } {
+        MenuItem {} {
+          label {&Quick Guide}
+          callback {guideURL();}
+          xywh {0 0 36 21}
+        }
+        MenuItem {} {
+          label {&About}
+          callback {about();}
+          xywh {0 0 36 21}
+        }
+      }
+    }
+    Fl_Button btn_select_input {
+      label Input
+      callback {fname_in = file_name("input.wav");
+txt_input_file->value(fname_in.c_str());}
+      xywh {3 26 60 24}
+    }
+    Fl_Output txt_input_file {
+      xywh {65 26 270 24}
+    }
+    Fl_Button btn_select_output {
+      label Output
+      callback {fname_out = file_name("output.wav");
+txt_output_file->value(fname_out.c_str());}
+      xywh {4 55 60 24}
+    }
+    Fl_Output txt_output_file {
+      xywh {65 55 270 24}
+    }
+    Fl_Button btn_select_simulation {
+      label {Simul'}
+      callback {select_simulation();}
+      tooltip {Select simulation} xywh {4 84 60 24}
+    }
+    Fl_Input txt_simulation {
+      xywh {65 84 270 24}
+    }
+    Fl_Output txt_simulations_filename {
+      label {Models:}
+      tooltip {Set of simulation models in use} xywh {65 113 270 24}
+    }
+    Fl_Group {} {open
+      xywh {8 142 328 51} box ENGRAVED_FRAME
+    } {
+      Fl_Check_Button p0_on {
+        label {Path 1}
+        callback {sim_vals.p0.active = o->value();}
+        xywh {22 158 70 19} down_box DOWN_BOX
+        code0 {o->value(sim_vals.p0.active);}
+      }
+      Fl_Input inp_spread0 {
+        label Spread
+        callback {sim_vals.p0.spread = atof(o->value());}
+        tooltip {spread in Hz (1 sigma)} xywh {180 164 70 24} type Float align 1
+        code0 {char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p0.spread);o->value(val);}
+      }
+      Fl_Input inp_offset0 {
+        label Offset
+        callback {sim_vals.p0.offset = atof(o->value());}
+        tooltip {frequency offset in Hz} xywh {255 164 70 24} type Float align 1
+        code0 {char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p0.offset);o->value(val);}
+      }
+    }
+    Fl_Group {} {open
+      xywh {9 198 328 51} box ENGRAVED_FRAME
+    } {
+      Fl_Check_Button p1_on {
+        label {Path 2}
+        callback {sim_vals.p1.active = o->value();}
+        xywh {23 214 70 19} down_box DOWN_BOX
+        code0 {o->value(sim_vals.p1.active);}
+      }
+      Fl_Input inp_delay1 {
+        label Delay
+        callback {sim_vals.d.delay1 = atof(o->value());}
+        tooltip {delay in milliseconds} xywh {101 217 70 25} type Float align 1
+        code0 {char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.d.delay1);o->value(val);}
+      }
+      Fl_Input inp_spread1 {
+        label Spread
+        callback {sim_vals.p1.spread = atof(o->value());}
+        tooltip {spread in Hz (1 sigma)} xywh {180 217 70 24} type Float align 1
+        code0 {char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p1.spread);o->value(val);}
+      }
+      Fl_Input inp_offset1 {
+        label Offset
+        callback {sim_vals.p1.offset = atof(o->value());}
+        tooltip {frequency offset in Hz} xywh {255 217 70 24} type Float align 1
+        code0 {char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p1.offset);o->value(val);}
+      }
+    }
+    Fl_Group {} {open
+      xywh {9 254 328 51} box ENGRAVED_FRAME
+    } {
+      Fl_Check_Button p2_on {
+        label {Path 3}
+        callback {sim_vals.p2.active = o->value();}
+        xywh {23 270 70 19} down_box DOWN_BOX
+        code0 {o->value(sim_vals.p2.active);}
+      }
+      Fl_Input inp_delay2 {
+        label Delay
+        callback {sim_vals.d.delay2 = atof(o->value());}
+        tooltip {delay in milliseconds} xywh {101 274 70 25} type Float align 1
+        code0 {char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.d.delay2);o->value(val);}
+      }
+      Fl_Input inp_spread2 {
+        label Spread
+        callback {sim_vals.p2.spread = atof(o->value());}
+        tooltip {spread in Hz (1 sigma)} xywh {180 274 70 24} type Float align 1
+        code0 {char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p2.spread);o->value(val);}
+      }
+      Fl_Input inp_offset2 {
+        label Offset
+        callback {sim_vals.p1.offset = atof(o->value());}
+        tooltip {frequency offset in Hz} xywh {255 274 70 24} type Float align 1
+        code0 {char val[20]; snprintf(val, sizeof(val), "%4.2f", sim_vals.p2.offset);o->value(val);}
+      }
+    }
+    Fl_Group {} {open
+      xywh {9 309 166 51} box ENGRAVED_FRAME
+    } {
+      Fl_Check_Button inp_AWGN_on {
+        label AWGN
+        callback {sim_vals.AWGN_on = o->value();}
+        tooltip {Gaussian noise on/off} xywh {23 325 70 19} down_box DOWN_BOX
+        code0 {o->value(sim_vals.AWGN_on);}
+      }
+      Fl_Input inp_AWGN_rms {
+        label {S/N}
+        callback {sim_vals.snrdb = atof(o->value());}
+        tooltip {s/n in dB} xywh {100 329 70 25} type Float align 1
+        code0 {char val[20];}
+        code1 {snprintf(val, sizeof(val), "%4.1f", sim_vals.snrdb);}
+        code2 {o->value(val);}
+      }
+    }
+    Fl_Progress progress {
+      xywh {179 311 153 21}
+      code0 {\#include <FL/Fl_Progress.H>}
+      code1 {o->value(0);}
+      code2 {o->minimum(0); o->maximum(1);}
+      code3 {o->selection_color(FL_DARK_BLUE);}
+    }
+    Fl_Button btn_test {
+      label {Run Test}
+      callback {run_simulation();}
+      xywh {261 336 70 24}
+    }
+    Fl_Group lbl_batch {
+      label BATCH open
+      xywh {180 335 80 25} labelfont 1 labelcolor 1 align 16 hide
+    } {}
+  }
+} 
+
+Function {make_batch_selector_dialog()} {open
+} {
+  Fl_Window {} {
+    label {Batch Processing} open
+    xywh {1203 50 340 280} type Double hide resizable
+  } {
+    Fl_Check_Browser tbl_batch_simulations {
+      tooltip {check simulations to batch process} xywh {0 0 340 245} resizable
+    }
+    Fl_Button btn_cancel_batch {
+      label Cancel
+      callback {cancel_batch_process();}
+      tooltip {Cancel - no change in model} xywh {5 252 70 22}
+    }
+    Fl_Button btn_clear_batch_selections {
+      label Clear
+      callback {clear_all_simulation();}
+      tooltip {De-select all models} xywh {86 252 70 22}
+    }
+    Fl_Button btn_all_batch {
+      label All
+      callback {select_all_simulations();}
+      tooltip {Select all models} xywh {168 252 70 22}
+    }
+    Fl_Return_Button btn_batch_process {
+      label Process
+      callback {batch_process_items();}
+      tooltip {Use checked simulation models} xywh {250 252 84 22}
+    }
+  }
+} 
+
+Function {make_selector_dialog()} {open
+} {
+  Fl_Window {} {
+    label {Select Simulation Model} open
+    xywh {1179 23 340 270} type Double hide resizable
+  } {
+    Fl_Button {} {
+      label Cancel
+      callback {cancel_selection();}
+      tooltip {Cancel - no change in model} xywh {165 245 70 20}
+    }
+    Fl_Return_Button btn_select {
+      label Select
+      callback {select_entry(tbl_simulations->value());}
+      tooltip {Use hi-lighted model} xywh {245 245 84 20}
+    }
+    Fl_Browser tbl_simulations {
+      callback {tbl_simulations_selected();}
+      tooltip {Select & highlight model} xywh {0 0 340 240} type Hold resizable
+    }
+    Fl_Button btn_delete_selection {
+      label Delete
+      callback {delete_selection(tbl_simulations->value());}
+      tooltip {Delete hi-lighted simulation} xywh {5 245 70 20} deactivate
+    }
+    Fl_Button btn_update_selection {
+      label Update
+      callback {update_selection(tbl_simulations->value());}
+      tooltip {Update hi-lighted simulation} xywh {85 245 70 20} deactivate
+    }
+  }
+} 
+
+Function {make_AWGNseries_dialog()} {open
+} {
+  Fl_Window {} {
+    label {AGWN series} open
+    xywh {784 430 270 120} type Double visible
+  } {
+    Fl_Spinner cntr_Low_dB {
+      label {Lower s/n} selected
+      tooltip {Lower limit in dB} xywh {84 51 60 25} minimum -40 maximum 40 value 0
+    }
+    Fl_Spinner cntr_High_dB {
+      label {Upper s/n}
+      tooltip {Upper limit in dB} xywh {85 20 60 25} minimum -20 maximum 40 value 20
+    }
+    Fl_Spinner cntr_Step_dB {
+      label {Step size}
+      tooltip {Step size in dB} xywh {84 81 60 25} maximum 20
+    }
+    Fl_Return_Button btn_AWGNseries_process {
+      label Process
+      callback {AWGNseries_process();}
+      tooltip {Use checked simulation models} xywh {170 58 84 22}
+    }
+    Fl_Button btn_cancel_AWGNseries {
+      label Cancel
+      callback {cancel_AWGNseries();}
+      tooltip {Cancel - no change in model} xywh {177 18 70 22}
+    }
+  }
+} 
+
+Function {make_folder_dialog()} {open
+} {
+  Fl_Window {} {
+    label {Output file location} open
+    xywh {1088 430 350 105} type Double hide
+  } {
+    Fl_File_Input finp_output_wav_folder {
+      label {Store output wav files in:}
+      xywh {4 22 342 35} align 5
+    }
+    Fl_Button {} {
+      label {Select 
+Folder}
+      callback {output_folder_select();}
+      xywh {94 62 70 36}
+    }
+    Fl_Check_Button btn_same_as_input_file {
+      label {Same as input file}
+      xywh {180 68 164 24} down_box DOWN_BOX value 1
+    }
+    Fl_Button {} {
+      label Close
+      callback {close_output_dialog();}
+      xywh {10 67 70 26}
+    }
+  }
+} 
diff --git a/src/main.cxx b/src/main.cxx
new file mode 100644
index 0000000..f4e072a
--- /dev/null
+++ b/src/main.cxx
@@ -0,0 +1,872 @@
+//======================================================================
+//  linsim; main
+//    Author: Dave Freese, W1HKJ <w1hkj at w1hkj.com>
+//
+//  based on the program RTTY Compare by
+//    Alex Shovkoplyas, VE3NEA ve3nea at dxatlas.com
+//  Original written in Pascal and distributed only for Windows OS
+//
+//  This program is distributed under the GPL license
+//======================================================================
+
+#include "main.h"
+#include <string>
+#include <vector>
+
+#include "sound.h"
+
+#include <fstream>
+#include <ostream>
+
+#include <cstring>
+#include <ctime>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include <FL/Fl.H>
+#include <FL/Enumerations.H>
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Group.H>
+#include <FL/Fl_Sys_Menu_Bar.H>
+#include <FL/x.H>
+#include <FL/Fl_Help_Dialog.H>
+#include <FL/Fl_Menu_Item.H>
+#include <FL/fl_ask.H>
+#include <FL/Fl_File_Chooser.H>
+
+#include "config.h"
+#include "sound.h"
+
+#ifdef WIN32
+#	include "linsimrc.h"
+#	include "compat.h"
+#	define dirent fl_dirent_no_thanks
+#endif
+
+#include <FL/filename.H>
+
+#ifdef __MINGW32__
+#	if LINSIM_FLTK_API_MAJOR == 1 && LINSIM_FLTK_API_MINOR < 3
+#		undef dirent
+#		include <dirent.h>
+#	endif
+#	ifndef IDI_ICON
+#		define IDI_ICON 101
+#	endif
+#else
+#	include <dirent.h>
+#endif
+
+using namespace std;
+
+#include <FL/x.H>
+#include <FL/Fl_Pixmap.H>
+#include <FL/Fl_Image.H>
+#include <FL/Fl_File_Chooser.H>
+
+string BaseDir = "";
+string HomeDir = "";
+
+#define KNAME "linsim"
+#if !defined(__WIN32__) && !defined(__APPLE__)
+
+#	include "linsim_icon.cxx"
+
+Pixmap	linsim_icon_pixmap;
+
+void make_pixmap(Pixmap *xpm, const char **data)
+{
+	Fl_Window w(0,0, PACKAGE_NAME);
+	w.xclass(PACKAGE_NAME);
+	w.show();
+	w.make_current();
+	Fl_Pixmap icon(data);
+	int maxd = (icon.w() > icon.h()) ? icon.w() : icon.h();
+	*xpm = fl_create_offscreen(maxd, maxd);
+	fl_begin_offscreen(*xpm);
+	fl_color(FL_BACKGROUND_COLOR);
+	fl_rectf(0, 0, maxd, maxd);
+	icon.draw(maxd - icon.w(), maxd - icon.h());
+	fl_end_offscreen();
+}
+
+#endif
+
+csvdb simulations;
+SIM sim_test;
+_vals sim_vals;
+string fname_in;
+string fname_out;
+
+Fl_Double_Window *simulator_selector = (Fl_Double_Window *)0;
+Fl_Double_Window *batch_process_selector = (Fl_Double_Window *)0;
+Fl_Double_Window *AWGN_process_dialog = (Fl_Double_Window *)0;
+Fl_Double_Window *select_output_dialog = (Fl_Double_Window *)0;
+
+char title[50];
+char progdir[80];
+
+int handle (int e) {
+	if (Fl::focus() == linsim_window)
+		return (e == FL_SHORTCUT);
+	return 0;
+}
+
+void visit_URL(void* arg)
+{
+	const char* url = reinterpret_cast<const char *>(arg);
+#ifndef __WOE32__
+	const char* browsers[] = {
+#  ifdef __APPLE__
+		getenv("FLDIGI_BROWSER"), // valid for any OS - set by user
+		"open"                    // OS X
+#  else
+		"fl-xdg-open",            // Puppy Linux
+		"xdg-open",               // other Unix-Linux distros
+		getenv("FLDIGI_BROWSER"), // force use of spec'd browser
+		getenv("BROWSER"),        // most Linux distributions
+		"sensible-browser",
+		"firefox",
+		"mozilla"                 // must be something out there!
+#  endif
+	};
+	switch (fork()) {
+	case 0:
+#  ifndef NDEBUG
+		unsetenv("MALLOC_CHECK_");
+		unsetenv("MALLOC_PERTURB_");
+#  endif
+		for (size_t i = 0; i < sizeof(browsers)/sizeof(browsers[0]); i++)
+			if (browsers[i])
+				execlp(browsers[i], browsers[i], url, (char*)0);
+		exit(EXIT_FAILURE);
+	case -1:
+		fl_alert(
+"Could not run a web browser:\n%s\n\n"
+"Open this URL manually:\n%s",
+			 strerror(errno), url);
+	}
+#else
+	// gurgle... gurgle... HOWL
+	// "The return value is cast as an HINSTANCE for backward
+	// compatibility with 16-bit Windows applications. It is
+	// not a true HINSTANCE, however. The only thing that can
+	// be done with the returned HINSTANCE is to cast it to an
+	// int and compare it with the value 32 or one of the error
+	// codes below." (Error codes omitted to preserve sanity).
+	if ((int)ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL) <= 32)
+		fl_alert("Could not open url:\n%s\n", url);
+#endif
+}
+
+void clean_exit()
+{
+	simulations.save();
+
+	if (simulator_selector) simulator_selector->hide();
+	if (batch_process_selector)  batch_process_selector->hide();
+	if (AWGN_process_dialog) AWGN_process_dialog->hide();
+	if (select_output_dialog) select_output_dialog->hide();
+
+	linsim_window->hide();
+}
+
+void exit_main(Fl_Widget *w)
+{
+	if (Fl::event_key() == FL_Escape)
+		return;
+	clean_exit();
+}
+
+// Show an error dialog and print to cerr if available.
+// On win32 Fl::fatal displays its own error window.
+static void fatal_error(string sz_error)
+{
+	string s = "Fatal error!\n";
+	s.append(sz_error).append("\n").append(strerror(errno));
+
+// Win32 will display a MessageBox error message
+#if !defined(__WOE32__)
+	fl_message_font(FL_HELVETICA, FL_NORMAL_SIZE);
+	fl_alert("%s", s.c_str());
+#endif
+	Fl::fatal(s.c_str());
+}
+
+int main(int argc, char **argv)
+{
+	int arg_idx;
+
+	Fl::args(argc, argv, arg_idx, parse_args);
+
+	Fl::add_handler (handle);
+
+	linsim_window = make_linsim_window();
+	simulator_selector = make_selector_dialog();
+	batch_process_selector = make_batch_selector_dialog();
+	AWGN_process_dialog = make_AWGNseries_dialog();
+	select_output_dialog = make_folder_dialog();
+
+	Fl::visual (FL_DOUBLE|FL_INDEX);
+
+	sprintf (title, "linsim %s", linsim_VERSION);
+	linsim_window->label(title);
+	linsim_window->callback(exit_main);
+
+#ifdef __WOE32__
+	char dirbuf[FL_PATH_MAX + 1];
+	fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$USERPROFILE/");
+	BaseDir.assign(dirbuf);
+	HomeDir.assign(dirbuf).append("linsim.files/");
+#else
+	char dirbuf[FL_PATH_MAX + 1];
+	fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$HOME/");
+	BaseDir.assign(dirbuf);
+	HomeDir.assign(dirbuf).append(".linsim/");
+#endif
+
+	if (mkdir(HomeDir.c_str(), 0777) == -1 && errno != EEXIST) {
+		string s = "Could not create linsim directory ";
+		s.append(HomeDir);
+		fatal_error(s);
+	}
+
+#ifdef WIN32
+	linsim_window->icon((char*)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON)));
+	linsim_window->show(argc, argv);
+#elif !defined(__APPLE__)
+	make_pixmap(&linsim_icon_pixmap, linsim_icon);
+	linsim_window->icon((char *)linsim_icon_pixmap);
+	linsim_window->show(argc, argv);
+#else
+	linsim_window->show(argc, argv);
+#endif
+
+	string csv_fname;
+	csv_fname.assign(HomeDir).append("linsim.simulations.csv");
+	simulations.filename(csv_fname);
+	txt_simulations_filename->value("linsim.simulations.csv");
+	simulations.load();
+
+	return Fl::run();
+}
+
+int parse_args(int argc, char **argv, int& idx)
+{
+	if (strcasecmp("--help", argv[idx]) == 0) {
+		printf("Usage: \n\
+  --help this help text\n\
+  --version\n");
+		exit(0);
+	}
+	if (strcasecmp("--version", argv[idx]) == 0) {
+		printf("Version: "VERSION"\n");
+		exit (0);
+	}
+	return 0;
+}
+
+void update_sim_vals()
+{
+	sim_vals.p0.active = p0_on->value();
+	sim_vals.p0.spread = atof(inp_spread0->value());
+	sim_vals.p0.offset = atof(inp_offset0->value());
+
+	sim_vals.p1.active = p1_on->value();
+	sim_vals.p1.spread = atof(inp_spread1->value());
+	sim_vals.p1.offset = atof(inp_offset1->value());
+
+	sim_vals.p2.active = p2_on->value();
+	sim_vals.p2.spread = atof(inp_spread2->value());
+	sim_vals.p2.offset = atof(inp_offset2->value());
+
+	sim_vals.d.delay1 = atof(inp_delay1->value());
+	sim_vals.d.delay2 = atof(inp_delay2->value());
+
+	sim_vals.AWGN_on  = inp_AWGN_on->value();
+	sim_vals.snrdb    = atof(inp_AWGN_rms->value());
+}
+
+void set_output_sr()
+{
+	if (mnu_sr_as_input->value() == 4)
+		outfile_samplerate = inpfile_samplerate;
+	else if (mnu_sr_8000->value() == 4)
+		outfile_samplerate = 8000;
+	else if (mnu_sr_11025->value() == 4)
+		outfile_samplerate = 11025;
+	else if (mnu_sr_16000->value() == 4)
+		outfile_samplerate = 16000;
+	else if (mnu_sr_22050->value() == 4)
+		outfile_samplerate = 22050;
+	else if (mnu_sr_24000->value() == 4)
+		outfile_samplerate = 24000;
+	else if (mnu_sr_44100->value() == 4)
+		outfile_samplerate = 44100;
+	else if (mnu_sr_48000->value() == 4)
+		outfile_samplerate = 48000;
+}
+
+vector<double> inpbuff;
+vector<double> outbuff;
+
+void analyze_input()
+{
+	if (fname_in.empty()) return;
+
+	double buffer[MAX_BUF_SIZE];
+
+	sim_test.sound_in.open(fname_in, SoundFile::READ);
+
+	size_t r = 0;
+	sim_test.signal_rms = 0.0;
+	progress->label("Analyzing input");
+	progress->redraw_label();
+	Fl::flush();
+	sim_test.signal_rms = 0.0;
+	sim_test.num_buffs = 0;
+	size_t buffs_read = 0;
+	sim_test.signal_peak = 0;
+
+	inpbuff.clear();
+
+	memset(buffer, 0, MAX_BUF_SIZE * sizeof(double));
+	while ((r = sim_test.sound_in.read(buffer, MAX_BUF_SIZE)) > 0) {
+		sim_test.measure_rms(buffer, MAX_BUF_SIZE);
+		buffs_read++;
+		for (size_t j = 0; j < MAX_BUF_SIZE; j++)
+			inpbuff.push_back(buffer[j]);
+		memset(buffer, 0, MAX_BUF_SIZE * sizeof(double));
+		Fl::flush();
+	}
+
+	if (sim_test.signal_peak > 1.0 / 65536.0) {
+		sim_test.signal_peak *= 3;
+		for (size_t pq = 0; pq < inpbuff.size(); pq++)
+			inpbuff[pq] /= sim_test.signal_peak;
+		sim_test.signal_rms = sqrt(sim_test.signal_rms) / sim_test.signal_peak;
+	} else {
+		sim_test.signal_rms = 2.0 / 65536.0;
+	}
+
+	sim_test.sound_in.close();
+/*
+printf("Input file size %d\n", (int)inpbuff.size());
+printf("Read %d buffers; processed %d buffers\n", buffs_read, sim_test.num_buffs);
+printf("Target s/n %f\n", sim_test.snr);
+printf("signal RMS %f\n", sim_test.signal_rms);
+printf("signal gain %f, noise RMS %f\n", sim_test.signal_gain, sim_test.noise_rms);
+printf("signal peak %f, signal peak out %f\n", sim_test.signal_peak,
+	sim_test.signal_peak * sim_test.signal_gain);
+*/
+}
+
+extern int linsim_samplerate;
+
+void generate_output()
+{
+	double buffer[MAX_BUF_SIZE];
+
+	if (fname_out.empty()) return;
+
+	update_sim_vals();
+
+	sim_test.AWGN(sim_vals.AWGN_on);
+	sim_test.SetsnrValue(sim_vals.snrdb);
+
+	init_BPFir(linsim_samplerate);
+	sim_test.init(linsim_samplerate, sim_vals.p0, sim_vals.p1, sim_vals.p2, sim_vals.d);
+
+//	sim_test.init(8000.0, sim_vals.p0, sim_vals.p1, sim_vals.p2, sim_vals.d);
+
+	set_output_sr();
+
+	if (sim_test.snr >= 1.0) {
+		sim_test.signal_gain = RMS_MAXAMPLITUDE / sim_test.signal_rms;
+		sim_test.noise_rms = (sim_test.signal_gain * sim_test.signal_rms) / sim_test.snr;
+	} else {
+		sim_test.signal_gain = (RMS_MAXAMPLITUDE * sim_test.snr) / sim_test.signal_rms;
+		sim_test.noise_rms = RMS_MAXAMPLITUDE;
+	}
+
+	if (sim_test.sound_out.open(fname_out, SoundFile::WRITE) != 0) {
+		printf("Could not open sound file for WRITE.\n");
+		exit(0);
+	}
+
+	progress->value(0);
+	progress->minimum(0);
+	progress->maximum(inpbuff.size() * 1.0);
+	progress->label("Running Simulation");
+	progress->redraw_label();
+
+	outbuff.clear();
+
+	for (size_t pq = 0; pq < inpbuff.size(); pq += MAX_BUF_SIZE) {
+		memset(buffer, 0, MAX_BUF_SIZE * sizeof(double));
+		for (size_t k = 0; k < MAX_BUF_SIZE; k++)
+			buffer[k] = inpbuff[pq + k];
+		if ((pq / MAX_BUF_SIZE) %4 == 0) {
+			progress->value(pq*1.0);
+			progress->redraw();
+			Fl::flush();
+		}
+		sim_test.Process(buffer, MAX_BUF_SIZE);
+		for (size_t j = 0; j < MAX_BUF_SIZE; j++)
+			outbuff.push_back(buffer[j]);
+	}
+
+// normalize the output wav file to a max value of 0.707 to prevent clipping
+	progress->value(0);
+	progress->minimum(0);
+	progress->maximum(outbuff.size() * 1.0);
+	progress->label("Writing output");
+	progress->redraw_label();
+
+	double maxout = 0, absval;
+	for (size_t n = 0; n < outbuff.size(); n++) {
+		absval = fabs(outbuff[n]);
+		if (absval > maxout) maxout = absval;
+	}
+	if (maxout == 0) maxout = 0.707;
+	for (size_t n = 0; n < outbuff.size(); n++)
+		outbuff[n] *= (0.707 / maxout);
+
+	for (size_t n = 0; n < outbuff.size(); n += MAX_BUF_SIZE) {
+		sim_test.sound_out.write(&outbuff[n], MAX_BUF_SIZE);
+		if ((n / MAX_BUF_SIZE) % 4 == 0) {
+			progress->value(n*1.0);
+			progress->redraw();
+			Fl::flush();
+		}
+	}
+	sim_test.sound_out.close();
+
+	progress->label("");
+	progress->redraw_label();
+	progress->value(0);
+	progress->redraw();
+}
+
+void run_simulation()
+{
+	analyze_input();
+	generate_output();
+}
+
+void populate_simulation_selector()
+{
+	tbl_simulations->clear();
+	simulations.sort();
+	for (int n = 0; n < simulations.numrecs(); n++)
+		tbl_simulations->add(simulations.dbrecs[n].title.c_str());
+	tbl_simulations->redraw();
+}
+
+void cancel_selection()
+{
+	btn_delete_selection->deactivate();
+	btn_update_selection->deactivate();
+	simulator_selector->hide();
+}
+
+void delete_selection(int n)
+{
+	btn_delete_selection->deactivate();
+	btn_update_selection->deactivate();
+	if (!n) return;
+	simulations.erase(n-1);
+	populate_simulation_selector();
+}
+
+void update_selection(int n)
+{
+	btn_delete_selection->deactivate();
+	btn_update_selection->deactivate();
+
+	if (!n) return;
+	n--;
+	simulations.dbrecs[n].title = txt_simulation->value();
+
+
+	simulations.dbrecs[n].awgn = inp_AWGN_on->value() ? "1" : "0";
+	simulations.dbrecs[n].sn = inp_AWGN_rms->value();
+
+	simulations.dbrecs[n].p0 = p0_on->value() ? "1" : "0";
+	simulations.dbrecs[n].spread_0 = inp_spread0->value();
+	simulations.dbrecs[n].offset_0 = inp_offset0->value();
+
+	simulations.dbrecs[n].p1 = p1_on->value() ? "1" : "0";
+	simulations.dbrecs[n].delay_1 = inp_delay1->value();
+	simulations.dbrecs[n].spread_1 = inp_spread1->value();
+	simulations.dbrecs[n].offset_1 = inp_offset1->value();
+
+	simulations.dbrecs[n].p2 = p2_on->value() ? "1" : "0";
+	simulations.dbrecs[n].delay_2 = inp_delay2->value();
+	simulations.dbrecs[n].spread_2 = inp_spread2->value();
+	simulations.dbrecs[n].offset_2 = inp_offset2->value();
+
+	populate_simulation_selector();
+}
+
+void add_simulation()
+{
+	if (!simulator_selector) simulator_selector = make_selector_dialog();
+
+	csvRecord rec;
+
+	rec.title    = txt_simulation->value();
+	rec.awgn     = inp_AWGN_on->value() ? "1" : "0";
+	rec.sn       = inp_AWGN_rms->value();
+	rec.p0       = p0_on->value() ? "1" : "0";
+	rec.spread_0 = inp_spread0->value();
+	rec.offset_0 = inp_offset0->value();
+	rec.p1       = p1_on->value() ? "1" : "0";
+	rec.delay_1  = inp_delay1->value();
+	rec.spread_1 = inp_spread1->value();
+	rec.offset_1 = inp_offset1->value();
+	rec.p2       = p2_on->value() ? "1" : "0";
+	rec.delay_2  = inp_delay2->value();
+	rec.spread_2 = inp_spread2->value();
+	rec.offset_2 = inp_offset2->value();
+
+	simulations.add(rec);
+	populate_simulation_selector();
+}
+
+void tbl_simulations_selected()
+{
+	btn_delete_selection->deactivate();
+	btn_update_selection->deactivate();
+}
+
+void select_entry(int n)
+{
+//	simulator_selector->hide();
+	if (!n) return;
+	n--;
+
+//	simulations.printrec(n);
+
+	txt_simulation->value(simulations.dbrecs[n].title.c_str());
+
+	bool b = simulations.dbrecs[n].p0 == "1";
+	p0_on->value(b);
+	inp_spread0->value(simulations.dbrecs[n].spread_0.c_str());
+	inp_offset0->value(simulations.dbrecs[n].offset_0.c_str());
+
+	b = simulations.dbrecs[n].p1 == "1";
+	p1_on->value(b);
+	inp_delay1->value(simulations.dbrecs[n].delay_1.c_str());
+	inp_spread1->value(simulations.dbrecs[n].spread_1.c_str());
+	inp_offset1->value(simulations.dbrecs[n].offset_1.c_str());
+
+	b = simulations.dbrecs[n].p2 == "1";
+	p2_on->value(b);
+	inp_delay2->value(simulations.dbrecs[n].delay_2.c_str());
+	inp_spread2->value(simulations.dbrecs[n].spread_2.c_str());
+	inp_offset2->value(simulations.dbrecs[n].offset_2.c_str());
+
+	b = simulations.dbrecs[n].awgn == "1";
+	inp_AWGN_on->value(b);
+	inp_AWGN_rms->value(simulations.dbrecs[n].sn.c_str());
+
+	btn_delete_selection->activate();
+	btn_update_selection->activate();
+}
+
+void select_simulation()
+{
+	if (!simulator_selector) simulator_selector = make_selector_dialog();
+	populate_simulation_selector();
+	simulator_selector->show();
+}
+
+void populate_batch_selector()
+{
+	tbl_batch_simulations->clear();
+	if (simulations.numrecs() == 0) return;
+	simulations.sort();
+	for (int n = 0; n < simulations.numrecs(); n++)
+		tbl_batch_simulations->add(simulations.dbrecs[n].title.c_str());
+	tbl_batch_simulations->redraw();
+}
+
+void clear_all_simulation()
+{
+	tbl_batch_simulations->check_none();
+}
+
+void select_all_simulations()
+{
+	tbl_batch_simulations->check_all();
+}
+
+void cancel_batch_process()
+{
+	batch_process_selector->hide();
+}
+
+void clear_main_dialog()
+{
+	txt_simulation->value("");
+
+	p0_on->value(0);
+	inp_spread0->value("");
+	inp_offset0->value("");
+	p1_on->value(0);
+	inp_delay1->value("");
+	inp_spread1->value("");
+	inp_offset1->value("");
+	p2_on->value(0);
+	inp_delay2->value("");
+	inp_spread2->value("");
+	inp_offset2->value("");
+	inp_AWGN_on->value(0);
+	inp_AWGN_rms->value("");
+
+	txt_output_file->value("");
+	txt_input_file->value("");
+	fname_in = fname_out = "";
+
+}
+
+void batch_process_items()
+{
+	batch_process_selector->hide();
+	string basename;
+	string simname;
+
+	if (btn_same_as_input_file->value())
+		basename = fname_in;
+	else {
+		string name = fl_filename_name(fname_in.c_str());
+		basename = finp_output_wav_folder->value();
+		basename.append(name);
+	}
+	if (basename.empty())
+		return;
+
+	size_t p = basename.find(".wav");
+	if (p != string::npos) basename.erase(p);
+	basename.append(".");
+
+	lbl_batch->show();
+	analyze_input();
+
+	bool b;
+	for (int n = 0; n < tbl_batch_simulations->nitems(); n++) {
+		if (tbl_batch_simulations->checked(n+1)) {
+			fname_out.assign(basename);
+			simname.assign(tbl_batch_simulations->text(n+1));
+			while ((p = simname.find("(")) != string::npos) simname.erase(p,1);
+			while ((p = simname.find(")")) != string::npos) simname.erase(p,1);
+			while ((p = simname.find("/")) != string::npos) simname[p] = '_';
+			while ((p = simname.find("-")) != string::npos) simname[p] = '_';
+			while ((p = simname.find(" ")) != string::npos) simname[p] = '_';
+
+			fname_out.append(simname).append(".wav");
+			txt_output_file->value(fname_out.c_str());
+
+			txt_simulation->value(simulations.dbrecs[n].title.c_str());
+
+			b = simulations.dbrecs[n].p0 == "1";
+			p0_on->value(b);
+			inp_spread0->value(simulations.dbrecs[n].spread_0.c_str());
+			inp_offset0->value(simulations.dbrecs[n].offset_0.c_str());
+
+			b = simulations.dbrecs[n].p1 == "1";
+			p1_on->value(b);
+			inp_delay1->value(simulations.dbrecs[n].delay_1.c_str());
+			inp_spread1->value(simulations.dbrecs[n].spread_1.c_str());
+			inp_offset1->value(simulations.dbrecs[n].offset_1.c_str());
+
+			b = simulations.dbrecs[n].p2 == "1";
+			p2_on->value(b);
+			inp_delay2->value(simulations.dbrecs[n].delay_2.c_str());
+			inp_spread2->value(simulations.dbrecs[n].spread_2.c_str());
+			inp_offset2->value(simulations.dbrecs[n].offset_2.c_str());
+
+			b = simulations.dbrecs[n].awgn == "1";
+			inp_AWGN_on->value(b);
+			inp_AWGN_rms->value(simulations.dbrecs[n].sn.c_str());
+
+//run_simulation();
+			generate_output();
+		}
+	}
+	lbl_batch->hide();
+	clear_main_dialog();
+}
+
+void open_batch_process_dialog()
+{
+	if (!batch_process_selector) make_batch_selector_dialog();
+	if (simulations.numrecs() == 0) return;
+	populate_batch_selector();
+	batch_process_selector->show();
+}
+
+void load_simulation_set()
+{
+	char *picked = fl_file_chooser (
+						"Load Simulation Set",
+						"*.csv",
+						simulations.filename().c_str(), 1);
+	if (!picked) return;
+	simulations.filename(picked);
+	if (simulations.load() == 0)
+		txt_simulations_filename->value(fl_filename_name(simulations.filename().c_str()));
+}
+
+void save_simulation_set()
+{
+	simulations.save();
+}
+
+void save_simulation_set_as()
+{
+	char *picked = fl_file_chooser (
+						"Save Simulation Set",
+						"*.csv",
+						simulations.filename().c_str(), 1);
+	if (!picked) return;
+	simulations.filename(picked);
+	if (simulations.save() == 0)
+		txt_simulations_filename->value(fl_filename_name(simulations.filename().c_str()));
+}
+
+void AWGNseries_process()
+{
+	int upper = (int)cntr_High_dB->value();
+	int lower = (int)cntr_Low_dB->value();
+	int step  = (int)cntr_Step_dB->value();
+	char simname[100];
+	char szdb[10];
+
+	AWGN_process_dialog->hide();
+
+	string basename;
+	if (btn_same_as_input_file->value())
+		basename = fname_in;
+	else {
+		string name = fl_filename_name(fname_in.c_str());
+		basename = finp_output_wav_folder->value();
+		basename.append(name);
+	}
+	if (basename.empty())
+		return;
+
+	size_t p = basename.find(".wav");
+	if (p != string::npos) basename.erase(p);
+	basename.append(".");
+
+	lbl_batch->show();
+
+	p0_on->value(0);
+	inp_spread0->value(0);
+	inp_offset0->value(0);
+	p1_on->value(0);
+	inp_delay1->value(0);
+	inp_spread1->value(0);
+	inp_offset1->value(0);
+	p2_on->value(0);
+	inp_delay2->value(0);
+	inp_spread2->value(0);
+	inp_offset2->value(0);
+	inp_AWGN_on->value(1);
+
+	analyze_input();
+
+	for (int db = lower; db <= upper; db += step) {
+		snprintf(szdb, sizeof(szdb), "%d", db);
+		inp_AWGN_rms->value(szdb);
+		if (szdb[0] == '-') szdb[0] = 'm';
+		snprintf(simname, sizeof(simname), "AWGN_SN_%-s", szdb);
+		txt_simulation->value(simname);
+		fname_out.assign(basename);
+		fname_out.append(simname).append(".wav");
+		txt_output_file->value(fname_out.c_str());
+		generate_output();
+	}
+
+	lbl_batch->hide();
+	clear_main_dialog();
+}
+
+void cancel_AWGNseries()
+{
+	AWGN_process_dialog->hide();
+}
+
+void AWGNseries_dialog()
+{
+	if (!AWGN_process_dialog) AWGN_process_dialog = make_AWGNseries_dialog();
+	AWGN_process_dialog->show();
+}
+
+void output_folder_select()
+{
+	string dir = fname_in;
+	size_t p = dir.find(fl_filename_name(dir.c_str()));
+	if (p != string::npos) dir.erase(p);
+
+	char *szdir = fl_dir_chooser ( "Output wav file folder", dir.c_str(), 0 );
+
+	if (szdir) {
+		finp_output_wav_folder->value(szdir);
+		finp_output_wav_folder->redraw();
+	}
+}
+
+void close_output_dialog()
+{
+	select_output_dialog->hide();
+}
+
+void choose_batch_folder()
+{
+	if (!select_output_dialog) select_output_dialog = make_folder_dialog();
+	string dir = fname_in;
+	size_t p = dir.find(fl_filename_name(dir.c_str()));
+	if (p != string::npos) dir.erase(p);
+	finp_output_wav_folder->value(dir.c_str());
+	finp_output_wav_folder->redraw();
+	select_output_dialog->show();
+}
+
+char szAbout[200];
+void about()
+{
+    snprintf (szAbout, sizeof(szAbout),"\
+%s\n\n\
+HF path simulation program\n\
+Author: W1HKJ\n\n\
+Based on Moe Wheatley's PathSim, @ AE4JY\n\n\
+Report problems to %s", PACKAGE_STRING, PACKAGE_BUGREPORT);
+	fl_message("%s", szAbout);
+}
+
+#include "guide.cxx"
+
+void guideURL()
+{
+	string deffname = HomeDir;
+	deffname.append("linsim_guide.html");
+	ofstream f(deffname.c_str());
+	if (!f)
+		return;
+	f << szGuide;
+	f.close();
+#ifndef __WOE32__
+	visit_URL((void *)deffname.insert(0, "file://").c_str());
+#else
+	visit_URL((void *)deffname.c_str());
+#endif
+}
+
diff --git a/src/noise_gen.cxx b/src/noise_gen.cxx
new file mode 100644
index 0000000..a8e270c
--- /dev/null
+++ b/src/noise_gen.cxx
@@ -0,0 +1,198 @@
+// ---------------------------------------------------------------------
+// NoiseGen.cpp: implementation of the CNoiseGen class.
+//
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include "noise_gen.h"
+
+// pathsim original
+
+#define K_ENBW 1.10		//obtained experimentally to compensate for BP filter
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CNoiseGen::CNoiseGen()
+{
+
+}
+
+CNoiseGen::~CNoiseGen()
+{
+
+}
+void CNoiseGen::InitNoiseGen()
+{
+	for(int i=0; i<HILBPFIR_LENGTH; i++)
+		m_pQue[i] = 0.0;		// fill delay buffer with zero
+	m_FirState = HILBPFIR_LENGTH-1;
+}
+
+//////////////////////////////////////////////////////////////////
+// Adds bufsize gaussian random doubles with 0 mean and
+// RMSlevel = RMS = std to the specified buffer, pIn
+//////////////////////////////////////////////////////////////////
+void CNoiseGen::AddBWLimitedNoise(int bufsize, double *pIn, double siggain,double RMSlevel)
+{
+int i = 0, j = 0;
+double rad;
+double r;
+double u1;
+double u2;
+const double* Kptr;
+double* Firptr;
+
+	RMSlevel = RMSlevel*K_ENBW;	//ENBW gain compensation(measured experimentally)
+	while( i<bufsize )
+	{
+// Generate two uniform random numbers between -1 and +1
+// that are inside the unit circle
+		do {
+			u1 = 1.0 - 2.0 * (double)rand()/(double)RAND_MAX ;
+			u2 = 1.0 - 2.0 * (double)rand()/(double)RAND_MAX ;
+			r = u1*u1 + u2*u2;
+		} while(r >= 1.0 || r == 0.0);
+		rad = sqrt(-2.0*log(r)/r);
+
+// Performance test stuff
+//HistogramSamp(  u1*rad, -6.0, 6.0, 10000000 );
+//HistogramSamp(  1.0 - 2.0 * (double)rand()/(double)RAND_MAX, -1.5, 1.5, 10000000 );
+//pIn[i] = 0;
+//pIn[i+1] = 0;
+
+#if 1	//if want to use 3 Khz BP filtered noise set to 1 else is flat
+//
+// 3KHz BP filter the Gaussian noise(use one of the Hilbert 3Khz coefficient tables)
+		m_pQue[m_FirState] = (RMSlevel*u1*rad);	//place in circular Queue
+		Firptr = m_pQue;
+		u1 = 0.0;
+		Kptr = IHilbertBPFirCoef+HILBPFIR_LENGTH-m_FirState;
+		for (j=0; j<	HILBPFIR_LENGTH;j++)
+			u1 += ( (*Firptr++)*(*Kptr++) );
+		if( --m_FirState < 0)
+			m_FirState = HILBPFIR_LENGTH-1;
+//  Add BP filtered noise to signal
+		pIn[i] = siggain*pIn[i++] + u1;
+
+		m_pQue[m_FirState] = (RMSlevel*u2*rad);	//place in circular Queue
+		Firptr = m_pQue;
+		u2 = 0.0;
+		Kptr = IHilbertBPFirCoef+HILBPFIR_LENGTH-m_FirState;
+		for (j=0; j<	HILBPFIR_LENGTH;j++)
+			u2 += ( (*Firptr++)*(*Kptr++) );
+		if( --m_FirState < 0)
+			m_FirState = HILBPFIR_LENGTH-1;
+//  Add BP filtered noise to signal
+		pIn[i] = siggain*pIn[i++] + u2;
+#else
+		pIn[i] = siggain*pIn[i++] + RMSlevel*u1*rad;
+		pIn[i] = siggain*pIn[i++] + RMSlevel*u2*rad;
+#endif
+	}
+}
+
+/*
+#define K_ENBW 1.10		//obtained experimentally to compensate for BP filter
+// ---------------------------------------------------------------------
+// Construction/Destruction
+// ---------------------------------------------------------------------
+
+CNoiseGen::CNoiseGen()
+{
+}
+
+CNoiseGen::~CNoiseGen()
+{
+}
+
+void CNoiseGen::InitNoiseGen()
+{
+	for(int i = 0; i < HILBPFIR_LENGTH; i++)
+		m_pQue[i] = 0.0;		// fill delay buffer with zero
+	m_FirState = HILBPFIR_LENGTH-1;
+}
+
+// ---------------------------------------------------------------------
+// Adds bufsize gaussian random doubles with 0 mean and
+// RMSlevel = RMS = std to the specified buffer, pIn
+// ---------------------------------------------------------------------
+void CNoiseGen::AddBWLimitedNoise(int bufsize, double *pIn, double siggain, double RMSlevel)
+{
+int i = 0;
+double rad;
+double r;
+double u1;
+double u2;
+const complex *Kptr;
+double* Firptr;
+
+	RMSlevel = RMSlevel*K_ENBW;	//ENBW gain compensation(measured experimentally)
+	while (i < bufsize) {
+// Generate two uniform random numbers between -1 and +1
+// that are inside the unit circle
+		do {
+			u1 = 1.0 - 2.0 * (double)rand()/(double)RAND_MAX ;
+			u2 = 1.0 - 2.0 * (double)rand()/(double)RAND_MAX ;
+			r = u1*u1 + u2*u2;
+		} while (r >= 1.0 || r == 0.0);
+		rad = sqrt(-2.0*log(r)/r);
+
+#if 1	//if want to use 3 Khz BP filtered noise set to 1 else is flat
+//
+// 3KHz BP filter the Gaussian noise
+// use real component of the Hilbert 3Khz coefficient tables
+		m_pQue[m_FirState] = (RMSlevel*u1*rad);	//place in circular Queue
+		Firptr = m_pQue;
+		u1 = 0.0;
+		Kptr = HilbertBPFirCoef + HILBPFIR_LENGTH - m_FirState;
+		for (int j = 0; j < HILBPFIR_LENGTH; j++) {
+			u1 += *Firptr * Kptr->re;
+			Firptr++;
+			Kptr++;
+		}
+		if( --m_FirState < 0)
+			m_FirState = HILBPFIR_LENGTH - 1;
+//  Add BP filtered noise to signal
+		pIn[i] = siggain*pIn[i++] + u1;
+
+		m_pQue[m_FirState] = (RMSlevel*u2*rad);	//place in circular Queue
+		Firptr = m_pQue;
+		u2 = 0.0;
+		Kptr = HilbertBPFirCoef + HILBPFIR_LENGTH - m_FirState;
+		for (int j = 0; j < HILBPFIR_LENGTH; j++) {
+			u2 += *Firptr * Kptr->re;
+			Firptr++;
+			Kptr++;
+		}
+		if( --m_FirState < 0)
+			m_FirState = HILBPFIR_LENGTH - 1;
+//  Add BP filtered noise to signal
+		pIn[i] = siggain*pIn[i++] + u2;
+#else
+		pIn[i] = siggain*pIn[i++] + RMSlevel*u1*rad;
+		pIn[i] = siggain*pIn[i++] + RMSlevel*u2*rad;
+#endif
+	}
+
+}
+*/
diff --git a/src/path.cxx b/src/path.cxx
new file mode 100644
index 0000000..62f41bd
--- /dev/null
+++ b/src/path.cxx
@@ -0,0 +1,277 @@
+// ---------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#include <stdlib.h>
+#include <cmath>
+#include "path.h"
+#include "sim.h"
+
+#define K_2PI 6.283185307
+#define KGNB 0.62665707	//equivalent Noise BW of Gaussian shaped filter
+
+#define RATE_12_8 0		//Used for 0.1 > Spread >= 0.4
+#define RATE_64 1		//Used for 0.4 > Spread >= 2.0
+#define RATE_320 2		//Used for 2.0 > Spread >= 10.0
+
+CPath::CPath()
+{
+	m_Indx = 0;
+	m_pLPFIR = NULL;
+	m_NoiseSampRate = RATE_320;
+	samplerate = 8000;
+}
+
+CPath::~CPath()
+{
+	if(m_pLPFIR)
+		delete m_pLPFIR;
+}
+
+void CPath::SampleRate( double sr )
+{
+	samplerate = sr;
+	offset_freq = K_2PI / samplerate;
+}
+
+//////////////////////////////////////////////////////////////////////
+//  Initialize a path
+//////////////////////////////////////////////////////////////////////
+void CPath::InitPath( double Spread, double Offset, int blocksize, int numpaths, bool active)
+{
+	int i = 0;
+	m_BlockSize = blocksize;
+	m_Offset = Offset;
+	m_Spread = Spread;
+	m_PathActive = active;
+	m_FirState0 = INTP_QUE_SIZE-1;
+	m_FirState1 = INTP_QUE_SIZE-1;
+	m_FirState2 = INTP_QUE_SIZE-1;
+	m_FirState3 = INTP_QUE_SIZE-1;
+	m_Indx = 0;
+	m_inc = 0;
+	m_Timeinc = 0.0;
+	if (m_pLPFIR) delete m_pLPFIR;
+	m_pLPFIR = new CGaussFIR;
+	if( (m_Spread > 2.0) && (m_Spread <= 30.0) ) {
+		m_NoiseSampRate = RATE_320;
+		m_pLPFIR->Init( 320.0, m_Spread );
+		m_LPGain = sqrt(320.0/(4.0*m_Spread*KGNB) );
+	}
+	else if( (m_Spread > 0.4) && (m_Spread <= 2.0) ) {
+		m_NoiseSampRate = RATE_64;
+		m_pLPFIR->Init( 64.0, m_Spread );
+		m_LPGain = sqrt(64.0/(4.0*m_Spread*KGNB) );
+	}
+	else if( (m_Spread >= 0.1) && (m_Spread <= 0.4) ) {
+		m_NoiseSampRate = RATE_12_8;
+		m_pLPFIR->Init( 12.8, m_Spread );
+		m_LPGain = sqrt(12.8/(4.0*m_Spread*KGNB) );
+	}
+	else if( (m_Spread >= 0.0) && (m_Spread < 0.1) ) {
+//here if spread<.1 so will not use any spread just offset
+		m_NoiseSampRate = RATE_320;
+		m_LPGain = 1.0;
+	}
+	for (i = 0; i < INTP_QUE_SIZE; i++) {
+		m_pQue0[i].x = 0.0; m_pQue0[i].y = 0.0;
+		m_pQue1[i].x = 0.0; m_pQue1[i].y = 0.0;
+		m_pQue2[i].x = 0.0; m_pQue2[i].y = 0.0;
+		m_pQue3[i].x = 0.0; m_pQue3[i].y = 0.0;
+	}
+	m_LPGain = m_LPGain/ sqrt((double)numpaths);
+	for (i = 0; i < 250; i++)
+		MakeGaussianDelaySample();		//pre load filter
+}
+
+//////////////////////////////////////////////////////////////////////
+// Performs a path calculation on pIn and puts it in pOut
+//
+//  Two Low Pass filtered Gaussian random numbers are created at
+//	12.8, 64 Hz, or 320 Hz rate.  These form the input to a complex
+//	interpolation filter that bumps the sample rate up to 8000Hz.
+//
+//	Two, three, or four stages of X5 upsampling/interpolation are used.
+//	The complex noise is then multiplied by the input I/Q signal
+//	to produce the spreading/fading simulation.
+//
+//  Finally a complex NCO is multiplied by the signal to produce a
+//	Frequency offset.
+//////////////////////////////////////////////////////////////////////
+void CPath::CalcPath(cmplx *pIn, cmplx *pOut)
+{
+int i,j;
+cmplx acc;
+cmplx tmp;
+const double* Kptr;
+cmplx* Firptr;
+cmplx offset;
+
+// if path is not active just zero the output
+	if (!m_PathActive) {
+		for (i = 0; i < m_BlockSize; i++) pOut[i].x = pOut[i].y = 0.0;
+		return;
+	}
+
+	for (i = 0; i < m_BlockSize; i++) {
+		if (m_NoiseSampRate == RATE_12_8) {
+			if (m_Indx%(5*5*5*5) == 0) {
+//generate noise samples at 12.8Hz rate
+				acc = MakeGaussianDelaySample();
+
+//SweepGenCpx(  &acc, 12.8, 0.0, 6.4, 0.016 );
+
+				j = m_FirState0/INTP_VALUE;
+				m_pQue0[j].x = acc.x;
+				m_pQue0[j].y = acc.y;
+			}
+		}
+		if (m_NoiseSampRate <= RATE_64) {
+			if (m_Indx%(5*5*5) == 0) {
+				if (m_NoiseSampRate == RATE_64) {
+//generate noise samples at 64Hz rate
+					acc = MakeGaussianDelaySample();
+				} else {
+					acc.x = 0.0; acc.y = 0.0;
+					Firptr = m_pQue0;
+					Kptr = X5IntrpFIRCoef+INTP_FIR_SIZE-m_FirState0;
+					for (j = 0; j < INTP_QUE_SIZE; j++) {
+						acc.x += ( (Firptr->x)*(*Kptr) );
+						acc.y += ( (Firptr++->y)*(*Kptr) );
+						Kptr += INTP_VALUE;
+					}
+					if (--m_FirState0 < 0)
+						m_FirState0 = INTP_FIR_SIZE-1;
+				}
+//SweepGenCpx(  &acc, 64, 0.0, 32.0, 0.08 );
+				j = m_FirState1/INTP_VALUE;
+				m_pQue1[j].x = acc.x;
+				m_pQue1[j].y = acc.y;
+			}
+		}
+		if (m_Indx%(5*5) == 0) {
+//interpolate/upsample x5
+			if (m_NoiseSampRate == RATE_320) {
+				acc = MakeGaussianDelaySample();
+			} else {
+				acc.x = 0.0; acc.y = 0.0;
+				Firptr = m_pQue1;
+				Kptr = X5IntrpFIRCoef+INTP_FIR_SIZE-m_FirState1;
+				for (j = 0; j < INTP_QUE_SIZE; j++) {
+					acc.x += ( (Firptr->x)*(*Kptr) );
+					acc.y += ( (Firptr++->y)*(*Kptr) );
+					Kptr += INTP_VALUE;
+				}
+				if (--m_FirState1 < 0)
+					m_FirState1 = INTP_FIR_SIZE-1;
+			}
+//SweepGenCpx(  &acc, 320, 0.0, 160.0, 0.4 );
+			j = m_FirState2/INTP_VALUE;
+			m_pQue2[j].x = acc.x;
+			m_pQue2[j].y = acc.y;
+		}
+		if (m_Indx%(5) == 0) {
+//interpolate/upsample x5
+			acc.x = 0.0; acc.y = 0.0;
+			Firptr = m_pQue2;
+			Kptr = X5IntrpFIRCoef+INTP_FIR_SIZE-m_FirState2;
+			for (j = 0; j < INTP_QUE_SIZE; j++) {
+				acc.x += ( (Firptr->x)*(*Kptr) );
+				acc.y += ( (Firptr++->y)*(*Kptr) );
+				Kptr += INTP_VALUE;
+			}
+			if (--m_FirState2 < 0)
+				m_FirState2 = INTP_FIR_SIZE-1;
+//SweepGenCpx(  &acc, 1600, 0.0, 800.0, 2 );
+			j = m_FirState3/INTP_VALUE;
+			m_pQue3[j].x = acc.x;
+			m_pQue3[j].y = acc.y;
+		}
+		acc.x = 0.0; acc.y = 0.0;
+		Firptr = m_pQue3;
+		Kptr = X5IntrpFIRCoef+INTP_FIR_SIZE-m_FirState3;
+		for (j = 0; j < INTP_QUE_SIZE; j++) {
+			acc.x += ( (Firptr->x)*(*Kptr) );
+			acc.y += ( (Firptr++->y)*(*Kptr) );
+			Kptr += INTP_VALUE;
+		}
+		if (--m_FirState3 < 0)
+			m_FirState3 = INTP_FIR_SIZE-1;
+
+		tmp.x = (acc.x*pIn[i].x - acc.y*pIn[i].y);
+		tmp.y = (acc.x*pIn[i].y + acc.y*pIn[i].x);
+
+		if (m_Offset) {
+			offset.x = cos(m_Timeinc);		//Cpx multiply by offset frequency
+			offset.y = sin(m_Timeinc);
+
+			pOut[i].x = ((offset.x*tmp.x) - (offset.y*tmp.y));
+			pOut[i].y = ((offset.x*tmp.y) + (offset.y*tmp.x));
+
+			m_Timeinc += (offset_freq * m_Offset);
+			m_Timeinc = fmod(m_Timeinc,K_2PI);	//keep radian counter bounded
+		} else {
+			pOut[i].x = tmp.x;
+			pOut[i].y = tmp.y;
+		}
+
+		if( ++m_Indx > (INTP_VALUE*INTP_VALUE*INTP_VALUE*INTP_VALUE*m_BlockSize) )
+			m_Indx = 0;
+	}
+}
+
+/////////////////////////////////////////////////////////////////
+//  Create the complex Rayleigh distributed samples by
+//	creating two Gaussian random distributed numbers for the I and Q
+//	terms and then passing them through a Gaussian shaped LP IIR.
+//	The 2 Sigma bandwidth of the LP filter determines the amount of spread.
+/////////////////////////////////////////////////////////////////
+cmplx CPath::MakeGaussianDelaySample()
+{
+double u1;
+double u2;
+double r;
+cmplx val;
+	if( m_Spread >= 0.1 ) {
+// Generate two uniform random numbers between -1 and +1
+// that are inside the unit circle
+		do {
+			u1 = 1.0 - 2.0 * (double)rand()/(double)RAND_MAX ;
+			u2 = 1.0 - 2.0 * (double)rand()/(double)RAND_MAX ;
+			r = u1*u1 + u2*u2;
+		} while(r >= 1.0 || r == 0.0);
+		val.x = m_LPGain*u1*sqrt(-2.0*log(r)/r);
+		val.y = m_LPGain*u2*sqrt(-2.0*log(r)/r);
+
+//SweepGenCpx(  &val, 320, 0.0, 30*5, 30*5/200.0);
+
+// Now LP filter the Gaussian samples
+		val = m_pLPFIR->CalcFilter(val);
+	} else {
+//if not using any spread
+		val.x = m_LPGain;
+		val.y = 0;
+	}
+
+//gDebug1 = CalcCpxRMS( val, 288000);
+//CalcCpxSweepRMS( val, 500);
+
+	return val;
+}
diff --git a/src/sim.cxx b/src/sim.cxx
new file mode 100644
index 0000000..0adf85b
--- /dev/null
+++ b/src/sim.cxx
@@ -0,0 +1,141 @@
+// ---------------------------------------------------------------------
+// SIM.cpp: implementation of the SIM class.
+//
+// ---------------------------------------------------------------------
+// Copyright 2000, Moe Wheatley AE4JY <ae4jy at mindspring.com>
+// Modified  2013, Dave Freese W1HKJ  <w1hkj at w1hkj.com>
+//
+//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 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.
+// ---------------------------------------------------------------------
+
+#include "sim.h"
+
+#include <stdio.h>
+#include <string>
+
+SIM::SIM()
+{
+	noise_gen = new CNoiseGen;
+	delay = new CDelay;
+	path0 = new CPath;
+	path1 = new CPath;
+	path2 = new CPath;
+
+	ssum = 0.0;
+	snr = 1.0;
+	signal_rms = 0.0;
+	signal_gain = 1.0;
+	b_awgn = false;
+	samplerate = 8000;
+}
+
+SIM::~SIM()
+{
+	delete noise_gen;
+	delete delay;
+	delete path0;
+	delete path1;
+	delete path2;
+}
+
+//----------------------------------------------------------------------
+// Initialize the simulator parameters
+// Called before any Processing
+//----------------------------------------------------------------------
+
+void SIM::init(double sr, PATH_INFO &p0, PATH_INFO &p1, PATH_INFO &p2, DELAY_INFO &d)
+{
+	numpaths = 0;
+
+	samplerate = sr;
+	signal_rms = RMS_MAXAMPLITUDE;
+
+	noise_gen->InitNoiseGen();
+
+	if(p0.active) numpaths++;
+	if(p1.active) numpaths++;
+	if(p2.active) numpaths++;
+
+	path0->SampleRate(sr);
+	path0->InitPath( p0.spread, p0.offset, MAX_BUF_SIZE, numpaths, p0.active );
+	path1->SampleRate(sr);
+	path1->InitPath( p1.spread, p1.offset, MAX_BUF_SIZE, numpaths, p1.active );
+	path2->SampleRate(sr);
+	path2->InitPath( p2.spread, p2.offset, MAX_BUF_SIZE, numpaths, p2.active );
+	delay->SampleRate(sr);
+	delay->SetDelays( d.delay1, d.delay2 );
+
+}
+
+// ---------------------------------------------------------------------
+// Measure RMS of input wav file
+// ---------------------------------------------------------------------
+void SIM::measure_rms( double *samples, int BUF_SIZE)
+{
+	ssum = 0.0;
+	double smpl;
+	for( int i = 0; i <BUF_SIZE; i++) {
+		smpl = samples[i];
+		ssum += ( smpl * smpl );
+		if (fabs(smpl) > signal_peak) signal_peak = fabs(smpl);
+	}
+	if (ssum > (BUF_SIZE / 16384.0)) { // at least 2 bits of signal
+		ssum /= BUF_SIZE;
+		num_buffs++;
+		signal_rms = (signal_rms * (num_buffs - 1) + ssum) / num_buffs;
+	}
+}
+
+// ---------------------------------------------------------------------
+//  Process the real input data stream in BLOCKSIZE increments
+// ---------------------------------------------------------------------
+void SIM::Process( double *samples, int BUF_SIZE)
+{
+	path0->blocksize(BUF_SIZE);
+	path1->blocksize(BUF_SIZE);
+	path2->blocksize(BUF_SIZE);
+
+	for( int i = 0; i < BUF_SIZE; i++) {
+		sim_buffer[i] = samples[i];
+		delay0_buffer[i] = delay1_buffer[i] = delay2_buffer[i] = cmplx(0,0);
+	}
+
+	if (numpaths) {
+//Bandpass filter into I and Q and get delayed versions of the input data
+		delay->CalcBPFilter(sim_buffer, delay0_buffer);
+		delay->CreateDelays(
+					delay0_buffer,
+					path1->active(), delay1_buffer, 
+					path2->active(), delay2_buffer);
+
+//Calculate each path.
+		path0->CalcPath( delay0_buffer, delay0_buffer );
+		path1->CalcPath( delay1_buffer, delay1_buffer );
+		path2->CalcPath( delay2_buffer, delay2_buffer );
+
+// Sum and Copy just the real part back into the real buffer for output
+		for (int i = 0; i < BUF_SIZE; i++)
+			sim_buffer[i] = (delay0_buffer[i].x + delay1_buffer[i].x + delay2_buffer[i].x);
+	}
+
+// Add bandwidth limited noise
+	if (b_awgn) {
+		noise_gen->AddBWLimitedNoise(BUF_SIZE, sim_buffer, signal_gain, noise_rms);
+	}
+
+	for (int i = 0; i < BUF_SIZE; i++)
+		samples[i] = sim_buffer[i];
+}
+
diff --git a/src/sound.cxx b/src/sound.cxx
new file mode 100644
index 0000000..5886dac
--- /dev/null
+++ b/src/sound.cxx
@@ -0,0 +1,320 @@
+// ----------------------------------------------------------------------------
+//
+//      sound.cxx
+//
+// Copyright (C) 2006-2013
+//              Dave Freese, W1HKJ
+//
+// Copyright (C) 2007-2013
+//              Stelios Bounanos, M0GLD
+//
+// This file is part of linSIM.
+//
+// linSIM 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 3 of the License, or
+// (at your option) any later version.
+//
+// linSIM 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 linSIM.  If not, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#include <string>
+#include <vector>
+#include <map>
+#include <sstream>
+#include <algorithm>
+#include <iterator>
+
+#include <cstdio>
+#include <cstdlib>
+#include <cerrno>
+#include <unistd.h>
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <time.h>
+
+#include <FL/Fl_File_Chooser.H>
+#include <FL/filename.H>
+
+#include "config.h"
+#include "sound.h"
+#include "main.h"
+#include "linsim_ui.h"
+
+#define	SND_BUF_LEN      65536
+#define SNDFILE_CHANNELS 1
+#define SND_BUF_LEN	 65536
+#define SND_RW_LEN	(8 * SND_BUF_LEN)
+
+using namespace std;
+
+int inpfile_samplerate = 8000;
+int outfile_samplerate = 8000;
+int linsim_samplerate = 8000;
+SF_INFO wav_file_info;
+
+//----------------------------------------------------------------------
+// support for picking a filename
+//----------------------------------------------------------------------
+
+std::string file_name(std::string def_fname)
+{
+	def_fname.insert(0, BaseDir);
+	char *picked = fl_file_chooser	( "Audio File", "*.wav", def_fname.c_str(), 1);
+	if (!picked) return "";
+	return picked;
+}
+
+//----------------------------------------------------------------------
+// Class SoundFile implementation
+//----------------------------------------------------------------------
+
+SoundFile::SoundFile(std::string _fname, int _mode, int freq)
+        : snd_file(0),
+          format(SF_FORMAT_WAV | SF_FORMAT_PCM_16)
+{
+	fname = _fname;
+	mode = _mode;
+	linsim_samplerate = sample_frequency = freq;
+	if (!fname.empty()) open(fname, mode);
+
+	int err;
+	writ_src_data = new SRC_DATA;
+	read_src_data = new SRC_DATA;
+
+	writ_src_state = src_new(SRC_SINC_MEDIUM_QUALITY, 1, &err);
+	if (writ_src_state == 0)
+		throw SndException(src_strerror(err));
+
+	read_src_state = src_new(SRC_SINC_MEDIUM_QUALITY, 1, &err);
+	if (read_src_state == 0)
+		throw SndException(src_strerror(err));
+
+	if (read_src_state == 0)
+		throw SndException(src_strerror(err));
+	src_out_buffer = new float [SND_RW_LEN];
+	if (!src_out_buffer)
+		throw SndException(src_strerror(err));
+	src_inp_buffer = new float [SND_RW_LEN];
+	if (!src_inp_buffer)
+		throw SndException(src_strerror(err));
+	inp_pointer = src_out_buffer;
+}
+
+SoundFile::~SoundFile()
+{
+	if (mode == WRITE) sf_write_sync(snd_file) ;
+	close();
+}
+
+int SoundFile::open(std::string _fname, int _mode) 
+{
+	fname = _fname;
+	mode = _mode;
+	if (mode == WRITE) {
+		write_info.frames = 0 ;
+		write_info.samplerate = outfile_samplerate;
+		write_info.channels = wav_file_info.channels;
+		write_info.format = wav_file_info.format;
+		write_info.sections = 0;
+		write_info.seekable = 0;
+/*
+printf("WRITE\nframes : %d\nsamplerate : %d\nchannels : %d\nformat: %d\nsections: %d\nseekable: %d\n", 
+	static_cast<unsigned int>(write_info.frames),
+	write_info.samplerate, write_info.channels, write_info.format,
+	write_info.sections, write_info.seekable);
+*/
+		if ((snd_file = sf_open(fname.c_str(), SFM_WRITE, &write_info)) == NULL) {
+			fprintf(stderr, "Could not write %s:%s", fname.c_str(), sf_strerror(NULL) );
+			return 0;
+		}
+		if (sf_command(snd_file, SFC_SET_UPDATE_HEADER_AUTO, NULL, SF_TRUE) != SF_TRUE)
+			fprintf(stderr, "sound file update header command failed: %s", sf_strerror(snd_file));
+		tag_file(snd_file, "linsim output");
+
+		string wav_comment, wav_title;
+		size_t pc;
+		wav_title.assign(fl_filename_name(fname_in.c_str()));
+		pc = wav_title.find(".wav");
+		if (pc != string::npos) wav_title.erase(pc);
+
+		wav_comment.assign(txt_simulation->value());
+		pc = wav_comment.find(".wav");
+		if (pc != string::npos) wav_comment.erase(pc);
+
+		sf_set_string (snd_file, SF_STR_SOFTWARE, PACKAGE_STRING);
+		sf_set_string (snd_file, SF_STR_ARTIST, "W1HKJ software");
+		sf_set_string (snd_file, SF_STR_TITLE, wav_title.c_str());
+		sf_set_string (snd_file, SF_STR_COMMENT, wav_comment.c_str() );
+
+		writ_src_data->src_ratio = 1.0 * outfile_samplerate / linsim_samplerate;
+		src_set_ratio(writ_src_state, writ_src_data->src_ratio);
+
+	} else {
+		if (fname.empty())
+			return -1;
+		read_info.frames = 0 ;
+		read_info.samplerate = 0;
+		read_info.channels = 0;
+		read_info.format = 0;
+		read_info.sections = 0;
+		read_info.seekable = 0;
+		if ((snd_file = sf_open(fname.c_str(), SFM_READ, &read_info)) == NULL) {
+			fprintf(stderr, "Could not read %s:%s", fname.c_str(), sf_strerror(NULL) );
+			return -2;
+		}
+		if (read_info.channels != 1) {
+			sf_close(snd_file);
+			snd_file = NULL;
+			return -4;
+		}
+/*
+printf("READ\nframes : %d\nsamplerate : %d\nchannels : %d\nformat: %d\nsections: %d\nseekable: %d\n", 
+static_cast<unsigned int>(read_info.frames),
+read_info.samplerate, read_info.channels, read_info.format,
+read_info.sections, read_info.seekable);
+*/
+		wav_file_info = read_info;
+
+		inpfile_samplerate = read_info.samplerate;
+
+		linsim_samplerate = inpfile_samplerate;
+
+		read_src_data->src_ratio = 1.0 * linsim_samplerate / inpfile_samplerate;
+		src_set_ratio(read_src_state, read_src_data->src_ratio);
+		memset(src_inp_buffer, 0, 1024 * sizeof(float));
+
+//printf("read ratio %f\n", read_src_data->src_ratio);
+
+	}
+	return 0; 
+}
+
+void SoundFile::close()
+{
+	if (!snd_file) return;
+	sf_close(snd_file);
+	snd_file = NULL;
+}
+
+void SoundFile::rewind()
+{
+	sf_seek(snd_file, 0, SEEK_SET);
+}
+
+void SoundFile::tag_file(SNDFILE *sndfile, const char *title)
+{
+	int err;
+	if ((err = sf_set_string(sndfile, SF_STR_TITLE, title)) != 0) {
+		fprintf(stderr, "sf_set_string STR_TITLE: %s", sf_error_number(err));
+		return;
+	}
+
+	sf_set_string(sndfile, SF_STR_COPYRIGHT, "W1HKJ");
+	sf_set_string(sndfile, SF_STR_SOFTWARE,  "linSIM-1.0.0");
+	sf_set_string(sndfile, SF_STR_ARTIST,    "W1HKJ");
+	sf_set_string(sndfile, SF_STR_COMMENT,   "linSIM test file");
+
+	char s[200];
+	time_t t = time(0);
+	struct tm *zt;
+	zt = gmtime(&t);
+	if (strftime(s, sizeof(s), "%Y-%m-%dT%H:%M:%Sz", zt) > 0)
+		sf_set_string(sndfile, SF_STR_DATE, s);
+}
+
+// ---------------------------------------------------------------------
+// read_file
+// source samplerate is arbitrary, linsim samplerate is 8000
+// read from file and resample until a "count" number of converted samples
+// is available, or until at the end of the input file
+// ---------------------------------------------------------------------
+size_t SoundFile::read(float* buf, size_t count)
+{
+	sf_count_t r = 0, rd_count = 0;
+	int err = 0;
+
+	memset(src_inp_buffer, 0, 1024 * sizeof(float));
+
+	while ( static_cast<size_t>(inp_pointer - src_out_buffer) < count) {
+		rd_count = sf_readf_float(snd_file, src_inp_buffer, 1024);
+		if (!rd_count) break;
+		read_src_data->data_in = src_inp_buffer;
+		read_src_data->input_frames = rd_count;
+		read_src_data->data_out = inp_pointer;
+		read_src_data->output_frames = SND_RW_LEN - (inp_pointer - src_out_buffer);
+		read_src_data->end_of_input = 0;
+
+		if ((err = src_process(read_src_state, read_src_data)) != 0)
+			throw SndException(src_strerror(err));
+
+		inp_pointer += read_src_data->output_frames_gen;
+	}
+
+	if ( static_cast<size_t>(inp_pointer - src_out_buffer) >= count) {
+		memcpy(buf, src_out_buffer, count * sizeof(float));
+		memmove(src_out_buffer, src_out_buffer + count, (SND_RW_LEN - count) * sizeof(float));
+		inp_pointer -= count;
+		r = count;
+	}
+
+	if (r == 0) {
+		src_reset (read_src_state);
+		inp_pointer = src_out_buffer;
+	}
+	return (size_t)r;
+}
+
+size_t SoundFile::read(double* buf, size_t count)
+{
+	float buffer[count];
+	sf_count_t r =read(buffer, count);
+	for (sf_count_t i = 0; i < r; i++) buf[i] = buffer[i];
+	return (size_t)r;
+}
+
+// ---------------------------------------------------------------------
+// write_file
+//----------------------------------------------------------------------
+
+size_t SoundFile::write(float* buf, size_t count)
+{
+	int err;
+
+	writ_src_data->data_in = buf;
+	writ_src_data->input_frames = count;
+	writ_src_data->data_out = src_out_buffer;
+	writ_src_data->output_frames = SND_RW_LEN;
+	writ_src_data->end_of_input = 0;
+
+	if ((err = src_process(writ_src_state, writ_src_data)) != 0) {
+		throw SndException(src_strerror(err));
+	}
+
+	size_t output_size = writ_src_data->output_frames_gen;
+
+	if (output_size)
+		sf_writef_float(snd_file, writ_src_data->data_out, output_size);
+
+	return output_size;
+
+}
+
+size_t SoundFile::write(double* buf, size_t count)
+{
+	float *outbuf = new float[count];
+	for (size_t i = 0; i < count; i++)
+		outbuf[i] = buf[i];
+	size_t output_size = write(outbuf, count);
+	delete [] outbuf;
+	return output_size;
+}
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/linsim.git



More information about the pkg-hamradio-commits mailing list